/* Tiger Lab — site styles. No build step, no dependencies. */

:root {
  --paper: #f6f2e9;
  --paper-2: #ede7d9;
  --paper-3: #e3dccb;
  --ink: #1b2127;
  --ink-2: #47515b;
  --ink-3: #6b7580;
  --rule: rgba(27, 33, 39, 0.14);
  --rule-strong: rgba(27, 33, 39, 0.82);
  --tiger: #ff9e16;
  --tiger-deep: #a85800;
  --tiger-wash: rgba(255, 158, 22, 0.14);
  --card: #fbf8f2;
  --night: #14191e;
  --night-2: #1d242b;
  --night-rule: rgba(246, 242, 233, 0.14);
  --on-night: #f6f2e9;
  --on-night-2: #a9b2ba;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, "JetBrains Mono", Menlo, Consolas, monospace;

  --wrap: 1180px;
  --gutter: clamp(20px, 4vw, 48px);
  --fold: 22px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #14191e;
    --paper-2: #1a2026;
    --paper-3: #222a31;
    --ink: #f3eee3;
    --ink-2: #b9c0c7;
    --ink-3: #8a949e;
    --rule: rgba(243, 238, 227, 0.14);
    --rule-strong: rgba(243, 238, 227, 0.8);
    --tiger-deep: #ffb347;
    --tiger-wash: rgba(255, 158, 22, 0.12);
    --card: #1a2026;
    --night: #0d1114;
    --night-2: #161c21;
  }
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; display: block; }
a { color: inherit; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 500; }

::selection { background: var(--tiger); color: #14191e; }

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

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

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

/* ---------- type primitives ---------- */

.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: flex;
  align-items: center;
  gap: 12px;
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 2px;
  background: var(--tiger);
  flex: none;
}

.display {
  font-family: var(--serif);
  font-size: clamp(40px, 6.4vw, 84px);
  line-height: 1.02;
  letter-spacing: -0.022em;
  font-weight: 500;
}
.display em { font-style: italic; color: var(--tiger-deep); }

.h2 {
  font-family: var(--serif);
  font-size: clamp(30px, 3.8vw, 50px);
  line-height: 1.08;
  letter-spacing: -0.018em;
}
.h2 em { font-style: italic; color: var(--tiger-deep); }

.h3 {
  font-family: var(--serif);
  font-size: clamp(23px, 2.3vw, 30px);
  line-height: 1.18;
  letter-spacing: -0.01em;
}

.lede {
  font-size: clamp(18px, 1.55vw, 21px);
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 60ch;
}

.num { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -0.03em; }

/* ---------- nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--rule);
}
.nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-family: var(--serif);
  font-size: 22px;
  letter-spacing: -0.01em;
}
.brand img { width: 34px; height: 34px; }
.brand small {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding-left: 12px;
  border-left: 1px solid var(--rule);
}
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a {
  text-decoration: none;
  font-size: 15px;
  color: var(--ink-2);
  transition: color 0.15s;
}
.nav-links a:hover { color: var(--ink); }
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--rule);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 9px 12px;
  cursor: pointer;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 22px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%);
  transition: transform 0.15s, background 0.15s, color 0.15s;
}
.btn:hover { transform: translateY(-2px); background: var(--tiger); border-color: var(--tiger); color: #14191e; }
.btn.ghost { background: transparent; color: var(--ink); clip-path: none; }
.btn.ghost:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.nav-links .btn { padding: 9px 16px; font-size: 14px; color: var(--paper); }
.nav-links .btn:hover { color: #14191e; }
.btn .arrow { font-family: var(--mono); }

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

.hero { padding: clamp(56px, 8vw, 112px) 0 clamp(48px, 6vw, 88px); position: relative; overflow: hidden; }
.hero::before {
  /* faint folded-paper crease lines */
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(115deg, transparent 0 61.9%, var(--rule) 62% 62.08%, transparent 62.16%),
    linear-gradient(64deg, transparent 0 77.9%, var(--rule) 78% 78.08%, transparent 78.16%);
  pointer-events: none;
}
.hero .wrap {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: end;
}
.hero.solo .wrap { grid-template-columns: minmax(0, 1fr); }
.hero .display { margin: 26px 0 28px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }

.ledger {
  background: var(--card);
  border: 1px solid var(--rule-strong);
  clip-path: polygon(0 0, calc(100% - var(--fold)) 0, 100% var(--fold), 100% 100%, 0 100%);
  position: relative;
  font-family: var(--mono);
  font-size: 13px;
}
.ledger::after {
  /* the folded corner */
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: var(--fold);
  height: var(--fold);
  background: linear-gradient(225deg, transparent 50%, var(--tiger) 50%);
}
.ledger-head {
  display: flex;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--rule-strong);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 11px;
  color: var(--ink-3);
  padding-right: 40px;
}
.ledger dl { margin: 0; }
.ledger .row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 11px 18px;
  border-bottom: 1px dashed var(--rule);
}
.ledger .row:last-child { border-bottom: 0; }
.ledger dt { color: var(--ink-2); }
.ledger dd { margin: 0; font-weight: 700; font-size: 15px; color: var(--ink); white-space: nowrap; }
.ledger-foot {
  padding: 12px 18px;
  border-top: 1px solid var(--rule-strong);
  color: var(--ink-3);
  font-size: 11px;
  letter-spacing: 0.04em;
}
.ledger-foot b { color: var(--tiger-deep); font-weight: 700; }

/* ---------- big stat band ---------- */

.band { border-top: 1px solid var(--rule-strong); border-bottom: 1px solid var(--rule-strong); }
.band .wrap { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 0; }
.band .stat { padding: 30px var(--gutter) 28px; border-left: 1px solid var(--rule); }
.band .stat:first-child { border-left: 0; }
.stat .num {
  display: block;
  font-size: clamp(34px, 4.4vw, 58px);
  line-height: 1;
  font-weight: 600;
  color: var(--ink);
}
.stat .num sup { font-size: 0.45em; color: var(--tiger-deep); vertical-align: top; position: relative; top: 0.15em; margin-left: 2px; }
.stat p { margin: 12px 0 0; font-size: 14px; line-height: 1.45; color: var(--ink-2); max-width: 26ch; }

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

.section { padding: clamp(64px, 9vw, 128px) 0; }
.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 72px);
  align-items: end;
  margin-bottom: clamp(36px, 5vw, 64px);
}
.section-head .h2 { margin-top: 18px; }
.section-head .lede { font-size: 18px; }
.tint { background: var(--paper-2); }

/* ---------- practice (two halves) ---------- */

.halves { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid var(--rule-strong); background: var(--card); }
.half { padding: clamp(26px, 3.4vw, 46px); position: relative; }
.half + .half { border-left: 1px solid var(--rule-strong); }
.half .tag {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--tiger-deep);
}
.half .h3 { margin: 14px 0 14px; }
.half > p { color: var(--ink-2); }
.ticks { margin-top: 22px; border-top: 1px solid var(--rule); }
.ticks li {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 14px;
  padding: 13px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 15.5px;
  line-height: 1.5;
}
.ticks li .num { color: var(--tiger-deep); font-size: 13px; padding-top: 3px; font-weight: 700; }
.ticks li b { font-weight: 600; }

/* ---------- case studies ---------- */

.case {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(28px, 4.5vw, 68px);
  padding: clamp(34px, 4.5vw, 60px) 0;
  border-top: 1px solid var(--rule-strong);
}
.case:last-of-type { border-bottom: 1px solid var(--rule-strong); }
.case-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.case-meta .idx { color: var(--tiger-deep); font-weight: 700; }
.case-meta .dot { width: 4px; height: 4px; background: var(--ink-3); border-radius: 50%; }
.case .h3 { margin: 16px 0 16px; font-size: clamp(26px, 2.8vw, 36px); }
.case-body p { color: var(--ink-2); max-width: 54ch; }
@media (min-width: 1021px) {
  /* the case title stays in view while its figures scroll past */
  .case-body { position: sticky; top: 100px; align-self: start; }
}
.case-side { display: flex; flex-direction: column; min-width: 0; }
.case-side .metrics { order: -1; align-self: stretch; }
.case-side h4 {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 26px 0 6px;
}
.delivered li {
  position: relative;
  padding: 9px 0 9px 22px;
  border-bottom: 1px solid var(--rule);
  font-size: 15.5px;
  line-height: 1.5;
  color: var(--ink);
}
.delivered li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 17px;
  width: 9px;
  height: 9px;
  background: var(--tiger);
  clip-path: polygon(0 0, 100% 0, 100% 100%);
}
.chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 22px; }
.chips li {
  font-family: var(--mono);
  font-size: 12px;
  padding: 5px 10px;
  border: 1px solid var(--rule);
  color: var(--ink-2);
  background: var(--card);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--rule-strong);
  border-left: 1px solid var(--rule);
  background: var(--card);
  align-self: start;
}
.metric {
  padding: 22px 20px 20px;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  min-height: 132px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
}
.metric .num { font-size: clamp(24px, 2.3vw, 33px); line-height: 1; font-weight: 600; white-space: nowrap; }
.metric .num small { font-size: 0.5em; color: var(--tiger-deep); margin-left: 3px; letter-spacing: 0; }
.metric > span:last-child { font-size: 13px; line-height: 1.4; color: var(--ink-2); }
.metric.hot { background: var(--ink); }
.metric.hot .num { color: var(--tiger); }
.metric.hot .num small { color: var(--paper); }
.metric.hot > span:last-child { color: var(--paper); opacity: 0.82; }
.case-note { grid-column: 1 / -1; padding: 12px 20px; font-family: var(--mono); font-size: 11.5px; color: var(--ink-3); border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }

/* ---------- capabilities ---------- */

.caps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--rule-strong); border-left: 1px solid var(--rule); }
.cap { padding: 28px 26px 30px; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); background: var(--card); }
.cap .num { font-size: 12px; color: var(--tiger-deep); font-weight: 700; letter-spacing: 0.1em; }
.cap h3 { font-family: var(--serif); font-size: 23px; margin: 12px 0 10px; letter-spacing: -0.01em; }
.cap p { font-size: 15px; color: var(--ink-2); margin: 0 0 14px; }
.cap .stack { font-family: var(--mono); font-size: 12px; line-height: 1.7; color: var(--ink-3); }

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

.night { background: var(--night); color: var(--on-night); }
.night .eyebrow { color: var(--on-night-2); }
.night .lede { color: var(--on-night-2); }
.night .h2 em { color: var(--tiger); }

.night .display em { color: var(--tiger); }
.slop .display { margin: 22px 0 0; }
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--night-rule); }
.steps.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.step { padding: 28px 26px 8px 0; border-right: 1px solid var(--night-rule); margin-right: 26px; }
.step:last-child { border-right: 0; margin-right: 0; }
.step .num { font-size: 44px; font-weight: 600; color: var(--tiger); line-height: 1; }
.step h3 { font-family: var(--serif); font-size: 23px; margin: 20px 0 10px; }
.step p { font-size: 15px; color: var(--on-night-2); }
.step .out { font-family: var(--mono); font-size: 12px; color: var(--on-night); border-top: 1px dashed var(--night-rule); padding-top: 12px; margin-top: 16px; }
.step .out b { color: var(--tiger); font-weight: 600; }

/* ---------- engagement models ---------- */

.models { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.model {
  background: var(--card);
  border: 1px solid var(--rule-strong);
  padding: 30px 28px 28px;
  clip-path: polygon(0 0, calc(100% - var(--fold)) 0, 100% var(--fold), 100% 100%, 0 100%);
  position: relative;
  display: flex;
  flex-direction: column;
}
.model::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: var(--fold);
  height: var(--fold);
  background: linear-gradient(225deg, transparent 50%, var(--paper-3) 50%);
  border-left: 1px solid var(--rule-strong);
  border-bottom: 1px solid var(--rule-strong);
}
.model.feature::after { background: linear-gradient(225deg, transparent 50%, var(--tiger) 50%); }
.model .tag { font-family: var(--mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--tiger-deep); }
.model h3 { font-family: var(--serif); font-size: 27px; margin: 12px 0 10px; letter-spacing: -0.01em; }
.model > p { font-size: 15.5px; color: var(--ink-2); }
.model ul { margin-top: auto; border-top: 1px solid var(--rule); }
.model li { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--rule); font-size: 14.5px; }
.model li span:first-child { color: var(--ink-3); }
.model li span:last-child { font-family: var(--mono); font-size: 13px; text-align: right; }

/* ---------- principles ---------- */

.principles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(28px, 5vw, 72px); border-top: 1px solid var(--rule-strong); }
.principle { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 18px; padding: 26px 0; border-bottom: 1px solid var(--rule); }
.principle .num { font-size: 30px; font-weight: 600; color: var(--tiger-deep); line-height: 1.1; }
.principle h3 { font-family: var(--serif); font-size: 22px; margin-bottom: 6px; }
.principle p { font-size: 15.5px; color: var(--ink-2); margin: 0; }

/* ---------- contact ---------- */

.contact .wrap { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(32px, 6vw, 88px); align-items: start; }
.contact .display { font-size: clamp(38px, 5.4vw, 72px); margin: 22px 0 24px; }
.contact .display em { color: var(--tiger); }
.brief { border: 1px solid var(--night-rule); background: var(--night-2); }
.brief h3 { font-family: var(--mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--on-night-2); padding: 16px 22px; border-bottom: 1px solid var(--night-rule); font-weight: 500; }
.brief li { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; padding: 15px 22px; border-bottom: 1px solid var(--night-rule); font-size: 15.5px; line-height: 1.5; }
.brief li:last-child { border-bottom: 0; }
.brief li .num { color: var(--tiger); font-weight: 700; font-size: 13px; padding-top: 3px; }
.brief li small { display: block; color: var(--on-night-2); font-size: 13.5px; margin-top: 2px; }
.avail { display: inline-flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 13px; color: var(--on-night); border: 1px solid var(--night-rule); padding: 10px 14px; margin-top: 8px; }
.avail i { width: 8px; height: 8px; border-radius: 50%; background: var(--tiger); box-shadow: 0 0 0 4px rgba(255, 158, 22, 0.22); }

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

.foot { background: var(--night); color: var(--on-night-2); border-top: 1px solid var(--night-rule); padding: 28px 0 36px; font-size: 13.5px; }
.foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px 32px; align-items: center; }
.foot .brand { color: var(--on-night); font-size: 19px; }
.foot .brand img { width: 26px; height: 26px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 22px; }
.foot nav a { text-decoration: none; }
.foot nav a:hover { color: var(--on-night); }
.foot .mono { font-family: var(--mono); font-size: 12px; }

/* ---------- texture: paper grain and tiger stripes ---------- */

:root {
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n' color-interpolation-filters='sRGB'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .1 0 0 0 0 .1 0 0 0 0 .12 .5 0 0 0 -.22'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --grain-night: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n' color-interpolation-filters='sRGB'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 .97 0 0 0 0 .9 .42 0 0 0 -.185'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --stripes: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='20'%3E%3Crect width='260' height='20' fill='%23ff9e16'/%3E%3Cpath fill='%2314191e' d='M6 0h9Q15.4 8 20.5 16Q10.8 8 6 0zM58 0h7Q59.8 8 55.5 16Q57.6 8 58 0zM104 0h10Q115.6 8 123 16Q110.2 8 104 0zM162 0h8Q168.4 8 170 16Q164.8 8 162 0zM214 0h9Q215.8 8 209.5 16Q213.1 8 214 0zM30 20h8Q31.6 12 26 4Q29.2 12 30 20zM82 20h10Q91.6 12 96 4Q86.7 12 82 20zM134 20h7Q137 12 134.5 4Q134.5 12 134 20zM188 20h9Q198.2 12 204.5 4Q193.4 12 188 20zM240 20h8Q240.8 12 234 4Q238.6 12 240 20z'/%3E%3C/svg%3E");
}
@media (prefers-color-scheme: dark) { :root { --grain: var(--grain-night); } }
body, .tint { background-image: var(--grain); }
.night, .foot { background-image: var(--grain-night); }
.slop, .contact { position: relative; }
.slop::before, .contact::before { content: ""; position: absolute; inset: 0 0 auto; height: 20px; background: var(--stripes) repeat-x; }

/* ---------- hero: agent run card ---------- */

.run {
  position: relative;
  background: var(--night);
  color: var(--on-night);
  border: 1px solid var(--night-rule);
  clip-path: polygon(0 0, calc(100% - var(--fold)) 0, 100% var(--fold), 100% 100%, 0 100%);
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.5;
}
.run::after { content: ""; position: absolute; top: 0; right: 0; width: var(--fold); height: var(--fold); background: linear-gradient(225deg, transparent 50%, var(--tiger) 50%); }
.run-head { display: flex; justify-content: space-between; padding: 13px 44px 13px 18px; border-bottom: 1px solid var(--night-rule); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--on-night-2); }
.run-cmd, .run-foot { margin: 0; padding: 14px 18px 6px; color: var(--on-night-2); }
.run-foot { padding: 6px 18px 16px; }
.run-cmd b, .run-foot b { color: var(--tiger); font-weight: 400; }
.run ol { margin: 0; padding: 0 18px; }
.run li { display: grid; grid-template-columns: 16px 82px minmax(0, 1fr); gap: 0 6px; padding: 8px 0; border-top: 1px dashed var(--night-rule); }
.run li::before { content: "▸"; color: var(--on-night-2); }
.run li.wait::before { content: "●"; color: var(--tiger); }
.run li.ok::before { content: "✓"; color: var(--tiger); }
.run li b { font-weight: 600; }
.run li span { color: var(--on-night-2); }
.run li.wait span { color: var(--tiger); }
.caret { display: inline-block; width: 8px; height: 15px; background: var(--tiger); vertical-align: -2px; animation: caret 1.1s steps(1) infinite; }
.run li, .run-foot { animation: runline 0.35s both; }
.run li:nth-child(1) { animation-delay: 0.5s; }
.run li:nth-child(2) { animation-delay: 1.1s; }
.run li:nth-child(3) { animation-delay: 1.7s; }
.run li:nth-child(4) { animation-delay: 2.3s; }
.run li:nth-child(5) { animation-delay: 4s; }
.run li:nth-child(6) { animation-delay: 4.6s; }
.run-foot { animation-delay: 5.2s; }
.run li.wait::before { animation: caret 0.5s 2.6s 3; }
@keyframes runline { from { opacity: 0; transform: translateY(4px); } }
@keyframes caret { 50% { opacity: 0; } }

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

.untangle { margin: 0 0 clamp(28px, 4vw, 52px); }
.untangle img { width: 100%; height: auto; }
.untangle figcaption, .heat-key { display: flex; justify-content: space-between; align-items: center; margin: 12px 0 0; font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--on-night-2); }
.untangle figcaption span:last-child { color: var(--tiger); }
.js .untangle img { clip-path: inset(0 100% 0 0); transition: clip-path 1.8s cubic-bezier(0.3, 0.6, 0.2, 1) 0.2s; }
.js .untangle.in img { clip-path: inset(0); }

.photo {
  position: relative;
  margin: 0;
  border: 1px solid var(--rule-strong);
  background: var(--night);
  clip-path: polygon(0 0, calc(100% - var(--fold)) 0, 100% var(--fold), 100% 100%, 0 100%);
}
.photo::after { content: ""; position: absolute; top: 0; right: 0; width: var(--fold); height: var(--fold); background: linear-gradient(225deg, transparent 50%, var(--tiger) 50%); }
.photo img { width: 100%; height: clamp(180px, 27vw, 340px); object-fit: cover; }
.photo figcaption { position: absolute; left: 0; bottom: 0; padding: 7px 12px; background: var(--night); color: var(--on-night); font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; }
.photo { margin-bottom: clamp(28px, 4vw, 48px); }
.contact .photo { grid-column: 1 / -1; margin-bottom: 0; }
.night .photo { border-color: var(--night-rule); }
@media (prefers-color-scheme: dark) { .photo img { filter: brightness(0.86); } }

.schematic {
  margin: 28px 0 0;
  padding: 18px 18px 10px;
  border: 1px solid var(--rule);
  background: radial-gradient(circle, var(--rule) 1px, transparent 1.3px) 0 0 / 16px 16px, var(--card);
}
.schematic svg { width: 100%; height: auto; overflow: visible; }
.schematic .s, .schematic .ts { fill: none; stroke: var(--ink-2); stroke-width: 1.25; stroke-linecap: round; stroke-linejoin: round; }
.schematic .p, .schematic .pt { fill: var(--card); stroke: var(--ink); stroke-width: 1.25; stroke-linejoin: round; }
.schematic .ts, .schematic .pt { stroke: var(--tiger-deep); stroke-width: 1.6; }
.schematic .t { fill: var(--tiger); }
.schematic .m { fill: var(--ink-3); }
.schematic .d { stroke-dasharray: 2 3; }
.schematic text { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.12em; text-transform: uppercase; fill: var(--ink-3); }

.layers { --sheet: 180px; position: relative; border-top: 1px solid var(--rule-strong); margin: 0 0 clamp(36px, 5vw, 64px); padding: 0; }
.layers::before { content: ""; position: absolute; left: calc(var(--sheet) / 2 - 1px); top: 38px; bottom: 38px; border-left: 2px dashed var(--tiger); z-index: 5; }
.layers li { display: grid; grid-template-columns: var(--sheet) minmax(0, 230px) minmax(0, 1fr) auto; gap: 0 clamp(16px, 3vw, 44px); align-items: center; min-height: 76px; border-bottom: 1px solid var(--rule); }
.sheet { position: relative; width: var(--sheet); height: calc(var(--sheet) / 1.8); margin: -12px 0; overflow: visible; }
.layers li:nth-child(1) .sheet { z-index: 4; }
.layers li:nth-child(2) .sheet { z-index: 3; }
.layers li:nth-child(3) .sheet { z-index: 2; }
.layers li:nth-child(4) .sheet { z-index: 1; }
.sheet .top, .sheet .side { fill: var(--card); stroke: var(--ink); stroke-width: 1.25; stroke-linejoin: round; }
.sheet .side { fill: var(--paper-3); }
.sheet .g { fill: none; stroke: var(--ink-3); stroke-width: 1.1; vector-effect: non-scaling-stroke; }
.sheet .g path { vector-effect: non-scaling-stroke; }
.knot { position: relative; z-index: 6; justify-self: center; width: 13px; height: 13px; background: var(--tiger); transform: rotate(45deg); }
.layers h3 { font-family: var(--serif); font-size: 23px; letter-spacing: -0.01em; }
.layers p { margin: 0; font-size: 15px; color: var(--ink-2); }
.pin { font-family: var(--mono); font-size: 12px; font-weight: 700; letter-spacing: 0.1em; color: var(--tiger-deep); white-space: nowrap; }

.heat { margin: clamp(44px, 6vw, 80px) 0 0; }
.heat figcaption { margin-bottom: 18px; font-size: 15px; color: var(--on-night-2); }
.heat figcaption b { margin-right: 10px; font-family: var(--serif); font-size: 23px; font-weight: 500; letter-spacing: -0.01em; color: var(--on-night); }
.heat-plot { position: relative; }
.heat-plot img { width: 100%; height: auto; }
.heat-scale { display: inline-flex; align-items: center; gap: 4px; }
.heat-scale i { width: 11px; height: 11px; background: var(--tiger); }
.heat-scale i:nth-child(1) { background: rgba(246, 242, 233, 0.08); margin-left: 6px; }
.heat-scale i:nth-child(2) { opacity: 0.3; }
.heat-scale i:nth-child(3) { opacity: 0.52; }
.heat-scale i:nth-child(4) { opacity: 0.76; }
.heat-scale i:nth-child(5) { margin-right: 6px; }
.heat-tip { position: absolute; z-index: 2; transform: translate(-50%, -100%); margin-top: -6px; padding: 5px 9px; background: var(--on-night); color: #14191e; font-family: var(--mono); font-size: 11.5px; white-space: nowrap; pointer-events: none; }
.heat-tip[hidden] { display: none; }

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

.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1); }
.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .btn { transition: none; }
  .run li, .run-foot, .run li.wait::before, .caret { animation: none; }
  .js .untangle img { clip-path: none; transition: none; }
}

/* ---------- responsive ---------- */

@media (max-width: 1020px) {
  .hero .wrap, .section-head, .case, .contact .wrap { grid-template-columns: minmax(0, 1fr); }
  .hero .wrap { align-items: start; }
  .caps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .step { border-right: 0; margin-right: 0; padding-right: 24px; border-bottom: 1px solid var(--night-rule); padding-bottom: 20px; }
  .models { grid-template-columns: minmax(0, 1fr); }
  .band .wrap { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .band .stat:nth-child(3) { border-left: 0; }
  .band .stat:nth-child(n + 3) { border-top: 1px solid var(--rule); }
}

@media (max-width: 760px) {
  body { font-size: 16px; }
  .brand small { display: none; }
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--rule-strong);
    padding: 8px var(--gutter) 20px;
  }
  .nav.open .nav-links { display: flex; }
  .nav-links a { padding: 13px 0; border-bottom: 1px solid var(--rule); font-size: 16px; }
  .nav-links .btn { margin-top: 16px; justify-content: center; border-bottom: 1px solid var(--ink); padding: 13px 16px; }
  .halves, .principles, .caps, .steps, .steps.three { grid-template-columns: minmax(0, 1fr); }
  .half + .half { border-left: 0; border-top: 1px solid var(--rule-strong); }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric { min-height: 112px; padding: 18px 16px; }
  .metric:last-child:nth-child(odd) { grid-column: 1 / -1; min-height: 0; }
  .schematic { padding: 14px 10px 8px; }
  .layers { --sheet: 96px; }
  .layers::before { top: 40px; bottom: 50px; }
  .layers li { grid-template-columns: var(--sheet) minmax(0, 1fr) auto; gap: 0 14px; padding: 12px 0; }
  .layers li > :first-child { grid-row: 1 / span 2; }
  .layers h3 { grid-column: 2; align-self: end; font-size: 20px; }
  .layers p { grid-column: 2; grid-row: 2; align-self: start; font-size: 14px; }
  .layers .pin { grid-column: 3; grid-row: 1 / span 2; }
  .sheet { margin: -4px 0; }
  .principle { grid-template-columns: 76px minmax(0, 1fr); }
  .principle .num { font-size: 24px; }
}

@media (max-width: 420px) {
  .band .wrap { grid-template-columns: minmax(0, 1fr); }
  .band .stat { border-left: 0; border-top: 1px solid var(--rule); }
  .band .stat:first-child { border-top: 0; }
}

@media print {
  .nav, .hero-cta, .nav-toggle { display: none; }
  .js .reveal { opacity: 1; transform: none; }
  .night, .foot { background: #fff; color: #000; }
}
