/*
 * VIRENTIA — Shared Design System
 * Colors sourced directly from iOS codebase:
 *   bg #0c0e0b          → DesignSystem.swift (meshBase dark)
 *   emerald #00C853     → Color+App.swift (emeraldBrand), DashboardView accentColor
 *   forest  #1B5E20     → DesignSystem.swift (Blob B / deepForestText light)
 *   gold    #FFD600     → DesignSystem.swift (Blob C)
 *   sage    #597A47     → Color+App.swift sageGreen (r:0.35 g:0.48 b:0.28)
 *   error   #ff7043     → PaywallView.swift
 *   glass border rgba(255,255,255,0.15) → GlassSummaryCard.swift
 *   text-sub rgba(255,255,255,0.55)     → GlassSummaryCard.swift
 */

:root {
    --bg:           #0c0e0b;
    --emerald:      #00C853;
    --forest:       #1B5E20;
    --gold:         #FFD600;
    --sage:         #597A47;
    --error:        #ff7043;
    --text:         #ffffff;
    --text-sub:     rgba(255, 255, 255, 0.55);
    --text-muted:   rgba(255, 255, 255, 0.30);
    --glass:        rgba(255, 255, 255, 0.07);
    --glass-hover:  rgba(255, 255, 255, 0.11);
    --border:       rgba(255, 255, 255, 0.13);
    --shadow:       rgba(0, 0, 0, 0.45);
    --radius-card:  24px;
    --radius-pill:  50px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

/* ─────────────────────────────────────────────
   ANIMATED BACKGROUND — matches VirentiaBackground
   Canvas in DesignSystem.swift (3 organic blobs)
───────────────────────────────────────────── */
.bg-canvas {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    will-change: transform;
}

/* Blob A — Emerald #00C853 @ 18% (sin(t*0.5)*100 drift) */
.blob-a {
    width: 420px; height: 420px;
    background: rgba(0, 200, 83, 0.18);
    top: -80px; left: 5%;
    animation: driftA 14s ease-in-out infinite;
}

/* Blob B — Deep Forest #1B5E20 @ 28% (cos drift, larger) */
.blob-b {
    width: 530px; height: 530px;
    background: rgba(27, 94, 32, 0.28);
    top: 28%; left: 32%;
    animation: driftB 18s ease-in-out infinite;
}

/* Blob C — Gold #FFD600 @ 9% (smaller, bottom-right) */
.blob-c {
    width: 320px; height: 320px;
    background: rgba(255, 214, 0, 0.09);
    bottom: 8%; right: 6%;
    animation: driftC 12s ease-in-out infinite;
}

@keyframes driftA {
    0%, 100% { transform: translate(0, 0); }
    50%       { transform: translate(100px, 80px); }
}
@keyframes driftB {
    0%, 100% { transform: translate(0, 0); }
    50%       { transform: translate(-100px, -80px); }
}
@keyframes driftC {
    0%, 100% { transform: translate(0, 0); }
    33%       { transform: translate(55px, 45px); }
    66%       { transform: translate(-45px, -35px); }
}

/* ─────────────────────────────────────────────
   LAYOUT
───────────────────────────────────────────── */
.page-wrap {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
}

.container {
    max-width: 860px;
    width: 92%;
    margin: 0 auto;
}

/* ─────────────────────────────────────────────
   STICKY NAV — pill style matching app filter bar
───────────────────────────────────────────── */
.top-nav {
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 24px 20px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.pill-nav {
    display: flex;
    gap: 4px;
    background: rgba(10, 12, 9, 0.80);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    padding: 5px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
}

.pill-nav a {
    color: var(--text-sub);
    padding: 9px 20px;
    border-radius: var(--radius-pill);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.01em;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.pill-nav a:hover       { color: var(--text); background: var(--glass-hover); }
.pill-nav a.active      { background: var(--emerald); color: #000; }

/* ─────────────────────────────────────────────
   GLASS CARD — matches GlassSummaryCard / ultraThinMaterial
───────────────────────────────────────────── */
.glass-section {
    background: var(--glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    padding: 40px 44px;
    margin-bottom: 20px;
    box-shadow: 0 8px 40px var(--shadow);
    transition: border-color 0.3s;
}

.glass-section:hover { border-color: rgba(255, 255, 255, 0.20); }

/* ─────────────────────────────────────────────
   SECTION TAG / BADGE
───────────────────────────────────────────── */
.section-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(0, 200, 83, 0.10);
    border: 1px solid rgba(0, 200, 83, 0.22);
    color: var(--emerald);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 50px;
    margin-bottom: 16px;
}

/* ─────────────────────────────────────────────
   TYPOGRAPHY
───────────────────────────────────────────── */
.glass-section h2,
.page-title {
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: 26px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 16px;
    line-height: 1.25;
}

.glass-section h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    margin: 24px 0 8px;
}

.glass-section p {
    color: var(--text-sub);
    line-height: 1.78;
    font-size: 15px;
    margin-bottom: 12px;
}

.glass-section p:last-child { margin-bottom: 0; }

.glass-section ul {
    list-style: none;
    padding: 0;
    margin-top: 4px;
}

.glass-section li {
    color: var(--text-sub);
    font-size: 15px;
    line-height: 1.72;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.glass-section li:last-child { border-bottom: none; }

.li-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--emerald);
    flex-shrink: 0;
    margin-top: 9px;
}

strong { color: rgba(255, 255, 255, 0.88); }

/* ─────────────────────────────────────────────
   BUTTONS
───────────────────────────────────────────── */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--emerald);
    color: #000;
    font-weight: 700;
    font-size: 14px;
    padding: 13px 28px;
    border-radius: var(--radius-pill);
    text-decoration: none;
    transition: all 0.25s;
    margin-top: 12px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(0, 200, 83, 0.40);
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-sub);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    background: var(--glass);
    border: 1px solid var(--border);
    padding: 9px 18px;
    border-radius: var(--radius-pill);
    transition: all 0.2s;
}

.btn-back:hover { color: var(--text); background: var(--glass-hover); }

/* ─────────────────────────────────────────────
   LANGUAGE SWITCHER
───────────────────────────────────────────── */
.lang-switch {
    display: flex;
    gap: 4px;
    background: var(--glass);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    padding: 4px;
    width: fit-content;
    margin-bottom: 28px;
}

.lang-btn {
    padding: 8px 22px;
    border-radius: var(--radius-pill);
    border: none;
    background: transparent;
    color: var(--text-sub);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.02em;
}

.lang-btn.active    { background: var(--emerald); color: #000; }
.lang-btn:hover:not(.active) { color: var(--text); }

/* ─────────────────────────────────────────────
   DIVIDER
───────────────────────────────────────────── */
.divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 28px 0;
}

/* ─────────────────────────────────────────────
   APP STORE BADGE
───────────────────────────────────────────── */
.store-wrap {
    text-align: center;
    padding: 48px 0 60px;
}

.store-wrap p {
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 16px;
}

.app-store-badge {
    height: 50px;
    opacity: 0.82;
    transition: opacity 0.2s, transform 0.2s;
}

.app-store-badge:hover { opacity: 1; transform: scale(1.03); }

/* ─────────────────────────────────────────────
   FOOTER
───────────────────────────────────────────── */
footer {
    text-align: center;
    padding: 24px 20px 48px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    width: 100%;
    margin-top: auto;
}

footer p { color: var(--text-muted); font-size: 12px; line-height: 1.7; }
footer a { color: var(--text-sub); text-decoration: none; transition: color 0.2s; }
footer a:hover { color: var(--emerald); }

/* ─────────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────────── */
@media (max-width: 640px) {
    .glass-section { padding: 28px 22px; }
    .glass-section h2 { font-size: 22px; }
    .pill-nav a { padding: 8px 13px; font-size: 12px; }
    .legal-cards { grid-template-columns: 1fr; }
    .features { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 420px) {
    .features { grid-template-columns: 1fr; }
}
