/* Kite String site. Tokens from projects/kite-string/DESIGN.md (Rooftop Sky, game register since 2026-11-11):
   Material roles and extended colours (unchanged), paper chrome (paper, paperUnder, focusRing),
   sky gradient, Anek Latin type, 14/20 px shapes, paper panels over an under-sheet, no red. */

@font-face {
    font-family: "Anek Latin";
    src: url("/kite-string/fonts/anek-latin-var.woff2") format("woff2");
    font-weight: 100 800;
    font-stretch: 75% 125%;
    font-display: swap;
}

:root {
    color-scheme: light dark;
    --bg: #EDF3F8;
    --ink: #14203F;
    --muted: #4A5675;
    --surface: #FFFFFF;
    --surface-high: #E6EEF5;
    --primary: #B0175A;
    --primary-container: #FCE3EE;
    --on-primary-container: #5C0A2D;
    --peacock: #00767B;
    --outline: #6B7A99;
    --divider: #B9C8D8;
    --sky-top: #C9DFF1;
    --sky-horizon: #F7EEE4;
    --roof: #C5D2DF;
    --marigold-text: #8A5200;
    --paper: #FFFDF6;
    --paper-under: #E3D5BD;
    --focus: #8A5200;
    --shadow-ink: 20 32 63;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0E1430;
        --ink: #F4F1E8;
        --muted: #B3BAD4;
        --surface: #192146;
        --surface-high: #1F2850;
        --primary: #FF6FA6;
        --primary-container: #5A1636;
        --on-primary-container: #FFD9E7;
        --peacock: #4CD3C6;
        --outline: #8A94B8;
        --divider: #3A4778;
        --sky-top: #0A1030;
        --sky-horizon: #2A2350;
        --roof: #050817;
        --marigold-text: #FFC24D;
        --paper: #242E68;
        --paper-under: #0B1029;
        --focus: #FFC24D;
        --shadow-ink: 0 0 0;
    }
}

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

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

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: "Anek Latin", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-weight: 450;
    font-size: 1.0625rem;
    line-height: 1.55;
    overflow-wrap: break-word;
}

img { max-width: 100%; height: auto; }

a { color: var(--primary); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 {
    font-weight: 750;
    font-stretch: 87.5%;
    line-height: 1.12;
    letter-spacing: -0.015em;
    margin: 0 0 0.5rem;
    min-width: 0;
}
h1 { font-size: clamp(2rem, 1.4rem + 3vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 1.25rem + 1.2vw, 2rem); }
h3 { font-size: 1.25rem; font-weight: 650; font-stretch: 100%; letter-spacing: 0; }
p { margin: 0 0 1rem; max-width: 66ch; }

.wrap { width: min(72rem, 100% - 2rem); margin-inline: auto; }

.visually-hidden {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
    position: absolute; left: 1rem; top: -4rem; z-index: 10;
    background: var(--surface); color: var(--primary);
    padding: 0.75rem 1rem; border-radius: 14px; font-weight: 650;
}
.skip-link:focus { top: 1rem; }

/* Header */
.topbar { background: var(--sky-top); }
.topbar .wrap {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
    gap: 0.5rem 1.5rem; padding-block: 0.75rem;
}
.brand {
    display: inline-flex; align-items: center; gap: 0.6rem; min-height: 48px;
    color: var(--ink); text-decoration: none;
}
.brand img { border-radius: 10px; }
.wordmark { font-weight: 750; font-stretch: 87.5%; font-size: 1.35rem; letter-spacing: -0.01em; }
.site-nav ul { display: flex; flex-wrap: wrap; gap: 0.25rem; list-style: none; margin: 0; padding: 0; }
.site-nav a {
    display: inline-flex; align-items: center; min-height: 48px; padding: 0 0.85rem;
    color: var(--ink); font-weight: 650; text-decoration: none; border-radius: 14px;
}
.site-nav a:hover { background: var(--surface); }
.site-nav a[aria-current="page"] { background: var(--primary-container); color: var(--on-primary-container); }

/* Sky band (the only gradient) with the rooftop line */
.sky { position: relative; background: linear-gradient(var(--sky-top), var(--sky-horizon)); padding-bottom: 3.5rem; }
.roofs { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 3rem; display: block; }
.roofs path { fill: var(--roof); }

.hero { padding-top: 2.5rem; }
.hero-grid { display: grid; gap: 2rem; align-items: center; }
.hero-grid > * { min-width: 0; }
.sub { font-size: 1.2rem; color: var(--ink); }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.25rem; margin-top: 1.5rem; }
.cta-note { margin: 0; color: var(--muted); font-weight: 600; }
.play-badge { display: inline-block; line-height: 0; border-radius: 8px; }
.hero-shot { display: block; justify-self: center; width: min(20rem, 100%); }
@media (min-width: 56rem) {
    .hero-grid { grid-template-columns: 1fr 20rem; gap: 3rem; }
}

/* Framed marketing shots: 1 px band where the shot's sky meets the page ground */
.phone { display: block; border: 1px solid var(--outline); border-radius: 20px; background: var(--surface); }

.page-head { padding-top: 1.5rem; }
.page-head .lede { font-size: 1.15rem; }
.crumbs ol { display: flex; flex-wrap: wrap; align-items: center; list-style: none; margin: 0 0 1rem; padding: 0; color: var(--muted); }
.crumbs li + li::before { content: "›"; margin: 0 0.5rem; }
.crumbs a { color: var(--ink); display: inline-block; padding-block: 0.7rem; }
.toc { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: 0.25rem; }
@media (min-width: 48rem) { .toc { grid-template-columns: 1fr 1fr; column-gap: 1.5rem; } }
.toc a { display: inline-block; padding-block: 0.7rem; color: var(--ink); }

.section { padding-block: 2rem; }
.answer { font-size: 1.12rem; }
.lead { font-size: 1.25rem; margin-top: 1rem; }

.clues, .cards, .limits { padding: 0; margin: 1rem 0 0; list-style: none; }
.clues, .cards { display: grid; gap: 0.75rem; grid-template-columns: repeat(auto-fit, minmax(min(15rem, 100%), 1fr)); }
/* Paper panels: top sheet with the darker under-sheet peeking below (DESIGN.md → Paper chrome) */
.clues li, .cards li, .note, .qa {
    background: var(--paper); color: var(--ink); border-radius: 20px; padding: 1.1rem 1.25rem;
    box-shadow: 3px 4px 0 var(--paper-under), 0 7px 9px rgb(var(--shadow-ink) / 0.16), 0 1px 1.5px rgb(var(--shadow-ink) / 0.14);
}
.clues strong { display: block; font-size: 1.15rem; font-stretch: 87.5%; font-weight: 750; }
.cards p, .clues li { margin: 0; }
.after-list { margin-top: 1rem; }
h3 { margin-top: 1.25rem; }
.cards h3 { margin-top: 0; }
.limits li { padding: 0.75rem 0 0.75rem 1.5rem; border-top: 1px solid var(--divider); position: relative; max-width: 70ch; }
.limits li::before {
    content: ""; position: absolute; left: 0.2rem; top: 1.3rem; width: 0.55rem; height: 0.55rem;
    background: var(--primary); transform: rotate(45deg);
}

.shot { margin: 0; }
.shot figcaption { color: var(--muted); font-size: 0.95rem; margin-top: 0.5rem; }
.shot.inline { max-width: 18rem; margin-top: 1.25rem; }
.gallery { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: 1rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 48rem) { .gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 72rem) { .gallery { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.qlinks { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: 0.5rem; }
.qlinks a {
    display: flex; align-items: center; min-height: 48px; padding: 0.6rem 1rem;
    background: var(--surface); color: var(--ink); border-radius: 14px; font-weight: 600;
}

.qa-list { display: grid; gap: 1rem; padding-block: 2rem; }
.qa h2 { font-size: 1.4rem; }
.qa p:last-child { margin-bottom: 0; }

.note h2 { font-size: 1.4rem; }
.note p { margin: 0; }

/* Closing band */
.band {
    display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem;
    background: var(--primary-container); color: var(--on-primary-container);
    border-radius: 20px; padding: 1.5rem;
}
.band h2 { margin: 0; flex: 1 1 14rem; color: var(--on-primary-container); }
.kite-mark .face { fill: var(--primary); }
.kite-mark .spar { fill: none; stroke: var(--on-primary-container); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }

/* Footer */
.footer { margin-top: 2rem; padding-block: 2rem; background: var(--surface-high); color: var(--ink); }
.footer-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }
.footer-top p { margin: 0; }
.footer-links { list-style: none; padding: 0; margin: 1rem 0; display: flex; flex-wrap: wrap; gap: 0 1.25rem; }
.footer-links li { min-width: 0; max-width: 100%; }
.footer-links a { display: inline-block; padding-block: 0.8rem; color: var(--ink); overflow-wrap: anywhere; }
.fine { color: var(--muted); font-size: 0.92rem; }
.fine p { margin: 0 0 0.35rem; }
.fine a { color: var(--muted); }

@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
