/* ============================================================================
   ATELIER — Aditya Kumar Gupta
   ----------------------------------------------------------------------------
   Art direction: warm obsidian and brass. Bodoni Moda (Didone) against Jost
   (geometric sans). Hairlines instead of borders; light instead of glow; zero
   radius everywhere. Data is set as ruled ledgers and numeral plates rather
   than cards, because cards are what everyone else does.

   Layer order (z):
     0  WebGL canvas .......... fixed, alpha, behind everything
     2  page content .......... opaque sections sit over the canvas
     3  aura + graticule ...... cursor light, blended over content
     4  grain ................. tactile surface, over everything but the cursor
     60 masthead / to-top
     99 cursor
   ========================================================================== */

/* ── 1. RESET ─────────────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }

* {
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

img, svg { display: block; max-width: 100%; }
ul, ol { list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
dl, dd, dt, figure { margin: 0; }

::selection { background: rgb(201 169 97 / 0.85); color: #0A0908; }

/* ── 2. TOKENS ────────────────────────────────────────────────────────── */

:root {
  /* Primitives — warm obsidian. Never blue-black: blue-black is the tell. */
  --noir-950: #0A0908;
  --noir-900: #100E0C;
  --noir-850: #15120F;
  --noir-800: #1C1815;
  --noir-700: #2A241E;
  --noir-600: #3B342B;

  /* Primitives — parchment */
  --ivory-050: #F8F4EC;
  --ivory-100: #EDE7DA;
  --ivory-200: #DED6C5;
  --ivory-300: #CFC7B7;
  --ivory-500: #9C9385;
  --ivory-600: #756E62;

  /* Primitives — brass. The only accent on the page. */
  --brass-200: #EEDCB4;
  --brass-300: #DCC38C;
  --brass-400: #C9A961;
  --brass-500: #A98A45;
  --brass-600: #7C6430;

  /* Channels, for JS and for alpha composition */
  --brass-rgb: 201 169 97;
  --ivory-rgb: 237 231 218;
  --noir-rgb: 10 9 8;

  /* Semantic — dark act (default) */
  --bg: var(--noir-950);
  --bg-raise: var(--noir-900);
  --text: var(--ivory-100);
  --text-hi: var(--ivory-050);
  --text-mute: var(--ivory-500);
  --text-faint: var(--ivory-600);
  --accent: var(--brass-400);
  --accent-soft: var(--brass-600);
  --rule: rgb(var(--ivory-rgb) / 0.13);
  --rule-soft: rgb(var(--ivory-rgb) / 0.07);
  --rule-strong: rgb(var(--ivory-rgb) / 0.26);

  /* Type */
  --serif: 'Bodoni Moda', 'Bodoni MT', Didot, 'Didot LT STD', 'Times New Roman', serif;
  --sans: 'Jost', 'Futura', 'Century Gothic', 'Helvetica Neue', system-ui, sans-serif;

  --fs-display: clamp(2.75rem, 1.45rem + 5.4vw, 6.75rem);   /*  44 →  108 px */
  --fs-h2:      clamp(2rem, 1.42rem + 2.4vw, 3.75rem);      /*  32 →   60 px */
  --fs-h3:      clamp(1.375rem, 1.14rem + 0.98vw, 2.125rem);/*  22 →   34 px */
  --fs-numeral: clamp(2.75rem, 1.7rem + 4.4vw, 5.25rem);    /*  44 →   84 px */
  --fs-plate:   clamp(3.5rem, 1.9rem + 6.6vw, 9rem);        /*  56 →  144 px */
  --fs-lede:    clamp(1.0625rem, 0.96rem + 0.44vw, 1.375rem);
  --fs-body:    clamp(0.9375rem, 0.9rem + 0.2vw, 1.0625rem);
  --fs-micro:   0.6875rem;

  /* Weights. A Didone's hairlines are its whole character, but on a dark
     ground at 400 they fall under a device pixel and the letterforms read as
     half-drawn. Everything is set a step or two up from the print default. */
  --w-display: 600;   /* Bodoni at 40px and above */
  --w-serif: 600;     /* Bodoni at text and subhead sizes — hairlines suffer most here */
  --w-body: 400;      /* Jost running text */
  --w-lede: 300;      /* Jost at lede sizes, where 400 would shout */
  --w-label: 500;     /* Jost small caps */

  --lh-tight: 0.94;
  --lh-snug: 1.18;
  --lh-body: 1.72;

  --track-micro: 0.24em;
  --track-tight: -0.015em;

  /* Space — a 4px-derived scale, generous at the top end */
  --s-1: 0.25rem;  --s-2: 0.5rem;   --s-3: 0.75rem;  --s-4: 1rem;
  --s-5: 1.5rem;   --s-6: 2rem;     --s-7: 3rem;     --s-8: 4rem;
  --s-9: 6rem;     --s-10: 8rem;    --s-11: 11rem;   --s-12: 15rem;

  /* Layout */
  --measure: 1280px;
  --gutter: clamp(1.25rem, 0.4rem + 3.4vw, 4.5rem);
  --head-h: 88px;
  --section-y: clamp(5.5rem, 3rem + 9vw, 11rem);

  /* Motion — one easing family, so nothing feels borrowed */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-io: cubic-bezier(0.62, 0.05, 0.2, 1);
  --t-fast: 240ms;
  --t-mid: 520ms;
  --t-slow: 900ms;
}

/* The ivory act. Scoped to a section, and mirrored onto <body> by JS so the
   cursor and aura invert with it. */
[data-tone="light"] {
  --bg: var(--ivory-100);
  --bg-raise: var(--ivory-050);
  --text: var(--noir-800);
  --text-hi: var(--noir-950);
  --text-mute: #6B6355;
  --text-faint: #8C8475;
  --accent: var(--brass-600);
  --accent-soft: var(--brass-500);
  --rule: rgb(var(--noir-rgb) / 0.16);
  --rule-soft: rgb(var(--noir-rgb) / 0.08);
  --rule-strong: rgb(var(--noir-rgb) / 0.32);
}

/* ── 3. BASE ──────────────────────────────────────────────────────────── */

body {
  background: var(--noir-950);
  color: var(--ivory-100);
  font-family: var(--sans);
  font-size: var(--fs-body);
  font-weight: var(--w-body);
  line-height: var(--lh-body);
  overflow-x: hidden;
  transition: background var(--t-slow) var(--ease);
}

body.tone-light { background: var(--ivory-100); }

/* Everything with a real background sits above the WebGL canvas. */
section { position: relative; z-index: 2; }

.wrap {
  width: 100%;
  max-width: var(--measure);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.ico {
  width: 1em;
  height: 1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.15;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

/* Small caps micro-label — the workhorse of the whole system. */
.micro, .eyebrow, .sec-note, .cue, .idx-n, .plate-kicker,
.standing-meta, .mini-date, .post-until, .facts span, .figure figcaption {
  font-family: var(--sans);
  font-size: var(--fs-micro);
  font-weight: var(--w-label);
  letter-spacing: var(--track-micro);
  text-transform: uppercase;
  line-height: 1.6;
}

/* ── 4. SURFACE OVERLAYS ──────────────────────────────────────────────── */

/* Grain: a real paper tooth, not a gradient. Kept very low so it reads as
   material rather than as an effect. */
.grain {
  position: fixed;
  inset: -50%;
  z-index: 4;
  pointer-events: none;
  opacity: 0.34;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

/* The light that follows the pointer. Blended over the content rather than
   sat behind it, so it lifts type the way a lamp would. */
.aura {
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: 0;
  mix-blend-mode: screen;
  transition: opacity 1200ms var(--ease);
  background:
    radial-gradient(280px circle at var(--mx, 50%) var(--my, 50%),
      rgb(var(--brass-rgb) / 0.13), transparent 70%),
    radial-gradient(760px circle at var(--mx, 50%) var(--my, 50%),
      rgb(var(--brass-rgb) / 0.055), transparent 72%);
}

body.pointer-live .aura { opacity: 1; }

body.tone-light .aura {
  mix-blend-mode: multiply;
  background:
    radial-gradient(300px circle at var(--mx, 50%) var(--my, 50%),
      rgb(124 100 48 / 0.10), transparent 70%),
    radial-gradient(820px circle at var(--mx, 50%) var(--my, 50%),
      rgb(124 100 48 / 0.05), transparent 72%);
}

/* A fine engraved graticule, revealed only in the pool of pointer light.
   This is the page's one second-read moment: the surface has a grid ruled
   into it, and you only ever see the part you are looking at. */
.graticule {
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1400ms var(--ease);
  background-image:
    linear-gradient(rgb(var(--brass-rgb) / 0.5) 1px, transparent 1px),
    linear-gradient(90deg, rgb(var(--brass-rgb) / 0.5) 1px, transparent 1px);
  background-size: 84px 84px;
  background-position: center;
  -webkit-mask-image: radial-gradient(220px circle at var(--mx, 50%) var(--my, 50%),
    #000 0%, rgb(0 0 0 / 0.35) 45%, transparent 74%);
  mask-image: radial-gradient(220px circle at var(--mx, 50%) var(--my, 50%),
    #000 0%, rgb(0 0 0 / 0.35) 45%, transparent 74%);
}

body.pointer-live .graticule { opacity: 0.42; }
body.tone-light .graticule { opacity: 0.3; }

/* ── 5. CURSOR ────────────────────────────────────────────────────────── */

@media (hover: hover) and (pointer: fine) {
  body.cursor-live,
  body.cursor-live a,
  body.cursor-live button,
  body.cursor-live [data-cursor] { cursor: none; }
}

.cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 99;
  display: grid;
  place-items: center;
  width: 0;
  height: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--t-mid) var(--ease);
}

body.cursor-live .cursor { opacity: 1; }

.cursor-ring {
  position: absolute;
  width: 34px;
  height: 34px;
  border: 1px solid rgb(var(--brass-rgb) / 0.75);
  border-radius: 50%;
  background: transparent;
  transition:
    width 560ms var(--ease),
    height 560ms var(--ease),
    background-color 400ms var(--ease),
    border-color 400ms var(--ease);
}

.cursor-dot {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--brass-300);
  transition: opacity 300ms var(--ease), transform 400ms var(--ease);
}

.cursor-label {
  position: absolute;
  font-family: var(--sans);
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--noir-950);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 260ms var(--ease), transform 360ms var(--ease);
  white-space: nowrap;
}

/* Hover over anything interactive: the ring opens and fills, the dot retires,
   the label takes its place. */
body.cursor-hot .cursor-ring {
  width: 88px;
  height: 88px;
  background: rgb(var(--brass-rgb) / 0.92);
  border-color: rgb(var(--brass-rgb) / 0);
}
body.cursor-hot .cursor-dot { opacity: 0; transform: scale(0.2); }
body.cursor-hot .cursor-label { opacity: 1; transform: none; transition-delay: 90ms; }

/* Plain interactive elements with no label: a smaller open ring. */
body.cursor-warm .cursor-ring { width: 56px; height: 56px; border-color: rgb(var(--brass-rgb) / 0.4); }

/* ── 6. WEBGL CANVAS ──────────────────────────────────────────────────── */

.gl {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1600ms var(--ease);
}

.gl.is-live { opacity: 1; }

/* ── 7. MASTHEAD ──────────────────────────────────────────────────────── */

.masthead {
  position: fixed;
  inset: 0 0 auto;
  z-index: 60;
  height: var(--head-h);
  display: flex;
  align-items: center;
  transition: height var(--t-mid) var(--ease), background var(--t-mid) var(--ease);
}

.masthead::after {
  content: '';
  position: absolute;
  inset: auto 0 0;
  height: 1px;
  background: var(--rule-soft);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t-slow) var(--ease);
}

.masthead.is-stuck { height: 68px; background: rgb(var(--noir-rgb) / 0.72); backdrop-filter: blur(14px); }
.masthead.is-stuck::after { transform: none; }
body.tone-light .masthead.is-stuck { background: rgb(248 244 236 / 0.76); }

/* Fixed chrome sits outside the section flow, so it never inherits the ivory
   act's tokens. Hand them over explicitly or the nav goes ivory-on-ivory. */
body.tone-light .masthead,
body.tone-light .to-top {
  --text: var(--noir-800);
  --text-hi: var(--noir-950);
  --text-mute: #6B6355;
  --text-faint: #8C8475;
  --accent: var(--brass-600);
  --rule: rgb(var(--noir-rgb) / 0.16);
  --rule-soft: rgb(var(--noir-rgb) / 0.08);
  --rule-strong: rgb(var(--noir-rgb) / 0.32);
}

body.tone-light .to-top { background: rgb(248 244 236 / 0.6); }

.masthead-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-5);
}

/* Monogram: a Didone A with a hairline and the full name set small. */
.mark { display: flex; align-items: center; gap: var(--s-3); }

.mark-glyph {
  font-family: var(--serif);
  font-size: 1.75rem;
  font-weight: var(--w-serif);
  line-height: 1;
  color: var(--accent);
  transition: color var(--t-fast) var(--ease);
}

.mark-name {
  font-size: 0.625rem;
  font-weight: var(--w-label);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  line-height: 1.35;
  color: var(--text-mute);
  padding-left: var(--s-3);
  border-left: 1px solid var(--rule);
  transition: color var(--t-fast) var(--ease);
}

.mark:hover .mark-name { color: var(--text); }

.nav ol { display: flex; align-items: center; gap: clamp(1rem, 2vw, 2.25rem); }

.nav a {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 0.55em;
  font-size: 0.75rem;
  font-weight: var(--w-body);
  letter-spacing: 0.1em;
  color: var(--text-mute);
  padding-block: 0.35em;
  transition: color var(--t-fast) var(--ease);
}

.nav a i {
  font-family: var(--serif);
  font-style: normal;
  font-size: 0.625rem;
  letter-spacing: 0.06em;
  color: var(--accent);
  opacity: 0.6;
  transition: opacity var(--t-fast) var(--ease);
}

/* Rule draws from the left on hover — never a colour swap. */
.nav a::after {
  content: '';
  position: absolute;
  inset: auto 0 0 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 460ms var(--ease);
}

.nav a:hover, .nav a.is-current { color: var(--text-hi); }
.nav a:hover i, .nav a.is-current i { opacity: 1; }
.nav a:hover::after, .nav a.is-current::after { transform: none; transform-origin: left; }

.head-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-size: var(--fs-micro);
  font-weight: var(--w-label);
  letter-spacing: var(--track-micro);
  text-transform: uppercase;
  color: var(--text);
  padding: 0.85em 1.5em;
  border: 1px solid var(--rule);
  transition: border-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}

.head-cta:hover { border-color: var(--accent); color: var(--accent); }

.head-cta-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  animation: breathe 3.4s var(--ease-io) infinite;
}

@keyframes breathe {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.7); }
}

.menu-btn { display: none; font-size: 22px; color: var(--text); padding: var(--s-2); }
.menu-btn .ico-close { display: none; }
.menu-btn.is-open .ico-open { display: none; }
.menu-btn.is-open .ico-close { display: block; }

/* ── 8. TYPE PRIMITIVES ───────────────────────────────────────────────── */

.display {
  font-family: var(--serif);
  font-optical-sizing: none;
  font-variation-settings: 'opsz' 34;
  font-size: var(--fs-display);
  font-weight: var(--w-display);
  line-height: var(--lh-tight);
  letter-spacing: var(--track-tight);
  color: var(--text-hi);
}

.display em {
  font-style: italic;
  font-weight: var(--w-display);
  color: var(--brass-300);
}

/* Line-mask reveal. Works with CSS alone; GSAP only refines the timing. */
.display .line { display: block; overflow: hidden; padding-bottom: 0.06em; }
.display .line > span { display: block; will-change: transform; }

.lede {
  font-size: var(--fs-lede);
  font-weight: var(--w-lede);
  line-height: 1.56;
  color: var(--text-mute);
  max-width: 46ch;
}

.eyebrow, .micro {
  display: inline-flex;
  align-items: center;
  gap: 0.75em;
  color: var(--text-mute);
}

/* Live indicator — a slow brass pulse, not a blinking status LED. */
.live {
  position: relative;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.live::after {
  content: '';
  position: absolute;
  inset: -5px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  opacity: 0;
  animation: halo 3.6s var(--ease-io) infinite;
}

@keyframes halo {
  0% { opacity: 0.7; transform: scale(0.5); }
  70%, 100% { opacity: 0; transform: scale(1.4); }
}

/* Section heading: roman numeral, rule, title, note. Same anatomy every time
   so the eye stops re-learning the page. */
.sec-head {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: baseline;
  column-gap: var(--s-5);
  padding-bottom: var(--s-6);
  margin-bottom: var(--s-7);
  border-bottom: 1px solid var(--rule);
}

.sec-num {
  font-family: var(--serif);
  font-size: 0.875rem;
  font-weight: var(--w-serif);
  letter-spacing: 0.12em;
  color: var(--accent);
  padding-top: 0.9em;
}

.sec-title {
  font-family: var(--serif);
  font-optical-sizing: none;
  font-variation-settings: 'opsz' 32;
  font-size: var(--fs-h2);
  font-weight: var(--w-display);
  line-height: 1.02;
  letter-spacing: var(--track-tight);
  color: var(--text-hi);
}

.sec-note {
  grid-column: 2;
  color: var(--text-faint);
  margin-top: var(--s-4);
  max-width: 52ch;
}

#practice > .wrap,
#ledger > .wrap,
#work > .wrap,
#practivia > .wrap,
#index > .wrap,
#appointments > .wrap { padding-block: var(--section-y); }

/* ── 9. ACTIONS ───────────────────────────────────────────────────────── */

.actions { display: flex; align-items: center; gap: var(--s-6); flex-wrap: wrap; }
.actions-center { justify-content: center; }

/* Primary: a hairline box that fills from the bottom on hover. No fill, no
   radius, no shadow — the movement of light does the work. */
.btn {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  gap: 0.9em;
  font-size: var(--fs-micro);
  font-weight: var(--w-label);
  letter-spacing: var(--track-micro);
  text-transform: uppercase;
  color: var(--text-hi);
  padding: 1.35em 2.2em;
  border: 1px solid var(--rule-strong);
  overflow: hidden;
  transition: color 420ms var(--ease), border-color 420ms var(--ease);
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--brass-400);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 560ms var(--ease);
}

.btn:hover { color: var(--noir-950); border-color: var(--brass-400); }
.btn:hover::before { transform: none; }
.btn .ico { font-size: 1.15em; transition: transform 520ms var(--ease); }
.btn:hover .ico { transform: translateX(4px); }

/* Secondary: an underlined inline link. A different CTA tier, not a
   second pill. */
.textlink {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.7em;
  font-size: var(--fs-micro);
  font-weight: var(--w-label);
  letter-spacing: var(--track-micro);
  text-transform: uppercase;
  color: var(--text-mute);
  padding-block: 0.5em;
  transition: color 320ms var(--ease);
}

.textlink::after {
  content: '';
  position: absolute;
  inset: auto 0 0 0;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 520ms var(--ease);
}

.textlink:hover { color: var(--text-hi); }
.textlink:hover::after { transform: none; transform-origin: left; }
.textlink .ico { font-size: 1.1em; }

/* ── 10. HERO ─────────────────────────────────────────────────────────── */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-top: calc(var(--head-h) + var(--s-7));
  padding-bottom: var(--s-6);
  overflow: hidden;
}

/* The armillary occupies the whole first viewport; the copy is laid over its
   quiet lower-left quadrant. */
.hero-stage { position: absolute; inset: 0; z-index: 0; }

/* CSS understudy: three ellipses, in case WebGL never arrives. */
.hero-static {
  position: absolute;
  top: 46%;
  left: 50%;
  z-index: 0;
  width: min(62vh, 44vw);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  opacity: 0.55;
  transition: opacity 1400ms var(--ease);
}

.hero-static .ring {
  position: absolute;
  inset: 0;
  border: 1px solid rgb(var(--brass-rgb) / 0.34);
  border-radius: 50%;
}

.hero-static .r1 { transform: rotateX(74deg); animation: spin 46s linear infinite; }
.hero-static .r2 { inset: 8%; transform: rotateY(72deg) rotateZ(18deg); animation: spin 62s linear infinite reverse; }
.hero-static .r3 { inset: 18%; transform: rotateX(28deg) rotateZ(-40deg); animation: spin 78s linear infinite; }

@keyframes spin { to { transform: rotate(1turn); } }

.scenes-live .hero-static { opacity: 0; }

/* Tonal scrim: dark pooled bottom-left for the headline, a soft top wash so
   the fixed masthead stays legible over the mesh. */
.hero-veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(96% 78% at 6% 88%, rgb(var(--noir-rgb) / 0.97) 0%, rgb(var(--noir-rgb) / 0.55) 42%, rgb(var(--noir-rgb) / 0) 70%),
    linear-gradient(to top, rgb(var(--noir-rgb) / 0.88) 0%, rgb(var(--noir-rgb) / 0) 46%),
    linear-gradient(to bottom, rgb(var(--noir-rgb) / 0.7) 0%, rgb(var(--noir-rgb) / 0) 26%);
}

.hero-inner { position: relative; z-index: 2; }
.hero-inner .eyebrow { margin-bottom: var(--s-5); }
.hero-inner .display { max-width: 15ch; margin-bottom: var(--s-6); }
.hero-inner .lede { margin-bottom: var(--s-7); }

.hero-foot {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--s-6);
  margin-top: clamp(1.5rem, 4.5vh, 3rem);
  padding-top: var(--s-5);
  border-top: 1px solid var(--rule);
}

/* Trust cue as one hairline strip of figures, not a row of badges. */
.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem clamp(1.25rem, 2.4vw, 2.75rem);
}

.facts li { display: flex; align-items: baseline; gap: 0.6em; }

.facts b {
  font-family: var(--serif);
  font-size: 1.375rem;
  font-weight: var(--w-serif);
  line-height: 1;
  color: var(--text-hi);
  font-variant-numeric: lining-nums;
}

.facts b i { font-size: 0.5em; vertical-align: 0.55em; }
.facts span { color: var(--text-faint); letter-spacing: 0.16em; }

.cue {
  display: inline-flex;
  align-items: center;
  gap: 0.8em;
  color: var(--text-faint);
  white-space: nowrap;
}

.cue::after {
  content: '';
  width: 46px;
  height: 1px;
  background: linear-gradient(to right, var(--accent), transparent);
  transform-origin: left;
  animation: draw 2.8s var(--ease-io) infinite;
}

@keyframes draw {
  0%, 100% { transform: scaleX(0.2); opacity: 0.4; }
  50% { transform: scaleX(1); opacity: 1; }
}

/* ── 11. I · PRACTICE ─────────────────────────────────────────────────── */

#practice { background: var(--bg); }

.tenets {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--rule-soft);
}

.tenet {
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr);
  column-gap: var(--s-6);
  row-gap: 0;
  padding-block: var(--s-7);
  border-bottom: 1px solid var(--rule-soft);
  transition: background 600ms var(--ease);
}

.tenet-num { grid-column: 1; grid-row: 1 / span 2; }
.tenet h3 { grid-column: 2; grid-row: 1; }
.tenet p { grid-column: 2; grid-row: 2; }

.tenet-num {
  font-family: var(--serif);
  font-size: 1.125rem;
  font-weight: var(--w-serif);
  color: var(--accent);
  opacity: 0.7;
  padding-top: 0.25em;
}

.tenet h3 {
  font-family: var(--serif);
  font-optical-sizing: none;
  font-variation-settings: 'opsz' 22;
  font-size: var(--fs-h3);
  font-weight: var(--w-serif);
  line-height: 1.16;
  letter-spacing: var(--track-tight);
  color: var(--text-hi);
  margin-bottom: var(--s-4);
  max-width: 24ch;
}

.tenet p { color: var(--text-mute); max-width: 62ch; }

/* Off-grid: the standing note pulls right, breaking the column so the
   section does not end on a straight edge. */
.standing {
  margin-top: var(--s-9);
  margin-left: auto;
  max-width: 34rem;
  padding-left: var(--s-6);
  border-left: 1px solid var(--accent-soft);
}

.standing p {
  font-family: var(--serif);
  font-size: clamp(1.125rem, 1rem + 0.6vw, 1.5rem);
  font-style: italic;
  font-weight: var(--w-serif);
  line-height: 1.44;
  color: var(--text);
  margin-block: var(--s-4) var(--s-4);
}

.standing p b { font-weight: 600; font-style: normal; color: var(--brass-300); }
.standing-meta { color: var(--text-faint); }

/* ── 12. II · THE LEDGER (ivory act) ──────────────────────────────────── */

/* The single tonal inversion on the page. It falls where the numbers are,
   because figures set in a Didone want paper under them. */
#ledger {
  background: var(--bg);
  color: var(--text);
}

#ledger .sec-note { color: var(--text-mute); }

.ledger-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr);
  gap: clamp(2.5rem, 5vw, 6rem);
  align-items: start;
}

.ledger-bio { padding-top: var(--s-2); }

.bio-lead {
  font-family: var(--serif);
  font-size: clamp(1.25rem, 1.05rem + 0.9vw, 1.75rem);
  font-weight: var(--w-serif);
  line-height: 1.36;
  letter-spacing: var(--track-tight);
  color: var(--text-hi);
  margin-bottom: var(--s-5);
}

.ledger-bio p + p { margin-top: var(--s-4); }
.ledger-bio p:not(.bio-lead) { color: var(--text-mute); max-width: 46ch; }

.sign {
  display: block;
  margin-top: var(--s-6);
  padding-top: var(--s-4);
  border-top: 1px solid var(--rule);
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.125rem;
  color: var(--accent);
}

/* Gapless numeral plate. Rules, not gutters: the figures share edges the way
   entries in a ledger do. */
.figures {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--rule);
  border-left: 1px solid var(--rule);
}

.figure {
  padding: var(--s-6) var(--s-5) var(--s-5);
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  transition: background 600ms var(--ease);
}

.figure:hover { background: rgb(var(--noir-rgb) / 0.04); }

.figure-num {
  display: block;
  font-family: var(--serif);
  font-optical-sizing: none;
  font-variation-settings: 'opsz' 28;
  font-size: var(--fs-numeral);
  font-weight: var(--w-display);
  line-height: 0.9;
  letter-spacing: -0.03em;
  color: var(--text-hi);
  font-variant-numeric: lining-nums tabular-nums;
  margin-bottom: var(--s-4);
}

.figure figcaption {
  color: var(--text-faint);
  max-width: 18ch;
}

/* Units set as superiors in the sans. A Didone %, × or + at 84px is a
   hairline that reads as a smudge; lifting it into Jost makes it a mark. */
.figure-suffix,
.facts b i {
  font-family: var(--sans);
  font-style: normal;
  font-weight: var(--w-body);
  font-size: 0.4em;
  letter-spacing: 0.01em;
  vertical-align: 0.72em;
  margin-left: 0.1em;
  color: var(--accent);
}

/* ── 13. III · SELECTED WORK ──────────────────────────────────────────── */

#work { background: var(--bg); }

.plates { border-top: 1px solid var(--rule); }

/* Each project is a plate: an oversized Didone numeral in the margin, the
   record set beside it. No card, no border box, no shadow. */
.plate {
  display: grid;
  grid-template-columns: minmax(0, 0.34fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 5rem);
  padding-block: clamp(3rem, 5vw, 5.5rem);
  border-bottom: 1px solid var(--rule);
}

.plate-index { position: relative; }

.plate-num {
  display: block;
  font-family: var(--serif);
  font-optical-sizing: none;
  font-variation-settings: 'opsz' 40;
  font-size: var(--fs-plate);
  font-weight: var(--w-display);
  line-height: 0.78;
  letter-spacing: -0.05em;
  color: transparent;
  -webkit-text-stroke: 1px rgb(var(--ivory-rgb) / 0.26);
  transition: -webkit-text-stroke-color 700ms var(--ease), color 700ms var(--ease);
  will-change: transform;
}

.plate:hover .plate-num {
  color: rgb(var(--brass-rgb) / 0.14);
  -webkit-text-stroke-color: rgb(var(--brass-rgb) / 0.55);
}

.plate-kicker { color: var(--accent); margin-bottom: var(--s-4); }

.plate-title {
  font-family: var(--serif);
  font-optical-sizing: none;
  font-variation-settings: 'opsz' 22;
  font-size: clamp(1.75rem, 1.2rem + 2.2vw, 3rem);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: var(--track-tight);
  margin-bottom: var(--s-5);
}

.plate-title a {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  color: var(--text-hi);
  background-image: linear-gradient(var(--accent), var(--accent));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0% 1px;
  transition: background-size 620ms var(--ease), color 320ms var(--ease);
}

.plate-title a:hover { color: var(--brass-200); background-size: 100% 1px; }
.plate-title .ico { font-size: 0.42em; stroke-width: 1.4; opacity: 0.55; transition: opacity 320ms var(--ease), transform 480ms var(--ease); }
.plate-title a:hover .ico { opacity: 1; transform: translate(3px, -3px); }

.plate-desc { color: var(--text-mute); max-width: 58ch; margin-bottom: var(--s-6); }

/* Metrics as a ruled table — dt caption, dd figure. This is what a results
   list looks like when it is not a grid of badges. */
.metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: var(--s-7);
  margin-bottom: var(--s-6);
}

.metrics > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s-4);
  padding-block: 0.85em;
  border-bottom: 1px solid var(--rule-soft);
}

.metrics dt {
  font-size: 0.8125rem;
  font-weight: var(--w-body);
  color: var(--text-faint);
  letter-spacing: 0.01em;
}

.metrics dd {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: var(--w-serif);
  line-height: 1;
  color: var(--brass-300);
  white-space: nowrap;
  font-variant-numeric: lining-nums tabular-nums;
}

.stack { display: flex; flex-wrap: wrap; gap: 0.55em 1.15em; }

.stack li {
  position: relative;
  font-size: 0.75rem;
  font-weight: var(--w-body);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-faint);
  transition: color 320ms var(--ease);
}

.stack li + li::before {
  content: '';
  position: absolute;
  left: -0.62em;
  top: 50%;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--rule-strong);
  transform: translateY(-50%);
}

.plate:hover .stack li { color: var(--text-mute); }

/* ── 14. IV · THE ATELIER (Practivia) ─────────────────────────────────── */

#practivia { background: var(--bg); }

/* Editorial side-by-side, not another plate row: the record on the left, the
   thing the product actually emits on the right. */
.atelier {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, 0.94fr);
  gap: clamp(2rem, 4.5vw, 5.5rem);
  align-items: start;
}

.atelier-name {
  font-family: var(--serif);
  font-optical-sizing: none;
  font-variation-settings: 'opsz' 26;
  font-size: clamp(2.25rem, 1.5rem + 3vw, 3.75rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: var(--track-tight);
}

.atelier-name a {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  color: var(--text-hi);
  background-image: linear-gradient(var(--accent), var(--accent));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0% 1px;
  transition: background-size 620ms var(--ease), color 320ms var(--ease);
}

.atelier-name a:hover { color: var(--brass-200); background-size: 100% 1px; }
.atelier-name .ico { font-size: 0.36em; stroke-width: 1.4; opacity: 0.55; transition: opacity 320ms var(--ease), transform 480ms var(--ease); }
.atelier-name a:hover .ico { opacity: 1; transform: translate(3px, -3px); }

/* The product's own line, kept in the Didone italic so it reads as a motto
   rather than as marketing. */
.atelier-tagline {
  font-family: var(--serif);
  font-optical-sizing: none;
  font-variation-settings: 'opsz' 18;
  font-size: clamp(1.125rem, 0.98rem + 0.6vw, 1.5rem);
  font-weight: 500;
  line-height: 1.3;
  color: var(--brass-300);
  margin-top: 0.5em;
  margin-bottom: var(--s-6);
}

.atelier-tagline em { font-style: italic; }

.atelier-desc { color: var(--text-mute); max-width: 56ch; }
.atelier-desc + .atelier-desc { margin-top: var(--s-4); }

/* A specification list, not a feature grid: term left, plain statement right. */
.atelier-spec {
  border-top: 1px solid var(--rule);
  margin-block: var(--s-6);
}

.atelier-spec > div {
  display: grid;
  grid-template-columns: minmax(0, 0.4fr) minmax(0, 1fr);
  gap: var(--s-4);
  align-items: baseline;
  padding-block: 0.85em;
  border-bottom: 1px solid var(--rule-soft);
}

.atelier-spec dt {
  font-size: 0.75rem;
  font-weight: var(--w-label);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent);
}

.atelier-spec dd { font-size: 0.875rem; color: var(--text-mute); }

.atelier-status { margin-bottom: var(--s-6); }

/* The specimen. A hairline plate that stays with the reader while the record
   beside it scrolls. */
.specimen {
  position: sticky;
  top: calc(var(--head-h) + var(--s-6));
  padding: var(--s-6) var(--s-6) var(--s-5);
  border: 1px solid var(--rule);
  background: rgb(var(--ivory-rgb) / 0.022);
  transition: border-color 700ms var(--ease);
}

.specimen:hover { border-color: rgb(var(--brass-rgb) / 0.34); }

.specimen-label {
  display: block;
  font-family: var(--sans);
  font-size: var(--fs-micro);
  font-weight: var(--w-label);
  letter-spacing: var(--track-micro);
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--s-4);
}

.specimen-q {
  font-family: var(--serif);
  font-optical-sizing: none;
  font-variation-settings: 'opsz' 18;
  font-style: italic;
  font-size: clamp(1.0625rem, 0.95rem + 0.5vw, 1.375rem);
  font-weight: 500;
  line-height: 1.34;
  color: var(--text-hi);
}

.specimen-score {
  display: flex;
  align-items: baseline;
  gap: 0.7em;
  margin-top: var(--s-5);
  padding-bottom: var(--s-5);
  border-bottom: 1px solid var(--rule);
}

/* Overrides .figure-num, which is sized for the ledger. */
.specimen-num {
  font-size: clamp(3.25rem, 2.3rem + 3vw, 5rem);
  color: var(--brass-200);
  margin-bottom: 0;
}

.specimen-den {
  font-family: var(--sans);
  font-size: var(--fs-micro);
  font-weight: var(--w-label);
  letter-spacing: var(--track-micro);
  text-transform: uppercase;
  color: var(--text-faint);
}

/* Covered and missed, marked with the same hairline sprite as the rest of
   the page. No green, no red — brass carries the whole page. */
.rubric { padding-block: var(--s-2) var(--s-4); }

.rubric li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.9em;
  align-items: start;
  padding-block: 0.85em;
  font-size: 0.875rem;
  line-height: 1.5;
  border-bottom: 1px solid var(--rule-soft);
}

.rubric li:last-child { border-bottom: 0; }
.rubric .ico { font-size: 1.05em; margin-top: 0.2em; }
.rubric .is-hit, .rubric li.is-hit { color: var(--text); }
.rubric li.is-hit .ico { color: var(--accent); }
.rubric li.is-miss { color: var(--text-faint); }
.rubric li.is-miss .ico { color: var(--text-faint); opacity: 0.7; }

.specimen-foot {
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--text-faint);
  padding-top: var(--s-4);
  border-top: 1px solid var(--rule);
}

/* ── 15. V · INDEX OF CAPABILITY ──────────────────────────────────────── */

#index { background: var(--bg); }

.idx { border-top: 1px solid var(--rule); }

/* A ledger row: category, entries, count. Hovering brightens the rule and
   nudges the row — the whole interaction is one line of light. */
.idx-row {
  position: relative;
  display: grid;
  grid-template-columns: 12rem minmax(0, 1fr) 3rem;
  align-items: baseline;
  gap: var(--s-5);
  padding-block: var(--s-5);
  border-bottom: 1px solid var(--rule-soft);
  transition: padding-left 620ms var(--ease);
}

.idx-row::before {
  content: '';
  position: absolute;
  inset: auto 0 -1px 0;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 760ms var(--ease);
}

.idx-row:hover { padding-left: var(--s-4); }
.idx-row:hover::before { transform: none; }

.idx-row dt {
  font-family: var(--serif);
  font-size: 1.125rem;
  font-weight: var(--w-serif);
  font-style: italic;
  color: var(--text-hi);
}

.idx-row dd { display: flex; flex-wrap: wrap; gap: 0.5em 1.5em; }

.cap {
  position: relative;
  font-size: 0.9375rem;
  font-weight: var(--w-body);
  color: var(--text-mute);
  cursor: default;
  transition: color 300ms var(--ease);
}

.cap::after {
  content: '';
  position: absolute;
  inset: auto 0 -0.35em 0;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 420ms var(--ease);
}

.cap:hover { color: var(--brass-200); }
.cap:hover::after { transform: none; }

.idx-n {
  justify-self: end;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
  transition: color 400ms var(--ease);
}

.idx-row:hover .idx-n { color: var(--accent); }

/* One shared caption line that rewrites itself as you sweep the index. */
.idx-caption {
  margin-top: var(--s-6);
  min-height: 2.4em;
  text-align: right;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.0625rem;
  color: var(--text-faint);
}

.idx-caption span {
  display: inline-block;
  transition: opacity 320ms var(--ease), transform 420ms var(--ease);
}

.idx-caption.is-swapping span { opacity: 0; transform: translateY(6px); }

/* ── 16. VI · APPOINTMENTS ────────────────────────────────────────────── */

#appointments { background: var(--bg); }

.posts { border-top: 1px solid var(--rule); }

.post {
  display: grid;
  grid-template-columns: 9rem minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  padding-block: clamp(2.5rem, 4vw, 4.5rem);
  border-bottom: 1px solid var(--rule);
}

.post-when { display: flex; flex-direction: column; gap: 0.35em; }

.post-year {
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: var(--w-serif);
  line-height: 1;
  color: var(--text-hi);
  font-variant-numeric: lining-nums;
}

.post-until { color: var(--text-faint); }

.post-role {
  font-family: var(--serif);
  font-optical-sizing: none;
  font-variation-settings: 'opsz' 22;
  font-size: var(--fs-h3);
  font-weight: var(--w-serif);
  line-height: 1.1;
  letter-spacing: var(--track-tight);
  color: var(--text-hi);
}

.post-org {
  font-size: 0.9375rem;
  font-weight: var(--w-body);
  color: var(--accent);
  margin-top: 0.35em;
  margin-bottom: var(--s-4);
}

.post-org i { font-style: normal; color: var(--text-faint); margin-inline: 0.35em; }
.post-desc { color: var(--text-mute); max-width: 60ch; margin-bottom: var(--s-5); }

.post-notes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 0;
  margin-bottom: var(--s-5);
  border-top: 1px solid var(--rule-soft);
}

.post-notes li {
  font-size: 0.875rem;
  font-weight: var(--w-body);
  color: var(--text);
  padding: 0.9em 0;
  padding-left: 1.4em;
  border-bottom: 1px solid var(--rule-soft);
  position: relative;
}

.post-notes li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 1.45em;
  width: 5px;
  height: 5px;
  background: var(--accent);
  transform: rotate(45deg);
}

.post-stack {
  font-size: 0.75rem;
  font-weight: var(--w-body);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-faint);
}

/* ── 17. VII · EDUCATION (the breath) ─────────────────────────────────── */

.mini { background: var(--bg); }

.mini-inner {
  padding-block: clamp(5rem, 9vw, 10rem);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-4);
}

.mini-inner .sec-num { padding-top: 0; margin-bottom: var(--s-3); }

.mini-title {
  font-family: var(--serif);
  font-optical-sizing: none;
  font-variation-settings: 'opsz' 24;
  font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.5rem);
  font-weight: var(--w-display);
  line-height: 1.14;
  letter-spacing: var(--track-tight);
  color: var(--text-hi);
  max-width: 20ch;
}

.mini-note { color: var(--text-mute); max-width: 52ch; }
.mini-date { color: var(--text-faint); margin-top: var(--s-2); }

/* ── 18. CONTACT ──────────────────────────────────────────────────────── */

/* Transparent so the signet ring shows through; centred low over it. */
#contact {
  position: relative;
  min-height: 92svh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.contact-stage { position: absolute; inset: 0; z-index: 0; }

.contact-inner {
  position: relative;
  z-index: 2;
  padding-block: clamp(5rem, 9vw, 9rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--s-5);
}

.contact-inner::before {
  content: '';
  position: absolute;
  inset: -20% -10%;
  z-index: -1;
  background: radial-gradient(52% 54% at 50% 52%, rgb(var(--noir-rgb) / 0.94) 0%, rgb(var(--noir-rgb) / 0.72) 46%, rgb(var(--noir-rgb) / 0) 78%);
  pointer-events: none;
}

.contact-title {
  font-family: var(--serif);
  font-optical-sizing: none;
  font-variation-settings: 'opsz' 32;
  font-size: clamp(2.25rem, 1.4rem + 3.6vw, 5rem);
  font-weight: var(--w-display);
  line-height: 1.02;
  letter-spacing: var(--track-tight);
  color: var(--text-hi);
}

.contact-title em { font-style: italic; color: var(--brass-300); }
.contact-sub { color: var(--text-mute); max-width: 46ch; font-weight: var(--w-lede); font-size: var(--fs-lede); line-height: 1.55; }

.contact-where {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-size: var(--fs-micro);
  letter-spacing: var(--track-micro);
  text-transform: uppercase;
  color: var(--text-faint);
}

.contact-where .ico { font-size: 1.15em; color: var(--accent); }
.contact-inner .actions { margin-top: var(--s-4); }

/* ── 19. FOOTER + BACK TO TOP ─────────────────────────────────────────── */

footer { position: relative; z-index: 2; background: var(--bg); border-top: 1px solid var(--rule); }

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-5);
  padding-block: var(--s-6);
  flex-wrap: wrap;
}

.footer-name {
  font-family: var(--serif);
  font-size: 1rem;
  font-style: italic;
  color: var(--text-mute);
}

.footer-socials { display: flex; gap: var(--s-5); }

.footer-socials a {
  display: grid;
  place-items: center;
  font-size: 20px;
  color: var(--text-faint);
  transition: color 320ms var(--ease), transform 420ms var(--ease);
}

.footer-socials a:hover { color: var(--accent); transform: translateY(-3px); }

.to-top {
  position: fixed;
  right: var(--gutter);
  bottom: var(--gutter);
  z-index: 60;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  font-size: 17px;
  color: var(--text-mute);
  border: 1px solid var(--rule);
  background: rgb(var(--noir-rgb) / 0.5);
  backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity var(--t-mid) var(--ease), transform var(--t-mid) var(--ease),
              visibility var(--t-mid), color 300ms var(--ease), border-color 300ms var(--ease);
}

.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { color: var(--accent); border-color: var(--accent); }

/* ── 20. REVEALS ──────────────────────────────────────────────────────── */

/* Only ever applied when JS is present, so a no-JS reader gets the whole
   page immediately. */
.has-js [data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity 900ms var(--ease) calc(var(--i, 0) * 90ms),
    transform 1100ms var(--ease) calc(var(--i, 0) * 90ms);
}

.has-js [data-reveal].is-in { opacity: 1; transform: none; }

/* The masked headline resolves line by line rather than fading. */
.has-js .display[data-reveal] { opacity: 1; transform: none; }
.has-js .display[data-reveal] .line > span { transform: translateY(108%); transition: transform 1200ms var(--ease); }
.has-js .display[data-reveal].is-in .line > span { transform: none; }
.has-js .display[data-reveal].is-in .line:nth-child(2) > span { transition-delay: 110ms; }

/* GSAP takes ownership of these once motion.js lands. */
.motion-live .plate-num { will-change: transform; }

/* ── 21. RESPONSIVE ───────────────────────────────────────────────────── */

@media (max-width: 1180px) {
  :root { --measure: 980px; }

  .nav ol { gap: 1.1rem; }
  .nav a i { display: none; }

  .ledger-grid { grid-template-columns: 1fr; gap: var(--s-8); }
  .ledger-bio p:not(.bio-lead) { max-width: 60ch; }

  .plate { grid-template-columns: minmax(0, 0.24fr) minmax(0, 1fr); }
  .idx-row { grid-template-columns: 9rem minmax(0, 1fr) 2.5rem; }
}

@media (max-width: 900px) {
  :root { --head-h: 72px; }

  .menu-btn { display: block; order: 3; }
  .head-cta { display: none; }

  /* Sheet menu: the nav drops as a ruled list, not a hamburger drawer. */
  .nav {
    position: fixed;
    inset: var(--head-h) 0 auto;
    background: rgb(var(--noir-rgb) / 0.97);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--rule);
    padding: var(--s-4) var(--gutter) var(--s-6);
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--t-mid) var(--ease), transform var(--t-mid) var(--ease), visibility var(--t-mid);
  }

  .nav.is-open { opacity: 1; visibility: visible; transform: none; }
  .nav ol { flex-direction: column; align-items: stretch; gap: 0; }
  .nav a { font-size: 1rem; letter-spacing: 0.06em; padding-block: 1.15em; border-bottom: 1px solid var(--rule-soft); }
  .nav a i { display: inline; }
  .nav a::after { display: none; }

  .hero-foot { flex-direction: column; align-items: flex-start; }
  .cue { display: none; }
  .facts { gap: var(--s-4) var(--s-6); }

  .tenet { grid-template-columns: 1fr; gap: var(--s-3); }
  .tenet-num { padding-top: 0; }
  .standing { margin-left: 0; max-width: none; }

  .figures { grid-template-columns: repeat(2, 1fr); }

  .atelier { grid-template-columns: 1fr; gap: var(--s-7); }
  .specimen { position: static; }

  .plate { grid-template-columns: 1fr; gap: var(--s-4); }
  .plate-num { font-size: clamp(3rem, 12vw, 5rem); }

  .idx-row { grid-template-columns: 1fr auto; gap: var(--s-2) var(--s-4); }
  .idx-row dd { grid-column: 1 / -1; }
  .idx-caption { text-align: left; }

  .post { grid-template-columns: 1fr; gap: var(--s-4); }
  .post-when { flex-direction: row; align-items: baseline; gap: 0.7em; }

  .footer-inner { justify-content: flex-start; gap: var(--s-4) var(--s-6); }
}

@media (max-width: 560px) {
  :root { --section-y: 4.5rem; }

  .mark-name { display: none; }
  .hero { min-height: 100svh; }
  .hero-inner .display { max-width: none; }
  .hero-veil { background: linear-gradient(to top, rgb(var(--noir-rgb) / 0.95) 24%, rgb(var(--noir-rgb) / 0.5) 68%, rgb(var(--noir-rgb) / 0.8) 100%); }
  .facts li:nth-child(n+3) { display: none; }

  .figures { grid-template-columns: 1fr; }
  .metrics { grid-template-columns: 1fr; }
  .atelier-spec > div { grid-template-columns: 1fr; gap: 0.15em; }
  .specimen { padding: var(--s-5) var(--s-4) var(--s-4); }
  .actions { gap: var(--s-4); align-items: stretch; flex-direction: column; }
  .actions .btn { justify-content: center; }
  .actions-center { align-items: center; }
  .contact-inner .btn { width: 100%; font-size: 0.625rem; padding-inline: 1rem; }

  .to-top { width: 40px; height: 40px; }
}

/* ── 22. REDUCED MOTION ───────────────────────────────────────────────── */

/* Neither enhancement module is even fetched under this query (script.js
   checks the same token), so this only has to settle the CSS layer. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .cursor, .graticule, .aura, .grain { display: none; }
  body.cursor-live, body.cursor-live a, body.cursor-live button { cursor: auto; }

  .has-js [data-reveal] { opacity: 1; transform: none; }
  .has-js .display[data-reveal] .line > span { transform: none; }
  .hero-static { opacity: 0.4; }
}

/* ── 23. FOCUS ────────────────────────────────────────────────────────── */

:focus-visible {
  outline: 1px solid var(--brass-400);
  outline-offset: 4px;
}

a:focus-visible, button:focus-visible { outline-offset: 6px; }
