/* =========================================================================
   Arkwright Systems — Design tokens
   ========================================================================= */
:root {
  /* Core */
  --color-bg: #ffffff;
  --color-bg-subtle: #f5f5f4;
  --color-bg-warm: #faf7f2;
  --color-black: #020108;          /* eternal dark surface — nav pill, primary CTA */
  --color-ink: #020108;            /* primary ink — flips in dark mode */
  --color-ink-soft: rgba(2,1,8,0.06);  /* hairlines, subtle fills */

  /* Text */
  --color-text-primary: #020108;
  --color-text-secondary: #8a8a8a;
  --color-text-tertiary: #b8b8b8;

  /* Borders */
  --color-border: #e5e5e5;
  --color-border-strong: #020108;

  /* Accent — single point only */
  --color-accent: #fd7b03;
  --color-accent-hover: #e66d00;
  --color-accent-soft: #fff1e3;

  /* Secondary — app UI status only */
  --color-blue:   #3a54ff;
  --color-purple: #7a67c5;
  --color-teal:   #48a3d1;

  /* Type */
  --font-display: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Inter', sans-serif;
  --font-mono:    'SF Mono', ui-monospace, 'JetBrains Mono', Menlo, monospace;

  /* Spacing */
  --space-1: 4px;   --space-2: 8px;   --space-3: 12px;  --space-4: 16px;
  --space-5: 24px;  --space-6: 32px;  --space-7: 48px;  --space-8: 64px;
  --space-9: 96px;  --space-10: 128px;--space-11: 160px;--space-12: 200px;

  /* Radii */
  --radius-sm: 8px;  --radius-md: 16px; --radius-lg: 24px;
  --radius-xl: 32px; --radius-2xl: 48px;
  --radius-pill: 999px;

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --duration-fast: 200ms;
  --duration-base: 400ms;
  --duration-slow: 800ms;

  /* Reveal animation tokens */
  --reveal-duration: 700ms;
  --reveal-distance: 14px;
  --reveal-ease: cubic-bezier(0.16, 1, 0.3, 1);

  /* Shadows */
  --shadow-soft:     0 4px 24px rgba(2, 1, 8, 0.04);
  --shadow-card:     0 8px 32px rgba(2, 1, 8, 0.06);
  --shadow-elevated: 0 16px 48px rgba(2, 1, 8, 0.08);
}

/* ---------- Dark mode ---------- */
[data-theme="dark"] {
  --color-bg: #020108;
  --color-bg-subtle: #0f0d12;
  --color-bg-warm: #100d0a;
  --color-ink: #ffffff;
  --color-ink-soft: rgba(255,255,255,0.07);
  --color-text-primary: #ffffff;
  --color-text-secondary: rgba(255,255,255,0.5);
  --color-text-tertiary: rgba(255,255,255,0.32);
  --color-border: rgba(255,255,255,0.09);
  --color-border-strong: #ffffff;
  --shadow-soft:     0 4px 24px rgba(0, 0, 0, 0.5);
  --shadow-card:     0 8px 32px rgba(0, 0, 0, 0.6);
  --shadow-elevated: 0 16px 48px rgba(0, 0, 0, 0.7);
}
[data-theme="dark"] body { background: var(--color-bg); color: var(--color-text-primary); }

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-display);
  background: var(--color-bg);
  color: var(--color-text-primary);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.5;
  overflow-x: hidden;
  transition: background var(--duration-base) var(--ease-out), color var(--duration-base) var(--ease-out);
}

button { font-family: inherit; cursor: pointer; }
a { color: inherit; }

.container { max-width: 1440px; margin: 0 auto; padding: 0 var(--space-7); }
@media (max-width: 720px) {
  .container { padding: 0 var(--space-5); }
}

/* =========================================================================
   Top chrome: wordmark + nav pill + CTA
   ========================================================================= */
.top-chrome {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px var(--space-7);
  pointer-events: none;
}
.top-chrome > * { pointer-events: auto; }

/* Pin nav pill to true viewport center, independent of the wordmark/CTA
   widths around it — so the dropdown panel underneath can share its x-axis. */
.top-chrome .nav-pill {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
}

.wordmark {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-display);
  font-size: 16px; font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--color-text-primary);
  text-decoration: none;
}
.wordmark .glyph {
  width: 36px; height: 36px;
  border: 1.5px solid var(--color-ink);
  border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 700; line-height: 1;
}
.wordmark sup {
  font-size: 9px;
  color: var(--color-text-tertiary);
  margin-left: 2px;
  font-weight: 400;
}

.nav-pill {
  background: var(--color-black);
  color: white;
  border-radius: var(--radius-pill);
  display: flex;
  align-items: stretch;
  height: 56px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}
[data-theme="dark"] .nav-pill {
  background: #161318;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}
[data-theme="dark"] .cta-pill {
  background: #ffffff;
  color: #020108;
}
[data-theme="dark"] .cta-pill:hover {
  background: var(--color-accent);
  color: white;
}
.nav-segment {
  padding: 0 22px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  background: transparent;
  color: white;
  border: none;
  letter-spacing: -0.005em;
  transition: background var(--duration-fast) var(--ease-out);
}
.nav-segment:hover { background: rgba(255,255,255,0.07); }
.nav-segment + .nav-segment { border-left: 1px solid rgba(255,255,255,0.12); }
.nav-icon {
  width: 18px; height: 18px;
  stroke: currentColor; fill: none;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.nav-percent {
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  padding: 6px 12px;
  background: rgba(255,255,255,0.08);
  border-radius: var(--radius-pill);
}

.cta-pill {
  background: var(--color-black);
  color: white;
  border: none;
  border-radius: var(--radius-pill);
  padding: 16px 28px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  letter-spacing: -0.005em;
  transition: background var(--duration-fast) var(--ease-out);
  text-decoration: none;
  display: inline-flex; align-items: center; gap: 8px;
  line-height: 1;
}
.cta-pill:hover { background: var(--color-accent); }

.cta-pill.secondary {
  background: transparent;
  color: var(--color-text-primary);
  border: 1.5px solid var(--color-border);
}
.cta-pill.secondary:hover {
  border-color: var(--color-ink);
  background: transparent;
}

.cta-ghost {
  background: transparent;
  color: var(--color-text-secondary);
  padding: 14px 0;
  border: none;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  transition: color var(--duration-fast) var(--ease-out);
}
.cta-ghost:hover { color: var(--color-text-primary); }

/* Section labels */
.section-label {
  font-size: 14px;
  color: var(--color-text-secondary);
  letter-spacing: -0.005em;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  position: relative;
}
.section-label::before {
  content: '';
  display: inline-block;
  width: 7px;
  height: 7px;
  background: var(--color-accent);
  border-radius: 50%;
  flex: none;
  position: relative;
  z-index: 1;
}
.section-label::after {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-accent);
  transform: translateY(-50%);
  animation: dot-pulse 2.4s ease-out infinite;
  pointer-events: none;
  z-index: 0;
}
@keyframes dot-pulse {
  0%   { opacity: 0.55; transform: translateY(-50%) scale(1);   }
  70%  { opacity: 0;    transform: translateY(-50%) scale(2.8); }
  100% { opacity: 0;    transform: translateY(-50%) scale(2.8); }
}
@media (prefers-reduced-motion: reduce) {
  .section-label::after { animation: none; opacity: 0; }
}

/* Headlines */
.headline {
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.0;
  color: var(--color-text-primary);
}
.headline .muted { color: var(--color-text-secondary); }

.h-display-xl { font-size: clamp(56px, 8vw, 132px); letter-spacing: -0.04em; line-height: 0.92; }
.h-display-lg { font-size: clamp(48px, 6.5vw, 96px); letter-spacing: -0.035em; line-height: 0.95; }
.h-display-md { font-size: clamp(40px, 5vw, 72px); letter-spacing: -0.03em; line-height: 0.98; }
.h-h1         { font-size: clamp(36px, 4.5vw, 56px); letter-spacing: -0.025em; line-height: 1.05; }
.h-h2         { font-size: clamp(28px, 3.2vw, 40px); letter-spacing: -0.02em; line-height: 1.1; }
.h-h3         { font-size: 22px; letter-spacing: -0.015em; line-height: 1.2; font-weight: 600; }

.lede {
  font-size: clamp(18px, 1.4vw, 22px);
  color: var(--color-text-secondary);
  line-height: 1.45;
  max-width: 680px;
  letter-spacing: -0.005em;
  text-wrap: pretty;
}

.section {
  padding: clamp(var(--space-9), 10vw, var(--space-12)) 0;
  position: relative;
}
.section + .section { border-top: 1px solid var(--color-border); }
.section.subtle { background: var(--color-bg-subtle); }
.section.warm   { background: var(--color-bg-warm); }
.section.dark {
  background: #020108;
  color: white;
}
.section.dark .section-label,
.section.dark .lede { color: rgba(255,255,255,0.5); }
.section.dark .headline { color: white; }
.section.dark .headline .muted { color: rgba(255,255,255,0.4); }

.section-index {
  position: absolute;
  top: var(--space-9);
  right: var(--space-7);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--color-text-tertiary);
  letter-spacing: 0.04em;
}
@media (max-width: 900px) { .section-index { display: none; } }

/* =========================================================================
   Section 1 — Hero
   ========================================================================= */
.hero {
  padding-top: 140px;
  padding-bottom: var(--space-8);
  position: relative;
}
.hero-eyebrow {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-5);
  flex-wrap: wrap;
  margin-bottom: var(--space-7);
}
.hero-eyebrow .hero-eyebrow-mono {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--color-text-tertiary);
  letter-spacing: 0.06em;
  display: flex;
  gap: var(--space-5);
  flex-wrap: wrap;
}
.hero-headline {
  font-size: clamp(48px, 7.8vw, 116px);
  letter-spacing: -0.045em;
  line-height: 0.95;
  margin-bottom: var(--space-7);
  text-wrap: balance;
}
.hero-bottom {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: var(--space-7);
  align-items: end;
  margin-bottom: var(--space-7);
}
@media (max-width: 900px) { .hero-bottom { grid-template-columns: 1fr; gap: var(--space-5); } }
.hero-stage {
  width: 100%;
  height: clamp(420px, 58vh, 680px);
  border-radius: var(--radius-2xl);
  overflow: hidden;
  position: relative;
  background: var(--color-bg-subtle);
  border: 1px solid var(--color-border);
}

/* Before/after slider */
.beforeafter {
  width: 100%; height: 100%;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-2xl);
  user-select: none;
  cursor: ew-resize;
  background: #2a2a2a;
}
.beforeafter .ba-side {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
}
.beforeafter .ba-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.beforeafter .ba-after-wrap {
  clip-path: inset(0 0 0 var(--ba-pos, 50%));
}
.beforeafter .ba-tag {
  position: absolute;
  top: 24px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.85);
  background: rgba(0,0,0,0.4);
  padding: 6px 12px;
  border-radius: 4px;
  backdrop-filter: blur(8px);
  z-index: 2;
  pointer-events: none;
}
.beforeafter .ba-tag.before { left: 24px; }
.beforeafter .ba-tag.after { right: 24px; }

.beforeafter .ba-divider {
  position: absolute;
  top: 0; bottom: 0;
  left: var(--ba-pos, 50%);
  width: 1px;
  background: white;
  transform: translateX(-0.5px);
  pointer-events: none;
  z-index: 3;
}
.beforeafter .ba-handle {
  position: absolute;
  top: 50%;
  left: var(--ba-pos, 50%);
  transform: translate(-50%, -50%);
  width: 56px; height: 56px;
  border-radius: var(--radius-pill);
  background: white;
  border: 1.5px solid #020108;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 32px rgba(0,0,0,0.35);
  z-index: 4;
  cursor: ew-resize;
  transition: transform var(--duration-fast) var(--ease-out);
}
.beforeafter .ba-handle:hover { transform: translate(-50%, -50%) scale(1.05); }
.beforeafter .ba-handle svg {
  width: 22px; height: 22px;
  stroke: #020108;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.beforeafter .ba-caption {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.7);
  z-index: 2;
  pointer-events: none;
  text-align: center;
}

/* Hero bottom text */
.hero-text {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: var(--space-7);
  align-items: end;
}
@media (max-width: 900px) { .hero-text { grid-template-columns: 1fr; } }

.hero-headline { margin-bottom: var(--space-6); }
.hero-subhead {
  color: var(--color-text-secondary);
  font-size: clamp(17px, 1.3vw, 20px);
  line-height: 1.45;
  margin-bottom: var(--space-6);
  max-width: 540px;
  text-wrap: pretty;
}
.hero-cta-row {
  display: flex; align-items: center; gap: var(--space-5);
  flex-wrap: wrap;
  margin-bottom: var(--space-3);
}

.hero-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--color-text-tertiary);
  letter-spacing: 0.04em;
  display: grid;
  gap: var(--space-2);
  background: var(--color-bg-subtle);
  border-radius: var(--radius-xl);
  padding: var(--space-5) var(--space-6);
}
.hero-meta .row { display: flex; justify-content: space-between; gap: var(--space-4); }
.hero-meta strong {
  color: var(--color-text-primary);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: -0.005em;
}

/* =========================================================================
   Hero variant — constellation
   ========================================================================= */
.hero-constellation {
  position: absolute; inset: 0;
  background: var(--color-bg);
  overflow: hidden;
}
.hero-constellation::before {
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(circle, var(--color-ink-soft) 1px, transparent 1px);
  background-size: 28px 28px;
}
.constellation-thumbs {
  position: absolute; inset: 0;
}
.const-thumb {
  position: absolute;
  border-radius: 28% / 32%;
  background-size: cover; background-position: center;
  box-shadow: var(--shadow-card);
}
.const-center {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 140px; height: 140px;
  background: var(--color-bg);
  border: 1.5px solid var(--color-border);
  border-radius: 28% / 32%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-elevated);
  z-index: 2;
}
.const-center svg { width: 32px; height: 32px; stroke: var(--color-text-secondary); fill: none; stroke-width: 1.5; }

/* Hero variant — single */
.hero-single {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: #1a1a1a;
  overflow: hidden;
}
.hero-single svg { width: 100%; height: 100%; }
.hero-single .ba-caption { color: rgba(255,255,255,0.8); }

/* =========================================================================
   Split-text hover — per-character. Each char has two stacked copies inside
   a 1em-tall overflow:hidden box. On parent hover the inner translates by
   -50% so the second copy slides up. Per-char stagger is set inline as
   transition-delay so characters animate sequentially.
   ========================================================================= */
.split-text {
  display: inline-block;
  vertical-align: middle;
  line-height: 1;
}
.split-text-char {
  display: inline-block;
  overflow: hidden;
  height: 1em;
  line-height: 1;
  vertical-align: top;
}
.split-text-inner {
  display: block;
  transition: transform 420ms cubic-bezier(0.65, 0, 0.35, 1);
  will-change: transform;
}
.split-text-line {
  display: block;
  height: 1em;
  line-height: 1;
}
/* Trigger swap on hover/focus of the closest interactive ancestor.
   Each interactive container that should drive the swap is listed here. */
.cta-pill:hover .split-text-inner,
.cta-pill:focus-visible .split-text-inner,
.cta-ghost:hover .split-text-inner,
.cta-ghost:focus-visible .split-text-inner,
.nav-cta:hover .split-text-inner,
.btn:hover .split-text-inner,
.btn:focus-visible .split-text-inner,
.case-link:hover .split-text-inner,
.component-tile:hover .split-text-inner,
.env-tile:hover .split-text-inner,
.stage-card:hover .split-text-inner,
.role-card:hover .split-text-inner,
.case-mini:hover .split-text-inner {
  transform: translateY(-50%);
}

/* =========================================================================
   Section 2 redesign — vendor sprawl diagram → Arkwright
   ========================================================================= */
.cat-stage {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: var(--space-7);
  align-items: end;
  margin-bottom: var(--space-9);
}
@media (max-width: 900px) { .cat-stage { grid-template-columns: 1fr; } }

.cat-stage h2 {
  font-size: clamp(40px, 5vw, 72px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.0;
  margin-top: var(--space-4);
}
.cat-stage h2 .muted { color: var(--color-text-secondary); }
.cat-stage .cat-body {
  display: flex; flex-direction: column;
  gap: var(--space-4);
  color: var(--color-text-secondary);
  font-size: 17px;
  line-height: 1.5;
  max-width: 520px;
  text-wrap: pretty;
}

.cat-diagram {
  position: relative;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-2xl);
  padding: var(--space-8) var(--space-7);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: var(--space-7);
  align-items: center;
  min-height: 540px;
  /* overflow visible so chips can spill past their column edges */
  overflow: visible;
}
[data-theme="dark"] .cat-diagram { background: var(--color-bg-subtle); }
@media (max-width: 900px) {
  .cat-diagram { grid-template-columns: 1fr; gap: var(--space-7); }
}

.cat-diagram::before {
  /* Faint engineering dot grid behind the sprawl */
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(circle, var(--color-ink-soft) 1px, transparent 1px);
  background-size: 24px 24px;
  opacity: 0.55;
  pointer-events: none;
  z-index: 0;
}

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

.cat-corner {
  position: absolute;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--color-text-tertiary);
  letter-spacing: 0.06em;
  z-index: 2;
}
.cat-corner.tl { top: var(--space-4); left: var(--space-5); }
.cat-corner.tr { top: var(--space-4); right: var(--space-5); }
.cat-corner.bl { bottom: var(--space-4); left: var(--space-5); }
.cat-corner.br { bottom: var(--space-4); right: var(--space-5); }

/* Vendor sprawl — scattered chips at varying rotations */
.vendor-column {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  position: relative;
}
.vendor-question {
  display: flex;
  flex-direction: column;
  gap: 4px;
  /* Default — fading back in (toggle off): wait for CTA to clear, then come in */
  transition: opacity 0.22s var(--ease-out) 0.22s;
}
.cat-diagram.consolidated .vendor-question {
  opacity: 0;
  pointer-events: none;
  /* Fading out (toggle on): slightly slower, no delay */
  transition: opacity 0.45s var(--ease-out);
}
.vendor-question p {
  font-size: clamp(26px, 2.8vw, 38px);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.1;
  color: var(--color-text-primary);
  text-wrap: balance;
}
.vendor-question .muted { color: var(--color-text-secondary); }
.cat-diagram.consolidated .vendor-question {
  opacity: 0;
  pointer-events: none;
}

.vendor-sprawl {
  position: relative;
  height: 560px;
  user-select: none;
  -webkit-user-select: none;
}

/* CTA that fades in when chips fade out */
.vendor-cta {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  text-align: left;
  padding: var(--space-7) var(--space-6);
  gap: var(--space-4);
  opacity: 0;
  pointer-events: none;
  /* Default — fading OUT (toggle off): fast, no delay so chips can return */
  transition: opacity 0.18s var(--ease-out);
  max-width: 480px;
}
.cat-diagram.consolidated .vendor-cta {
  opacity: 1;
  pointer-events: auto;
  /* Fading IN (toggle on): slow with delay for drama */
  transition: opacity 0.55s var(--ease-out) 0.5s;
}
.vendor-cta h3 {
  font-size: clamp(48px, 6vw, 92px);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 0.95;
  text-wrap: balance;
  color: var(--color-text-primary);
}
.vendor-cta p {
  color: var(--color-text-secondary);
  font-size: 17px;
  line-height: 1.45;
  max-width: 420px;
  text-wrap: pretty;
}
.vendor-cta .cta-pill {
  margin-top: var(--space-3);
}
.vendor-reset { display: none; }

/* Before / After Arkwright toggle (classic switch) */
.cat-switch-wrap {
  align-self: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  position: relative;
  z-index: 5;
}
.cat-switch-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--color-text-tertiary);
  letter-spacing: 0.06em;
  margin-bottom: 2px;
  text-align: center;
  line-height: 1.4;
}
.cat-switch {
  position: relative;
  width: 72px;
  height: 40px;
  border-radius: var(--radius-pill);
  background: var(--color-border);
  border: none;
  cursor: pointer;
  padding: 4px;
  transition: background 0.3s var(--ease-out);
  display: block;
}
.cat-switch:hover { background: var(--color-text-tertiary); }
.cat-switch.on { background: var(--color-accent); }
.cat-switch.on:hover { background: var(--color-accent-hover); }
.cat-switch-thumb {
  display: block;
  width: 32px;
  height: 32px;
  background: #ffffff;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0,0,0,0.18);
  transition: transform 0.35s cubic-bezier(0.65, 0, 0.35, 1);
}
.cat-switch.on .cat-switch-thumb { transform: translateX(32px); animation: none; }

/* Subtle "nudge me" animation while in Before state */
@keyframes thumb-nudge {
  0%, 60%, 100% { transform: translateX(0); }
  22%          { transform: translateX(8px); }
  36%          { transform: translateX(0); }
}
.cat-switch:not(.on) .cat-switch-thumb {
  animation: thumb-nudge 3.4s ease-in-out 1.2s infinite;
}
@keyframes switch-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(120,120,120,0); }
  30%      { box-shadow: 0 0 0 8px rgba(120,120,120,0.22); }
  60%      { box-shadow: 0 0 0 0 rgba(120,120,120,0); }
}
.cat-switch:not(.on) {
  animation: switch-glow 3.4s ease-in-out 1.2s infinite;
}
@media (prefers-reduced-motion: reduce) {
  .cat-switch:not(.on) .cat-switch-thumb,
  .cat-switch:not(.on) { animation: none !important; }
}

.cat-switch-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.005em;
  text-align: center;
  position: relative;
  height: 1.4em;
  line-height: 1.4em;
  overflow: hidden;
  width: 140px;
}
.cat-switch-label span {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  color: var(--color-text-secondary);
  transition:
    transform 0.35s var(--ease-out),
    opacity 0.35s var(--ease-out),
    color 0.35s var(--ease-out);
  transform: translateY(0);
  opacity: 0;
}
.cat-switch-label span.active {
  color: var(--color-text-primary);
  opacity: 1;
}
.cat-switch-label span:nth-child(1):not(.active) { transform: translateY(-100%); opacity: 0; }
.cat-switch-label span:nth-child(2):not(.active) { transform: translateY(100%); opacity: 0; }

/* Result tile — activates when consolidated */
.cat-result {
  transition:
    box-shadow 0.6s var(--ease-out),
    transform 0.6s var(--ease-out);
}
.cat-diagram.consolidated .cat-result {
  box-shadow:
    0 0 0 1.5px var(--color-accent),
    0 24px 56px rgba(253, 123, 3, 0.22);
  transform: translateY(-2px);
}

.cat-result .result-list li {
  position: relative;
  padding-left: 12px;
  opacity: 0.55;
  transition:
    opacity 0.45s var(--ease-out),
    padding-left 0.4s var(--ease-out);
}
.cat-result .result-list li strong { color: rgba(255,255,255,0.55); transition: color 0.45s var(--ease-out); }
.cat-result .result-list li span { transition: color 0.45s var(--ease-out); }
.cat-result .result-list li::after {
  content: '';
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: var(--color-accent);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.45s var(--ease-out);
}
.cat-diagram.consolidated .cat-result .result-list li {
  opacity: 1;
}
.cat-diagram.consolidated .cat-result .result-list li strong { color: white; }
.cat-diagram.consolidated .cat-result .result-list li::after { transform: scaleY(1); }
/* Per-row stagger — same chain for opacity + bar */
.cat-diagram.consolidated .result-list li:nth-child(1) { transition-delay: 0.55s; }
.cat-diagram.consolidated .result-list li:nth-child(2) { transition-delay: 0.65s; }
.cat-diagram.consolidated .result-list li:nth-child(3) { transition-delay: 0.75s; }
.cat-diagram.consolidated .result-list li:nth-child(4) { transition-delay: 0.85s; }
.cat-diagram.consolidated .result-list li:nth-child(5) { transition-delay: 0.95s; }
.cat-diagram.consolidated .result-list li:nth-child(6) { transition-delay: 1.05s; }
.cat-diagram.consolidated .result-list li:nth-child(1)::after { transition-delay: 0.55s; }
.cat-diagram.consolidated .result-list li:nth-child(2)::after { transition-delay: 0.65s; }
.cat-diagram.consolidated .result-list li:nth-child(3)::after { transition-delay: 0.75s; }
.cat-diagram.consolidated .result-list li:nth-child(4)::after { transition-delay: 0.85s; }
.cat-diagram.consolidated .result-list li:nth-child(5)::after { transition-delay: 0.95s; }
.cat-diagram.consolidated .result-list li:nth-child(6)::after { transition-delay: 1.05s; }

/* Also dim the headline + meta in the result tile when idle */
.cat-result h3 {
  opacity: 0.5;
  transition: opacity 0.45s var(--ease-out);
}
.cat-diagram.consolidated .cat-result h3 { opacity: 1; transition-delay: 0.4s; }
.cat-result .result-mark {
  opacity: 0.6;
  transition: opacity 0.45s var(--ease-out);
}
.cat-diagram.consolidated .cat-result .result-mark { opacity: 1; transition-delay: 0.4s; }

/* Accent dot — pulse when consolidated */
.cat-result .result-accent {
  position: absolute;
  top: 32px;
  right: 32px;
  bottom: auto;
  width: 10px;
  height: 10px;
  background: rgba(255,255,255,0.25);
  border-radius: 50%;
  transition: background 0.5s var(--ease-out);
}
.cat-diagram.consolidated .cat-result .result-accent {
  background: var(--color-accent);
  animation: result-accent-pulse 1.8s ease-out 1.4s infinite;
}
@keyframes result-accent-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(253,123,3,0.55); }
  70%  { box-shadow: 0 0 0 14px rgba(253,123,3,0); }
  100% { box-shadow: 0 0 0 0 rgba(253,123,3,0); }
}

.vendor-chip {
  position: absolute;
  padding: 7px 12px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-primary);
  white-space: nowrap;
  letter-spacing: -0.005em;
  box-shadow: var(--shadow-soft);
  display: inline-flex; align-items: center; gap: 7px;
  cursor: grab;
  transform: rotate(var(--chip-rot, 0deg)) scale(var(--chip-scale, 1));
  transform-origin: center center;
  /* Default — chip is coming BACK in (toggle off): snappy */
  transition:
    transform 0.3s var(--ease-out),
    opacity 0.3s var(--ease-out),
    box-shadow var(--duration-fast) var(--ease-out);
  touch-action: none;
}
.cat-diagram.consolidated .vendor-chip {
  /* Going to consolidated — fade out slower */
  transition:
    transform 0.55s var(--ease-out),
    opacity 0.55s var(--ease-out);
}
.vendor-chip:hover { z-index: 2; box-shadow: var(--shadow-card); }
.vendor-chip.dragging {
  cursor: grabbing;
  box-shadow: 0 16px 48px rgba(0,0,0,0.22);
}
.vendor-chip.hidden { cursor: default; }
.vendor-chip .vc-mono {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--color-text-tertiary);
  letter-spacing: 0.04em;
}
[data-theme="dark"] .vendor-chip { background: #15131a; }

/* The Arkwright tile */
.cat-result {
  background: var(--color-black);
  color: white;
  border-radius: var(--radius-xl);
  padding: var(--space-7) var(--space-6) var(--space-6);
  display: flex; flex-direction: column;
  gap: var(--space-3);
  position: relative;
  overflow: hidden;
  min-height: 280px;
}
.cat-result .result-mark {
  display: flex; align-items: center; gap: 10px;
  font-size: 14px; font-weight: 600;
  letter-spacing: -0.005em;
}
.cat-result .result-mark .glyph {
  width: 28px; height: 28px;
  border: 1.25px solid rgba(255,255,255,0.6);
  border-radius: 7px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
}
.cat-result h3 {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-top: var(--space-3);
  margin-bottom: var(--space-2);
}
.cat-result .result-list {
  list-style: none;
  display: flex; flex-direction: column;
  gap: 8px;
  margin-top: var(--space-3);
}
.cat-result .result-list li {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: rgba(255,255,255,0.65);
  display: flex; justify-content: space-between;
  border-bottom: 1px dashed rgba(255,255,255,0.1);
  padding-bottom: 6px;
}
.cat-result .result-list li:last-child { border-bottom: none; }
.cat-result .result-list strong {
  color: white;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: -0.005em;
}

.cat-closing {
  font-size: clamp(28px, 3.4vw, 48px);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.1;
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
  margin-top: var(--space-9);
}
/* =========================================================================
   Inline body link — orange wipe-in hover (left → right)
   Apply with class .link-wipe to any <a> that should get this treatment.
   ========================================================================= */
.link-wipe {
  position: relative;
  display: inline-block;
  text-decoration: none;
  color: var(--color-text-secondary);
  background-image: linear-gradient(
    to right,
    var(--color-accent) 0%,
    var(--color-accent) 50%,
    currentColor 50%,
    currentColor 100%
  );
  background-size: 220% 100%;
  background-position: 100% 0;
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: background-position 600ms cubic-bezier(0.65, 0, 0.35, 1);
}
.link-wipe::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  bottom: -3px;
  height: 1.5px;
  background-image: linear-gradient(
    to right,
    var(--color-accent) 0%,
    var(--color-accent) 50%,
    currentColor 50%,
    currentColor 100%
  );
  background-size: 220% 100%;
  background-position: 100% 0;
  transition: background-position 600ms cubic-bezier(0.65, 0, 0.35, 1);
}
.link-wipe:hover,
.link-wipe:focus-visible {
  background-position: 0 0;
}
.link-wipe:hover::after,
.link-wipe:focus-visible::after {
  background-position: 0 0;
}

/* =========================================================================
   Section 3 — Six components
   ========================================================================= */
.section-head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-7);
  align-items: end;
  margin-bottom: var(--space-9);
}
.section-head .section-label { margin-bottom: var(--space-5); }
@media (max-width: 900px) { .section-head { grid-template-columns: 1fr; } }
.section-head .h-aside {
  color: var(--color-text-secondary);
  font-size: 17px;
  line-height: 1.5;
  text-wrap: pretty;
}

.components-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--color-border);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
}
@media (max-width: 900px) { .components-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .components-grid { grid-template-columns: 1fr; } }

.component-tile {
  background: var(--color-bg);
  padding: var(--space-7);
  display: flex; flex-direction: column;
  gap: var(--space-5);
  text-decoration: none;
  color: inherit;
  transition: background var(--duration-fast) var(--ease-out);
  min-height: 380px;
}
.component-tile:hover { background: var(--color-bg-subtle); }
.component-illo {
  height: 160px;
  background: var(--color-bg-subtle);
  border-radius: var(--radius-md);
  position: relative;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.component-illo-placeholder {
  display: block;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: transparent;
  border: 1.5px dashed var(--color-border);
  opacity: 0.7;
}
.component-tile h3 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.2;
  margin-bottom: var(--space-2);
}
.component-tile p {
  color: var(--color-text-secondary);
  font-size: 15px;
  line-height: 1.5;
  flex: 1;
  text-wrap: pretty;
}
.component-tile .meta-row {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: var(--space-4);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--color-text-tertiary);
  letter-spacing: 0.04em;
}
.component-tile .learn-more {
  color: var(--color-text-primary);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.005em;
  transition: color var(--duration-fast) var(--ease-out);
}
.component-tile:hover .learn-more { color: var(--color-accent); }

/* =========================================================================
   Section 4 — Environments (list explorer)
   ========================================================================= */
.env-explorer {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: var(--space-5);
  align-items: start;
}
@media (max-width: 1024px) { .env-explorer { grid-template-columns: 1fr; } }

.env-list {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-2xl);
  overflow: hidden;
  position: sticky;
  top: 100px;
  align-self: start;
}
.env-list-item {
  display: grid;
  grid-template-columns: 56px 1fr 24px;
  gap: var(--space-5);
  padding: var(--space-5) var(--space-6);
  align-items: center;
  cursor: pointer;
  border-bottom: 1px solid var(--color-border);
  transition:
    background var(--duration-fast) var(--ease-out),
    color var(--duration-fast) var(--ease-out);
  position: relative;
  outline: none;
}
.env-list-item:last-child { border-bottom: none; }
.env-list-item:hover,
.env-list-item.active {
  background: var(--color-accent);
  color: white;
}
.env-list-item:hover .env-list-num,
.env-list-item.active .env-list-num,
.env-list-item:hover .env-list-name,
.env-list-item.active .env-list-name,
.env-list-item:hover .env-list-arrow,
.env-list-item.active .env-list-arrow {
  color: white;
}
.env-list-item:hover .env-list-arrow,
.env-list-item.active .env-list-arrow {
  opacity: 1;
  transform: translateX(4px);
}

/* Right detail panel */
.env-detail {
  background: var(--color-bg-subtle);
  border-radius: var(--radius-2xl);
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  border: 1px solid var(--color-border);
  position: sticky;
  top: 100px;
}
.env-detail-photo {
  aspect-ratio: 5 / 4;
  border-radius: var(--radius-xl);
  overflow: hidden;
  position: relative;
}
.env-detail-photo image-slot { display: block; width: 100%; height: 100%; }
.env-detail-img { display: block; width: 100%; height: 100%; object-fit: cover; }
.env-detail-tag {
  position: absolute;
  top: 14px; left: 14px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: white;
  background: rgba(2,1,8,0.55);
  padding: 5px 10px;
  border-radius: 4px;
  backdrop-filter: blur(6px);
  z-index: 2;
}
.env-detail-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--color-text-tertiary);
  letter-spacing: 0.04em;
  padding: var(--space-3) 0;
  border-top: 1px dashed var(--color-border);
  border-bottom: 1px dashed var(--color-border);
}
.env-detail-meta strong {
  display: block;
  font-family: var(--font-display);
  color: var(--color-text-primary);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: -0.005em;
  margin-bottom: 2px;
}
.env-detail h3 {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.env-detail p {
  color: var(--color-text-secondary);
  font-size: 15px;
  line-height: 1.5;
  text-wrap: pretty;
}
.env-detail .env-detail-link {
  margin-top: auto;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-primary);
  text-decoration: none;
  display: inline-flex; align-items: center; gap: 6px;
  transition: color var(--duration-fast) var(--ease-out);
}
.env-detail .env-detail-link:hover { color: var(--color-accent); }

/* =========================================================================
   Section 5 — Stages / Journey
   ========================================================================= */
.stages-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-5);
}
@media (max-width: 900px) { .stages-grid { grid-template-columns: 1fr; } }

.stage-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-7);
  display: flex; flex-direction: column;
  gap: var(--space-5);
  text-decoration: none;
  color: inherit;
  transition: transform var(--duration-base) var(--ease-out), box-shadow var(--duration-base) var(--ease-out);
  min-height: 420px;
}
.stage-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-card); }
.stage-card .stage-illo {
  aspect-ratio: 16 / 10;
  background: var(--color-bg-subtle);
  border-radius: var(--radius-md);
  position: relative;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.stage-illo-placeholder {
  display: block;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: transparent;
  border: 1.5px dashed var(--color-border);
  opacity: 0.7;
}
.stage-card .stage-num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--color-text-tertiary);
  letter-spacing: 0.04em;
  display: flex; justify-content: space-between;
}
.stage-card h3 {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.018em;
  line-height: 1.15;
}
.stage-card p {
  color: var(--color-text-secondary);
  font-size: 15px;
  line-height: 1.5;
  flex: 1;
  text-wrap: pretty;
}
.stage-card .stage-link {
  color: var(--color-text-primary);
  font-weight: 500;
  font-size: 14px;
  margin-top: var(--space-2);
  transition: color var(--duration-fast) var(--ease-out);
}
.stage-card:hover .stage-link { color: var(--color-accent); }

.aside-trade {
  margin-top: var(--space-7);
  padding: var(--space-6) var(--space-7);
  background: var(--color-bg);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-xl);
  display: flex; align-items: center;
  gap: 36px;
  flex-wrap: nowrap;
}
.aside-trade .aside-title {
  font-size: clamp(20px, 1.9vw, 26px);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.15;
  color: var(--color-text-primary);
  white-space: nowrap;
  flex: none;
}
.aside-trade .aside-body {
  font-size: 15px;
  color: var(--color-text-secondary);
  line-height: 1.45;
  flex: 1;
  min-width: 0;
}
.aside-trade .aside-cta { flex: none; white-space: nowrap; }
@media (max-width: 900px) {
  .aside-trade {
    flex-wrap: wrap;
    gap: var(--space-5);
  }
  .aside-trade .aside-title { white-space: normal; }
}

/* =========================================================================
   Section 6 — Roles (with worship-band photo backdrop)
   This section is intentionally "fixed dark" — text and chrome stay the
   same in both light and dark mode since the photo background is always dark.
   ========================================================================= */
.roles-section {
  position: relative;
  overflow: hidden;
}
.roles-bg {
  position: absolute;
  inset: 0;
  background: url('roles-bg.jpg') center center / cover no-repeat;
  z-index: 0;
}
.roles-bg::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(2,1,8,0.62) 0%, rgba(2,1,8,0.42) 50%, rgba(2,1,8,0.55) 100%);
}
.roles-section > .container { position: relative; z-index: 1; }

/* Section header text reads on the dark photo — locked white regardless of theme */
.roles-section .section-label,
[data-theme="dark"] .roles-section .section-label { color: rgba(255,255,255,0.78); }
.roles-section .headline,
[data-theme="dark"] .roles-section .headline { color: #ffffff; }
.roles-section .headline .muted,
[data-theme="dark"] .roles-section .headline .muted { color: rgba(255,255,255,0.55); }
.roles-section .h-aside,
[data-theme="dark"] .roles-section .h-aside { color: rgba(255,255,255,0.75); }
.roles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--color-border);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
}
@media (max-width: 900px) { .roles-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .roles-grid { grid-template-columns: 1fr; } }

.role-card {
  background: var(--color-bg);
  padding: var(--space-7);
  display: flex; flex-direction: column;
  gap: var(--space-5);
  text-decoration: none;
  color: inherit;
  min-height: 240px;
  transition: background var(--duration-fast) var(--ease-out);
}
.role-card:hover { background: var(--color-bg-subtle); }
.role-card .role-meta {
  display: flex; justify-content: space-between; align-items: baseline;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--color-text-tertiary);
  letter-spacing: 0.04em;
}
.role-card .role-glyph {
  width: 40px; height: 40px;
  border: 1.25px solid var(--color-ink);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: var(--space-3);
}
.role-card h3 {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.2;
  margin-bottom: var(--space-2);
}
.role-card p {
  color: var(--color-text-secondary);
  font-size: 14px;
  line-height: 1.45;
  flex: 1;
  text-wrap: pretty;
}
.role-card .role-link {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-primary);
  margin-top: var(--space-3);
  transition: color var(--duration-fast) var(--ease-out);
}
.role-card:hover .role-link { color: var(--color-accent); }

/* =========================================================================
   Section 7 — Proof / Case studies
   ========================================================================= */
.proof-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: var(--space-5);
}
@media (max-width: 900px) { .proof-grid { grid-template-columns: 1fr; } }

.case-feature {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-2xl);
  overflow: hidden;
  display: flex; flex-direction: column;
}
.case-feature .case-photo {
  aspect-ratio: 16 / 9;
  background-size: cover; background-position: center;
  background: var(--color-bg-subtle);
  position: relative;
  overflow: hidden;
}
.case-photo-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.case-feature .case-photo image-slot { display: block; width: 100%; height: 100%; }
.case-feature .case-body {
  padding: var(--space-7);
  display: flex; flex-direction: column;
  gap: var(--space-5);
}
.case-feature .case-meta {
  display: flex; justify-content: space-between; align-items: baseline;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--color-text-tertiary);
  letter-spacing: 0.04em;
}
.case-feature .case-meta strong {
  color: var(--color-text-primary);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.005em;
}
.case-feature .case-quote {
  font-size: clamp(20px, 1.8vw, 26px);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.3;
  color: var(--color-text-primary);
  text-wrap: pretty;
}
.case-feature .case-quote::before {
  content: '"';
  font-size: 1.2em;
  line-height: 0;
  color: var(--color-text-tertiary);
  margin-right: 2px;
}
.case-feature .case-quote::after { content: '"'; color: var(--color-text-tertiary); }
.case-feature .case-attr {
  font-size: 13px;
  color: var(--color-text-secondary);
}
.case-feature .case-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-primary);
  margin-top: var(--space-3);
  text-decoration: none;
  display: inline-flex; align-items: center; gap: 6px;
  align-self: flex-start;
  transition: color var(--duration-fast) var(--ease-out);
}
.case-feature .case-link:hover { color: var(--color-accent); }

.case-list {
  display: flex; flex-direction: column;
  gap: var(--space-5);
}
.case-mini {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-5) var(--space-6);
  display: flex; flex-direction: column;
  gap: var(--space-3);
  text-decoration: none;
  color: inherit;
  transition: transform var(--duration-base) var(--ease-out);
  flex: 1;
  min-height: 140px;
  justify-content: space-between;
}
.case-mini:hover { transform: translateY(-2px); }
.case-mini .mini-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--color-text-tertiary);
  letter-spacing: 0.04em;
}
.case-mini h4 {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.012em;
  line-height: 1.25;
  margin-bottom: var(--space-1);
}
.case-mini p {
  font-size: 14px;
  color: var(--color-text-secondary);
  line-height: 1.45;
  text-wrap: pretty;
}

.proof-footer {
  margin-top: var(--space-7);
  text-align: center;
}

/* =========================================================================
   Section 8 — Promise / pillars
   ========================================================================= */
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
}
@media (max-width: 900px) { .pillars-grid { grid-template-columns: 1fr; } }

.pillar {
  padding: var(--space-7);
  display: flex; flex-direction: column;
  gap: var(--space-4);
}
.pillar + .pillar { border-left: 1px solid var(--color-border); }
@media (max-width: 900px) {
  .pillar + .pillar { border-left: none; border-top: 1px solid var(--color-border); }
}
.pillar .pillar-icon {
  width: 48px; height: 48px;
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: var(--space-3);
}
.pillar-icon-placeholder {
  display: block;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: transparent;
  border: 1.5px dashed var(--color-border);
  opacity: 0.7;
}
.pillar h3 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.2;
  margin-bottom: var(--space-1);
}
.pillar p {
  color: var(--color-text-secondary);
  font-size: 15px;
  line-height: 1.5;
  text-wrap: pretty;
}

/* =========================================================================
   Section 9 — Vision close (theme-aware, photo backdrop)
   ========================================================================= */
.vision-section {
  padding: clamp(var(--space-10), 11vw, var(--space-12)) 0;
  position: relative;
  overflow: hidden;
}
.vision-bg {
  position: absolute;
  inset: 0;
  background: url('vision-bg.jpg') center center / cover no-repeat;
  z-index: 0;
}
[data-theme="dark"] .vision-bg::after {
  /* Only the dark-mode variant gets a slight tint so the dark frame reads */
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(2,1,8,0.35) 0%, rgba(2,1,8,0.5) 100%);
}
.vision-section > .container { position: relative; z-index: 1; }

.vision-frame {
  position: relative;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-2xl);
  padding: clamp(48px, 6vw, 96px) clamp(32px, 5vw, 80px);
  text-align: center;
  overflow: hidden;
}
[data-theme="dark"] .vision-frame { background: var(--color-bg-subtle); }
.vision-frame::before {
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(circle, var(--color-ink-soft) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0.5;
  pointer-events: none;
}
.vision-frame > * { position: relative; z-index: 1; }

.vision-eyebrow {
  display: inline-flex !important;
  margin: 0 auto var(--space-6);
}

.vision-headline {
  font-size: clamp(40px, 5.2vw, 84px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.05;
  max-width: 1100px;
  margin: 0 auto var(--space-6);
  text-wrap: balance;
  color: var(--color-text-primary);
}
.vision-headline .muted { color: var(--color-text-secondary); }

.vision-body {
  font-size: clamp(17px, 1.3vw, 21px);
  color: var(--color-text-secondary);
  line-height: 1.5;
  max-width: 780px;
  margin: 0 auto var(--space-9);
  text-wrap: pretty;
}

.vision-routing {
  max-width: 980px;
  margin: 0 auto;
  position: relative;
}

.vision-origin {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--color-text-secondary);
  letter-spacing: 0.04em;
  position: relative;
  z-index: 2;
}
[data-theme="dark"] .vision-origin { background: var(--color-bg-subtle); }
.vision-origin-dot {
  width: 8px; height: 8px;
  background: var(--color-accent);
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 0 4px rgba(253,123,3,0.18);
}

.vision-tree {
  display: block;
  width: 100%;
  height: auto;
  color: var(--color-text-tertiary);
  margin-top: -4px;
  margin-bottom: var(--space-3);
}
@media (max-width: 720px) { .vision-tree { display: none; } }

.vision-paths {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
}
@media (max-width: 720px) { .vision-paths { grid-template-columns: 1fr; gap: var(--space-3); } }

.vision-path {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  text-align: left;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  transition: transform var(--duration-base) var(--ease-out), border-color var(--duration-base) var(--ease-out);
}
.vision-path:hover {
  transform: translateY(-3px);
  border-color: var(--color-text-primary);
}
.vision-path.featured {
  background: var(--color-text-primary);
  border-color: var(--color-text-primary);
  color: var(--color-bg);
}
.vision-path.featured h3 { color: var(--color-bg); }
.vision-path.featured p { color: var(--color-bg); opacity: 0.65; }
.vision-path.featured .vp-code { color: var(--color-bg); opacity: 0.45; }
.vision-path.featured:hover {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: white;
}
.vision-path.featured:hover h3 { color: white; }
.vision-path.featured:hover p,
.vision-path.featured:hover .vp-code { color: white; opacity: 0.7; }

.vp-code {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--color-text-tertiary);
  letter-spacing: 0.06em;
}
.vision-path h3 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.018em;
  line-height: 1.2;
  color: var(--color-text-primary);
}
.vision-path p {
  font-size: 14px;
  color: var(--color-text-secondary);
  line-height: 1.45;
  flex: 1;
  text-wrap: pretty;
}
.vp-arrow {
  font-size: 14px;
  font-weight: 500;
  margin-top: var(--space-2);
}

.vision-footer {
  margin-top: var(--space-8);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
}
.vision-footer .vision-cta {
  font-size: 16px;
  padding: 18px 32px;
}
.vision-footer-or {
  font-size: 14px;
  color: var(--color-text-secondary);
}

/* =========================================================================
   Section 10 — Footer
   ========================================================================= */
.site-footer {
  padding: var(--space-9) var(--space-7) var(--space-7);
  border-top: 1px solid var(--color-border);
}
.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: var(--space-7);
  padding-bottom: var(--space-8);
  border-bottom: 1px solid var(--color-border);
}
@media (max-width: 900px) {
  .footer-top { grid-template-columns: repeat(2, 1fr); gap: var(--space-6); }
  .footer-top > :first-child { grid-column: 1 / -1; }
}
.footer-brand .wordmark { margin-bottom: var(--space-4); }
.footer-brand p {
  color: var(--color-text-secondary);
  font-size: 14px;
  line-height: 1.5;
  max-width: 360px;
  text-wrap: pretty;
}
.footer-col h5 {
  font-size: 13px;
  font-weight: 500;
  margin-bottom: var(--space-4);
  color: var(--color-text-primary);
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: var(--space-3); }
.footer-col a {
  color: var(--color-text-secondary);
  text-decoration: none;
  font-size: 14px;
  transition: color var(--duration-fast) var(--ease-out);
}
.footer-col a:hover { color: var(--color-text-primary); }
.footer-bottom {
  padding-top: var(--space-6);
  display: flex; justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-4);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--color-text-tertiary);
  letter-spacing: 0.04em;
}

/* Image-slot defaults — give them a non-white placeholder look */
image-slot { display: block; width: 100%; height: 100%; }

/* Misc */
.divider-line {
  height: 1px;
  background: var(--color-border);
  margin: 0;
}

/* =========================================================================
   Reveal animations (page-load + scroll-into-view)
   ========================================================================= */
[data-reveal],
[data-reveal-item] {
  opacity: 0;
  transform: translateY(var(--reveal-distance));
  transition:
    opacity var(--reveal-duration) var(--reveal-ease) var(--reveal-delay, 0ms),
    transform var(--reveal-duration) var(--reveal-ease) var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}
[data-reveal].is-revealed,
[data-reveal-item].is-revealed {
  opacity: 1;
  transform: translateY(0);
}
/* When reduced motion is requested, skip everything */
html.reveal-static [data-reveal],
html.reveal-static [data-reveal-item] {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}

/* =========================================================================
   Menu drawer (overlay + panel)
   ========================================================================= */
.menu-overlay {
  position: fixed; inset: 0;
  z-index: 50;
  background: transparent;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--duration-base) var(--ease-out);
}
.menu-overlay.open {
  opacity: 1;
  pointer-events: auto;
}
[data-theme="dark"] .menu-overlay {
  background: transparent;
}

.menu-drawer {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translate(-50%, -16px);
  width: clamp(340px, 30vw, 440px);
  max-height: calc(100vh - 32px);
  background: var(--color-bg-subtle);
  border-radius: 28px;
  z-index: 60;
  /* The page's centered nav pill (top:24px, height:56px) sits over this
     panel's top — pad top enough to clear it. */
  padding: 104px 28px 28px;
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  overflow-y: auto;
  opacity: 0;
  pointer-events: none;
  transition:
    transform var(--duration-base) var(--ease-out),
    opacity var(--duration-base) var(--ease-out);
  box-shadow: var(--shadow-elevated);
}
[data-theme="dark"] .menu-drawer {
  background: #0a080d;
  border: 1px solid rgba(255,255,255,0.06);
}
.menu-drawer.open {
  transform: translate(-50%, 0);
  opacity: 1;
  pointer-events: auto;
}
@media (max-width: 600px) {
  .menu-drawer {
    width: calc(100vw - 32px);
    padding: 96px 24px 24px;
  }
}

/* (No embedded pill — the page's top-chrome pill sits over the drawer top.) */

/* Section headers inside the drawer */
.menu-section {
  display: flex;
  flex-direction: column;
}
.menu-section-label {
  font-size: 13px;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-3);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.menu-section-label::before {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  background: currentColor;
  border-radius: 50%;
  opacity: 0.5;
  flex: none;
}

/* Primary menu links — large editorial type, but narrower than the
   left-drawer version since this is a centered column. */
.menu-primary {
  display: flex; flex-direction: column;
  gap: var(--space-3);
}
.menu-primary a {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--color-text-primary);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-out), transform var(--duration-fast) var(--ease-out);
  position: relative;
  width: fit-content;
  display: inline-flex; align-items: baseline; gap: 10px;
}
.menu-primary a:hover {
  color: var(--color-accent);
  transform: translateX(3px);
}
.menu-primary .menu-meta {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--color-text-tertiary);
  letter-spacing: 0.06em;
  font-weight: 400;
}

.menu-divider {
  height: 1px;
  background: var(--color-border);
  margin: var(--space-4) 0;
}

/* Secondary link groups */
.menu-secondary {
  display: flex; flex-direction: column;
  gap: var(--space-2);
}
.menu-secondary a {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 500;
  color: var(--color-text-primary);
  text-decoration: none;
  letter-spacing: -0.005em;
  transition: color var(--duration-fast) var(--ease-out);
  width: fit-content;
}
.menu-secondary a:hover { color: var(--color-accent); }

.menu-footer {
  margin-top: var(--space-3);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding-top: var(--space-5);
  border-top: 1px solid var(--color-border);
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--color-text-tertiary);
  letter-spacing: 0.06em;
}
.menu-footer .menu-contact {
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--color-text-secondary);
  letter-spacing: -0.005em;
  text-decoration: none;
}
.menu-footer .menu-contact:hover { color: var(--color-accent); }

/* When menu is open keep the wordmark + CTA visible — only the menu drops down.
   (Removed earlier fade so the page reads as normal behind the dropdown.) */
