/* ==========================================================================
   MoneyVisor, coming soon landing
   Style: exaggerated minimalism (oversized type, high contrast, whitespace)
   Brand green #00CC94 comes straight from moneyvisor-react/src/theme/brand.ts,
   so the site and the app never drift apart.
   ========================================================================== */

/* ── Tokens ─────────────────────────────────────────────────────────────── */

:root {
    --brand: #00CC94;
    --brand-dark: #00B785;

    /* Dark is the default: the app ships with a dark-first identity. */
    --bg: #0E1512;
    --bg-elevated: #16201C;
    --surface: #16201C;
    --surface-hover: #1C2723;
    --border: rgba(255, 255, 255, 0.09);
    --border-strong: rgba(255, 255, 255, 0.16);
    --text: #F2F5F4;
    --text-muted: #A3B0AA;
    --accent: var(--brand);
    /* Accent used as *text*: needs its own value per theme to stay ≥4.5:1. */
    --accent-text: var(--brand);
    --on-accent: #04231A;
    --glow: rgba(0, 204, 148, 0.16);
    --shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.7);

    --radius: 16px;
    --radius-lg: 28px;
    --max-w: 1120px;

    /* 4/8 spacing rhythm */
    --sp-1: 4px;
    --sp-2: 8px;
    --sp-3: 16px;
    --sp-4: 24px;
    --sp-5: 32px;
    --sp-6: 48px;
    --sp-7: 72px;
    --sp-8: 112px;

    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

:root[data-theme="light"] {
    --bg: #F5F5F7;
    --bg-elevated: #FFFFFF;
    --surface: #FFFFFF;
    --surface-hover: #F0F1F0;
    --border: #E5E7E6;
    --border-strong: #D3D7D5;
    --text: #14201B;
    --text-muted: #55605B;
    --accent: var(--brand-dark);
    --accent-text: #00714F;
    --on-accent: #FFFFFF;
    --glow: rgba(0, 204, 148, 0.22);
    --shadow: 0 20px 50px -22px rgba(20, 32, 27, 0.28);
}

/* ── Reset & base ───────────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100dvh;
    background: var(--bg);
    color: var(--text);
    font-family: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    transition: background-color 240ms var(--ease-out), color 240ms var(--ease-out);
}

h1, h2, h3 { margin: 0; line-height: 1.1; letter-spacing: -0.03em; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 6px;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: var(--sp-2);
    padding: var(--sp-2) var(--sp-3);
    background: var(--accent);
    color: var(--on-accent);
    border-radius: 10px;
    font-weight: 600;
    z-index: 100;
}
.skip-link:focus { left: var(--sp-3); }

/* Ambient brand glow behind the hero. Purely decorative. */
.glow {
    position: fixed;
    top: -30vh;
    left: 50%;
    width: min(1100px, 140vw);
    aspect-ratio: 1;
    transform: translateX(-50%);
    background: radial-gradient(circle, var(--glow) 0%, transparent 62%);
    pointer-events: none;
    z-index: 0;
}

/* ── Header ─────────────────────────────────────────────────────────────── */

.site-header {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-3);
    max-width: var(--max-w);
    margin: 0 auto;
    padding: max(var(--sp-4), env(safe-area-inset-top)) var(--sp-4) var(--sp-3);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--accent);
    text-decoration: none;
    min-height: 44px;
}
.brand-mark { display: inline-flex; }
.brand-mark svg { border-radius: 8px; }
.brand-name {
    color: var(--text);
    font-weight: 600;
    font-size: 1.0625rem;
    letter-spacing: -0.01em;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
}

.lang-switch {
    display: flex;
    gap: 2px;
    padding: 3px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
}

.lang-btn {
    min-width: 44px;
    min-height: 38px;
    padding: 0 var(--sp-2);
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--text-muted);
    font: inherit;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: background-color 180ms var(--ease-out), color 180ms var(--ease-out);
}
.lang-btn:hover { color: var(--text); background: var(--surface-hover); }
.lang-btn[aria-pressed="true"] {
    background: var(--accent);
    color: var(--on-accent);
}

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    transition: background-color 180ms var(--ease-out), border-color 180ms var(--ease-out);
}
.icon-btn:hover { background: var(--surface-hover); border-color: var(--border-strong); }

/* Show the icon for the theme you would switch *to*. */
.icon-sun { display: block; }
.icon-moon { display: none; }
:root[data-theme="light"] .icon-sun { display: none; }
:root[data-theme="light"] .icon-moon { display: block; }

/* ── Hero ───────────────────────────────────────────────────────────────── */

main { position: relative; z-index: 1; }

.hero {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: var(--sp-6) var(--sp-4) var(--sp-7);
    text-align: center;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 7px var(--sp-3) 7px 12px;
    border: 1px solid var(--border-strong);
    border-radius: 999px;
    background: var(--surface);
    color: var(--text-muted);
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 0 var(--accent);
    animation: pulse 2.4s var(--ease-out) infinite;
}

@keyframes pulse {
    0%   { box-shadow: 0 0 0 0 rgba(0, 204, 148, 0.55); }
    70%  { box-shadow: 0 0 0 10px rgba(0, 204, 148, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 204, 148, 0); }
}

.hero-title {
    margin: var(--sp-4) auto var(--sp-4);
    max-width: 15ch;
    font-size: clamp(2.75rem, 9.5vw, 6.5rem);
    font-weight: 700;
    letter-spacing: -0.045em;
}
.hero-title .line { display: block; }
.hero-title .accent { color: var(--accent-text); }

.hero-sub {
    max-width: 56ch;
    margin: 0 auto;
    color: var(--text-muted);
    font-size: clamp(1rem, 2.2vw, 1.1875rem);
    line-height: 1.65;
}

/* Store badges are deliberately non-interactive: nothing to link to yet. */
.stores {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--sp-3);
    margin-top: var(--sp-5);
}

.store-badge {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 12px var(--sp-4) 12px var(--sp-3);
    min-height: 56px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
    color: var(--text);
    text-align: left;
}
.store-text { display: flex; flex-direction: column; line-height: 1.2; }
.store-text small {
    color: var(--text-muted);
    font-size: 0.6875rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.store-text strong { font-size: 1rem; font-weight: 600; }

/* ── Phone teaser ───────────────────────────────────────────────────────── */

.phone-wrap {
    display: flex;
    justify-content: center;
    margin-top: var(--sp-7);
}

.phone {
    position: relative;
    width: min(280px, 74vw);
    aspect-ratio: 9 / 17.5;
    padding: 10px;
    border: 1px solid var(--border-strong);
    border-radius: 42px;
    background: var(--bg-elevated);
    box-shadow: var(--shadow);
}

.phone-notch {
    position: absolute;
    top: 14px;
    left: 50%;
    transform: translateX(-50%);
    width: 34%;
    height: 20px;
    border-radius: 999px;
    background: var(--bg);
}

.phone-screen {
    display: flex;
    flex-direction: column;
    gap: var(--sp-4);
    height: 100%;
    padding: 52px var(--sp-3) var(--sp-4);
    border-radius: 34px;
    background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 12%, var(--bg)) 0%, var(--bg) 46%);
    overflow: hidden;
}

.mock-top { display: flex; flex-direction: column; gap: 2px; }
.mock-label {
    color: var(--text-muted);
    font-size: 0.6875rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.mock-balance {
    color: var(--text);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}

.mock-bars {
    display: flex;
    align-items: flex-end;
    gap: 7px;
    height: 78px;
}
.mock-bar {
    flex: 1;
    height: var(--h);
    border-radius: 5px 5px 3px 3px;
    background: color-mix(in srgb, var(--accent) 38%, transparent);
}
.mock-bar:nth-child(4) { background: var(--accent); }

.mock-rows { display: flex; flex-direction: column; gap: 14px; }
.mock-row { display: flex; align-items: center; gap: 10px; }
.mock-row .dot {
    flex: none;
    width: 22px;
    height: 22px;
    border-radius: 8px;
    background: color-mix(in srgb, var(--accent) 30%, transparent);
}
.mock-row .dot.alt { background: var(--border-strong); }
.mock-row .bar {
    height: 8px;
    border-radius: 999px;
    background: var(--border-strong);
}
.mock-row .bar.right { margin-left: auto; }
.w70 { width: 42%; } .w60 { width: 36%; } .w50 { width: 30%; } .w40 { width: 24%; }
.w25 { width: 16%; } .w20 { width: 13%; } .w15 { width: 10%; }

/* Pushed to the bottom of the screen so the mock reads as a full app, not a
   half-empty panel. */
.mock-tabs {
    display: flex;
    justify-content: space-between;
    gap: var(--sp-3);
    margin-top: auto;
    padding: 14px var(--sp-2) 6px;
    border-top: 1px solid var(--border);
}
.mock-tab {
    width: 26px;
    height: 10px;
    border-radius: 999px;
    background: var(--border-strong);
}
.mock-tab.active {
    width: 38px;
    background: var(--accent);
}

/* ── Features ───────────────────────────────────────────────────────────── */

.features {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: var(--sp-7) var(--sp-4);
}

.section-title {
    margin-bottom: var(--sp-6);
    font-size: clamp(1.75rem, 4.5vw, 2.75rem);
    font-weight: 700;
    letter-spacing: -0.035em;
    text-align: center;
}

/* 230px keeps all four cards on one row inside --max-w; below that the grid
   falls back to 2 columns, then 1, without a stranded orphan card. */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: var(--sp-3);
}

.feature {
    padding: var(--sp-4);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    transition: border-color 200ms var(--ease-out), background-color 200ms var(--ease-out);
}
.feature:hover { border-color: var(--border-strong); background: var(--surface-hover); }

.feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin-bottom: var(--sp-3);
    border-radius: 13px;
    background: color-mix(in srgb, var(--accent) 14%, transparent);
    color: var(--accent-text);
}

.feature h3 {
    margin-bottom: var(--sp-2);
    font-size: 1.0625rem;
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: -0.015em;
}
.feature p {
    color: var(--text-muted);
    font-size: 0.9375rem;
    line-height: 1.6;
}

/* ── Closing ────────────────────────────────────────────────────────────── */

.closing {
    max-width: 720px;
    margin: 0 auto;
    padding: var(--sp-6) var(--sp-4) var(--sp-8);
    text-align: center;
}

.closing-title {
    font-size: clamp(2rem, 6vw, 3.75rem);
    font-weight: 700;
    letter-spacing: -0.04em;
}
.closing-sub {
    max-width: 46ch;
    margin: var(--sp-3) auto var(--sp-5);
    color: var(--text-muted);
    font-size: clamp(1rem, 2vw, 1.125rem);
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 52px;
    padding: 0 var(--sp-5);
    border-radius: 999px;
    background: var(--accent);
    color: var(--on-accent);
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    cursor: pointer;
    transition: transform 180ms var(--ease-out), filter 180ms var(--ease-out);
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: scale(0.97); }

/* ── Footer ─────────────────────────────────────────────────────────────── */

.site-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: var(--sp-2);
    max-width: var(--max-w);
    margin: 0 auto;
    padding: var(--sp-4) var(--sp-4) max(var(--sp-5), env(safe-area-inset-bottom));
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* ── Motion preferences ─────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ── Small screens ──────────────────────────────────────────────────────── */

@media (max-width: 420px) {
    .site-header { padding-inline: var(--sp-3); }
    .hero, .features, .closing { padding-inline: var(--sp-3); }
    .stores { flex-direction: column; align-items: stretch; }
    .store-badge { justify-content: center; }
}
