/* ==========================================================================
   Portfolio V4 - "What I bring to the table"
   (V4: built from V2. Every size is relative: rem, em, %, vw/vh, svh and cqi.)

   One accent (yellow), one ground (ink), paper only ever as a card.
   This file owns layout and the interaction layer (hover, press, focus, flip).
   site.js owns choreography (GSAP). The two never animate the same element.

   Layout modes, switched by classes site.js puts on <html>:
     (none)        flow layout: mobile, reduced motion, or no JavaScript
     .cine-hero    pinned, scrubbed hero            (>= 48rem, motion allowed)
     .cine-journey pinned, scrubbed career stepper  (>= 64rem, motion allowed)
   ========================================================================== */

/* ---------- fonts (self-hosted, variable) ---------- */
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("../fonts/bricolage-grotesque-latin.woff2") format("woff2");
  font-weight: 200 800; font-stretch: 75% 100%; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("../fonts/bricolage-grotesque-latin-ext.woff2") format("woff2");
  font-weight: 200 800; font-stretch: 75% 100%; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F,
    U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/jetbrains-mono-latin.woff2") format("woff2");
  font-weight: 400 800; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/jetbrains-mono-latin-ext.woff2") format("woff2");
  font-weight: 400 800; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F,
    U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- tokens ---------- */
:root {
  --yellow: #ffde66;
  --yellow-hi: #ffe98f;
  --yellow-lo: #f2cb45;
  --ink: #121211;
  --ink-2: #1b1b19;
  --ink-3: #2a2a27;
  --paper: #f4eedb;
  --paper-2: #e9e1c9;

  --on-ink-dim: rgba(244, 238, 219, 0.66);
  --on-ink-faint: rgba(244, 238, 219, 0.3);
  --line-ink: rgba(244, 238, 219, 0.16);
  --on-light-dim: rgba(18, 18, 17, 0.7);
  --line-light: rgba(18, 18, 17, 0.2);
  --error: #9b1c1c;

  --r-card: 1.25rem;
  --r-media: 0.75rem;
  --r-input: 0.75rem;
  --r-pill: 62.4375rem;

  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --maxw: 90rem;
  --nav-h: 4.125rem;

  /* Emil Kowalski's curves: the only curves on the site. site.js registers the same three in GSAP. */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
  --dur-press: 140ms;
  --dur-hover: 180ms;
  --dur-menu: 220ms;
  --dur-modal: 280ms;
  --dur-flip: 460ms;

  --font-sans: "Bricolage Grotesque", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  /* the playing-card corner index on the role cards: a book serif, the one place it appears */
  --font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, ui-serif, serif;
  --black: #060605;
  --suit-grey: #4a4a47;   /* the figure's suit */
  --suit-grey-hi: #5a5a56;
  --suit-red: #b3261e;
  --suit-red-hi: #ff6b5e;
  --live: #2fd36b;

  /* z-index scale: nothing else on the page sets a z-index above 4.
     The nav sits above the mobile menu so its Close button stays reachable. */
  --z-menu: 15;
  --z-nav: 20;

  interpolate-size: allow-keywords;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
/* Czech and German run long: let a long compound (Gründungsmitglied, Vermittlungsquote) break
   with a hyphen instead of pushing a column wider than the phone */
:is(p, li, dd, dt, label):is(:lang(de), :lang(cs)) {
  -webkit-hyphens: auto; hyphens: auto; overflow-wrap: break-word;
  hyphenate-limit-chars: 10 4 4; -webkit-hyphenate-limit-before: 4; -webkit-hyphenate-limit-after: 4;
}
/* headings break only where the dictionary puts a soft hyphen (Biomedizin|technik), never mid-syllable */
:is(h1, h2, h3, h4):is(:lang(de), :lang(cs)) { -webkit-hyphens: manual; hyphens: manual; overflow-wrap: break-word; }
.hero__copy p { -webkit-hyphens: manual; hyphens: manual; } /* the opening line wraps whole words */
body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  color-scheme: dark;
}
img, svg, canvas, audio { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure, fieldset { margin: 0; }
ul, ol { padding: 0; list-style: none; }
fieldset { border: 0; padding: 0; min-width: 0; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 0.125rem solid currentColor; outline-offset: 0.1875rem; }
::selection { background: var(--yellow); color: var(--ink); }
[hidden] { display: none !important; }

.sr-only {
  position: absolute; width: 0.0625rem; height: 0.0625rem; margin: -0.0625rem; padding: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}
.skip {
  position: fixed; left: 0.75rem; top: -3.75rem; z-index: 50;
  background: var(--paper); color: var(--ink); padding: 0.625rem 0.875rem; border-radius: var(--r-pill); font-weight: 600;
}
.skip:focus { top: 0.75rem; }

.wrap { width: min(100% - 2 * var(--gutter), var(--maxw)); margin-inline: auto; }

/* The display voice: the condensed cut of the brand face */
/* font-stretch asks for the condensed cut. The font file on disk today has no width axis, so this
   renders at normal width; drop in a file with the axis and every heading tightens by itself. */
.display {
  font-stretch: 75%;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.028em;
  line-height: 0.9;
}
.h-xl { font-size: clamp(2.75rem, 8.4vw, 8.75rem); }
.lede {
  margin-top: 1.25rem;
  max-width: 44ch;
  font-size: clamp(1.0625rem, 1.35vw, 1.3125rem);
  color: var(--on-ink-dim);
}
.lede--on-yellow { color: var(--on-light-dim); }
.arr { font-family: ui-sans-serif, system-ui, sans-serif; font-weight: 500; display: inline-block; }

/* ---------- buttons (interaction layer) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.625rem;
  height: 3rem; padding: 0 1.375rem;
  border: 0.0938rem solid transparent; border-radius: var(--r-pill);
  font-weight: 600; font-size: 1rem; line-height: 1; text-decoration: none; white-space: nowrap;
  transition: transform var(--dur-press) var(--ease-out), background-color var(--dur-hover) ease,
    color var(--dur-hover) ease, border-color var(--dur-hover) ease;
}
.btn:active { transform: scale(0.97); }
.btn--sm { height: 2.5rem; padding: 0 1rem; font-size: 0.9375rem; }
.btn--ink { background: var(--ink); color: var(--paper); }
.btn--suit { background: var(--suit-grey); color: var(--paper); }
.btn--yellow { background: var(--yellow); color: var(--ink); }
.btn--line { border-color: currentColor; }
.btn .arr { transition: transform var(--dur-hover) var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  .btn--ink:hover { background: var(--ink-3); }
  .btn--suit:hover { background: var(--suit-grey-hi); }
  .btn--yellow:hover { background: var(--yellow-hi); }
  .btn--line:hover { background: color-mix(in srgb, currentColor 12%, transparent); }
  .btn:hover .arr { transform: translateX(0.1875rem); }
}

/* ---------- nav ---------- */
.nav {
  position: fixed; z-index: var(--z-nav); top: 0.875rem; left: 50%; translate: -50% 0;
  display: flex; align-items: center; gap: 0.25rem;
  height: 3.25rem; padding: 0.375rem 0.375rem 0.375rem 1.375rem; max-width: calc(100% - 1.75rem);
  border-radius: var(--r-pill);
  background: color-mix(in srgb, var(--ink) 90%, transparent);
  -webkit-backdrop-filter: blur(0.875rem) saturate(1.3); backdrop-filter: blur(0.875rem) saturate(1.3);
  box-shadow: inset 0 0 0 0.0625rem var(--line-ink);
  color: var(--paper);
}
.logo {
  display: inline-block; flex: none; width: 1.17em; aspect-ratio: 5 / 7; overflow: hidden;
  border-radius: 0.16em; rotate: -12deg;
  box-shadow: 0 0 0.5em 0.06em rgba(244, 238, 219, 0.55);
}
.logo img { width: 100%; height: 100%; object-fit: cover; }
.nav__brand {
  display: inline-flex; align-items: center; gap: 0.7em;
  margin-right: 0.875rem; white-space: nowrap; text-decoration: none;
  font-stretch: 75%; font-weight: 800; font-size: 1.1875rem; text-transform: uppercase; letter-spacing: 0.01em;
}
.nav__links { display: flex; gap: 0.125rem; }
.nav__links a {
  padding: 0.625rem 0.75rem; border-radius: var(--r-pill); text-decoration: none; white-space: nowrap;
  font-family: var(--font-mono); font-size: 0.75rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--on-ink-dim);
  transition: color var(--dur-hover) ease, background-color var(--dur-hover) ease;
}
.nav__links a[aria-current="true"] { color: var(--paper); background: var(--ink-3); }
@media (hover: hover) and (pointer: fine) { .nav__links a:hover { color: var(--paper); } }
.nav__cta { margin-left: 0.5rem; }
.nav__menu {
  display: none; height: 2.5rem; padding: 0 1rem; border-radius: var(--r-pill);
  background: var(--yellow); color: var(--ink); font-weight: 600; font-size: 0.9375rem;
  transition: transform var(--dur-press) var(--ease-out);
}
.nav__menu:active { transform: scale(0.97); }
@media (max-width: 63.9375em) {
  .nav { left: 0.875rem; right: 0.875rem; translate: none; justify-content: space-between; }
  .nav__links, .nav__cta, .nav > .lang { display: none; }
  .js .nav__menu { display: inline-flex; align-items: center; }
  html:not(.js) .nav__cta { display: inline-flex; }
}
@media (min-width: 48em) and (max-width: 63.9375em) {
  .nav { left: 50%; right: auto; translate: -50% 0; width: min(45rem, calc(100% - 1.75rem)); }
}

/* ---------- back to the top: bottom right, once the hero is behind you; it goes to the very top ---------- */
.totop {
  position: fixed; z-index: var(--z-nav); right: clamp(1rem, 2.5vw, 2rem); bottom: clamp(1rem, 2.5vw, 2rem);
  display: inline-flex; align-items: center; gap: 0.55em; height: 2.75rem; padding: 0 1.1rem; border-radius: var(--r-pill); text-decoration: none;
  background: color-mix(in srgb, var(--ink) 88%, transparent); color: var(--paper);
  font-size: 0.875rem; font-weight: 600; white-space: nowrap;
  -webkit-backdrop-filter: blur(0.75rem); backdrop-filter: blur(0.75rem);
  box-shadow: inset 0 0 0 0.0625rem var(--line-ink), 0 0.75rem 1.5rem -0.75rem rgba(0, 0, 0, 0.7);
  opacity: 0; translate: 0 0.75rem; visibility: hidden; pointer-events: none;
  transition: opacity var(--dur-menu) var(--ease-out), translate var(--dur-menu) var(--ease-out), visibility 0s var(--dur-menu), scale var(--dur-press) var(--ease-out);
}
.totop.is-on { opacity: 1; translate: 0 0; visibility: visible; pointer-events: auto; transition-delay: 0s; }
.totop:active { scale: 0.94; }
.totop:focus-visible { outline: 0.125rem solid var(--yellow); outline-offset: 0.1875rem; }
.totop .arr { color: var(--yellow); font-size: 1.1em; }
@media (hover: hover) and (pointer: fine) { .totop:hover { background: var(--ink-3); } }
html.menu-open .totop { display: none; }

/* ---------- language switch (EN / CS / DE) ---------- */
.lang { display: inline-flex; gap: 0.125rem; padding: 0.1875rem; margin-left: 0.375rem; border-radius: var(--r-pill); box-shadow: inset 0 0 0 0.0625rem var(--line-ink); }
.lang button {
  height: 1.875rem; min-width: 2.125rem; padding: 0 0.5rem; border-radius: var(--r-pill);
  font-family: var(--font-mono); font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.06em; color: var(--on-ink-dim);
  transition: background-color var(--dur-hover) ease, color var(--dur-hover) ease;
}
.lang button[aria-pressed="true"] { background: var(--paper); color: var(--ink); }
@media (hover: hover) and (pointer: fine) { .lang button[aria-pressed="false"]:hover { color: var(--paper); } }
.lang--menu { align-self: flex-start; margin: 0; }
.lang--menu button { height: 2.5rem; min-width: 3.25rem; font-size: 0.8125rem; }
html:not(.js) .lang { display: none; }

.menu {
  position: fixed; inset: 0; z-index: var(--z-menu);
  display: flex; flex-direction: column; justify-content: space-between; gap: 2rem;
  padding: calc(var(--nav-h) + 2.5rem) var(--gutter) 2.5rem;
  background: var(--ink);
  opacity: 1; transform: none;
  transition: opacity var(--dur-menu) var(--ease-out), transform var(--dur-menu) var(--ease-out);
}
@starting-style { .menu { opacity: 0; transform: translateY(-0.5rem); } }
.menu nav { display: grid; gap: 0.25rem; }
.menu nav a {
  font-stretch: 75%; font-weight: 800; text-transform: uppercase; text-decoration: none;
  font-size: clamp(2.5rem, 12vw, 4.5rem); line-height: 1.02; letter-spacing: -0.028em;
}
.menu .btn { align-self: flex-start; }
.menu__foot { display: flex; flex-wrap: wrap; gap: 0.875rem; align-items: center; }
html.menu-open { overflow: hidden; }

/* ---------- Higgsfield slots ----------
   A slot shows a labelled plate until its file is listed in assets/hf/manifest.js.
   The label is the id used in HIGGSFIELD-ASSETS.md. */
.slot {
  position: relative; display: block; overflow: hidden;
  border-radius: var(--r-media);
  background:
    repeating-linear-gradient(135deg, rgba(244, 238, 219, 0.07) 0 0.0625rem, transparent 0.0625rem 0.75rem),
    var(--ink-2);
  box-shadow: inset 0 0 0 0.0625rem var(--line-ink);
}
.slot::after {
  content: attr(data-label);
  position: absolute; left: 0.75rem; right: 0.75rem; bottom: 0.625rem;
  font-family: var(--font-mono); font-size: 0.625rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--on-ink-faint);
}
.slot--yellow, .slot--on-yellow, .slot--on-paper {
  background: repeating-linear-gradient(135deg, rgba(18, 18, 17, 0.1) 0 0.0625rem, transparent 0.0625rem 0.75rem), transparent;
  box-shadow: inset 0 0 0 0.0625rem var(--line-light);
}
.slot--yellow { background-color: var(--yellow); }
.slot--yellow::after, .slot--on-yellow::after, .slot--on-paper::after { color: rgba(18, 18, 17, 0.45); }
.slot > img, .slot > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.slot--clear > img { object-fit: contain; object-position: center bottom; }
.slot.has-img { box-shadow: none; }
.slot.has-img:not(.slot--yellow) { background: none; }
.slot.has-img.slot--yellow { background: radial-gradient(80% 70% at 50% 40%, var(--yellow-hi), var(--yellow)); }
.slot.has-img::after { content: none; }

/* ==========================================================================
   1. HERO
   ========================================================================== */
.hero { position: relative; background: var(--yellow); color: var(--ink); color-scheme: light; }
.hero__inner {
  position: relative;
  background: radial-gradient(70% 62% at 50% 40%, var(--yellow-hi) 0%, var(--yellow) 64%);
}
.hero__stage {
  position: relative; overflow: clip;
  display: grid; grid-template: "row" auto "fig" minmax(0, 1fr) "word" auto / minmax(0, 1fr);
  min-height: 100svh;
  padding: calc(var(--nav-h) + 1.75rem) var(--gutter) 0;
}

.hero__row { grid-area: row; position: relative; z-index: 3; display: grid; gap: 1.125rem; }
.hero__sub {
  max-width: 21ch;
  font-size: clamp(1.375rem, 2.1vw, 2rem); font-weight: 600; line-height: 1.12; letter-spacing: -0.015em;
}
.hero__ctas { display: flex; flex-wrap: wrap; gap: 0.625rem; margin-top: 1.25rem; }
.hero__status {
  /* boxed, so it weighs as much as the line and the buttons on the left */
  display: flex; align-items: center; gap: 1.1em; flex: none;
  padding: 1.35em 1.8em 1.35em 1.45em;
  border-radius: var(--r-card); background: var(--suit-grey); color: var(--paper);
  box-shadow: 0 1.5em 2.75em -1.5em rgba(70, 52, 0, 0.55);
  font-family: var(--font-mono); font-size: clamp(0.8125rem, 1.22vw, 1.25rem); font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.06em; line-height: 1.5;
}
.hero__status-text { display: grid; text-align: left; }

/* the live dot: green, glowing, with a slow ring (state, not decoration: "available now") */
.live {
  position: relative; flex: none; width: 0.75em; height: 0.75em; border-radius: 50%;
  background: var(--live); box-shadow: 0 0 0.45em 0.08em color-mix(in srgb, var(--live) 75%, transparent);
}
.live::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--live);
  animation: live-ring 2s var(--ease-out) infinite;
}
@keyframes live-ring { from { transform: scale(1); opacity: 0.75; } to { transform: scale(3); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .live::after { animation: none; opacity: 0; } }

.hero__figure {
  grid-area: fig; position: relative; z-index: 0;
  justify-self: center; align-self: end;
  height: min(46svh, 27.5rem); aspect-ratio: 1;
  margin-bottom: calc(var(--word-h, 20vw) * -0.42);
}
.hero__figure-in { position: absolute; inset: 0; }
.hero__disc {
  position: absolute; left: 50%; top: 3%; width: 82%; aspect-ratio: 1; translate: -50% 0;
  border-radius: 50%; background: var(--ink);
}
.hero__hello {
  position: absolute; inset: 6% 26% 4%; z-index: 3; border-radius: 40% 40% 12% 12%;
  font-size: 0; color: transparent; cursor: pointer;
}
.hero__hello:focus-visible { outline: 0.125rem solid var(--ink); outline-offset: 0.25rem; }
.hero__img, .hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: center bottom; }
.hero[data-figure="bust"] .hero__img {
  -webkit-mask-image: linear-gradient(#000 70%, transparent 97%); mask-image: linear-gradient(#000 70%, transparent 97%);
}
.hero__shadow { display: none; }

/* a real figure (pose stills or a frame sequence) stands in front of the wordmark */
.hero[data-figure="full"] .hero__figure { z-index: 2; aspect-ratio: 3 / 4; height: min(58svh, 35rem); margin-bottom: calc(var(--word-h, 20vw) * -0.9); }
.hero[data-figure="full"] .hero__disc { display: none; }
.hero[data-figure="full"] .hero__shadow {
  /* the Higgsfield frames leave about 5% of floor under the shoes; the shadow sits there */
  display: block; position: absolute; left: 22%; right: 22%; bottom: 3.2%; height: 4.5%;
  border-radius: 50%; background: radial-gradient(closest-side, rgba(70, 52, 0, 0.42), transparent);
}

/* line-height 0.74 makes the line box hug the capitals (0.04em of slack above and below),
   so the baseline can sit a fixed 1rem above the bottom edge at any size */
.hero__word {
  grid-area: word; position: relative; z-index: 1;
  margin: 0 calc(var(--gutter) * -0.35) calc(1rem - 0.04em);
  font-size: 23vw; line-height: 0.74; letter-spacing: -0.03em; text-align: center; white-space: nowrap;
}
.hero__word-mask { display: block; overflow: clip; padding-block: 0.05em; margin-block: -0.05em; }
.hero__word.is-open .hero__word-mask { overflow: visible; }
.hero__word-inner { display: inline-block; }

/* vertical screens (phones, portrait tablets): one centred column, top to bottom */
@media (max-width: 47.9375em), (max-aspect-ratio: 999/1000) {
  .hero__row { display: flex; flex-direction: column; align-items: center; gap: 1.25em; text-align: center; }
  .hero__sub { margin-inline: auto; }
  .hero__ctas { justify-content: center; }
}
@media (min-width: 48em) and (min-aspect-ratio: 1/1) {
  .hero__row { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding-bottom: 1.125rem; }
}
@media (min-width: 48em) {
  /* portrait tablets keep the stacked layout (copy, figure, wordmark) with a bigger figure */
  .hero__figure { height: min(54svh, 37.5rem); }
}
/* landscape: the figure stands behind the wordmark, between the copy and the status line */
@media (min-width: 48em) and (min-aspect-ratio: 1/1) {
  .hero__stage { grid-template: "." minmax(0, 1fr) "row" auto "word" auto / minmax(0, 1fr); height: 100svh; min-height: 38.75rem; }
  .hero__figure {
    position: absolute; left: 0; right: 0; margin: 0 auto;
    /* capped by width too, so the stand-in portrait never slides under the copy */
    height: min(70svh, 42vw); bottom: calc(var(--word-h, 20vw) * 0.5);
  }
  .hero[data-figure="full"] .hero__figure { height: 90svh; bottom: 2.5svh; margin: 0 auto; }
}

/* the payoff: in flow layout it is simply the next block */
.payoff { display: grid; gap: 2.25rem; padding: clamp(4rem, 9vw, 7.5rem) var(--gutter) clamp(4.5rem, 10vw, 8rem); }
.payoff__title { max-width: 7.2em; font-size: clamp(2.5rem, 10.5vw, 9rem); }
.payoff__cards { display: flex; flex-wrap: wrap; gap: 0.875rem; }
@media (max-width: 47.9375em) {
  /* a hand you swipe through, like the role cards */
  .payoff__cards {
    display: grid; grid-auto-flow: column; grid-auto-columns: min(74vw, 20rem); justify-content: start;
    margin-inline: calc(var(--gutter) * -1); padding: 0.25rem var(--gutter) 2.125rem;
    overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  }
  .payoff__cards::-webkit-scrollbar { display: none; }
  .pcard { width: auto; scroll-snap-align: center; }
  .hero__ctas .btn { padding-inline: 1.0625rem; }
}
.pcard { position: relative; container-type: inline-size; width: clamp(13rem, 26vw, 20rem); max-width: 100%; aspect-ratio: 5 / 7; perspective: 75rem; }
.pcard__inner { position: relative; height: 100%; transform-style: preserve-3d; }
.pcard__face {
  position: absolute; inset: 0; border-radius: var(--r-card);
  -webkit-backface-visibility: hidden; backface-visibility: hidden;
  box-shadow: inset 0 0 0 0.0625rem var(--line-light), 0 1.625rem 2.75rem -1.375rem rgba(70, 52, 0, 0.55);
}
.pcard__front { display: flex; flex-direction: column; padding: 8cqi; background: var(--paper); color: var(--ink); }
/* the back: the deck's pattern, or the generated card back when it exists (--card-back is set by site.js) */
.pcard__back {
  display: none; transform: rotateY(180deg);
  background:
    var(--card-back, none) center / cover no-repeat,
    repeating-linear-gradient(45deg, rgba(255, 222, 102, 0.16) 0 0.0938rem, transparent 0.0938rem 0.75rem),
    repeating-linear-gradient(-45deg, rgba(255, 222, 102, 0.16) 0 0.0938rem, transparent 0.0938rem 0.75rem),
    var(--ink-2);
  box-shadow: inset 0 0 0 0.0938rem var(--yellow), inset 0 0 0 0.5625rem var(--ink-2), inset 0 0 0 0.625rem rgba(255, 222, 102, 0.45), 0 1.625rem 2.75rem -1.375rem rgba(70, 52, 0, 0.55);
}
.cine-hero .pcard__back { display: block; }
.pcard__label { font-family: var(--font-mono); font-size: max(0.6875rem, 5cqi); font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; }
.pcard__num { margin-top: auto; font-size: 37cqi; line-height: 0.82; }
.pcard__what { margin-top: 4.4cqi; font-weight: 600; font-size: max(0.875rem, 7.4cqi); line-height: 1.2; }
.pcard__foot { margin-top: 5cqi; padding-top: 5cqi; border-top: 0.0625rem solid var(--line-light); font-size: max(0.75rem, 5.6cqi); line-height: 1.35; color: var(--on-light-dim); }

/* cinematic hero: one pinned screen; the payoff becomes an overlay that the scrub deals in */
.cine-hero .hero { height: 100svh; min-height: 38.75rem; overflow: clip; background: var(--ink); }
.cine-hero .hero__inner { position: absolute; inset: 0; }
.cine-hero .hero__stage { height: 100%; min-height: 0; }
.cine-hero .payoff {
  position: absolute; inset: 0; z-index: 4; pointer-events: none;
  display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; gap: 0;
  padding: calc(var(--nav-h) + 5svh) var(--gutter) 5.5svh;
}
.cine-hero .payoff__title { font-size: clamp(2.75rem, 6.3vw, 6.75rem); }
.cine-hero .payoff__cards { flex-wrap: nowrap; gap: 0; }
.cine-hero .pcard { width: clamp(11.5rem, 20vw, 36svh); }
.cine-hero .pcard:nth-child(1) { rotate: -5deg; }
.cine-hero .pcard:nth-child(2) { rotate: 1.5deg; translate: -0.75rem -0.75rem; }
.cine-hero .pcard:nth-child(3) { rotate: 6deg; translate: -1.375rem 0.375rem; }

/* no flash of the things the intro is about to reveal (only while JS and GSAP are alive) */
.anim .hero__word-inner, .anim .hero__figure-in, .anim .hero__copy, .anim .hero__status, .anim [data-reveal], .anim [data-deal] { visibility: hidden; }

/* ==========================================================================
   2. ABOUT
   ========================================================================== */
.about { padding-block: clamp(6rem, 13vw, 11.875rem) clamp(5rem, 10vw, 9.375rem); }
.about__grid { display: grid; gap: 3rem; }
.about__text { container-type: inline-size; }
.about__statement {
  font-size: clamp(1.375rem, 6.4cqi, 2.5rem); font-weight: 600; font-stretch: 92%;
  line-height: 1.16; letter-spacing: -0.02em;
}
.about__side { position: relative; }
.about__glow { display: none; }
/* cinematic About (1024px and up, motion allowed): the section sits under the last screen of the
   hero, so the hero's closing circle lands on the bulb; then the bulb flickers on, scrubbed */
.cine-about .hero { z-index: 2; background: transparent; }
.cine-about .about { position: relative; z-index: 1; margin-top: -100svh; height: 100svh; padding-block: 0; display: grid; align-items: center; }
.cine-about .about__glow {
  /* inside the picture, so the slot's rounded clip keeps it from bleeding past the column */
  display: block; position: absolute; z-index: 1; left: 50%; top: var(--bulb-y, 5%); width: 90%; aspect-ratio: 1; translate: -50% -50%;
  border-radius: 50%; pointer-events: none; mix-blend-mode: screen;
  background: radial-gradient(closest-side, rgba(255, 240, 190, 0.6), rgba(255, 222, 102, 0.2) 42%, transparent 74%);
}
.hl { color: var(--yellow); }
.note {
  /* pinned to the top-right corner of the picture, like a note on a print */
  position: absolute; z-index: 2; top: -1.4em; right: -0.6em;
  max-width: min(26ch, 70%); padding: 0.875rem 1rem;
  border-radius: var(--r-media); background: var(--yellow); color: var(--ink); rotate: -5deg;
  box-shadow: 0 1.2em 2em -1.2em rgba(0, 0, 0, 0.7);
  font-family: var(--font-mono); font-size: 0.75rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.04em; line-height: 1.5;
}
.about__media { aspect-ratio: 4 / 5; border-radius: var(--r-card); clip-path: inset(0 round var(--r-card)); }
@media (min-width: 64em) {
  /* both columns are 80% of the screen tall. The statement's size comes from that box:
     about 470 characters at line-height 1.16 and ~0.5em a character fill W x H when
     size^2 = W * H / 270. With H = 80svh that is about 6.2cqi of the column width, or 4.4svh,
     whichever is smaller, so it never runs taller than the picture beside it. */
  .about__grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(3rem, 6vw, 6rem); align-items: stretch; }
  .about__text { display: flex; align-items: center; height: 80svh; }
  .about__statement { font-size: max(1.375rem, min(6.2cqi, 4.4svh)); }
  .about__side { height: 80svh; }
  .about__media { height: 100%; aspect-ratio: auto; }
}

/* ==========================================================================
   3. MARQUEE (constant motion, so linear)
   ========================================================================== */
.marquee { overflow: hidden; padding-block: 1.375rem; border-block: 0.0625rem solid var(--line-ink); }
.marquee__track { display: flex; width: max-content; animation: marquee 52s linear infinite; }
.marquee__group { display: flex; flex: none; }
.marquee__group li {
  display: flex; align-items: center; gap: 2.75rem; padding-left: 2.75rem; white-space: nowrap;
  font-stretch: 75%; font-weight: 800; text-transform: uppercase; font-size: clamp(1.5rem, 2.5vw, 2.375rem); line-height: 1;
}
.marquee__group li::after { content: "\2726"; font-size: 0.55em; color: var(--yellow); }
@keyframes marquee { to { transform: translateX(-50%); } }
@media (hover: hover) and (pointer: fine) { .marquee:hover .marquee__track { animation-play-state: paused; } }
@media (prefers-reduced-motion: reduce) {
  .marquee__track { animation: none; width: auto; }
  .marquee__group { flex-wrap: wrap; row-gap: 0.875rem; }
  .marquee__group[aria-hidden="true"] { display: none; }
}

/* ==========================================================================
   4. ROLES
   ========================================================================== */
.roles { padding-block: clamp(6rem, 12vw, 11.25rem) clamp(4.5rem, 9vw, 8.125rem); }
.hand {
  display: grid; grid-auto-flow: column; grid-auto-columns: min(78vw, 20rem); gap: 1rem;
  margin: 3rem calc(var(--gutter) * -1) 0; padding: 0.875rem var(--gutter) 1.875rem;
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
}
.hand::-webkit-scrollbar { display: none; }
.rcard { container-type: inline-size; aspect-ratio: 5 / 7; perspective: 87.5rem; scroll-snap-align: center; }
.rcard__tilt { height: 100%; transform-style: preserve-3d; }
.rcard__inner {
  position: relative; height: 100%; transform-style: preserve-3d;
  transition: transform var(--dur-flip) var(--ease-in-out);
}
.rcard.is-flipped .rcard__inner { transform: rotateY(180deg); }
.rcard__face {
  position: absolute; inset: 0; display: flex; flex-direction: column; overflow: hidden;
  border-radius: var(--r-card); -webkit-backface-visibility: hidden; backface-visibility: hidden;
}
.rcard__front { width: 100%; padding: 0.875rem 0.875rem 1.125rem; background: var(--paper); color: var(--ink); text-align: left; }
.rcard__front:focus-visible { outline: 0.125rem solid var(--yellow); outline-offset: 0.25rem; }
.rcard__top { display: flex; justify-content: space-between; align-items: center; padding: 1cqi 1.2cqi 4cqi; }
/* the corner index, set like the rank on a playing card */
.rcard__index { font-family: var(--font-serif); font-size: 15cqi; font-weight: 700; line-height: 0.8; letter-spacing: -0.02em; }
/* the turn button is as tall as the index, so the two corners balance */
.rcard__turn {
  display: inline-flex; align-items: center; gap: 0.55em; padding: 0.95em 1.15em; border-radius: var(--r-pill);
  background: var(--ink); color: var(--yellow); box-shadow: 0 0.6em 1.2em -0.7em rgba(18, 18, 17, 0.7);
  font-family: var(--font-mono); font-size: max(0.75rem, 4.2cqi); font-weight: 700; line-height: 1; text-transform: uppercase; letter-spacing: 0.08em;
  transition: background-color var(--dur-hover) ease, color var(--dur-hover) ease;
}
.rcard__turn .arr { font-size: 1.35em; line-height: 0.6; transition: rotate var(--dur-menu) var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  .rcard__front:hover .rcard__turn { background: var(--yellow); color: var(--ink); }
  .rcard__front:hover .rcard__turn .arr { rotate: 180deg; }
}
.rcard__art { flex: 1; min-height: 0; }
.rcard__name { margin-top: 4.4cqi; padding-inline: 1.2cqi; font-size: 11.6cqi; white-space: nowrap; }
.rcard__role { margin-top: 2cqi; padding-inline: 1.2cqi; font-family: var(--font-mono); font-size: max(0.75rem, 3.8cqi); font-weight: 500; text-transform: uppercase; letter-spacing: 0.06em; color: var(--on-light-dim); }

.rcard__back {
  --fit: 1; /* set by fitBacks() in site.js when a language runs long */
  padding: calc(1.25rem * var(--fit)); gap: calc(0.875rem * var(--fit)); transform: rotateY(180deg);
  background: var(--ink-2); color: var(--paper); box-shadow: inset 0 0 0 0.0938rem var(--yellow);
}
.rcard__back .rcard__index { color: var(--yellow); font-size: 11cqi; }
.rcard__promise { font-size: calc(clamp(1.125rem, 1.45vw, 1.3125rem) * var(--fit)); font-weight: 600; line-height: 1.2; letter-spacing: -0.01em; }
.rcard__owns { font-size: calc(0.9375rem * var(--fit)); line-height: 1.35; color: var(--on-ink-dim); }
.rcard__owns span {
  display: block; margin-bottom: 0.125rem; font-family: var(--font-mono); font-size: 0.6875rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.08em; color: var(--yellow);
}
.rcard__stats { display: grid; row-gap: calc(0.5625rem * var(--fit)); padding-top: calc(0.75rem * var(--fit)); border-top: 0.0625rem solid var(--line-ink); }
.rcard__stats { grid-template-columns: minmax(2.6rem, max-content) 1fr; column-gap: 0.625rem; }
.rcard__stats li { display: grid; grid-column: 1 / -1; grid-template-columns: subgrid; align-items: baseline; }
.rcard__stats b { font-size: calc(1.75rem * var(--fit)); color: var(--yellow); line-height: 0.9; white-space: nowrap; }
/* the unit sits small after the number, so 2 yrs, 2 roky and 2 Jahre all fit the same column */
.rcard__stats b small, .cell__stats b small { font-size: 0.42em; letter-spacing: 0.04em; margin-left: 0.2em; }
.rcard__stats span { font-size: max(0.7188rem, calc(0.8125rem * var(--fit))); line-height: 1.3; color: var(--on-ink-dim); }
.rcard__actions { display: flex; justify-content: space-between; align-items: center; gap: 0.625rem; margin-top: auto; }
.rcard__unflip {
  width: 2.5rem; height: 2.5rem; border-radius: 50%; box-shadow: inset 0 0 0 0.0625rem var(--line-ink); font-size: 1.125rem;
  transition: transform var(--dur-press) var(--ease-out), background-color var(--dur-hover) ease;
}
.rcard__unflip:active { transform: scale(0.94); }
@media (hover: hover) and (pointer: fine) { .rcard__unflip:hover { background: var(--ink-3); } }

@media (min-width: 48em) {
  .hand { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 21.25rem)); justify-content: center; gap: 1.5rem; margin-inline: 0; padding: 0; overflow: visible; }
}
/* four across only once each card is wide enough to hold its back (about 19.375rem) */
@media (min-width: 85em) {
  .hand { grid-template-columns: repeat(4, minmax(0, 1fr)); justify-content: stretch; gap: 1.375rem; margin-top: 4.5rem; }
  /* laid on a table, not snapped to a grid */
  .rcard:nth-child(1) { rotate: -2.2deg; translate: 0 0.625rem; }
  .rcard:nth-child(2) { rotate: 1.2deg; translate: 0 -0.5rem; }
  .rcard:nth-child(3) { rotate: -1deg; translate: 0 0.375rem; }
  .rcard:nth-child(4) { rotate: 2.4deg; translate: 0 -0.25rem; }
}
/* reduced motion: the card changes face with a fade instead of a turn */
@media (prefers-reduced-motion: reduce) {
  .rcard__inner { transition: none; transform: none !important; }
  .rcard__face { transition: opacity 200ms ease; }
  .rcard__back { transform: none; opacity: 0; pointer-events: none; }
  .rcard.is-flipped .rcard__back { opacity: 1; pointer-events: auto; }
  .rcard.is-flipped .rcard__front { opacity: 0; pointer-events: none; }
}
/* no JavaScript: show both faces, stacked */
html:not(.js) .rcard { aspect-ratio: auto; }
html:not(.js) .rcard__face { position: relative; inset: auto; }
html:not(.js) .rcard__back { transform: none; margin-top: 0.5rem; }
html:not(.js) .rcard__art { aspect-ratio: 1; flex: none; }
html:not(.js) .rcard__turn, html:not(.js) .rcard__unflip { display: none; }

/* ==========================================================================
   5. WORK
   ========================================================================== */
.work { padding-block: clamp(4.5rem, 9vw, 8.125rem) clamp(5rem, 10vw, 9.375rem); }
.bento {
  /* one 20-column grid at every width: 60/40, 50/50, 50/50, 25 x 4. The cells scale their own type
     (container units), and a narrow cell drops its small print so the proportions can hold */
  display: grid; grid-template-columns: repeat(20, minmax(0, 1fr)); gap: clamp(0.5rem, 1.5vw, 1.25rem); margin-top: clamp(2rem, 4vw, 3.5rem);
}
.cell {
  position: relative; isolation: isolate; overflow: hidden; container-type: inline-size;
  display: flex; flex-direction: column; padding: clamp(0.625rem, 2.2vw, 1.75rem);
  border-radius: clamp(0.75rem, 1.6vw, var(--r-card)); perspective: 56.25rem;
}
.cell--glare { grid-column: span 12; }                                      /* row 1: 60 */
.cell--client { grid-column: span 8; }                                      /*        40 */
.cell--dayforge, .cell--tenfold, .cell--devalogam, .cell--dorkprod { grid-column: span 10; } /* 50 / 50, twice */
.cell--oss { grid-column: span 5; }                                         /* row 4: 25 x 4 */
.cell--dark { background: var(--ink-2); box-shadow: inset 0 0 0 0.0625rem var(--line-ink); }
.cell--paper { background: var(--paper); color: var(--ink); color-scheme: light; }
.cell--yellow { background: var(--yellow); color: var(--ink); color-scheme: light; }
.cell__meta { font-family: var(--font-mono); font-size: clamp(0.5625rem, 3.2cqi, 0.6875rem); font-weight: 500; text-transform: uppercase; letter-spacing: 0.08em; opacity: 0.72; }
.cell__title { margin-top: 0.4em; font-size: clamp(0.875rem, 12.5cqi, 3.75rem); overflow-wrap: anywhere; }
.cell__kicker { margin-top: 0.5em; font-family: var(--font-mono); font-size: clamp(0.5625rem, 2.2cqi, 0.8125rem); font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; }
.cell__title button { font: inherit; text-transform: inherit; letter-spacing: inherit; text-align: left; }
.cell__title button::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.cell__title button:focus-visible { outline: none; }
.cell:has(.cell__title button:focus-visible) { outline: 0.125rem solid var(--yellow); outline-offset: 0.1875rem; }
.cell--yellow:has(.cell__title button:focus-visible) { outline-color: var(--paper); }
.cell__line { max-width: 30ch; margin-top: 0.5em; opacity: 0.8; font-size: clamp(0.6875rem, 5cqi, 1.0625rem); line-height: 1.35; }
.cell__media { margin-top: auto; padding-top: clamp(0.5rem, 4cqi, 1.75rem); }
.cell__media img {
  width: 100%; aspect-ratio: 16 / 9; object-fit: cover; object-position: left top; border-radius: clamp(0.375rem, 2cqi, var(--r-media));
  transition: transform 600ms var(--ease-out);
}
.cell__obj { align-self: flex-end; width: min(64%, 18.75rem); aspect-ratio: 4 / 3; margin-top: auto; }
.cell--oss .cell__obj { width: 100%; }
.cell__obj > img { transition: transform 600ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  .cell:hover .cell__media img { transform: scale(1.03); }
  .cell:hover .cell__obj > img { transform: scale(1.05); }
}
/* the one card that stays face down; its sealed-letter object is kept small */
.cell--client {
  background:
    repeating-linear-gradient(45deg, rgba(255, 222, 102, 0.13) 0 0.0938rem, transparent 0.0938rem 0.8125rem),
    repeating-linear-gradient(-45deg, rgba(255, 222, 102, 0.13) 0 0.0938rem, transparent 0.0938rem 0.8125rem),
    var(--ink-2);
  box-shadow: inset 0 0 0 0.0938rem var(--yellow), inset 0 0 0 0.5625rem var(--ink-2), inset 0 0 0 0.625rem rgba(255, 222, 102, 0.45);
}
.cell--client .cell__meta { color: var(--yellow); opacity: 1; }
.cell--client .cell__line { max-width: 34ch; font-size: clamp(0.6875rem, 3.6cqi, 1.0625rem); }
.cell--client .cell__obj { width: min(46%, 12rem); }

/* the lead cell: the client platform, typographic, with its numbers in a strip */
.cell--glare { gap: clamp(0.75rem, 3cqi, 1.75rem); background: var(--yellow); color: var(--ink); color-scheme: light; }
.cell--glare:has(.cell__title button:focus-visible) { outline-color: var(--paper); }
.cell--glare .cell__title { font-size: clamp(1rem, 8.6cqi, 5rem); }
.cell--glare .cell__line { max-width: 52ch; font-size: clamp(0.6875rem, 2.4cqi, 1.0625rem); }
.cell__stats {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(0.5rem, 2.6cqi, 1.25rem); margin-top: auto;
  padding-top: clamp(0.5rem, 2.6cqi, 1.375rem); border-top: 0.0938rem solid var(--line-light);
}
.cell__stats b { display: block; font-size: clamp(1.125rem, 7cqi, 3.5rem); line-height: 0.86; }
.cell__stats span { display: block; margin-top: 0.4em; font-size: clamp(0.625rem, 2.6cqi, 0.875rem); line-height: 1.3; color: var(--on-light-dim); }
@container (min-width: 40rem) { .cell__stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } .cell__stats b { font-size: clamp(1.125rem, 5.4cqi, 3.5rem); } }

/* the two new projects: a plate until their pictures arrive */
.cell__soon {
  display: grid; place-items: center; margin-top: auto; aspect-ratio: 16 / 9; border-radius: clamp(0.375rem, 2cqi, var(--r-media));
  border: 0.0938rem dashed color-mix(in srgb, currentColor 32%, transparent);
  background: repeating-linear-gradient(135deg, color-mix(in srgb, currentColor 7%, transparent) 0 0.0625rem, transparent 0.0625rem 0.75rem);
  font-family: var(--font-mono); font-size: clamp(0.5rem, 3cqi, 0.75rem); font-weight: 500; text-transform: uppercase; letter-spacing: 0.08em; opacity: 0.7;
}
.cell--new .cell__line { margin-bottom: clamp(0.5rem, 4cqi, 1.75rem); }

/* narrow cells (phones, small tablets) keep the title and the picture; the small print goes */
@container (max-width: 11rem) {
  .cell__meta, .cell__line, .cell__kicker { display: none; }
}
@container (max-width: 16rem) {
  .cell__stats span { display: none; }
}
@media (min-width: 64em) {
  .cell { min-height: 22.5rem; }
  .cell--oss { min-height: 25rem; }
}

.listen {
  display: grid; gap: 0.875rem; align-items: center; margin-top: 1.25rem; padding: 1.125rem 1.5rem;
  border-radius: var(--r-card); background: var(--ink-2); box-shadow: inset 0 0 0 0.0625rem var(--line-ink);
  color: var(--on-ink-dim);
}
.listen strong { color: var(--paper); font-weight: 600; }
audio { width: 100%; height: 2.5rem; }
@media (min-width: 56.25em) { .listen { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2rem; } }

/* ---------- 6b. BEFORE THE PRODUCTS: its own section now ---------- */
.before { padding-block: clamp(5rem, 10vw, 9rem); border-top: 0.0625rem solid var(--line-ink); overflow: clip; }
.before__title { font-size: clamp(2.5rem, 6vw, 6rem); }
.fan { position: relative; list-style: none; }
/* phones: a hand you swipe through, like the payoff cards */
.fan {
  display: grid; grid-auto-flow: column; grid-auto-columns: min(70vw, 18rem); gap: 0.875rem;
  margin: 2rem calc(var(--gutter) * -1) 0; padding: 0.875rem var(--gutter) 2.125rem;
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
}
.fan::-webkit-scrollbar { display: none; }
.fan__card { position: relative; container-type: inline-size; scroll-snap-align: center; }
.fan__deal { height: 100%; }
.fan__face {
  display: flex; flex-direction: column; width: 100%; height: 100%; aspect-ratio: 5 / 7; padding: 6cqi;
  border-radius: var(--r-card); background: var(--paper); color: var(--ink); text-align: left;
  box-shadow: inset 0 0 0 0.0625rem var(--line-light), 0 1.6rem 2.8rem -1.6rem rgba(0, 0, 0, 0.75);
  transition: transform var(--dur-menu) var(--ease-out), box-shadow var(--dur-menu) var(--ease-out);
}
.fan__card:nth-child(even) .fan__face { background: var(--yellow); }
.fan__face:focus-visible { outline: 0.125rem solid var(--yellow); outline-offset: 0.25rem; }
.fan__card:nth-child(even) .fan__face:focus-visible { outline-color: var(--paper); }
.fan__face:active { transform: scale(0.98); }
.fan__top {
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--font-mono); font-size: max(0.6875rem, 4.6cqi); font-weight: 700; letter-spacing: 0.06em;
}
.fan__open {
  display: grid; place-items: center; width: 2.4em; height: 2.4em; border-radius: 50%;
  background: var(--ink); color: var(--yellow); font-size: 1.1em;
  transition: rotate var(--dur-menu) var(--ease-out);
}
.fan__art { flex: 1; min-height: 0; margin-block: 5cqi; overflow: hidden; border-radius: var(--r-media); background: var(--ink-2); }
.fan__art img { width: 100%; height: 100%; object-fit: cover; transition: transform 600ms var(--ease-out); }
.fan__art--plate {
  display: grid; place-content: center; gap: 0.5em; text-align: center; color: var(--on-ink-dim);
  font-family: var(--font-mono); font-size: max(0.6875rem, 4.4cqi); text-transform: uppercase; letter-spacing: 0.08em;
  background: repeating-linear-gradient(135deg, rgba(244, 238, 219, 0.07) 0 0.0625rem, transparent 0.0625rem 0.75rem), var(--ink-2);
}
.fan__name { font-size: 11cqi; line-height: 0.92; }
.fan__role { margin-top: 2.6cqi; font-size: max(0.75rem, 4.8cqi); line-height: 1.3; color: var(--on-light-dim); }

/* tablets and up: the four cards are held as a fan; the one you point at is drawn from the hand */
@media (min-width: 48em) {
  .fan {
    --w: clamp(12rem, 21vw, 19rem);
    display: flex; justify-content: center; align-items: flex-end;
    margin: clamp(2rem, 4vw, 3.5rem) 0 0; padding: 4vw 0 2vw; overflow: visible;
  }
  .fan__card {
    flex: none; width: var(--w); margin-inline: calc(var(--w) * -0.1);
    transform-origin: 50% 115%;
    rotate: var(--r); translate: calc(var(--spread, 0) * 7%) var(--y);
    transition: translate var(--dur-menu) var(--ease-out), rotate var(--dur-menu) var(--ease-out);
  }
  .fan__card:nth-child(1) { --r: -11deg; --y: 9%; }
  .fan__card:nth-child(2) { --r: -3.6deg; --y: 1.5%; }
  .fan__card:nth-child(3) { --r: 3.6deg; --y: 1.5%; }
  .fan__card:nth-child(4) { --r: 11deg; --y: 9%; }
  /* the cards either side make room */
  .fan__card:has(~ .fan__card :is(.fan__face:hover, .fan__face:focus-visible)) { --spread: -1; }
  .fan__card:has(:is(.fan__face:hover, .fan__face:focus-visible)) ~ .fan__card { --spread: 1; }
  .fan__card:has(:is(.fan__face:hover, .fan__face:focus-visible)) { z-index: 5; }
  .fan__face:is(:hover, :focus-visible) { transform: translateY(-9%); box-shadow: inset 0 0 0 0.0625rem var(--line-light), 0 2.4rem 3.6rem -1.6rem rgba(0, 0, 0, 0.85); }
  .fan__face:is(:hover, :focus-visible) .fan__open { rotate: 45deg; }
  .fan__face:hover .fan__art img { transform: scale(1.04); }
}
@media (prefers-reduced-motion: reduce) {
  .fan__card, .fan__face, .fan__open, .fan__art img { transition: none; }
}

/* ==========================================================================
   6. EXPERIENCE
   Details on the left (each title with its object icon), the scene on the right,
   and the road along the bottom: newest stop on the right, the token runs right to left.
   ========================================================================== */
.journey { padding-block: clamp(5rem, 10vw, 9.375rem); }
.journey__road { display: none; }
.stops { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; margin-top: 3rem; }
.stop {
  position: relative; display: grid; gap: 1.25rem; padding: 1.5rem;
  border-radius: var(--r-card); background: var(--ink-2); box-shadow: inset 0 0 0 0.0625rem var(--line-ink);
}
.stop__visual { order: -1; height: 18rem; }
.stop__visual.has-img { background: radial-gradient(60% 50% at 50% 72%, rgba(255, 222, 102, 0.12), transparent 70%); }
@media (min-width: 40em) {
  .stop { grid-template-columns: minmax(0, 1fr) 14rem; gap: 2rem; align-items: center; }
  .stop__visual { order: 0; height: 19rem; }
}
.stop__years { font-family: var(--font-mono); font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.08em; color: var(--yellow); }
.stop__head { display: flex; align-items: center; gap: clamp(0.75rem, 1.6vw, 1.25rem); margin-top: 0.625rem; }
.stop__title { font-size: clamp(2rem, 4.6vw, 4.25rem); }
/* the object icons, one size for all six, to the left of the title (the title steps right to make room) */
.stop__icon { order: -1; flex: none; width: clamp(4.25rem, 7vw, 6.75rem); aspect-ratio: 1; border-radius: 0; }
.stop__icon.slot, .stop__icon.slot.has-img { background: none; box-shadow: none; }
.stop__icon > img { object-position: center; }
.stop__icon::after { content: none; }
.stop__org { margin-top: 0.625rem; color: var(--on-ink-dim); }
.stop__points { display: grid; gap: 0.5rem; max-width: 58ch; margin-top: 1.25rem; }
.stop__points li { position: relative; padding-left: 1.25rem; line-height: 1.42; }
.stop__points li::before { content: ""; position: absolute; left: 0; top: 0.66em; width: 0.5625rem; height: 0.0938rem; background: var(--yellow); }
.stop__proof {
  display: inline-flex; align-items: center; gap: 0.5rem; margin-top: 1.25rem; padding-bottom: 0.125rem;
  font-weight: 600; border-bottom: 0.0938rem solid var(--yellow);
}
.stop__proof .arr { transition: transform var(--dur-hover) var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .stop__proof:hover .arr { transform: translateX(0.1875rem); } }

/* cinematic: one pinned screen; the stops swap in place and the road runs underneath */
.cine-journey .journey { padding-block: 0; }
.cine-journey .journey__pin { height: 100svh; min-height: 40rem; }
.cine-journey .journey__stage {
  display: grid; grid-template-rows: auto minmax(0, 1fr) auto; row-gap: clamp(0.5rem, 2svh, 1.5rem);
  height: 100%; padding-block: calc(var(--nav-h) + 1.75rem) clamp(0.75rem, 2.5svh, 1.75rem);
}
.cine-journey .journey__head { display: flex; align-items: baseline; gap: 1.5rem; }
.cine-journey .journey__head .h-xl { font-size: clamp(2.75rem, 5.2vw, 5.25rem); }
.cine-journey .journey__head .lede { margin-top: 0; }
.cine-journey .stops { display: grid; gap: 0; margin: 0; min-height: 0; }
.cine-journey .stop {
  grid-area: 1 / 1; min-height: 0; padding: 0; background: none; box-shadow: none;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(2rem, 4vw, 4.5rem); align-items: center;
  opacity: 0; visibility: hidden; transition: opacity 240ms ease, visibility 0s 240ms;
}
.cine-journey .stop.is-active { opacity: 1; visibility: visible; transition: opacity 240ms ease; }
.cine-journey .stop__visual { height: min(54svh, 36rem); }
.cine-journey .stop__title { font-size: clamp(2rem, 3.3vw, 3.5rem); }
.cine-journey .stop__points { gap: 0.375rem; margin-top: 1rem; }

.cine-journey .journey__road { display: block; position: relative; height: clamp(6rem, 15svh, 9rem); margin-inline: clamp(1rem, 3vw, 3rem); }
.road { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.road__base { fill: none; stroke: var(--on-ink-faint); stroke-width: 2; stroke-dasharray: 2 9; stroke-linecap: round; }
.road__live { fill: none; stroke: var(--yellow); stroke-width: 3; stroke-linecap: round; }
.road__token {
  position: absolute; z-index: 0; left: var(--tx, 96%); top: var(--ty, 36%); width: 1.75rem; height: 1.75rem; translate: -50% -50%;
  border-radius: 50%; background: radial-gradient(circle, var(--yellow) 0 30%, rgba(255, 222, 102, 0.24) 33%); pointer-events: none;
}
.journey__ticks { display: none; }
.cine-journey .journey__ticks { display: block; position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.tick {
  position: absolute; left: var(--x); top: var(--y); translate: -50% -50%; pointer-events: auto;
  height: 2.125rem; padding: 0 0.85rem; border-radius: var(--r-pill); white-space: nowrap;
  background: var(--ink); box-shadow: inset 0 0 0 0.0625rem var(--line-ink);
  font-family: var(--font-mono); font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.06em; color: var(--on-ink-dim);
  transition: background-color var(--dur-hover) ease, color var(--dur-hover) ease, box-shadow var(--dur-hover) ease, scale var(--dur-press) var(--ease-out);
}
.tick:active { scale: 0.96; }
.tick.is-past { color: var(--paper); box-shadow: inset 0 0 0 0.0938rem rgba(255, 222, 102, 0.55); }
.tick[aria-current="true"] { background: var(--yellow); color: var(--ink); box-shadow: none; }
@media (hover: hover) and (pointer: fine) { .tick:not([aria-current="true"]):hover { color: var(--paper); background: var(--ink-3); } }

/* ==========================================================================
   7. EDUCATION: the graduate stands between the two degrees
   ========================================================================== */
.edu { padding-block: clamp(5rem, 10vw, 9.375rem); border-top: 0.0625rem solid var(--line-ink); }
.edu__head { display: grid; justify-items: center; text-align: center; }
.edu__head .lede { margin-inline: auto; }
.edu__stage { display: grid; gap: 1.25rem; margin-top: clamp(2rem, 4vw, 3.5rem); }
.edu__mascot { position: relative; order: -1; height: min(62svh, 30rem); }
.edu__spot {
  position: absolute; left: 50%; bottom: 0; width: min(100%, 30rem); aspect-ratio: 1; translate: -50% 12%;
  border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 222, 102, 0.26), rgba(255, 222, 102, 0.07) 62%, transparent);
}
.edu__mascot::after {
  content: ""; position: absolute; left: 28%; right: 28%; bottom: 0; height: 3.5%;
  border-radius: 50%; background: radial-gradient(closest-side, rgba(0, 0, 0, 0.7), transparent);
}
.edu__figure { position: absolute; inset: 0; z-index: 1; }
.edu__figure.has-img { background: none; }
.degree { position: relative; padding: 1.75rem; border-radius: var(--r-card); background: var(--ink-2); box-shadow: inset 0 0 0 0.0625rem var(--line-ink); }
.degree__obj { float: right; width: 6rem; aspect-ratio: 1; margin: -0.5rem -0.5rem 0.75rem 1rem; }
.degree__title { margin-top: 0.625rem; font-size: clamp(1.875rem, 3vw, 2.875rem); }
.degree .stop__points { clear: both; }
.degree__sub {
  margin-top: 1.625rem; padding-top: 1.125rem; border-top: 0.0625rem solid var(--line-ink);
  font-family: var(--font-mono); font-size: 0.6875rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.08em; color: var(--yellow);
}
.degree__lead { margin-top: 0.75rem; color: var(--on-ink-dim); font-size: 0.9375rem; }
@media (min-width: 40em) and (max-width: 63.9375em) {
  .edu__stage { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .edu__mascot { grid-column: 1 / -1; }
}
@media (min-width: 64em) {
  /* one screen: the heading, then the graduate on a stage between two equal diplomas */
  .edu { display: flex; flex-direction: column; justify-content: center; min-height: 100svh; padding-block: calc(var(--nav-h) + 2.5svh) 4svh; }
  .edu__head { display: flex; justify-content: center; align-items: baseline; gap: 1.5rem; }
  .edu__head .h-xl { font-size: clamp(2.5rem, min(5vw, 9svh), 5.5rem); }
  .edu__head .lede { margin: 0; }
  .edu__stage {
    position: relative; grid-template-columns: minmax(0, 1fr) minmax(0, 0.66fr) minmax(0, 1fr);
    gap: clamp(1rem, 2.4vw, 2.5rem); align-items: stretch; margin-top: 3svh;
  }
  /* the stage floor runs under all three */
  .edu__stage::after {
    content: ""; position: absolute; left: 8%; right: 8%; bottom: -1.5svh; height: 0.0625rem;
    background: linear-gradient(90deg, transparent, rgba(255, 222, 102, 0.45), transparent);
  }
  .edu__mascot { order: 0; height: auto; min-height: 0; }
  /* the graduate fills the column's height (the render is mostly empty air either side) */
  .edu__figure > img { object-fit: cover; object-position: 50% 100%; }
  .edu__spot { width: 130%; }
  .degree { display: flex; flex-direction: column; justify-content: center; padding: clamp(1.25rem, min(2vw, 3svh), 2.25rem); }
  .degree::before {
    /* a diploma's seal */
    content: ""; position: absolute; top: -0.5rem; right: 1.5rem; width: 1.25rem; height: 2rem;
    background: var(--yellow); clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 78%, 0 100%);
  }
  .degree__obj { position: absolute; float: none; top: clamp(1rem, 2.5svh, 1.75rem); right: 3.25rem; margin: 0; width: min(4.5rem, 8svh); }
  .degree__title { padding-right: min(5rem, 9svh); }
  .degree__title { font-size: clamp(1.375rem, min(2.4vw, 3.8svh), 2.5rem); }
  .degree .stop__org { margin-top: 0.5rem; font-size: clamp(0.75rem, 1.65svh, 0.9375rem); }
  .degree .stop__points { gap: 0.25rem; margin-top: 1.4svh; font-size: clamp(0.75rem, 1.65svh, 0.9375rem); }
  .degree .stop__points li { line-height: 1.32; }
  .degree__sub { margin-top: 2svh; padding-top: 1.6svh; }
  .degree__lead { margin-top: 1svh; font-size: clamp(0.6875rem, 1.55svh, 0.875rem); }
  .degree .stop__proof { margin-top: 1.6svh; }
}

/* ==========================================================================
   8. HOUSE RULES: the rule card, and the rules lit one line at a time
   ========================================================================== */
.rules {
  display: grid; align-items: center; min-height: 100svh; padding-block: clamp(3rem, 6svh, 6rem);
  border-top: 0.0625rem solid var(--line-ink); overflow: clip;
}
.rules__grid { display: grid; gap: clamp(2.5rem, 6vw, 6rem); align-items: center; max-height: none; }
.rules__card { position: relative; width: min(56%, 17rem, 22svh); margin-inline: auto; rotate: -8deg; perspective: 62rem; }
/* a warm halo behind the card, so its dark face separates from the dark table */
.rules__card::before {
  content: ""; position: absolute; inset: -18%; z-index: -1; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(244, 238, 219, 0.18), rgba(244, 238, 219, 0.05) 55%, transparent);
}
.rules__card-in, .rules__card-in.slot.has-img {
  display: block; aspect-ratio: 5 / 7; border-radius: var(--r-card);
  box-shadow:
    0 0 1.25rem 0.125rem rgba(244, 238, 219, 0.35),
    0 0 4rem 0.5rem rgba(244, 238, 219, 0.12),
    0 2.5rem 4rem -2rem rgba(0, 0, 0, 0.85);
}
.rules__card-in.slot { border-radius: var(--r-card); }
.rules__title { font-size: clamp(1.5rem, 2.4vw, 2.25rem); color: var(--yellow); }
.rules__list { display: grid; gap: clamp(0.25rem, 1svh, 0.75rem); margin-top: clamp(1rem, 3svh, 2.5rem); font-size: clamp(1.5rem, min(6vw, 4.2svh), 3.5rem); line-height: 0.98; }
.rules__list li::after { content: "."; color: var(--yellow); }
@media (min-width: 56.25em) {
  .rules__grid { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); }
  /* everything inside 80% of the screen's height */
  .rules { padding-block: 10svh; }
  .rules__grid { height: 80svh; }
  .rules__card { width: auto; max-width: 100%; height: min(66svh, 36rem); aspect-ratio: 5 / 7; }
  .rules__card-in { height: 100%; }
  .rules__list { font-size: clamp(1.75rem, min(3.3vw, 5.4svh), 4rem); }
}

/* ==========================================================================
   9. CREDENTIALS: four cards, one per suit, and the deck they open into
   ========================================================================== */
.proof {
  display: flex; flex-direction: column; justify-content: center; min-height: 100svh;
  padding-block: calc(var(--nav-h) + 3svh) 5svh; border-top: 0.0625rem solid var(--line-ink);
}
.proof .h-xl { font-size: clamp(2.5rem, min(7vw, 10svh), 6.5rem); }
.figures { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; margin-top: 3svh; }
.figures b { display: block; font-size: clamp(2.5rem, min(6vw, 9svh), 5.5rem); line-height: 0.84; color: var(--yellow); }
.figures span { display: block; margin-top: 0.625rem; font-family: var(--font-mono); font-size: 0.75rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.08em; color: var(--on-ink-dim); }
@media (min-width: 56.25em) { .figures { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.suit--spade, .suit--club { --suit: var(--ink); --suit-on-ink: var(--paper); }
.suit--heart, .suit--diamond { --suit: var(--suit-red); --suit-on-ink: var(--suit-red-hi); }
.suits { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(0.5rem, 2.2vw, 2rem); margin-top: 5svh; }
/* never taller than about 42% of the screen, so the section stays one screen */
.suit-card { position: relative; container-type: inline-size; justify-self: center; width: min(100%, 30svh); }
.suit-card:nth-child(odd) { rotate: -1.4deg; }
.suit-card:nth-child(even) { rotate: 1.2deg; translate: 0 2%; }
.suit-card__face {
  position: relative; display: grid; grid-template-rows: minmax(0, 1fr) auto auto; justify-items: center;
  width: 100%; aspect-ratio: 5 / 7; padding: 9cqi 7cqi 8cqi; border-radius: var(--r-card);
  background: var(--paper); color: var(--ink);
  box-shadow: inset 0 0 0 0.0625rem var(--line-light), 0 1.6rem 2.8rem -1.6rem rgba(0, 0, 0, 0.75);
  transition: transform var(--dur-menu) var(--ease-out), box-shadow var(--dur-menu) var(--ease-out);
}
.suit-card__face:focus-visible { outline: 0.125rem solid var(--yellow); outline-offset: 0.25rem; }
.suit-card__face:active { transform: scale(0.98); }
.suit-card__corner {
  position: absolute; top: 5cqi; left: 6.5cqi; font-family: var(--font-serif); font-size: 12cqi; line-height: 1; color: var(--suit);
}
.suit-card__corner--end { top: auto; left: auto; bottom: 5cqi; right: 6.5cqi; rotate: 180deg; }
.suit-card__pip { align-self: center; font-family: var(--font-serif); font-size: 44cqi; line-height: 1; color: var(--suit); }
.suit-card__title { font-size: 11.5cqi; text-align: center; }
.suit-card__open {
  margin-top: 4cqi; font-family: var(--font-mono); font-size: clamp(0.4375rem, 4cqi, 0.75rem); font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.16em; color: var(--on-light-dim); opacity: 0.75;
  transition: opacity var(--dur-hover) ease;
}
.suit-card__open .arr { transition: transform var(--dur-hover) var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  .suit-card__face:hover { transform: translateY(-3%); box-shadow: inset 0 0 0 0.0625rem var(--line-light), 0 2.2rem 3.4rem -1.6rem rgba(0, 0, 0, 0.85); }
  .suit-card__face:hover .suit-card__open { opacity: 1; }
  .suit-card__face:hover .suit-card__open .arr { transform: translate(0.125rem, -0.125rem); }
}

/* the deck: one pop-up, a section per card, previous and next on the sides (a loop) */
.deck {
  width: 80vw; max-width: none; height: 90dvh; max-height: none;
  margin: auto; padding: 0; border: 0; border-radius: var(--r-card); overflow: hidden;
  background: var(--ink-2); color: var(--paper);
  box-shadow: 0 2.5rem 6.25rem -1.875rem rgba(0, 0, 0, 0.8), inset 0 0 0 0.0625rem var(--line-ink);
  opacity: 0; transform: scale(0.96);
  transition: opacity var(--dur-modal) var(--ease-out), transform var(--dur-modal) var(--ease-out),
    overlay var(--dur-modal) allow-discrete, display var(--dur-modal) allow-discrete;
}
.deck[open] {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-rows: auto minmax(0, 1fr);
  opacity: 1; transform: scale(1);
}
.deck::backdrop {
  background: rgba(10, 10, 9, 0.78); -webkit-backdrop-filter: blur(0.375rem); backdrop-filter: blur(0.375rem); opacity: 0;
  transition: opacity var(--dur-modal) var(--ease-out), overlay var(--dur-modal) allow-discrete, display var(--dur-modal) allow-discrete;
}
.deck[open]::backdrop { opacity: 1; }
@starting-style {
  .deck[open] { opacity: 0; transform: scale(0.96); }
  .deck[open]::backdrop { opacity: 0; }
}
.deck__bar {
  grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 0.75rem 0.75rem 0.75rem clamp(1.25rem, 3vw, 2.5rem); border-bottom: 0.0625rem solid var(--line-ink);
  font-family: var(--font-mono); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.12em; color: var(--on-ink-dim);
}
.deck__nav {
  grid-row: 2; align-self: center; display: grid; justify-items: center; gap: 0.5rem;
  width: clamp(4.5rem, 8vw, 7.5rem); margin: 0 0.5rem; padding: 1.25rem 0.5rem; border-radius: var(--r-card);
  font-family: var(--font-mono); font-size: 0.6875rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--on-ink-dim);
  transition: background-color var(--dur-hover) ease, color var(--dur-hover) ease, transform var(--dur-press) var(--ease-out);
}
.deck__nav:active { transform: scale(0.96); }
.deck__nav:focus-visible { outline: 0.125rem solid var(--yellow); outline-offset: -0.125rem; }
.deck__nav--prev { grid-column: 1; }
.deck__nav--next { grid-column: 3; }
.deck__nav .arr { font-size: 1.25rem; }
.deck__nav-suit { font-family: var(--font-serif); font-size: clamp(2rem, 3vw, 2.75rem); line-height: 1; color: var(--paper); }
.deck__nav:is([data-kind="heart"], [data-kind="diamond"]) .deck__nav-suit { color: var(--suit-red-hi); }
.deck__nav-name { text-align: center; overflow-wrap: anywhere; }
@media (hover: hover) and (pointer: fine) { .deck__nav:hover { background: var(--ink-3); color: var(--paper); } }
.deck__body { grid-column: 2; grid-row: 2; overflow: auto; overscroll-behavior: contain; padding: clamp(1.5rem, 3vw, 3rem) clamp(0.25rem, 1.5vw, 1.5rem) clamp(2rem, 4vw, 4rem); }
.deck__body:focus-visible { outline: none; }
.deck__panel {
  opacity: 1; translate: 0 0;
  transition: opacity 260ms var(--ease-out), translate 260ms var(--ease-out);
}
@starting-style { .deck__panel { opacity: 0; translate: var(--from, 0) 0; } }
.deck__head {
  display: flex; align-items: center; gap: clamp(1rem, 2vw, 1.75rem);
  margin-bottom: clamp(2rem, 4vw, 3.5rem); padding-bottom: clamp(1.25rem, 2.5vw, 2rem); border-bottom: 0.0625rem solid var(--line-ink);
}
.deck__pip { font-family: var(--font-serif); font-size: clamp(3.5rem, 7vw, 6.5rem); line-height: 0.8; color: var(--suit-on-ink); }
.deck__name { font-size: clamp(2.75rem, 7vw, 6rem); }
@media (max-width: 47.9375em) {
  .deck[open] { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto; }
  .deck__body { grid-column: 1 / -1; padding-inline: 1.25rem; }
  .deck__nav { grid-row: 3; width: auto; margin: 0; padding: 0.75rem 1rem; display: flex; justify-content: center; border-radius: 0; border-top: 0.0625rem solid var(--line-ink); }
  .deck__nav--prev { grid-column: 1; }
  .deck__nav--next { grid-column: 2; border-left: 0.0625rem solid var(--line-ink); }
  .deck__nav-suit { font-size: 1.5rem; }
}
@media (prefers-reduced-motion: reduce) {
  .deck, .deck__panel { transform: none; translate: none; }
  @starting-style { .deck[open] { transform: none; } .deck__panel { translate: none; } }
}
/* no JavaScript: the deck is simply the next block on the page */
html:not(.js) dialog.deck { display: block; position: static; width: auto; height: auto; margin-top: 3rem; opacity: 1; transform: none; background: none; box-shadow: none; overflow: visible; }
html:not(.js) .deck__bar, html:not(.js) .deck__nav { display: none; }
html:not(.js) .deck__panel + .deck__panel { margin-top: 4rem; }

/* the four sections inside the deck */
.clusters { display: grid; gap: 2.5rem 2rem; }
.cluster h4 { font-size: clamp(1.5rem, 2vw, 1.875rem); margin-bottom: 0.875rem; }
.cluster li { padding-block: 0.25rem; font-size: 1.0625rem; color: var(--on-ink-dim); }
@media (min-width: 43.75em) { .clusters { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 68.75em) { .clusters { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3.5rem 3rem; } }

.tools { display: grid; gap: 2rem 3rem; }
.tools > div { padding-top: 1.25rem; border-top: 0.0625rem solid var(--line-ink); }
.tools dt { font-family: var(--font-mono); font-size: 0.75rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.08em; color: var(--yellow); }
.tools dd { margin-top: 0.5rem; font-size: clamp(1.375rem, 2.2vw, 2rem); font-weight: 600; line-height: 1.2; letter-spacing: -0.01em; }
@media (min-width: 43.75em) { .tools { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 75em) { .tools { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.langs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(0.75rem, 1.6vw, 1.25rem); }
.lang-tile {
  position: relative; isolation: isolate; overflow: hidden; container-type: inline-size;
  display: flex; flex-direction: column; min-height: clamp(9rem, 24svh, 15rem); padding: clamp(1rem, 2.2vw, 1.75rem);
  border-radius: var(--r-card); background: var(--ink); box-shadow: inset 0 0 0 0.0625rem var(--line-ink);
}
/* the language's own script, large and quiet behind the level */
.lang-tile__script {
  position: absolute; z-index: -1; right: 4cqi; top: 50%; translate: 0 -50%;
  font-family: var(--font-serif), "Noto Sans Tamil", "Tamil Sangam MN", "Kohinoor Devanagari", "Kohinoor Telugu", "Nirmala UI", sans-serif;
  font-size: 58cqi; line-height: 1; font-weight: 700; color: rgba(255, 222, 102, 0.13);
}
.lang-tile__name { font-size: clamp(1.125rem, 11cqi, 2.25rem); }
.lang-tile__level { margin-top: auto; font-size: clamp(2.5rem, 34cqi, 6rem); line-height: 0.82; color: var(--yellow); }
.lang-tile__level--word { font-size: clamp(1.75rem, 19cqi, 3.75rem); }
.lang-tile__note {
  margin-top: 0.75rem; max-width: 30ch; font-family: var(--font-mono); font-size: 0.6875rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.06em; line-height: 1.5; color: var(--on-ink-dim);
}
@media (min-width: 56.25em) { .langs { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.certs { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 24rem), 1fr)); }
.cert { padding: clamp(1.25rem, 2.2vw, 1.75rem); border-radius: var(--r-card); background: var(--ink); box-shadow: inset 0 0 0 0.0625rem var(--line-ink); }
.cert__name { font-size: clamp(1.25rem, 1.8vw, 1.5rem); font-weight: 600; letter-spacing: -0.01em; }
.cert__meta { margin-top: 0.25rem; font-size: 0.9375rem; color: var(--yellow); }
.cert__body { display: grid; gap: 0.625rem; margin-top: 1.125rem; padding-top: 1.125rem; border-top: 0.0625rem solid var(--line-ink); }
.cert__body li { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 0.25rem 1.25rem; color: var(--on-ink-dim); }
.cert__links { display: inline-flex; gap: 1.125rem; }
.cert__links a { color: var(--paper); text-decoration-color: var(--yellow); text-decoration-thickness: 0.0938rem; text-underline-offset: 0.25rem; }

/* ==========================================================================
   9. CONTACT
   ========================================================================== */
.contact { position: relative; background: var(--ink); color: var(--ink); color-scheme: light; }
.contact__bg { display: none; }
.contact__inner {
  overflow: clip; padding-top: clamp(6rem, 12vw, 11.25rem);
  background: radial-gradient(80% 60% at 70% 30%, var(--yellow-hi) 0%, var(--yellow) 60%);
}
.contact__grid { display: grid; gap: 2.5rem; }
.contact__main { padding-bottom: clamp(3rem, 6vw, 6rem); }
.slip {
  display: grid; gap: 1.375rem; max-width: 40rem; margin-top: 2.5rem; padding: clamp(1.25rem, 3vw, 2rem);
  border-radius: var(--r-card); background: var(--paper);
  box-shadow: inset 0 0 0 0.0625rem var(--line-light), 0 2.125rem 3.75rem -2.125rem rgba(70, 52, 0, 0.6);
}
.slip legend, .field label {
  display: block; margin-bottom: 0.625rem; padding: 0;
  font-family: var(--font-mono); font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em;
}
.field label span { font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--on-light-dim); }
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip { position: relative; }
.chip input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.chip span {
  display: inline-flex; align-items: center; height: 2.5rem; padding: 0 0.9375rem;
  border: 0.0938rem solid rgba(18, 18, 17, 0.45); border-radius: var(--r-pill); font-size: 0.9375rem; font-weight: 500;
  transition: background-color var(--dur-hover) ease, color var(--dur-hover) ease, border-color var(--dur-hover) ease;
}
.chip input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.chip input:focus-visible + span { outline: 0.125rem solid var(--ink); outline-offset: 0.125rem; }
.slip__two { display: grid; gap: 1.375rem; }
@media (min-width: 38.75em) { .slip__two { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.field input, .field textarea {
  width: 100%; padding: 0.75rem 0.875rem; border: 0.0938rem solid rgba(18, 18, 17, 0.5); border-radius: var(--r-input);
  background: #fbf8ee; color: var(--ink); font: inherit; line-height: 1.4;
  transition: border-color var(--dur-hover) ease;
}
.field textarea { resize: vertical; min-height: 7rem; }
.field input:focus-visible, .field textarea:focus-visible { outline: 0.125rem solid var(--ink); outline-offset: 0.125rem; border-color: var(--ink); }
.field [aria-invalid="true"] { border-color: var(--error); }
.field__error { margin-top: 0.5rem; font-size: 0.875rem; font-weight: 500; color: var(--error); }
.field__help { margin-top: 0.5rem; font-size: 0.875rem; color: var(--on-light-dim); }
.magnet { display: inline-block; justify-self: start; }
.contact__figure { width: min(100%, 32.5rem); aspect-ratio: 3 / 4; justify-self: center; align-self: end; }
.contact__figure > img { transition: opacity 260ms ease; }
.contact__figure > img.react { opacity: 0; }
.contact__figure.is-reacting > img:not(.react) { opacity: 0; }
.contact__figure.is-reacting > img.react { opacity: 1; }
@media (min-width: 64em) {
  .contact__grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(2rem, 5vw, 5rem); align-items: end; }
  .contact__figure { width: 100%; max-height: 82svh; }
}
/* ==========================================================================
   10. FOOTER
   ========================================================================== */
.foot { padding-block: clamp(4rem, 8vw, 7rem) 2.25rem; background: var(--black); color: var(--paper); }
.reach { display: grid; gap: 2.5rem; }
.reach__col { display: grid; gap: 1.75rem; align-content: start; }
.reach dt { font-family: var(--font-mono); font-size: 0.6875rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: var(--on-ink-dim); }
.reach dd { margin-top: 0.5rem; font-size: clamp(1.0625rem, 1.35vw, 1.3125rem); font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }
.reach a { text-decoration: underline; text-decoration-color: var(--line-ink); text-decoration-thickness: 0.0938rem; text-underline-offset: 0.3em; transition: color var(--dur-hover) ease, text-decoration-color var(--dur-hover) ease; }
@media (hover: hover) and (pointer: fine) { .reach a:hover { color: var(--yellow); text-decoration-color: var(--yellow); } }
.avail { display: inline-flex; align-items: center; gap: 0.7em; }
.reach__aside { display: block; margin-top: 0.25rem; font-size: 0.9375em; font-weight: 400; color: var(--on-ink-dim); }

.foot__brand { display: flex; align-items: center; gap: 0.85em; font-size: clamp(1.375rem, 2vw, 2rem); line-height: 1; }
.foot__brand .display { font-size: 1em; }
.foot__brand .logo { width: 1.4375em; }
/* work status: yellow checks, nothing louder */
.status-card { margin: 0; }
.status-card dt { color: var(--on-ink-dim); }
.status-card dd { display: grid; gap: 0.55em; margin-top: 0.5rem; font-size: clamp(1.0625rem, 1.35vw, 1.3125rem); line-height: 1.3; }
.status-card__line { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.75em; align-items: baseline; }
.status-card__line::before {
  content: ""; width: 0.6em; height: 0.32em; translate: 0 -0.2em; rotate: -45deg;
  border-left: 0.14em solid var(--yellow); border-bottom: 0.14em solid var(--yellow);
}
/* stacked (below three columns): the name and the work status sit centred */
@media (max-width: 63.9375em) {
  .reach__col--status { justify-items: center; text-align: center; }
  .foot__brand { justify-content: center; }
  .status-card { display: grid; justify-items: center; }
  .status-card dd { justify-items: start; text-align: left; }
}
@media (min-width: 43.75em) {
  .reach { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3rem 2.5rem; }
  .reach__col--status { grid-column: 1 / -1; }
}
@media (min-width: 64em) {
  .reach { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.2fr); gap: clamp(2rem, 4vw, 4.5rem); }
  .reach__col--status { grid-column: auto; }
}
.foot__row {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.875rem 2rem;
  margin-top: clamp(3.5rem, 7vw, 6rem); padding-top: 1.5rem; border-top: 0.0625rem solid var(--line-ink);
  font-family: var(--font-mono); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--on-ink-dim);
}
.foot__links { display: flex; flex-wrap: wrap; gap: 0.625rem 1.5rem; }
.foot__links a { text-decoration: none; transition: color var(--dur-hover) ease; }
@media (hover: hover) and (pointer: fine) { .foot__links a:hover { color: var(--yellow); } }

/* ==========================================================================
   DIALOGS (project sheets)
   ========================================================================== */
html:has(dialog[open]) { overflow: hidden; }
.sheet {
  width: min(70rem, calc(100% - 1.5rem)); max-width: none; max-height: calc(100dvh - 1.5rem);
  margin: auto; padding: 0; border: 0; border-radius: var(--r-card); overflow: hidden;
  background: var(--ink-2); color: var(--paper);
  box-shadow: 0 2.5rem 6.25rem -1.875rem rgba(0, 0, 0, 0.8), inset 0 0 0 0.0625rem var(--line-ink);
  opacity: 0; transform: scale(0.96);
  transition: opacity var(--dur-modal) var(--ease-out), transform var(--dur-modal) var(--ease-out),
    overlay var(--dur-modal) allow-discrete, display var(--dur-modal) allow-discrete;
}
.sheet--narrow { width: min(55rem, calc(100% - 1.5rem)); }
.sheet[open] { display: flex; flex-direction: column; opacity: 1; transform: scale(1); }
.sheet::backdrop {
  background: rgba(10, 10, 9, 0.74); -webkit-backdrop-filter: blur(0.375rem); backdrop-filter: blur(0.375rem); opacity: 0;
  transition: opacity var(--dur-modal) var(--ease-out), overlay var(--dur-modal) allow-discrete, display var(--dur-modal) allow-discrete;
}
.sheet[open]::backdrop { opacity: 1; }
@starting-style {
  .sheet[open] { opacity: 0; transform: scale(0.96); }
  .sheet[open]::backdrop { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .sheet { transform: none; }
  @starting-style { .sheet[open] { transform: none; } }
}
.sheet__bar {
  flex: none; display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 0.75rem 0.75rem 0.75rem clamp(1.25rem, 4vw, 2.5rem); border-bottom: 0.0625rem solid var(--line-ink);
  font-family: var(--font-mono); font-size: 0.6875rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.08em; color: var(--on-ink-dim);
}
.sheet__close {
  display: inline-flex; align-items: center; gap: 0.5rem; height: 2.5rem; padding: 0 1rem; border-radius: var(--r-pill);
  background: var(--ink-3); color: var(--paper); font-family: var(--font-sans); font-size: 0.9375rem; font-weight: 600; text-transform: none; letter-spacing: 0;
  transition: transform var(--dur-press) var(--ease-out), background-color var(--dur-hover) ease;
}
.sheet__close:active { transform: scale(0.97); }
.sheet__body { overflow: auto; overscroll-behavior: contain; padding: clamp(1.5rem, 4vw, 2.75rem) clamp(1.25rem, 4vw, 2.5rem) clamp(2rem, 5vw, 3.5rem); }
.sheet__title { font-size: clamp(2.75rem, 7vw, 5.5rem); }
.sheet__lede { margin-top: 0.75rem; max-width: 40ch; font-size: clamp(1.125rem, 1.7vw, 1.4375rem); font-weight: 600; line-height: 1.25; color: var(--yellow); }
.sheet__cols { display: grid; gap: 2.25rem; margin-top: 2.25rem; }
.sheet__text { display: grid; gap: 1rem; align-content: start; max-width: 66ch; color: var(--on-ink-dim); line-height: 1.55; }
.sheet__text--solo { margin-top: 1.75rem; }
.sheet__proves { padding-top: 1rem; border-top: 0.0625rem solid var(--line-ink); color: var(--paper); font-weight: 600; }
.sheet__side { display: grid; gap: 0.75rem; align-content: start; justify-items: start; }
.sheet__side h4 { margin-top: 0.875rem; font-family: var(--font-mono); font-size: 0.6875rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.08em; color: var(--yellow); }
.sheet__side h4:first-child { margin-top: 0; }
.sheet__tags { color: var(--on-ink-dim); font-size: 0.9375rem; line-height: 1.5; }
.pod { width: 100%; }
.pod figcaption { margin-bottom: 0.375rem; font-size: 0.9375rem; font-weight: 600; }
.sheet__figure { margin-top: 1.75rem; }
.sheet__figure img { width: 100%; border-radius: var(--r-media); background: var(--ink-3); }
.sheet__figure figcaption { margin-top: 0.625rem; font-size: 0.875rem; color: var(--on-ink-dim); }
@media (min-width: 56.25em) { .sheet__cols { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 3.5rem; } }

.shots { margin-top: 1.75rem; }
.shots__track { display: flex; gap: 0.75rem; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: var(--r-media); }
.shots__track::-webkit-scrollbar { display: none; }
.shots__track figure { flex: 0 0 100%; scroll-snap-align: start; }
.shots--portrait .shots__track figure { flex-basis: min(60%, 18.75rem); }
.shots__track img { width: 100%; border-radius: var(--r-media); background: var(--ink-3); }
.shots__track figcaption { margin-top: 0.625rem; font-size: 0.875rem; color: var(--on-ink-dim); }
.shots__track:focus-visible { outline: 0.125rem solid var(--yellow); outline-offset: 0.1875rem; }
.shots__nav { display: flex; justify-content: flex-end; gap: 0.5rem; margin-top: 0.75rem; }
.shots__nav button {
  width: 2.75rem; height: 2.75rem; border-radius: 50%; box-shadow: inset 0 0 0 0.0625rem var(--line-ink); font-size: 1.0625rem;
  transition: transform var(--dur-press) var(--ease-out), background-color var(--dur-hover) ease;
}
.shots__nav button:active { transform: scale(0.94); }
@media (hover: hover) and (pointer: fine) { .shots__nav button:hover { background: var(--ink-3); } }

/* an older object standing in for a scene that has not been generated yet: keep it modest */
.stop__visual.is-fallback > img { top: 16%; left: 16%; width: 68%; height: 68%; }

/* ==========================================================================
   SECTIONS ARE SCREENS
   Every section is at least one screen. From 1024px with motion allowed (.cine-panels) each is
   exactly one screen, pinned while its own timeline builds it, then released (site.js B3a-B3g).
   ========================================================================== */
main > section:not(.hero) { min-height: 100svh; display: flex; flex-direction: column; justify-content: center; }
.contact__inner { flex: 1; }
/* the journey's pinned stage must not sit in a flex parent (pin spacing) */
.cine-journey .journey { display: block; }

.cine-panels :is(.roles, .work, .edu, .before, .rules, .proof) {
  height: 100svh; min-height: 0; overflow: clip; border-top: 0;
  padding-block: calc(var(--nav-h) + 3svh) 4svh;
}
.cine-panels :is(.roles, .work, .before) .h-xl { font-size: clamp(2.5rem, min(6.4vw, 11svh), 6.75rem); }
.cine-panels :is(.roles, .work) .lede { margin-top: 1.25svh; }

/* roles: four across, sized by the screen's height so the hand always fits */
.cine-panels .hand {
  grid-auto-flow: row; grid-template-columns: repeat(4, minmax(0, 1fr)); justify-items: center; align-items: center;
  gap: clamp(1rem, 2vw, 1.75rem); margin: 4svh 0 0; padding: 0; overflow: visible;
}
.cine-panels .rcard { width: min(100%, 37svh); rotate: none; translate: none; }

/* work: the title stays, the bento scrolls inside a window that fades at its top and bottom 5% */
.cine-panels .work { justify-content: flex-start; padding-bottom: 0; }
.cine-panels .work > .wrap { display: flex; flex-direction: column; min-height: 0; height: 100%; }
.cine-panels .work__scroller {
  flex: 1; min-height: 0; overflow: hidden; margin-top: 2svh;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 5%, #000 95%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 5%, #000 95%, transparent 100%);
}
.cine-panels .work__track { padding-block: 4svh 8svh; will-change: transform; }
.cine-panels .bento { margin-top: 0; }

/* education: the diplomas sit behind the graduate until they slide out */
.cine-panels .edu { height: 100svh; }
.cine-panels .edu__mascot { z-index: 2; }
.cine-panels .degree { z-index: 1; }

/* before the products */
.cine-panels .before .fan { --w: clamp(12rem, min(20vw, 30svh), 19rem); margin-top: 5svh; padding-block: 3svh 0; }

/* house rules: one screen already; just no rule above it */
.cine-panels .rules { padding-block: 10svh; }

/* credentials: the stack's resting tilt comes from the timeline */
.cine-panels .suit-card { rotate: none; translate: none; }

/* contact: the dark stage with only the figure; the circle (site.js) brings the yellow and the slip */
.cine-panels .contact { height: 100svh; min-height: 0; }
.cine-panels .contact__inner { position: relative; display: flex; flex-direction: column; height: 100%; padding-top: calc(var(--nav-h) + 3svh); background: none; overflow: clip; }
.cine-panels .contact__bg {
  display: block; position: absolute; inset: 0; z-index: 0;
  background: radial-gradient(80% 60% at 70% 30%, var(--yellow-hi) 0%, var(--yellow) 60%);
}
.cine-panels .contact__grid { position: relative; z-index: 1; flex: 1; min-height: 0; align-items: end; }
.cine-panels .contact .h-xl { font-size: clamp(2.25rem, min(6vw, 9svh), 6rem); }
.cine-panels .contact .lede { margin-top: 1.25svh; }
.cine-panels .slip { margin-top: 2svh; gap: 1.5svh; padding: clamp(1rem, 2.4svh, 2rem); }
.cine-panels .slip legend, .cine-panels .field label { margin-bottom: 0.9svh; }
.cine-panels .chip span { height: clamp(2rem, 4.4svh, 2.5rem); }
.cine-panels .field textarea { min-height: 7svh; }
.cine-panels .contact__main { padding-bottom: 3svh; align-self: center; }
.cine-panels .contact__figure { width: auto; height: 100%; max-height: 82svh; max-width: 100%; aspect-ratio: 3 / 4; justify-self: end; }

/* ==========================================================================
   V5 (20 Nov 2026): cues that say "this opens" and "this swipes", and the vertical layouts
   ========================================================================== */

/* ---------- Work: every tile that opens says so ---------- */
.tap-hint {
  display: flex; align-items: center; gap: 0.75rem; margin-top: 1.25rem;
  font-family: var(--font-mono); font-size: 0.75rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.08em; color: var(--yellow);
}
.tap-hint__ico {
  display: grid; place-items: center; flex: none; width: 1.75rem; height: 1.75rem; border-radius: 50%;
  background: var(--yellow); color: var(--ink); font-size: 0.875rem;
}
.cell__open {
  position: absolute; z-index: 2; top: clamp(0.5rem, 3.4cqi, 1.25rem); right: clamp(0.5rem, 3.4cqi, 1.25rem);
  display: inline-flex; align-items: center; gap: 0.45em; height: clamp(1.625rem, 9cqi, 2.25rem); padding: 0 0.85em;
  border-radius: var(--r-pill); background: var(--yellow); color: var(--ink); pointer-events: none;
  font-family: var(--font-mono); font-size: clamp(0.5625rem, 3cqi, 0.75rem); font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em;
  box-shadow: 0 0.5rem 1.25rem -0.75rem rgba(0, 0, 0, 0.6);
  transition: background-color var(--dur-hover) ease, scale var(--dur-menu) var(--ease-out);
}
.cell__open .arr { font-size: 1.25em; line-height: 1; transition: rotate var(--dur-menu) var(--ease-out); }
.cell--yellow .cell__open, .cell--glare .cell__open, .cell--paper .cell__open { background: var(--ink); color: var(--yellow); }
@media (hover: hover) and (pointer: fine) {
  .cell:hover .cell__open { scale: 1.06; }
  .cell:hover .cell__open .arr { rotate: 45deg; }
}
.cell:has(.cell__title button:focus-visible) .cell__open .arr { rotate: 45deg; }
/* a narrow tile keeps the arrow and drops the word */
@container (max-width: 13rem) {
  .cell__open { width: clamp(1.625rem, 14cqi, 2rem); height: clamp(1.625rem, 14cqi, 2rem); padding: 0; justify-content: center; }
  .cell__open-t { display: none; }
}
/* the titles keep clear of the badge */
.cell__meta { padding-right: 7rem; }
@container (max-width: 13rem) { .cell__meta { padding-right: 2.25rem; } }
/* the badges pulse once, in a wave, when the bento first scrolls in */
@keyframes open-pulse {
  0%, 100% { box-shadow: 0 0.5rem 1.25rem -0.75rem rgba(0, 0, 0, 0.6), 0 0 0 0 rgba(255, 222, 102, 0.55); }
  45% { box-shadow: 0 0.5rem 1.25rem -0.75rem rgba(0, 0, 0, 0.6), 0 0 0 0.6rem rgba(255, 222, 102, 0); }
}
@media (prefers-reduced-motion: no-preference) {
  .bento.is-seen .cell__open { animation: open-pulse 1.1s var(--ease-out) 2; }
  .bento.is-seen .cell:nth-child(2) .cell__open { animation-delay: 0.08s; }
  .bento.is-seen .cell:nth-child(3) .cell__open { animation-delay: 0.16s; }
  .bento.is-seen .cell:nth-child(4) .cell__open { animation-delay: 0.24s; }
  .bento.is-seen .cell:nth-child(5) .cell__open { animation-delay: 0.32s; }
  .bento.is-seen .cell:nth-child(6) .cell__open { animation-delay: 0.4s; }
  .bento.is-seen .cell:nth-child(n+7) .cell__open { animation-delay: 0.48s; }
}

/* ---------- swipe rows: dots, a label and a count under the row; one nudge when first seen ---------- */
.swipe {
  display: flex; align-items: center; justify-content: center; gap: 0.875rem; margin-top: -0.75rem; margin-bottom: 0.5rem;
  font-family: var(--font-mono); font-size: 0.6875rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.08em; color: var(--on-ink-dim);
}
.swipe[hidden] { display: none; }
.swipe__dots { display: flex; gap: 0.375rem; }
.swipe__dots i { width: 0.4375rem; height: 0.4375rem; border-radius: var(--r-pill); background: currentColor; opacity: 0.35; transition: width var(--dur-menu) var(--ease-out), opacity var(--dur-menu) ease, background-color var(--dur-menu) ease; }
.swipe__dots i.is-on { width: 1.25rem; opacity: 1; background: var(--yellow); }
.swipe__label { display: inline-flex; align-items: center; gap: 0.5em; color: var(--yellow); }
.swipe__hand { position: relative; width: 1.5em; height: 0.75em; }
.swipe__hand::before, .swipe__hand::after { content: ""; position: absolute; top: 50%; }
.swipe__hand::before { left: 0; right: 0.15em; height: 0.09em; translate: 0 -50%; background: currentColor; }
.swipe__hand::after { right: 0; width: 0.42em; height: 0.42em; translate: 0 -50%; rotate: 45deg; border-top: 0.09em solid currentColor; border-right: 0.09em solid currentColor; }
.swipe.is-end .swipe__label { opacity: 0.45; }
.swipe__count { font-variant-numeric: tabular-nums; }
@keyframes swipe-hand { 0%, 100% { translate: 0 0; } 50% { translate: 0.35em 0; } }
@keyframes swipe-nudge { 0%, 100% { translate: 0 0; } 40% { translate: -2.75rem 0; } 70% { translate: 0.375rem 0; } }
@media (prefers-reduced-motion: no-preference) {
  .swipe:not(.is-end) .swipe__hand { animation: swipe-hand 1.4s ease-in-out infinite; }
  .is-nudge > * { animation: swipe-nudge 1.2s var(--ease-out) 2; }
}
/* the cue under the hero cards sits on the yellow table */
.payoff .swipe { color: var(--on-light-dim); }
.payoff .swipe__label, .payoff .swipe__dots i.is-on { color: var(--ink); background-color: transparent; }
.payoff .swipe__dots i.is-on { background: var(--ink); }
/* inside a sheet: the cue sits beside the arrows */
.shots .swipe { margin: 0.75rem 0 0; justify-content: flex-start; }
.shots__nav + .swipe { margin-top: -2.75rem; min-height: 2.75rem; padding-right: 7rem; white-space: nowrap; }
@media (max-width: 47.9375em) { .shots .swipe__label { display: none; } }

/* ---------- sheets: the close button never scrolls away ---------- */
.sheet__bar { position: sticky; top: 0; z-index: 3; background: var(--ink-2); }
.sheet__bar p { min-width: 0; }

/* ---------- vertical screens (phones and portrait tablets) ---------- */
@media (max-width: 47.9375em), (max-aspect-ratio: 999/1000) {
  /* Work: the face-down tile steps aside; Glare Publications takes the full row */
  .cell--client { display: none; }
  .cell--glare { grid-column: 1 / -1; }
  /* Credentials: two rows of two, each card at its own tilt (site.js sets --tilt) */
  .suits { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1.25rem, 5vw, 2.5rem) clamp(0.875rem, 4vw, 2rem); width: min(100%, 34rem); margin-inline: auto; }
  .suit-card, .suit-card:nth-child(odd), .suit-card:nth-child(even) { width: min(100%, 26svh); rotate: var(--tilt, -2deg); translate: 0 var(--lift, 0); }
  /* sheets: nearly the whole screen, close always in reach */
  .sheet { width: calc(100% - 1rem); max-height: calc(100dvh - 1rem); }
  .sheet__bar { padding-left: 1.25rem; }
  .sheet__close { background: var(--yellow); color: var(--ink); }
}
/* About, stacked (below 1024px): the fun fact sits under the picture, at the same tilt */
@media (max-width: 63.9375em) {
  .about__side { display: flex; flex-direction: column; }
  .note { position: relative; top: auto; right: auto; align-self: flex-end; margin: -1.5rem 0.75rem 0 0; max-width: min(30ch, 86%); }
}

/* ---------- footer: "Work status" lines up with its checks on every screen ---------- */
.status-card { text-align: left; }
.status-card dt { justify-self: start; text-align: left; }
@media (max-width: 63.9375em) {
  .status-card { display: grid; justify-items: start; justify-self: center; text-align: left; }
}
