/*
 * ══════════════════════════════════════════════════════════════
 * ZenSplit — Design Tokens  (theme.css)
 *
 * Single source of truth for ALL color, spacing, and shadow tokens.
 * Mirrors the Flutter app's:
 *   • app_colors.dart  → brand color constants
 *   • app_theme.dart   → light / dark theme surfaces
 *
 * Load order: linked AFTER the inline <style> block in index.html
 *             so dark-mode component overrides correctly win the cascade.
 * ══════════════════════════════════════════════════════════════
 */

/* ──────────────────────────────────────────────
   LIGHT MODE — default tokens
   ────────────────────────────────────────────── */
:root {
    /* Brand — synced from app_colors.dart */
    --primary: #42A8F0;
    /* AppColors.primary     — vibrant blue    */
    --primary-dark: #154FA8;
    /* AppColors.primaryDark — deep ocean blue */

    /* Surfaces */
    --bg: #fdfdfc;
    --off-white: #f8f7f5;
    --glass: rgba(255, 255, 255, 0.82);
    --card-bg: #f8f7f5;
    --card-dark: #0a0a0a;
    --card-blue: #eef6ff;

    /* Text */
    --text-main: #0a0a0a;
    --text-muted: #6b7280;

    /* Borders */
    --border: #e5e7eb;
    --border-blue: #bfdbfe;

    /* Radius scale */
    --radius-xl: 40px;
    --radius-lg: 32px;
    --radius-md: 20px;
    --radius-sm: 12px;

    /* Shadows */
    --shadow-xs: 0 4px 16px rgba(0, 0, 0, 0.04);
    --shadow-sm: 0 10px 40px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 24px 60px rgba(0, 0, 0, 0.10);
    --shadow-lg: 0 40px 80px rgba(0, 0, 0, 0.16);

    /* Layout */
    --max-w: 1320px;
}

/* ──────────────────────────────────────────────
   DARK MODE — token overrides + component fixes
   ────────────────────────────────────────────── */
@media (prefers-color-scheme: dark) {

    /* ── Token overrides ── */
    :root {
        /* Surfaces */
        --bg: #0d0d0d;
        --off-white: #161616;
        --glass: rgba(15, 15, 15, 0.88);
        --card-bg: #1a1a1a;
        --card-dark: #000;
        --card-blue: #0f172a;

        /* Text */
        --text-main: #f5f4f2;
        --text-muted: #9ca3af;

        /* Borders */
        --border: #2a2a2a;
        --border-blue: #1e3a5f;

        /* Shadows — deeper in dark contexts */
        --shadow-xs: 0 4px 16px rgba(0, 0, 0, 0.30);
        --shadow-sm: 0 10px 40px rgba(0, 0, 0, 0.40);
        --shadow-md: 0 24px 60px rgba(0, 0, 0, 0.50);
        --shadow-lg: 0 40px 80px rgba(0, 0, 0, 0.60);
    }

    /* ── Navigation ── */
    nav {
        background: rgba(13, 13, 13, 0.97);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border-bottom-color: rgba(255, 255, 255, 0.05);
    }

    .nav-cta {
        background: var(--primary-dark);
        color: #fff;
    }

    .nav-cta:hover {
        background: var(--primary);
    }

    /* ── Buttons ── */
    .btn-primary {
        background: var(--primary-dark);
        color: #fff;
        box-shadow: 0 0 0 1.5px rgba(66, 168, 240, 0.3);
    }

    .btn-primary:hover {
        background: var(--primary);
        box-shadow: 0 12px 32px rgba(66, 168, 240, 0.3);
        transform: translateY(-3px);
    }

    .btn-secondary {
        background: #1e1e1e;
        color: var(--text-main);
        border-color: #3a3a3a;
    }

    .btn-secondary:hover {
        background: #2a2a2a;
        transform: translateY(-3px);
    }

    .btn-white {
        background: rgba(255, 255, 255, 0.12);
        color: #fff;
        border: 1.5px solid rgba(255, 255, 255, 0.2);
        backdrop-filter: blur(8px);
    }

    .btn-apple {
        background: #1a1a1a;
        border: 1.5px solid rgba(255, 255, 255, 0.2);
    }

    .btn-apple:hover {
        background: #2a2a2a;
        box-shadow: 0 12px 32px rgba(255, 255, 255, 0.08);
    }

    .btn-white:hover {
        background: rgba(255, 255, 255, 0.2);
        transform: translateY(-3px);
    }

    /* ── Hero ── */
    .hero {
        background: radial-gradient(ellipse 80% 50% at 50% -10%,
                rgba(59, 130, 246, 0.10), transparent);
    }

    .hero-badge {
        background: rgba(66, 168, 240, 0.15);
        color: #93c5fd;
        border-color: rgba(66, 168, 240, 0.25);
    }

    .hero-sub {
        color: rgba(245, 244, 242, 0.65);
    }

    .section-sub {
        color: rgba(245, 244, 242, 0.60);
    }

    /* ── Tags & Eyebrows ── */
    .eyebrow {
        color: var(--primary);
    }

    .bento-tag {
        color: var(--primary);
    }

    .card-dark .bento-tag {
        color: var(--primary);
    }

    /* ── Card: Blue ── */
    .card-blue .bento-tag {
        color: #60a5fa;
    }

    .card-blue h3 {
        color: #e0f2fe;
    }

    .card-blue p {
        color: rgba(147, 197, 253, 0.75);
    }

    /* ── Card: Dark ── */
    .card-dark h3 {
        color: #fff;
    }

    .card-dark p {
        color: rgba(255, 255, 255, 0.55);
    }

    /* ── Bento (default card-bg) ── */
    .bento-card h3 {
        color: var(--text-main);
    }

    .bento-card p {
        color: var(--text-muted);
    }

    /* ── Stats strip ── */
    .stats-strip {
        background: var(--off-white);
    }

    .stat-value {
        color: var(--text-main);
    }

    /* ── Breath / Quote section ── */
    .breath-section {
        background: var(--off-white);
    }

    .breath-quote {
        color: var(--text-main);
    }

    .breath-note {
        color: var(--text-muted);
    }

    /* ── Journey section ── */
    .journey-section h2,
    .journey-section p {
        color: var(--text-main);
    }

    /* ── Footer ── */
    .footer-brand-name {
        color: var(--text-main);
    }

    .footer-brand p {
        color: var(--text-muted);
    }

    .footer-col h4 {
        color: var(--text-main);
    }

    .footer-col a {
        color: var(--text-muted);
    }

    .footer-bottom {
        color: var(--text-muted);
    }

    /* ── Misc ── */
    .play-pause-btn svg {
        color: var(--text-main);
    }
}

/* ──────────────────────────────────────────────
   BRAND NAME — constant across all themes
   Mirrors Flutter login screen:
     fontWeight: bold, letterSpacing: -1
   ────────────────────────────────────────────── */
.brand-name {
    font-family: 'DM Serif Display', serif;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--primary);
    /* Always #42A8F0 — never overridden by theme */
    font-size: 22px;
}

/* ──────────────────────────────────────────────
   FAQ SECTION
   ────────────────────────────────────────────── */
.faq-section {
    background: var(--off-white);
    border-top: 1px solid var(--border);
}

.faq-grid {
    margin-top: 56px;
    display: flex;
    flex-direction: column;
    max-width: 760px;
}

.faq-item {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: box-shadow 0.3s ease;
    margin-bottom: 8px;
}

.faq-item[open] {
    box-shadow: var(--shadow-sm);
}

.faq-q {
    font-family: 'DM Serif Display', serif;
    font-size: 18px;
    font-weight: 400;
    letter-spacing: -0.3px;
    color: var(--text-main);
    padding: 22px 28px;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    user-select: none;
}

.faq-q::-webkit-details-marker {
    display: none;
}

/* The + icon — rotates to × when open */
.faq-q::after {
    content: '+';
    font-size: 24px;
    font-weight: 300;
    color: var(--primary);
    flex-shrink: 0;
    transition: transform 0.25s ease;
    font-family: 'Outfit', sans-serif;
    line-height: 1;
}

.faq-item[open] .faq-q::after {
    transform: rotate(45deg);
}

.faq-a {
    font-size: 15px;
    color: var(--text-muted);
    line-height: 1.75;
    padding: 0 28px 24px;
    font-weight: 300;
    margin: 0;
}

/* Dark mode — variables handle most of it; explicit overrides for safety */
@media (prefers-color-scheme: dark) {
    .faq-section {
        border-top-color: var(--border);
    }

    .faq-item {
        background: var(--card-bg);
        border-color: var(--border);
    }

    .faq-q {
        color: var(--text-main);
    }

    .faq-a {
        color: var(--text-muted);
    }
}