/* Everfar site. Tokens from the app repo's DESIGN.md ("The Serigraph Edition" and the hub's
   "Strip Edition"): paper #F4EEE2 sheet, key ink #1F1D2B, ink-soft #5E5868, rule #D9CFBC.
   Dark theme follows The Dark Chrome Exception: only the chrome goes dark (chrome-dark #1C1F2B,
   raised #262A39, text #F1EADB, soft #B4AE9F, rule #3A3F52); place cards and screenshots stay
   light paper prints in both themes, with ink text set on each card.
   Place cards use each game's ground family sky step (Inkway dune-ochre, Oddfauna rose-salt,
   Geode limestone, Deepfield slate-dusk); ink on every sky step is 11.9:1 or more, ink-soft is
   AA on each (slate-dusk 4.92:1, the floor). Near-ground bands use the family's dark step
   under a 2.4 px ink ground line (graphics only, never text).
   No gradients, rectangles only (the ink tab keeps 3 px corners), no accent in the chrome.
   Shantell Sans 700/800 for lettering (never a sentence over eight words), Atkinson
   Hyperlegible Next 400/700 for body. */

@font-face {
    font-family: "Shantell Sans";
    src: url("/everfar/fonts/shantellsans-800.woff2") format("woff2");
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Shantell Sans";
    src: url("/everfar/fonts/shantellsans-700.woff2") format("woff2");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Atkinson Hyperlegible Next";
    src: url("/everfar/fonts/atkinsonnext-400.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Atkinson Hyperlegible Next";
    src: url("/everfar/fonts/atkinsonnext-700.woff2") format("woff2");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

:root {
    color-scheme: light dark;
    /* Chrome, light: the cotton sheet */
    --bg: #F4EEE2;
    --raised: #FBF8F1;
    --text: #1F1D2B;
    --soft: #5E5868;
    --rule: #D9CFBC;
    --edge: #1F1D2B;
    --tab: #1F1D2B;
    --on-tab: #F4EEE2;
    /* Fixed in both themes: the print */
    --paper: #F4EEE2;
    --ink: #1F1D2B;
    --ink-soft: #5E5868;
    --dune-sky: #F2E0BF;
    --dune-dark: #C98A4B;
    --rose-sky: #F2DCD7;
    --rose-dark: #B97A86;
    --lime-sky: #EEE6D5;
    --lime-dark: #A8977A;
    --slate-sky: #D9DBDD;
    --slate-dark: #5D6E8E;
    --display: "Shantell Sans", "Comic Sans MS", system-ui, sans-serif;
    --body: "Atkinson Hyperlegible Next", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
    :root {
        /* Chrome, dark: the night table */
        --bg: #1C1F2B;
        --raised: #262A39;
        --text: #F1EADB;
        --soft: #B4AE9F;
        --rule: #3A3F52;
        --edge: #F1EADB;
        --tab: #F1EADB;
        --on-tab: #1C1F2B;
    }
}

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

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

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 400 1.0625rem/1.55 var(--body);
    overflow-wrap: anywhere;
}

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

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

h1, h2, h3 {
    font-family: var(--display);
    line-height: 1.12;
    margin: 0 0 0.5em;
    hyphens: none;
    overflow-wrap: break-word;
}
h1 { font-weight: 800; font-size: clamp(1.6rem, 9vw, 3.5rem); letter-spacing: -0.005em; }
h2 { font-weight: 800; font-size: clamp(1.5rem, 4.2vw, 2.15rem); }
h3 { font-weight: 700; font-size: 1.25rem; }
p { margin: 0 0 1em; }
strong { font-weight: 700; }

.num { font-weight: 700; font-variant-numeric: tabular-nums; }

.wrap { max-width: 70rem; margin: 0 auto; padding: 0 1rem; }

.skip-link {
    position: absolute; left: 1rem; top: -4rem; z-index: 10;
    background: var(--tab); color: var(--on-tab);
    padding: 0.75rem 1rem; border-radius: 3px; font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: 1rem; }

/* Header: the top gutter */
.topbar { border-bottom: 1px solid var(--rule); background: var(--bg); }
.topbar .wrap {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
    gap: 0.25rem 1.5rem; padding-block: 0.5rem;
}
.brand {
    display: flex; align-items: center; gap: 0.6rem; min-height: 48px;
    color: var(--text); text-decoration: none;
}
.brand img { border: 1px solid var(--edge); }
.wordmark { font-family: var(--display); font-weight: 800; font-size: 1.6rem; line-height: 1; letter-spacing: 0.02em; text-transform: uppercase; }
.site-nav ul { display: flex; flex-wrap: wrap; gap: 0 0.25rem; list-style: none; margin: 0; padding: 0; }
.site-nav a {
    display: inline-flex; align-items: center; min-height: 48px; padding: 0 0.7rem;
    color: var(--text); font-weight: 700; text-decoration: none;
}
.site-nav a:hover { text-decoration: underline; }
.site-nav a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 0.35em; }

/* Sections */
main { display: block; }
.section { padding: 2.75rem 0; }
.section + .section { border-top: 1px solid var(--rule); }
.lede { font-size: 1.15rem; color: var(--soft); max-width: 40rem; }
.answer { font-size: 1.125rem; max-width: 42rem; }
.detail, .prose { max-width: 42rem; }
.detail li, .prose li { margin-bottom: 0.45rem; }
.label {
    display: inline-block; margin: 0 0 1rem; font-family: var(--display); font-weight: 700;
    font-size: 0.95rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--soft);
}

/* Hero: a paper sheet over a strip of dune ground with the walkable ink line */
.hero { padding: 2rem 0 0; }
.hero-grid { display: grid; gap: 2rem; align-items: end; }
@media (min-width: 56rem) { .hero-grid { grid-template-columns: minmax(0, 1fr) 20rem; } }
.hero-grid > * { min-width: 0; }
.hero-grid > div { padding-bottom: 2rem; }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.25rem; margin-top: 1.5rem; }
.cta-note { margin: 0; color: var(--soft); font-weight: 700; }
.play-badge { display: inline-block; min-height: 48px; }
.play-badge img { width: 188px; height: 56px; }
.ground {
    height: 1.75rem; background: var(--dune-dark);
    border-top: 3px solid var(--ink); border-bottom: 1px solid var(--rule);
}

/* Screenshots: framed store slides, 1 px ink edge, paper in both themes */
.phone { border: 1px solid var(--ink); background: var(--paper); }
.hero-shot { display: block; max-width: 20rem; margin: 0 auto; }

/* Place cards: one ground family each, light print in both themes */
.places { display: grid; gap: 1rem; list-style: none; margin: 1.5rem 0 0; padding: 0; }
@media (min-width: 40rem) { .places { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 64rem) { .places { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.place {
    color: var(--ink); background: var(--paper); border: 1px solid var(--ink);
    display: flex; flex-direction: column;
}
.place .sky { padding: 1.1rem 1.1rem 0.9rem; flex: 1; }
.place .sky p:last-child { margin: 0; }
.place .where { display: block; color: var(--ink-soft); font-weight: 700; font-size: 0.95rem; margin-bottom: 0.25rem; }
.place .land { height: 1rem; border-top: 3px solid var(--ink); }
.place a { color: var(--ink); }
.place :focus-visible { outline-color: var(--ink); }
.dunes .sky { background: var(--dune-sky); } .dunes .land { background: var(--dune-dark); }
.salt .sky { background: var(--rose-sky); } .salt .land { background: var(--rose-dark); }
.quarry .sky { background: var(--lime-sky); } .quarry .land { background: var(--lime-dark); }
.quarter .sky { background: var(--slate-sky); } .quarter .land { background: var(--slate-dark); }

/* Plain paper sheet (Today, privacy) */
.sheet {
    color: var(--ink); background: var(--paper); border: 1px solid var(--ink);
    padding: 1.25rem; max-width: 48rem;
}
.sheet a { color: var(--ink); }
.sheet :focus-visible { outline-color: var(--ink); }
.sheet p:last-child { margin-bottom: 0; }

/* Rules on how-it-works: one block per place */
.rules { display: grid; gap: 1.25rem; }
.rule-block { border-left: 6px solid var(--rule); padding: 0.25rem 0 0.25rem 1rem; max-width: 46rem; }
.rule-block.dunes { border-left-color: var(--dune-dark); }
.rule-block.salt { border-left-color: var(--rose-dark); }
.rule-block.quarry { border-left-color: var(--lime-dark); }
.rule-block.quarter { border-left-color: var(--slate-dark); }
.rule-block p:last-child, .rule-block ul:last-child { margin-bottom: 0; }

/* Gallery */
.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; list-style: none; margin: 0; padding: 0; }
@media (min-width: 48rem) { .gallery { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.gallery > li { min-width: 0; }
.shot { margin: 0; }
.shot figcaption { font-size: 0.95rem; color: var(--soft); margin-top: 0.5rem; }

/* Question links */
.qlinks { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; max-width: 46rem; }
.qlinks a {
    display: flex; align-items: center; min-height: 48px; padding: 0.5rem 1rem;
    background: var(--raised); color: var(--text); border: 1px solid var(--rule);
    font-weight: 700; text-decoration: none;
}
.qlinks a:hover { text-decoration: underline; }
.toc { margin-bottom: 1.5rem; }

/* Breadcrumb */
.crumbs ol { display: flex; flex-wrap: wrap; list-style: none; margin: 0 0 1rem; padding: 0; color: var(--soft); font-size: 0.95rem; }
.crumbs li + li::before { content: "›"; padding: 0 0.5rem; }
.crumbs a { display: inline-block; padding: 0.75rem 0; color: var(--soft); }

.faq section { padding: 1.5rem 0; border-top: 1px solid var(--rule); }
.faq h2 { font-size: clamp(1.35rem, 3.8vw, 1.8rem); }

/* Closing band: the ink tab */
.band {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem;
    background: var(--tab); color: var(--on-tab); padding: 1.5rem; border-radius: 3px;
}
.band h2 { margin: 0; }
.band :focus-visible { outline-color: var(--on-tab); }

/* Footer */
.footer { border-top: 1px solid var(--rule); padding: 2rem 0; margin-top: 1rem; font-size: 0.95rem; }
.footer-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }
.footer-links { display: flex; flex-wrap: wrap; list-style: none; margin: 1rem 0; padding: 0; gap: 0 1rem; }
.footer-links a { display: inline-flex; align-items: center; min-height: 48px; }
.fine { color: var(--soft); }
.fine a { color: var(--soft); }
.fine p { margin: 0 0 0.5rem; }
