/* About page (js/about.js). One full-viewport block holds the WebGL text track with the
   chrome duck; the shutter footer follows below. Without WebGL the same copy is a
   plain readable layout. Tokens come from css/styles.css. */

.ab { position: relative; background: var(--paper); }

/* ---------- Static layout (no WebGL) ---------- */
.ab-static { padding: 120px var(--pad) 96px; max-width: 1100px; margin: 0 auto; }
.ab-head { margin-bottom: clamp(56px, 8vw, 110px); }
.ab-head h1 { font-weight: 300; font-size: clamp(40px, 7vw, 84px); line-height: 1.08; letter-spacing: -.03em; }
.ab-head h1 span { display: block; }
.ab-now { margin-top: 28px; font-size: 14px; font-weight: 500; }
.ab-stops { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 48px var(--gap); }
.ab-stop h3 {
  margin-bottom: 14px; color: var(--muted);
  font-size: var(--t-meta); font-weight: 500; letter-spacing: .08em; text-transform: uppercase;
}
.ab-stop p { font-size: 20px; font-weight: 300; line-height: 1.32; letter-spacing: -.01em; max-width: 34ch; }
.ab-stop ul { list-style: none; display: grid; gap: 8px; font-size: 18px; }
.ab-stop[data-kind="stats"] li { display: grid; grid-template-columns: 3.6em 1fr; }
.ab-stop li b { font-weight: 500; }
.ab-stop a { transition: opacity .55s var(--ease); }
.ab-stop a:hover { opacity: .5; }
.ab-dim { color: var(--muted); }
.ab-stop .ab-num { font-size: 72px; line-height: 1; margin-bottom: 14px; }
.ab-stop[data-kind="quote"] blockquote p { font-size: 34px; line-height: 1.12; max-width: 14em; }
.ab-stop cite { display: block; margin-top: 14px; color: var(--muted); font-style: normal; font-size: var(--t-meta); font-weight: 500; letter-spacing: .08em; text-transform: uppercase; }
.ab-hint, .ab-jump { display: none; }

/* ---------- WebGL track ---------- */
/* The section is as tall as one pass through the stops; the pin inside sticks while the
   page scrolls through that distance (js/about.js maps it to track progress). */
html.ab-gl .ab { height: calc(100vh + var(--ab-pass, 2800px)); height: calc(100svh + var(--ab-pass, 2800px)); }
html.ab-gl .ab-pin { position: sticky; top: 0; height: 100vh; height: 100svh; min-height: 560px; overflow: hidden; }
.ab-host { display: none; }
html.ab-gl .ab-host { display: block; position: absolute; inset: 0; touch-action: pan-y; -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; }
html.ab-gl .ab-host canvas { display: block; width: 100%; height: 100%; }
html.ab-gl .ab-host.is-hot { cursor: pointer; }

/* The copy stays in the DOM for assistive tech and keyboards; visually it is the canvas. */
html.ab-gl .ab-static {
  position: absolute; left: 0; top: 0; width: 1px; height: 1px; padding: 0; margin: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
/* A keyboard user tabbing into a link gets the real list as a panel. */
html.ab-gl .ab-static:focus-within {
  position: fixed; left: 16px; bottom: 16px; top: auto; width: auto; height: auto; max-width: calc(100vw - 32px); max-height: 60vh;
  overflow: auto; clip: auto; white-space: normal; z-index: 70;
  padding: 22px; background: var(--paper); border-radius: 14px; box-shadow: 0 0 0 1px var(--hair), 0 24px 60px rgba(20, 20, 20, .16);
}
html.ab-gl .ab-static:focus-within .ab-head { margin-bottom: 24px; }
html.ab-gl .ab-static:focus-within .ab-head h1 { font-size: 28px; }
html.ab-gl .ab-static:focus-within .ab-stops { grid-template-columns: 1fr; gap: 24px; }

/* "SCROLL →" hint: fades in late, nudges its arrow, goes away at the first scroll. */
html.ab-gl .ab-hint {
  display: block; position: absolute; z-index: 3; left: 0; right: 0; bottom: 78px; text-align: center;
  font-size: 11px; font-weight: 500; letter-spacing: .22em; color: var(--muted); pointer-events: none;
  opacity: 0; transform: translateX(-8px);
  animation: ab-hint-in .9s cubic-bezier(.16, 1, .3, 1) 1.6s forwards;
}
html.ab-gl .ab-hint i { display: inline-block; font-style: normal; animation: ab-nudge 1.6s ease-in-out infinite; }
html.ab-gl .ab-hint.is-gone { animation: none; opacity: 0; transition: opacity .5s var(--ease); }
@keyframes ab-hint-in { to { opacity: 1; transform: none; } }
@keyframes ab-nudge { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(5px); } }

/* The wheel drives the track while this block is on screen at the top of the page,
   so a visible way down to the footer. */
html.ab-gl .ab-jump {
  display: inline-flex; align-items: center; gap: 6px; position: absolute; z-index: 3; right: var(--pad); bottom: var(--pad);
  font-size: var(--t-meta); font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
  transition: color .25s;
}
html.ab-gl .ab-jump:hover, html.ab-gl .ab-jump:focus-visible { color: var(--cobalt); }

@media (max-width: 640px) {
  html.ab-gl .ab-hint { bottom: 64px; }
}

@media (prefers-reduced-motion: reduce) {
  html.ab-gl .ab-hint { animation: none; opacity: 1; transform: none; }
  html.ab-gl .ab-hint i { animation: none; }
  .ab-stop a { transition: none; }
}
