/* ==========================================================================
   Shezad Morani — Portfolio
   Design system: Portfolio v1.0 (July 2026 redesign)

   Tokens: paper ground w/ subtle gradient, ink bookends (header/footer),
   vermillion accent on paper, gold accent on ink — never the reverse,
   and neither ever sets a headline.

   Type: Baskervville (400 only — never synthetically bolded) for all
   display; Inter for body; JetBrains Mono for eyebrows/labels/captions.
   ========================================================================== */

:root {
  /* color */
  --paper-0: #fcfbf8;
  --paper-1: #f5f3ed;
  --card: #faf9f5;
  --surface: #ffffff;
  --media-well: #fbfaf7;
  --ink: #181817;
  --bone: #f4f1e8;
  --bone-soft: rgba(244, 241, 232, 0.55);
  --bone-faint: rgba(244, 241, 232, 0.45);
  --muted: #666a64;
  --faint: #9da39a;
  --line: rgba(24, 24, 23, 0.1);
  --line-mid: rgba(24, 24, 23, 0.14);
  --line-strong: rgba(24, 24, 23, 0.22);
  --verm: #b8481f;
  --verm-soft: rgba(184, 72, 31, 0.45);
  --bronze: #9a7b2e;
  --gold: #e3a83d;
  --hero-blue: #149dfb;

  /* type */
  --font-serif: "Baskervville", Georgia, serif;
  --font-body: Inter, system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Menlo, monospace;

  /* space / shape / motion */
  --gutter: clamp(24px, 5vw, 72px);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --shadow-tile: 0 16px 40px rgba(23, 27, 24, 0.07);
  --shadow-tile-hover: 0 24px 56px rgba(23, 27, 24, 0.12);
  --shadow-media: 0 24px 60px rgba(23, 27, 24, 0.11);
  --shadow-chapter: 0 -18px 44px rgba(23, 27, 24, 0.09);
  --shadow-pill: 0 16px 40px rgba(23, 27, 24, 0.32);
}

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

html {
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: linear-gradient(180deg, var(--paper-0) 0%, var(--paper-1) 100%);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

img,
video,
svg {
  max-width: 100%;
}

a {
  color: var(--ink);
  text-decoration: none;
}

a:hover {
  color: var(--verm);
}

button {
  font: inherit;
  color: inherit;
}

h1,
h2,
h3 {
  font-family: var(--font-serif);
  font-weight: 400; /* Baskervville has no bold — synthetic bold forbidden */
}

[id] {
  scroll-margin-top: 76px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--bone);
  padding: 10px 16px;
  z-index: 100;
}

.skip-link:focus {
  left: 12px;
  top: 12px;
  color: var(--bone);
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* --- shared primitives -------------------------------------------------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}

.u-verm {
  color: var(--verm);
}

/* Inline emphasis inside body copy — ink with a soft vermillion underline. */
.emphasis {
  color: var(--ink);
  border-bottom: 1px solid var(--verm-soft);
}

.btn {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  padding: 0 24px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: transform 0.2s var(--ease);
}

.btn:hover {
  transform: translateY(-1px);
  color: var(--ink);
}

.btn--dark {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.btn--dark:hover {
  color: #fff;
}

/* Squared monospace buttons — home page only (hero + closing/contact
   groups). A deliberate departure from the site's rounded-pill .btn used
   on case-study "Open prototype" links elsewhere. */
.btn-mono {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 3px;
  border: 1px solid rgba(24, 24, 23, 0.28);
  background: transparent;
  color: var(--ink);
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

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

.btn-mono--primary {
  padding: 0 22px;
  border-color: var(--ink);
  background: var(--ink);
  color: #f4f1e8;
  transition: transform 0.2s var(--ease);
}

.btn-mono--primary:hover {
  transform: translateY(-1px);
  color: #f4f1e8;
  border-color: var(--ink);
}

.btn-mono__arrow {
  color: var(--gold);
}

/* --- reveals (home page) ------------------------------------------------ */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 0.65s var(--ease),
    transform 0.65s var(--ease);
  transition-delay: var(--delay, 0s);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
  }
}

@keyframes drawerIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

/* Atom-dot ⇄ headline-period pulse: opposite phases, 6s cycle with holds
   (hold 1.5s → fade 1.5s → hold 1.5s → fade 1.5s). The electron rides the
   orbit continuously via orbitSpin (20s linear infinite, starting at 7:30).
   Every section-heading period (.atom-period) shares this same metronome. */
@keyframes atomPulse {
  0%, 25% { opacity: 1; }
  50%, 75% { opacity: 0; }
  100% { opacity: 1; }
}

@keyframes periodPulse {
  0%, 25% { opacity: 0; }
  50%, 75% { opacity: 1; }
  100% { opacity: 0; }
}

@keyframes orbitSpin {
  from { transform: rotate(225deg); }
  to { transform: rotate(585deg); }
}

@media (prefers-reduced-motion: reduce) {
  [data-pulse] {
    animation: none !important;
    opacity: 1 !important;
  }

  .orbit__rotator {
    transform: rotate(225deg) !important;
  }
}

/* --- ink nav (all pages) ------------------------------------------------ */
.ink-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px var(--gutter);
  background: rgba(24, 24, 23, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.ink-nav__brand {
  font-family: var(--font-serif);
  font-size: 20px;
  color: var(--bone);
  white-space: nowrap;
}

.ink-nav__brand:hover {
  color: var(--bone);
}

.ink-nav__dot {
  color: var(--gold);
}

.ink-nav__links {
  display: flex;
  gap: clamp(16px, 3vw, 32px);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.ink-nav__links a,
.ink-nav__back {
  color: var(--bone-soft);
  transition: color 0.2s var(--ease);
}

.ink-nav__links a:hover,
.ink-nav__links a.is-active,
.ink-nav__back:hover {
  color: var(--gold);
}

.ink-nav__back {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* --- ink footer (all pages) --------------------------------------------- */
.ink-footer {
  padding: 26px var(--gutter);
  background: var(--ink);
}

.ink-footer__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.ink-footer__caption {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bone-faint);
}

.ink-footer__links {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ink-footer__links a {
  color: var(--bone-soft);
  transition: color 0.2s var(--ease);
}

.ink-footer__links a:hover {
  color: var(--gold);
}

.ink-footer__links a.is-gold {
  color: var(--gold);
}

.ink-footer__legal {
  margin: 18px 0 0;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  color: rgba(244, 241, 232, 0.35);
  max-width: 720px;
}

/* ==========================================================================
   HOME
   ========================================================================== */
.hero {
  position: relative;
  padding: clamp(48px, 8vh, 84px) var(--gutter) clamp(40px, 6vh, 64px);
  background: radial-gradient(720px 420px at 88% 8%, rgba(184, 72, 31, 0.06), transparent 70%);
  overflow: hidden;
}

.hero__inner {
  display: flex;
  flex-flow: row-reverse wrap;
  justify-content: flex-end;
  gap: clamp(32px, 5vw, 80px);
  align-items: flex-start;
  max-width: 1360px;
  margin: 0 auto;
}

.hero__copy {
  flex: 1 1 560px;
  min-width: 300px;
}

.hero__title {
  margin: 26px 0 0;
  font-size: clamp(52px, 7vw, 96px);
  line-height: 0.94;
  letter-spacing: -0.01em;
  max-width: 14ch;
}

.hero__lede {
  margin: 30px 0 0;
  font-size: clamp(16px, 1.5vw, 19px);
  line-height: 1.5;
  color: rgba(24, 24, 23, 0.65);
  max-width: 580px;
}

.hero__lede .ink {
  color: var(--ink);
}

.hero__logos {
  display: flex;
  gap: 40px;
  align-items: center;
  margin-top: 30px;
}

.hero__logos img {
  height: 19px;
  filter: grayscale(1);
  opacity: 0.5;
}

.hero__logos img.logo--meta {
  height: 17px;
}

.hero__actions {
  display: flex;
  gap: 12px;
  margin-top: 34px;
  flex-wrap: wrap;
}

/* orbit portrait — the ring echoes the vermillion headline period */
.orbit-host {
  flex: 0 0 auto;
  padding-top: 20px;
}

.orbit {
  position: relative;
  width: clamp(170px, 18vw, 234px);
  height: clamp(170px, 18vw, 234px);
  will-change: transform;
}

.orbit__ring {
  position: absolute;
  inset: 0;
  border: 1.5px solid rgba(184, 72, 31, 0.1);
  border-radius: 50%;
}

.orbit__photo {
  position: absolute;
  inset: 5%;
  width: 90%;
  height: 90%;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 20px 50px rgba(23, 27, 24, 0.16);
}

/* electron: rides the orbit continuously (rotator starts at 7:30) while
   pulsing against the headline period, sized to match it */
.orbit__rotator {
  position: absolute;
  inset: 0;
  animation: orbitSpin 20s linear infinite;
}

.orbit__electron {
  position: absolute;
  left: calc(50% - 5px);
  top: -5px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--verm);
  animation: atomPulse 6s cubic-bezier(.65, 0, .35, 1) infinite;
}

/* every section-heading period (H1 and H2) pulses in the inverse phase of
   the electron — one shared metronome across the page */
.atom-period {
  animation: periodPulse 6s cubic-bezier(.65, 0, .35, 1) infinite;
}

/* --- home sections shared shell --- */
.home-section {
  padding: clamp(40px, 7vh, 60px) var(--gutter) clamp(48px, 7vh, 64px);
  border-top: 1px solid rgba(24, 24, 23, 0.12);
}

.home-section__inner {
  max-width: 1360px;
  margin: 0 auto;
}

.home-section__title {
  margin: 0 0 36px;
  font-size: clamp(38px, 4vw, 56px);
  line-height: 1;
}

/* --- case study tiles --- */
.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 22px;
}

.tile {
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow-tile);
  overflow: hidden;
  transition:
    transform 0.25s var(--ease),
    box-shadow 0.25s var(--ease);
}

.tile:not([data-disabled="true"]):hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-tile-hover);
  color: var(--ink);
}

.tile[data-disabled="true"] {
  cursor: default;
}

.tile__media {
  position: relative;
  height: 225px;
  overflow: hidden;
}

/* image is 115% of the crop so parallax never shows edges */
.tile__media img {
  width: 100%;
  height: 115%;
  object-fit: cover;
  display: block;
  will-change: transform;
  transition: filter 0.3s var(--ease);
}

.tile:not([data-disabled="true"]):hover .tile__media img {
  filter: saturate(1.08) brightness(1.03);
}

.tile__placeholder {
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(-45deg, #eef1ed 0, #eef1ed 12px, #f6f7f4 12px, #f6f7f4 24px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.tile__placeholder span {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
}

.tile__body {
  padding: 22px 26px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
}

.tile__eyebrow {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.tile__brand {
  color: var(--ink);
  font-weight: 500;
}

.tile__project {
  color: var(--faint);
}

.tile__title {
  font-family: var(--font-serif);
  font-size: 27px;
  line-height: 1.08;
  transition: color 0.25s var(--ease);
}

.tile:not([data-disabled="true"]):hover .tile__title {
  color: var(--verm);
}

.tile__status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 4px;
}

.tile__status--soon {
  color: var(--faint);
}

/* --- leadership --- */
.leadership {
  background: linear-gradient(180deg, rgba(184, 72, 31, 0.03), transparent 60%);
}

.lead-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: clamp(32px, 6vw, 80px);
}

.lead-head h2 {
  margin: 14px 0 0;
  font-size: clamp(34px, 3.6vw, 48px);
  line-height: 1.02;
}

.pullquote {
  margin: 36px 0 0;
  padding-left: 28px;
  border-left: 2px solid var(--verm);
}

.pullquote p {
  margin: 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(19px, 1.9vw, 23px);
  line-height: 1.4;
  color: rgba(24, 24, 23, 0.8);
}

.pullquote cite {
  display: block;
  margin-top: 14px;
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.lead-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  font-size: 16px;
  line-height: 1.65;
  color: rgba(24, 24, 23, 0.72);
}

.lead-body p {
  margin: 0;
}

/* Inline quote — for a quote embedded inside a run of body paragraphs.
   No border, no quote marks (unlike .pullquote, which stays reserved for
   the one separated pullquote per section). */
.quote-inline {
  margin: 8px 0 8px 30px;
  padding: 0;
  border: 0;
}

.quote-inline p {
  margin: 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 18px;
  line-height: 1.5;
  color: rgba(24, 24, 23, 0.8);
}

.quote-inline__dash {
  color: var(--verm);
  font-style: normal;
}

.quote-inline cite {
  display: block;
  margin: 10px 0 0 34px;
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

/* More / Less full-width drawer */
.more {
  max-width: 1360px;
  margin: 28px auto 0;
}

.story-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  border: 0;
  border-bottom: 1px solid var(--verm);
  padding: 0 0 4px;
  background: transparent;
  cursor: pointer;
  white-space: nowrap;
}

.story-toggle__sign {
  color: var(--verm);
  font-size: 14px;
}

.more__drawer {
  animation: drawerIn 0.35s var(--ease);
  margin-top: 22px;
  padding-top: 32px;
  border-top: 1px solid var(--line-mid);
}

.more__drawer[hidden] {
  display: none;
}

/* Hero's own More/Less drawer — same toggle chrome as .story-toggle,
   own drawer styling since it sits directly under the hero lede rather
   than below a full-width section. */
.hero__more-toggle {
  margin-top: 18px;
}

.hero__more-drawer {
  animation: drawerIn 0.35s var(--ease);
  margin-top: 20px;
  font-size: clamp(15px, 1.4vw, 17px);
  line-height: 1.6;
  color: rgba(24, 24, 23, 0.65);
  max-width: 600px;
}

.hero__more-drawer[hidden] {
  display: none;
}

.more__title {
  margin: 0;
  font-size: clamp(24px, 2.4vw, 32px);
  line-height: 1.1;
}

.more__cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: clamp(28px, 5vw, 72px);
  margin-top: 24px;
  font-size: 15.5px;
  line-height: 1.65;
  color: rgba(24, 24, 23, 0.72);
}

.more__col {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.more__col p {
  margin: 0;
}

/* wayfinding sub-heading inside the More drawer — distinct from the page's
   muted mono eyebrows, intentionally accented since these label beats
   inside a dense drawer rather than whole sections. */
.more__beat-label {
  margin: 0 0 6px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--verm);
}

/* pod animation + virtuous cycle graphic — sit directly on the paper,
   no white cards */
.pod-wrap {
  margin-top: 10px;
}

.pod-eyebrow {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
  text-align: center;
  margin: 0;
}

/* Never CSS-stretch this canvas — the backing store + a uniform scale
   transform are derived from this same box in initPodAnimation(), so
   circles stay circles no matter how wide the column is. */
.pod-canvas {
  width: 100%;
  max-width: 560px;
  aspect-ratio: 560 / 200;
  display: block;
  margin: 14px auto 0;
}

.pod-label {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 16px;
  color: var(--muted);
  text-align: center;
  margin: 10px 0 0;
  transition: opacity 0.3s var(--ease);
}

.vc-graphic {
  margin-top: 10px;
  display: flex;
  justify-content: center;
}

.vc-graphic img {
  width: min(320px, 80%);
  height: auto;
  display: block;
}

/* --- closing --- */
.closing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: clamp(32px, 6vw, 80px);
}

.closing-main h2 {
  margin: 14px 0 0;
  font-size: clamp(34px, 3.6vw, 48px);
  line-height: 1.02;
}

.closing__lede {
  margin: 18px 0 0;
  font-size: 16px;
  line-height: 1.6;
  color: rgba(24, 24, 23, 0.65);
  max-width: 520px;
}

.closing__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.criteria {
  display: flex;
  flex-direction: column;
}

.criterion {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 18px;
  padding: 20px 0;
  border-top: 1px solid var(--line-mid);
  margin: 0;
}

.criterion__num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--verm);
}

.criterion__title {
  display: block;
  font-weight: 700;
  font-size: 16px;
  font-family: var(--font-body);
  margin: 0;
}

.criterion__text {
  display: block;
  margin: 6px 0 0;
  font-size: 14.5px;
  line-height: 1.55;
  color: rgba(24, 24, 23, 0.62);
}

/* ==========================================================================
   CASE STUDY + ME — stacked chapter cards
   ========================================================================== */

/* --- scrim hero (case study) --- */
.case-hero {
  position: relative;
  height: min(72vh, 640px);
  min-height: 460px;
  background: var(--hero-blue);
  overflow: hidden;
}

.case-hero__imgwrap {
  position: absolute;
  top: -50px;
  bottom: -50px;
  left: 50%;
  transform: translateX(-32%);
}

.case-hero__imgwrap img {
  height: 100%;
  width: auto;
  max-width: none; /* the global img{max-width:100%} reset otherwise clamps
                       width on wide viewports, squashing the aspect ratio */
  display: block;
  will-change: transform;
}

.case-hero__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(13, 22, 32, 0.8) 0%, rgba(13, 22, 32, 0.58) 38%, rgba(13, 22, 32, 0) 70%);
}

.case-hero__copy {
  position: absolute;
  left: var(--gutter);
  top: 50%;
  transform: translateY(-50%);
  max-width: min(560px, 56vw);
  padding-right: 24px;
}

.case-hero__eyebrow {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0;
}

.case-hero__title {
  margin: 20px 0 0;
  font-size: clamp(32px, 4vw, 52px);
  line-height: 1.05;
  color: #f6f5f1;
}

.case-hero__meta {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
  margin-top: 26px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: rgba(246, 245, 241, 0.65);
}

@media (max-width: 640px) {
  .case-hero__imgwrap {
    top: -5%;
    bottom: -5%;
    left: 50%;
    transform: translateX(-50%);
  }

  .case-hero__scrim {
    background: linear-gradient(0deg, rgba(13, 22, 32, 0.82), rgba(13, 22, 32, 0.45) 34%, transparent 60%);
  }

  .case-hero__copy {
    top: auto;
    bottom: 28px;
    transform: none;
    max-width: none;
    right: var(--gutter);
  }

  .case-hero__title {
    font-size: 29px;
  }
}

/* --- me intro --- */
.me-intro {
  padding: clamp(56px, 10vh, 96px) var(--gutter) clamp(40px, 7vh, 72px);
}

.me-intro__inner {
  max-width: 1100px;
  margin: 0 auto;
}

.me-intro__title {
  margin: 22px 0 0;
  font-size: clamp(56px, 8vw, 110px);
  line-height: 0.94;
  letter-spacing: -0.01em;
}

/* --- chapters container --- */
.chapters {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 var(--gutter) 140px;
}

.chapter {
  position: relative;
  background: var(--card);
  border-radius: 22px 22px 0 0;
  box-shadow: var(--shadow-chapter);
  margin-top: -22px;
  padding: clamp(28px, 4vh, 40px) clamp(20px, 3vw, 44px) clamp(88px, 13vh, 140px);
}

.chapter--first {
  margin-top: 0;
}

/* last card doesn't need the runway for a next card to slide over it */
.chapter--last {
  padding-bottom: clamp(48px, 7vh, 72px);
}

.chapter__veil {
  position: absolute;
  inset: 0;
  background: var(--ink);
  opacity: 0;
  pointer-events: none;
  border-radius: 22px 22px 0 0;
  z-index: 20;
}

.chapter__marker {
  position: sticky;
  top: 57px;
  z-index: 6;
  background: var(--card);
  padding: 12px 0;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid rgba(24, 24, 23, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

.chapter__marker-num {
  color: var(--verm);
}

.chapter__next {
  border: 0;
  background: transparent;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
  padding: 0;
  white-space: nowrap;
  transition: color 0.2s var(--ease);
}

.chapter__next:hover {
  color: var(--verm);
}

.chapter__title {
  margin: 28px 0 0;
  font-size: clamp(30px, 3.4vw, 44px);
  line-height: 1.05;
  max-width: 24ch;
}

.chapter__pithy {
  margin: 14px 0 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(16px, 1.7vw, 19px);
  color: var(--muted);
}

/* --- pre-chapter cards: synopsis + role ---------------------------------
   Same stacked-paper chrome as .chapter, but excluded from data-chapter
   (no wayfinder entry, no /NN counter, no veil/pin logic) — purely visual
   continuation of the stack sliding over the hero. -------------------- */
.synopsis,
.role {
  position: relative;
  background: var(--card);
  border-radius: 22px 22px 0 0;
  box-shadow: var(--shadow-chapter);
  margin-top: -22px;
}

.synopsis--first {
  margin-top: 0;
}

.synopsis {
  padding: clamp(32px, 5vh, 52px) clamp(20px, 3vw, 44px) clamp(52px, 8vh, 84px);
}

.role {
  padding: clamp(32px, 5vh, 52px) clamp(20px, 3vw, 44px) clamp(44px, 6vh, 64px);
}

.card-kicker {
  display: flex;
  align-items: center;
  gap: 16px;
}

.card-kicker__label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--verm);
  white-space: nowrap;
}

.card-kicker__rule {
  flex: 1;
  height: 1px;
  background: var(--line-mid);
}

.synopsis__lead {
  margin: 22px 0 0;
  font-family: var(--font-serif);
  font-size: clamp(21px, 2.3vw, 28px);
  line-height: 1.4;
  color: var(--ink);
  max-width: 40ch;
  text-wrap: pretty;
}

.synopsis__facets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: clamp(24px, 3vw, 40px);
  margin-top: clamp(32px, 4vh, 44px);
}

.synopsis__facet {
  border-top: 1px solid var(--line-strong);
  padding-top: 15px;
}

.synopsis__facet-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--bronze);
}

.synopsis__facet-body {
  margin: 11px 0 0;
  font-size: 14.5px;
  line-height: 1.6;
  color: rgba(24, 24, 23, 0.74);
}

.synopsis__metric {
  font-weight: 400;
  font-family: var(--font-serif);
  font-size: 19px;
  color: var(--ink);
}

.role__list {
  display: flex;
  flex-direction: column;
  margin-top: 22px;
  max-width: 80ch;
}

.role__row {
  display: flex;
  gap: 18px;
  padding: 15px 0;
  border-top: 1px solid var(--line);
}

.role__row:last-child {
  border-bottom: 1px solid var(--line);
}

.role__num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--bronze);
  padding-top: 3px;
}

.role__text {
  font-size: 15.5px;
  line-height: 1.55;
  color: #2a2a28;
}

.role__para {
  margin: 22px 0 0;
  font-size: 15.5px;
  line-height: 1.6;
  color: #2a2a28;
  max-width: 70ch;
}

.role__footer {
  margin: 20px 0 0;
  font-size: 13px;
  line-height: 1.6;
  color: #777;
  max-width: 80ch;
}

/* --- carousel --------------------------------------------------------- */
.car {
  position: relative;
  overflow: hidden;
  margin-top: 32px;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}

.car__track {
  display: flex;
  transition: transform 0.55s var(--ease);
  will-change: transform;
}

.car__slide {
  flex: 0 0 78%;
  margin-right: 2%;
  min-width: 0;
}

.car__paddle {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(24, 24, 23, 0.15);
  background: rgba(252, 251, 248, 0.9);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 15px;
  color: var(--ink);
  box-shadow: 0 8px 22px rgba(23, 27, 24, 0.14);
  transition: opacity 0.25s;
  z-index: 4;
}

.car__paddle--prev {
  left: 14px;
}

.car__paddle--next {
  right: 14px;
}

.car__paddle:disabled {
  opacity: 0.3;
  cursor: default;
}

.car__dots {
  display: flex;
  gap: 9px;
  justify-content: center;
  align-items: center;
  margin-top: 22px;
}

.car__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(24, 24, 23, 0.25);
  border: 0;
  cursor: pointer;
  padding: 0;
  transition: all 0.3s var(--ease);
}

.car__dot.is-active {
  width: 24px;
  border-radius: 999px;
  background: var(--verm);
}

/* --- media card (white, radius 14, hairline, media shadow) -------------
   Carousel slides: image/video sits inside .media-card__imgwrap (its own
   padding + background) so screenshots never touch the card edge; the
   caption row follows below. Single-exhibit cards use --pad instead: no
   letterboxing (height:auto), padding lives on the figure itself. ------- */
.media-card {
  position: relative;
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-media);
}

.media-card__imgwrap {
  padding: 28px 40px 0;
  background: var(--media-well);
}

.media-card__media {
  width: 100%;
  height: clamp(284px, calc(54vh - 56px), 464px);
  object-fit: contain;
  display: block;
}

/* very tall captures (full-page desktop screenshots): top-cropped instead
   of contained, so the thumb reads as a page-top preview rather than a
   narrow letterboxed sliver. */
.media-card__media--crop-top {
  object-fit: cover;
  object-position: top;
}

.media-card__cap {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 16px 24px;
}

.media-card__cap-title {
  font-family: var(--font-serif);
  font-size: 19px;
}

.media-card__cap-index {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--faint);
}

.media-card--pad {
  padding: clamp(20px, 3vw, 40px);
}

.media-card--pad .media-card__media {
  height: auto;
  border-radius: 8px;
}

.media-card--pad .media-card__figcap {
  margin-top: 16px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* tighter padding variant for mobile-mockup single-exhibit cards */
.media-card--tight {
  padding: clamp(20px, 3vw, 32px);
}

/* iOS-widget / mobile-data-viz exhibits get double the standard width */
.media-card--wide {
  max-width: 760px;
}

/* --- lightbox trigger (expand-corners icon, top-right of a slide/exhibit,
   hidden below 768px where assets are already full-width) --------------- */
.lb-trigger {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 28px;
  height: 28px;
  border: 0;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  padding: 0;
  opacity: 0.55;
  color: var(--ink);
  transition: opacity 0.2s;
}

.lb-trigger:hover {
  opacity: 1;
}

.lb-trigger svg {
  display: block;
}

@media (max-width: 768px) {
  .lb-trigger {
    display: none !important;
  }
}

/* --- lightbox modal: fullscreen asset view with carousel-style paging -- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(12, 14, 13, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(10px, 2vw, 28px);
}

.lightbox[hidden] {
  display: none;
}

.lightbox__close {
  position: absolute;
  top: 14px;
  right: 18px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(244, 241, 232, 0.25);
  background: rgba(24, 24, 23, 0.6);
  color: #f4f1e8;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.lightbox__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(244, 241, 232, 0.25);
  background: rgba(24, 24, 23, 0.55);
  color: #f4f1e8;
  font-family: var(--font-mono);
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  z-index: 2;
  cursor: pointer;
  opacity: 0.85;
  transition: opacity 0.2s;
}

.lightbox__arrow--prev {
  left: clamp(8px, 2vw, 28px);
}

.lightbox__arrow--next {
  right: clamp(8px, 2vw, 28px);
}

.lightbox__arrow:disabled {
  opacity: 0.25;
  cursor: default;
}

.lightbox__arrow[hidden] {
  display: none;
}

.lightbox__content {
  max-width: 97vw;
  max-height: 95vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox__imgwrap {
  max-width: 97vw;
  max-height: 92vh;
  background: #fbfaf7;
  border-radius: 10px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  padding: clamp(10px, 2vw, 28px);
  display: flex;
}

.lightbox__imgwrap[hidden] {
  display: none;
}

/* Scrollable variant (entry.scroll = true): for very tall full-page
   captures, the media scrolls vertically inside the card instead of being
   shrunk to fit the viewport, so the whole page can be read at width. */
.lightbox__imgwrap.is-scroll {
  display: block;
  width: min(1200px, 94vw);
  max-width: min(1200px, 94vw);
  max-height: 92vh;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding: clamp(10px, 2vw, 24px);
}

.lightbox__imgwrap.is-scroll .lightbox__imgbox {
  display: block;
  width: 100%;
}

.lightbox__imgwrap.is-scroll .lightbox__img {
  width: 100%;
  height: auto;
  max-width: none;
  max-height: none;
  border-radius: 4px;
}

/* Horizontal-scroll variant (entry.scrollX = true): for very wide diagrams,
   the media scrolls sideways at a fixed tall height instead of being
   shrunk to fit the viewport width. */
.lightbox__imgwrap.is-scroll-x {
  display: block;
  max-width: 94vw;
  max-height: 92vh;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  padding: clamp(14px, 2vw, 28px);
}

.lightbox__imgwrap.is-scroll-x .lightbox__imgbox {
  display: inline-block;
}

.lightbox__imgwrap.is-scroll-x .lightbox__img {
  height: min(72vh, 560px);
  width: auto;
  max-width: none;
  max-height: none;
  border-radius: 4px;
}

.lightbox__hint {
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(244, 241, 232, 0.65);
  display: flex;
  align-items: center;
  gap: 8px;
}

.lightbox__hint-icon {
  font-size: 13px;
}

.lightbox__hint[hidden] {
  display: none;
}

/* Shrink-wraps to the img's actual rendered box (no explicit size), so a
   cloned filmstrip overlay positioned by percentage lines up correctly
   without any JS measurement — see initLightbox()'s overlayEl handling. */
.lightbox__imgbox {
  position: relative;
  display: inline-flex;
}

.lightbox__img {
  max-width: 100%;
  max-height: calc(92vh - 56px);
  width: auto;
  height: auto;
  display: block;
}

.lightbox__video {
  max-width: 97vw;
  max-height: 92vh;
  width: auto;
  height: auto;
  display: block;
  border-radius: 10px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}

.lightbox__video[hidden] {
  display: none;
}

.lightbox__iframe {
  width: min(1180px, 94vw);
  height: 88vh;
  border: 0;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}

.lightbox__iframe[hidden] {
  display: none;
}

.lightbox__caption {
  margin-top: 16px;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 16px;
  color: rgba(244, 241, 232, 0.8);
}

.lightbox__caption[hidden] {
  display: none;
}

/* --- video card (uncropped, caption band below) — canonical component for
   agentic-commerce style slides: white surface, video snug to the card at
   its natural aspect ratio (never cover/letterboxed), caption below. ------ */
.video-card {
  position: relative;
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-media);
}

.video-card__media {
  width: 100%;
  height: auto;
  display: block;
}

.video-card__cap {
  border-top: 1px solid rgba(24, 24, 23, 0.08);
  padding: 18px 26px 24px;
}

.video-card__cap-row1 {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

.video-card__eyebrow {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.video-card__index {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--faint);
}

.video-card__cap-row2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 8px 44px;
  margin-top: 10px;
}

.video-card__title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 26px;
  line-height: 1.1;
  margin: 0;
}

.video-card__desc {
  font-size: 14px;
  line-height: 1.55;
  color: rgba(24, 24, 23, 0.72);
  margin: 0;
}

/* image pair inside one media well */
.media-pair {
  display: flex;
  gap: 16px;
  justify-content: center;
  align-items: center;
  background: var(--media-well);
  height: clamp(340px, 54vh, 520px);
  padding: 20px;
}

.media-pair img {
  height: 100%;
  width: auto;
  max-width: 48%;
  object-fit: contain;
}

/* --- datapoints (chapter 02) ------------------------------------------- */
.datapoints {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px;
  margin-top: 36px;
}

.dp {
  border-top: 1px solid var(--line-strong);
  padding-top: 18px;
}

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

.dp__num {
  font-family: var(--font-serif);
  font-size: 48px;
  line-height: 1;
  margin: 12px 0 0;
}

.dp__unit {
  font-size: 24px;
  color: var(--muted);
}

.dp__sub {
  font-size: 13.5px;
  color: var(--muted);
  margin: 6px 0 0;
}

/* --- pillars strip (chapter 03) ----------------------------------------- */
.pillars {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  align-items: baseline;
  justify-content: center;
  margin-top: 32px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.pillars span {
  font-family: var(--font-serif);
  font-size: clamp(18px, 2vw, 24px);
}

.pillars .pillars__dot {
  color: var(--faint);
  font-family: var(--font-body);
}

.pillars .pillars__accent {
  font-style: italic;
  border-bottom: 3px solid var(--verm);
  padding-bottom: 2px;
}

.team-eyebrow {
  text-align: center;
  margin: 36px 0 0;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

/* --- five-goals list (chapter 04, between pithy and timeline) ----------- */
.goals {
  margin-top: 32px;
}

.goals__row {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 18px;
  align-items: baseline;
  padding: 18px 0;
  border-top: 1px solid var(--line-strong);
}

.goals__row:last-child {
  border-bottom: 1px solid var(--line-strong);
}

.goals__num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--verm);
}

.goals__text {
  font-family: var(--font-serif);
  font-size: clamp(19px, 2vw, 24px);
  line-height: 1.35;
}

/* --- timeline (chapter 04) ---------------------------------------------- */
.tl-card {
  margin: 32px 0 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-media);
  padding: clamp(28px, 4vw, 48px);
}

.tl-card__eyebrow {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}

.tl {
  position: relative;
  margin-top: 44px;
}

.tl__track {
  position: absolute;
  left: 0;
  right: 0;
  top: 10px;
  height: 1px;
  background: rgba(24, 24, 23, 0.18);
}

.tl__progress {
  position: absolute;
  left: 0;
  top: 10px;
  height: 1px;
  width: 83.3%;
  background: rgba(184, 72, 31, 0.35);
}

.tl__steps {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}

.tl__step {
  position: relative;
}

.tl__dot {
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: var(--ink);
  border: 5px solid var(--surface);
  box-shadow: 0 0 0 1px var(--line-strong);
}

.tl__step--accent .tl__dot {
  background: var(--verm);
  box-shadow: 0 0 0 1px var(--verm);
}

.tl__name {
  font-family: var(--font-serif);
  font-size: clamp(17px, 1.8vw, 21px);
  margin: 16px 0 0;
}

.tl__sub {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 5px 0 0;
}

.tl__step--accent .tl__sub {
  color: var(--verm);
}

@media (max-width: 640px) {
  .tl__steps {
    grid-template-columns: repeat(2, 1fr);
    row-gap: 28px;
  }

  .tl__track,
  .tl__progress {
    display: none;
  }
}

/* --- double diamond (chapter 04, inline SVG) ---------------------------- */
.dd-card {
  margin: 24px 0 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-media);
  padding: clamp(28px, 4vw, 48px);
}

.dd-card__eyebrow {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
  margin: 0;
}

.dd-card svg {
  width: 100%;
  height: auto;
  display: block;
  margin-top: 8px;
}

.dd-card__footnote {
  margin-top: 12px;
  text-align: center;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 15px;
  color: var(--muted);
}

/* --- story drawer (one element, two states) ------------------------------ */
.story {
  display: grid;
  grid-template-columns: 104px 1fr;
  gap: 16px;
  margin-top: 26px;
}

.story__gutter {
  position: relative;
}

.story__gutter .story-toggle {
  position: sticky;
  top: 118px;
}

.story__drawer {
  animation: drawerIn 0.35s var(--ease);
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 2px solid var(--verm);
  border-radius: 0 10px 10px 0;
  padding: 28px 32px;
}

.story__drawer[hidden] {
  display: none;
}

.story__tag {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--verm);
}

.story__drawer p {
  margin: 14px 0 0;
  font-size: 15.5px;
  line-height: 1.65;
  color: rgba(24, 24, 23, 0.75);
}

@media (max-width: 720px) {
  .story {
    grid-template-columns: 1fr;
  }

  .story__gutter {
    order: 2;
  }

  .story__gutter .story-toggle {
    position: sticky;
    top: auto;
    bottom: 12px;
    background: var(--card);
    padding: 8px 0 4px;
  }
}

/* --- before / after pair (outcome) --------------------------------------- */
.ba-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 22px;
  margin-top: 32px;
}

.ba-grid .media-card__media {
  height: clamp(300px, 44vh, 440px);
}

.ba-cap {
  padding: 14px 22px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.ba-cap--after {
  color: var(--verm);
}

/* --- outcome metrics (restyled to system: vermillion on paper) ----------- */
.out-wrap {
  margin-top: 40px;
}

.out-eyebrow {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 18px;
}

/* One rule per group, full width — no per-cell hairlines anywhere. */
.out-group {
  margin-top: 36px;
}

.out-group:first-of-type {
  margin-top: 0;
}

.out-group__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
}

.out-group__eyebrow {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.out-group__note {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 14px;
  color: var(--faint);
}

.out-group__rule {
  display: block;
  border: none;
  border-top: 1px solid rgba(24, 24, 23, 0.12);
  margin: 14px 0 0;
}

.out-group--hero .out-group__rule--strong {
  border-top: 1px solid rgba(24, 24, 23, 0.22);
}

/* Group 3's pill IS the divider: [pill][flex-1 hairline] */
.out-group__pillrule {
  display: flex;
  align-items: center;
  gap: 14px;
}

.out-group__pillrule .out-group__rule {
  flex: 1;
  margin: 0;
}

.ai-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--paper-0);
  background: var(--verm);
  border-radius: 999px;
  padding: 6px 14px;
  white-space: nowrap;
}

/* Group 1 — conversion hero cells */
.cvr-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px 40px;
  align-items: baseline;
  padding-top: 22px;
}

.cvr-cell__label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}

.cvr-cell__label--faint {
  color: var(--faint);
}

.cvr-cell__label--verm {
  color: var(--verm);
}

.cvr-cell__value {
  font-family: var(--font-serif);
  font-size: clamp(36px, 3.6vw, 50px);
  color: var(--muted);
  line-height: 1;
  margin: 6px 0 0;
}

.cvr-cell__unit {
  font-size: 0.5em;
}

.cvr-cell__value--hero {
  font-size: clamp(48px, 5vw, 68px);
  color: var(--ink);
}

.cvr-cell__value--lift {
  font-style: italic;
  color: var(--verm);
}

/* Uniform stat-cell anatomy — groups 2 and 3 */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px 40px;
  padding-top: 22px;
}

.stat-cell__value {
  font-family: var(--font-serif);
  font-size: clamp(34px, 3.4vw, 46px);
  color: var(--ink);
  line-height: 1;
  margin: 0;
}

.stat-cell__unit {
  font-size: 0.5em;
  color: var(--muted);
}

.stat-cell__label {
  font-size: 15px;
  color: var(--ink);
  margin: 12px 0 0;
}

.stat-cell__sub {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--faint);
  margin: 6px 0 0;
}

.wins-eyebrow {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 40px 0 18px;
}

.wins-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.win-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow-tile);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.win-card__icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--media-well);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
}

.win-card__icon svg {
  width: 20px;
  height: 20px;
}

.win-card__title {
  font-family: var(--font-serif);
  font-size: 19px;
  line-height: 1.2;
  margin: 0;
}

.win-card__body {
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
}

/* --- prototype embeds (chapter 06 + DS 6.0) ------------------------------ */
.proto-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 0;
}

.proto-grid__frame {
  background: var(--media-well);
  padding: clamp(16px, 2vw, 28px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.proto-grid__frame iframe {
  width: 100%;
  height: clamp(440px, 58vh, 600px);
  border: 0;
  border-radius: 8px;
  background: #fff;
}

/* edge-to-edge variant: iframe fills the grid cell with no inset padding
   or corner radius, sized taller to match sibling video slides */
.proto-grid__frame--flush {
  padding: 0;
}

.proto-grid__frame--flush iframe {
  height: clamp(558px, 75vh, 700px);
  border-radius: 0;
}

.proto-grid__panel {
  padding: clamp(24px, 3vw, 40px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start;
  justify-content: center;
  border-left: 1px solid var(--line);
}

.proto-grid__eyebrow {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--verm);
  margin: 0;
}

.proto-grid__title {
  font-size: clamp(22px, 2.2vw, 30px);
  line-height: 1.1;
  margin: 0;
}

.proto-grid__desc {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--muted);
  margin: 0;
}

.proto-grid__panel .btn {
  margin-top: 8px;
  min-height: 40px;
  font-size: 13.5px;
}

@media (max-width: 900px) {
  .proto-grid {
    grid-template-columns: 1fr;
  }

  .proto-grid__panel {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
}

/* PPW slide */
.ppw-actions {
  display: flex;
  justify-content: center;
  padding: 0 24px 20px;
}

/* --- reflections grid ----------------------------------------------------- */
.ref-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
  margin-top: 32px;
}

.ref-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow-tile);
  padding: 26px 28px;
}

.ref-card__headline {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 20px;
  line-height: 1.25;
  margin: 0;
}

.ref-card__body {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
  margin: 10px 0 0;
}

/* --- me page photo blocks -------------------------------------------------- */
.photo-stack {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 32px;
}

.photo-stack img {
  width: 100%;
  height: clamp(420px, 62vh, 640px);
  object-fit: cover;
  border-radius: 14px;
  box-shadow: var(--shadow-media);
  display: block;
}

.photo-slide {
  width: 100%;
  height: clamp(400px, 60vh, 600px);
  object-fit: cover;
  border-radius: 14px;
  box-shadow: var(--shadow-media);
  display: block;
}

/* --- wayfinder pill --------------------------------------------------------- */
.wf {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 24px;
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.wf__panel {
  animation: drawerIn 0.25s var(--ease);
  margin-bottom: 10px;
  background: var(--ink);
  border-radius: 14px;
  padding: 10px 8px;
  box-shadow: 0 16px 40px rgba(23, 27, 24, 0.35);
  min-width: 260px;
}

.wf__panel[hidden] {
  display: none;
}

.wf__row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 8px 14px;
  border-radius: 8px;
}

.wf__row:hover {
  background: rgba(244, 241, 232, 0.06);
}

.wf__row-num {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: rgba(244, 241, 232, 0.4);
  min-width: 20px;
}

.wf__row.is-current .wf__row-num {
  color: var(--gold);
}

.wf__row-label {
  font-family: var(--font-serif);
  font-size: 15px;
  color: var(--bone);
}

.wf__pill {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--ink);
  border-radius: 999px;
  padding: 11px 20px;
  box-shadow: var(--shadow-pill);
}

.wf__arrow {
  border: 0;
  background: transparent;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--bone-soft);
  padding: 4px 2px;
  transition: color 0.2s var(--ease);
}

.wf__arrow:hover {
  color: var(--gold);
}

.wf__mid {
  display: flex;
  align-items: baseline;
  gap: 10px;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0;
}

.wf__num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--gold);
}

.wf__label {
  font-family: var(--font-serif);
  font-size: 16px;
  color: var(--bone);
  white-space: nowrap;
}

.wf__track {
  width: 72px;
  height: 2px;
  background: rgba(244, 241, 232, 0.18);
  position: relative;
  overflow: hidden;
}

.wf__fill {
  position: absolute;
  left: 0;
  top: 0;
  height: 2px;
  background: var(--gold);
  width: 0%;
}

@media (max-width: 560px) {
  .wf__track {
    display: none;
  }

  .wf__label {
    font-size: 14px;
    max-width: 34vw;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

/* --- coming-soon stub pages -------------------------------------------------- */
.soon {
  min-height: calc(100vh - 220px);
  display: flex;
  align-items: center;
  padding: clamp(48px, 10vh, 96px) var(--gutter);
}

.soon__inner {
  max-width: 720px;
  margin: 0 auto;
  text-align: left;
  width: 100%;
}

.soon__title {
  margin: 20px 0 0;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1;
}

.soon__note {
  margin: 20px 0 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(17px, 1.9vw, 21px);
  color: var(--muted);
}

.soon__status {
  display: inline-block;
  margin-top: 26px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
}

.soon__actions {
  margin-top: 30px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.soon__media {
  margin-top: 32px;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-media);
  overflow: hidden;
}

.soon__media img {
  width: 100%;
  height: auto;
  display: block;
}
