/* Undead Driver site. Tokens from projects/undead-driver/DESIGN.md (UDColors: night, asphalt,
   panel, hairline, textHigh/Mid, amber, danger; desert vista skyTop/skyMid/skyBottom; road stripe)
   and the derived light palette in projects/undead-driver/site-docs/SEO-BRIEF.md §0.8.
   The app is always dark: dark theme = app palette; light theme = same hues, accents darkened to AA.
   Display face: Russo One subset, renamed "UD Road Sign" (the OFL reserves the name "Russo").
   Body: system sans, the app's second voice. */

@font-face {
    font-family: "UD Road Sign";
    src: url("fonts/road-sign-400.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

:root {
    color-scheme: light dark;
    /* light (derived) */
    --ground: #FBF6EF;
    --panel: #F3EADD;
    --ink: #14181C;
    --muted: #4A5058;
    --line: #8A929A;
    --accent: #8A4E1A;
    --danger: #A33A1E;
    --focus: #8A4E1A;
    /* fixed brand tokens (both themes) */
    --night: #14181C;
    --asphalt: #1B2126;
    --hairline: #3A424A;
    --text-high: #F2F0EC;
    --text-mid: #C0C6CC;
    --amber: #FFB35C;
    --sky-top: #2B1B4E;
    --sky-mid: #7A3A5C;
    --sky-low: #FF9E4F;
    --stripe: #F2E6C8;
    --display: "UD Road Sign", "Arial Black", Impact, sans-serif;
    --body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
    :root {
        --ground: #14181C;
        --panel: #23282E;
        --ink: #F2F0EC;
        --muted: #C0C6CC;
        --line: #3A424A;
        --accent: #FFB35C;
        --danger: #FF5A3C;
        --focus: #FFB35C;
    }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    background: var(--ground);
    color: var(--ink);
    font: 400 1.0625rem/1.55 var(--body);
    overflow-wrap: anywhere;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 0.15em; }
a:focus-visible, summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.12; margin: 0 0 0.5em; letter-spacing: 0.01em; }
h1 { font-size: clamp(1.9rem, 5.5vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 3.6vw, 2.1rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.25rem; }
li { margin-bottom: 0.4em; }

.wrap { width: min(70rem, 100% - 2.5rem); margin-inline: auto; }
.skip-link { position: absolute; left: 1rem; top: -4rem; background: var(--amber); color: var(--night); padding: 0.75rem 1rem; z-index: 10; font-weight: 700; }
.skip-link:focus { top: 1rem; }
.skip-link:focus-visible { outline: 3px solid var(--text-high); outline-offset: 2px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Dark bands (top bar, hero, footer) stay night-coloured in both themes:
   links and focus rings switch to amber on them. */
.topbar, .hero, .footer { --focus: var(--amber); color: var(--text-high); }

/* Top bar: asphalt with the road's centre stripe under it */
.topbar { background: var(--night); border-bottom: 1px solid var(--hairline); }
.topbar .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.25rem 1.5rem; padding-block: 0.4rem; }
.brand { display: flex; align-items: center; gap: 0.6rem; color: var(--text-high); text-decoration: none; min-height: 48px; }
.brand img { border-radius: 10px; }
.wordmark { font: 400 1.35rem/1 var(--display); text-transform: uppercase; letter-spacing: 0.03em; }
.site-nav ul { display: flex; flex-wrap: wrap; gap: 0 1.25rem; list-style: none; margin: 0; padding: 0; }
.site-nav li { margin: 0; }
.site-nav a { display: inline-flex; align-items: center; min-height: 48px; font: 400 1rem/1 var(--display); text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-high); text-decoration: none; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--amber); text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 0.35em; }

/* Hero: the desert vista sky, text kept on the upper two stops */
.hero {
    background: linear-gradient(180deg, var(--sky-top) 0%, #4A2652 55%, var(--sky-mid) 100%);
    box-shadow: inset 0 -6px 0 var(--sky-low); /* the sunset horizon (skyBottom) */
    padding: 1.75rem 0 2.5rem;
}
.hero-grid { display: grid; gap: 1.5rem; align-items: center; }
.hero-grid > *, .split > * { min-width: 0; }
@media (min-width: 56rem) { .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 2.5rem; } }
.eyebrow { font: 400 1rem/1.3 var(--display); letter-spacing: 0.04em; color: var(--amber); margin-bottom: 0.75rem; }
.hero h1 { color: var(--text-high); }
.sub { font-size: 1.15rem; color: var(--text-high); max-width: 34rem; }
.badge-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1.25rem; margin-top: 1.25rem; }
.badge-row p { margin: 0; color: var(--text-mid); }
.hero .badge-row p { color: var(--text-high); }
.play-badge { display: inline-block; border-radius: 6px; }
.play-badge img { width: 188px; height: 56px; }

/* Landscape screenshots: 16:9, hairline frame */
.shot { margin: 0; }
.shot img { width: 100%; aspect-ratio: 16 / 9; border: 1px solid var(--hairline); border-radius: 10px; background: var(--asphalt); }
.hero-shot img { box-shadow: 0 0 0 4px rgba(20, 24, 28, 0.45); }
figcaption { font-size: 0.95rem; color: var(--muted); margin-top: 0.5rem; }

/* Sections: a dashed centre line, like lane paint, between each */
.section { padding-block: 2.5rem; position: relative; }
.section + .section::before, .lead + .section::before {
    content: "";
    position: absolute; top: 0; left: 50%; transform: translateX(-50%);
    width: min(70rem, 100% - 2.5rem); height: 4px;
    background: repeating-linear-gradient(90deg, var(--accent) 0 2.25rem, transparent 2.25rem 3.75rem);
    opacity: 0.8;
}
.answer { font-size: 1.15rem; max-width: 44rem; }
.detail { color: var(--muted); max-width: 44rem; }
.lead { padding-block: 2rem 2.5rem; }
.lead .answer { font-size: 1.25rem; }
.split { display: grid; gap: 1.5rem 2.5rem; align-items: start; }
@media (min-width: 52rem) { .split { grid-template-columns: minmax(0, 1fr) minmax(0, 26rem); } }

/* "What is in the game": distance-sign tiles with big numerals */
.signs { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); gap: 1rem; list-style: none; padding: 0; margin: 1rem 0 0; }
.signs li { margin: 0; background: var(--panel); color: var(--ink); border-radius: 10px; padding: 1rem 1.1rem; border: 1px solid var(--line); }
.signs .n { display: block; font: 400 2.25rem/1 var(--display); color: var(--accent); margin-bottom: 0.35rem; font-variant-numeric: tabular-nums; }
.signs strong { font-family: var(--display); font-weight: 400; font-size: 1.1rem; display: block; margin-bottom: 0.25rem; }

.facts { display: grid; gap: 0.5rem; margin: 0; }
.facts div { background: var(--panel); color: var(--ink); padding: 0.75rem 1rem; border-radius: 10px; }
.facts dt { font: 400 1.05rem/1.25 var(--display); text-transform: uppercase; letter-spacing: 0.02em; }
.facts dd { margin: 0; color: var(--muted); }

.gallery { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem; list-style: none; padding: 0; margin: 0; }
@media (min-width: 48rem) { .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.gallery li { margin: 0; }

.qlinks { list-style: none; padding: 0; margin: 0 0 1.5rem; display: grid; gap: 0.5rem; }
.qlinks li { margin: 0; }
.qlinks a { display: flex; align-items: center; min-height: 48px; padding: 0.5rem 1rem; background: var(--panel); color: var(--ink); font-weight: 600; text-decoration: none; border: 1px solid var(--line); border-radius: 6px; }
.qlinks a::after { content: "\2192"; margin-left: auto; padding-left: 1rem; color: var(--accent); }
.qlinks a:hover { text-decoration: underline; }

/* Inner pages */
.page-head { padding-block: 1.25rem 1.5rem; }
.crumbs ol { display: flex; flex-wrap: wrap; align-items: center; list-style: none; padding: 0; margin: 0 0 0.75rem; font-size: 0.95rem; }
.crumbs li { margin: 0; }
.crumbs li + li::before { content: "\203A"; margin-inline: 0.5rem; color: var(--muted); }
.crumbs a { display: inline-block; padding-block: 0.75rem; }
.lede { font-size: 1.15rem; color: var(--muted); max-width: 44rem; }
.step-n { font: 400 0.95rem/1 var(--display); color: var(--accent); text-transform: uppercase; letter-spacing: 0.06em; display: block; margin-bottom: 0.35rem; }
.limits { max-width: 46rem; padding-left: 1.5rem; }
.limits li { margin-bottom: 0.75rem; padding-left: 0.25rem; }
.limits li::marker { font-family: var(--display); color: var(--accent); }
.faq-list section { padding: 1.5rem 0; border-top: 1px solid var(--line); }
.faq-list section:first-child { border-top: 0; }
.faq-list h2 { font-size: clamp(1.25rem, 3vw, 1.6rem); }
.end { padding-block: 2.5rem; }

/* Footer: night asphalt with the sunset line on top */
.footer { background: var(--night); padding-block: 2rem; margin-top: 2rem; border-top: 6px solid var(--sky-low); }
.footer a { color: var(--amber); }
.footer-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }
.footer-top p { margin: 0; }
.footer-links { display: flex; flex-wrap: wrap; gap: 0 1.5rem; list-style: none; padding: 0; margin: 1rem 0; }
.footer-links li { margin: 0; }
.footer-links a { display: inline-flex; align-items: center; min-height: 48px; }
.fine { font-size: 0.9rem; color: var(--text-mid); }
.fine p { margin: 0 0 0.25rem; }

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
