/* ============================================================
   Tokens: InvertedChaos-Design-System (Figma), Theme / Dark by default.
   Light is the same collection's Light mode for an explicit light choice.
   Sizes: Desktop / Mobile modes as clamp(). Text styles 01-* Inter, 03-* Plex Mono,
   01-Numeral 200 / 90% / -3% and 01-Numeral-S 120 for the year counter.
   ============================================================ */
:root {
  --background: #16171e; --background-2: #0d0d14; --text: #aaabb5; --text-heading: #dbdce6;
  --border: #7c7d87; --border-subtle: #292a33; --icon: #dbdce6;
  --link: #8697ff; --link-hover: #afc3ff;
  --btn-bg: #5f6cde; --btn-bg-hover: #7281f1; --btn-border: #180b6b; --btn-text: #05060b;
  --btn2-border: #7c7d87; --btn2-text: #dbdce6;
  --focus: #c1ff1f; --ground-deep: #05060b;
  /* text inputs: a LIGHTER tint than the page they sit on (owner-directed 2026-09-23; was one step darker).
     Dark: one neutral-ramp step up from the page. Light: the ramp has no step above neutral-100, so the
     field takes #eeeff5, the lighter tint of the same hue the deck slides already sit on. */
  --field: #292a33; --field-line: #51525b;
  --margin: clamp(24px, 8vw, 160px);  /* 2026-09-17: gargantuan page margin (owner-directed); the walls sit outside .wrap and stay full-bleed */
  --sp-1: 8px; --sp-2: 12px; --sp-3: 16px; --sp-4: 24px; --sp-5: 32px; --sp-6: 40px; --sp-7: 48px; --sp-8: 64px;
  --section-small: clamp(48px, 5.6vw, 80px);
  --section-main: clamp(64px, 7.8vw, 112px);
  --section-large: clamp(88px, 11vw, 160px);
  --page-top: clamp(80px, 9vw, 128px);
  --radius-small: 3px; --radius-main: 6px; --border-w: 1px;
  --f-01: "Inter", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --f-03: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --f-icon: "Material Symbols Rounded";
  --display: clamp(64px, 7.8vw, 112px); --h1: clamp(48px, 5.6vw, 80px); --h2: clamp(40px, 4.4vw, 64px);
  --h3: clamp(36px, 3.3vw, 48px); --h4: clamp(28px, 2.2vw, 32px); --h5: clamp(22px, 1.7vw, 24px);
  --numeral: clamp(88px, 9vw, 120px);
  --text-l: clamp(18px, 1.4vw, 20px); --text-body: clamp(16px, 1.25vw, 18px); --text-s: clamp(14px, 1.1vw, 16px);
  --text-xs: clamp(10px, .85vw, 12px); --text-xxs: clamp(8px, .7vw, 10px);
}
:root[data-theme="light"] {
  --background: #dbdce6; --background-2: #aaabb5; --text: #292a33; --text-heading: #16171e;
  --border: #51525b; --border-subtle: #aaabb5; --icon: #16171e; --link: #383da3; --link-hover: #180b6b;
  --btn2-border: #51525b; --btn2-text: #16171e; --focus: #272686;
  --field: #eeeff5;  /* lighter than this theme's page (neutral-100), same hue */
}
@media (max-width: 560px) { :root { --border-w: 1.5px; } }
/* AA on the second ground (2026-09-29): in light theme the link on --background-2 steps darker (primary-800, 5.39:1; the page link #383da3 is 3.89:1 here).
   Every container painted with --background-2 is listed; _iccontrast.mjs fails if one is missed. */
:root[data-theme="light"] :is(.band, .strip, .player, .cta, .agenda, .stair li, .ipodfig, .deckstory .mini, .formula, .slide .sl, .thumb.words, .thumb.scales, .arch, .brief .photo) { --link: #272686; }
/* Inverted Chaos (2026-09-29): the wordmark takes the theme’s logo-text colour; lime marks the current page in dark */
:root { --logo-text: #dbdce6; --accent: #c1ff1f; }
:root[data-theme="light"] { --logo-text: #292a33; --accent: var(--link); }
.brand, .sitefooter .identity { color: var(--logo-text); }
:root .primarynav a[aria-current="page"], :root .primarynav a[aria-current="page"] .icon.ic, :root .navmenu a.item[aria-current="page"] { color: var(--accent); }   /* :root so it outranks the base rule that follows */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--background); color: var(--text); font-family: var(--f-01); font-size: var(--text-body); line-height: 1.5; overflow-x: hidden; }
img { max-width: 100%; display: block; }
/* 2026-09-19: no widows or orphans anywhere (owner-directed). pretty rebalances the last lines of every text block; balance evens headings. */
p, li, figcaption, dd, span.t, .lead, .note, .pick, label { text-wrap: pretty; }
h1, h2, h3, .display, .h2, .h4, .h5, legend { text-wrap: balance; }
a { color: inherit; }
a:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
::selection { background: var(--btn-bg); color: var(--btn-text); }
.icon { font-family: var(--f-icon); font-weight: normal; line-height: 1; display: inline-block; vertical-align: middle; }
.wrap { max-width: none; margin-inline: 0; padding-inline: var(--margin); }  /* 2026-09-17: full-bleed (owner-directed, gabrielvaldivia.com); the page runs edge to edge, only the type measures are capped */

.display { font-weight: 500; font-size: var(--display); line-height: .92; color: var(--text-heading); margin: 0; text-wrap: balance; }
.h2 { font-weight: 500; font-size: var(--h2); line-height: 1.04; color: var(--text-heading); margin: 0; text-wrap: balance; }
.h4 { font-weight: 500; font-size: var(--h4); line-height: 1.16; color: var(--text-heading); margin: 0; }
.h5 { font-weight: 500; font-size: var(--h5); line-height: 1.24; color: var(--text-heading); margin: 0; }
.text-l { font-size: var(--text-l); }
.text-s { font-size: var(--text-s); line-height: 1.6; letter-spacing: .03em; }
.eyebrow { font-family: var(--f-03); font-size: 16px; line-height: 1.05; letter-spacing: .15em; text-transform: uppercase; color: var(--link); margin: 0; }
.mono-xs { font-family: var(--f-03); font-size: var(--text-xs); line-height: 1.5; letter-spacing: .10em; text-transform: uppercase; }
.mono-xxs { font-family: var(--f-03); font-size: var(--text-xxs); line-height: 1.5; letter-spacing: .12em; text-transform: uppercase; }
.link { font-family: var(--f-03); font-size: 16px; letter-spacing: .15em; text-transform: uppercase; color: var(--link); text-decoration: none; display: inline-flex; align-items: center; gap: var(--sp-2); padding-block: 10px; }
.link:hover { color: var(--link-hover); }
.link .icon { font-size: 16px; }
.btn { font-family: var(--f-03); font-weight: 500; font-size: 16px; letter-spacing: .15em; text-transform: uppercase; text-decoration: none; display: inline-flex; align-items: center; gap: var(--sp-2); padding: 12px 24px; border-radius: var(--radius-small); transition: background .18s ease, color .18s ease, border-color .18s ease; }
.btn .icon { font-size: 16px; }
.btn-primary { background: var(--btn-bg); color: var(--btn-text); border: var(--border-w) solid transparent; }  /* 2026-09-21: no stroke on primary (owner-directed); the transparent border keeps the size */
.btn-primary:hover { background: var(--btn-bg-hover); }
.btn-secondary { background: transparent; color: var(--btn2-text); border: var(--border-w) solid var(--btn2-border); }
.btn-secondary:hover { background: var(--btn-bg); color: var(--btn-text); border-color: transparent; }
.tag { font-family: var(--f-03); font-size: var(--text-xxs); letter-spacing: .12em; text-transform: uppercase; color: var(--text-heading); border: var(--border-w) solid var(--border-subtle); border-radius: var(--radius-small); padding: 6px 10px; display: inline-block; }

/* ---- SiteNav ---- */
.sitenav { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--background) 90%, transparent); backdrop-filter: blur(10px); border-bottom: var(--border-w) solid var(--border-subtle); }
.sitenav .wrap { height: 80px; display: flex; align-items: center; justify-content: space-between; }
.brand svg { width: 100px; height: 40px; display: block; }
.primarynav { display: flex; gap: var(--sp-7); align-items: center; }
.primarynav a { text-decoration: none; color: var(--text-heading); }
/* the page you are on (owner-directed 2026-09-22). The builder has always emitted aria-current="page";
   what was missing was a look for it. The icon fills too, which is the same signal hover already uses. */
.primarynav a[aria-current="page"] { color: var(--link); }
.primarynav a[aria-current="page"] .icon.ic { color: var(--link); font-variation-settings: 'FILL' 1, 'wght' 500, 'GRAD' 0, 'opsz' 24; }
.primarynav a:hover { color: var(--link); }
.primarynav .more { display: inline-flex; align-items: center; gap: var(--sp-2); }
.primarynav .more .icon { font-size: 16px; }
.search { display: inline-flex; gap: var(--sp-2); align-items: center; padding: 8px 16px; border: var(--border-w) solid var(--border); border-radius: var(--radius-small); color: var(--text-heading); }

/* ---- Hero: type, then the wall of 42 strips in motion ---- */
.hero { padding-block: clamp(120px, 16vw, 240px) var(--sp-6); }
.hero .eyebrow { margin-bottom: var(--sp-6); }
.hero .display { max-width: 22ch; font-size: var(--h1); line-height: .96; }
.hero .row { display: grid; grid-template-columns: 1fr auto; gap: var(--sp-6); align-items: end; margin-top: var(--sp-6); }
.hero .intro { margin: 0; max-width: 56ch; }
.hero .actions { display: flex; gap: var(--sp-3); flex-wrap: wrap; }
.wall { position: relative; padding-block: var(--sp-4) var(--section-small); border-bottom: var(--border-w) solid var(--border-subtle); overflow: hidden; }
.wall::before, .wall::after { content: ""; position: absolute; top: 0; bottom: 0; width: clamp(40px, 12vw, 200px); z-index: 2; pointer-events: none; }
.wall::before { left: 0; background: linear-gradient(90deg, var(--background), transparent); }
.wall::after { right: 0; background: linear-gradient(270deg, var(--background), transparent); }
.lane { display: flex; gap: 0; width: max-content; margin-top: var(--sp-3); will-change: transform; }
.lane:first-child { margin-top: 0; }
.lane img { width: var(--strip-w, clamp(240px, 28vw, 440px)); margin-right: var(--sp-3); flex: none; aspect-ratio: 864 / 160; border-radius: var(--radius-main); border: var(--border-w) solid var(--border-subtle); background: var(--background-2); }
.lane { transform: translate3d(0, 0, 0); backface-visibility: hidden; }
@keyframes drift-l { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes drift-r { from { transform: translateX(-50%); } to { transform: translateX(0); } }
.wall .count { position: absolute; right: var(--margin); bottom: var(--sp-3); z-index: 3; color: var(--text); }

/* ---- Brief: a short first-person bio before the timeline ---- */
.brief { padding-block: var(--section-main) 0; }
.brief .g { display: grid; grid-template-columns: 260px minmax(0, 62ch); column-gap: var(--sp-8); row-gap: var(--sp-4); justify-content: center; }
.brief .side { display: grid; gap: var(--sp-4); align-content: start; }
.brief .photo { width: 100%; max-width: 260px; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius-main); border: var(--border-w) solid var(--border-subtle); background: var(--background-2); }
.brief .txt { display: grid; gap: var(--sp-4); align-content: start; }
.brief .txt p { margin: 0; max-width: 62ch; }
.brief .txt p:first-child { font-size: var(--text-l); color: var(--text-heading); }
@media (max-width: 860px) { .brief .g { grid-template-columns: 1fr; } .brief .photo { max-width: 160px; } }
/* ---- Branded player (shared with the MARA page) ---- */
.player { position: relative; display: block; border-radius: var(--radius-main); overflow: hidden; border: var(--border-w) solid var(--border-subtle); background: var(--background-2); margin: 0; text-decoration: none; color: var(--text-heading); }
.player video, .player > img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #000; }
.player .bigplay { position: absolute; left: 50%; top: calc(50% - 22px); transform: translate(-50%, -50%); width: 64px; height: 64px; border-radius: 50%; border: 0; background: var(--btn-bg); color: var(--btn-text); display: grid; place-items: center; cursor: pointer; transition: transform .2s ease, opacity .2s ease; }
.player .bigplay .icon { font-size: 32px; color: var(--btn-text); }
.player:hover .bigplay { transform: translate(-50%, -50%) scale(1.06); }
.player.playing .bigplay { opacity: 0; pointer-events: none; }
.player .chrome { position: absolute; left: 0; right: 0; bottom: 44px; display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: linear-gradient(180deg, transparent, rgba(5,5,20,.85)); opacity: 0; transition: opacity .2s ease; }
.player:hover .chrome, .player.playing .chrome, .player:focus-within .chrome { opacity: 1; }
.chrome button { border: 0; background: transparent; color: var(--text-heading); cursor: pointer; padding: 4px; display: grid; place-items: center; border-radius: var(--radius-small); }
.chrome button:hover { color: var(--link); }
.chrome button .icon { font-size: 22px; }
.chrome .time { color: var(--text-heading); white-space: nowrap; flex: 0 0 auto; }
.chrome button { flex: 0 0 auto; }
.chrome input[type=range] { min-width: 0; }
.player { container-type: inline-size; }
@container (max-width: 520px) { .chrome { gap: 6px; padding: 8px 10px; } .chrome .vol { display: none; } }
@container (max-width: 380px) { .chrome .time { display: none; } }
.chrome input[type=range] { -webkit-appearance: none; appearance: none; height: 3px; background: rgba(218,219,246,.25); border-radius: 2px; outline: none; }
.chrome input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; border-radius: 50%; background: var(--link); border: 2px solid var(--btn-border); cursor: pointer; }
.chrome input[type=range]::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: var(--link); border: 2px solid var(--btn-border); cursor: pointer; }
.chrome .seek { flex: 1 1 40px; min-width: 40px; background: linear-gradient(90deg, var(--link) var(--p, 0%), rgba(218,219,246,.25) var(--p, 0%)); }
.chrome .vol { flex: 0 0 56px; width: 56px; }
.player .cap { display: block; padding: 10px 12px; background: var(--background); color: var(--text); margin: 0; line-height: 1.5; }
.player .cap b { color: var(--text-heading); font-weight: 500; display: block; }
.player .cap span { display: block; opacity: .8; }
.player.linkout .bigplay { width: 48px; height: 48px; }
.player:fullscreen video { aspect-ratio: auto; height: 100%; object-fit: contain; }
.player:fullscreen .chrome { bottom: 0; }
.player:fullscreen .cap { display: none; }
.reel { padding-block: var(--section-main) 0; }
.reel .player > img, .reel .player video { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.reel .player { max-width: 66vw; margin-inline: auto; }
.reel .player .chrome { bottom: 0; }
.reel .player .bigplay { top: 50%; }
.reel .head { display: flex; justify-content: space-between; gap: var(--sp-4); max-width: 66vw; margin: 0 auto var(--sp-4); color: var(--text); }
/* ---- The record: sticky year counter + timeline ---- */
.record { padding-block: var(--section-main) var(--section-large); }
.record-grid { display: grid; grid-template-columns: 4fr 8fr; column-gap: var(--sp-5); }
.counter { position: sticky; top: 112px; align-self: start; }
.counter .eyebrow { margin-bottom: var(--sp-3); }
.counter .numeral { font-weight: 500; font-size: var(--numeral); line-height: .9; letter-spacing: -.03em; color: var(--text-heading); font-variant-numeric: tabular-nums; transition: opacity .25s ease; }
.counter .numeral.tick { opacity: .2; }
.counter .where { margin-top: var(--sp-4); max-width: 30ch; }
/* the title is a <p class="h5">, and `.counter .where p` below outranks `.h5` on specificity, so it was
   painted at body size and body colour. Say it here, where it wins, or the class styles nothing. */
.counter .where .h5 { margin-bottom: var(--sp-2); font-size: var(--h5); color: var(--text-heading); }
.counter .where p { margin: 0; color: var(--text); font-size: var(--text-s); }
.timeline { position: relative; padding-left: 40px; }
.timeline::before { content: ""; position: absolute; left: 6px; top: 8px; bottom: 8px; width: 1px; background: var(--border-subtle); }
.timeline .progress { position: absolute; left: 6px; top: 8px; width: 1px; height: 0; background: var(--link); }
.chapter-label { position: relative; padding: var(--sp-6) 0 var(--sp-4); }
.chapter-label:first-child { padding-top: 0; }
.chapter-label .h2 { margin-top: var(--sp-2); max-width: 20ch; }
.event { position: relative; border-bottom: var(--border-w) solid var(--border-subtle); transform: translateY(10px); opacity: .55; transition: transform .5s cubic-bezier(.2,.7,.2,1), opacity .5s ease; }
.event.in { transform: none; opacity: 1; }
.event::before { content: ""; position: absolute; left: -40px; top: calc(var(--sp-4) + 6px); width: 13px; height: 13px; border-radius: 50%; background: var(--background); border: 2px solid var(--border); transition: background .25s ease, border-color .25s ease, transform .25s ease; }
.event.in::before { border-color: var(--link); }
.event.open::before { background: var(--link); border-color: var(--link); }
.event:hover::before { transform: scale(1.35); }
.row-head { all: unset; cursor: pointer; display: grid; grid-template-columns: 72px 1fr auto 24px; gap: var(--sp-4); align-items: start; width: 100%; padding-block: var(--sp-4); box-sizing: border-box; }
.row-head:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; border-radius: var(--radius-small); }
.row-head .yr { color: var(--link); padding-top: 6px; font-variant-numeric: tabular-nums; }
.row-head .ttl { display: grid; gap: 4px; }
.row-head .h5 { transition: color .18s ease; }
.row-head:hover .h5 { color: var(--link-hover); }
.row-head .client { color: var(--text); }
.row-head .tags { display: flex; gap: var(--sp-1); flex-wrap: wrap; justify-content: flex-end; padding-top: 4px; }
.row-head .chev { font-size: 20px; color: var(--icon); padding-top: 3px; transition: transform .3s cubic-bezier(.2,.7,.2,1); }
.event.open .chev { transform: rotate(180deg); }
.row-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .45s cubic-bezier(.2,.7,.2,1); }
.event.open .row-body { grid-template-rows: 1fr; }
.row-body .inner { overflow: hidden; min-height: 0; padding-left: calc(72px + var(--sp-4)); }
.row-body .spec { color: var(--link); margin: 0 0 var(--sp-2); }
.row-body p { margin: 0; max-width: 62ch; }
.row-body .strip { margin-top: var(--sp-4); border-radius: var(--radius-main); overflow: hidden; border: var(--border-w) solid var(--border-subtle); background: var(--background-2); max-width: 648px; }
.row-body .strip + .strip { margin-top: var(--sp-3); }
.row-body .strip img { width: 100%; aspect-ratio: 3 / 1; object-fit: cover; }
.row-body .strip .src { position: relative; display: block; text-decoration: none; color: inherit; }
.row-body .strip .src img { display: block; transition: opacity .2s ease; }
.row-body .strip .src:hover img, .row-body .strip .src:focus-visible img { opacity: .82; }
.row-body .strip .src-tag { position: absolute; right: var(--sp-2); bottom: var(--sp-2); padding: 2px 8px; border-radius: var(--radius-small); background: var(--background); color: var(--text-heading); border: var(--border-w) solid var(--border-subtle); opacity: 0; transition: opacity .2s ease; pointer-events: none; }
.row-body .strip .src:hover .src-tag, .row-body .strip .src:focus-visible .src-tag { opacity: 1; }
@media (hover: none) { .row-body .strip .src-tag { opacity: 1; } }
.event.open .row-body .inner { padding-bottom: var(--sp-5); }
/* open rows show their pictures as small thumbnails in a row UNDER the text (owner-directed 2026-09-23).
   The full-width 3:1 strip read as a banner ad, and a column beside the text was cut off at the right edge. */
.row-body .thumbs { display: grid; grid-template-columns: repeat(auto-fill, 432px); gap: var(--sp-3); margin-top: var(--sp-4); align-items: start; }
.row-body .thumbs .strip, .row-body .thumbs .strip + .strip { margin-top: 0; max-width: none; }
.row-body .thumbs .strip img { aspect-ratio: auto; height: auto; }  /* each picture at the proportion it was saved at: 864x160 originals, and 1080x360 where no original exists (owner-directed 2026-09-24) */
.row-body .thumbs .strip .src-tag { right: 6px; bottom: 6px; padding: 1px 6px; }
.row-body .thumbs .src[data-embed]::before { content: "play_arrow"; font-family: var(--f-icon); font-size: 18px; line-height: 1; position: absolute; left: 6px; bottom: 6px; width: 28px; height: 28px; border-radius: 50%; background: var(--btn-bg); color: var(--btn-text); display: grid; place-items: center; z-index: 1; pointer-events: none; }
@media (max-width: 860px) {
  .row-body .thumbs { grid-template-columns: minmax(0, 1fr); }
}

/* ---- Now ---- */
.now { padding-block: var(--section-large); }
.now .grid { display: grid; grid-template-columns: 4fr 8fr; column-gap: var(--sp-5); row-gap: var(--sp-6); }
.now .body p { margin: 0; max-width: 56ch; }
/* one sentence per line (owner-directed 2026-09-22). MEASURED rather than guessed: the longest sentence
   needs about 2.7vw to sit on one line in this column at every width from 1024 up, so the heading drops
   from --h2 to a size that fits. Spans, not <br>, so a phone can put them back inline — there the same
   line would need 16px, smaller than body text, and three broken lines read worse than an honest wrap. */
.now .body .h2.sentences { font-size: clamp(24px, 2.55vw, 40px); }
.now .body .h2.sentences .ln { display: block; }
.now .cards { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-3); margin-top: var(--sp-2); }
.card { border: var(--border-w) solid var(--border-subtle); border-radius: var(--radius-main); padding: var(--sp-4); display: grid; gap: var(--sp-2); align-content: start; transition: border-color .2s ease, transform .3s cubic-bezier(.2,.7,.2,1); }
.card:hover { border-color: var(--link); transform: translateY(-4px); }
.card .mono-xxs { color: var(--link); }
.card p { margin: 0; color: var(--text); font-size: var(--text-s); }

/* ---- contact: the same form at the foot of every page ---- */
.contact { padding-block: var(--section-main); border-top: var(--border-w) solid var(--border-subtle); }
.contact .g12 { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: var(--sp-5); row-gap: var(--sp-6); }
.contact .lede { grid-column: 1 / 8; } .contact .lede .h2 { margin-top: var(--sp-3); }
.form { grid-column: 1 / 8; display: grid; gap: var(--sp-4); margin-top: var(--sp-3); }
.form label { display: grid; gap: 8px; color: var(--text-heading); font-size: var(--text-s); }
.form input, .form select, .form textarea { font: inherit; font-size: var(--text-body); color: var(--text-heading); background: var(--background-2); border: var(--border-w) solid var(--border); border-radius: var(--radius-small); padding: 12px 14px; width: 100%; }
.form input:focus-visible, .form select:focus-visible, .form textarea:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.form textarea { min-height: 140px; resize: vertical; }
.form label small { color: var(--text); font-size: var(--text-xs); margin-left: 6px; }
.form .two { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-4); }
.form .foot { display: flex; gap: var(--sp-4); align-items: center; flex-wrap: wrap; }
.form .foot p { margin: 0; color: var(--text); font-size: var(--text-s); }
.form .btn { border: 0; cursor: pointer; }
.direct { grid-column: 9 / 13; align-self: start; display: grid; gap: var(--sp-3); margin-top: var(--sp-3); }
.direct a { color: var(--text-heading); text-decoration: none; }
.direct a:hover { color: var(--link); }
.direct p { margin: 0; color: var(--text); font-size: var(--text-s); }
@media (max-width: 860px) { .contact .lede, .form, .direct { grid-column: 1 / 13; } .form .two { grid-template-columns: 1fr; } }

/* ---- SiteFooter ---- */
.sitefooter { padding-block: var(--section-main) var(--sp-7); border-top: var(--border-w) solid var(--border-subtle); }
.sitefooter .top { display: flex; justify-content: space-between; gap: var(--sp-5); flex-wrap: wrap; }
.sitefooter .identity { display: grid; gap: var(--sp-3); }
.sitefooter .identity svg { width: 140px; height: 56px; }
.sitefooter .contact { display: grid; gap: var(--sp-2); align-self: end; }
.sitefooter .contact a { text-decoration: none; color: var(--text-heading); }
.sitefooter .contact a:hover { color: var(--link); }
.rule { height: var(--border-w); background: var(--border-subtle); margin-block: var(--sp-7); }
.sitefooter .cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-5); }
.sitefooter .col { display: grid; gap: var(--sp-3); align-content: start; }
.sitefooter .col a, .sitefooter .col span { text-decoration: none; color: var(--text); display: inline-flex; align-items: center; gap: var(--sp-2); }
.sitefooter .col a:hover { color: var(--link); }
.sitefooter .col .icon { font-size: 16px; color: var(--link); }
.sitefooter .legal { display: flex; justify-content: space-between; gap: var(--sp-4); }

@media (max-width: 860px) {
  .primarynav { display: none; }
  .hero .row, .record-grid, .marks .head, .now .grid { grid-template-columns: 1fr; }
  .counter { position: static; margin-bottom: var(--sp-6); }
  .now .cards { grid-template-columns: 1fr; }
  /* the column is now the full page, so one sentence per line would need ~16px. Let it wrap instead. */
  .now .body .h2.sentences { font-size: var(--h2); }
  .now .body .h2.sentences .ln { display: inline; }
  .row-head { grid-template-columns: 56px 1fr 24px; }
  .row-head .tags { grid-column: 2; justify-content: flex-start; }
  .row-body .inner { padding-left: 0; }
  .sitefooter .cols { grid-template-columns: 1fr; }
  .hero .display { max-width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .lane { transform: none !important; }
  .event { transform: none; opacity: 1; transition: none; }
  .card, .btn { transition: none; }
}

.navcta { padding: 10px 18px; font-size: 14px; }
.search { display: none; }
.sec { padding-block: var(--section-main); border-top: var(--border-w) solid var(--border-subtle); }
.sec.tight { padding-block: var(--section-small); }
.g12 { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: var(--sp-5); row-gap: var(--sp-6); }
.lede { grid-column: 1 / 8; }
.lede .h2 { margin-top: var(--sp-3); }
.lede p { margin: var(--sp-4) 0 0; max-width: 58ch; }
.aside { grid-column: 9 / 13; align-self: end; }
.aside p { margin: 0; color: var(--text); font-size: var(--text-s); }
.fig { margin: 0; }
.fig img { width: 100%; border-radius: var(--radius-main); border: var(--border-w) solid var(--border-subtle); background: var(--background-2); }
.fig figcaption { margin-top: 10px; font-size: var(--text-s); color: var(--text); max-width: 60ch; }
.fig figcaption b { color: var(--text-heading); font-weight: 500; }
.pull { border-left: 2px solid var(--link); padding-left: var(--sp-4); }
.pull .h4 { max-width: 24ch; }
.pull .mono-xs { display: block; margin-top: var(--sp-2); color: var(--link); }
.cta { padding-block: var(--section-large); border-top: var(--border-w) solid var(--border-subtle); background: var(--background-2); }
.cta .h2 { max-width: 18ch; }
.cta .row { display: flex; gap: var(--sp-3); flex-wrap: wrap; margin-top: var(--sp-5); }
.reveal { transform: translateY(12px); opacity: .6; transition: transform .6s cubic-bezier(.2,.7,.2,1), opacity .6s ease; }
.reveal.in { transform: none; opacity: 1; }
@media (max-width: 860px) {
  .lede, .aside { grid-column: 1 / 13; }
  .navcta { display: none; }
}
@media (prefers-reduced-motion: reduce) { .reveal { transform: none; opacity: 1; transition: none; } }
