/* Redlight Greenlight site. Tokens from projects/redlight-greenlight/DESIGN.md
   (Sunlit Court / Floodlit Tarmac, Start Red, Line Yellow, lane paints; Big Shoulders + Baloo 2;
   corners 2-12 px, no pills, no shadows: Paint On Ground). Contrast pairs per SEO-BRIEF §5. */

@font-face {
    font-family: "Big Shoulders";
    src: url("fonts/big-shoulders-var.woff2") format("woff2");
    font-weight: 100 900;
    font-display: swap;
}
@font-face {
    font-family: "Baloo 2";
    src: url("fonts/baloo2-var.woff2") format("woff2");
    font-weight: 400 800;
    font-display: swap;
}

:root {
    color-scheme: light dark;
    --ground: #F2EFE8;
    --panel: #FBFAF6;
    --ink: #2B2E33;
    --muted: #4A4E55;
    --accent: #B3202F;
    --robo: #7A3CCB;
    --friend: #0A665D;
    --line: #6F737A;
    --yellow: #FFD23F;
    --ink-deep: #1E2024;
    --red-paint: #D12A3B;
    --teal: #2EC4B6;
    --blue: #2563D6;
    --clay: #E8834A;
    --display: "Big Shoulders", "Arial Narrow", sans-serif;
    --body: "Baloo 2", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
    :root {
        --ground: #2A2622;
        --panel: #34302B;
        --ink: #F3F1EA;
        --muted: #F3F1EA;
        --accent: #FF9EA4;
        --robo: #C9A6F5;
        --friend: #5FE0D3;
        --line: #9A938A;
    }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    background: var(--ground);
    color: var(--ink);
    font: 500 1.0625rem/1.5 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(--accent); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--display); font-weight: 800; line-height: 1.1; margin: 0 0 0.5em; }
h1 { font-size: clamp(2.5rem, 7vw, 4rem); font-weight: 900; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.75rem, 4vw, 2.25rem); }
h3 { font-size: 1.5rem; }
p { margin: 0 0 1em; }
ul { 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(--panel); color: var(--ink); padding: 0.75rem 1rem; z-index: 10; }
.skip-link:focus { top: 1rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Top bar: a start line under the brand */
.topbar { border-bottom: 8px solid var(--yellow); background: var(--panel); }
.topbar .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1.5rem; padding-block: 0.5rem; }
.brand { display: flex; align-items: center; gap: 0.6rem; color: var(--ink); text-decoration: none; min-height: 48px; }
.brand img { border-radius: 8px; }
.wordmark { font: 900 1.6rem/1 var(--display); text-transform: uppercase; letter-spacing: 0.02em; }
.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: 800 1.2rem/1 var(--display); text-transform: uppercase; letter-spacing: 0.03em; color: var(--ink); text-decoration: none; }
.site-nav a:hover, .site-nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 3px; }

/* Hero */
.hero { padding-block: 2.5rem 3rem; }
.hero-grid { display: grid; gap: 2rem; align-items: center; }
.hero-grid > *, .split > * { min-width: 0; }
@media (min-width: 48rem) { .hero-grid { grid-template-columns: minmax(0, 1fr) 20rem; } }
.lights { display: flex; gap: 0.5rem; margin-bottom: 1.25rem; padding: 0.5rem; background: var(--ink-deep); border-radius: 10px; width: max-content; }
.lights span { width: 1.25rem; height: 1.25rem; border-radius: 50%; background: #34373C; }
.lights .go { background: #2DC653; }
.sub { font-size: 1.25rem; color: var(--muted); max-width: 36rem; }
.badge-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.25rem; margin-top: 1.5rem; }
.badge-row p { margin: 0; color: var(--muted); }
.play-badge { display: inline-block; border-radius: 6px; }
.play-badge img { width: 188px; height: 56px; }

/* Framed store shots: 1 px border on the light court */
.shot { margin: 0; }
.shot img { border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
.hero-shot img { max-width: min(100%, 20rem); margin-inline: auto; }
figcaption { font-size: 0.95rem; color: var(--muted); margin-top: 0.5rem; }

/* Sections as lanes: a painted line between each */
.section { padding-block: 2.5rem; border-top: 6px solid var(--lane, var(--yellow)); }
.section:nth-of-type(4n+1) { --lane: var(--red-paint); }
.section:nth-of-type(4n+2) { --lane: var(--yellow); }
.section:nth-of-type(4n+3) { --lane: var(--teal); }
.section:nth-of-type(4n) { --lane: var(--clay); }
.answer { font-size: 1.2rem; max-width: 44rem; }
.detail { color: var(--muted); max-width: 44rem; }
.lead .answer { font-size: 1.3rem; }
.split { display: grid; gap: 2rem; align-items: start; }
@media (min-width: 48rem) { .split { grid-template-columns: minmax(0, 1fr) 16rem; } }
.split .shot img { max-width: min(100%, 16rem); }

.games { display: grid; gap: 1.5rem; }
@media (min-width: 40rem) { .games { grid-template-columns: 1fr 1fr; } }
.games > div { background: var(--panel); color: var(--ink); padding: 1.25rem; border-top: 8px solid var(--lane-c); }
.games .board { --lane-c: var(--blue); }
.games .action { --lane-c: var(--red-paint); }
.games ul { columns: 2 9rem; margin: 0; }

.tags { display: flex; flex-wrap: wrap; gap: 0.5rem; list-style: none; padding: 0; margin: 0 0 1rem; }
.tags li { margin: 0; padding: 0.35rem 0.75rem; border: 2px solid currentColor; border-radius: 4px; font: 800 1rem/1.4 var(--display); text-transform: uppercase; letter-spacing: 0.03em; }
.tags .robo { color: var(--robo); }
.tags .friend { color: var(--friend); }
.tags .solo { color: var(--accent); }

.facts { display: grid; gap: 0.5rem; margin: 0; }
.facts div { background: var(--panel); color: var(--ink); padding: 0.75rem 1rem; border-radius: 8px; }
.facts dt { font: 800 1.1rem/1.2 var(--display); text-transform: uppercase; }
.facts dd { margin: 0; color: var(--muted); }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); gap: 1.25rem; list-style: none; padding: 0; margin: 0; }
.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: 700; text-decoration: none; border-bottom: 3px solid var(--accent); }
.qlinks a:hover { text-decoration: underline; }

/* Inner pages */
.page-head { padding-block: 1.5rem 1rem; }
.crumbs ol { display: flex; flex-wrap: wrap; list-style: none; padding: 0; margin: 0 0 1rem; 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.2rem; color: var(--muted); max-width: 44rem; }
.step-n { font: 900 1rem/1 var(--display); color: var(--accent); text-transform: uppercase; letter-spacing: 0.05em; display: block; margin-bottom: 0.25rem; }
.limits li { max-width: 44rem; }
.end { padding-block: 2.5rem; border-top: 8px solid var(--yellow); }

/* Footer */
.footer { background: var(--ink-deep); color: #F3F1EA; padding-block: 2rem; margin-top: 2rem; border-top: 8px solid var(--yellow); }
.footer a { color: #FF9EA4; }
.footer-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }
.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; }
.fine p { margin: 0 0 0.25rem; }

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