/* ── tokens.css ─────────────────────────────── */
/* ============================================================
   Sulat — design tokens
   Lifted from the live sulat house stylesheet so the coming
   soon page reads as the same brand, not a lookalike.
   ============================================================ */

:root {
  /* --- Light: warm paper (default) --- */
  --bg: #f8f2e7;
  --bg-strong: #f4ebdc;
  --surface: #fffaf4;
  --elevated: #fffffff5;
  --paper: #ffffffd6;
  --ink: #201a13;
  --muted: #5f5245;
  --accent: #d97706;
  --accent-soft: #f3d4a0;
  --accent-deep: #8f4b00;
  --hairline: #523b1c24;
  --line-strong: #523b1c3d;
  --shadow-soft: 0 18px 38px #4e34180f;

  /* Derived, theme-aware helpers */
  --ink-70: #201a13b3;
  --ink-45: #201a1373;
  --accent-wash: #d977060f;
  --accent-glow: #d9770626;
  --scrim: #f8f2e7;
  --selection: #f3d4a0;
  --focus-ring: var(--accent-deep);
  --grain-opacity: 0.4;
  --scene-fade: #f8f2e700;
  --grain-url: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)' opacity='.36'/%3E%3C/svg%3E");

  /* --- Type --- */
  --font-body: 'Spectral', 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
  --font-display: 'Lora', 'Spectral', Georgia, serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;

  --step--2: clamp(0.688rem, 0.66rem + 0.14vw, 0.75rem);
  --step--1: clamp(0.813rem, 0.78rem + 0.16vw, 0.875rem);
  --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.075rem);
  --step-1: clamp(1.14rem, 1.08rem + 0.3vw, 1.3rem);
  --step-2: clamp(1.33rem, 1.2rem + 0.62vw, 1.68rem);
  --step-3: clamp(1.6rem, 1.35rem + 1.15vw, 2.25rem);
  --step-4: clamp(1.95rem, 1.5rem + 2.1vw, 3.1rem);
  --step-5: clamp(2.3rem, 1.55rem + 3.6vw, 4.3rem);

  /* --- Geometry --- */
  --radius: 1.1rem;
  --radius-sm: 0.7rem;
  --radius-pill: 999px;
  --hair: 1px;

  /* --- Motion --- */
  --ease: cubic-bezier(.4, 0, .2, 1);
  --t-fast: 200ms;
  --t-mid: 320ms;
  --t-slow: 500ms;

  /* --- Rhythm --- */
  --gutter: clamp(1.15rem, 4vw, 2.5rem);
  --measure: 34rem;
  --shell: 76rem;
  --rail: 9.5rem;
  --section-y: clamp(4.5rem, 9vw, 9rem);
}

[data-theme='dark'] {
  --bg: #090908;
  --bg-strong: #10100e;
  --surface: #151511;
  --elevated: #1d1c17f0;
  --paper: #161612c2;
  --ink: #f4efe7;
  --muted: #b9ad9d;
  --accent: #f59e0b;
  --accent-soft: #f59e0b2e;
  --accent-deep: #f8c067;
  --hairline: #f7edde1f;
  --line-strong: #f7edde38;
  --shadow-soft: none;

  --ink-70: #f4efe7b8;
  --ink-45: #f4efe770;
  --accent-wash: #f59e0b12;
  --accent-glow: #f59e0b2b;
  --scrim: #090908;
  --selection: #f59e0b4d;
  --focus-ring: var(--accent);
  --grain-opacity: 0.24;
  --scene-fade: #09090800;
}

/* First-visit system preference, before any stored choice is applied.
   The inline head script promotes this to an explicit data-theme. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
  }
}


/* ── fonts.css ─────────────────────────────── */
/* Sulat — self-hosted editorial type. Spectral (body) + Lora (display). */
@font-face{font-family:'Lora';font-style:normal;font-weight:500;font-display:swap;src:url('../fonts/lora-500-normal-latin-ext.woff2') format('woff2');unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, 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:'Lora';font-style:normal;font-weight:500;font-display:swap;src:url('../fonts/lora-500-normal-latin.woff2') format('woff2');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:'Lora';font-style:normal;font-weight:600;font-display:swap;src:url('../fonts/lora-600-normal-latin-ext.woff2') format('woff2');unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, 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:'Lora';font-style:normal;font-weight:600;font-display:swap;src:url('../fonts/lora-600-normal-latin.woff2') format('woff2');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:'Lora';font-style:normal;font-weight:700;font-display:swap;src:url('../fonts/lora-700-normal-latin-ext.woff2') format('woff2');unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, 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:'Lora';font-style:normal;font-weight:700;font-display:swap;src:url('../fonts/lora-700-normal-latin.woff2') format('woff2');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:'Spectral';font-style:italic;font-weight:400;font-display:swap;src:url('../fonts/spectral-400-italic-latin-ext.woff2') format('woff2');unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, 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:'Spectral';font-style:italic;font-weight:400;font-display:swap;src:url('../fonts/spectral-400-italic-latin.woff2') format('woff2');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:'Spectral';font-style:normal;font-weight:300;font-display:swap;src:url('../fonts/spectral-300-normal-latin-ext.woff2') format('woff2');unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, 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:'Spectral';font-style:normal;font-weight:300;font-display:swap;src:url('../fonts/spectral-300-normal-latin.woff2') format('woff2');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:'Spectral';font-style:normal;font-weight:400;font-display:swap;src:url('../fonts/spectral-400-normal-latin-ext.woff2') format('woff2');unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, 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:'Spectral';font-style:normal;font-weight:400;font-display:swap;src:url('../fonts/spectral-400-normal-latin.woff2') format('woff2');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:'Spectral';font-style:normal;font-weight:500;font-display:swap;src:url('../fonts/spectral-500-normal-latin-ext.woff2') format('woff2');unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, 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:'Spectral';font-style:normal;font-weight:500;font-display:swap;src:url('../fonts/spectral-500-normal-latin.woff2') format('woff2');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:'Spectral';font-style:normal;font-weight:600;font-display:swap;src:url('../fonts/spectral-600-normal-latin-ext.woff2') format('woff2');unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, 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:'Spectral';font-style:normal;font-weight:600;font-display:swap;src:url('../fonts/spectral-600-normal-latin.woff2') format('woff2');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;}


/* ── base.css ─────────────────────────────── */
/* ============================================================
   Sulat — reset, document skin, typography primitives
   ============================================================ */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 6.5rem;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.62;
  font-weight: 400;
  font-optical-sizing: auto;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color var(--t-slow) var(--ease), color var(--t-slow) var(--ease);
}

/* Warm paper tooth. Sits under everything, never intercepts a pointer. */
body::before {
  content: '';
  position: fixed;
  inset: -10vh -10vw;
  z-index: -2;
  pointer-events: none;
  opacity: var(--grain-opacity);
  background-image: var(--grain-url);
  background-size: 220px 220px;
  mix-blend-mode: var(--grain-blend, multiply);
  transition: opacity var(--t-slow) var(--ease);
}

[data-theme='dark'] body::before { --grain-blend: screen; }

body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(60rem 40rem at 78% -8%, var(--accent-wash), transparent 62%),
    radial-gradient(48rem 34rem at 6% 34%, var(--accent-wash), transparent 58%);
  transition: opacity var(--t-slow) var(--ease);
}

::selection {
  background: var(--selection);
  color: var(--ink);
}

img,
svg,
canvas { display: block; max-width: 100%; }

img { height: auto; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.014em;
  margin: 0;
  text-wrap: balance;
}

h1 { font-size: var(--step-5); font-weight: 600; }
h2 { font-size: var(--step-4); }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); }

p { margin: 0 0 1.05em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

a {
  color: inherit;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 0.22em;
  text-decoration-thickness: from-font;
  transition: color var(--t-fast) var(--ease), text-decoration-color var(--t-fast) var(--ease);
}

a:hover { color: var(--accent-deep); text-decoration-color: var(--accent); }

button { font: inherit; color: inherit; }

:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 3px;
  border-radius: 4px;
}

/* --- shared text primitives --- */

.mono {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}

.lede {
  font-size: var(--step-1);
  line-height: 1.55;
  color: var(--ink-70);
}

.muted { color: var(--muted); }

.measure { max-width: var(--measure); }

.accent-word {
  color: var(--accent-deep);
  font-style: italic;
}

.skip-link {
  position: absolute;
  left: 0.75rem;
  top: 0.75rem;
  z-index: 200;
  transform: translateY(-160%);
  background: var(--surface);
  color: var(--ink);
  border: var(--hair) solid var(--line-strong);
  border-radius: var(--radius-pill);
  padding: 0.6rem 1.1rem;
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  transition: transform var(--t-mid) var(--ease);
}

.skip-link:focus-visible { transform: translateY(0); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}


/* ── layout.css ─────────────────────────────── */
/* ============================================================
   Sulat — shell, masthead, section rhythm, footer
   ============================================================ */

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

.page { position: relative; z-index: 1; }

/* ---------------- masthead ---------------- */

.masthead {
  position: sticky;
  top: 0;
  z-index: 60;
  backdrop-filter: blur(14px) saturate(1.1);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
  background: color-mix(in srgb, var(--bg) 76%, transparent);
  border-bottom: var(--hair) solid transparent;
  transition: border-color var(--t-mid) var(--ease), background-color var(--t-mid) var(--ease);
}

.masthead[data-stuck='true'] {
  border-bottom-color: var(--hairline);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
}

.masthead__progress {
  position: absolute;
  left: 0;
  bottom: -1px;
  height: 2px;
  width: 100%;
  transform-origin: 0 50%;
  transform: scaleX(var(--scroll-progress, 0));
  background: linear-gradient(90deg, var(--accent-deep), var(--accent));
  opacity: 0.9;
}

.masthead__inner {
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 2vw, 2rem);
  min-height: 4.4rem;
  padding-block: 0.55rem;
}

.wordmark {
  display: inline-flex;
  align-items: baseline;
  gap: 0.5rem;
  text-decoration: none;
  flex: 0 0 auto;
}

.wordmark__name {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2.4vw, 1.4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  position: relative;
}

.wordmark__name::after {
  content: '';
  position: absolute;
  left: -0.12em;
  right: -0.12em;
  bottom: -0.18em;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform var(--t-mid) var(--ease);
}

.wordmark:hover .wordmark__name::after,
.wordmark:focus-visible .wordmark__name::after { transform: scaleX(1); }

.wordmark__tag {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(0.6rem, 1.8vw, 1.6rem);
  margin-inline-start: auto;
}

.nav__list {
  display: flex;
  align-items: center;
  gap: clamp(0.7rem, 1.9vw, 1.7rem);
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav__link {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted);
  padding: 0.4rem 0;
  position: relative;
  white-space: nowrap;
  transition: color var(--t-fast) var(--ease);
}

.nav__link::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0.05rem;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform var(--t-mid) var(--ease);
}

.nav__link:hover,
.nav__link[aria-current='true'] { color: var(--ink); }
.nav__link:hover::after,
.nav__link:focus-visible::after,
.nav__link[aria-current='true']::after { transform: scaleX(1); }

@media (max-width: 62rem) {
  .nav__list { display: none; }
}

/* ---------------- sections ---------------- */

.section {
  position: relative;
  padding-block: var(--section-y);
}

.section + .section { border-top: var(--hair) solid var(--hairline); }

.section--flush { border-top: 0; }

.section__grid {
  display: grid;
  grid-template-columns: var(--rail) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: start;
}

@media (max-width: 60rem) {
  .section__grid { grid-template-columns: minmax(0, 1fr); gap: 1.6rem; }
}

.rail {
  position: sticky;
  top: 7rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-top: 0.4rem;
  border-top: var(--hair) solid var(--line-strong);
}

@media (max-width: 60rem) {
  .rail {
    position: static;
    flex-direction: row;
    align-items: baseline;
    gap: 0.8rem;
    flex-wrap: wrap;
  }
}

.rail__index {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  color: var(--accent-deep);
  letter-spacing: 0.08em;
  font-weight: 600;
}

.rail__label {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1.5;
}

.rail__note {
  font-size: var(--step--1);
  color: var(--ink-45);
  font-style: italic;
  line-height: 1.5;
  max-width: 16ch;
}

@media (max-width: 60rem) {
  .rail__note { display: none; }
}

.section__head { max-width: 48rem; }
.section__head h2 { margin-bottom: 0.85rem; }
.section__head .lede { margin-bottom: 0; }

.section__body { margin-top: clamp(2rem, 5vw, 3.4rem); }

/* ---------------- footer ---------------- */

.footer {
  border-top: var(--hair) solid var(--hairline);
  padding-block: clamp(2.5rem, 5vw, 4rem) clamp(2rem, 4vw, 3rem);
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(1.25rem, 4vw, 3rem);
  align-items: flex-start;
  justify-content: space-between;
}

.footer__blurb {
  max-width: 30rem;
  font-size: var(--step--1);
  color: var(--muted);
}

.footer__etymology {
  font-style: italic;
  color: var(--ink-45);
}

.footer__meta {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: right;
}

@media (max-width: 46rem) {
  .footer__meta { text-align: left; }
}


/* ── components.css ─────────────────────────────── */
/* ============================================================
   Sulat — buttons, pills, cards, toggle, figures
   ============================================================ */

/* ---------------- buttons ---------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  border-radius: var(--radius-pill);
  border: var(--hair) solid transparent;
  padding: 0.72rem 1.4rem;
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: 0.11em;
  text-transform: uppercase;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  background: transparent;
  transition:
    background-color var(--t-fast) var(--ease),
    color var(--t-fast) var(--ease),
    border-color var(--t-fast) var(--ease),
    transform var(--t-fast) var(--ease),
    box-shadow var(--t-mid) var(--ease);
}

.btn:active { transform: translateY(1px) scale(0.995); }

.btn--primary {
  background: var(--accent);
  color: #1b1206;
  border-color: color-mix(in srgb, var(--accent-deep) 45%, transparent);
  box-shadow: var(--shadow-soft);
}

.btn--primary:hover {
  background: var(--accent-deep);
  color: #fff8ec;
}

[data-theme='dark'] .btn--primary { color: #14100a; }
[data-theme='dark'] .btn--primary:hover { background: var(--accent-deep); color: #14100a; }

.btn--ghost {
  border-color: var(--line-strong);
  color: var(--ink);
}

.btn--ghost:hover {
  border-color: var(--accent);
  color: var(--accent-deep);
  background: var(--accent-wash);
}

.btn__arrow { transition: transform var(--t-mid) var(--ease); }
.btn:hover .btn__arrow { transform: translateX(3px); }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  align-items: center;
}

/* ---------------- eyebrow / tag pills ---------------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  border: var(--hair) solid var(--hairline);
  background: var(--paper);
  border-radius: var(--radius-pill);
  padding: 0.4rem 0.9rem;
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.eyebrow__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-glow);
}

.tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: 0.08em;
  color: var(--accent-deep);
  background: var(--accent-wash);
  border: var(--hair) solid var(--accent-soft);
  border-radius: var(--radius-pill);
  padding: 0.14rem 0.6rem;
  white-space: nowrap;
}

[data-theme='dark'] .tag { border-color: color-mix(in srgb, var(--accent) 34%, transparent); }

/* ---------------- cards ---------------- */

.card {
  background: var(--surface);
  border: var(--hair) solid var(--hairline);
  border-radius: var(--radius);
  padding: clamp(1.1rem, 2.6vw, 1.65rem);
  box-shadow: var(--shadow-soft);
  transition:
    border-color var(--t-mid) var(--ease),
    transform var(--t-mid) var(--ease),
    background-color var(--t-slow) var(--ease);
}

.card--quiet {
  background: var(--paper);
  box-shadow: none;
}

.card__index {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  font-weight: 600;
  color: var(--accent-deep);
  letter-spacing: 0.06em;
}

.card__title {
  font-family: var(--font-display);
  font-size: var(--step-1);
  font-weight: 600;
  margin: 0.5rem 0 0.15rem;
}

.card__q {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: 0.05em;
  text-transform: none;
  color: var(--accent-deep);
  margin-bottom: 0.7rem;
}

.card__body {
  font-size: var(--step--1);
  color: var(--ink-70);
  line-height: 1.62;
  margin: 0;
}

.grid {
  display: grid;
  gap: clamp(0.8rem, 2vw, 1.2rem);
}

.grid--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

@media (max-width: 68rem) {
  .grid--5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 52rem) {
  .grid--3, .grid--2 { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 40rem) {
  .grid--5 { grid-template-columns: minmax(0, 1fr); }
}

/* ---------------- theme toggle ---------------- */

.toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  height: 2.15rem;
  padding: 0.2rem;
  border-radius: var(--radius-pill);
  border: var(--hair) solid var(--line-strong);
  background: var(--paper);
  cursor: pointer;
  flex: 0 0 auto;
  transition: border-color var(--t-fast) var(--ease), background-color var(--t-mid) var(--ease);
}

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

.toggle__track {
  position: relative;
  display: flex;
  align-items: center;
  width: 3.7rem;
  height: 100%;
}

.toggle__knob {
  position: absolute;
  top: 0; left: 0;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 2px 8px #4e341826;
  transform: translateX(0);
  transition: transform var(--t-slow) var(--ease), background-color var(--t-mid) var(--ease);
}

[data-theme='dark'] .toggle__knob { transform: translateX(2rem); }

.toggle__icon {
  position: relative;
  z-index: 1;
  width: 1.7rem;
  height: 1.7rem;
  display: grid;
  place-items: center;
  color: var(--muted);
  transition: color var(--t-mid) var(--ease), opacity var(--t-mid) var(--ease);
}

.toggle__icon svg { width: 0.95rem; height: 0.95rem; }
.toggle__icon--sun { color: #241a0d; }
.toggle__icon--moon { opacity: 0.75; }

[data-theme='dark'] .toggle__icon--sun { color: var(--muted); opacity: 0.7; }
[data-theme='dark'] .toggle__icon--moon { color: #14100a; opacity: 1; }

.toggle__label {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  padding-inline: 0.35rem 0.6rem;
}

@media (max-width: 34rem) {
  .toggle__label { display: none; }
}

/* ---------------- figures / infographics ---------------- */

.figure {
  /* clears the UA's `figure { margin: 1em 40px }` */
  margin: 0;
  border: var(--hair) solid var(--hairline);
  border-radius: var(--radius);
  background: var(--bg-strong);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

/* components.css is concatenated after layout.css, so the reset above outranks
   .section__body's margin-top at equal specificity — which left every figure
   sitting flush against the block before it. Figures are section bodies too, and
   a bordered full-width panel wants a little more air than a text block does. */
.figure.section__body {
  margin-top: clamp(2.6rem, 6vw, 4.2rem);
}

.figure__frame {
  position: relative;
  background: var(--bg-strong);
  min-height: 6rem;
}

/* Visible by default. The cross-fade is only armed once the script is
   actually running, so a blocked or broken bundle cannot hide the artwork. */
.figure__img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: auto;
  display: block;
}

[data-enhance='on'] .figure__img {
  opacity: 0;
  transition: opacity var(--t-slow) var(--ease);
}

[data-enhance='on'] .figure__img[data-loaded='true'] { opacity: 1; }

.figure__img--light { display: block; }
.figure__img--dark { display: none; }

[data-theme='dark'] .figure__img--light { display: none; }
[data-theme='dark'] .figure__img--dark { display: block; }

/* Sits behind the image, so a slow or blocked asset can never hide it. */
.figure__skeleton {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(100deg, transparent 20%, var(--accent-wash) 45%, transparent 70%),
    var(--bg-strong);
  background-size: 220% 100%, 100% 100%;
  animation: sweep 1.9s var(--ease) infinite;
  pointer-events: none;
  transition: opacity var(--t-slow) var(--ease);
}

[data-enhance='on'] .figure__skeleton { display: block; }
.figure[data-loaded='true'] .figure__skeleton { opacity: 0; }

@keyframes sweep {
  0% { background-position: 120% 0, 0 0; }
  100% { background-position: -60% 0, 0 0; }
}

@media (prefers-reduced-motion: reduce) {
  .figure__skeleton { animation: none; }
}

.figure figcaption {
  display: flex;
  gap: 0.75rem;
  align-items: baseline;
  padding: 0.85rem clamp(0.9rem, 2.4vw, 1.4rem) 1rem;
  border-top: var(--hair) solid var(--hairline);
  font-size: var(--step--1);
  color: var(--muted);
  line-height: 1.5;
}

.figure figcaption .mono { flex: 0 0 auto; color: var(--accent-deep); }

/* ---------------- reveal-on-scroll ---------------- */

/* Same contract as the figures: content is on the page unless the script is
   alive to animate it in. */
[data-enhance='on'] .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 700ms var(--ease),
    transform 700ms var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
}

[data-enhance='on'] .reveal[data-shown='true'] {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  [data-enhance='on'] .reveal { opacity: 1; transform: none; transition: none; }
}


/* ── scene.css ─────────────────────────────── */
/* ============================================================
   Sulat — 3D stage, scene slots, and their pre-load / no-WebGL
   fallbacks. One fixed canvas renders every scene through a
   scissored viewport aligned to these slots.
   ============================================================ */

.stage {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 900ms var(--ease);
}

.stage[data-ready='true'] { opacity: 1; }

/* A slot reserves layout space and holds the still fallback. */
.scene-slot {
  position: relative;
  isolation: isolate;
}

.scene-slot__fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  transition: opacity 700ms var(--ease);
}

.scene-slot[data-live='true'] .scene-slot__fallback {
  opacity: 0;
  pointer-events: none;
}

/* Slot status ticker — the quiet state before a scene composites. */
.scene-status {
  position: absolute;
  left: 0;
  bottom: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-45);
  transition: opacity var(--t-slow) var(--ease);
  pointer-events: none;
}

.scene-status::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 1.6s var(--ease) infinite;
}

.scene-slot[data-live='true'] .scene-status,
.scene-slot[data-live='failed'] .scene-status--loading { opacity: 0; }

.scene-slot[data-live='failed'] .scene-status--static { opacity: 1; }
.scene-status--static { opacity: 0; }
.scene-status--static::before { animation: none; opacity: 0.5; }

@keyframes pulse {
  0%, 100% { opacity: 0.25; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.15); }
}

@media (prefers-reduced-motion: reduce) {
  .scene-status::before { animation: none; }
}

/* ---------- still fallback: a sheet of marked-up paper ---------- */

.still-page {
  --sheet-w: min(100%, 23rem);
  position: relative;
  width: var(--sheet-w);
  aspect-ratio: 3 / 4;
  background: var(--surface);
  border: var(--hair) solid var(--hairline);
  border-radius: 0.35rem;
  box-shadow: var(--shadow-soft);
  padding: clamp(1rem, 3.2vw, 1.9rem);
  transform: rotate(-1.6deg);
  overflow: hidden;
}

.still-page::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 55%, var(--accent-wash));
  pointer-events: none;
}

.still-page__rule {
  height: 0.5rem;
  border-radius: 3px;
  background: var(--line-strong);
  opacity: 0.42;
  margin-bottom: 0.72rem;
}

.still-page__rule--short { width: 58%; }
.still-page__rule--mid { width: 82%; }
.still-page__rule--marked {
  background: var(--accent);
  opacity: 0.85;
}

.still-page__gap { height: 0.9rem; }

.still-page__mark {
  position: absolute;
  right: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-deep);
  background: var(--elevated);
  border: var(--hair) solid var(--accent-soft);
  border-radius: var(--radius-pill);
  padding: 0.18rem 0.55rem;
}

/* ---------- hero scene hit layer (hover/click for 3D pills) ---------- */

.scene-hit {
  position: absolute;
  inset: 0;
  pointer-events: auto;
  cursor: default;
  background: transparent;
}

@media (max-width: 60rem) {
  .scene-hit { pointer-events: none; }
}


/* ── sections.css ─────────────────────────────── */
/* ============================================================
   Sulat — section-specific composition
   ============================================================ */

/* ---------------- hero ---------------- */

.hero {
  position: relative;
  min-height: min(94svh, 60rem);
  display: flex;
  align-items: center;
  padding-block: clamp(3rem, 8vw, 6.5rem) clamp(3.5rem, 8vw, 7rem);
  overflow: clip;
}

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

/* A wash so the copy column keeps contrast over the 3D sheet. */
.hero__wash {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(
      0deg,
      var(--bg) 0%,
      color-mix(in srgb, var(--bg) 86%, transparent) 16%,
      var(--scene-fade) 32%
    ),
    radial-gradient(
      42rem 34rem at 20% 44%,
      var(--bg) 0%,
      color-mix(in srgb, var(--bg) 80%, transparent) 32%,
      var(--scene-fade) 64%
    );
}

@media (max-width: 60rem) {
  .hero__wash {
    background: linear-gradient(
      180deg,
      var(--bg) 0%,
      var(--bg) 29%,
      color-mix(in srgb, var(--bg) 86%, transparent) 37%,
      color-mix(in srgb, var(--bg) 30%, transparent) 46%,
      var(--scene-fade) 58%
    );
  }
}

.hero__inner {
  position: relative;
  z-index: 2;
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
}

/* Reserves the right half for the sheet so the 3D has somewhere to live. */
.hero__void { min-height: clamp(17rem, 42vw, 28rem); }

@media (max-width: 60rem) {
  .hero__grid { grid-template-columns: minmax(0, 1fr); }
  .hero { min-height: auto; padding-top: clamp(2rem, 7vw, 3rem); }
  .hero__void { min-height: clamp(18rem, 62vh, 27rem); }
}

.hero__copy { max-width: 34rem; }

.hero h1 {
  margin: 1.1rem 0 0;
  letter-spacing: -0.028em;
}

.hero h1 em {
  font-style: italic;
  color: var(--accent-deep);
}

.hero__deck {
  margin-top: clamp(1.1rem, 2.6vw, 1.6rem);
  font-size: var(--step-1);
  line-height: 1.56;
  color: var(--ink-70);
  max-width: 31rem;
}

.hero__claim {
  margin-top: clamp(1.2rem, 2.6vw, 1.7rem);
  padding-top: 1rem;
  border-top: var(--hair) solid var(--line-strong);
  font-family: var(--font-mono);
  font-size: var(--step--1);
  line-height: 1.7;
  letter-spacing: 0.01em;
  color: var(--muted);
  max-width: 30rem;
}

.hero__claim strong {
  color: var(--ink);
  font-weight: 600;
}

.hero__claim s {
  text-decoration-color: var(--accent);
  text-decoration-thickness: 1px;
  color: var(--ink-45);
}

.hero .btn-row { margin-top: clamp(1.4rem, 3vw, 2rem); }

/* Hero note rail — the 3D marginalia, addressable by keyboard. */

/* The margin notes, as a strip along the foot of the proof. Everything the
   orbiting 3D marginalia says is here too, focusable and readable. */
.hero__notes {
  position: relative;
  z-index: 2;
  margin-top: clamp(1.8rem, 4.5vw, 3rem);
  padding-top: 1rem;
  border-top: var(--hair) solid var(--hairline);
}

.hero__notes-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
}

@media (max-width: 62rem) {
  .hero__notes-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 34rem) {
  .hero__notes-row { grid-template-columns: minmax(0, 1fr); }
}

.hero__notes-title {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-45);
  margin-bottom: 0.2rem;
}

.note-chip {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 0.3rem;
  align-content: start;
  text-align: left;
  width: 100%;
  height: 100%;
  background: var(--paper);
  border: var(--hair) solid var(--hairline);
  border-left: 2px solid transparent;
  border-radius: var(--radius-sm);
  padding: 0.62rem 0.85rem;
  cursor: pointer;
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
  transition:
    border-color var(--t-fast) var(--ease),
    background-color var(--t-fast) var(--ease),
    transform var(--t-mid) var(--ease);
}

.note-chip:hover,
.note-chip[data-active='true'] {
  border-left-color: var(--accent);
  background: var(--surface);
  transform: translateX(3px);
}

.note-chip__axis {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--accent-deep);
  font-weight: 600;
}

.note-chip__text {
  font-size: var(--step--1);
  line-height: 1.5;
  color: var(--ink-70);
}

.hero__scroll-cue {
  position: absolute;
  left: 50%;
  bottom: clamp(0.8rem, 2.5vw, 1.6rem);
  transform: translateX(-50%);
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-45);
  text-decoration: none;
}

.hero__scroll-cue span::after {
  content: '';
  display: block;
  height: 1px;
  background: var(--line-strong);
  margin-top: 0.35rem;
  animation: cue 2.6s var(--ease) infinite;
  transform-origin: 50% 50%;
}

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

@media (prefers-reduced-motion: reduce) {
  .hero__scroll-cue span::after { animation: none; transform: scaleX(1); }
}

@media (max-width: 60rem) {
  .hero__scroll-cue { display: none; }
}

/* ---------------- the distinction: two columns ---------------- */

.split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1rem, 3vw, 2rem);
}

@media (max-width: 52rem) {
  .split { grid-template-columns: minmax(0, 1fr); }
}

.split__side { position: relative; }

.split__side h3 {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.split__side--cold h3 { color: var(--muted); }
.split__side--warm h3 { color: var(--accent-deep); }

.split__side--warm { border-left: 2px solid var(--accent); padding-left: clamp(0.9rem, 2vw, 1.4rem); }
.split__side--cold { border-left: 2px solid var(--hairline); padding-left: clamp(0.9rem, 2vw, 1.4rem); }

.split__side p { font-size: var(--step-0); color: var(--ink-70); }
.split__side p strong { color: var(--ink); font-weight: 600; }

/* ---------------- demo: rewritten vs critiqued ---------------- */

.demo {
  padding: 0;
  overflow: hidden;
}

.demo__head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  align-items: center;
  justify-content: space-between;
  padding: clamp(0.9rem, 2.4vw, 1.25rem) clamp(1rem, 2.6vw, 1.6rem);
  border-bottom: var(--hair) solid var(--hairline);
  background: var(--bg-strong);
}

.demo__meta {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}

.switch {
  display: inline-flex;
  padding: 0.22rem;
  gap: 0.2rem;
  border: var(--hair) solid var(--line-strong);
  border-radius: var(--radius-pill);
  background: var(--surface);
}

.switch__btn {
  border: 0;
  background: transparent;
  border-radius: var(--radius-pill);
  padding: 0.42rem 0.95rem;
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
  transition: background-color var(--t-mid) var(--ease), color var(--t-mid) var(--ease);
}

.switch__btn[aria-selected='true'] {
  background: var(--accent);
  color: #1b1206;
  font-weight: 600;
}

.switch__btn:hover:not([aria-selected='true']) { color: var(--ink); }

.demo__stage { position: relative; }

.demo__panel {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: clamp(1rem, 3vw, 2rem);
  padding: clamp(1.1rem, 3vw, 1.9rem);
}

.demo__panel[hidden] { display: none; }

@media (max-width: 56rem) {
  .demo__panel { grid-template-columns: minmax(0, 1fr); }
}

.passage {
  font-size: var(--step-1);
  line-height: 1.78;
  letter-spacing: -0.002em;
}

.passage__label {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-45);
  margin-bottom: 0.7rem;
}

.passage--flat { color: var(--muted); }

.mark {
  appearance: none;
  border: 0;
  background: transparent;
  font: inherit;
  color: inherit;
  padding: 0;
  cursor: pointer;
  position: relative;
  border-radius: 3px;
  text-align: left;
  display: inline;
  transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 100% 1.5px;
}

.mark:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.mark:hover,
.mark[data-active='true'] {
  background-color: var(--accent-wash);
  color: var(--ink);
  background-size: 100% 2.5px;
}

.mark__ref {
  font-family: var(--font-mono);
  font-size: 0.62em;
  vertical-align: super;
  color: var(--accent-deep);
  margin-left: 0.12em;
  letter-spacing: 0;
}

.notes {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  border-left: var(--hair) solid var(--hairline);
  padding-left: clamp(0.85rem, 2vw, 1.3rem);
}

@media (max-width: 56rem) {
  .notes { border-left: 0; padding-left: 0; border-top: var(--hair) solid var(--hairline); padding-top: 1rem; }
}

.note {
  border-left: 2px solid transparent;
  padding: 0.15rem 0 0.15rem 0.75rem;
  transition: border-color var(--t-fast) var(--ease), opacity var(--t-mid) var(--ease);
  opacity: 0.62;
}

.note[data-active='true'] { border-left-color: var(--accent); opacity: 1; }

.note__head {
  display: flex;
  gap: 0.5rem;
  align-items: baseline;
  margin-bottom: 0.25rem;
}

.note__axis {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--accent-deep);
  font-weight: 600;
}

.note__body {
  font-size: var(--step--1);
  line-height: 1.6;
  color: var(--ink-70);
  margin: 0;
}

.demo__foot {
  border-top: var(--hair) solid var(--hairline);
  padding: clamp(0.95rem, 2.5vw, 1.35rem) clamp(1rem, 2.6vw, 1.9rem);
  background: var(--bg-strong);
  display: grid;
  gap: 0.6rem;
}

.shape-line {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.shape-line__piece {
  font-size: var(--step--1);
  background: var(--surface);
  border: var(--hair) solid var(--hairline);
  border-radius: var(--radius-sm);
  padding: 0.3rem 0.7rem;
  color: var(--ink);
}

.shape-line__arrow { color: var(--accent); font-family: var(--font-mono); }

.demo__verdict {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 0;
  line-height: 1.7;
}

.demo__verdict strong { color: var(--accent-deep); font-weight: 600; }

/* ---------------- pipeline ---------------- */

/* No fill: the stage canvas sits behind the page, so anything opaque here
   would paint straight over the scene it is framing. */
.pipeline__scene {
  height: clamp(19rem, 42vw, 30rem);
  margin-bottom: clamp(1.4rem, 3.5vw, 2.4rem);
  border: var(--hair) solid var(--hairline);
  border-radius: var(--radius);
  overflow: hidden;
}

.pipeline__scene .scene-status { left: 0.9rem; bottom: 0.8rem; }

/* ---------------- persona ---------------- */

.persona {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(1rem, 3vw, 2rem);
  align-items: start;
}

@media (max-width: 56rem) {
  .persona { grid-template-columns: minmax(0, 1fr); }
}

.persona__panel { display: grid; gap: 1.15rem; }

.field__legend {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0;
  margin-bottom: 0.5rem;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.chip {
  border: var(--hair) solid var(--line-strong);
  background: transparent;
  border-radius: var(--radius-pill);
  padding: 0.42rem 0.85rem;
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: 0.05em;
  color: var(--muted);
  cursor: pointer;
  transition:
    background-color var(--t-fast) var(--ease),
    color var(--t-fast) var(--ease),
    border-color var(--t-fast) var(--ease);
}

.chip:hover { color: var(--ink); border-color: var(--accent); }

.chip[aria-pressed='true'] {
  background: var(--accent);
  border-color: var(--accent);
  color: #1b1206;
  font-weight: 600;
}

.persona__out {
  background: var(--surface);
  border: var(--hair) solid var(--hairline);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.persona__out-head {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
  padding: 0.75rem clamp(0.9rem, 2.4vw, 1.3rem);
  border-bottom: var(--hair) solid var(--hairline);
  background: var(--bg-strong);
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.persona__out-body {
  padding: clamp(1rem, 2.6vw, 1.5rem);
  transition: opacity var(--t-mid) var(--ease);
}

.persona__out-body[data-swapping='true'] { opacity: 0; }

.persona__sample {
  font-size: var(--step-0);
  line-height: 1.7;
  padding-bottom: 0.9rem;
  margin-bottom: 0.9rem;
  border-bottom: var(--hair) solid var(--hairline);
  color: var(--ink-70);
  font-style: italic;
}

.persona__verdict {
  font-size: var(--step-0);
  line-height: 1.68;
  margin: 0 0 0.65rem;
}

.persona__axes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

/* ---------------- session ---------------- */

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
  counter-reset: step;
}

.step {
  display: grid;
  grid-template-columns: 4.2rem minmax(0, 1fr);
  gap: clamp(0.75rem, 2.4vw, 1.6rem);
  padding: clamp(0.95rem, 2.4vw, 1.4rem) 0;
  border-top: var(--hair) solid var(--hairline);
  align-items: baseline;
}

.step:last-child { border-bottom: var(--hair) solid var(--hairline); }

@media (max-width: 40rem) {
  .step { grid-template-columns: minmax(0, 1fr); gap: 0.3rem; }
}

.step__time {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: 0.09em;
  color: var(--accent-deep);
  text-transform: uppercase;
}

.step__text { font-size: var(--step-1); line-height: 1.55; margin: 0; }
.step__text small {
  display: block;
  font-size: var(--step--1);
  color: var(--muted);
  margin-top: 0.35rem;
  line-height: 1.6;
  font-family: var(--font-body);
}

/* ---------------- restructure scene ---------------- */

.restructure {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(1.2rem, 3.5vw, 2.6rem);
  align-items: center;
}

@media (max-width: 60rem) {
  .restructure { grid-template-columns: minmax(0, 1fr); }
}

.restructure__scene {
  height: clamp(20rem, 46vw, 30rem);
  border: var(--hair) solid var(--hairline);
  border-radius: var(--radius);
  overflow: hidden;
}

.restructure__scene .scene-status { left: 0.9rem; bottom: 0.8rem; }

.counter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 1.1rem 0 0;
}

.counter {
  display: inline-flex;
  align-items: baseline;
  gap: 0.6rem;
  border: var(--hair) solid var(--hairline);
  border-radius: var(--radius-pill);
  background: var(--paper);
  padding: 0.45rem 1rem;
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.counter strong {
  font-size: var(--step-1);
  color: var(--accent-deep);
  font-weight: 600;
  letter-spacing: 0;
}

/* ---------------- audience list ---------------- */

.who {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: clamp(0.7rem, 2vw, 1rem);
}

.who li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.9rem;
  align-items: start;
  font-size: var(--step-0);
  line-height: 1.6;
  color: var(--ink-70);
  border-bottom: var(--hair) solid var(--hairline);
  padding-bottom: clamp(0.7rem, 2vw, 1rem);
}

.who li:last-child { border-bottom: 0; }

.who__mark {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  color: var(--accent);
  padding-top: 0.32em;
}

.who strong { color: var(--ink); font-weight: 600; }

/* ---------------- invite ---------------- */

.invite {
  position: relative;
  overflow: clip;
  border-top: var(--hair) solid var(--hairline);
}

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

.invite__wash {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(46rem 28rem at 42% 58%, var(--bg) 26%, color-mix(in srgb, var(--bg) 82%, transparent) 52%, var(--scene-fade) 82%);
}

.invite__inner {
  position: relative;
  z-index: 2;
  text-align: center;
  display: grid;
  justify-items: center;
  gap: 1.1rem;
  padding-block: clamp(1rem, 4vw, 3rem);
}

.invite__inner h2 { max-width: 20ch; }
.invite__inner p { max-width: 42rem; color: var(--ink-70); }

.mailto {
  display: inline-flex;
  align-items: center;
  gap: clamp(0.6rem, 2vw, 1rem);
  margin-top: 0.4rem;
  padding: 0.55rem 0.6rem 0.55rem clamp(1rem, 3vw, 1.6rem);
  border: var(--hair) solid var(--line-strong);
  border-radius: var(--radius-pill);
  background: var(--elevated);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  flex-wrap: wrap;
  justify-content: center;
  max-width: 100%;
}

.mailto__link {
  font-family: var(--font-mono);
  font-size: clamp(0.98rem, 3.4vw, 1.4rem);
  letter-spacing: -0.01em;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  user-select: all;
  -webkit-user-select: all;
  padding: 0.2rem 0.1rem;
  border-radius: 4px;
  white-space: nowrap;
  transition: color var(--t-fast) var(--ease);
}

.mailto__link:hover { color: var(--accent-deep); }

.copy-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border: var(--hair) solid var(--line-strong);
  background: var(--surface);
  border-radius: var(--radius-pill);
  padding: 0.5rem 1rem;
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  color: var(--muted);
  transition:
    border-color var(--t-fast) var(--ease),
    color var(--t-fast) var(--ease),
    background-color var(--t-fast) var(--ease);
}

.copy-btn:hover { color: var(--ink); border-color: var(--accent); }

.copy-btn[data-state='copied'] {
  border-color: var(--accent);
  color: var(--accent-deep);
  background: var(--accent-wash);
}

.copy-btn svg { width: 0.9rem; height: 0.9rem; }
.copy-btn__check { display: none; }
.copy-btn[data-state='copied'] .copy-btn__check { display: block; }
.copy-btn[data-state='copied'] .copy-btn__copy { display: none; }

.invite__hints {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.4rem;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-45);
  margin-top: 0.2rem;
}

.invite__hints span { display: inline-flex; align-items: center; gap: 0.4rem; }
.invite__hints span::before {
  content: '';
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.75;
}

.invite__no-form {
  font-size: var(--step--1);
  color: var(--muted);
  font-style: italic;
  max-width: 34rem;
}


/* ── refinements.css ─────────────────────────────── */
/* ============================================================
   Sulat — the quieter states: reduced motion, small screens,
   forced colours, print, and pre-hydration.
   ============================================================ */

/* Before the stage reports in, slots hold their still fallback and the
   status ticker explains itself rather than sitting blank. */
:root:not([data-stage]) .scene-slot__fallback { opacity: 1; }

:root[data-stage='static'] .scene-status--loading { opacity: 0; }
:root[data-stage='static'] .scene-status--static { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .scene-slot .scene-status--loading,
  .scene-slot[data-live='true'] .scene-status--loading { opacity: 0; }
  .scene-slot .scene-status--static,
  .scene-slot[data-live='true'] .scene-status--static { opacity: 1; }
  .note-chip:hover,
  .note-chip[data-active='true'] { transform: none; }
}

/* --- narrow screens: the phone is the design target, not the survivor --- */

@media (max-width: 40rem) {
  :root { --section-y: 3.6rem; }

  .masthead__inner { min-height: 3.6rem; }
  .masthead .btn--primary { padding: 0.6rem 0.95rem; }
  .wordmark__tag { display: none; }

  .hero { min-height: auto; }
  .hero__grid { gap: 1.25rem; }
  .hero__notes { gap: 0.45rem; }
  .note-chip { grid-template-columns: minmax(0, 1fr); gap: 0.2rem; padding: 0.55rem 0.75rem; }

  .demo__head { flex-direction: column; align-items: flex-start; }
  .switch { width: 100%; }
  .switch__btn { flex: 1; }

  .passage { font-size: var(--step-0); line-height: 1.7; }

  .figure figcaption { flex-direction: column; gap: 0.3rem; }

  .mailto { width: 100%; justify-content: space-between; padding-inline: 0.9rem; }
  .mailto__link { font-size: 1.02rem; }

  .invite__hints { gap: 0.35rem 0.9rem; }
}

@media (max-width: 26rem) {
  .mailto { flex-direction: column; gap: 0.55rem; padding: 0.85rem; }
  .mailto__link { white-space: normal; word-break: break-all; text-align: center; }
  .copy-btn { width: 100%; justify-content: center; }
}

/* Scene slots stay tall enough to be worth rendering on a phone. */
@media (max-width: 52rem) {
  .pipeline__scene { height: clamp(15rem, 62vw, 22rem); }
  .restructure__scene { height: clamp(17rem, 78vw, 24rem); }
}

/* --- accessibility fallbacks --- */

@media (forced-colors: active) {
  .stage { display: none; }
  .card,
  .figure,
  .mailto,
  .note-chip { border: 1px solid CanvasText; }
  .btn--primary { border: 1px solid CanvasText; }
  .switch__btn[aria-selected='true'],
  .chip[aria-pressed='true'] { forced-color-adjust: none; background: Highlight; color: HighlightText; }
}

/* --- print: the argument, on paper, where it belongs --- */

@media print {
  .stage,
  .masthead,
  .scene-slot__fallback,
  .scene-status,
  .hero__scroll-cue,
  .toggle { display: none !important; }

  body { background: #fff; color: #000; }
  .section { padding-block: 1.5rem; break-inside: avoid; }
  .reveal { opacity: 1 !important; transform: none !important; }
  .figure__img--dark { display: none !important; }
  a[href^='mailto']::after { content: ' (' attr(href) ')'; font-size: 0.8em; }
}
