/* ============================================================================
   Itqaan Solutions — "One Sheet, Folded"
   The public persuade path.  seed 3ed6a8e2
   ============================================================================
   Structural law of this world:
     · A crease, not a border, separates things. No card owns a box.
     · Vermilion is the GROUND, not an accent. Fold-white is a minority stock.
     · The gold dot marks one thing per view: the crease a human must make.
     · Motion is a fold — accelerate, then catch. Never a gentle ease-out.
   This sheet is self-contained: it does not load main.css or responsive.css,
   so every media query lives here and no second stylesheet can outrank it.
   ========================================================================== */

/* ── Base ─────────────────────────────────────────────────────────────────── */

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

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

body {
  margin: 0;
  background: var(--vermilion-deep);
  color: var(--sumi);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--line-height-normal);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 300;
  line-height: var(--line-height-tight);
  letter-spacing: var(--letter-spacing-tight);
}

p { margin: 0 0 var(--sp-sm); }
p:last-child { margin-bottom: 0; }

a { color: inherit; }

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

/* Browser surfaces carry the design too. */
::selection { background: var(--gold); color: var(--sumi); }
:root { accent-color: var(--vermilion-text); caret-color: var(--vermilion-text); scrollbar-color: var(--vermilion) var(--paper-grey); }

/* The mark's height, once. At 24px the crane stands about twice the wordmark's
   cap height — close enough to read as one lockup rather than a picture set
   beside a word, far enough that the fold still resolves. */
:root { --crane-h: 24px; }

:focus-visible {
  outline: 2px solid var(--vermilion-text);
  outline-offset: 3px;
}
.stock--red :focus-visible,
.stock--red-lo :focus-visible,
.stock--dark :focus-visible {
  outline-color: var(--gold);
}

.skip-link {
  position: absolute;
  left: var(--sp-sm);
  top: -100%;
  z-index: calc(var(--z-modal) + 1);
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: var(--sp-xs) var(--sp-sm);
  background: var(--sumi);
  color: var(--fold-white);
  font-family: var(--font-mono);
  font-size: var(--text-3xs);
  letter-spacing: var(--letter-spacing-wide);
  text-transform: uppercase;
  text-decoration: none;
}
.skip-link:focus { top: var(--sp-sm); }

.a11y-only {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ── Stocks ───────────────────────────────────────────────────────────────
   A region is printed on a stock. The fibre sits over the ground, and reads
   at different strength on red than on paper. */

.stock {
  position: relative;
  padding: var(--sp-2xl) var(--pad-x);
}
.stock--red    { background: var(--vermilion-deep); color: var(--fold-white); }
.stock--red-lo { background: var(--vermilion-deep); color: var(--fold-white); }
.stock--dark   { background: var(--sumi);           color: var(--fold-white); }
.stock--light  { background: var(--fold-white);     color: var(--sumi); }
.stock--grey   { background: var(--paper-grey);     color: var(--sumi); }

.stock::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='f'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23f)'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}
.stock--red::before, .stock--red-lo::before { opacity: var(--fibre-on-red); }
.stock--dark::before  { opacity: 0.10; mix-blend-mode: screen; }
.stock--light::before,
.stock--grey::before  { opacity: var(--fibre-on-light); }

.stock > * { position: relative; z-index: 1; }

.wrap        { max-width: var(--max-w); margin: 0 auto; }
.wrap--narrow{ max-width: var(--max-w-narrow); margin-left: 0; }

/* ── Type roles ───────────────────────────────────────────────────────────── */

.display {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(var(--text-2xl), 6.5vw, var(--text-4xl));
  line-height: 1.02;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.display--caps {
  text-transform: uppercase;
  letter-spacing: 0.02em;
  font-weight: 200;
}

.heading {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(var(--text-xl), 4.2vw, var(--text-2xl));
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-wrap: balance;
  max-width: 20ch;
}

.lede {
  font-size: var(--text-lg);
  line-height: 1.42;
  max-width: 34ch;
  font-weight: 400;
}

.prose { max-width: 62ch; }
.prose p + p { margin-top: var(--sp-sm); }

/* The instrument voice: step indices, tags, every measured value. */
.tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: var(--text-3xs);
  font-weight: 500;
  letter-spacing: var(--letter-spacing-wide);
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
}
.tag--hold  { color: var(--hold); }
.tag--auto  { color: var(--auto); }
.stock--dark .tag--hold { color: var(--hold-lit); }
.stock--dark .tag--auto { color: var(--auto-lit); }

.num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

/* ── The mark: this world's button ────────────────────────────────────────
   Not a pill. A stamped block with a crease under it that extends on press. */

.mark-btn {
  --mark-ink: var(--fold-white);
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: var(--sp-xs);
  min-height: 52px;
  padding: var(--sp-xs) var(--sp-md);
  background: var(--sumi);
  color: var(--mark-ink);
  border: 0;
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  font-weight: 600;
  letter-spacing: var(--letter-spacing-wide);
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease),
              color var(--dur-fast) var(--ease),
              transform var(--dur-fast) var(--ease-fold);
}
.mark-btn::after {
  content: "";
  position: absolute;
  left: 0; bottom: -6px;
  width: 100%; height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur-fold) var(--ease-fold);
}
.mark-btn:hover::after,
.mark-btn:focus-visible::after { transform: scaleX(1); }
.mark-btn:active { transform: scale(0.985); }

.mark-btn--light { background: var(--fold-white); color: var(--sumi); }
.mark-btn--light:hover { background: var(--gold); }

.mark-btn--ghost {
  background: transparent;
  color: currentColor;
  box-shadow: inset 0 0 0 1px currentColor;
}
.mark-btn--ghost:hover { background: var(--sumi); color: var(--fold-white); box-shadow: none; }
.stock--red .mark-btn--ghost:hover,
.stock--dark .mark-btn--ghost:hover { background: var(--fold-white); color: var(--sumi); }

.mark-btn[hidden] { display: none; }   /* UA [hidden] loses to inline-flex */

.mark-btn--lg { min-height: 62px; padding: var(--sp-sm) var(--sp-lg); font-size: var(--text-xs); }

.note {
  font-family: var(--font-mono);
  font-size: var(--text-3xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ── Sheet header ─────────────────────────────────────────────────────────── */

.sheet-nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: var(--z-nav);
  padding: var(--sp-xs) var(--pad-x);
  transition: background var(--dur-base) var(--ease),
              box-shadow var(--dur-base) var(--ease),
              color var(--dur-base) var(--ease);
}
.sheet-nav__inner {
  position: relative;
  z-index: 2;
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-md);
}
.sheet-nav__mark {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  gap: var(--sp-xs);
  color: var(--fold-white);
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
}
/* The crane is a dark red on transparent: it disappears on the vermilion
   ground and reads correctly on paper. It used to cross the red ground as
   `brightness(0) invert(1)`, which is not a silhouette of a crane so much as
   the absence of one — the filter crushes every crease and facet the
   photograph exists for. So there are two exposures of the same photograph
   instead: one retoned to fold-white for the red and sumi grounds, one in its
   own colour for paper. They cross-fade; the crane never changes pose.
   Height is one token, so the mark is the same object in every lockup. */
.sheet-nav__crane {
  position: relative;
  flex: none;
  height: var(--crane-h);
  width: calc(var(--crane-h) * 240 / 190);   /* the photograph's own ratio */
}
.sheet-nav__crane picture {
  position: absolute;
  inset: 0;
  transition: opacity var(--dur-base) var(--ease);
}
.sheet-nav__crane img { display: block; width: 100%; height: 100%; }
.sheet-nav__crane .crane--ink { opacity: 0; }
.sheet-nav.is-landed .sheet-nav__crane .crane--light { opacity: 0; }
.sheet-nav.is-landed .sheet-nav__crane .crane--ink { opacity: 1; }
.sheet-nav__links {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
}
.sheet-nav__link {
  color: var(--fold-white);
  font-family: var(--font-mono);
  font-size: var(--text-3xs);
  letter-spacing: var(--letter-spacing-wide);
  text-transform: uppercase;
  text-decoration: none;
  padding: var(--sp-2xs) 0;
  position: relative;
}
.sheet-nav__link::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--dur-base) var(--ease-fold);
}
.sheet-nav__link:hover::after,
.sheet-nav__link:focus-visible::after { transform: scaleX(1); transform-origin: left; }

.sheet-nav__action {
  min-height: 44px;
  padding: var(--sp-2xs) var(--sp-sm);
  background: var(--fold-white);
  color: var(--sumi);
  font-family: var(--font-mono);
  font-size: var(--text-3xs);
  font-weight: 600;
  letter-spacing: var(--letter-spacing-wide);
  text-transform: uppercase;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  transition: background var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease-fold);
}
.sheet-nav__action:hover { background: var(--gold); }
.sheet-nav__action:active { transform: scale(0.97); }

/* Scrolled: the header lands on paper stock. */
.sheet-nav.is-landed {
  background: var(--fold-white);
  box-shadow: 0 1px 0 var(--crease-on-light);
}
.sheet-nav.is-landed .sheet-nav__mark,
.sheet-nav.is-landed .sheet-nav__link { color: var(--sumi); }
.sheet-nav.is-landed .sheet-nav__action { background: var(--vermilion-deep); color: var(--fold-white); }
.sheet-nav.is-landed .sheet-nav__action:hover { background: var(--sumi); }

.sheet-nav__toggle {
  display: none;
  width: 46px; height: 46px;
  align-items: center;
  justify-content: center;
  background: none;
  border: 0;
  color: inherit;
  cursor: pointer;
}
.sheet-nav__toggle span,
.sheet-nav__toggle span::before,
.sheet-nav__toggle span::after {
  display: block;
  width: 22px; height: 1.5px;
  background: currentColor;
  transition: transform var(--dur-base) var(--ease-fold), opacity var(--dur-fast) linear;
}
.sheet-nav__toggle span::before,
.sheet-nav__toggle span::after { content: ""; position: absolute; }
.sheet-nav__toggle span::before { transform: translateY(-7px); }
.sheet-nav__toggle span::after  { transform: translateY(7px); }
.sheet-nav.is-open .sheet-nav__toggle span { background: transparent; }
.sheet-nav.is-open .sheet-nav__toggle span::before { transform: rotate(45deg); }
.sheet-nav.is-open .sheet-nav__toggle span::after  { transform: rotate(-45deg); }

/* ── Hero: the unfolded sheet ─────────────────────────────────────────────── */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: calc(var(--sp-2xl) + 1rem) var(--pad-x) var(--sp-xl);
  background: var(--vermilion-deep);
  color: var(--fold-white);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: var(--fibre-on-red);
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='f'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23f)'/%3E%3C/svg%3E");
}

.hero--page { min-height: auto; padding-bottom: var(--sp-2xl); }
.hero--page .hero__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 0.86fr) auto; }   /* text · sheet · rail — three children, three tracks */
.hero--page .hero__promise { font-size: clamp(var(--text-2xl), 3.9vw, var(--text-3xl)); max-width: 18ch; }
.hero--page .hero__sheet { max-width: 22rem; justify-self: end; }

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

.hero__grid {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.18fr) auto;
  align-items: center;
  gap: var(--sp-xl);
}

.hero__promise {
  font-family: var(--font-display);
  font-weight: 300;
  /* Sized so the primary action stays inside the first viewport at 900px tall.
     A promise nobody can act on without scrolling has not finished persuading. */
  font-size: clamp(var(--text-2xl), 4.4vw, var(--text-3xl));
  line-height: 1.0;
  letter-spacing: -0.03em;
  margin: 0 0 var(--sp-md);
  max-width: 16ch;
  text-wrap: balance;
}
.hero__promise em {
  font-style: normal;
  font-weight: 400;
  /* The gold mark lands on the word the promise turns on. Underlined by
     text-decoration, not a border — a border on a wrapped inline paints one
     rule per line box and reads as an accident. The same is true of the
     decoration itself once the span wraps, so the span never wraps: keep
     whatever sits in here to one short word. */
  white-space: nowrap;
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-decoration-thickness: 3px;
  text-underline-offset: 8px;
}
.hero__lede {
  font-size: var(--text-sm);        /* 19px floor — body never goes smaller on red */
  line-height: 1.5;
  max-width: 44ch;
  color: var(--fold-white);
  margin-bottom: var(--sp-lg);
}
.hero__cta { display: flex; align-items: center; gap: var(--sp-md); flex-wrap: wrap; }
.hero__cta .note { color: var(--fold-white); opacity: 0.92; }

/* The sheet itself: authored crease geometry, no photograph. */
.hero__sheet { position: relative; aspect-ratio: 1; width: 100%; margin: 0; }
.hero__sheet svg { width: 100%; height: 100%; overflow: visible; }

.crease      { stroke: var(--light-faint); stroke-width: 1; fill: none; }
.crease--cut { stroke: var(--fold-white); stroke-width: 1.5; fill: none; }
.crease--gold{ stroke: var(--gold); stroke-width: 2; fill: none; }
.facet       { fill: rgba(247, 243, 238, 0.05); stroke: var(--light-faint); stroke-width: 1; }
.facet--lit  { fill: rgba(247, 243, 238, 0.13); }
.facet--deep { fill: rgba(26, 26, 26, 0.14); }
.gold-dot    { fill: var(--gold); }

/* ── The fold ─────────────────────────────────────────────────────────────
   Five states of one sheet. Four tones, held far apart so adjacent planes
   never read as a single surface — that separation is what makes a folded
   object legible, and its absence is what made four earlier attempts read as
   wireframe insects. Only one state is present at a time; the change of state
   is the fold. */

.fstate polygon { stroke: rgba(247, 243, 238, 0.34); stroke-width: 0.8; }
.crane__lit  { fill: rgba(247, 243, 238, 0.46); }
.crane__mid  { fill: rgba(247, 243, 238, 0.30); }
.crane__pale { fill: rgba(247, 243, 238, 0.19); }
.crane__dark { fill: rgba(26, 26, 26, 0.16); }
.crane__deep { fill: rgba(26, 26, 26, 0.30); }

/* Real 3D: these are HTML elements, not SVG children, so they get a genuine
   rendering context. A plane rotated 90deg about its hinge is edge-on and
   truly gone — which is what SVG could not do. */
.fold3d {
  position: relative;
  width: 100%;
  aspect-ratio: 200 / 252;     /* the sheet's own proportion, not a square */
  perspective: 1100px;
  transform-style: preserve-3d;
}
.fold3d__shadow,
.fold3d .fstate {
  position: absolute;
  inset: 0;
}
.fold3d svg { width: 100%; height: 100%; display: block; overflow: visible; }

.fstate {
  transform-origin: 50% 50%;
  transform-style: preserve-3d;
  backface-visibility: hidden;
  transition: transform var(--dur-fold) var(--ease-fold);
  will-change: transform;
}

/* Step rail — the numbered margin column of a fold diagram. */
.rail {
  display: flex;
  flex-direction: column;
  gap: var(--sp-xs);
  padding-left: var(--sp-md);
  border-left: 1px solid var(--light-ghost);
  list-style: none;
  margin: 0;
}
.rail__step {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: baseline;
  gap: var(--sp-xs);
  font-family: var(--font-mono);
  font-size: var(--text-3xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fold-white);
  opacity: 0.82;   /* 4.73:1 on --vermilion-deep; .62 measured 2.40:1 */
  transition: opacity var(--dur-base) var(--ease);
}
.rail__step.is-active { opacity: 1; }
.rail__step.is-active .rail__index { color: var(--gold); }
.rail__index { font-variant-numeric: tabular-nums; }

/* ── The exhibit: the flagship interactive artifact ───────────────────────── */

.exhibit__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--sp-xl);
  align-items: end;
  margin-bottom: var(--sp-lg);
}
.exhibit__head .lede { color: var(--light-muted); max-width: 46ch; }

/* The instrument label sits ON the crease above the stage, full width. */
.exhibit__rule {
  display: block;
  color: var(--light-muted);
  padding-bottom: var(--sp-xs);
  margin-top: var(--sp-md);
}

/* Choosing a call is the interaction; the fold is its answer. */
.exhibit__pick { display: flex; flex-wrap: wrap; gap: var(--sp-xs); }
.pick {
  min-height: 44px;
  padding: var(--sp-2xs) var(--sp-sm);
  background: transparent;
  color: var(--light-muted);
  border: 0;
  box-shadow: inset 0 0 0 1px var(--crease-on-dark);
  font-family: var(--font-mono);
  font-size: var(--text-3xs);
  letter-spacing: var(--letter-spacing-wide);
  text-transform: uppercase;
  cursor: pointer;
  transition: color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}
.pick:hover { color: var(--fold-white); box-shadow: inset 0 0 0 1px var(--light-muted); }
.pick[aria-pressed="true"] {
  background: var(--fold-white);
  color: var(--sumi);
  box-shadow: none;
}
.exhibit__note { margin-top: var(--sp-md); color: var(--light-muted); text-transform: none; letter-spacing: 0; }
.exhibit__stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0;
  border-top: 1px solid var(--crease-on-dark);
  border-bottom: 1px solid var(--crease-on-dark);
}
.pane {
  padding: var(--sp-lg);
  display: flex;
  flex-direction: column;
  gap: var(--sp-md);
}
.pane__meta {
  margin-top: auto;          /* the instrument line sits on the pane's own floor */
  padding-top: var(--sp-sm);
  border-top: 1px solid var(--crease-on-dark);
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-xs) var(--sp-md);
  color: var(--light-muted);
}
.pane + .pane { border-left: 1px solid var(--crease-on-dark); }
.pane__label {
  display: block;
  margin-bottom: var(--sp-sm);
  color: var(--light-muted);
}
.pane__doc {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  line-height: 1.85;
  color: var(--light-dim);
  white-space: pre-line;
}

/* Output lines arrive folded: each rotates down along its own crease.
   A line may only START folded once JS has armed the container — otherwise a
   script failure would hide the page's single strongest piece of proof. */
.fold-line {
  transform-origin: top center;
  transition: transform var(--dur-fold) var(--ease-fold), opacity var(--dur-base) linear;
}
.is-armed .fold-line:not(.is-open) { transform: rotateX(-92deg); opacity: 0; }
.fold-line.is-open { transform: none; opacity: 1; }

.out-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: var(--sp-sm);
  padding: var(--sp-xs) 0;
  border-bottom: 1px dotted var(--crease-on-dark);
}
.out-row__value { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

.gate {
  margin-top: var(--sp-md);
  padding: var(--sp-sm) var(--sp-md);
  background: var(--hold-tint);
  border-left: 1px solid var(--gold);
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  flex-wrap: wrap;
}
.gate__dot {
  width: 10px; height: 10px;
  border-radius: var(--radius-full);
  background: var(--gold);
  flex: none;
}

.exhibit__controls {
  display: flex;
  gap: var(--sp-sm);
  align-items: center;
  flex-wrap: wrap;
  margin-top: var(--sp-lg);
}
.exhibit__trace {
  margin-top: var(--sp-md);
  padding-left: var(--sp-md);
  border-left: 1px solid var(--crease-on-dark);
  display: grid;
  gap: var(--sp-2xs);
}
.exhibit__trace[hidden] { display: none; }
.trace-step {
  display: grid;
  grid-template-columns: 3.5rem 1fr;
  gap: var(--sp-sm);
  font-family: var(--font-mono);
  font-size: var(--text-3xs);
  color: var(--light-muted);
}
.trace-step__n { color: var(--gold); font-variant-numeric: tabular-nums; }

.usecase-head {
  display: flex;
  align-items: baseline;
  gap: var(--sp-sm);
  margin-bottom: var(--sp-md);
}

/* ── Ledger: the seven problems, as creases on one sheet ──────────────────── */

.ledger { border-top: 1px solid var(--crease-on-light); }
.ledger__row {
  display: grid;
  grid-template-columns: minmax(0, 0.42fr) minmax(0, 1fr);
  gap: var(--sp-md);
  padding: var(--sp-md) 0;
  border-bottom: 1px solid var(--crease-on-light);
  align-items: baseline;
  position: relative;
}
.ledger__row::after {
  content: "";
  position: absolute;
  left: 0; bottom: -1px;
  width: 100%; height: 1px;
  background: var(--vermilion);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur-fold) var(--ease-fold);
}
.ledger__row:hover::after { transform: scaleX(1); }
.ledger__index { color: var(--sumi-faint); font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: var(--text-sm); }
.ledger__name {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: var(--text-xl);
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.ledger__build { color: var(--sumi-dim); font-size: var(--text-xs); line-height: 1.6; }
.ledger__build strong { font-weight: 600; color: var(--vermilion-text); }

/* ── Sequence: one square, folded across five stages ──────────────────────── */

.sequence { display: grid; gap: var(--sp-lg); }
.sequence__stage {
  display: grid;
  grid-template-columns: minmax(0, 0.62fr) minmax(0, 1fr);
  gap: var(--sp-lg);
  align-items: center;
}
.sequence__stage:nth-child(even) .sequence__figure { order: 2; }
.sequence__figure {
  aspect-ratio: 1;
  width: 100%;
  max-width: 20rem;          /* a diagram, not a poster: keeps the text beside it */
  justify-self: center;
  display: grid;             /* no panel: the diagram sits on the section's own stock */
  place-items: center;
  padding: var(--sp-md);
}
.sequence__figure svg { width: 100%; height: 100%; }
.sequence__figure .crease      { stroke: var(--crease-on-light); }
.sequence__figure .crease--cut { stroke: var(--sumi); }
.sequence__figure .facet       { fill: rgba(216, 60, 46, 0.10); stroke: var(--crease-strong); }
.sequence__figure .facet--lit  { fill: rgba(216, 60, 46, 0.28); }
.sequence__figure .facet--deep { fill: rgba(216, 60, 46, 0.55); }

.sequence__meta { display: flex; align-items: baseline; gap: var(--sp-sm); margin-bottom: var(--sp-sm); }
.sequence__n { font-family: var(--font-mono); font-size: var(--text-lg); color: var(--vermilion-text); font-variant-numeric: tabular-nums; }
.sequence__body { color: var(--sumi-dim); font-size: var(--text-xs); line-height: 1.65; max-width: 46ch; }
.sequence__out {
  margin-top: var(--sp-sm);
  padding-top: var(--sp-sm);
  border-top: 1px solid var(--crease-on-light);
  display: grid;
  gap: var(--sp-2xs);
}

/* ── Plain lists that refuse to be cards ──────────────────────────────────── */

.stack { display: grid; gap: 0; border-top: 1px solid var(--crease-on-dark); }
.stack__item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: var(--sp-md);
  padding: var(--sp-md) 0;
  border-bottom: 1px solid var(--crease-on-dark);
  align-items: baseline;
}
.stack__name { font-family: var(--font-display); font-weight: 300; font-size: var(--text-lg); letter-spacing: -0.015em; }
.stack__desc { color: var(--light-muted); font-size: var(--text-xs); line-height: 1.6; }
.stock--light .stack, .stock--grey .stack { border-color: var(--crease-on-light); }
.stock--light .stack__item, .stock--grey .stack__item { border-color: var(--crease-on-light); }
.stock--light .stack__desc, .stock--grey .stack__desc { color: var(--sumi-dim); }

/* ── Doorways: three creased squares, three industries ────────────────────── */

.doorways { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-lg); }
.doorway {
  display: grid;
  gap: var(--sp-sm);
  padding: 0 var(--sp-md) 0 0;
  text-decoration: none;
  color: inherit;
  transition: color var(--dur-fast) var(--ease);
}
/* Separated by creases, not by boxes. */
.doorways > .doorway + .doorway { border-left: 1px solid var(--crease-on-light); padding-left: var(--sp-md); }
.doorway:hover .doorway__name { color: var(--vermilion-text); }
.doorway:active { transform: scale(0.995); }
.doorway__figure { aspect-ratio: 1.35; display: grid; place-items: center; }
.doorway__figure svg { width: 78%; height: auto; }
.doorway__name { font-family: var(--font-display); font-weight: 300; font-size: var(--text-lg); letter-spacing: -0.02em; }
.doorway__desc { color: var(--sumi-dim); font-size: var(--text-xs); line-height: 1.55; }
.doorway__go { color: var(--vermilion-text); }

/* ── Outcomes: a before/after ledger ──────────────────────────────────────── */

.outcomes { border-top: 1px solid var(--crease-on-light); }
.outcome {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr) auto minmax(0, 1fr);
  gap: var(--sp-md);
  align-items: center;
  padding: var(--sp-md) 0;
  border-bottom: 1px solid var(--crease-on-light);
}
.outcome__label { font-family: var(--font-display); font-size: var(--text-base); font-weight: 300; }
.outcome__from { color: var(--sumi-muted); font-size: var(--text-xs); }
.outcome__arrow { color: var(--gold-text); font-family: var(--font-mono); }
.outcome__to { color: var(--sumi); font-size: var(--text-xs); font-weight: 600; }

/* ── Depths: the three engagements, as fold counts ────────────────────────
   A ledger on the red stock, not three cards. Depth is shown by how many
   folds the sheet takes: 4, 8, 12 — the real session counts. Exactly one gold
   mark in this section, on the most-chosen depth. */

.depths { display: grid; gap: 0; border-top: 1px solid var(--light-ghost); }
.depth {
  display: grid;
  grid-template-columns: minmax(0, 0.44fr) minmax(0, 1fr) auto;
  gap: var(--sp-lg);
  padding: var(--sp-lg) 0;
  border-bottom: 1px solid var(--light-ghost);
  align-items: start;
  position: relative;
}
.depth__head { display: grid; gap: var(--sp-xs); }
.depth__name {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: var(--text-xl);
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: var(--sp-xs);
}
.depth__mark { width: 9px; height: 9px; border-radius: var(--radius-full); background: var(--gold); flex: none; }
.depth__folds { display: flex; gap: 3px; align-items: flex-end; height: 26px; }
.depth__fold { width: 5px; background: var(--fold-white); opacity: 0.55; transform-origin: bottom; }
.depth__meta { color: var(--light-muted-red); }
.depth__list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-2xs); }
.depth__item {
  font-size: var(--text-xs);
  line-height: 1.5;
  color: var(--light-muted-red);
  display: grid;
  grid-template-columns: 1.25rem 1fr;
  gap: var(--sp-2xs);
}
.depth__item::before { content: "—"; opacity: 0.6; }
.depth__foot { display: grid; gap: var(--sp-sm); justify-items: start; align-content: start; }
.depth__best { font-size: var(--text-xs); color: var(--light-muted-red); max-width: 24ch; }

/* ── Voices ───────────────────────────────────────────────────────────────── */

.voices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-xl); }
.voice { display: grid; gap: var(--sp-sm); }
.voice__quote {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: var(--text-lg);
  line-height: 1.3;
  letter-spacing: -0.015em;
}
.voice__who { color: var(--light-muted); }
.stock--light .voice__who { color: var(--sumi-muted); }

/* ── About ────────────────────────────────────────────────────────────────── */

.about { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: var(--sp-xl); align-items: start; }
.about__portrait { width: 100%; height: auto; display: block; filter: grayscale(1) contrast(1.05); }
.about__body { color: var(--sumi-dim); }
.about__links { display: flex; gap: var(--sp-md); margin-top: var(--sp-md); }
.about__link { color: var(--vermilion-text); font-family: var(--font-mono); font-size: var(--text-3xs); letter-spacing: var(--letter-spacing-wide); text-transform: uppercase; text-decoration: none; display: inline-flex; align-items: center; gap: var(--sp-2xs); }
.about__link:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ── The name, glossed ───────────────────────────────────────────────────
   إتقان is the standard the work is held to, so it is set once, precisely,
   and never as decoration: the Arabic at display weight, the reading beside
   it in the instrument voice. */

.name-gloss {
  display: flex;
  align-items: baseline;
  gap: var(--sp-md);
  flex-wrap: wrap;
  margin: 0 0 var(--sp-md);
  padding-bottom: var(--sp-sm);
  border-bottom: 1px solid var(--crease-gold);
}
.name-gloss__word {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 400;
  line-height: 1;
  color: var(--vermilion-text);
}
.name-gloss__read {
  font-family: var(--font-mono);
  font-size: var(--text-3xs);
  letter-spacing: 0.06em;
  line-height: 1.7;
  color: var(--sumi-muted);
  max-width: 52ch;
}
.name-gloss__read em { font-style: normal; color: var(--sumi); font-weight: 600; }

.foot__gloss {
  margin-top: var(--sp-xs);
  font-family: var(--font-mono);
  font-size: var(--text-3xs);
  letter-spacing: 0.06em;
  color: var(--light-muted);
}
.foot__gloss span { font-size: var(--text-xs); color: var(--gold); }

/* ── FAQ: a disclosure that folds ─────────────────────────────────────────── */

.faq { border-top: 1px solid var(--crease-on-light); }
.faq__item { border-bottom: 1px solid var(--crease-on-light); }
.faq__q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-md);
  padding: var(--sp-md) 0;
  background: none;
  border: 0;
  text-align: left;
  color: inherit;
  font-family: var(--font-display);
  font-weight: 300;
  font-size: var(--text-lg);
  letter-spacing: -0.015em;
  cursor: pointer;
}
.faq__icon { flex: none; transition: transform var(--dur-fold) var(--ease-fold); }
.faq__q[aria-expanded="true"] .faq__icon { transform: rotate(45deg); }
.faq__a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows var(--dur-fold) var(--ease-fold); }
.faq__q[aria-expanded="true"] + .faq__a { grid-template-rows: 1fr; }
.faq__a-inner {
  overflow: hidden;
  /* grid-template-rows: 0fr hides it visually but leaves all seven answers in
     the accessibility tree; visibility is what actually removes them. */
  visibility: hidden;
  transition: visibility 0s linear var(--dur-fold);
}
.faq__q[aria-expanded="true"] + .faq__a .faq__a-inner {
  visibility: visible;
  transition-delay: 0s;
}
.faq__a-inner > div { padding-bottom: var(--sp-md); color: var(--sumi-dim); font-size: var(--text-xs); line-height: 1.65; max-width: 58ch; }

/* ── Close: the signature line ────────────────────────────────────────────── */

.close { text-align: left; }
.close__title {
  font-family: var(--font-display);
  font-weight: 200;
  font-size: clamp(var(--text-2xl), 5.6vw, var(--text-3xl));
  line-height: 1.02;
  letter-spacing: -0.03em;
  max-width: 22ch;
  margin-bottom: var(--sp-lg);
}
.close__sign {
  display: grid;
  gap: var(--sp-sm);
  padding-top: var(--sp-sm);
  border-top: 1px solid var(--gold);
  max-width: 46rem;
}
.close__row { display: flex; align-items: center; gap: var(--sp-md); flex-wrap: wrap; }

/* ── Foot ─────────────────────────────────────────────────────────────────── */

.foot { padding: var(--sp-xl) var(--pad-x); background: var(--sumi); color: var(--light-muted); }
.foot__inner { max-width: var(--max-w); margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr)); gap: var(--sp-lg); }
.foot__blurb { max-width: 34ch; font-size: var(--text-xs); line-height: 1.6; }
.foot__list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-xs); }
.foot__link { display: inline-flex; align-items: center; color: var(--light-muted); font-family: var(--font-mono); font-size: var(--text-3xs); letter-spacing: 0.08em; text-transform: uppercase; text-decoration: none; }
.foot__link:hover { color: var(--fold-white); }
.foot__base { max-width: var(--max-w); margin: var(--sp-lg) auto 0; padding-top: var(--sp-sm); border-top: 1px solid var(--light-ghost); display: flex; justify-content: space-between; gap: var(--sp-md); flex-wrap: wrap; }

/* ── Motion: the fold ─────────────────────────────────────────────────────
   Content is visible by default; JS adds .is-folded to opt an element INTO
   the animation, so a JS failure leaves a complete, readable page. */

/* Gated on .fold-js, which the script sets on <html> only once it is running.
   Without it every section renders at full opacity: no script, no blank page. */
.fold-js .is-folded {
  opacity: 0;
  transform: perspective(1200px) rotateX(-14deg) translateY(24px);
  transform-origin: top center;
}
.fold-js .is-folded.is-caught {
  opacity: 1;
  transform: none;
  transition: opacity var(--dur-base) linear,
              transform var(--dur-fold) var(--ease-fold);
}

/* Crease draw-on for authored SVG geometry. */
.draw { stroke-dasharray: var(--len, 400); stroke-dashoffset: var(--len, 400); }
.draw.is-drawn { stroke-dashoffset: 0; transition: stroke-dashoffset var(--dur-slow) var(--ease-fold); }

/* ── Responsive ───────────────────────────────────────────────────────────── */

@media (max-width: 1080px) {
  .hero__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); }
  .rail {
    grid-column: 1 / -1;
    flex-direction: row;
    flex-wrap: wrap;
    gap: var(--sp-xs) var(--sp-md);
    padding: var(--sp-sm) 0 0;
    border-left: 0;
    border-top: 1px solid var(--light-ghost);
  }
  .rail__step { grid-template-columns: auto auto; }
  .foot__inner { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

@media (max-width: 900px) {
  .stock { padding: var(--sp-2xl) var(--pad-x); }
  .exhibit__head { grid-template-columns: minmax(0, 1fr); gap: var(--sp-sm); align-items: start; }
  .exhibit__stage { grid-template-columns: minmax(0, 1fr); }
  .pane + .pane { border-left: 0; border-top: 1px solid var(--crease-on-dark); }
  .doorways, .depths { grid-template-columns: minmax(0, 1fr); }
  /* Stacked, the vertical crease between doorways becomes a horizontal one —
     otherwise doorways 2 and 3 hang indented off a rule that no longer divides. */
  .doorway { padding-right: 0; }
  .doorways > .doorway + .doorway {
    border-left: 0;
    padding-left: 0;
    border-top: 1px solid var(--crease-on-light);
    padding-top: var(--sp-lg);
  }
  /* The depth row is 0.44fr / 1fr / auto on a wide sheet. Its tracks are
     minmax(0, …), so on a phone they shrink past min-content and the name,
     the list and the button print on top of each other instead of overflowing.
     One column is the only honest fold here. */
  .depth { grid-template-columns: minmax(0, 1fr); gap: var(--sp-md); }
  .voices { grid-template-columns: minmax(0, 1fr); gap: var(--sp-lg); }
  .sequence__stage { grid-template-columns: minmax(0, 1fr); gap: var(--sp-md); }
  .sequence__stage:nth-child(even) .sequence__figure { order: 0; }
  .sequence__figure { max-width: 22rem; }
  .about { grid-template-columns: minmax(0, 1fr); }
  .about__portrait { max-width: 220px; }
  .ledger__row { grid-template-columns: minmax(0, 1fr); }
  .outcome { grid-template-columns: minmax(0, 1fr); gap: var(--sp-2xs); }
  .outcome__arrow { display: none; }
}

@media (max-width: 1024px) {
  .sheet-nav__toggle { display: inline-flex; }
  .sheet-nav__links {
    position: fixed;
    inset: 0 0 auto;
    z-index: 1;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--sp-md);
    padding: calc(var(--sp-3xl) - 1rem) var(--pad-x) var(--sp-xl);
    background: var(--sumi);
    transform: translateY(-101%);
    transition: transform var(--dur-fold) var(--ease-fold);
  }
  .sheet-nav.is-open .sheet-nav__links { transform: none; }
  .sheet-nav.is-landed .sheet-nav__links .sheet-nav__link { color: var(--fold-white); }
  .sheet-nav__links .sheet-nav__link {
    font-size: var(--text-xs);
    min-height: 44px;
    align-items: center;
  }
  /* The underline follows the text, not the enlarged hit area. */
  .sheet-nav__links .sheet-nav__link::after { bottom: 9px; }
  /* The drawer is fixed at z-index 1 inside .sheet-nav__inner's stacking
     context, so every unpositioned sibling paints underneath it. The action
     was lifted; the mark and the toggle were not, which buried the only
     control that closes the drawer on touch. All three ride above the panel. */
  .sheet-nav__mark,
  .sheet-nav__action,
  .sheet-nav__toggle { position: relative; z-index: 2; }
  /* Open, the panel is sumi: the toggle must stay legible on it whether or
     not the header has landed on paper. */
  .sheet-nav.is-open .sheet-nav__mark,
  .sheet-nav.is-open .sheet-nav__toggle { color: var(--fold-white); }
  /* …and the crane shows its light exposure over the sumi panel, even when
     the header underneath has already landed on paper. */
  .sheet-nav.is-open.is-landed .sheet-nav__crane .crane--light { opacity: 1; }
  .sheet-nav.is-open.is-landed .sheet-nav__crane .crane--ink { opacity: 0; }
  .hero { min-height: auto; padding-top: calc(var(--sp-3xl) + 1rem); }
  .hero__grid { grid-template-columns: minmax(0, 1fr); gap: var(--sp-xs); }
  /* The sheet leads on a phone: it is the contract's strongest signal and it
     must be whole inside the first viewport, not a sliver below the fold. */
  .hero__sheet { order: -1; max-width: 13.5rem; margin: 0 auto; }
  /* Below the hero's two-column split the rail has no reason to wrap. As a
     flex row it packs two steps onto one line and one onto the next, which
     reads as a ragged list rather than a numbered margin. It goes back to a
     column — the fold-diagram margin it started as — under a top crease. */
  .rail { flex-direction: column; gap: var(--sp-2xs); }
  .rail__step { grid-template-columns: auto minmax(0, 1fr); }
  .stack__item { grid-template-columns: minmax(0, 1fr); gap: var(--sp-2xs); }
  .foot__inner { grid-template-columns: minmax(0, 1fr); }
  .pane { padding: var(--sp-md); min-height: 0; }
}

/* Phone. The header is three fixed things on one line — mark, action, toggle —
   and 16 tracked mono characters is more than the middle one can carry. The
   action drops its tail to "Apply"; the anchor's aria-label keeps the full
   name, which still contains the visible word. */
@media (max-width: 480px) {
  .sheet-nav__action-tail { display: none; }
  .sheet-nav__action { padding: var(--sp-2xs) var(--sp-xs); }
  .sheet-nav__inner { gap: var(--sp-sm); }
}

/* ── Touch ────────────────────────────────────────────────────────────────
   Sized by input method, not by viewport: a 16px footer link is a fine mouse
   target at any width and a poor thumb target at every width. The list gap
   goes to zero because the padding now supplies the separation. */

@media (pointer: coarse) {
  .foot__list { gap: 0; }
  .foot__link { min-height: 44px; }
}

/* ── Reduced motion ───────────────────────────────────────────────────────
   ONE block per stylesheet; add here, never open a second.
   Gentler, not zero: colour and border feedback stay — they are how the
   interface answers a hover or a focus. What goes is travel and scrub. */

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

  .fold-js .is-folded,
  .fold-js .is-folded.is-caught {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .is-armed .fold-line:not(.is-open),
  .fold-line.is-open { transform: none; opacity: 1; transition: none; }
  .draw, .draw.is-drawn { stroke-dasharray: none; stroke-dashoffset: 0; transition: none; }
  .faq__a { transition: none; }
  .faq__a-inner { transition: none; }
  .doorway:hover { transform: none; }
  .mark-btn:active, .doorway:active, .sheet-nav__action:active { transform: none; }
  .mark-btn::after,
  .sheet-nav__link::after,
  .ledger__row::after { transition: none; }
  .sheet-nav__links { transition: none; }
}

/* Reveals the body the inline <style> in each page's <head> hid until this
   sheet arrived, and cancels its 3s fallback. */
body { visibility: visible; animation: none; }
