/* Cryo 11 · Opus — decisions
   WORLD     One quiet light neutral world (base.css tokens: bg #f4f4f2, ink #141414). The work carries the colour.
   ACCENT    One saturated accent, "Cryo blue" #2f45ff. Contrast (computed with the WCAG formula in node, 2026-11-07):
             5.58:1 as text on #f4f4f2, 6.15:1 on #fff, white text on it 6.15:1 — passes 4.5:1 body text both ways.
             Used for: the primary action (Get in touch / Email Cryo), the current state (nav dot, page rail, the
             hero's active project + its timer), the process progress line, and the signature moment's cold fringe.
             Nothing else is blue. The yellow .tbc placeholder style stays as base.css defines it (not an accent).
   SIGNATURE The home stage: a WebGL liquid surface (pointer flowmap + chromatic split + accent fringe) that you
             can drag between projects; progress follows the finger, release hands its velocity to a spring.
             The same program draws every work picture on desktop through ONE fixed canvas (scroll-velocity bend).
   ORDER     One 12-column grid, one container, one spacing scale, one section rhythm (--sec). Every section opens
             with the same head row (h2 left, short line + link right). h1 once per page, h2 per section, h3 items.
             Wayfinding: nav with a current dot, a sticky "on this page" rail on long pages, a "Next" link before
             the footer of every page.
   MOTION    One authored moment per page: home = stage + pinned process; work = liquid reveals; case = rail +
             gallery reveals; services = rail indicator; about = scrubbed reading; contact = the copy chip; 404 = water (water.js: buoyant 4-0-4 digits, splashes, window-shake slosh).
   TYPE      Geist; Geist Mono only for time, URLs and data. -0.03em on display sizes, measure <= 68ch. */

/* THEME  Dark tokens (contrast on --bg #0f1013, computed in node 2026-11-07): ink #ededea 16.22:1, ink-2 #a3a49f 7.58:1,
   ink-3 #7c7d78 4.59:1, accent-ink #8592ff 6.84:1 (same hue as #2f45ff: 233.6 vs 233.7 deg). Filled accent buttons keep
   #2f45ff with white text (6.15:1) in both themes. Light accent-ink = #2f45ff (5.58:1 on #f4f4f2). */
:root {
  --accent-ink: #2f45ff; --stage-bg: #e9e9e5; --shine: rgba(255, 255, 255, 0.6); --scrim: rgba(244, 244, 242, 0.6);
  --chrome: rgba(255, 255, 255, 0.72); --chrome-line: rgba(20, 20, 20, 0.07); --hover: #ebebe7; --cta-bg: #141414; --cta-fg: #ffffff;
  --tbc-bg: #fff1b8; --scroll: #c8c8c3;
  --accent: #2f45ff; --accent-press: #2536e6; --accent-soft: rgba(47, 69, 255, 0.1);
  --skel: #e8e8e4;
  --gut: clamp(20px, 4vw, 48px);
  --wrap: min(1320px, 100% - 2 * var(--gut));
  --gap: clamp(16px, 2vw, 24px);
  --sec: clamp(72px, 8vw, 120px);
  --hd: 72px;
}
:root[data-theme="dark"] { --bg: #0f1013; --surface: #17181c; --ink: #ededea; --ink-2: #a3a49f; --ink-3: #7c7d78; --line: #2a2b31; --skel: #1c1d22;
    --accent-ink: #8592ff; --stage-bg: #16171b; --shine: rgba(255, 255, 255, 0.05); --scrim: rgba(15, 16, 19, 0.6);
    --chrome: rgba(23, 24, 28, 0.74); --chrome-line: rgba(255, 255, 255, 0.09); --hover: #23242a; --cta-bg: #1b1c21; --cta-fg: #ededea;
    --tbc-bg: #3d3417; --scroll: #3a3b41; --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.5), 0 6px 20px rgba(0, 0, 0, 0.35); --shadow-2: 0 2px 6px rgba(0, 0, 0, 0.5), 0 24px 60px rgba(0, 0, 0, 0.55);
    color-scheme: dark; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --bg: #0f1013; --surface: #17181c; --ink: #ededea; --ink-2: #a3a49f; --ink-3: #7c7d78; --line: #2a2b31; --skel: #1c1d22;
    --accent-ink: #8592ff; --stage-bg: #16171b; --shine: rgba(255, 255, 255, 0.05); --scrim: rgba(15, 16, 19, 0.6);
    --chrome: rgba(23, 24, 28, 0.74); --chrome-line: rgba(255, 255, 255, 0.09); --hover: #23242a; --cta-bg: #1b1c21; --cta-fg: #ededea;
    --tbc-bg: #3d3417; --scroll: #3a3b41; --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.5), 0 6px 20px rgba(0, 0, 0, 0.35); --shadow-2: 0 2px 6px rgba(0, 0, 0, 0.5), 0 24px 60px rgba(0, 0, 0, 0.55);
    color-scheme: dark; } }

/* type weight: the user asked for a bit bolder — body 450, nav 500, buttons/headings 600 (Geist variable 400..700) */
html { font-weight: 450; }
.btn { font-weight: 600; }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline-color: var(--accent-ink); }
body { display: flex; flex-direction: column; }
main { flex: 1; }
.wrap { width: var(--wrap); margin-inline: auto; }
.g12 { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); }
h1, h2, h3 { font-weight: 600; text-wrap: balance; }
h1 { font-size: clamp(40px, 6.2vw, 92px); line-height: 0.98; letter-spacing: -0.035em; }
h2 { font-size: clamp(28px, 3.2vw, 46px); line-height: 1.04; letter-spacing: -0.03em; }
h3 { font-size: 19px; line-height: 1.3; letter-spacing: -0.012em; }
p { max-width: 68ch; }
.lead { font-size: clamp(18px, 1.7vw, 22px); line-height: 1.45; color: var(--ink-2); letter-spacing: -0.01em; max-width: 46ch; }
.muted { color: var(--ink-2); }
.skip { position: fixed; left: 12px; top: 12px; z-index: 100; clip-path: inset(50%); background: var(--ink); color: var(--bg); padding: 12px 16px; border-radius: 12px; text-decoration: none; }
.skip:focus { clip-path: none; }

/* buttons: accent = the primary action on the page; press feedback is a spring in site.js (CSS scale as fallback) */
.btn { gap: 10px; }
.btn.accent { background: var(--accent); color: #fff; }
.btn.accent:hover { background: var(--accent-press); }
.btn.line { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.btn.line:hover { background: var(--surface); }
html.mo .btn, html.mo .next { transition: background-color 200ms ease-out, color 200ms ease-out; }
.btn .icon { transition: transform 300ms var(--ease-out); }
.btn:hover .icon { transform: translateX(2px); }
.btn.sm { min-height: 44px; padding: 0 14px; font-size: 14px; }
.tlink { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 600; text-decoration: none; }
.tlink:hover { text-decoration: underline; }
.copy { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 8px 0 16px; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); font-family: var(--mono); font-size: 14px; }
.copy button { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border-radius: 999px; font: 600 13px/1 var(--font); background: var(--bg); }
.copy button:hover { background: var(--hover); }
.copy button.ok { background: var(--accent); color: #fff; }

/* ------------------------------------------------------------------ header */
.hd { position: fixed; inset: 0 0 auto; z-index: 30; pointer-events: none; }
.hd-in { width: var(--wrap); margin-inline: auto; height: var(--hd); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.hd-in > * { pointer-events: auto; }
.brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 600; font-size: 16px; text-decoration: none; letter-spacing: -0.01em; }
.tile { width: 32px; height: 32px; border-radius: 9px; background: #141414; box-shadow: inset 0 0 0 1px var(--chrome-line); display: grid; place-items: center; flex: none; }
.pill { position: absolute; left: 50%; translate: -50% 0; display: flex; gap: 2px; padding: 2px; border-radius: 999px;
  background: var(--chrome); backdrop-filter: blur(16px) saturate(170%); -webkit-backdrop-filter: blur(16px) saturate(170%);
  box-shadow: 0 0 0 1px var(--chrome-line), 0 8px 24px rgba(0, 0, 0, 0.06); }
.pill a { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 0 16px; border-radius: 999px; text-decoration: none; font-size: 14.5px; font-weight: 500; color: var(--ink-2); transition: color 200ms; }
.pill a:hover, .pill a[aria-current="page"] { color: var(--ink); }
.pill a[aria-current="page"]::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent-ink); }
.pill .ind { position: absolute; z-index: 0; top: 2px; left: 0; height: 44px; width: 10px; border-radius: 999px; background: var(--chrome-line); opacity: 0; pointer-events: none; }
.pill .chev { position: relative; z-index: 1; width: 44px; min-height: 44px; margin-left: -14px; display: grid; place-items: center; border-radius: 999px; color: var(--ink-2); }
.pill .chev:hover { color: var(--ink); }
.pill .chev svg { width: 14px; height: 14px; transition: transform 300ms var(--ease-out); }
.pill .chev[aria-expanded="true"] svg { transform: rotate(180deg); }
.wm { position: fixed; top: calc(var(--hd) - 6px); left: 50%; translate: -50% 0; width: min(720px, 100% - 48px); z-index: 31; pointer-events: auto; visibility: hidden;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 10px; padding: 10px; border-radius: 20px; background: #161616; color: #fff; box-shadow: var(--shadow-2), inset 0 0 0 1px var(--chrome-line); }
.wm ul { list-style: none; display: flex; flex-direction: column; gap: 2px; }
.wm li a { display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 12px; min-height: 52px; padding: 8px 12px; border-radius: 12px; text-decoration: none; transition: background-color 200ms; }
.wm li a b { font-weight: 600; font-size: 15px; letter-spacing: -0.01em; }
.wm li a small { grid-row: 2; font-size: 12.5px; color: #a3a39e; }
.wm li a .icon { grid-row: 1 / span 2; grid-column: 2; opacity: 0; transform: translateX(-4px); transition: opacity 200ms, transform 300ms var(--ease-out); }
.wm li a.on { background: rgba(255, 255, 255, 0.08); }
.wm li a.on .icon { opacity: 1; transform: none; }
.wm li a:focus-visible, .wm .all a:focus-visible { outline-color: #fff; }
.wm .pv { position: relative; display: block; border-radius: 12px; overflow: hidden; background: #262626; min-height: 260px; }
.wm .pv img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; opacity: 0; transform: scale(1.04); transition: opacity 320ms ease-out, transform 700ms var(--ease-out); }
.wm .pv img.on { opacity: 1; transform: none; }
.wm .pv .n { position: absolute; left: 10px; bottom: 10px; font-family: var(--mono); font-size: 12px; padding: 5px 9px; border-radius: 999px; background: rgba(20, 20, 20, 0.72); color: #fff; }
.wm .all { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; padding: 0 4px 0 12px; font-size: 13px; color: #a3a39e; }
.wm .all a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 8px; color: #fff; text-decoration: none; font-weight: 600; }
@media (max-width: 860px) { .wm { display: none; } }
.hd-r { display: flex; align-items: center; gap: 14px; }
.hd .time { color: var(--ink-2); white-space: nowrap; }
/* floating chrome over content: the brand and the clock get the same frosted pill as the nav */
.hd .brand, .hd .time { border-radius: 999px; background: var(--chrome); backdrop-filter: blur(16px) saturate(170%); -webkit-backdrop-filter: blur(16px) saturate(170%); box-shadow: 0 0 0 1px var(--chrome-line); }
.hd .brand { padding: 0 16px 0 6px; }
.hd .time { display: inline-flex; align-items: center; gap: 0.6ch; min-height: 44px; padding: 0 14px; }
@media (prefers-reduced-transparency: reduce) { .hd .brand, .hd .time { background: #fff; backdrop-filter: none; } }
.menu { display: none; min-height: 44px; padding: 0 16px; border-radius: 999px; background: var(--chrome); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: 0 0 0 1px var(--chrome-line); font-weight: 600; font-size: 14.5px; align-items: center; gap: 8px; }
@media (max-width: 1020px) { .hd .time { display: none; } }
@media (max-width: 860px) {
  .pill, .hd .btn { display: none; }
  .menu { display: inline-flex; }
}
@media (prefers-reduced-transparency: reduce) { .pill, .menu { background: #fff; backdrop-filter: none; } }

/* loader: real progress (fonts, first pictures, first textures) */
.loadbar { position: fixed; inset: 0 0 auto; height: 2px; z-index: 90; background: var(--accent-ink); transform-origin: 0 50%; transform: scaleX(0); opacity: 0; pointer-events: none; transition: opacity 300ms; }
.loadbar.on { opacity: 1; }

/* ------------------------------------------------------------------ contact sheet (grows from its trigger) */
.scrim { position: fixed; inset: 0; z-index: 38; background: var(--scrim); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); opacity: 0; visibility: hidden; }
.sheet { position: fixed; z-index: 40; top: 12px; right: max(12px, calc((100% - 1320px) / 2 - 8px)); width: min(400px, 100% - 24px);
  background: var(--surface); border-radius: 20px; box-shadow: var(--shadow-2); padding: 20px; visibility: hidden; transform-origin: 100% 0; }
.sheet .x { position: absolute; top: 12px; right: 12px; width: 44px; height: 44px; border-radius: 999px; display: grid; place-items: center; background: var(--bg); }
.sheet .x:hover { background: var(--hover); }
.sheet-in > * + * { margin-top: 16px; }
.sheet h2 { font-size: 22px; letter-spacing: -0.02em; padding-right: 52px; }
.sheet nav { display: none; border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.sheet nav a { display: flex; align-items: center; justify-content: space-between; min-height: 48px; font-size: 22px; font-weight: 600; letter-spacing: -0.02em; text-decoration: none; }
.sheet nav a[aria-current="page"] { color: var(--accent-ink); }
.sheet .rows a { display: flex; align-items: center; gap: 10px; min-height: 44px; text-decoration: none; color: var(--ink); border-top: 1px solid var(--line); }
.sheet .rows a span { margin-left: auto; color: var(--ink-2); font-family: var(--mono); font-size: 13px; }
.sheet .rows a:hover { color: var(--accent-ink); }
.sheet .copy { width: 100%; justify-content: space-between; }
.sheet .acts { display: flex; gap: 8px; flex-wrap: wrap; }
.sheet .acts .btn { flex: 1; justify-content: center; }
.sheet .time { color: var(--ink-2); }
@media (max-width: 860px) { .sheet nav { display: block; } }

/* ------------------------------------------------------------------ media + skeletons */
.media { position: relative; display: block; border-radius: 16px; overflow: hidden; background: var(--skel); aspect-ratio: var(--ar, 16 / 10); max-width: 100%; }
.media::before { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 25%, var(--shine) 50%, transparent 75%); background-size: 220% 100%; animation: shimmer 1.5s linear infinite; }
.media.loaded::before { animation: none; opacity: 0; transition: opacity 400ms; }
.media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; filter: blur(14px); transform: scale(1.03);
  transition: opacity 600ms var(--ease-out), filter 700ms var(--ease-out), transform 900ms var(--ease-out); }
.media.loaded img { opacity: 1; filter: none; transform: none; }
.media.gl img { opacity: 0 !important; }
@keyframes shimmer { from { background-position: 160% 0; } to { background-position: -60% 0; } }
.liquid { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.liquid.fixed { position: fixed; z-index: 5; }

/* ------------------------------------------------------------------ section rhythm */
.sec { padding-block: var(--sec) 0; }
.sh { align-items: end; row-gap: 16px; margin-bottom: clamp(32px, 4vw, 56px); }
.sh h2 { grid-column: 1 / span 6; }
.sh .side { grid-column: 8 / -1; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; color: var(--ink-2); }
.page-head { padding-top: calc(var(--hd) + clamp(48px, 8vw, 112px)); }
.page-head h1 { grid-column: 1 / span 9; }
.page-head .lead { grid-column: 1 / span 7; margin-top: clamp(20px, 2.4vw, 32px); }
.crumb { grid-column: 1 / -1; display: flex; gap: 8px; align-items: center; margin-bottom: 20px; color: var(--ink-2); font-size: 14px; }
.crumb a { text-decoration: none; color: var(--ink-2); min-height: 44px; display: inline-flex; align-items: center; gap: 6px; }
.crumb a:hover { color: var(--ink); }

/* ------------------------------------------------------------------ home: hero */
.hero { padding-top: calc(var(--hd) + 16px); }
.hero .g12 { min-height: min(calc(100svh - var(--hd) - 40px), 820px); row-gap: 24px; }
.hero-l { grid-column: 1 / span 4; display: flex; flex-direction: column; justify-content: space-between; gap: 32px; padding-block: 24px 4px; }
.hero h1 { font-size: clamp(34px, 3.5vw, 54px); line-height: 1.04; letter-spacing: -0.032em; }
.hero h1 .g { color: var(--ink-3); }
.hero h1 .w { display: inline-block; }
.plist { list-style: none; border-top: 1px solid var(--line); }
.plist button { width: 100%; display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; min-height: 48px; text-align: left; border-bottom: 1px solid var(--line); position: relative; color: var(--ink-2); transition: color 200ms; }
.plist button b { font-weight: 600; }
.plist button small { font-size: 13px; color: var(--ink-3); }
.plist button:hover, .plist button[aria-current="true"] { color: var(--ink); }
.plist button[aria-current="true"] b { color: var(--accent-ink); }
.plist .bar { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--accent-ink); transform-origin: 0 50%; transform: scaleX(0); }
.hero-acts { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.hero-acts .pause { width: 44px; height: 44px; border-radius: 999px; display: grid; place-items: center; box-shadow: inset 0 0 0 1px var(--line); margin-left: auto; }
.hero-acts .pause:hover { background: var(--surface); }
.stage { grid-column: 5 / -1; position: relative; border-radius: 20px; overflow: hidden; background: var(--skel); touch-action: pan-y; cursor: grab; user-select: none; -webkit-user-select: none; min-height: 420px; }
.stage.drag { cursor: grabbing; }
.stage::before { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 25%, var(--shine) 50%, transparent 75%); background-size: 220% 100%; animation: shimmer 1.5s linear infinite; }
.stage.loaded::before { animation: none; opacity: 0; transition: opacity 400ms; }
.stage > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: 0; transition: opacity 600ms var(--ease-out), filter 600ms var(--ease-out); filter: blur(12px); }
.stage > img.on { opacity: 1; filter: none; }
.stage.gl > img { display: none; }
.stage .tag { position: absolute; left: 16px; bottom: 16px; z-index: 2; display: flex; align-items: center; gap: 10px; padding: 8px 14px 8px 8px; border-radius: 999px; font-size: 14px;
  background: var(--chrome); backdrop-filter: blur(14px) saturate(160%); -webkit-backdrop-filter: blur(14px) saturate(160%); box-shadow: var(--shadow-1); pointer-events: none; }
.stage .tag .mono { color: var(--ink-2); font-size: 12px; }
.stage .tag i { width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: var(--bg); display: grid; place-items: center; font-style: normal; }
.stage .hint { position: absolute; right: 16px; bottom: 16px; z-index: 2; font-size: 12px; color: #fff; background: rgba(20, 20, 20, 0.55); padding: 6px 10px; border-radius: 999px; pointer-events: none; }

/* intro (first visit per session, home only) */
.intro-ov { display: none; }
html.intro .intro-ov, .intro-ov.run { display: block; position: fixed; inset: 0; z-index: 95; background: var(--bg); overflow: hidden; }
html.intro body > :not(.intro-ov):not(script) { visibility: hidden; }
/* 2D kinetic title (intro.js): ink #090a0e (the stage's first frame), accent #2f45ff, paper = the page ground */
.intro-ov .k { position: absolute; inset: 0; }
.kf { position: absolute; inset: 0; }
.kf-ink { background: #090a0e; clip-path: inset(0% 100% 0% 0%); }
.kf-acc { background: var(--accent); clip-path: polygon(0% 0%, 0% 0%, -20% 100%, 0% 100%); }
.kc { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 3vmin; color: #f4f4f2; }
.km { position: relative; width: min(17vmin, 150px); aspect-ratio: 1; flex: none; }
.kmf { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.kw { display: flex; font-size: min(21vmin, 200px); font-weight: 700; letter-spacing: -0.05em; line-height: 1; transform-origin: 30% 50%; }
.kl { display: inline-block; overflow: hidden; padding: 0 0.02em 0.1em; }
.kl > span { display: inline-block; }
.ks { position: absolute; left: 0; right: 0; top: calc(50% + min(14vmin, 128px)); height: 1.4em; text-align: center; font-size: min(5vmin, 34px); font-weight: 600; letter-spacing: -0.02em; color: #f4f4f2; }
.ks > span { position: absolute; inset: 0; overflow: hidden; }
.ks > span > span { display: inline-block; }
.kshots { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 2vmin; pointer-events: none; }
.kshot { width: min(27vw, 400px); aspect-ratio: 16 / 10; border-radius: 12px; overflow: hidden; clip-path: inset(50%); box-shadow: 0 30px 60px rgba(0, 0, 0, 0.35); }
.kshot img { width: 100%; height: 100%; object-fit: cover; }
@media (max-aspect-ratio: 3 / 4) { .kc, .kshots { flex-direction: column; } .kshot { width: 64vw; } .ks { top: calc(50% + 30vmin); } }
.intro-ov .ip { position: absolute; left: 50%; bottom: 40px; width: 120px; margin-left: -60px; height: 2px; background: rgba(127, 127, 127, 0.3); overflow: hidden; border-radius: 2px; }
.intro-ov .ip i { display: block; height: 100%; background: var(--accent-ink); transform-origin: 0 50%; transform: scaleX(0); }
.intro-ov .iskip { position: absolute; z-index: 2; right: max(20px, env(safe-area-inset-right)); bottom: 22px; min-height: 44px; padding: 0 18px; border-radius: 999px; font-size: 14px; font-weight: 600; color: #f4f4f2; background: rgba(9, 10, 14, 0.72); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2); }
.intro-ov .iskip:hover { background: rgba(9, 10, 14, 0.9); }
.intro-ov .iskip:focus-visible { outline-color: #fff; }

/* home: work grid */
.wgrid { list-style: none; row-gap: clamp(36px, 4vw, 56px); }
.wgrid > li { grid-column: span 6; }
.card { display: block; text-decoration: none; color: inherit; }
.card .cap { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; margin-top: 16px; align-items: baseline; }
.card .cap b { font-size: 19px; font-weight: 600; letter-spacing: -0.015em; }
.card .cap .mono { color: var(--ink-2); }
.card .cap p { grid-column: 1 / -1; color: var(--ink-2); font-size: 15px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card:hover .cap b { text-decoration: underline; text-underline-offset: 4px; }
.card:focus-visible { outline-offset: 6px; border-radius: 18px; }

/* services overview */
.svc { list-style: none; row-gap: var(--gap); }
.svc > li { grid-column: span 3; }
.svc a { display: flex; flex-direction: column; gap: 10px; height: 100%; min-height: 220px; padding: 24px; border-radius: 16px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); text-decoration: none; transition: box-shadow 200ms; }
.svc a:hover { box-shadow: inset 0 0 0 1px var(--ink-3); }
.svc p { color: var(--ink-2); }
.svc .go { margin-top: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; }
.svc a:hover .go { color: var(--accent-ink); }

/* process (pinned + scrubbed on desktop) */
.proc { position: relative; }
.steps { list-style: none; row-gap: 32px; position: relative; padding-top: 28px; counter-reset: s; }
.steps::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--line); }
.steps .fill { position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--accent-ink); transform-origin: 0 50%; transform: scaleX(1); }
.steps li { grid-column: span 2; counter-increment: s; transition: opacity 400ms var(--ease-out); }
.steps li::before { content: counter(s, decimal-leading-zero); display: block; font-family: var(--mono); font-size: 13px; color: var(--ink-2); margin-bottom: 10px; }
.steps h3 { margin-bottom: 6px; }
.steps p { color: var(--ink-2); font-size: 15px; }
html.mo .steps.scrub li { opacity: 0.32; }
html.mo .steps.scrub li.on { opacity: 1; }
html.mo .steps.scrub .fill { transform: scaleX(0); }

/* scrubbed reading */
.read { font-size: clamp(24px, 2.8vw, 40px); line-height: 1.22; letter-spacing: -0.025em; font-weight: 550; max-width: 30ch; }
.read .w { color: var(--ink); }
html.mo .read.scrub .w { color: color-mix(in srgb, var(--ink) calc(var(--k, 0) * 100%), var(--ink-3)); }
.about-s .read { grid-column: 1 / span 9; }
.about-s .tlink { grid-column: 1 / -1; margin-top: 24px; }

/* CTA */
.cta { padding-block: var(--sec); }
.cta-box { border-radius: 20px; background: var(--cta-bg); color: var(--cta-fg); box-shadow: inset 0 0 0 1px var(--chrome-line); padding: clamp(32px, 6vw, 88px); row-gap: 32px; }
.cta-box h2 { grid-column: 1 / span 8; font-size: clamp(36px, 5vw, 72px); letter-spacing: -0.035em; line-height: 1; }
.cta-box .acts { grid-column: 1 / -1; display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.cta-box .copy { background: rgba(255, 255, 255, 0.08); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16); color: #fff; }
.cta-box .copy button { background: rgba(255, 255, 255, 0.12); color: #fff; }
.cta-box .copy button:hover { background: rgba(255, 255, 255, 0.2); }
.cta-box .copy button.ok { background: var(--accent); }
.cta-box .tlink { color: var(--cta-fg); }
.cta-box .btn.accent:focus-visible, .cta-box a:focus-visible, .cta-box button:focus-visible { outline-color: #fff; }

/* next page */
.cta + .wrap .next { margin-top: 0; }
.next { display: flex; align-items: center; gap: 20px; padding-block: clamp(28px, 4vw, 48px); border-top: 1px solid var(--line); text-decoration: none; margin-top: var(--sec); }
.next .l { color: var(--ink-2); font-size: 15px; min-width: 64px; }
.next .t { font-size: clamp(32px, 4.4vw, 64px); font-weight: 600; letter-spacing: -0.035em; line-height: 1; }
.next .icon { width: clamp(28px, 3vw, 44px); height: clamp(28px, 3vw, 44px); margin-left: auto; stroke-width: 1.5; transition: transform 400ms var(--ease-out); }
.next:hover .t { color: var(--accent-ink); }
.next:hover .icon { transform: translateX(6px); color: var(--accent-ink); }

/* ------------------------------------------------------------------ work page */
.wrows { list-style: none; }
.wrow { padding-block: clamp(32px, 4vw, 56px); border-top: 1px solid var(--line); row-gap: 24px; align-items: start; }
.wrow .media-l { grid-column: 1 / span 8; display: block; }
.wrow .txt { grid-column: 9 / -1; display: flex; flex-direction: column; gap: 14px; align-self: stretch; position: relative; }
.wrow .meta { margin-top: auto; }
.wrow h2 { font-size: clamp(26px, 2.6vw, 38px); }
.wrow .k { color: var(--ink-2); margin-top: -8px; }
.meta { display: grid; grid-template-columns: auto 1fr; gap: 8px 20px; font-size: 14px; padding-block: 16px; border-block: 1px solid var(--line); }
.meta dt { color: var(--ink-2); }
.meta dd { font-weight: 600; }
.wrow .acts { display: flex; gap: 8px; flex-wrap: wrap; }
/* work list skeleton: the same row, with bars standing in for the text until that row's picture is ready */
.skel-page { display: none; }
.js .skel-page { display: block; }
.skl { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 12px; pointer-events: none; opacity: 0; transition: opacity 400ms ease-out; }
.txt > .skl:only-child { position: static; }
.skl i { display: block; height: 14px; border-radius: 6px; background: var(--skel) linear-gradient(100deg, transparent 25%, var(--shine) 50%, transparent 75%) 0 0 / 220% 100%; animation: shimmer 1.5s linear infinite; }
.skl .t { height: 34px; width: 62%; margin-bottom: 4px; }
.skl .k { width: 30%; margin-bottom: 8px; }
.skl .s { width: 70%; }
.skl .m { height: 76px; margin-top: 8px; }
.skl .b { height: 44px; width: 60%; border-radius: 999px; }
.wrow.wait .skl { opacity: 1; }
.wrow .txt > :not(.skl) { transition: opacity 500ms var(--ease-out), filter 600ms var(--ease-out), transform 600ms var(--ease-out); }
.wrow.wait .txt > :not(.skl) { opacity: 0; filter: blur(8px); transform: translateY(6px); }
@media (prefers-reduced-motion: reduce) { .skl i { animation: none; } .wrow.wait .txt > :not(.skl) { filter: none; transform: none; } }
.status { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line); color: var(--ink-2); font-size: 14px; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); }

/* ------------------------------------------------------------------ rail pages (case, services) */
.railed { align-items: start; }
.rail-c { grid-column: 1 / span 3; align-self: stretch; padding-top: calc(var(--hd) + clamp(48px, 8vw, 112px)); }
.rail { position: sticky; top: calc(var(--hd) + 40px); padding-right: 24px; }
.rail ol { list-style: none; position: relative; border-left: 1px solid var(--line); }
.rail a { display: flex; align-items: center; min-height: 40px; padding-left: 16px; text-decoration: none; color: var(--ink-2); font-size: 14.5px; transition: color 200ms; }
.rail a:hover, .rail a.on { color: var(--ink); }
.rail .ri { position: absolute; left: -1px; top: 0; width: 2px; height: 40px; background: var(--accent-ink); }
.rail p { margin-top: 20px; font-size: 13px; color: var(--ink-2); }
.railed > .body { grid-column: 4 / -1; min-width: 0; }
.railed .sec:first-child { padding-top: var(--sec); }
.block { padding-top: var(--sec); scroll-margin-top: calc(var(--hd) + 24px); }
.block > h2 { margin-bottom: 24px; }
.two { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); column-gap: var(--gap); row-gap: 20px; }
.two > h2 { grid-column: 1 / span 3; font-size: clamp(24px, 2.2vw, 32px); }
.two > .c { grid-column: 4 / -1; }

/* case */
.case-head .sum { grid-column: 1 / span 8; margin-top: 28px; font-size: clamp(20px, 1.9vw, 26px); line-height: 1.4; letter-spacing: -0.015em; }
.facts { grid-column: 1 / -1; margin-top: clamp(36px, 5vw, 64px); display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--gap); border-top: 1px solid var(--line); padding-top: 20px; font-size: 14px; }
.facts dt { color: var(--ink-2); margin-bottom: 4px; }
.facts dd { font-weight: 600; }
.facts dd a { color: var(--accent-ink); overflow-wrap: anywhere; }
.facts dd a .icon { display: inline-block; vertical-align: -2px; margin-left: 4px; }
.case-hero { margin-top: clamp(32px, 4vw, 56px); }
.big { font-size: clamp(20px, 1.8vw, 24px); line-height: 1.45; letter-spacing: -0.012em; }
.built { list-style: none; counter-reset: b; }
.built li { counter-increment: b; display: grid; grid-template-columns: 40px 1fr; gap: 12px; padding-block: 16px; border-top: 1px solid var(--line); }
.built li::before { content: counter(b, decimal-leading-zero); font-family: var(--mono); font-size: 13px; color: var(--ink-2); padding-top: 3px; }
.stat { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
.stat div { padding: 20px; border-radius: 16px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.stat dt { font-size: 14px; color: var(--ink-2); }
.stat dd { font-size: clamp(22px, 2.2vw, 32px); font-weight: 600; letter-spacing: -0.025em; margin-top: 8px; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { padding: 8px 14px; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); font-size: 14px; }
.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(28px, 3vw, 40px) var(--gap); }
.gallery figure { grid-column: span 2; }
.gallery figure.half { grid-column: span 1; }
.gallery figcaption { margin-top: 12px; font-size: 14px; color: var(--ink-2); }
.phone-row { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); column-gap: var(--gap); align-items: center; row-gap: 24px; }
.phone-row .c { grid-column: 1 / span 4; }
.phone { grid-column: 6 / span 3; justify-self: center; width: min(280px, 100%); padding: 10px; border-radius: 46px; background: #0b0b0c; box-shadow: var(--shadow-2), inset 0 0 0 1px var(--chrome-line); }
.phone .media { border-radius: 36px; --ar: 780 / 1688; }

/* services page */
.svc-full .incl { list-style: none; margin-top: 20px; display: grid; gap: 0; }
.svc-full .incl li { display: flex; gap: 12px; align-items: flex-start; padding-block: 12px; border-top: 1px solid var(--line); }
.svc-full .incl .icon { margin-top: 4px; color: var(--accent-ink); }
.svc-full .c > p + p { margin-top: 16px; }
.svc-full .c .short { font-size: clamp(20px, 1.8vw, 24px); letter-spacing: -0.015em; margin-bottom: 16px; color: var(--ink); }
.svc-full .c p { color: var(--ink-2); }
.vsteps { list-style: none; counter-reset: s; }
.vsteps li { counter-increment: s; display: grid; grid-template-columns: 48px 1fr 2fr; gap: 16px; padding-block: 18px; border-top: 1px solid var(--line); align-items: baseline; }
.vsteps li::before { content: counter(s, decimal-leading-zero); font-family: var(--mono); font-size: 13px; color: var(--ink-2); }
.vsteps p { color: var(--ink-2); }

/* about */
.about-intro .read { grid-column: 1 / span 10; }
.about-intro .read + .read { margin-top: 0.8em; }
.side-l { list-style: none; }
.side-l li { display: grid; grid-template-columns: 1fr 2fr; gap: 16px; padding-block: 18px; border-top: 1px solid var(--line); align-items: baseline; }
.side-l b { font-weight: 600; font-size: 19px; letter-spacing: -0.015em; }
.side-l a { display: inline-flex; align-items: center; gap: 6px; }
.side-l p { color: var(--ink-2); }

/* contact */
.contact-g { row-gap: 48px; }
.contact-g .main { grid-column: 1 / span 7; }
.contact-g .aside { grid-column: 9 / -1; }
.mailbig { font-size: clamp(28px, 4.2vw, 60px); font-weight: 600; letter-spacing: -0.035em; line-height: 1; word-break: break-all; text-decoration: none; display: inline-block; }
.mailbig:hover { color: var(--accent-ink); }
.contact-g .acts { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 28px; }
.ask { list-style: none; counter-reset: a; }
.ask li { counter-increment: a; display: grid; grid-template-columns: 40px 1fr; padding-block: 14px; border-top: 1px solid var(--line); }
.ask li::before { content: counter(a, decimal-leading-zero); font-family: var(--mono); font-size: 13px; color: var(--ink-2); padding-top: 3px; }
.routes { list-style: none; }
.routes li { border-top: 1px solid var(--line); }
.routes a, .routes .row { display: flex; align-items: center; gap: 12px; min-height: 56px; text-decoration: none; }
.routes a span, .routes .row span { margin-left: auto; color: var(--ink-2); font-family: var(--mono); font-size: 13px; }
.routes a:hover { color: var(--accent-ink); }

/* ------------------------------------------------------------------ footer */
.ft { padding-block: 48px 72px; border-top: 1px solid var(--line); font-size: 14px; }
.ft-g { row-gap: 32px; }
.ft-b { grid-column: 1 / span 4; }
.ft-b p { color: var(--ink-2); margin-top: 8px; }
.ft h2 { font-size: 13px; font-weight: 500; letter-spacing: 0; color: var(--ink-2); margin-bottom: 8px; }
.ft nav { grid-column: 6 / span 2; }
.ft nav a, .ft .out a { display: flex; align-items: center; gap: 8px; min-height: 36px; text-decoration: none; }
.ft nav a:hover, .ft .out a:hover { text-decoration: underline; }
.ft nav a[aria-current="page"] { color: var(--accent-ink); }
.ft .out { grid-column: 8 / span 3; }
.ft .clock { grid-column: 11 / -1; }
.ft .clock p { font-family: var(--mono); font-size: 13px; }
.ft .copy { margin-top: 8px; font-size: 13px; }

/* ------------------------------------------------------------------ 404 (water.js) */
/* a night scene: text on #07090f-#0c121c measured 17.0:1 (#f4f4f2), 10.2:1 (lead #b9bfcc), 7.3:1 (code #9aa2b4) */
.nf { position: relative; min-height: 100svh; overflow: hidden; color: #f4f4f2; background: linear-gradient(180deg, #06070b 0%, #0a0e16 55%, #0c121c 100%); }
.nf .lead { color: #b9bfcc; }
.nf .btn.line { color: #f4f4f2; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.26); }
.nf .btn.line:hover { background: rgba(255, 255, 255, 0.08); }
.nf :focus-visible { outline-color: #fff; }
.nf .sound { position: absolute; z-index: 2; right: max(16px, env(safe-area-inset-right)); bottom: 20px; }
.nf canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; }
.nf canvas.over { cursor: grab; }
.nf canvas.grabbing { cursor: grabbing; }
.nf-copy { position: relative; z-index: 1; padding-top: calc(var(--hd) + clamp(32px, 6vw, 88px)); }
.nf-copy .code { font-family: var(--mono); font-size: 14px; color: #9aa2b4; margin-bottom: 16px; }
.nf-copy .lead { margin-top: 20px; }
.nf-copy .acts { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 28px; }

/* ------------------------------------------------------------------ responsive */
@media (max-width: 1020px) {
  .hero-l { grid-column: 1 / -1; padding-block: 16px 0; }
  .hero .g12 { min-height: 0; }
  .stage { grid-column: 1 / -1; grid-row: 2; aspect-ratio: 4 / 3; min-height: 0; }
  .hero-l { display: contents; }
  .hero h1 { grid-column: 1 / -1; grid-row: 1; padding-top: 16px; max-width: 22ch; }
  .hero-pick { grid-column: 1 / -1; grid-row: 3; display: flex; flex-direction: column; gap: 20px; }
  .svc > li { grid-column: span 6; }
  .steps li { grid-column: span 4; }
  .rail-c { display: none; }
  .railed > .body { grid-column: 1 / -1; }
  .two { grid-template-columns: 1fr; }
  .two > h2, .two > .c { grid-column: 1 / -1; }
  .phone-row { grid-template-columns: 1fr; }
  .phone-row .c, .phone { grid-column: 1 / -1; }
  .ft-b { grid-column: 1 / -1; }
  .ft nav { grid-column: 1 / span 4; }
  .ft .out { grid-column: 5 / span 5; }
  .ft .clock { grid-column: 10 / -1; }
}
@media (max-width: 720px) {
  .g12 > * { grid-column: 1 / -1 !important; }
  .sh .side { grid-column: 1 / -1; }
  .stage { aspect-ratio: 4 / 3.4; }
  .stage .hint { display: none; }
  .wrow .meta { margin-top: 0; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 16px; }
  .stat { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr; }
  .gallery figure, .gallery figure.half { grid-column: 1 / -1; }
  .vsteps li { grid-template-columns: 40px 1fr; }
  .vsteps li p { grid-column: 2; }
  .side-l li { grid-template-columns: 1fr; gap: 4px; }
  .next .l { display: none; }
  .ft { padding-bottom: 88px; }
  .card .cap { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .media::before, .stage::before { animation: none; }
  .media img, .stage img { filter: none; transform: none; }
}
main:focus { outline: none; }

/* ------------------------------------------------------------------ theme plumbing */
html { scrollbar-color: var(--scroll) transparent; }
.btn { color: var(--bg); }
.btn:hover { background: color-mix(in srgb, var(--ink) 84%, var(--bg)); }
.tbc { background: var(--tbc-bg); box-shadow: 0 0 0 2px var(--tbc-bg); }
.proto-back { background: var(--chrome); color: var(--ink-2); }
.theme-t { width: 44px; height: 44px; border-radius: 999px; display: grid; place-items: center; color: var(--ink); background: var(--chrome); box-shadow: 0 0 0 1px var(--chrome-line); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.theme-t:hover { background: var(--hover); }
.theme-row { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; border-top: 1px solid var(--line); text-align: left; }
.theme-row[aria-pressed="true"] span::after { content: " on"; color: var(--ink-2); }
html.theming::view-transition-old(root) { animation: 240ms ease-out both theme-out; }
html.theming::view-transition-new(root) { animation: 240ms ease-out both theme-in; }
@keyframes theme-out { to { opacity: 0; } }
@keyframes theme-in { from { opacity: 0; } }

/* ------------------------------------------------------------------ edge modes of the home stage (prototype: five concepts) */
.stage { background: var(--stage-bg); }
.stage .amb { inset: -8%; width: 116%; height: 116%; object-fit: cover; filter: blur(36px) saturate(1.35) brightness(0.6); opacity: 1; }
.win-bar { position: absolute; z-index: 2; display: flex; align-items: center; gap: 6px; padding: 0 12px; background: var(--surface); border-radius: 10px 10px 0 0; box-shadow: inset 0 -1px 0 var(--line); pointer-events: none; }
.win-bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.win-bar span { margin-inline: auto; font-family: var(--mono); font-size: 12px; color: var(--ink-2); padding: 3px 14px; border-radius: 6px; background: var(--bg); }
.ctx { position: absolute; z-index: 2; display: flex; flex-direction: column; gap: 10px; pointer-events: none; overflow: hidden; }
.ctx b { font-size: clamp(20px, 1.9vw, 28px); font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; }
.ctx .k { color: var(--ink-2); }
.ctx dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; font-size: 14px; }
.ctx dt { color: var(--ink-2); }
.ctx ul { list-style: none; display: grid; grid-template-columns: repeat(3, 104px); gap: 8px; margin-top: auto; }
.ctx li { aspect-ratio: 16 / 10; border-radius: 8px; overflow: hidden; background: var(--skel); }
.ctx li img { width: 100%; height: 100%; object-fit: contain; }
.stage[data-edge="context"] .tag, .stage[data-edge="context"] .hint { display: none; }
.win-bar[hidden], .ctx[hidden], .stage .amb[hidden] { display: none; }
/* prototype-only panel: compare edge and page variants live (small targets on purpose, like the All heroes helper) */
.proto { position: fixed; left: calc(50% + 44px); bottom: 3px; z-index: 60; font-size: 11px; display: flex; flex-direction: column-reverse; align-items: flex-start; }
.proto summary { list-style: none; cursor: pointer; padding: 3px 10px; border-radius: 999px; background: var(--chrome); color: var(--ink-2); box-shadow: 0 0 0 1px var(--chrome-line); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); font-weight: 500; }
.proto summary::-webkit-details-marker { display: none; }
.proto[open] summary { color: var(--ink); }
.proto .row { display: flex; gap: 2px; align-items: center; padding: 2px; margin-bottom: 4px; border-radius: 999px; background: var(--chrome); box-shadow: 0 0 0 1px var(--chrome-line); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.proto .row span { padding: 0 6px 0 8px; color: var(--ink-2); min-width: 44px; }
.proto button { min-height: 24px; padding: 0 8px; border-radius: 999px; color: var(--ink-2); font-size: 11px; font-weight: 500; }
.proto button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
@media (max-width: 720px) { .proto { left: 50%; translate: -50% 0; bottom: 26px; align-items: center; } .proto .row { flex-wrap: wrap; justify-content: center; border-radius: 14px; } }

/* ------------------------------------------------------------------ page-edge variants (prototype): what the screen's sides do */
:root { --frame: #191c2b; --mside: calc((100vw - min(1320px, 100vw - 2 * var(--gut))) / 2); }
:root[data-theme="dark"] { --frame: #050506; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --frame: #050506; } }
/* a. Wide: a wider sheet, and the showcases break out to the screen edge */
html[data-page="wide"] { --wrap: min(1680px, 100% - 2 * var(--gut)); --bleed: calc((min(1680px, 100vw - 2 * var(--gut)) - 100vw) / 2); }
html[data-page="wide"] main { overflow-x: clip; }
@media (min-width: 1021px) {
  html[data-page="wide"] .stage { margin-right: var(--bleed); border-radius: 20px 0 0 20px; }
  html[data-page="wide"] .wrow .media-l { margin-left: var(--bleed); }
  html[data-page="wide"] .wrow .media-l .media { border-radius: 0 16px 16px 0; }
  html[data-page="wide"] .case-hero, html[data-page="wide"] .gallery { margin-right: var(--bleed); }
}
/* b. Rails: the margins carry wayfinding (sections left; time, project in view, progress right) */
.rails { display: none; }
@media (min-width: 1280px) {
  html[data-page="rails"] { --wrap: min(1320px, 100% - 2 * 210px); }
  html[data-page="rails"] .rails { display: block; }
}
.rails > div { position: fixed; top: 50%; translate: 0 -50%; z-index: 20; width: 160px; font-size: 12px; color: var(--ink-2); }
.rails .rl { left: 28px; }
.rails .rr { right: 28px; text-align: right; }
.rails ol { list-style: none; border-left: 1px solid var(--line); }
.rails .rl a { display: block; padding: 6px 0 6px 12px; text-decoration: none; color: var(--ink-2); }
.rails .rl a:hover { color: var(--ink); }
.rails .rl a.on { color: var(--ink); box-shadow: inset 2px 0 0 var(--accent-ink); }
.rails .rr p { margin-left: auto; margin-bottom: 14px; }
.rails .rr b { display: block; font-weight: 600; color: var(--ink); }
.rails .rr .pg { width: 2px; height: 96px; margin-left: auto; background: var(--line); position: relative; }
.rails .rr .pg i { position: absolute; inset: 0; background: var(--accent-ink); transform-origin: 50% 0; transform: scaleY(var(--p, 0)); }
/* c. Tint: the sides take a soft wash of the project in view */
@property --tr { syntax: '<number>'; inherits: false; initial-value: 128; }
@property --tg { syntax: '<number>'; inherits: false; initial-value: 128; }
@property --tb { syntax: '<number>'; inherits: false; initial-value: 128; }
.tint { display: none; position: fixed; top: 0; bottom: 0; z-index: -1; width: calc(var(--mside) + 160px); pointer-events: none; transition: --tr 0.9s, --tg 0.9s, --tb 0.9s; }
html[data-page="tint"] .tint { display: block; }
.tint-l { left: 0; background: linear-gradient(90deg, rgb(var(--tr) var(--tg) var(--tb) / 0.3), rgb(var(--tr) var(--tg) var(--tb) / 0) ); }
.tint-r { right: 0; background: linear-gradient(270deg, rgb(var(--tr) var(--tg) var(--tb) / 0.3), rgb(var(--tr) var(--tg) var(--tb) / 0) ); }
/* d. Frame: the site sits on an inset sheet inside a deep passepartout band */
.pframe { display: none; position: fixed; inset: 0; z-index: 28; pointer-events: none; overflow: hidden; }
.pframe::before { content: ""; position: absolute; inset: clamp(8px, 1vw, 16px); border-radius: 22px; box-shadow: 0 0 0 240px var(--frame); }
html[data-page="frame"] .pframe { display: block; }
/* e. Field: a calm living WebGL field in the sides only, masked off before the content column */
.pfield { display: none; position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none;
  -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(var(--mside) - 90px), transparent var(--mside), transparent calc(100% - var(--mside)), #000 calc(100% - var(--mside) + 90px), #000 100%);
  mask-image: linear-gradient(90deg, #000 0, #000 calc(var(--mside) - 90px), transparent var(--mside), transparent calc(100% - var(--mside)), #000 calc(100% - var(--mside) + 90px), #000 100%); }
html[data-page="field"] .pfield { display: block; }
