/* ---------- Tokens ---------- */
:root {
    --cream: #f5f0e8;
    --cream-soft: #ede8df;
    --ink: #1a1a1f;
    --ink-soft: #6b6b76;
    --border: rgba(26, 26, 31, 0.12);

    /* Permanent brand */
    --forest: #2d6a4f;

    /* Jersey accents (full saturation, used for blocks/bars) */
    --jersey-gc: #ffd700;
    --jersey-sprinter: #2d6a4f;
    --jersey-kom: #dc2626;
    --jersey-team: #4a90d9;

    /* Seasonal accent: defaults to off-season forest green.
       JS at end of <body> sets data-season on <html> to swap. */
    --accent-active:     var(--forest);
    --accent-active-ink: var(--forest);

    --radius-card: 20px;

    /* Spacing scale (matches the app's xs..content ramp from DESIGN.md). */
    --space-xs:   4px;
    --space-sm:   8px;
    --space-md:  12px;
    --space-lg:  16px;
    --space-xl:  20px;
    --space-2xl: 24px;
    --space-3xl: 32px;
    --space-4xl: 48px;
    --space-5xl: 64px;
    --space-6xl: 96px;

    /* Type. ui-rounded resolves to SF Pro Rounded on Apple platforms;
       falls back gracefully elsewhere. Body uses the default SF Pro Text
       face for reading clarity at small sizes. */
    --font-display: ui-rounded, "SF Pro Rounded", "SF Compact Rounded",
        system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: -apple-system, BlinkMacSystemFont, "SF Pro Text",
        system-ui, "Segoe UI", Roboto, sans-serif;
}

/* Active Grand Tour palettes. Block color + ink-safe text variant +
   on-accent text color (used INSIDE colored cards). */
:root {
    --on-accent: #fff; /* default off-season (forest green): white sits on green */
}
[data-season="rosa"] {
    --accent-active:     #f472b6;
    --accent-active-ink: #be185d;
    --on-accent:         var(--ink); /* pink is light, ink reads */
}
[data-season="jaune"] {
    --accent-active:     #ffd700;
    --accent-active-ink: #8a6a14; /* dark gold, readable on cream */
    --on-accent:         var(--ink); /* yellow is light, ink reads */
}
[data-season="rojo"] {
    --accent-active:     #dc2626;
    --accent-active-ink: #b91c1c;
    --on-accent:         #fff;       /* red is dark, white reads */
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--cream);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    font-kerning: normal;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* Visible keyboard focus. The browser default outline is fine but
   inconsistent across browsers; an explicit ring matches the seasonal accent. */
:focus-visible {
    outline: 2px solid var(--accent-active-ink);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Honor reduced-motion preference. Disables smooth scroll and any future
   transitions in one place. */
@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;
    }
}

/* ---------- Layout ---------- */
.container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 var(--space-2xl);
}

/* ---------- Nav ---------- */
.site-nav {
    padding: var(--space-2xl) 0;
}
.site-nav .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: var(--space-md);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 22px;
    letter-spacing: -0.02em;
}
.brand-mark {
    width: 36px;
    height: 36px;
    display: block;
    border-radius: 8px;
}
.nav-links {
    display: flex;
    gap: var(--space-3xl);
    font-size: 15px;
    color: var(--ink-soft);
    font-weight: 500;
}
.nav-links a:hover { color: var(--ink); }

/* ---------- Hero ---------- */
.hero {
    padding: var(--space-5xl) 0 var(--space-6xl);
}
.hero .container {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: var(--space-5xl);
    align-items: center;
}
.eyebrow {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--accent-active-ink);
    background: color-mix(in oklab, var(--accent-active) 14%, transparent);
    padding: 6px 12px;
    border-radius: 100px;
    margin-bottom: var(--space-xl);
}
.hero h1 {
    font-family: var(--font-display);
    font-size: clamp(40px, 6vw, 64px);
    line-height: 1.05;
    letter-spacing: -0.03em;
    font-weight: 700;
    margin: 0 0 var(--space-xl);
}
.hero h1 .accent { color: var(--accent-active-ink); }
.hero p.lede {
    font-size: 19px;
    color: var(--ink-soft);
    margin: 0 0 var(--space-3xl);
    max-width: 480px;
}
.cta-row {
    display: flex;
    gap: var(--space-md);
    align-items: center;
    flex-wrap: wrap;
}

/* ---------- App Store download badge ---------- */
.app-store-badge {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 12px 22px;
    border-radius: 14px;
    background: var(--ink);
    color: var(--cream);
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    box-shadow: 0 6px 16px -8px rgba(26, 26, 31, 0.35);
}
.app-store-badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px -10px rgba(26, 26, 31, 0.45);
}
.app-store-logo {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}
.app-store-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}
.app-store-eyebrow {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.02em;
    opacity: 0.85;
}
.app-store-name {
    font-size: 19px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

/* ---------- Hero visual: framed iPhone screenshot ---------- */
.hero-visual {
    display: flex;
    justify-content: center;
}
.phone {
    /* Subtle iPhone bezel. The screenshot already has the iOS status bar
       (notch, time, signal), so the frame is just the phone body. */
    width: 100%;
    max-width: 320px;
    padding: 10px;
    border-radius: 48px;
    background: var(--ink);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.04) inset,
        0 30px 60px -20px rgba(26, 26, 31, 0.25),
        0 12px 24px -12px rgba(26, 26, 31, 0.18);
}
.phone-screen {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 38px;
    background: var(--cream);
}

/* ---------- Pitch line ---------- */
.pitch {
    position: relative;
    padding: var(--space-5xl) 0 var(--space-6xl);
    overflow: hidden;
}
.pitch-elev {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 60%;
    fill: var(--accent-active);
    opacity: 0.12;
    pointer-events: none;
}
.pitch .container { position: relative; }
.pitch-line {
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
    font-family: var(--font-display);
    font-size: clamp(40px, 6vw, 64px);
    line-height: 1.05;
    letter-spacing: -0.03em;
    font-weight: 700;
    color: var(--ink);
}

/* ---------- Footer ---------- */
.site-footer {
    border-top: 1px solid var(--border);
    padding: var(--space-4xl) 0 var(--space-5xl);
    color: var(--ink-soft);
    font-size: 14px;
}
.site-footer .container {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-lg);
    justify-content: space-between;
    align-items: center;
}
.site-footer a:hover { color: var(--ink); }
.footer-links { display: flex; gap: var(--space-2xl); }

/* ---------- Privacy / Terms page ---------- */
.legal {
    max-width: 720px;
    margin: var(--space-2xl) auto var(--space-6xl);
    padding: 0 var(--space-2xl);
}
.legal h1 {
    font-family: var(--font-display);
    font-size: 40px;
    font-weight: 700;
    letter-spacing: -0.025em;
    margin: var(--space-3xl) 0 var(--space-sm);
}
.legal .updated {
    color: var(--ink-soft);
    font-size: 14px;
    margin-bottom: var(--space-3xl);
}
.legal h2 {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 700;
    margin: var(--space-3xl) 0 var(--space-sm);
    letter-spacing: -0.015em;
}
.legal h3 {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    margin: var(--space-xl) 0 var(--space-xs);
    letter-spacing: -0.01em;
    color: var(--ink);
}
.legal p, .legal li { color: var(--ink-soft); line-height: 1.65; }
.legal a { color: var(--accent-active-ink); text-decoration: underline; }
.legal-back { margin-top: var(--space-4xl); }

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
    .hero { padding: var(--space-3xl) 0 var(--space-5xl); }
    .hero .container { grid-template-columns: 1fr; gap: var(--space-4xl); }
    .pitch { padding: var(--space-3xl) 0 var(--space-5xl); }
}
@media (max-width: 480px) {
    .nav-links { font-size: 14px; gap: var(--space-xl); }
}
