/* Bits of Redwood studio site
   Design language: Prairie school. Long horizontal planes, low proportions, square
   corners, thin rules and art-glass line ornament (Prairie leaded windows: straight
   lines, small colored squares, nothing curved). Flat color, no drop shadows.
   The geometric three-tree logo sets the tone, and its trees recur in the glass band
   and the footer grove, all drawn with the same geometry (tools/geo_tree.py).
   Palette and type come from the brand kit (studio repo: branding/brand-kit/). */

@font-face {
    font-family: 'Jost';
    src: url('../fonts/Jost-Variable.woff2') format('woff2-variations'),
         url('../fonts/Jost-Variable.ttf') format('truetype-variations');
    font-weight: 100 900;
    font-display: swap;
}

:root {
    /* brand palette (branding/brand-kit/brand-tokens.css). Green and rust are fill
       colors: on parchment they land at 4.25:1 and 3.45:1, so they are NOT safe as
       text. Use the -text variants for anything read. */
    --ink: #250E0C;
    --parchment: #FAF4EF;
    --paper: #ECDED4;
    --green: #677C3C;
    --rust: #BD704C;
    --pine: #282D27;
    --peach: #C19076;
    --moss: #A2B65F;
    --sage: #4A4C48;
    --bark: #545849;
    /* text-safe shades of the same two hues: all clear 4.5:1 on parchment and paper */
    --green-text: #546630;  /* 5.80:1 on parchment, 4.81:1 on paper */
    --rust-text: #8E5338;   /* 5.59:1 on parchment, 4.64:1 on paper */
    --green-deep: #5C6F35;  /* footer + primary button: parchment on it is 5.09:1 */
    --ink-60: rgba(37, 14, 12, 0.66);
    --ink-25: rgba(37, 14, 12, 0.25);
    --ink-12: rgba(37, 14, 12, 0.12);
    --cream-25: rgba(250, 244, 239, 0.3);

    /* small uppercase labels (kickers, card numbers, dates). One size scale so they
       stay consistent. Jost caps are ~70% of the em, so these land around 9-10px cap
       height at the default root: the floor for tracked capitals. Don't go smaller. */
    --label: 0.875rem;
    --label-sm: 0.8125rem;
    --rule: 1px solid var(--ink-25);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

/* keyboard users get to the content without tabbing the whole nav */
.skip {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 10;
    background: var(--parchment);
    color: var(--ink);
    border: 2px solid var(--ink);
    padding: 12px 20px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.85rem;
}

.skip:focus { left: 12px; top: 12px; }

body {
    margin: 0;
    background: var(--parchment);
    color: var(--ink);
    font-family: 'Jost', 'Segoe UI', system-ui, sans-serif;
    font-weight: 400;
    font-size: 1.0625rem;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

/* short pages (a game page with no media yet, 404) keep the footer on the floor
   instead of floating it mid-screen with bare parchment underneath */
body {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

main { flex: 1 0 auto; }

a { color: inherit; }

/* One visible focus ring everywhere instead of the UA default. Ink on light
   surfaces, parchment on the green footer. */
:focus-visible {
    outline: 3px solid var(--ink);
    outline-offset: 3px;
}

.site-foot :focus-visible { outline-color: var(--parchment); }

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

.wrap {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 24px;
}

.wrap.narrow { max-width: 720px; }

.wrap.center { text-align: center; }

/* ---------- art-glass ornament ----------
   Prairie-school leaded windows: thin dark leads, mostly clear glass, small jewels of
   color. The tree in each window is the logo's own tree, drawn by tools/geo_tree.py;
   the band image is generated by tools/build_artglass.py with the palette hardcoded.
   .clerestory: a band of repeating windows, like the strip of high windows under a
   Prairie roofline. On the homepage it sits under the hero; on subpages it closes the
   page banner. A tinted section right after it drops its own top lead so the two
   don't double up. */

.clerestory,
.page-head::after {
    height: 48px;
    background: url('../img/glass-clerestory.svg') repeat-x center / auto 100%;
}

/* full bleed: .page-head is full width with 24px side padding, so -24px reaches the edges */
.page-head::after {
    content: "";
    display: block;
    margin: clamp(36px, 5vw, 52px) -24px 0;
}

.clerestory + .section.tint {
    border-top: 0;
    box-shadow: inset 0 -3px 0 var(--paper), inset 0 -4px 0 var(--green-deep);
}

/* ---------- kicker ---------- */

.kicker {
    font-size: var(--label);
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--green-text);
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 12px;
}

/* a short lead line ending in a square jewel: the art-glass motif in miniature */
.kicker::before {
    content: "";
    flex: none;
    width: 30px;
    height: 7px;
    background:
        linear-gradient(var(--rust), var(--rust)) right center / 7px 7px no-repeat,
        linear-gradient(var(--green-deep), var(--green-deep)) left center / 20px 1px no-repeat;
}

/* centered kickers get the jewel on both sides so they stay symmetric */
.section-head.center .kicker::after,
.page-head .kicker::after {
    content: "";
    flex: none;
    width: 30px;
    height: 7px;
    background:
        linear-gradient(var(--rust), var(--rust)) left center / 7px 7px no-repeat,
        linear-gradient(var(--green-deep), var(--green-deep)) right center / 20px 1px no-repeat;
}

/* ---------- header ----------
   A low, wide band with an "eave": a heavy green line and a thin rust line under it,
   the way a Prairie roofline overhangs the wall below. */

.site-head {
    background: var(--parchment);
    border-bottom: 4px solid var(--green-deep);
    box-shadow: 0 3px 0 var(--parchment), 0 4px 0 var(--rust);
    margin-bottom: 4px;
}

.site-head .wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px 28px;
    flex-wrap: wrap;
    padding-top: 14px;
    padding-bottom: 14px;
}

.brand {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.brand img {
    height: 52px;
    width: auto;
    display: block;
}

.site-head nav {
    display: flex;
    gap: 6px 28px;
    flex-wrap: wrap;
}

.site-head nav a {
    text-decoration: none;
    text-transform: uppercase;
    font-weight: 600;
    font-size: 0.8rem;
    letter-spacing: 0.18em;
    padding: 10px 0 7px;        /* ~40px tall tap target */
    border-bottom: 3px solid transparent;
}

.site-head nav a:hover { border-bottom-color: var(--green); }

.site-head nav a[aria-current="page"] { border-bottom-color: var(--rust); }

/* ---------- buttons ---------- */

.btn {
    display: inline-block;
    font-family: 'Jost', sans-serif;
    font-weight: 600;
    font-size: 0.92rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    text-decoration: none;
    text-align: center;
    color: var(--parchment);
    background: var(--green-deep);
    border: 2px solid var(--green-deep);
    border-radius: 0;
    padding: 13px 30px;
    transition: background-color 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.btn:hover,
.btn:focus-visible {
    background: var(--ink);
    border-color: var(--ink);
}

.btn.ghost {
    background: transparent;
    color: var(--ink);
    border-color: var(--ink);
}

.btn.ghost:hover,
.btn.ghost:focus-visible {
    background: var(--ink);
    color: var(--parchment);
}

.btn.pine {
    background: var(--pine);
    border-color: var(--pine);
}

.btn[aria-disabled="true"] {
    pointer-events: none;
    background: transparent;
    color: var(--ink-60);
    border: 2px dashed var(--ink-25);
}

.btn-row {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-row.store-row { margin: 42px 0 10px; }

/* ---------- hero (homepage) ----------
   Asymmetric balance: the stacked logo on the left, the words on the right, a single
   vertical lead between them. Stacks and centers on narrow screens. */

.hero {
    overflow: hidden;
    position: relative;
}

.hero-inner {
    max-width: 1080px;
    margin: 0 auto;
    padding: clamp(44px, 7vw, 84px) 24px clamp(40px, 6vw, 64px);
    display: grid;
    grid-template-columns: minmax(200px, 300px) 1fr;
    align-items: center;
    gap: 0 32px;
}

/* the logo image IS the homepage h1: its alt text carries the heading */
.hero h1 {
    margin: 0;
    padding-right: 32px;
    border-right: 1px solid var(--ink-25);
}

.hero .logo {
    display: block;
    width: 100%;
}

.hero-copy .tagline {
    font-size: clamp(1.6rem, 3.6vw, 2.35rem);
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: 0.01em;
    margin: 0 0 18px;
    text-wrap: balance;
}

.hero-copy .hero-sub {
    margin: 0 0 30px;
    color: var(--ink-60);
    max-width: 40ch;
}

.hero-copy .btn-row { justify-content: flex-start; }

.hero-note {
    font-size: 0.9rem;
    letter-spacing: 0.02em;
    color: var(--ink-60);
    margin: 22px 0 0;
}

/* ---------- sections ---------- */

.section { padding: clamp(56px, 9vw, 92px) 0; }

/* .tight follows a .page-head, .flush stacks straight onto the section above it */
.section.tight { padding-top: 48px; }

.section.flush { padding-top: 0; }

/* a tinted band: paper, framed top and bottom by the art-glass leads */
.section.tint {
    background: var(--paper);
    border-top: 1px solid var(--green-deep);
    border-bottom: 1px solid var(--green-deep);
    box-shadow: inset 0 3px 0 var(--paper), inset 0 4px 0 var(--green-deep),
                inset 0 -3px 0 var(--paper), inset 0 -4px 0 var(--green-deep);
}

.section-head { margin-bottom: 36px; }

.section-head h2 {
    font-weight: 600;
    font-size: clamp(1.45rem, 3.2vw, 1.9rem);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin: 0;
}

.section-head.center { text-align: center; }

/* a left-aligned head runs a long lead out to the right edge: the horizontal line of a
   Prairie roof, and the edge the grid below hangs from */
.section-head:not(.center)::after {
    content: "";
    display: block;
    height: 1px;
    margin-top: 16px;
    background: var(--green-deep);
}

.section-head.center .kicker { justify-content: center; }

/* intro line under a left-aligned section head, above its grid */
.pitch-wide {
    max-width: 62ch;
    margin: -14px 0 30px;
    color: var(--ink-60);
}

/* ---------- cards ----------
   One box treatment, three layouts. .card is the box; the grid class decides how many
   sit in a row. The top edge is a heavy green lead with a thin line inside it, like the
   head of a leaded window. Only a.card gets hover motion: seedling cards have no
   detail page, so they must not look clickable. */

.card {
    display: block;
    background: var(--parchment);
    border: var(--rule);
    border-top: 4px solid var(--green-deep);
    box-shadow: inset 0 3px 0 var(--parchment), inset 0 4px 0 var(--ink-12);
    border-radius: 0;
    padding: 28px 26px 26px;
}

a.card {
    text-decoration: none;
    transition: border-color 0.12s ease, transform 0.12s ease;
}

a.card:hover {
    border-top-color: var(--rust);
    transform: translateY(-3px);
}

.card .no {
    font-size: var(--label-sm);
    font-weight: 600;
    letter-spacing: 0.22em;
    color: var(--rust-text);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    margin-bottom: 12px;
}

/* platform tag (iPhone / Mac / Steam) beside the stage label */
.card .no .plat {
    display: inline-block;
    padding: 1px 8px;
    border: 1px solid currentColor;
    color: var(--green-text);
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.card h3 {
    margin: 0 0 8px;
    font-weight: 600;
    font-size: 1.3rem;
    letter-spacing: 0.01em;
}

.card,
.hero-copy { min-width: 0; }

/* secondary cards (the homepage's "around the studio" row) get a thin lead, so the
   heavy one marks what the studio is actually building */
.trail-grid .card {
    border-top: 1px solid var(--green-deep);
    box-shadow: none;
}

.trail-grid a.card:hover { border-top-color: var(--rust); }

.card p {
    margin: 0;
    font-size: 0.97rem;
    color: var(--ink-60);
}

.card .go {
    display: inline-block;
    margin-top: 18px;
    font-weight: 600;
    font-size: 0.78rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--green-text);
    transition: transform 0.12s ease;
}

a.card:hover .go {
    color: var(--rust-text);
    transform: translateX(4px);
}

/* card grids */

.trail-grid,
.game-grid,
.seedling-grid {
    display: grid;
    gap: 24px;
}

.trail-grid { grid-template-columns: repeat(3, 1fr); }

/* two in progress, side by side, stacking on narrow screens */
.game-grid { grid-template-columns: repeat(2, 1fr); }

/* one game in the workshop: a full-width feature card, not half of an empty row. On
   wide screens it splits like the hero: name on the left, a vertical lead, then the
   description, so the row reads as one long horizontal plane. */
.game-grid > :only-child { grid-column: 1 / -1; }

@media (min-width: 861px) {
    .game-grid > .card:only-child {
        display: grid;
        grid-template-columns: minmax(200px, 300px) 1fr;
        grid-template-areas: "no desc" "name desc" "name go";
        grid-template-rows: auto auto 1fr;
        column-gap: 32px;
        padding: 32px;
    }
    .game-grid > .card:only-child .no { grid-area: no; }
    .game-grid > .card:only-child h3 { grid-area: name; font-size: 1.7rem; }
    .game-grid > .card:only-child p {
        grid-area: desc;
        padding-left: 32px;
        border-left: var(--rule);
        font-size: 1.05rem;
    }
    .game-grid > .card:only-child .go { grid-area: go; margin-left: 33px; }
}

/* auto-fit so this keeps working at 3, 5 or 9 seedlings without a new breakpoint */
.seedling-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 215px), 1fr)); }

.seedling-card .no { color: var(--green-text); }

.game-grid + .grid-note,
.seedling-grid + .grid-note { margin: 30px 0 0; }

.grid-note a {
    font-weight: 600;
    font-size: 0.82rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--green-text);
}

/* the "vote on what's next" block under the seedlings */
.vote-box {
    margin-top: 34px;
    padding: 26px 24px;
    border: 1px dashed var(--ink-25);
    text-align: center;
}

.vote-box p {
    margin: 0 0 20px;
    color: var(--ink-60);
    max-width: 52ch;
    margin-inline: auto;
}

/* ---------- page banner (subpages) ---------- */

.page-head {
    text-align: center;
    padding: clamp(44px, 7vw, 72px) 24px 0;
}

.page-head h1 {
    font-weight: 600;
    font-size: clamp(2rem, 5vw, 2.8rem);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin: 0 0 10px;
}

.page-head .lede {
    max-width: 54ch;
    margin: 0 auto;
    color: var(--ink-60);
    font-size: 1.08rem;
}

.page-head .kicker { justify-content: center; }

/* ---------- media frames (trailer / screenshots) ---------- */

.poster-frame {
    border: var(--rule);
    border-top: 4px solid var(--green-deep);
    background: var(--paper);
    margin: 0 0 30px;
    overflow: hidden;
}

.poster-frame .placeholder {
    aspect-ratio: 16 / 9;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--ink-60);
    text-align: center;
    padding: 24px;
}

.poster-frame .placeholder .px {
    font-size: var(--label);
    font-weight: 600;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--green-text);
}

.shot-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
    margin-bottom: 30px;
}

.shot-grid .poster-frame { margin: 0; }

.shot-grid .placeholder { aspect-ratio: 16 / 10; }

/* ---------- fact lists (press) ---------- */

.fact-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 24px;
    margin: 0 0 22px;
    padding: 0;
    list-style: none;
}

.fact-list li {
    position: relative;
    padding-left: 22px;
    font-size: 0.98rem;
}

/* square glass jewels as bullets, alternating green and rust */
.fact-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.5em;
    width: 8px;
    height: 8px;
    background: var(--green);
}

.fact-list li:nth-child(even)::before { background: var(--rust); }

.fact-list b { font-weight: 600; }

/* ---------- prose / about ---------- */

.prose p { margin: 0 0 1.2em; }

/* section headings inside long-form text (support, privacy) */
.prose h2 {
    font-weight: 600;
    font-size: 1.3rem;
    letter-spacing: 0.01em;
    margin: 1.8em 0 0.5em;
}

.prose h2:first-child { margin-top: 0; }

.prose .back-link { margin-top: 2.5em; }

.prose .placeholder-line,
.placeholder-line {
    border: 1px dashed var(--ink-25);
    padding: 22px;
    color: var(--ink-60);
    font-size: 0.95rem;
}

/* facts set between two leads, like a Prairie frieze */
.fact-strip {
    display: flex;
    justify-content: center;
    gap: 14px 40px;
    flex-wrap: wrap;
    margin: 30px 0 0;
    padding: 16px 12px;
    border-top: 1px solid var(--green-deep);
    border-bottom: 1px solid var(--green-deep);
}

/* under a left-aligned head the head's own lead is the strip's top line */
.section-head:not(.center) + .fact-strip {
    margin-top: -36px;
    border-top: 0;
}

.fact-strip span {
    font-size: var(--label);
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--ink-60);
}

/* ---------- contact ---------- */

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.contact-card {
    border: var(--rule);
    border-left: 4px solid var(--green-deep);
    background: var(--parchment);
    padding: 24px 24px 24px 26px;
}

.contact-card h3 {
    margin: 0 0 6px;
    font-weight: 600;
    font-size: 1.05rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.contact-card p { margin: 0; color: var(--ink-60); font-size: 0.98rem; }

.contact-card a { color: var(--ink); font-weight: 600; overflow-wrap: anywhere; }

.contact-card .kicker { margin-bottom: 10px; }

/* ---------- links page / press downloads ---------- */

.link-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.link-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    text-decoration: none;
    background: var(--parchment);
    border: var(--rule);
    border-left: 4px solid var(--green-deep);
    color: var(--ink);
    padding: 15px 20px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-size: 0.92rem;
    transition: border-color 0.12s ease, background-color 0.12s ease;
}

.link-list a::after {
    content: "→";
    font-weight: 400;
    color: var(--rust-text);
}

.link-list a:hover {
    border-left-color: var(--rust);
    background: var(--paper);
}

.link-list a[aria-disabled="true"] {
    pointer-events: none;
    border-style: dashed;
    border-left: 1px dashed var(--ink-25);
    color: var(--ink-60);
}

.link-list a[aria-disabled="true"]::after { content: "···"; color: var(--ink-60); }

.link-list .tag {
    font-size: var(--label-sm);
    letter-spacing: 0.16em;
    color: var(--green-text);
    margin-left: auto;
}

/* ---------- press logo previews ---------- */

.logo-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.logo-tile {
    margin: 0;
    border: var(--rule);
}

.logo-tile .swatch {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 190px;
    padding: 24px;
    background: var(--parchment);
}

.logo-tile.dark .swatch { background: var(--pine); }

.logo-tile .swatch img {
    max-height: 100%;
    width: auto;
}

/* avatars carry their own square background, so both sit on the neutral paper swatch
   where the light and the dark square each show their edge */
.logo-tile.avatar .swatch { background: var(--paper); }

.logo-tile.avatar .swatch img {
    height: 100%;
    box-shadow: 0 0 0 1px var(--ink-25);
}

.logo-tile figcaption {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 14px;
    padding: 12px 16px;
    border-top: var(--rule);
    font-size: 0.92rem;
}

.logo-tile figcaption b {
    font-weight: 600;
    margin-right: auto;
}

.logo-tile figcaption .for {
    display: block;
    font-weight: 400;
    font-size: 0.85rem;
    color: var(--ink-60);
}

.logo-tile figcaption a {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 8px;
    font-size: var(--label-sm);
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--green-text);
}

/* the full-kit download sits above the previews, so it's the first thing a writer sees */
.kit-link { margin-bottom: 24px; }

/* ---------- news ---------- */

.news-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.news-list li { border-bottom: var(--rule); }

.news-list li:first-child { border-top: var(--rule); }

.news-list a {
    display: block;
    text-decoration: none;
    padding: 26px 8px;
}

.news-list a:hover { background: var(--paper); }

.news-list time {
    font-size: var(--label);
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--rust-text);
    display: block;
    margin-bottom: 8px;
}

.news-list h3 {
    margin: 0 0 6px;
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.news-list p { margin: 0; color: var(--ink-60); font-size: 0.98rem; }

/* .news-empty is written by tools/build_feed.py, so its name is fixed. .empty-state is
   the same thing for any other section that has nothing in it yet (e.g. Released). */
.news-empty,
.empty-state {
    border: 1px dashed var(--ink-25);
    padding: 28px 24px;
    text-align: center;
    color: var(--ink-60);
}

.empty-state .px,
.news-empty .px {
    font-size: var(--label);
    font-weight: 600;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--green-text);
    display: block;
    margin-bottom: 10px;
}

.post-meta {
    font-size: var(--label);
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--rust-text);
}

/* ---------- footer ---------- */

/* Green footer: the forest floor under the grove. --green-deep rather than
   --green so parchment on it reaches 5.09:1, not 4.25:1. */
.site-foot {
    position: relative;
    --treeline-h: clamp(180px, 20vw, 264px);
    margin-top: var(--treeline-h);  /* room for the treeline above */
    background: var(--green-deep);
    color: var(--parchment);
    text-align: center;
    padding: 40px 24px 36px;
}

/* The geometric redwood grove tiling across the top of the footer, so the footer
   reads as the forest floor. One tile generated by tools/build_treeline.py with the
   palette hardcoded (re-run it if --parchment, --green, --moss, --rust or --peach
   change). The tile's bottom edge is the ground line and sits exactly on the
   footer's top edge, so trunks meet the green without overlapping it. */
.site-foot::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 100%;
    height: var(--treeline-h);
    background: url('../img/treeline.svg') repeat-x left bottom / auto 100%;
    pointer-events: none;
}

.site-foot .foot-mark {
    margin: 0 auto 10px;
    width: 168px;
}

.site-foot .foot-mark img { display: block; width: 100%; }

.site-foot .foot-tag {
    font-size: var(--label-sm);
    font-weight: 600;
    letter-spacing: 0.26em;
    text-transform: uppercase;
    margin: 0 0 26px;
}

.foot-links {
    display: flex;
    gap: 4px 28px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.foot-links.social {
    margin: 0 auto 26px;
    padding-top: 10px;
    max-width: 560px;
    border-top: 1px solid var(--cream-25);
}

.foot-links a {
    display: inline-block;
    padding: 8px 2px 6px;       /* ~40px tap target */
    text-decoration: none;
    font-weight: 600;
    font-size: 0.82rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    border-bottom: 2px solid transparent;
}

/* parchment, not rust: rust on the green footer is 1.48:1 and would be invisible */
.foot-links a:hover { border-bottom-color: var(--parchment); }

.site-foot .fine {
    font-size: 0.82rem;
    margin: 0;
}

/* ---------- utilities ---------- */

/* top gap for a list, grid or button row that follows body copy.
   Declared last so it beats the component's own margin shorthand. */
.spaced,
.prose .spaced { margin-top: 30px; }   /* .prose p would otherwise win on specificity */

/* ---------- responsive ---------- */

@media (max-width: 860px) {
    .trail-grid { grid-template-columns: 1fr; }
    .contact-grid { grid-template-columns: 1fr; }
    /* the two in-progress games stack top-to-bottom rather than squeezing side by side */
    .game-grid { grid-template-columns: 1fr; }

    .hero-inner {
        grid-template-columns: 1fr;
        text-align: center;
        justify-items: center;
    }

    .hero h1 {
        width: min(170px, 46vw);
        padding: 0 0 20px;
        margin-bottom: 20px;
        border-right: 0;
        border-bottom: 1px solid var(--ink-25);
    }

    .hero-copy .hero-sub { margin-inline: auto; }
    .hero-copy .btn-row { justify-content: center; }
}

@media (max-width: 640px) {
    .site-head .wrap { justify-content: center; text-align: center; }
    .site-head nav { justify-content: center; gap: 6px 20px; }
    .brand img { height: 38px; }
    .shot-grid { grid-template-columns: 1fr; }
    .fact-list { grid-template-columns: 1fr; }
    .logo-grid { grid-template-columns: 1fr; }
    .btn { width: 100%; max-width: 340px; }
    .btn-row { flex-direction: column; align-items: center; }

    /* download rows: the size tag drops under the title, the arrow stays on the right */
    .link-list a {
        display: grid;
        grid-template-columns: 1fr auto;
    }
    .link-list .tag { grid-column: 1; grid-row: 2; margin-left: 0; }
}

/* ---------- reduced motion ---------- */

@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;
    }

    a.card:hover,
    a.card:hover .go {
        transform: none;
    }
}
