/* ===== Ontara — Design System ===== */

:root {
  /* Surfaces — overridden by body[data-bg] */
  --cream: #F6F2EA;
  --cream-2: #EEE9DD;
  --cream-deep: #E4DDC8;
  --paper: #FBF8F1;
  --ink: #181512;
  --ink-2: #2A2520;
  --ink-muted: #5C544A;
  --ink-soft: #8A8175;
  --rule: #D6CFBC;
  --rule-soft: #E3DDCB;
  --white: #FBF8EF;

  /* Accent (terracotta default — swapped by Tweaks) */
  --accent: #B84A2C;
  --accent-deep: #8B3620;
  --accent-wash: rgba(184, 74, 44, 0.08);

  /* Type */
  --serif: "Fraunces", "Source Serif 4", "Times New Roman", serif;
  --sans: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Elevation */
  --shadow-xs: 0 1px 0 rgba(26,23,18,0.04);
  --shadow-sm: 0 1px 2px rgba(26,23,18,0.05), 0 2px 6px -2px rgba(26,23,18,0.06);
  --shadow-md: 0 2px 4px rgba(26,23,18,0.05), 0 8px 18px -10px rgba(26,23,18,0.12), 0 22px 40px -28px rgba(26,23,18,0.14);
  --shadow-lg: 0 2px 4px rgba(26,23,18,0.05), 0 14px 28px -12px rgba(26,23,18,0.14), 0 34px 60px -28px rgba(26,23,18,0.22);
  --shadow-inset: inset 0 0 0 1px rgba(26,23,18,0.04);

  /* Layout */
  --max: 1280px;
  --gutter: clamp(24px, 4vw, 72px);
}

/* Accent variants */
body[data-accent="terracotta"] { --accent: #B84A2C; --accent-deep: #8B3620; --accent-wash: rgba(184,74,44,0.08); }
body[data-accent="oxblood"]    { --accent: #6B1A1A; --accent-deep: #4E1111; --accent-wash: rgba(107,26,26,0.08); }
body[data-accent="forest"]     { --accent: #1F3A2E; --accent-deep: #132820; --accent-wash: rgba(31,58,46,0.08); }
body[data-accent="ink"]        { --accent: #181512; --accent-deep: #000;    --accent-wash: rgba(24,21,18,0.06); }
body[data-accent="indigo"]     { --accent: #2E3A6B; --accent-deep: #1E2650; --accent-wash: rgba(46,58,107,0.08); }
body[data-accent="ochre"]      { --accent: #A8741A; --accent-deep: #7E5410; --accent-wash: rgba(168,116,26,0.08); }

/* Background variants — whiter off-whites, warm or cool */
body[data-bg="bone"]   { --cream: #FAF7F0; --cream-2: #F3EEE2; --cream-deep: #E8E1CC; --paper: #FFFDF7; --rule: #E0D9C5; --rule-soft: #EDE7D5; }
body[data-bg="alabaster"] { --cream: #F7F5F0; --cream-2: #EFECE3; --cream-deep: #E4DFD0; --paper: #FCFAF5; --rule: #DDD8CA; --rule-soft: #EAE5D7; }
body[data-bg="paper"]  { --cream: #FAFAF7; --cream-2: #F2F1EC; --cream-deep: #E6E4DA; --paper: #FFFFFE; --rule: #E0DED6; --rule-soft: #EDEBE3; }
body[data-bg="porcelain"] { --cream: #F5F6F3; --cream-2: #EBEDE8; --cream-deep: #DEE0D9; --paper: #FAFBF8; --rule: #D8DAD2; --rule-soft: #E6E8E1; }
body[data-bg="cream"]  { --cream: #F1EADB; --cream-2: #EBE2CF; --cream-deep: #E4DAC3; --paper: #F7F2E6; --rule: #C9BFA8; --rule-soft: #D9CFBA; }

/* Serif variants */
body[data-serif="editorial"]   { --serif: "Fraunces", "Times New Roman", serif; }
body[data-serif="bank"]        { --serif: "Literata", "Times New Roman", serif; }
body[data-serif="transitional"]{ --serif: "Source Serif 4", "Times New Roman", serif; }

/* Reset-ish */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "ss02";
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

/* Paper grain — fine-tooth + coarse-fiber, dual layers */
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' seed='4'/><feColorMatrix values='0 0 0 0 0.06  0 0 0 0 0.05  0 0 0 0 0.04  0 0 0 0.16 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  mix-blend-mode: multiply;
  opacity: 0.85;
}
body::after {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='480' height='480'><filter id='nc'><feTurbulence type='fractalNoise' baseFrequency='0.32' numOctaves='2' seed='9'/><feColorMatrix values='0 0 0 0 0.18  0 0 0 0 0.14  0 0 0 0 0.10  0 0 0 0.07 0'/></filter><rect width='100%' height='100%' filter='url(%23nc)'/></svg>");
  mix-blend-mode: multiply;
  opacity: 0.7;
}
#root { position: relative; z-index: 1; }

/* Selection */
::selection { background: var(--accent); color: var(--cream); }

/* Utility container */
.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.container-wide {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Type scale */
.eyebrow {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  display: inline-block;
}
.eyebrow-num {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  font-weight: 500;
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 500;
  color: var(--ink);
  margin: 0;
  letter-spacing: -0.015em;
  font-feature-settings: "ss01", "liga";
}
h1 { font-size: clamp(48px, 7.2vw, 112px); line-height: 0.98; letter-spacing: -0.025em; }
h2 { font-size: clamp(36px, 4.8vw, 68px); line-height: 1.02; letter-spacing: -0.02em; }
h3 { font-size: clamp(22px, 2vw, 28px); line-height: 1.2; }
p { margin: 0; }

.serif-italic { font-style: italic; font-variation-settings: "SOFT" 100; }
.text-accent { color: var(--accent); }
.text-muted { color: var(--ink-muted); }
.text-soft  { color: var(--ink-soft); }
.mono { font-family: var(--mono); }

/* Vertical rules / dividers */
.hairline {
  height: 1px;
  background: var(--rule);
  border: 0;
  margin: 0;
}
.hairline-soft { height: 1px; background: var(--rule-soft); border: 0; margin: 0; }

/* Section */
section {
  position: relative;
  padding: clamp(56px, 7.5vh, 104px) 0;
}
section + section { border-top: 1px solid var(--rule); }

/* Soft section wash — light from above, fades out by mid-section.
   No bottom darkening, so adjacent section seams stay invisible. */
section:not(.section-dark):not(.final):not(.engine)::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg,
    rgba(255, 253, 247, 0.55) 0%,
    rgba(255, 253, 247, 0) 45%,
    transparent 100%);
  mix-blend-mode: multiply;
}
section > * { position: relative; }

.section-head {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 48px;
  align-items: baseline;
  padding-bottom: 56px;
}
@media (max-width: 860px) {
  .section-head { grid-template-columns: 1fr; gap: 16px; padding-bottom: 36px; }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 26px;
  background: var(--ink);
  color: var(--cream);
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.005em;
  border-radius: 999px;
  transition: background 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  border: 1px solid var(--ink);
  box-shadow: 0 1px 0 rgba(0,0,0,0.04);
}
.btn:hover { background: var(--accent); border-color: var(--accent); box-shadow: 0 6px 18px -6px color-mix(in oklab, var(--accent) 60%, transparent); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn .arrow { transition: transform 0.25s ease; }
.btn:hover .arrow { transform: translateX(4px); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
}
.btn-ghost:hover { background: var(--ink); color: var(--cream); }

.btn-lg { padding: 20px 30px; font-size: 15px; }

/* Pill chips */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--rule);
  background: var(--paper);
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-muted);
}

/* Small link style */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  border-bottom: 1px solid var(--ink);
  padding-bottom: 2px;
  transition: color 0.2s, border-color 0.2s;
}
.link-arrow:hover { color: var(--accent); border-color: var(--accent); }

/* ===== Nav ===== */
.nav {
  position: sticky; top: 0;
  z-index: 100;
  background: color-mix(in oklab, var(--cream) 85%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px var(--gutter);
  max-width: var(--max);
  margin: 0 auto;
  font-family: var(--mono);
}
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.02em;
  color: var(--ink);
  text-transform: lowercase;
}
.logo-word {
  position: relative;
  padding-right: 10px;
}
.logo-word::after {
  content: "";
  position: absolute;
  right: 0; top: 50%;
  width: 5px; height: 5px;
  background: var(--accent);
  transform: translateY(-50%);
  border-radius: 0;
}
.nav-links {
  display: flex;
  gap: 28px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  white-space: nowrap;
}
.nav-links a { white-space: nowrap; }
.nav-links a:hover { color: var(--ink); }
@media (max-width: 760px) { .nav-links { display: none; } }

/* ===== Hero — Shift variant ===== */
:root {
  --cal-watchdog: #1a1712;
  --cal-ezra:     #8B3620;
  --cal-mia:      #3a5a4a;
}
body[data-accent="forest"] { --cal-ezra: #8B3620; --cal-mia: #1F3A2E; }
body[data-accent="indigo"] { --cal-ezra: #2E3A6B; --cal-mia: #3a5a4a; }
body[data-accent="ochre"]  { --cal-ezra: #A8741A; --cal-mia: #3a5a4a; }

.hero-shift {
  background: #FAF6EE;
  padding-top: clamp(80px, 12vh, 160px);
  padding-bottom: clamp(80px, 12vh, 140px);
  min-height: 88vh;
  display: flex;
  align-items: center;
}
.hero-shift .container {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: clamp(40px, 5vw, 88px);
  align-items: center;
  width: 100%;
}
@media (max-width: 1100px) { .hero-shift .container { grid-template-columns: 1fr; } }

/* --- Calendar block --- */
.calblock {
  width: 100%;
  max-width: 640px;
  justify-self: end;
  font-family: var(--sans);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.calblock-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--rule);
}
.calblock-eyebrow {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.15em;
  color: var(--ink-muted);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.calblock-eyebrow .cdot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  animation: cdot-pulse 1.6s ease-in-out infinite;
}
@keyframes cdot-pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.35; }
}
.calblock-legend {
  display: inline-flex;
  gap: 16px;
  font-family: var(--sans);
  font-size: 11px;
  color: var(--ink-muted);
  letter-spacing: 0.01em;
}
.calblock-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.calblock-legend i {
  width: 9px; height: 9px;
  display: inline-block;
  border-radius: 1.5px;
}
.calblock-legend .dot-w { background: var(--cal-watchdog); }
.calblock-legend .dot-e { background: var(--cal-ezra); }
.calblock-legend .dot-m { background: var(--cal-mia); }

.calblock-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  height: clamp(280px, 42vh, 420px);
}
.calblock-col {
  display: flex;
  flex-direction: column;
  background: rgba(255, 253, 248, 0.5);
  border: 1px solid var(--rule-soft);
  border-radius: 2px;
  overflow: hidden;
}
.calblock-daylabel {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--ink-muted);
  padding: 6px 0 4px;
  text-align: center;
  border-bottom: 1px solid var(--rule-soft);
  background: rgba(0,0,0,0.015);
}
.calblock-daybody {
  position: relative;
  flex: 1;
}

.calcard {
  position: absolute;
  left: 4px;
  right: 4px;
  border-radius: 1.5px;
  opacity: 0;
  transform: scaleY(0.2);
  transform-origin: top;
  animation: cal-fill 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.calcard.watchdog { background: var(--cal-watchdog); }
.calcard.ezra     { background: var(--cal-ezra); }
.calcard.mia      { background: var(--cal-mia); opacity: 0; }

@keyframes cal-fill {
  0%   { opacity: 0; transform: scaleY(0.15); }
  60%  { opacity: 0.95; transform: scaleY(1); }
  100% { opacity: 0.92; transform: scaleY(1); }
}

.calblock-foot {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-top: 10px;
  border-top: 1px solid var(--rule);
}
.calblock-count {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
}
.calblock-num {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.calblock-lbl {
  font-family: var(--sans);
  font-size: 12px;
  color: var(--ink-muted);
}
.calblock-caption {
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  color: var(--ink-2);
}
body[data-bg="bone"] .hero-shift      { background: #FAF6EE; }
body[data-bg="alabaster"] .hero-shift { background: #F8F4EC; }
body[data-bg="paper"] .hero-shift     { background: #FBF8F1; }
body[data-bg="porcelain"] .hero-shift { background: #F5F6F3; }
body[data-bg="cream"] .hero-shift     { background: #F4EFE2; }

.shift-eyebrow {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #6b645a;
  margin-bottom: clamp(40px, 6vh, 72px);
}
.shift-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px 8px 12px;
  border: 1px solid rgba(26, 23, 18, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  color: #3a3530;
  letter-spacing: 0.12em;
  font-size: 10.5px;
}
.shift-pill .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #3FAE5A;
  box-shadow: 0 0 0 0 rgba(63, 174, 90, 0.55);
  animation: shift-pill-pulse 2s ease-in-out infinite;
}
@keyframes shift-pill-pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(63, 174, 90, 0.55);
    opacity: 1;
  }
  50% {
    box-shadow: 0 0 0 6px rgba(63, 174, 90, 0);
    opacity: 0.65;
  }
}
.shift-headline {
  font-family: var(--serif);
  font-size: clamp(42px, 7.2vw, 70px);
  line-height: 1.0;
  letter-spacing: -0.032em;
  font-weight: 400;
  color: #1a1712;
  max-width: 16ch;
  margin: 0;
  padding: 0;
}
.shift-headline em {
  font-style: italic;
  color: #8B3620;
  font-weight: 400;
  font-variation-settings: "SOFT" 100, "opsz" 144;
}
.shift-body {
  font-family: var(--sans);
  font-size: clamp(17px, 1.4vw, 20px);
  line-height: 1.55;
  color: #3a3530;
  max-width: 58ch;
  margin-top: clamp(32px, 4vh, 48px);
  font-weight: 400;
}
.shift-body-tight {
  margin-top: 20px;
  font-family: var(--serif);
  font-style: italic;
  color: #1a1712;
  font-size: clamp(19px, 1.5vw, 22px);
}
.shift-roster {
  list-style: none;
  padding: 0;
  margin: clamp(40px, 5vh, 56px) 0 0;
  font-family: var(--sans);
  font-size: clamp(17px, 1.35vw, 20px);
  line-height: 1.55;
  color: #3a3530;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.shift-roster li { padding: 0; }
.shift-roster b {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  color: #1a1712;
  font-size: 1.08em;
  letter-spacing: -0.01em;
  margin-right: 4px;
}
.shift-cta {
  margin-top: clamp(48px, 6vh, 72px);
}
.hero-shift .btn {
  background: #1a1712;
  border-color: #1a1712;
  color: #faf6ee;
  padding: 18px 32px;
  font-size: 13px;
  font-family: var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.hero-shift .btn:hover,
.hero-shift .btn:active {
  background: #A8741A;
  border-color: #A8741A;
  color: #1a1712;
}

.hero {
  padding-top: clamp(64px, 9vh, 120px);
  padding-bottom: clamp(72px, 10vh, 140px);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: clamp(32px, 5vw, 80px);
  align-items: end;
}
@media (max-width: 1020px) {
  .hero-grid { grid-template-columns: 1fr; }
}
.hero-eyebrow-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 48px;
}
.hero h1 {
  font-weight: 400;
}
.hero h1 em {
  font-style: italic;
  font-weight: 400;
  font-variation-settings: "SOFT" 100, "opsz" 144;
  color: var(--accent);
}
.hero-sub {
  max-width: 520px;
  font-size: clamp(16px, 1.4vw, 19px);
  line-height: 1.5;
  color: var(--ink-2);
  margin-top: 32px;
}
.hero-cta-row {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: 40px;
  flex-wrap: wrap;
}
.hero-meta {
  font-size: 12px;
  color: var(--ink-muted);
  font-family: var(--mono);
}

/* Console panel */
.console {
  border: 1px solid var(--ink);
  border-radius: 18px;
  background: var(--paper);
  padding: 0;
  position: relative;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  min-height: 420px;
  box-shadow: 0 24px 48px -28px rgba(24,21,18,0.25), 0 2px 0 rgba(24,21,18,0.04);
  overflow: hidden;
}
.console-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--ink);
  background: var(--ink);
  color: var(--cream);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.console-head .live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.console-head .live::before {
  content: "";
  width: 8px; height: 8px; border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 0 0 rgba(74,222,128,0.6);
  animation: pulse 1.6s infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(74,222,128,0.6); }
  70%  { box-shadow: 0 0 0 8px rgba(74,222,128,0); }
  100% { box-shadow: 0 0 0 0 rgba(74,222,128,0); }
}
.console-body {
  flex: 1;
  padding: 8px 0;
  overflow: hidden;
  position: relative;
  mask-image: linear-gradient(to bottom, transparent 0%, black 8%, black 92%, transparent 100%);
}
.console-row {
  display: grid;
  grid-template-columns: 64px 28px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px 18px;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.4;
  color: var(--ink-2);
  border-bottom: 1px dashed var(--rule-soft);
}
.console-row:last-child { border-bottom: 0; }
.console-row .time { color: var(--ink-soft); font-size: 11px; }
.console-row .who  {
  width: 22px; height: 22px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--serif);
  font-style: italic;
  font-size: 12px;
  font-weight: 600;
  color: var(--cream);
}
.who.watchdog { background: var(--ink); }
.who.ezra     { background: var(--accent); }
.who.mia      { background: #3a5a4a; }
body[data-accent="forest"] .who.mia { background: #8B3620; }
body[data-accent="ink"]    .who.mia { background: #B84A2C; }
.console-row .msg {
  color: var(--ink-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.console-row .status {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
}
.console-row .status.ok { color: #2a6b45; }
.console-row.new {
  background: var(--accent-wash);
  animation: flash 1.2s ease-out;
}
@keyframes flash {
  0%   { background: var(--accent-wash); }
  100% { background: transparent; }
}
.console-foot {
  padding: 12px 18px;
  border-top: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  display: flex;
  justify-content: space-between;
}

/* Hero bar-stats (below headline) */
.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  margin-top: 80px;
}
.hero-stats .cell {
  padding: 28px 24px;
  border-right: 1px solid var(--rule);
}
.hero-stats .cell:last-child { border-right: 0; }
.hero-stats .num {
  font-family: var(--serif);
  font-size: clamp(36px, 3.6vw, 52px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.02em;
}
.hero-stats .num em { font-style: italic; color: var(--accent); font-weight: 400; }
.hero-stats .lbl {
  font-size: 12px;
  color: var(--ink-muted);
  margin-top: 10px;
  line-height: 1.4;
  max-width: 260px;
}
@media (max-width: 760px) {
  .hero-stats { grid-template-columns: 1fr; }
  .hero-stats .cell { border-right: 0; border-bottom: 1px solid var(--rule); }
  .hero-stats .cell:last-child { border-bottom: 0; }
}

/* ===== Team — Split layout ===== */
.team-split { padding: clamp(64px, 8vh, 112px) 0; }
.ts-head {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-bottom: clamp(56px, 7vh, 88px);
  max-width: 720px;
}
.ts-headline {
  font-family: var(--serif);
  font-size: clamp(40px, 5.2vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  font-weight: 400;
  color: var(--ink);
  margin: 0;
}
.ts-layout {
  display: grid;
  grid-template-columns: 0.42fr 1fr;
  gap: clamp(32px, 4vw, 56px);
  align-items: start;
}
@media (max-width: 960px) { .ts-layout { grid-template-columns: 1fr; } }

.ts-sidebar {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ts-card {
  text-align: left;
  background: none;
  border: 0;
  border-top: 1px solid var(--rule);
  padding: 22px 0 22px;
  cursor: pointer;
  font: inherit;
  color: var(--ink-muted);
  transition: color 0.25s, padding-left 0.3s;
  position: relative;
}
.ts-card:last-child { border-bottom: 1px solid var(--rule); }
.ts-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: -1px;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.ts-card.active::before { width: 56px; }
.ts-card.active {
  color: var(--ink);
  padding-left: 12px;
}
.ts-card:hover:not(.active) { color: var(--ink-2); }
.ts-card-num {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  color: var(--ink-muted);
  margin-bottom: 8px;
}
.ts-card-name {
  font-family: var(--serif);
  font-size: 22px;
  letter-spacing: -0.015em;
  line-height: 1.2;
  color: inherit;
}
.ts-card-role {
  font-style: italic;
  color: var(--ink-muted);
  font-size: 17px;
}
.ts-card.active .ts-card-role { color: var(--accent); }
.ts-card-sub {
  margin-top: 6px;
  font-family: var(--sans);
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink-muted);
  max-width: 38ch;
}

.ts-panel-wrap { display: flex; flex-direction: column; gap: 18px; }
.ts-panel {
  border: 1px solid var(--rule);
  border-radius: 6px;
  overflow: hidden;
  background: #ffffff;
  box-shadow:
    0 1px 0 rgba(26,23,18,0.04),
    0 2px 4px rgba(26,23,18,0.06),
    0 12px 32px -12px rgba(26,23,18,0.18),
    0 32px 80px -40px rgba(26,23,18,0.28);
  animation: ts-fade 0.4s ease;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.ts-panel:hover {
  box-shadow:
    0 1px 0 rgba(26,23,18,0.04),
    0 4px 8px rgba(26,23,18,0.08),
    0 20px 48px -16px rgba(26,23,18,0.22),
    0 44px 100px -48px rgba(26,23,18,0.32);
}
@keyframes ts-fade {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.ts-caption {
  font-family: var(--serif);
  font-style: italic;
  font-size: 15px;
  color: var(--ink-muted);
  max-width: 70ch;
  line-height: 1.55;
  margin: 0;
  padding-left: 2px;
}

/* ===== GitHub mockup ===== */
.gh-mock {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif;
  font-size: 13px;
  color: #1f2328;
  background: #ffffff;
}
.gh-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid #d0d7de;
  background: #f6f8fa;
}
.gh-repo { display: inline-flex; align-items: center; gap: 6px; }
.gh-owner { color: #0969da; font-weight: 600; }
.gh-slash { color: #57606a; }
.gh-name  { color: #0969da; font-weight: 600; }
.gh-vis {
  margin-left: 8px;
  font-size: 10.5px;
  padding: 2px 7px;
  border: 1px solid #d0d7de;
  border-radius: 20px;
  color: #57606a;
}
.gh-head-right { display: inline-flex; gap: 8px; }
.gh-pill {
  font-size: 11px;
  padding: 3px 8px;
  border: 1px solid #d0d7de;
  border-radius: 4px;
  color: #1f2328;
  background: #fff;
}
.gh-body { display: grid; grid-template-columns: 1fr 1.2fr; }
.gh-files {
  border-right: 1px solid #d0d7de;
  padding: 4px 0;
}
.gh-filerow {
  display: grid;
  grid-template-columns: 18px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  border-bottom: 1px solid #eaeef2;
  font-size: 13px;
}
.gh-filerow:last-child { border-bottom: 0; }
.gh-folder span:nth-child(2) { color: #0969da; font-weight: 500; }
.gh-commit { color: #57606a; font-size: 11.5px; justify-self: end; }
.gh-readme { padding: 0; }
.gh-readme-head {
  padding: 10px 16px;
  border-bottom: 1px solid #eaeef2;
  background: #f6f8fa;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
}
.gh-readme-body { padding: 16px 20px 20px; font-size: 13.5px; line-height: 1.55; }
.gh-readme-body h3 { margin: 0 0 6px; font-size: 18px; color: #1f2328; }
.gh-readme-body p { margin: 0 0 14px; color: #57606a; }
.gh-readme-body ol { padding-left: 22px; margin: 0; }
.gh-readme-body li { margin-bottom: 6px; color: #1f2328; }

/* ===== Slack mockup (light) ===== */
.sl-mock {
  font-family: "Slack-Lato", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  color: #1d1c1d;
  background: #ffffff;
}
.sl-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 18px;
  border-bottom: 1px solid #e8e8e8;
}
.sl-channel { display: inline-flex; align-items: baseline; gap: 4px; font-weight: 700; font-size: 15px; }
.sl-hash { color: #616061; font-weight: 900; }
.sl-topic { color: #616061; font-size: 12px; }
.sl-body { padding: 20px 22px 12px; }
.sl-message { display: grid; grid-template-columns: 40px 1fr; gap: 10px; }
.sl-avatar {
  width: 36px; height: 36px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif);
  font-size: 18px;
  color: #fff;
  font-weight: 500;
  box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}
.ezra-avatar { background: #8B3620; }
.mia-avatar  { background: #3a5a4a; }
.sl-meta { display: inline-flex; align-items: baseline; gap: 8px; margin-bottom: 4px; }
.sl-name { font-weight: 700; font-size: 15px; color: #1d1c1d; }
.sl-app {
  font-size: 9.5px;
  font-weight: 700;
  color: #616061;
  background: #f8f8f8;
  padding: 2px 4px;
  border-radius: 2px;
  letter-spacing: 0.02em;
}
.sl-time { font-size: 12px; color: #616061; }
.sl-text { line-height: 1.5; color: #1d1c1d; }
.sl-list { margin: 8px 0 10px; padding: 0; list-style: none; line-height: 1.7; }
.sl-list li { padding-left: 16px; position: relative; }
.sl-list li::before { content: "•"; position: absolute; left: 0; color: #616061; }
.sl-muted { color: #1d1c1d; margin-top: 6px; }
.sl-actions { margin-top: 12px; display: inline-flex; gap: 8px; }
.sl-btn {
  font: inherit;
  font-size: 13px;
  padding: 8px 14px;
  border-radius: 4px;
  border: 1px solid #868686;
  background: #fff;
  color: #1d1c1d;
  cursor: pointer;
  font-weight: 700;
  transition: transform 0.12s ease, box-shadow 0.18s ease, background 0.15s ease, border-color 0.15s ease;
  box-shadow: 0 1px 0 rgba(0,0,0,0.04);
}
.sl-btn:hover {
  background: #f8f8f8;
  border-color: #1d1c1d;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08), 0 1px 0 rgba(0,0,0,0.04);
  transform: translateY(-1px);
}
.sl-btn:active {
  transform: translateY(0);
  box-shadow: 0 1px 0 rgba(0,0,0,0.06);
}
.sl-btn-primary {
  background: #007a5a;
  border-color: #007a5a;
  color: #fff;
  box-shadow: 0 1px 0 rgba(0,83,60,0.35), 0 2px 6px rgba(0,122,90,0.18);
}
.sl-btn-primary:hover {
  background: #006d50;
  border-color: #006d50;
  color: #fff;
  box-shadow: 0 2px 0 rgba(0,83,60,0.35), 0 6px 18px rgba(0,122,90,0.28);
}
.sl-btn-primary:active {
  background: #005f46;
  border-color: #005f46;
  box-shadow: 0 1px 0 rgba(0,83,60,0.35);
}
.sl-compose { padding: 0 18px 18px; }
.sl-compose-box {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #d6d6d6;
  border-radius: 6px;
  padding: 8px 8px 8px 12px;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.sl-compose-box:focus-within {
  border-color: #1d1c1d;
  box-shadow: 0 0 0 3px rgba(29,28,29,0.08);
}
.sl-compose-input {
  flex: 1;
  font: inherit;
  font-size: 14px;
  color: #1d1c1d;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 2px 0;
}
.sl-compose-input::placeholder { color: #868686; }
.sl-send {
  width: 28px;
  height: 28px;
  border-radius: 4px;
  border: 0;
  background: #007a5a;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.12s ease;
  box-shadow: 0 1px 2px rgba(0,122,90,0.25);
}
.sl-send:hover { background: #006d50; transform: translateY(-1px); }
.sl-send:active { transform: translateY(0); }
.sl-placeholder { color: #868686; font-size: 14px; }
.sl-call-header {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 600;
  margin-bottom: 8px;
}
.sl-call-icon { font-size: 16px; }
.sl-call-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 18px;
  margin: 10px 0 12px;
  font-size: 13.5px;
  border-left: 3px solid #e8e8e8;
  padding-left: 12px;
}
.sl-call-k { color: #616061; font-weight: 600; }
.sl-call-v { color: #1d1c1d; }
.sl-call-tags { display: inline-flex; gap: 8px; flex-wrap: wrap; }
.sl-tag {
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 20px;
  background: #ecf6f0;
  color: #16724c;
  font-weight: 600;
}

/* ===== Engine section ===== */
.engine {
  padding: clamp(72px, 9vh, 124px) 0;
  background: inherit;
  border-top: 1px solid var(--rule-soft);
}
.eng-head {
  text-align: center;
  max-width: 820px;
  margin: 0 auto clamp(72px, 9vh, 112px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}
.eng-eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--ink-muted);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eng-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent);
  display: inline-block;
}
.eng-headline {
  font-family: var(--serif);
  font-size: clamp(44px, 6vw, 84px);
  line-height: 1.0;
  letter-spacing: -0.028em;
  font-weight: 400;
  color: var(--ink);
  margin: 0;
  text-wrap: balance;
}
.eng-italic {
  font-style: italic;
  color: #8B3620;
  font-variation-settings: "SOFT" 100, "opsz" 144;
}
body[data-accent="oxblood"] .eng-italic { color: var(--accent); }
body[data-accent="forest"] .eng-italic  { color: #8B3620; }
body[data-accent="indigo"] .eng-italic  { color: #2E3A6B; }
body[data-accent="ochre"]  .eng-italic  { color: #A8741A; }
body[data-accent="ink"]    .eng-italic  { color: #1a1712; }

.eng-sub {
  font-family: var(--sans);
  font-size: clamp(15px, 1.1vw, 17px);
  line-height: 1.62;
  color: var(--ink-2);
  max-width: 68ch;
  margin: 0;
}

.eng-nvidia {
  margin-top: 4px;
  display: inline-flex;
  align-items: center;
  padding: 10px 18px;
  border: 1px solid var(--rule);
  border-radius: 6px;
  background: #ffffff;
  opacity: 0.92;
  cursor: pointer;
  text-decoration: none;
  box-shadow:
    0 1px 0 rgba(26,23,18,0.04),
    0 2px 6px rgba(26,23,18,0.05),
    0 10px 24px -12px rgba(26,23,18,0.15);
  transition: opacity 0.2s, transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s;
}
.eng-nvidia:hover {
  opacity: 1;
  transform: translateY(-1px);
  border-color: rgba(26,23,18,0.22);
  box-shadow:
    0 2px 0 rgba(26,23,18,0.05),
    0 6px 14px rgba(26,23,18,0.08),
    0 18px 40px -16px rgba(26,23,18,0.22);
}
.eng-nvidia:active {
  transform: translateY(0);
  box-shadow:
    0 1px 0 rgba(26,23,18,0.04),
    0 2px 6px rgba(26,23,18,0.05);
}
.eng-nvidia-logo {
  height: 20px;
  width: auto;
  display: block;
}

.eng-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
@media (max-width: 960px) { .eng-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .eng-grid { grid-template-columns: 1fr; } }

.eng-card {
  position: relative;
  border: 1px solid var(--rule);
  background: rgba(255,253,248,0.4);
  padding: 36px 28px 32px;
  overflow: hidden;
  min-height: 280px;
  display: flex;
  transition: border-color 0.25s, background 0.25s;
}
.eng-card:hover {
  border-color: rgba(26,23,18,0.22);
  background: rgba(255,253,248,0.7);
}
.eng-card-watermark {
  position: absolute;
  top: 18px;
  right: -12px;
  color: var(--ink-muted);
  opacity: 0.14;
  pointer-events: none;
  transition: opacity 0.3s;
}
.eng-card:hover .eng-card-watermark { opacity: 0.22; }
.eng-card-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}
.eng-card-big {
  font-family: var(--serif);
  font-size: clamp(44px, 4vw, 60px);
  line-height: 1;
  letter-spacing: -0.028em;
  font-weight: 400;
  color: var(--ink);
  font-variation-settings: "SOFT" 30, "opsz" 144;
}
.eng-card-eyebrow {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 14px;
  white-space: pre-line;
}
.eng-card-body {
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-2);
  margin: auto 0 0;
  max-width: 32ch;
}

.eng-foot {
  margin: clamp(48px, 6vh, 72px) auto 0;
  max-width: 64ch;
  text-align: center;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(15px, 1.1vw, 17px);
  line-height: 1.6;
  color: var(--ink-muted);
}

/* ===== Built For ===== */
.built-intro {
  max-width: 720px;
  font-size: clamp(18px, 1.6vw, 22px);
  line-height: 1.45;
  font-family: var(--serif);
  color: var(--ink-2);
  font-weight: 400;
}
.built-intro b { color: var(--ink); font-weight: 500; }
.verticals {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 72px;
  border: 1px solid var(--rule);
  border-radius: 20px;
  background: var(--paper);
  overflow: hidden;
}
.vertical {
  padding: 36px 32px 40px;
  border-right: 1px solid var(--rule);
  position: relative;
  transition: background 0.25s;
}
.vertical:first-child { border-top-left-radius: 20px; border-bottom-left-radius: 20px; }
.vertical:last-child { border-right: 0; border-top-right-radius: 20px; border-bottom-right-radius: 20px; }
.vertical:hover { background: var(--paper); }
.vertical-num {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-muted);
  letter-spacing: 0.1em;
}
.vertical h3 {
  margin-top: 12px;
  font-weight: 500;
}
.vertical-body {
  margin-top: 18px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-muted);
}
.vertical-parties {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px dashed var(--rule);
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.8;
  color: var(--ink-2);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.vertical-parties .k { color: var(--ink-soft); }
@media (max-width: 860px) {
  .verticals { grid-template-columns: 1fr; }
  .vertical { border-right: 0; border-bottom: 1px solid var(--rule); }
  .vertical:last-child { border-bottom: 0; }
}

/* ===== Team ===== */
.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 64px;
}
@media (max-width: 960px) { .team-grid { grid-template-columns: 1fr; } }

.bio {
  padding: 40px 36px 36px;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 20px;
  position: relative;
  transition: background 0.3s, transform 0.3s, box-shadow 0.3s, border-color 0.3s;
  cursor: pointer;
}
.bio:hover { transform: translateY(-2px); box-shadow: 0 20px 40px -24px rgba(24,21,18,0.18); border-color: var(--ink-muted); }
.bio.expanded { background: var(--paper); box-shadow: 0 20px 40px -24px rgba(24,21,18,0.22); border-color: var(--ink); }

.bio-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.monogram {
  width: 86px; height: 86px;
  border-radius: 50%;
  border: 1.5px solid var(--ink);
  display: grid; place-items: center;
  background: var(--cream);
  color: var(--ink);
  flex-shrink: 0;
  transition: background 0.4s, color 0.4s, border-color 0.4s;
  position: relative;
  overflow: hidden;
}
.bio.expanded .monogram,
.bio:hover .monogram {
  background: var(--accent);
  color: var(--cream);
  border-color: var(--accent);
}
.monogram svg { width: 100%; height: 100%; display: block; }

@keyframes wd-sweep { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes ez-pulse {
  0%   { r: 6; opacity: 0.7; stroke-width: 1.2; }
  100% { r: 42; opacity: 0; stroke-width: 0.3; }
}
@keyframes mi-wave { 0%,100% { opacity: 0.55; } 50% { opacity: 1; } }
.bio-meta {
  text-align: right;
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
  line-height: 1.8;
}
.bio-name {
  margin-top: 28px;
  font-family: var(--serif);
  font-size: 34px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1;
}
.bio-role {
  margin-top: 6px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 17px;
  color: var(--accent);
  font-weight: 400;
}
.bio-body {
  margin-top: 22px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-muted);
}
.bio-expand {
  margin-top: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink);
}
.bio-plus {
  width: 18px; height: 18px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 14px;
  line-height: 1;
  transition: transform 0.3s, background 0.3s, color 0.3s;
}
.bio.expanded .bio-plus { transform: rotate(45deg); background: var(--ink); color: var(--cream); }

.bio-detail {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.5s ease, padding 0.5s ease, border-color 0.3s;
  border-top: 1px dashed transparent;
  margin-top: 0;
}
.bio.expanded .bio-detail {
  max-height: 800px;
  padding-top: 20px;
  margin-top: 24px;
  border-top-color: var(--rule);
}
.bio-spec {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 10px 14px;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.6;
}
.bio-spec .k {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
}
.bio-spec .v { color: var(--ink-2); }

/* ===== Case Studies ===== */
.cases { padding-top: 0; }

/* Accordion variant (default) */
.case-accordion {
  border: 1px solid var(--rule);
  border-radius: 20px;
  background: var(--paper);
  overflow: hidden;
}
.case-item {
  border-bottom: 1px solid var(--rule);
}
.case-item:last-child { border-bottom: 0; }
.case-trigger {
  width: 100%;
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 28px;
  align-items: center;
  padding: 28px 32px;
  cursor: pointer;
  text-align: left;
  transition: background 0.2s;
}
.case-trigger:hover { background: color-mix(in oklab, var(--cream) 50%, var(--paper)); }
.case-item.open .case-trigger { background: var(--cream-2); }
.case-trigger .case-num {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-soft);
  letter-spacing: 0.08em;
  min-width: 60px;
}
.case-trigger .case-title {
  font-family: var(--serif);
  font-size: clamp(18px, 1.6vw, 22px);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.case-trigger .case-stat {
  font-family: var(--serif);
  font-size: clamp(18px, 1.8vw, 24px);
  font-style: italic;
  color: var(--accent);
  font-weight: 400;
  white-space: nowrap;
}
.case-trigger .toggle {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 1px solid var(--ink);
  display: grid; place-items: center;
  font-size: 16px;
  line-height: 1;
  transition: transform 0.4s, background 0.3s, color 0.3s;
  flex-shrink: 0;
}
.case-item.open .toggle { transform: rotate(45deg); background: var(--ink); color: var(--cream); }

.case-panel {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.6s ease;
}
.case-item.open .case-panel { max-height: 1400px; }
.case-panel-inner {
  padding: 8px 32px 40px;
}
@media (max-width: 760px) {
  .case-trigger { grid-template-columns: 1fr auto; gap: 12px; padding: 22px 22px; }
  .case-trigger .case-num, .case-trigger .case-stat { grid-column: 1 / -1; }
  .case-panel-inner { padding: 0 22px 32px; }
}

/* Ledger row */
.ledger {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: stretch;
  border: 1px solid var(--rule);
  border-radius: 14px;
  overflow: hidden;
  background: var(--cream);
}
.ledger-cell {
  padding: 28px 24px 26px;
  border-right: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  min-height: 160px;
}
.ledger-cell:last-child { border-right: 0; }
.ledger-lbl {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-soft);
  margin-bottom: auto;
  padding-bottom: 16px;
}
.ledger-num {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(36px, 4.2vw, 64px);
  line-height: 0.95;
  letter-spacing: -0.03em;
  font-variation-settings: "opsz" 144;
}
.ledger-cell.before .ledger-num { color: var(--ink-soft); text-decoration: line-through; text-decoration-thickness: 1px; text-decoration-color: var(--ink-soft); }
.ledger-cell.after  .ledger-num { color: var(--ink); }
.ledger-cell.delta  .ledger-num { color: var(--accent); font-style: italic; }
.ledger-unit {
  font-family: var(--sans);
  font-size: 12.5px;
  color: var(--ink-muted);
  margin-top: 10px;
  line-height: 1.4;
}
@media (max-width: 760px) {
  .ledger { grid-template-columns: 1fr; }
  .ledger-cell { border-right: 0; border-bottom: 1px solid var(--rule); min-height: auto; padding: 22px 20px; }
  .ledger-cell:last-child { border-bottom: 0; }
}

/* Narrative */
.case-narrative {
  display: grid;
  grid-template-columns: 200px 1fr 1fr;
  gap: 40px;
  margin-top: 32px;
}
.case-narrative .side {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-soft);
  line-height: 1.8;
}
.case-narrative .side .k {
  color: var(--ink-2);
  display: block;
  margin-top: 4px;
  text-transform: none;
  letter-spacing: 0;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
}
.case-narrative .side > div + div { margin-top: 14px; }
.case-narrative p {
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--ink-2);
}
.case-narrative p + p { margin-top: 12px; }
.case-narrative p em { color: var(--ink); font-style: italic; }
@media (max-width: 860px) {
  .case-narrative { grid-template-columns: 1fr; gap: 20px; }
}

/* Tabs variant */
.case-tabs {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 32px;
  align-items: start;
}
@media (max-width: 960px) { .case-tabs { grid-template-columns: 1fr; } }
.case-tabs-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.case-tab {
  padding: 22px 22px;
  border: 1px solid var(--rule);
  border-radius: 14px;
  background: var(--paper);
  text-align: left;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.case-tab:hover { border-color: var(--ink-muted); }
.case-tab.active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--cream);
}
.case-tab .tnum {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-soft);
  letter-spacing: 0.1em;
}
.case-tab.active .tnum { color: rgba(241,234,219,0.5); }
.case-tab .ttitle {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.case-tab .tstat {
  font-family: var(--serif);
  font-style: italic;
  color: var(--accent);
  font-size: 15px;
}
.case-tab.active .tstat { color: #ffa785; }

.case-tab-panel {
  border: 1px solid var(--rule);
  border-radius: 20px;
  padding: 32px;
  background: var(--paper);
}
.case-tab-panel .case-title {
  font-family: var(--serif);
  font-size: clamp(22px, 2vw, 28px);
  font-weight: 500;
  letter-spacing: -0.01em;
  margin-bottom: 20px;
}

/* ===== Integrations ===== */
.integrations .section-sub {
  max-width: 560px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-muted);
}

/* ===== Variant D — Features grid (3×2) ===== */
.integrations-features { background: var(--cream); }
.feat-grid {
  margin-top: 56px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
@media (max-width: 960px) {
  .feat-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .feat-grid { grid-template-columns: 1fr; }
}
.feat-card {
  border: 1px solid var(--rule);
  background: var(--cream);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s, background 0.2s;
}
.feat-card:hover { border-color: var(--ink-soft); background: var(--paper); }

.feat-card-visual {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--cream-2);
  border-bottom: 1px solid var(--rule-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.feat-visual { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }

.feat-card-body {
  padding: 22px 24px 26px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.feat-card-num {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  color: var(--ink-soft);
  text-transform: uppercase;
}
.feat-card-title {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 2px 0 2px;
  line-height: 1.15;
}
.feat-card-desc {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink-muted);
  margin: 0;
  text-wrap: pretty;
}
.feat-tools {
  color: var(--ink-muted);
  font-variation-settings: normal;
}

/* Integrations card visual — logo cluster */
.feat-visual-integ {
  flex-direction: column;
  gap: 10px;
  padding: 20px;
}
.feat-logo-row {
  display: flex;
  gap: 8px;
  justify-content: center;
}
.feat-logo-tile {
  width: 44px;
  height: 36px;
  border-radius: 6px;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.08);
  box-shadow: 0 1px 2px rgba(26,23,18,0.05);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}
.feat-logo-tile:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(26,23,18,0.10);
}
.feat-logo-more {
  background: transparent !important;
  border: 1px dashed var(--ink-soft) !important;
  box-shadow: none !important;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--ink-muted);
  letter-spacing: 0.04em;
}
/* Keep legacy .feat-logo rule off (not used post-upgrade) */
.feat-logo { display: none; }

/* ===== Feature card animations (02–05) ===== */

/* Card 02 — Autonomous Agent: scanning radar sweep + nucleus pulse */
.feat-agent-sweep {
  transform-origin: 120px 68px;
  animation: feat-sweep 4.5s linear infinite;
}
.feat-agent-nucleus {
  animation: feat-nucleus 2.2s ease-in-out infinite;
  transform-origin: center;
}
.feat-agent-ring { animation: feat-ring 3s ease-out infinite; transform-origin: 120px 68px; }
.feat-agent-ring.r2 { animation-delay: -1s; }
.feat-agent-ring.r3 { animation-delay: -2s; }
@keyframes feat-sweep {
  0%   { transform: rotate(0deg); opacity: 0.12; }
  20%  { opacity: 0.14; }
  100% { transform: rotate(360deg); opacity: 0.12; }
}
@keyframes feat-nucleus {
  0%, 100% { r: 5; opacity: 1; }
  50%      { r: 6.5; opacity: 0.85; }
}
@keyframes feat-ring {
  0%   { r: 12; opacity: 0.7; }
  100% { r: 58; opacity: 0; }
}

/* Card 03 — Browser Automation: cursor nudge + field-fill sweep */
.feat-browser-cursor {
  animation: feat-cursor 3.4s cubic-bezier(0.4, 0.0, 0.2, 1) infinite;
  transform-origin: center;
}
.feat-browser-fill {
  transform-origin: left center;
  animation: feat-fill 3.4s cubic-bezier(0.4, 0.0, 0.2, 1) infinite;
}
.feat-browser-fill.f2 { animation-delay: 0.4s; }
.feat-browser-fill.f3 { animation-delay: 0.8s; }
.feat-browser-live {
  animation: feat-live-blink 1.4s ease-in-out infinite;
}
@keyframes feat-cursor {
  0%   { transform: translate(168px, 88px); }
  45%  { transform: translate(60px, 100px); }
  55%  { transform: translate(60px, 100px) scale(0.88); }
  60%  { transform: translate(60px, 100px); }
  100% { transform: translate(168px, 88px); }
}
@keyframes feat-fill {
  0%, 30%   { transform: scaleX(0); }
  55%, 100% { transform: scaleX(1); }
}
@keyframes feat-live-blink {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.35; }
}

/* Card 04 — Structured Memory: schema row write-in + version tick */
.feat-memory-row {
  transform-origin: left center;
  animation: feat-mem-row 4.2s ease-out infinite;
}
.feat-memory-row.m1 { animation-delay: 0s;   }
.feat-memory-row.m2 { animation-delay: 0.25s; }
.feat-memory-row.m3 { animation-delay: 0.5s; }
.feat-memory-row.m4 { animation-delay: 0.75s; }
@keyframes feat-mem-row {
  0%, 10%  { transform: scaleX(0); opacity: 0.3; }
  25%, 85% { transform: scaleX(1); opacity: 1; }
  100%     { transform: scaleX(1); opacity: 0.3; }
}
.feat-memory-version {
  animation: feat-mem-version 4.2s steps(1) infinite;
}
@keyframes feat-mem-version {
  0%, 85%  { opacity: 1; }
  86%, 100% { opacity: 0.25; }
}

/* Card 05 — Voice-Ready: waveform bars breathing */
.feat-voice-bar { transform-origin: center; animation: feat-wave 1.6s ease-in-out infinite; }
.feat-voice-bar.b1  { animation-delay: 0.00s; }
.feat-voice-bar.b2  { animation-delay: 0.06s; }
.feat-voice-bar.b3  { animation-delay: 0.12s; }
.feat-voice-bar.b4  { animation-delay: 0.18s; }
.feat-voice-bar.b5  { animation-delay: 0.24s; }
.feat-voice-bar.b6  { animation-delay: 0.30s; }
.feat-voice-bar.b7  { animation-delay: 0.36s; }
.feat-voice-bar.b8  { animation-delay: 0.42s; }
.feat-voice-bar.b9  { animation-delay: 0.36s; }
.feat-voice-bar.b10 { animation-delay: 0.30s; }
.feat-voice-bar.b11 { animation-delay: 0.24s; }
.feat-voice-bar.b12 { animation-delay: 0.18s; }
.feat-voice-bar.b13 { animation-delay: 0.12s; }
@keyframes feat-wave {
  0%, 100% { transform: scaleY(0.35); }
  50%      { transform: scaleY(1); }
}
@media (prefers-reduced-motion: reduce) {
  .feat-agent-sweep, .feat-agent-nucleus, .feat-agent-ring,
  .feat-browser-cursor, .feat-browser-fill, .feat-browser-live,
  .feat-memory-row, .feat-memory-version,
  .feat-voice-bar {
    animation: none !important;
  }
}

/* Variant A — Featured 3×3 (default) */
.logos-featured {
  margin-top: 56px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.logo-tile {
  aspect-ratio: 1.8 / 1;
  border: 1px solid var(--rule);
  background: var(--paper);
  border-radius: 18px;
  display: grid;
  place-items: center;
  padding: 20px;
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
  position: relative;
}
.logo-tile:hover {
  transform: translateY(-2px);
  border-color: var(--ink-muted);
  box-shadow: 0 14px 30px -20px rgba(24,21,18,0.2);
}
.logo-tile svg, .logo-tile .wordmark {
  max-width: 140px;
  max-height: 38px;
  color: var(--ink);
}
.logo-tile .wordmark {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1;
}
.logo-tile .wordmark em { font-style: italic; color: var(--accent); }
.logo-tile svg { width: auto; height: 34px; }

.logo-more {
  margin-top: 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 28px;
  border: 1px dashed var(--rule);
  border-radius: 999px;
  background: var(--paper);
}
.logo-more-lbl {
  font-family: var(--serif);
  font-style: italic;
  font-size: 20px;
  color: var(--ink);
}
.logo-more-lbl em { color: var(--accent); font-weight: 500; font-style: normal; font-family: var(--sans); font-size: 17px; letter-spacing: -0.01em; margin-right: 8px; }
.logo-more-right {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-muted);
}
@media (max-width: 760px) {
  .logos-featured { grid-template-columns: repeat(2, 1fr); }
}

/* Variant B — Marquee */
.logo-marquee {
  margin-top: 48px;
  overflow: hidden;
  border: 1px solid var(--rule);
  border-radius: 20px;
  background: var(--paper);
  padding: 28px 0;
  position: relative;
}
.logo-marquee::before, .logo-marquee::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  width: 80px;
  z-index: 2;
  pointer-events: none;
}
.logo-marquee::before { left: 0;  background: linear-gradient(to right, var(--paper), transparent); }
.logo-marquee::after  { right: 0; background: linear-gradient(to left,  var(--paper), transparent); }
.logo-marquee-track {
  display: flex;
  gap: 56px;
  align-items: center;
  animation: marquee 55s linear infinite;
  width: max-content;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.logo-marquee-item {
  color: var(--ink-soft);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 15px;
  white-space: nowrap;
  transition: color 0.25s;
}
.logo-marquee-item:hover { color: var(--ink); }
.logo-marquee-item.hl { color: var(--ink); font-weight: 600; }
.logo-marquee-item.hl::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: 2px;
}
.logo-marquee-item svg { width: 22px; height: 22px; }

/* Variant C — Stack diagram */
.logo-stack {
  margin-top: 56px;
  padding: 48px 40px;
  border: 1px solid var(--rule);
  border-radius: 24px;
  background: var(--paper);
  display: grid;
  gap: 28px;
}
.stack-layer {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 28px;
  align-items: center;
}
.stack-lbl {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.stack-lbl .n {
  font-family: var(--serif);
  font-style: italic;
  font-size: 22px;
  color: var(--ink);
  display: block;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
  text-transform: none;
}
.stack-tiles {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.stack-tile {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--cream);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
  transition: background 0.2s, border-color 0.2s;
}
.stack-tile:hover { border-color: var(--ink-muted); background: var(--paper); }
.stack-tile svg { width: 16px; height: 16px; }
.stack-divider {
  height: 1px;
  background: var(--rule);
}
@media (max-width: 760px) {
  .stack-layer { grid-template-columns: 1fr; gap: 12px; }
}

/* ===== Final CTA ===== */
.final {
  background: var(--ink);
  color: var(--cream);
  padding: clamp(64px, 8.5vh, 120px) 0;
  position: relative;
  border-top: 1px solid var(--ink);
}
.final::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' seed='2'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 0.96  0 0 0 0 0.85  0 0 0 0.03 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  pointer-events: none;
  mix-blend-mode: overlay;
}
.final-inner { position: relative; z-index: 1; }
.final h2 {
  color: var(--cream);
  font-size: clamp(44px, 6vw, 88px);
  line-height: 1.02;
  font-weight: 400;
  letter-spacing: -0.025em;
  max-width: 18ch;
}
.final h2 em { font-style: italic; color: var(--accent); font-weight: 400; }
.final-sub {
  margin-top: 28px;
  max-width: 560px;
  font-size: 17px;
  line-height: 1.55;
  color: rgba(241, 234, 219, 0.7);
}
.final .btn-lg {
  background: #ffffff;
  color: var(--ink);
  border-color: #ffffff;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 18px 32px;
  margin-top: 40px;
}
.final .btn-lg:hover,
.final .btn-lg:active {
  background: #A8741A;
  color: var(--ink);
  border-color: #A8741A;
}

.final-quote {
  margin-top: 80px;
  padding-top: 32px;
  border-top: 1px solid rgba(241, 234, 219, 0.2);
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(20px, 2vw, 26px);
  font-weight: 400;
  line-height: 1.4;
  color: var(--cream);
  max-width: 32ch;
}

/* ===== Footer ===== */
.footer {
  background: var(--ink);
  color: rgba(241, 234, 219, 0.6);
  padding: 28px 0;
  border-top: 1px solid rgba(241, 234, 219, 0.15);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.footer-links { display: flex; gap: 28px; }
.footer-links a:hover { color: var(--cream); }
@media (max-width: 620px) {
  .footer-inner { flex-direction: column; gap: 16px; }
}

/* ===== Tweaks panel ===== */
.tweaks {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 200;
  background: var(--paper);
  border: 1px solid var(--ink);
  box-shadow: 6px 6px 0 var(--ink);
  width: 300px;
  font-family: var(--sans);
  font-size: 13px;
  max-height: calc(100vh - 48px);
  overflow: auto;
}
.tweaks-head {
  padding: 14px 18px;
  border-bottom: 1px solid var(--ink);
  background: var(--ink);
  color: var(--cream);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.tweaks-head h4 {
  font-family: var(--serif);
  color: var(--cream);
  font-size: 18px;
  font-weight: 500;
  font-style: italic;
}
.tweaks-body { padding: 18px; }
.tweak-group + .tweak-group { margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--rule); }
.tweak-label {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-soft);
  margin-bottom: 10px;
}
.tweak-opts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.tweak-opt {
  padding: 10px 12px;
  border: 1px solid var(--rule);
  background: var(--cream);
  font-size: 12px;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  gap: 8px;
}
.tweak-opt:hover { border-color: var(--ink); }
.tweak-opt.active { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.tweak-swatch {
  width: 14px; height: 14px; border-radius: 50%;
  border: 1px solid rgba(0,0,0,0.15);
  flex-shrink: 0;
}

/* motion-reduce */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* ============================================= */
/* ===== Dark-section rhythm  ================== */
/* ============================================= */
/* Applied to specific sections (team + final-cta) to create */
/* a light/dark cadence down the page. Local overrides for type, */
/* rules and accent-on-dark. */

section.section-dark,
#engine.engine {
  /* Engine section: dark ground */
  --local-bg:     #17130E;
  --local-bg-2:   #1F1A13;
  --local-ink:    #F2ECDC;
  --local-muted:  #B8AF9C;
  --local-soft:   #8A8170;
  --local-rule:   rgba(242,236,220,0.12);
  --local-rule-soft: rgba(242,236,220,0.06);
  --local-paper:  #1C1811;

  background: var(--local-bg);
  color: var(--local-ink);
  position: relative;
}
section.section-dark::before,
#engine.engine::before {
  /* Soft top fade so it feels intentional, not a hard cut. */
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0; height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(0,0,0,0.6) 50%, transparent 100%);
  pointer-events: none;
}

/* Kill the paper-grain on dark sections — it reads as dirt on dark. */
#engine.engine,
section.section-dark {
  isolation: isolate;
}

/* Cascade colour overrides inside dark sections */
#engine.engine h1, #engine.engine h2, #engine.engine h3, #engine.engine h4 { color: var(--local-ink); }
#engine.engine .eyebrow,
#engine.engine .text-muted,
#engine.engine p { color: var(--local-muted); }
#engine.engine .text-soft,
#engine.engine .eyebrow-num,
#engine.engine .eng-eyebrow,
#engine.engine .eng-card-eyebrow { color: var(--local-soft); }
#engine.engine .eyebrow .dot,
#engine.engine .shift-pill .dot { background: var(--accent); }
#engine.engine hr,
#engine.engine .rule { border-color: var(--local-rule); }

/* Engine card treatment on dark ground */
#engine.engine .eng-card {
  background: var(--local-paper);
  border: 1px solid var(--local-rule);
  color: var(--local-ink);
  box-shadow:
    0 1px 0 rgba(0,0,0,0.4),
    0 2px 8px rgba(0,0,0,0.35),
    0 24px 48px -28px rgba(0,0,0,0.55),
    inset 0 1px 0 rgba(255,255,255,0.04);
}
#engine.engine .eng-card:hover {
  box-shadow:
    0 1px 0 rgba(0,0,0,0.4),
    0 6px 14px rgba(0,0,0,0.45),
    0 34px 60px -28px rgba(0,0,0,0.65),
    inset 0 1px 0 rgba(255,255,255,0.05);
}
#engine.engine .eng-card-big { color: var(--local-ink); }
#engine.engine .eng-card-body { color: var(--local-muted); }
#engine.engine .eng-card-watermark { color: var(--local-soft); opacity: 0.18; }
#engine.engine .eng-italic { color: var(--accent); }
#engine.engine .eng-foot { color: var(--local-muted); border-color: var(--local-rule); }

/* NVIDIA mark — invert on dark */
#engine.engine .eng-nvidia {
  background: rgba(242,236,220,0.06);
  border-color: var(--local-rule);
}
#engine.engine .eng-nvidia:hover {
  background: rgba(242,236,220,0.1);
}
#engine.engine .eng-nvidia-logo g[fill="#1a1712"] path { fill: var(--local-ink); }
#engine.engine .shift-pill {
  background: rgba(242,236,220,0.08);
  border-color: var(--local-rule);
  color: var(--local-ink);
}

/* Integrations section — keep on light but give everything proper elevation */
.integrations { background: var(--paper); }
.feat-card {
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s, box-shadow 0.25s;
}
.feat-card:hover {
  box-shadow: var(--shadow-md);
}
.feat-logo-tile {
  box-shadow: var(--shadow-xs), inset 0 1px 0 rgba(255,255,255,0.6);
}
.feat-logo-tile:hover {
  box-shadow: var(--shadow-sm);
}

/* Final CTA already dark — upgrade its shadow discipline + hero button */
.final {
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), inset 0 -1px 0 rgba(0,0,0,0.4);
}
.final .btn-lg {
  box-shadow:
    0 1px 0 rgba(255,255,255,0.08),
    0 14px 28px -12px rgba(0,0,0,0.5);
}

/* Logo tiles, bios and engine chips get a unified shadow scale */
.logo-tile { box-shadow: var(--shadow-xs); }
.logo-tile:hover { box-shadow: var(--shadow-md); }

/* Section seams — replace hard rules with soft edges between light sections */
section + section { border-top: 1px solid var(--rule-soft); }
section.section-dark + section,
section + section.section-dark,
#engine.engine + section,
section + #engine.engine { border-top: 0; }

/* Accent emphasis in dark sections */
section.section-dark .text-accent,
#engine.engine .text-accent,
#engine.engine em { color: var(--accent); }

/* Engine section — dark ground takes over; drop the warm wash */
.engine {
  background: #17130E;
}

/* Hero: settle the big shift-roster with a soft divider shadow under the cta */
.shift-cta { position: relative; }

/* Cards-as-paper: engine links + bios + ts-panel all share a quiet elevation */
.eng-nvidia { box-shadow: var(--shadow-sm); }
.eng-nvidia:hover { box-shadow: var(--shadow-md); }

/* ===== Typewriter + reveal (Slack mocks) ===== */
.tw { white-space: pre-wrap; }
.tw-caret {
  display: inline-block;
  width: 2px;
  height: 1em;
  background: #1d1c1d;
  margin-left: 1px;
  vertical-align: -0.15em;
  animation: twBlink 0.9s steps(2, end) infinite;
}
@keyframes twBlink { 0%, 50% { opacity: 1; } 50.01%, 100% { opacity: 0; } }

.sl-reveal {
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 240ms ease-out, transform 240ms ease-out;
}
.sl-reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* Hide caret once both messages done */
.tw-done .tw-caret { display: none; }

@media (prefers-reduced-motion: reduce) {
  .sl-reveal { opacity: 1; transform: none; transition: none; }
  .tw-caret { display: none; }
}

/* ===== Mobile polish ===== */
@media (max-width: 560px) {
  /* Hero: tighter top spacing, headline fits 2 lines, roster single-line items */
  .hero-shift {
    padding-top: 36px;
    padding-bottom: 48px;
    min-height: 0;
  }
  .shift-headline {
    font-size: 42px;
    letter-spacing: -0.028em;
    line-height: 1.02;
  }
  .shift-body {
    font-size: 15px;
    line-height: 1.5;
    margin-top: 24px;
  }
  .shift-roster {
    font-size: 14px;
    margin-top: 28px;
    gap: 6px;
  }
  .shift-roster li {
    white-space: nowrap;
    overflow: hidden;
  }
  .shift-roster b { font-size: 1.02em; }
  .shift-cta { margin-top: 32px; }
}

/* Team: inline mock panel beneath its own employee on mobile */
.ts-panel-inline { display: none; }
@media (max-width: 960px) {
  .ts-sidebar { gap: 0; }
  .ts-panel-inline {
    display: block;
    margin: 14px 0 28px;
  }
  .ts-panel-inline .ts-panel {
    margin-bottom: 14px;
  }
  .ts-panel-wrap-desktop { display: none; }
}

/* Case studies: small gap between the trigger card and inner cards on mobile */
@media (max-width: 760px) {
  .case-panel-inner { padding: 18px 22px 32px; }
}
