/* Homepage (master 4). Negative space around each idea (brief 3.5). Monochrome: art is the only colour. */

html { scroll-behavior: smooth; scroll-padding-top: 4.5rem; }
body.home { position: relative; }
.world { position: relative; z-index: 1; }

/* ---------- the intro (master 2) ----------
   js/early.js adds html.intro-pre before first paint: everything except the title is hidden. js/title.js plays the intro IN the
   title's place, then adds html.world-in and the rest fades up around it. The 9s failsafe (longer than the slowest intro: 2.5s waiting for frames + about 3.4s) reveals the page if the script ever dies. */
.world-rest { transition: none; }
html.intro-pre .world-rest, html.intro-pre #void { opacity: 0; visibility: hidden; animation: introfail 0s 9s forwards; }
html.intro-pre.world-in .world-rest, html.intro-pre.world-in #void { opacity: 1; visibility: visible; transition: opacity var(--fadein-ms, 1100ms) cubic-bezier(.3, 0, .3, 1); animation: none; }
html.intro-pre .title-link { opacity: 0; animation: introfail 0s 9s forwards; }
@keyframes introfail { to { opacity: 1; visibility: visible; } }

/* The phases of the intro, set on the hero by js/title.js: void, draw, land, open. ONE CONTINUOUS MOTION (Sam, 2026-11-11): once the word is on screen it never leaves it
   again (no pulse to black, no fade, no pop). The last frame lands and a glow rises on it; while it glows the diamond opens around it from a flat line and everything else
   fades in from the void. Every end state here is exactly the resting page, so nothing jumps when the intro's classes come off.
   The glow is one animation named on both the land and the open phase, so it runs straight through the change of phase without restarting. */
.hero[data-phase="draw"] .title-link, .hero[data-phase="land"] .title-link, .hero[data-phase="open"] .title-link { opacity: 1; }
.hero[data-phase="void"] .diamond, .hero[data-phase="draw"] .diamond, .hero[data-phase="land"] .diamond { opacity: 0; transform: scale(.34, 0); }
.hero[data-phase="open"] .diamond { animation: dopen var(--open-ms, 950ms) cubic-bezier(.2, .75, .2, 1) both; }
.hero[data-phase="land"] .title-art, .hero[data-phase="open"] .title-art { animation: tglow var(--glow-ms, 1300ms) ease-in-out both; }
@keyframes dopen { 0% { opacity: 0; transform: scale(.34, 0); } 30% { opacity: 1; } 100% { opacity: 1; transform: none; } }
@keyframes tglow {
  0% { filter: drop-shadow(0 0 0 rgba(245, 243, 238, 0)) drop-shadow(0 0 0 rgba(245, 243, 238, 0)); }
  42% { filter: drop-shadow(0 0 7px rgba(245, 243, 238, .95)) drop-shadow(0 0 24px rgba(245, 243, 238, .5)); }
  100% { filter: drop-shadow(0 0 0 rgba(245, 243, 238, 0)) drop-shadow(0 0 0 rgba(245, 243, 238, 0)); }
}
@keyframes drawn { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }

/* ---------- 1. the title: a drawn image, never text (master 3) ---------- */
.hero { min-height: 78vh; min-height: 78svh; display: grid; place-items: center; padding: var(--space); }
.title { margin: 0; font-weight: normal; }
.title-link { position: relative; display: grid; place-items: center; width: min(92vw, 56rem); aspect-ratio: 5 / 2; color: var(--ink); }
.title-link:hover, .title-link:focus-visible { background: none; }
.diamond { position: absolute; inset: 0; transform-origin: 50% 50%; }
.diamond svg { width: 100%; height: 100%; display: block; }
.hero.no-diamond .diamond { display: none; }
.title-art { position: relative; width: 76%; }
.title-art.framed { aspect-ratio: var(--title-aspect, 5 / 2); }
.title-art .f { position: absolute; inset: 0; width: 100%; height: 100%; visibility: hidden; }
.title-art .f.on { visibility: visible; }
/* THE HUM (Sam, 2026-11-11): the resting title glows, slow and low. Not motion, just light. js/title.js lays three copies of the clean last frame under the title;
   each is blurred once here (tight, soft, wide: thin lines need all three to read as light), and only the opacity of the three together breathes, about one breath
   every 5.6 seconds, so the phone repaints nothing. Plain blur, not drop-shadow: it draws the same in every browser. Reduced Motion and Pause: a steady low glow. */
.title-art .title-glow { position: absolute; inset: 0; pointer-events: none; opacity: .3; will-change: opacity; animation: thum-in 1.8s ease-out both, thum 5.6s ease-in-out 1.8s infinite; }
.title-art .title-glow img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; filter: blur(2px); }
.title-art .title-glow img:nth-child(2) { filter: blur(5px); }
.title-art .title-glow img:nth-child(3) { filter: blur(12px); }
@keyframes thum-in { from { opacity: 0; } to { opacity: .3; } }
@keyframes thum { 0%, 100% { opacity: .3; } 50% { opacity: .92; } }
html[data-motion="reduced"] .title-art .title-glow, html[data-pause="1"] .title-art .title-glow { animation: none; opacity: .5; }
/* the stand-in word (until Sam's frames exist): drawn in 12 steps, then it jitters like a slow boil */
.title-art.text .title-text { display: block; text-align: center; line-height: 1; font-size: clamp(1.4rem, 7vw, 4.5rem); white-space: nowrap; }
.title-art.text.drawing .title-text { animation: drawn var(--draw-ms, 1000ms) steps(12, end) both; }
.title-art.text[data-f="1"] { transform: translate(1px, -1px) rotate(-.4deg); }
.title-art.text[data-f="2"] { transform: translate(-1px, 1px) rotate(.4deg); }

/* ---------- 2. nav (master 4.1): a business requirement, never squeezed into one row ---------- */
/* Loose scratch words in the Void, no bar and no container. Scrolling sticks them to the top; then (and only then) the page's
   own black rises behind them so content never runs through the words, and one faint line fades in beneath. Scroll back up
   and both fade out. js/home.js sets .stuck from a zero-height sentinel (an observer: no scroll handler). */
.nav { position: sticky; top: 0; z-index: 40; display: flex; justify-content: center; padding: .25rem var(--space); }
.nav::before { content: ""; position: absolute; inset: 0; z-index: -1; background: #000; opacity: 0; transition: opacity .35s ease; pointer-events: none; }
.nav::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; opacity: 0; transition: opacity .35s ease; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(245, 243, 238, .4) 18%, rgba(245, 243, 238, .4) 82%, transparent); }
.nav.stuck::before, .nav.stuck::after { opacity: 1; }
#nav-sentinel { height: 0; }
.nav-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .25rem 1.4rem; justify-content: center; align-items: center; }
.nav-links a, .nav-links .settings-btn {
  position: relative; display: inline-flex; align-items: center; min-height: var(--touch); padding: 0 .5rem;
  font-size: 1.25rem; transition: text-shadow .25s ease; border: 0; background: none; border-radius: 0;
}
.nav-links a:hover, .nav-links .settings-btn:hover, .nav-links a:focus-visible, .nav-links .settings-btn:focus-visible { background: none; text-decoration: none; }
/* pressed (Sam, 2026-10-29): the whole control, word and its drawn container together, drops a little while held and springs back past rest on release. A transform on the
   control itself, so it is the same for a word of any length and costs no layout. .held is set by js/home.js on pointerdown (touch Safari does not reliably give buttons :active);
   :active covers the keyboard (Space on a button) and the case where the script has not run. Reduced Motion: base.css makes both ends instant, so it is a plain drop while held. */
.nav-links a, .nav-links .settings-btn { transition: text-shadow .25s ease, transform .34s cubic-bezier(.3, 2.3, .5, 1); -webkit-tap-highlight-color: transparent; }
.nav-links a:active, .nav-links .settings-btn:active, .nav-links .held { transform: translateY(3px); transition: text-shadow .25s ease, transform .07s ease-out; }
/* hover: the word glows (no squiggly underline). The scratch line is a Settings choice, and automatic under Reduced Motion. */
html:not([data-navhover="line"]) .nav-links a:hover, html:not([data-navhover="line"]) .nav-links .settings-btn:hover,
html:not([data-navhover="line"]) .nav-links a:focus-visible, html:not([data-navhover="line"]) .nav-links .settings-btn:focus-visible {
  text-shadow: 0 0 5px rgba(245, 243, 238, .95), 0 0 14px rgba(245, 243, 238, .6), 0 0 30px rgba(245, 243, 238, .32);
}
:root { --scratch-line-fallback: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 14' preserveAspectRatio='none'%3E%3Cpath d='M2 8C30 3 60 11 100 6S170 10 210 5 270 9 298 6' fill='none' stroke='%23f5f3ee' stroke-width='2.4' stroke-linecap='round'/%3E%3Cpath d='M6 11C50 8 90 12 140 9S230 11 292 8' fill='none' stroke='%23f5f3ee' stroke-width='1.2' stroke-linecap='round' opacity='.55'/%3E%3C/svg%3E"); }   /* drawn stand-in until ui-underscratch.png is cut into strokes */
html[data-navhover="line"] .nav-links a::after, html[data-navhover="line"] .nav-links .settings-btn::after {
  content: ""; position: absolute; left: .25rem; right: .25rem; bottom: .5rem; height: 12px; opacity: 0; pointer-events: none;
  background: var(--scratch-line, var(--scratch-line-fallback)) center / 100% 100% no-repeat;
}
html[data-navhover="line"] .nav-links a:hover::after, html[data-navhover="line"] .nav-links .settings-btn:hover::after,
html[data-navhover="line"] .nav-links a:focus-visible::after, html[data-navhover="line"] .nav-links .settings-btn:focus-visible::after { opacity: 1; }
/* phones: while docked the words tighten so the bar stays slim (the touch targets stay 44px tall); undocked they have room to breathe */
@media (max-width: 40rem) {
  .nav.stuck { padding-inline: .4rem; }
  .nav.stuck .nav-links { gap: 0 .2rem; }
  .nav.stuck .nav-links a, .nav.stuck .nav-links .settings-btn { font-size: 1.05rem; padding: 0 .25rem; }
}

/* ---------- shared section rhythm ---------- */
.block { min-height: 70vh; min-height: 70svh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.5rem; padding: calc(var(--space) * 2) var(--space); text-align: center; position: relative; }
.block h2 { margin: 0; font-weight: normal; font-size: clamp(1.8rem, 5vw, 3rem); }
.blurb { max-width: 32rem; margin: 0; color: var(--ink-dim); }
.go { display: inline-flex; align-items: center; justify-content: center; min-height: var(--touch); padding: 0 1.5rem; font-size: 1.25rem; border: 2px solid var(--line); border-radius: 2px 6px 3px 5px; background: var(--void); }
.go:hover { background: var(--depth); }

/* ---------- 3. the TV ---------- */
/* Sam's drawn TV (tv-frame, 2400 x 1500: checked 2026-10-29 with tools/check-tv.mjs). The frame is a transparent PNG laid OVER the screen; the screen is the opening in
   it: x 327 to 2102, y 147 to 1154 (1776 x 1008). Content is a 16:9 rectangle of that width, 1776 x 999 at (327, 151), as percentages of the 2400 x 1500 canvas below.
   Thin gaps in the scribbled border show the screen through them, on purpose. The frame takes no clicks: the screen under it does. */
.tv { position: relative; width: min(96vw, 46rem); aspect-ratio: 8 / 5; --sx: 13.625%; --sy: 10.0667%; --sw: 74%; --sh: 66.6%; }
.tv-screen { position: absolute; z-index: 0; left: var(--sx); top: var(--sy); width: var(--sw); height: var(--sh); overflow: hidden; background: #050505;
  display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding: 4% 4% 7%; container-type: inline-size; text-align: center; }
.tv-screen:hover, .tv-screen:focus-visible { background: #0d0d0d; }
.tv-screen:focus-visible { outline: 2px solid var(--ink); outline-offset: -6px; }
.tv-screen, .tv-screen * { font-family: var(--font-scratch); }                 /* nothing on the TV is in any font but the scratch font (Sam, 2026-10-29) */
.tv-title { position: relative; z-index: 1; font-size: clamp(1.2rem, 8cqw, 2.4rem); line-height: 1; letter-spacing: .06em; text-shadow: 0 0 4px #000, 0 0 9px #000; }   /* above the drifting piece, so the word is never struck through by its frame */
.tv-sub { font-size: clamp(.9rem, 5cqw, 1.5rem); color: var(--ink-dim); letter-spacing: .05em; }
.tv-sub:empty { display: none; }
/* the Node channel's drawn error card (Sam's pieces: an arrow, "NUP :/ HERE", an arrow) in the middle of the screen */
/* the Node card is Sam's drawn "NUP :/ HERE" alone, in the middle (Sam, 2026-11-10: the arrows are the site's arrows, not part of this card) */
.tv-node { display: none; position: absolute; left: 3%; right: 3%; top: 24%; bottom: 8%; align-items: center; justify-content: center; pointer-events: none; }
.tv-screen[data-channel="node"] .tv-node { display: flex; }
.tv-node .n-row { flex: 0 0 64%; }
.tv-node picture, .tv-node img { display: block; width: 100%; height: auto; max-width: none; }
/* the Memories channel: the pieces cycle in the screen under the title (js/home.js), shown whole (never cropped), with no caption.
   SPACE UNDER THE TITLE (Sam, 2026-11-10): the word sits in the top fifth of the screen (about 7% to 21% of its height); the piece's own area starts at 31%, and its frame, even at
   the top of a drift, never comes above about 30%. So there is always clear screen between the word and where the art appears. Percentages of the screen, so web and phone match. */
.tv-art { display: none; position: absolute; left: 4%; right: 4%; top: 31%; bottom: 0; align-items: center; justify-content: center; pointer-events: none; }
.tv-screen[data-channel="memories"] .tv-art { display: flex; }
/* a portrait piece with its frame (the frame canvas is the art + 20%, laid over at -10%): the art is about 52% of the screen's height, its frame 63%; it drifts, sways and breathes
   on three slow cycles of different lengths (so it never repeats in step), like it hangs in the air. The frame's spill may touch the screen's bottom edge at the low point of a drift: the TV's own frame covers it. */
.tv-piece { position: relative; display: block; height: 76%; aspect-ratio: var(--ar); }
/* the Shop channel (Sam, 2026-11-10): CLOSED big in the middle; I at the bottom right, turned toward the middle, saying "brb" (a drawn dash for speech, no bubble).
   Every few seconds he is gone, with a burst of the TV's static as he goes, and a few seconds later he is back (js/home.js; he stays put under Reduced Motion or Pause). */
.tv-shop { display: none; position: absolute; inset: 0; pointer-events: none; }
.tv-screen[data-channel="shop"] .tv-shop { display: block; }
.shop-closed { position: absolute; left: 0; right: 0; top: 45%; transform: translateY(-50%); font-size: clamp(2rem, 16cqw, 5.4rem); line-height: 1; letter-spacing: .08em; text-shadow: 0 0 4px #000, 0 0 9px #000; }
/* TUCKED INTO THE CORNER (Sam, 2026-11-11): he leans in from the bottom right, cut off by the edge of the screen (the screen clips, his art is whole): about the right
   third of him and everything below his shoulder is out of sight. */
.shop-i { position: absolute; right: -8.5%; bottom: -21%; height: 58%; aspect-ratio: 3 / 4; }
.shop-i.away { visibility: hidden; }
.shop-i-art, .shop-i-art picture, .shop-i-art img { display: block; width: 100%; height: 100%; max-width: none; }
.shop-i-art img { filter: drop-shadow(0 0 1px rgba(245, 243, 238, .85)); }                      /* a hair of light round him, so his black hair still has an edge on the dark screen (his art is untouched) */
/* THE DASH COMES FROM HIM (Sam, 2026-11-11): the drawn stroke starts at his face and rises up and away to the left; "brb" sits at its far end. So it reads as speech
   leaving his mouth, not as a mark beside a word. (The stroke is ui-underscratch whole, scaled and turned.) */
.shop-brb { position: absolute; right: 83%; top: 21%; display: flex; align-items: flex-start; gap: .12em; white-space: nowrap; font-size: clamp(.7rem, 5cqw, 1.5rem); line-height: 1; color: var(--ink); }
.brb-word { transform: translateY(-.75em); }
.brb-dash { display: block; width: 1.5em; transform: rotate(24deg); transform-origin: 100% 50%; }
.brb-dash picture, .brb-dash img { display: block; width: 100%; height: auto; max-width: none; }
.tv-piece picture { display: block; width: 100%; height: 100%; }
.tv-piece picture img { display: block; width: 100%; height: 100%; max-width: none; }
.tv-piece .frame { position: absolute; left: -10%; top: -10%; width: 120%; height: 120%; max-width: none; pointer-events: none; }
html:not([data-motion="reduced"]):not([data-pause="1"]) .tv-piece { animation: tv-bob 4.6s ease-in-out infinite alternate, tv-sway 6.7s ease-in-out infinite alternate, tv-breathe 8.3s ease-in-out infinite alternate; }
@keyframes tv-bob { from { translate: 0 -6%; } to { translate: 0 6%; } }
@keyframes tv-sway { from { rotate: -1.6deg; } to { rotate: 1.6deg; } }
@keyframes tv-breathe { from { scale: 1; } to { scale: 1.035; } }
/* VHS tracking: faint scanlines, and two soft bands drifting down the screen (calm: low contrast, slow, never a flash). Memories only; still under Reduced Motion or paused animations. */
.tv-lines { display: none; position: absolute; inset: 0; z-index: 1; overflow: hidden; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .16) 0 1px, transparent 1px 3px); }
.tv-screen[data-channel="memories"] .tv-lines { display: block; }
.tv-lines::before, .tv-lines::after { content: ""; position: absolute; left: -2%; right: -2%; height: 9%; top: -12%; background: linear-gradient(180deg, transparent, rgba(245, 243, 238, .13) 45%, rgba(245, 243, 238, .05) 55%, transparent); }
.tv-lines::after { height: 3%; background: rgba(245, 243, 238, .11); top: -4%; }
html:not([data-motion="reduced"]):not([data-pause="1"]) .tv-lines::before { animation: vhs-drift 7.5s linear infinite; }
html:not([data-motion="reduced"]):not([data-pause="1"]) .tv-lines::after { animation: vhs-drift 11s linear infinite -4s, vhs-jitter .9s steps(2, end) infinite; }
@keyframes vhs-drift { to { translate: 0 1250%; } }
@keyframes vhs-jitter { 50% { margin-left: .8%; } }
/* the static (js/home.js): a small noise canvas scaled up, only inside the screen, at a steady brightness (never pure black or white, never pulsing). Channel change: full. Between pieces: a soft blip. */
.tv-static { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; opacity: 0; pointer-events: none; z-index: 2; }
.tv-static.on { opacity: 1; }
.tv-static.on.soft { opacity: .6; }
.tv-screen:not([href]) { cursor: default; }
/* the channel triangles (Sam's drawing, white ink): either side of the stand, under the body (y about 83% of the TV). The picture is small on a phone, so the hit area is padded out to 44px. */
.tv-btn { position: absolute; z-index: 2; top: 89%; width: clamp(34px, 7.4%, 56px); aspect-ratio: 174 / 206; padding: 0; background: none; border: 0; cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: transform .34s cubic-bezier(.3, 2.3, .5, 1), filter .25s ease; }
.tv-btn.prev { left: 21%; } .tv-btn.next { right: 21%; }
.tv-btn::before { content: ""; position: absolute; inset: -8px -12px; }
.tv-btn picture, .tv-btn img { display: block; width: 100%; height: 100%; max-width: none; pointer-events: none; }
.tv-btn:hover, .tv-btn:focus-visible { filter: drop-shadow(0 0 5px rgba(245, 243, 238, .9)) drop-shadow(0 0 14px rgba(245, 243, 238, .5)); background: none; }
.tv-btn:active, .tv-btn.held { transform: translateY(3px); transition: transform .07s ease-out, filter .25s ease; }
.tv-slot { position: absolute; inset: 0; z-index: 1; pointer-events: none; display: grid; place-items: center; }
.tv-slot picture, .tv-slot img { display: block; width: 100%; height: 100%; max-width: none; }
.tv-slot .scratch { font-size: 1.6rem; color: var(--ink-dim); }

/* ---------- 6. titan ---------- */
#titan { z-index: 6; overflow-x: clip; padding-top: calc(var(--space) * 4); }     /* his section paints above its neighbours so the crown is never covered */
.titan-stack { position: relative; width: min(70vw, 22rem); aspect-ratio: 617 / 746; }
.titan-link { position: relative; display: block; width: 100%; height: 100%; }
.titan-link:hover, .titan-link:focus-visible { background: none; }
.titan-link [data-img], .titan-link picture, .titan-link img { display: block; width: 100%; height: 100%; object-fit: contain; }
.crown { position: absolute; z-index: 30; left: 50%; top: 0; width: 45%; aspect-ratio: 440 / 382; transform: translate(-50%, -70%); pointer-events: none; }   /* NOT clickable (master 8.1): it overlaps a hidden I */
.crown img { width: 100%; display: block; }
html:not([data-motion="reduced"]):not([data-pause="1"]) .crown { animation: float 4s ease-in-out infinite; }
@keyframes float { 50% { translate: 0 -.5rem; } }
/* the sign under Titan (Sam, 2026-11-10): the arrow stands on his centre line and points straight up at him, with room around it; the words and his line are centred under it */
.titan-sign { display: flex; flex-direction: column; align-items: center; gap: .55rem; margin-top: 1rem; pointer-events: none; }
/* Sam's drawn arrow (ui-arrow-right) is the site's arrow; here it is turned to point up (turned, never redrawn). The box is square so the turned drawing has its room. */
.t-arrow { display: grid; place-items: center; width: clamp(4.25rem, 12vw, 6rem); aspect-ratio: 1; }
.t-arrow picture { display: block; width: 100%; transform: rotate(-90deg); }
.t-arrow img { display: block; width: 100%; height: auto; max-width: none; }
.t-domain { font-size: clamp(1.6rem, 5vw, 2.6rem); letter-spacing: .06em; line-height: 1; white-space: nowrap; }
.t-line { margin: .15rem 0 0; max-width: 27rem; color: var(--ink-dim); font-size: 1rem; line-height: 1.4; }

/* ---------- 7. events: the word, with Sam's drawn X scratched over it (2026-10-29). Not clickable (master 4.2) ---------- */
.events { position: relative; display: grid; place-items: center; padding: clamp(2.5rem, 9vw, 5rem) 0; }
.ev-wrap { position: relative; display: inline-block; }
.ev-word { position: relative; z-index: 0; display: block; font-size: clamp(3rem, 14vw, 7rem); line-height: 1; letter-spacing: .04em; white-space: nowrap; }
/* The X is stretched (not kept square) over the WORD'S OWN box, so its crossing sits in the middle of the word and it overshoots evenly on every side: 12% each way
   along the word, 40% above and below it. The drawing was cut so that it is even around its own crossing (assets-src/events-x.png). It takes no clicks. */
.ev-x { position: absolute; z-index: 1; left: -12%; right: -12%; top: -40%; bottom: -40%; pointer-events: none; }
.ev-x picture, .ev-x img { display: block; width: 100%; height: 100%; max-width: none; object-fit: fill; }
/* Sam drew the strokes running off the edge of the canvas, so the picture's own edge cuts them off square. A soft fade on all four sides lets them trail off instead. */
.ev-x img { -webkit-mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent), linear-gradient(180deg, transparent, #000 13%, #000 87%, transparent);
  -webkit-mask-composite: source-in; mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent), linear-gradient(180deg, transparent, #000 13%, #000 87%, transparent); mask-composite: intersect; }

/* ---------- 8. a long dark scroll to the silhouette (master 4.3). Not interactive: a promise, not a puzzle ---------- */
#secret { min-height: 170vh; min-height: 170svh; justify-content: flex-end; padding-bottom: 18svh; }
/* THE SCRATCH DOOR (Sam, 2026-11-11). Sam's drawing is black ink on a tall clear canvas (600 x 1200) with the door in the middle of it (x 36% to 68%, y 35.5% to 62.5%).
   Black ink on the Void is invisible, so it is shown white, the same way Jihbert is (invert: nothing is redrawn). The BUTTON is the door's own outline, so only the door
   takes the click; the whole drawing is laid behind it at its true size (nothing is cropped: the rest of the canvas is empty and simply overflows).
   The words sit UNDER the door, centred, in scratch (Sam, 2026-11-11, second pass: bigger, and at the bottom of the door, not to its right; the door itself one size
   up). They never move the door: they fade in on a click, come back fresh on every click, and fade out when it is left alone. */
.door-wrap { position: relative; }
.door { position: relative; display: block; width: clamp(7.5rem, 36vw, 11rem); aspect-ratio: 192 / 324; padding: 0; background: none; border: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.door:hover, .door:focus-visible { background: none; }
.door picture { position: absolute; left: -112.5%; top: -131.5%; width: 312.5%; display: block; pointer-events: none; }
.door img { display: block; width: 100%; height: auto; max-width: none; filter: invert(1); }
.door.knock picture { animation: door-rattle .28s ease-out; }
@keyframes door-rattle { 25% { transform: translateX(-1.2%) rotate(-.5deg); } 55% { transform: translateX(1%) rotate(.4deg); } 80% { transform: translateX(-.4%); } }
.door-say { position: absolute; left: 50%; top: calc(100% + 1rem); transform: translateX(-50%); width: max-content; max-width: min(22rem, 88vw); text-align: center; font-size: clamp(1.7rem, 7vw, 2.5rem); line-height: 1.15;
  opacity: 0; transition: opacity 1.1s ease; pointer-events: none; }
.door-say.on { opacity: 1; transition-duration: .25s; }

.foot { padding: 3rem var(--space); text-align: center; color: var(--ink-dim); font-size: .9rem; display: grid; gap: .75rem; justify-items: center; }
.foot-links { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; justify-content: center; }
.foot-links a { display: inline-flex; align-items: center; min-height: var(--touch); color: var(--ink-dim); }
.foot-links a:hover, .foot-links a:focus-visible { color: var(--ink); background: none; }
