/* ==========================================================================
   Actura — home
   ========================================================================== */

:root {
  --paper: #FBFBFD;
  --white: #FFFFFF;
  --mist: #F2F1F8;
  --lilac: #E7E2FF;
  --ink: #17152B;
  --graphite: #5D5A70;
  --quiet: #8C89A0;
  --violet: #6246EA;
  --violet-deep: #4B32C9;
  --night: #110E26;
  --night-2: #1B1738;
  --line: rgba(23, 21, 43, 0.09);
  --line-dark: rgba(255, 255, 255, 0.1);

  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --wrap: 1320px;
  --gutter: clamp(20px, 4vw, 56px);
  --section: clamp(96px, 14vw, 200px);

  --shadow-lift:
    0 1px 2px rgba(35, 20, 110, 0.05),
    0 8px 24px -8px rgba(35, 20, 110, 0.12),
    0 40px 80px -32px rgba(35, 20, 110, 0.22);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure, pre { margin: 0; }
ul, ol { padding: 0; list-style: none; }
code, pre { font-family: var(--mono); }
p code, .graph__summary code, .panel__head code {
  font-size: 0.86em;
  padding: 0.1em 0.35em;
  border-radius: 5px;
  background: var(--mist);
}
.dark p code { background: rgba(255,255,255,0.08); color: #D9D2FF; }

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

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

.wrap { width: 100%; max-width: calc(var(--wrap) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
.muted { color: var(--quiet); }

/* Type ------------------------------------------------------------------ */
.h2 {
  font-size: clamp(34px, 4.6vw, 64px);
  line-height: 1.04;
  letter-spacing: -0.028em;
  font-weight: 500;
  max-width: 16ch;
  text-wrap: balance;
}
.link {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 500;
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
  transition: color .3s var(--ease);
}
.link:hover { color: var(--violet); }
.dark .link:hover { color: #B9A8FF; }

/* Buttons --------------------------------------------------------------- */
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  height: 54px; padding: 0 28px;
  border-radius: 999px;
  font-weight: 500; font-size: 16px; letter-spacing: -0.005em;
  white-space: nowrap;
  transition: background-color .35s var(--ease), color .35s var(--ease), box-shadow .35s var(--ease), transform .35s var(--ease);
}
.btn--sm { height: 42px; padding: 0 20px; font-size: 15px; }
.btn--dark {
  background: #161616; color: var(--white);
  box-shadow: 0 1px 0 rgba(255,255,255,.12) inset, 0 10px 24px -12px rgba(0,0,0,.45);
}
.btn--dark:hover { background: #2B2B2B; transform: translateY(-1px); }
.btn--ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.btn--ghost:hover { box-shadow: inset 0 0 0 1px var(--ink); }
.btn--icon { padding-right: 7px; gap: 14px; }
.btn__icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 999px;
  background: #161616; color: var(--white); font-size: 18px;
  transition: transform .45s var(--ease), background-color .35s var(--ease);
}
.btn__icon svg { width: 1em; height: 1em; }
.btn--icon:hover .btn__icon { background: var(--violet); transform: rotate(45deg); }
.btn--light { background: var(--white); color: var(--night); }
.btn--light:hover { background: var(--lilac); }

/* Nav ------------------------------------------------------------------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  transition: background-color .4s var(--ease), box-shadow .4s var(--ease), transform .5s var(--ease);
}
.nav.is-scrolled {
  background: rgba(251, 251, 253, 0.78);
  backdrop-filter: saturate(1.6) blur(18px);
  -webkit-backdrop-filter: saturate(1.6) blur(18px);
}
.nav.is-hidden { transform: translateY(-100%); }
.nav.is-dark { color: var(--white); background: rgba(17, 14, 38, 0.72); }
.nav.is-dark .nav__links, .nav.is-dark .nav__signin { color: #B7B2D6; }
.nav.is-dark .nav__links a:hover, .nav.is-dark .nav__signin:hover { color: var(--white); }
.nav.is-dark .btn--dark { background: var(--white); color: #161616; }
.nav.is-dark .btn--dark:hover { background: #E8E8E8; }
.nav__inner { display: flex; align-items: center; height: 76px; gap: 40px; }
.wordmark { font-size: 22px; font-weight: 600; letter-spacing: -0.03em; }
.wordmark { display: inline-flex; align-items: center; gap: 8px; }
.mark { width: 28px; height: 28px; flex: none; }
.nav__links { display: flex; gap: 32px; margin-left: auto; font-size: 15px; color: var(--graphite); }
.nav__links a, .nav__signin { display: inline-flex; align-items: center; gap: 7px; transition: color .25s; }
.nav__links .icon, .nav__signin .icon { font-size: 18px; opacity: .75; }
.nav__links a:hover { color: var(--ink); }
.nav__actions { display: flex; align-items: center; gap: 22px; font-size: 15px; }
.nav__signin { color: var(--graphite); }
.nav__signin:hover { color: var(--ink); }

/* Hero ------------------------------------------------------------------ */
.hero { position: relative; isolation: isolate; padding-top: clamp(128px, 13vw, 176px); }
.hero__bg {
  position: absolute; inset: 0 0 auto 0; height: min(1100px, 120vh);
  z-index: -1; pointer-events: none; overflow: hidden;
}
.hero__grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, rgba(23, 21, 43, 0.085) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(23, 21, 43, 0.085) 1px, transparent 1px);
  background-size: 72px 72px;
  background-position: center top;
  -webkit-mask-image: radial-gradient(ellipse 60% 55% at 50% 30%, #000 0%, rgba(0,0,0,.5) 45%, transparent 80%);
          mask-image: radial-gradient(ellipse 60% 55% at 50% 30%, #000 0%, rgba(0,0,0,.5) 45%, transparent 80%);
}
.blob {
  position: absolute; border-radius: 50%;
  opacity: .8;
  animation: drift 22s ease-in-out infinite alternate;
}
.blob--lilac { width: 560px; height: 460px; left: 8%; top: 4%; background: radial-gradient(closest-side, #DCD3FF, rgba(220,211,255,0)); }
.blob--peach { width: 460px; height: 400px; right: 10%; top: 12%; animation-duration: 26s; animation-delay: -6s; background: radial-gradient(closest-side, #FFE1D2, rgba(255,225,210,0)); }
.blob--sky { width: 520px; height: 420px; left: 38%; top: 38%; background: radial-gradient(closest-side, #D4ECFF, rgba(212,236,255,0)); opacity: .75; animation-duration: 30s; animation-delay: -12s; }
@keyframes drift {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(40px, -30px, 0) scale(1.08); }
  100% { transform: translate3d(-30px, 20px, 0) scale(.96); }
}
@media (max-width: 720px) {
  .hero__grid { background-size: 48px 48px; -webkit-mask-image: radial-gradient(ellipse 90% 50% at 50% 25%, #000 0%, transparent 80%); mask-image: radial-gradient(ellipse 90% 50% at 50% 25%, #000 0%, transparent 80%); }
  .blob--lilac { width: 320px; height: 280px; left: -20%; }
  .blob--peach { width: 280px; height: 240px; right: -20%; }
  .blob--sky { width: 300px; height: 260px; left: 10%; top: 30%; }
}
.hero__title {
  font-size: clamp(40px, 6.4vw, 100px);
  line-height: 0.98;
  letter-spacing: -0.036em;
  font-weight: 500;
}
/* Designed line breaks on wide screens; natural wrapping on narrow ones */
.hl { display: block; overflow: hidden; padding-bottom: 0.08em; margin-bottom: -0.08em; white-space: nowrap; }
.hl__in { display: inline-block; }
@media (max-width: 899px) {
  .hl { display: inline; overflow: visible; white-space: normal; padding: 0; margin: 0; }
  .hl__in { display: inline; }
}
.hero__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 48px;
  align-items: end;
  margin-top: clamp(36px, 4vw, 56px);
}
.hero__lede { max-width: 52ch; font-size: clamp(17px, 1.35vw, 19px); color: var(--graphite); }
.hero__cta { display: grid; gap: 14px; justify-items: start; }
.hero__note { font-size: 14px; color: var(--quiet); }

.stage {
  position: relative;
  margin: clamp(56px, 6vw, 88px) auto 0;
  width: calc(100% - var(--gutter) * 2);
  max-width: 1560px;
  padding: clamp(12px, 2.4vw, 40px) clamp(16px, 5vw, 80px);
  border-radius: clamp(20px, 2.6vw, 36px);
  background: #F5F5F8;
  overflow: hidden;
  isolation: isolate;
  will-change: transform;
}
.stage__glow {
  position: absolute; inset: auto -10% -40% -10%; height: 70%;
  background: radial-gradient(50% 50% at 50% 50%, rgba(255,255,255,.7), transparent 70%);
  z-index: -1; pointer-events: none;
}
.stage__frame {
  border-radius: clamp(8px, 1vw, 14px);
  overflow: hidden;
  background: var(--white);
}
.stage__frame img { width: 100%; height: auto; }

/* How it works ---------------------------------------------------------- */
.how { padding: var(--section) 0 calc(var(--section) * .6); }
.how__head {
  display: grid; grid-template-columns: 7fr 5fr; gap: clamp(32px, 6vw, 96px);
  align-items: end; margin-bottom: clamp(48px, 6vw, 80px);
}
.how__head .h2 { max-width: 15ch; }
.how__head p { color: var(--graphite); max-width: 42ch; justify-self: end; }

.how__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.card {
  grid-column: span 5;
  position: relative;
  display: flex; flex-direction: column;
  min-height: 600px;
  padding: 28px;
  border-radius: 28px;
  background: #F4F4F7;
  overflow: hidden;
  isolation: isolate;
}
.card--wide { grid-column: span 7; }
.card__label {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 16px; font-weight: 500; color: var(--ink);
}
.card__label .icon { font-size: 22px; color: var(--graphite); }
.card__art {
  position: relative; flex: none;
  margin: 24px -28px 0 0;
  height: 320px;
  -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent 100%), linear-gradient(to right, #000 78%, transparent 100%);
  -webkit-mask-composite: source-in;
          mask-image: linear-gradient(to bottom, #000 55%, transparent 100%), linear-gradient(to right, #000 78%, transparent 100%);
          mask-composite: intersect;
}
.card__text { position: relative; margin-top: auto; padding-top: 24px; }
.card__text h3 {
  font-size: clamp(22px, 1.9vw, 28px);
  line-height: 1.18; letter-spacing: -0.022em; font-weight: 500;
  max-width: 22ch;
}
.card__text p { margin-top: 10px; color: var(--graphite); font-size: 16px; max-width: 46ch; }

/* Vignettes: small pieces of product UI inside each card */
.vig {
  position: absolute;
  background: var(--white);
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(23, 21, 43, .04), 0 12px 32px -12px rgba(23, 21, 43, .12);
}
.vig__bar {
  display: flex; justify-content: space-between; gap: 12px;
  font-size: 13px; font-weight: 500;
  padding: 14px 18px; box-shadow: 0 1px 0 var(--line);
}
.vig__bar .muted { font-family: var(--mono); font-size: 12px; font-weight: 400; }

.vig--editor { left: 0; top: 0; width: 560px; overflow: hidden; }
.vig--editor .vig__bar { padding: 12px 18px; background: #FCFCFD; box-shadow: none; }
.crumb { display: inline-flex; align-items: center; gap: 8px; font-weight: 400; color: var(--quiet); }
.crumb i { font-style: normal; color: #CFCCDB; }
.crumb b { font-family: var(--mono); font-size: 12px; font-weight: 500; color: var(--ink); }
.saved { font-size: 12px; font-weight: 400; color: var(--quiet); }
.code {
  counter-reset: ln;
  padding: 10px 0 14px;
  font-family: var(--mono); font-size: 12.5px; line-height: 1.6;
}
.code li { white-space: pre; }
.code li {
  counter-increment: ln;
  position: relative;
  padding: 0 20px 0 44px;
  min-height: 1.5em;
}
.code li::before {
  content: counter(ln);
  position: absolute; left: 0; width: 26px; text-align: right;
  color: #C9C6D6; font-size: 11.5px;
}
.code .is-active { background: linear-gradient(90deg, rgba(98, 70, 234, .07), rgba(98, 70, 234, 0) 85%); }
.code .is-active::before { color: var(--violet); }
.code .v { color: var(--ink); }
.code .f { color: var(--violet); }
.code .t { color: #C2410C; }
.code .k { color: #1D4ED8; font-weight: 500; }
.code .s { color: #047857; }
.code .n { color: #B45309; }
.code .o { color: #9A97AC; }
.code .caret {
  display: inline-block; width: 1.5px; height: 1.15em; margin-left: 2px;
  background: var(--violet); vertical-align: -0.2em;
  animation: blink 1.1s steps(1) infinite;
}

.vig--bases { right: 40px; top: 150px; width: 250px; padding: 16px; }
.vig__title { font-size: 13px; font-weight: 500; margin: 0 4px 10px; }
.vig--bases ul { display: grid; gap: 4px; }
.vig--bases li {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 12px; border-radius: 10px; font-size: 14px; color: var(--graphite);
}
.vig--bases li i { width: 16px; height: 16px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px rgba(23,21,43,.2); }
.vig--bases li.is-on { background: #F4F4F7; color: var(--ink); }
.vig--bases li.is-on i { box-shadow: inset 0 0 0 5px var(--violet); }

.vig--files { left: 0; top: 0; width: 440px; padding: 8px; }
.file {
  display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 10px; font-size: 14px;
}
.file + .file { box-shadow: 0 -1px 0 var(--line); }
.file .icon { font-size: 20px; color: var(--quiet); }
.file__name { font-family: var(--mono); font-size: 12.5px; color: var(--ink); }
.file__meta { font-size: 12.5px; color: var(--quiet); font-variant-numeric: tabular-nums; }
.file.is-uploading .icon { color: var(--violet); }
.file__bar { width: 90px; height: 5px; border-radius: 5px; background: #ECEBF2; overflow: hidden; }
.file__bar i { display: block; height: 100%; width: 100%; border-radius: 5px; background: var(--violet); transform: scaleX(.62); transform-origin: 0 50%; }
.vig--lookup {
  left: 36px; top: 250px; padding: 12px 16px;
  font-size: 12.5px; color: #3C3950; white-space: nowrap;
}
.vig--lookup b { color: var(--violet); font-weight: 500; }

.vig--table { left: 0; top: 0; width: 470px; overflow: hidden; }
.tbl__bar {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 13px 18px; font-size: 12.5px; background: #FCFCFD;
}
.tbl__name { font-size: 13px; font-weight: 500; color: var(--ink); }
.tbl {
  display: grid; grid-template-columns: 52px repeat(3, 1fr);
  padding: 6px 10px 14px;
  font-size: 13px; font-variant-numeric: tabular-nums;
}
.tbl__h { display: grid; gap: 3px; align-content: start; padding: 12px 10px 12px; }
.tbl__h span { font-weight: 500; color: var(--ink); }
.tbl__h em {
  justify-self: start;
  font-style: normal; font-family: var(--mono); font-size: 10.5px;
  padding: 3px 8px; border-radius: 999px;
  background: #F1EFF8; color: var(--graphite);
}
.tbl__h--slot { background: rgba(98, 70, 234, .035); }
.tbl__h--slot:not(.is-mapped) em { background: none; color: var(--violet); padding-left: 0; }
.tbl__h--slot.is-mapped em { background: var(--violet); color: var(--white); }
.tbl__c { padding: 9px 10px; text-align: right; color: var(--graphite); box-shadow: 0 -1px 0 rgba(23, 21, 43, 0.045); }
.tbl__c--y { text-align: left; color: var(--quiet); }
.tbl__c[data-fill] { color: var(--ink); background: rgba(98, 70, 234, .035); }

.vig--picker { left: 250px; top: 118px; width: 230px; padding: 8px; opacity: 0; visibility: hidden; }
.picker__search {
  font-family: var(--mono); font-size: 12px; color: var(--ink);
  padding: 9px 10px; border-radius: 9px; background: #F4F4F7;
}
.picker__search .caret {
  display: inline-block; width: 1.5px; height: 1.1em; margin-left: 1px;
  background: var(--violet); vertical-align: -0.2em; animation: blink 1.1s steps(1) infinite;
}
.vig--picker ul { display: grid; gap: 2px; margin-top: 6px; }
.vig--picker li {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 8px;
  font-family: var(--mono); font-size: 11.5px; color: var(--graphite);
}
.vig--picker li small { font-family: var(--sans); font-size: 11px; color: var(--quiet); }
.vig--picker li.is-hl { background: #EEEAFF; color: var(--violet-deep); }
.vig--picker li.is-hl small { color: var(--violet); }

/* Run card: monotone, one policy against the whole portfolio */
.card--dark { background: #121214; color: #F4F4F5; }
.card--dark .card__label, .card--dark .card__text h3 { color: #F4F4F5; }
.card--dark .card__label .icon { color: #8B8B93; }
.card--dark .card__text p { color: #8B8B93; }
.card--dark .card__art { -webkit-mask-image: none; mask-image: none; margin-right: 0; height: auto; }
.vig--run {
  position: relative; inset: auto; width: 100%; max-width: 600px;
  background: none; box-shadow: none; border-radius: 0; padding: 0;
}
.seg {
  position: relative; display: inline-grid; grid-template-columns: 1fr 1fr;
  padding: 3px; border-radius: 999px; background: rgba(255,255,255,.06);
}
.seg button {
  position: relative; z-index: 1;
  font: inherit; font-size: 13.5px; font-weight: 500;
  padding: 8px 16px; border: 0; border-radius: 999px; background: none;
  color: #8B8B93; cursor: pointer; transition: color .4s var(--ease);
}
.seg button:hover { color: #D4D4D8; }
.seg button[aria-selected="true"] { color: #121214; }
.seg__thumb {
  position: absolute; top: 3px; bottom: 3px; left: 3px; width: calc(50% - 3px);
  border-radius: 999px; background: #F4F4F5;
  transition: transform .55s var(--ease);
}
.seg[data-active="test"] .seg__thumb { transform: translateX(100%); }

.run__read {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  margin-top: 28px;
}
.run__read span { font-size: 13px; color: #8B8B93; }
.run__read b {
  font-size: 30px; font-weight: 400; letter-spacing: -0.02em; color: #F4F4F5;
  font-variant-numeric: tabular-nums;
}
.run__chart { display: block; width: 100%; height: auto; margin-top: 14px; overflow: visible; }
.run__base { stroke: rgba(255,255,255,.1); stroke-width: 1; }
.run__chart path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.run__one { stroke: #F4F4F5; stroke-width: 1.5; transition: opacity .5s var(--ease); }
.run__many path { stroke: #F4F4F5; stroke-width: 1; }
.run__agg { stroke: #F4F4F5; stroke-width: 2; opacity: 0; }
.run__head { stroke: rgba(255,255,255,.18); stroke-width: 1; stroke-dasharray: 2 3; }
.run__dot { fill: #121214; stroke: #F4F4F5; stroke-width: 1.5; }
[data-run][data-mode="prod"] .run__one,
[data-run][data-mode="prod"] .run__head,
[data-run][data-mode="prod"] .run__dot { opacity: 0; }
.run__head, .run__dot { transition: opacity .4s var(--ease); }
.run__axis {
  display: flex; justify-content: space-between; margin-top: 10px;
  font-size: 11.5px; color: #5E5E66; font-variant-numeric: tabular-nums;
}

@media (max-width: 1080px) {
  .how__head { grid-template-columns: 1fr; }
  .how__head p { justify-self: start; }
  .card, .card--wide { grid-column: span 12; }
}
@media (max-width: 720px) {
  .card { min-height: 0; padding: 22px; border-radius: 22px; }
  .card__art { margin-right: -22px; height: 270px; }
  .vig--editor { width: 470px; }
  .code { font-size: 12px; }
  .code li { padding-left: 38px; }
  .vig--bases { display: none; }
  .vig--files { width: 380px; }
  .vig--lookup { left: 16px; top: 200px; }
  .vig--table { width: 330px; }
  .tbl { grid-template-columns: 52px repeat(2, 1fr); }
  .tbl > :nth-child(4n+2) { display: none; }
  .vig--picker { left: 196px; top: 130px; }
  .card--dark .card__art { height: auto; }
}

/* Challenge ------------------------------------------------------------- */
.challenge { padding: calc(var(--section) * .6) 0 calc(var(--section) * .5); }
.challenge__grid { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(40px, 7vw, 120px); align-items: center; }
.challenge__photo { border-radius: 24px; overflow: hidden; aspect-ratio: 4 / 5; }
.challenge__photo img { width: 100%; height: 118%; object-fit: cover; object-position: 50% 30%; will-change: transform; }
.challenge__copy .h2 { max-width: 18ch; }
.challenge__scrub {
  margin-top: 40px;
  font-size: clamp(20px, 1.9vw, 27px);
  line-height: 1.42;
  letter-spacing: -0.015em;
  max-width: 34ch;
}
.challenge__scrub .word { opacity: .16; }
.challenge__resolve {
  margin-top: 36px;
  padding-left: 20px;
  border-left: 2px solid var(--violet);
  font-size: 18px; color: var(--ink); max-width: 44ch;
}

/* Platform -------------------------------------------------------------- */
.platform { background: var(--mist); padding-top: var(--section); }
.platform__title { max-width: 18ch; }
.platform__pin { padding: clamp(56px, 7vw, 96px) 0 var(--section); }
.platform__grid { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(40px, 7vw, 120px); align-items: center; }

.steps { display: grid; gap: 6px; }
.step { padding: 6px 0; cursor: default; }
.step__name {
  font-size: clamp(40px, 5vw, 76px);
  line-height: 1;
  letter-spacing: -0.034em;
  font-weight: 500;
  color: rgba(23, 21, 43, 0.14);
  transition: color .6s var(--ease);
}
.step.is-active .step__name { color: var(--ink); }
.step__body {
  max-width: 42ch; color: var(--graphite);
  max-height: 0; opacity: 0; overflow: hidden;
  transition: max-height .6s var(--ease), opacity .5s var(--ease), margin .6s var(--ease);
}
.step.is-active .step__body { max-height: 10em; opacity: 1; margin: 14px 0 18px; }
.step__visual { display: none; }

.intro [data-hero-title], .intro [data-hero-fade], .intro [data-stage] { visibility: hidden; }

.scenes { position: relative; display: grid; }
.scene {
  grid-area: 1 / 1;
  opacity: 0; visibility: hidden;
  transform: translateY(24px) scale(.985);
  transition: opacity .6s var(--ease), transform .8s var(--ease), visibility 0s linear .6s;
}
.scene.is-active {
  opacity: 1; visibility: visible; transform: none;
  transition: opacity .6s var(--ease) .1s, transform .8s var(--ease) .1s, visibility 0s;
}

.panel {
  background: var(--white);
  border-radius: 22px;
  padding: clamp(22px, 2.6vw, 36px);
  box-shadow: var(--shadow-lift);
  min-height: 460px;
}
.panel__head {
  display: flex; justify-content: space-between; gap: 16px;
  font-weight: 500; font-size: 15px;
  padding-bottom: 18px; margin-bottom: 18px;
  box-shadow: 0 1px 0 var(--line);
}

.tree { display: grid; gap: 2px; font-size: 16px; }
.tree__group { padding: 11px 14px; border-radius: 10px; color: var(--graphite); }
.tree__group.is-open { background: var(--mist); color: var(--ink); font-weight: 500; }
.tree__group ul { display: grid; gap: 2px; margin-top: 10px; font-weight: 400; }
.tree__group li { padding: 7px 12px; border-radius: 8px; font-size: 14px; color: var(--graphite); }
.tree__group li.is-hot { background: var(--white); color: var(--violet); box-shadow: 0 1px 2px rgba(35,20,110,.08); }

.runcfg { display: grid; gap: 0; font-size: 15px; }
.runcfg div { display: grid; grid-template-columns: 150px 1fr; gap: 16px; padding: 12px 0; box-shadow: 0 1px 0 var(--line); }
.runcfg dt { color: var(--quiet); }
.batches { display: grid; gap: 14px; margin-top: 28px; }
.batch { display: grid; grid-template-columns: 70px 1fr; align-items: center; gap: 16px; font-size: 13px; color: var(--quiet); }
.batch__bar { height: 8px; background: var(--mist); border-radius: 8px; overflow: hidden; }
.batch__bar i { display: block; height: 100%; width: 100%; background: var(--violet); border-radius: 8px; transform: scaleX(0); transform-origin: 0 50%; }

.trace { width: 100%; border-collapse: collapse; font-family: var(--mono); font-size: 13px; font-variant-numeric: tabular-nums; }
.trace th { text-align: left; font-weight: 500; color: var(--quiet); padding: 10px 8px; }
.trace th code { font-size: 12px; }
.trace td { padding: 12px 8px; box-shadow: 0 1px 0 var(--line); }
.trace .is-hot { color: var(--violet); background: rgba(98,70,234,.05); }
.snippet {
  margin-top: 24px; padding: 18px 20px;
  background: var(--mist); border-radius: 12px;
  font-size: 13px; line-height: 1.7; color: #7A4B1E;
}
.snippet b { color: var(--violet); font-weight: 500; }

.panel--photo { position: relative; padding: 0; overflow: hidden; }
.panel--photo img { width: 100%; height: 520px; object-fit: cover; object-position: 50% 28%; }
.roles {
  position: absolute; left: 16px; right: 16px; bottom: 16px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 2px;
  background: rgba(255,255,255,.82);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-radius: 16px; padding: 10px;
}
.roles li { padding: 10px 12px; display: grid; gap: 2px; font-size: 13px; line-height: 1.4; color: var(--graphite); }
.roles b { font-size: 15px; font-weight: 500; color: var(--ink); }

.diff { border-radius: 14px; background: var(--mist); padding: 16px; }
.diff__meta { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; margin-bottom: 12px; }
.diff pre { font-size: 13px; padding: 10px 12px; border-radius: 8px; white-space: pre-wrap; word-break: break-word; }
.diff__before { background: #FDECEE; color: #9B2C3A; text-decoration: line-through; text-decoration-color: rgba(155,44,58,.4); }
.diff__after { background: #E6F6EE; color: #1C6B45; margin-top: 6px; }
.ledger { margin-top: 18px; font-size: 14px; }
.ledger li { display: flex; justify-content: space-between; gap: 16px; padding: 13px 4px; box-shadow: 0 1px 0 var(--line); }

/* Dark sections --------------------------------------------------------- */
.dark { background: var(--night); color: #EDEBFA; }
.dark p { color: #A9A5C4; }

/* Compute modules ------------------------------------------------------- */
.modules { padding: calc(var(--section) * .5) 0; }
.modules__grid > * { min-width: 0; }
.modules__grid { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(40px, 7vw, 120px); align-items: center; }
.modules__copy { display: grid; gap: 20px; }
.modules__copy .h2 { max-width: 13ch; margin-bottom: 8px; }
.modules__copy p { color: var(--graphite); max-width: 44ch; }

.module { padding: 10px; border-radius: 28px; background: #F4F4F7; }
.module__tabs {
  position: relative; display: grid; grid-template-columns: repeat(4, 1fr);
  padding: 4px; border-radius: 999px; background: rgba(23, 21, 43, .045);
}
.module__tabs button {
  position: relative; z-index: 1;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-size: 14px; font-weight: 500;
  padding: 9px 12px; border: 0; border-radius: 999px; background: none;
  color: var(--graphite); cursor: pointer; transition: color .35s var(--ease);
}
.module__tabs button[aria-selected="true"] { color: var(--ink); }
.lang__logo { display: inline-flex; height: 16px; }
.lang__logo svg { height: 100%; width: auto; }
.module__tabs button:not([aria-selected="true"]) .lang__logo { filter: grayscale(1); opacity: .55; transition: opacity .35s, filter .35s; }
.module__thumb {
  position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(25% - 2px);
  border-radius: 999px; background: var(--white);
  box-shadow: 0 1px 2px rgba(23,21,43,.06), 0 4px 12px -4px rgba(23,21,43,.08);
  transform: translateX(calc(var(--i, 0) * 100%));
  transition: transform .55s var(--ease);
}

.module__editor { margin-top: 10px; border-radius: 20px; background: var(--white); overflow: hidden; }
.module__file {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 14px 20px 0; font-size: 12.5px;
}
.module__file span:first-child { font-family: var(--mono); font-size: 12px; color: var(--ink); }
.module__code {
  padding: 14px 20px 22px; min-height: 12.5em;
  font-size: 13px; line-height: 1.65; color: #3C3950;
  white-space: pre; overflow-x: auto;
}
.module__code code { display: block; transition: opacity .3s var(--ease), transform .4s var(--ease); }
.module__code code.is-swapping { opacity: 0; transform: translateY(4px); }
.module__code .k { color: #1D4ED8; }
.module__code .s { color: #047857; }
.module__code .n { color: #B45309; }
.module__code .c { color: #A3A0B5; }
.module__code .fn { color: var(--violet); }

.module__use { padding: 16px 12px 8px; }
.module__use-label { font-size: 12.5px; color: var(--quiet); margin: 0 8px 8px; }
.module__formula {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 12px 14px; border-radius: 14px; background: var(--white);
  font-family: var(--mono); font-size: 12.5px; color: var(--ink);
}
.module__var { padding: 4px 10px; border-radius: 999px; background: #F1EFF8; color: var(--graphite); font-size: 11.5px; }
.module__formula .f { color: var(--violet); }
.module__formula .o { color: #9A97AC; }
.module__formula .t { color: #C2410C; }

@media (max-width: 1080px) {
  .modules__grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .module__tabs button { font-size: 12.5px; padding: 8px 6px; gap: 6px; }
  .module__code {
    font-size: 11.5px;
    -webkit-mask-image: linear-gradient(to right, #000 72%, transparent 100%);
            mask-image: linear-gradient(to right, #000 72%, transparent 100%);
  }
  .module__tabs { grid-template-columns: repeat(3, 1fr); }
  .module__tabs [data-lang="js"] { display: none; }
  .module__thumb { width: calc((100% - 8px) / 3); }
}

/* Engine ---------------------------------------------------------------- */
.engine { padding: var(--section) 0; }
.engine__grid { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(40px, 7vw, 120px); align-items: center; }
.engine__copy { display: grid; gap: 22px; }
.engine__copy p { color: var(--graphite); max-width: 48ch; }
.cores {
  display: grid; gap: 10px;
  padding: clamp(22px, 2.6vw, 36px);
  background: var(--mist);
  border-radius: 22px;
}
.core { display: grid; grid-template-columns: 64px 1fr; gap: 16px; align-items: center; font-size: 13px; color: var(--quiet); }
.core__lane { display: flex; gap: 4px; height: 30px; }
.core__lane i {
  flex: 1; border-radius: 6px;
  background: var(--violet);
  transform: scaleY(0.12); transform-origin: 50% 100%;
  opacity: .18;
}
.cores__foot {
  display: flex; justify-content: space-between; margin-top: 14px; padding-top: 16px;
  box-shadow: 0 -1px 0 var(--line);
  font-size: 14px; color: var(--graphite); font-variant-numeric: tabular-nums;
}
.cores__foot b { color: var(--ink); font-weight: 600; }

/* Lineage --------------------------------------------------------------- */
.lineage { padding: var(--section) 0; background: var(--white); }
.lineage__head { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(40px, 7vw, 120px); align-items: end; }
.lineage__head p { color: var(--graphite); max-width: 52ch; }
.graph { position: relative; margin: clamp(56px, 7vw, 96px) 0 48px; }
.graph svg { width: 100%; height: auto; overflow: visible; }
.graph .edges path { stroke: #B9ADFF; }
.graph .edges path.soft { stroke: #DDD8F3; }
.graph .edges path.down { stroke: #8F7BFF; }
.graph text { font-family: var(--mono); font-size: 14px; text-anchor: middle; fill: var(--ink); }
.graph .n { fill: var(--white); stroke: var(--line); stroke: rgba(23,21,43,.12); }
.graph .n-ghost { fill: var(--mist); }
.graph .n-ghost + text { fill: var(--quiet); }
.graph .n-focus { fill: var(--violet); }
.graph .n-focus + text { fill: var(--white); font-weight: 500; font-size: 16px; }
.graph__summary {
  position: absolute; left: 34%; top: 72%;
  width: min(360px, 40%);
  background: var(--white);
  border-radius: 16px; padding: 18px 20px;
  box-shadow: var(--shadow-lift);
  font-size: 15px; line-height: 1.5; color: var(--graphite);
}
.graph__label { font-weight: 500; color: var(--ink); margin-bottom: 6px; }

/* Solutions ------------------------------------------------------------- */
.solutions { padding: calc(var(--section) * .5) 0; }
.solutions__title { max-width: 24ch; margin-bottom: clamp(48px, 6vw, 80px); }
.index { box-shadow: 0 -1px 0 var(--line); }
.index li { box-shadow: 0 1px 0 var(--line); }
.index a {
  position: relative;
  display: grid; grid-template-columns: 5fr 6fr 40px; gap: 32px; align-items: center;
  padding: clamp(24px, 3vw, 38px) 0;
  isolation: isolate;
}
.index a::before {
  content: ""; position: absolute; inset: 0 calc(var(--gutter) * -0.5);
  border-radius: 16px; background: var(--mist);
  transform: scaleY(.6); opacity: 0; z-index: -1;
  transition: transform .5s var(--ease), opacity .4s var(--ease);
}
.index a:hover::before, .index a:focus-visible::before { transform: none; opacity: 1; }
.index__name { font-size: clamp(26px, 2.8vw, 40px); letter-spacing: -0.03em; font-weight: 500; line-height: 1.1; }
.index__desc { color: var(--graphite); max-width: 46ch; }
.index .icon { justify-self: end; font-size: 26px; color: var(--quiet); transition: transform .5s var(--ease), color .3s; }
.index a:hover .icon { transform: translate(3px, -3px); color: var(--violet); }

.icon { display: inline-flex; width: 1em; height: 1em; }
.icon svg { width: 100%; height: 100%; }
.icon--lg { font-size: 30px; color: var(--ink); }

/* Demo ------------------------------------------------------------------ */
.demo { padding: var(--section) 0; position: relative; overflow: hidden; }
.demo::before {
  content: ""; position: absolute; inset: auto 40% -40% -20%; height: 90%;
  background: radial-gradient(50% 50% at 50% 50%, rgba(98,70,234,.28), transparent 70%);
  pointer-events: none;
}
.demo__grid { position: relative; display: grid; grid-template-columns: 5fr 7fr; gap: clamp(40px, 7vw, 120px); align-items: start; }
.demo__copy { display: grid; gap: 26px; justify-items: start; position: sticky; top: 120px; }
.demo__copy .h2 { color: var(--white); }
.demo__fine { font-size: 14px; color: #77739A !important; max-width: 44ch; }
.scope { display: grid; grid-template-columns: 1fr 1fr; gap: 0 clamp(28px, 4vw, 56px); }
.scope__col { padding: 28px 0; box-shadow: 0 1px 0 var(--line-dark); }
.scope__col:nth-child(-n+2) { box-shadow: 0 -1px 0 var(--line-dark), 0 1px 0 var(--line-dark); }
.scope h3 { font-size: 19px; font-weight: 500; color: var(--white); letter-spacing: -0.01em; margin-bottom: 10px; }
.scope p { font-size: 15px; line-height: 1.6; }

/* Deploy ---------------------------------------------------------------- */
.deploy { padding: calc(var(--section) * .5) 0 calc(var(--section) * .7); }
.deploy__title { max-width: 18ch; margin-bottom: clamp(48px, 6vw, 80px); }
.deploy__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(28px, 4vw, 64px); }
.option { display: grid; gap: 14px; align-content: start; }
.option h3 { font-size: 22px; font-weight: 500; letter-spacing: -0.02em; margin-top: 10px; }
.option p { color: var(--graphite); max-width: 36ch; }

/* Closing --------------------------------------------------------------- */
.closing { padding: calc(var(--section) * .5) 0 var(--section); }
.closing__card {
  position: relative;
  display: grid;
  padding-top: clamp(64px, 9vw, 140px);
  padding-bottom: clamp(64px, 9vw, 140px);
  border-radius: clamp(20px, 2.6vw, 36px);
  background:
    radial-gradient(90% 120% at 100% 0%, #CFC5FF 0%, rgba(207,197,255,0) 55%),
    radial-gradient(70% 90% at 0% 100%, #E9E4FF 0%, rgba(233,228,255,0) 60%),
    var(--mist);
  max-width: calc(var(--wrap) + var(--gutter) * 2 - var(--gutter) * 2);
  overflow: hidden;
}
.closing__copy { display: grid; gap: 24px; justify-items: start; padding: 0 clamp(8px, 4vw, 72px); }
.closing__title {
  font-size: clamp(44px, 7vw, 104px);
  line-height: .98;
  letter-spacing: -0.036em;
  font-weight: 500;
  max-width: 11ch;
}
.closing__copy > p:not(.hero__note) { font-size: 19px; color: var(--graphite); max-width: 40ch; }

/* Footer ---------------------------------------------------------------- */
.footer { padding: 0 0 40px; font-size: 15px; }
.footer__grid { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 32px; padding-top: 56px; box-shadow: 0 -1px 0 var(--line); }
.footer__brand p { color: var(--graphite); margin-top: 10px; max-width: 26ch; }
.footer__col { display: grid; gap: 10px; align-content: start; }
.footer__col h4 { font-size: 15px; font-weight: 500; margin-bottom: 6px; }
.footer__col a { color: var(--graphite); }
.footer__col a:hover { color: var(--ink); }
.footer__base { display: flex; justify-content: space-between; gap: 16px; margin-top: 72px; color: var(--quiet); font-size: 14px; }
.footer__base span:last-child { display: flex; gap: 24px; }

/* Responsive ------------------------------------------------------------ */
@media (max-width: 1080px) {
  .nav__links { display: none; }
  .nav__actions { margin-left: auto; }
  .hero__row { grid-template-columns: 1fr; gap: 32px; }
  .challenge__grid, .platform__grid, .engine__grid,
  .lineage__head, .demo__grid { grid-template-columns: 1fr; }
  .demo__copy { position: static; }
  .challenge__photo { aspect-ratio: 4 / 3; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
  .graph__summary { position: static; width: auto; margin-top: 24px; }

  /* Platform becomes a plain stack */
  .scenes { display: none; }
  .step { padding: 28px 0; box-shadow: 0 1px 0 var(--line); }
  .step__name { color: var(--ink); font-size: clamp(34px, 7vw, 52px); }
  .step__body { max-height: none; opacity: 1; margin: 12px 0 24px; }
  .step__visual { display: block; min-height: 0; }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  .nav__signin { display: none; }
  .stage { width: calc(100% - 24px); }
  .index a { grid-template-columns: 1fr 28px; gap: 10px 16px; }
  .index__desc { grid-column: 1; }
  .index .icon { grid-row: 1; grid-column: 2; }
  .scope { grid-template-columns: 1fr; }
  .scope__col:nth-child(2) { box-shadow: 0 1px 0 var(--line-dark); }
  .index__name { font-size: 22px; }
  .deploy__grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .option { gap: 8px; padding: 18px 16px 22px; border-radius: 20px; background: linear-gradient(to bottom, rgba(234,228,255,.5), rgba(234,228,255,0) 100%); }
  .option:nth-child(2) { background: linear-gradient(to bottom, rgba(255,231,218,.5), rgba(255,231,218,0) 100%); }
  .option:nth-child(3) { grid-column: 1 / -1; background: linear-gradient(to bottom, rgba(220,239,255,.5), rgba(220,239,255,0) 100%); }
  .option .icon--lg { font-size: 24px; }
  .option h3 { font-size: 16px; margin-top: 4px; }
  .option p { font-size: 14px; line-height: 1.5; }
  .closing__card { width: auto; margin: 0 16px; }
  .closing__copy { gap: 18px; }
  .closing__title { font-size: 38px; }
  .closing__copy > p:not(.hero__note) { font-size: 16px; }
  .closing .btn { height: 46px; padding: 0 20px; font-size: 14px; }
  .runcfg div { grid-template-columns: 1fr; gap: 2px; }
  .roles { grid-template-columns: 1fr; }
  .panel--photo img { height: 600px; }
  .graph { overflow-x: auto; margin-left: calc(var(--gutter) * -1); margin-right: calc(var(--gutter) * -1); padding: 0 var(--gutter); }
  .graph svg { min-width: 760px; }
  .footer__base { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation: none !important; }
  .challenge__scrub .word, .grid__c { opacity: 1 !important; }
}

/* Plain formula source before the script builds the numbered lines */
.code-src {
  padding: 10px 20px 14px;
  font-family: var(--mono); font-size: 12.5px; line-height: 1.6; color: #3C3950;
  white-space: pre;
}

/* Nav: section links, active state and mobile menu ---------------------- */
html { scroll-padding-top: 80px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
.nav__links a.is-active { color: var(--ink); }
.nav__links a.is-active .icon { opacity: 1; }

.nav__toggle {
  display: none;
  align-items: center; justify-content: center;
  width: 42px; height: 42px; padding: 0;
  border: 0; border-radius: 999px;
  background: rgba(23, 21, 43, .05); color: var(--ink);
  cursor: pointer; transition: background-color .3s var(--ease);
}
.nav__toggle:hover { background: rgba(23, 21, 43, .09); }
.nav__toggle .icon { font-size: 20px; }
.nav__toggle-close { display: none; }
.nav__toggle[aria-expanded="true"] .nav__toggle-open { display: none; }
.nav__toggle[aria-expanded="true"] .nav__toggle-close { display: inline-flex; }

.menu {
  position: absolute; left: var(--gutter); right: var(--gutter); top: 76px;
  padding: 10px;
  border-radius: 22px;
  background: var(--white);
  box-shadow: 0 1px 2px rgba(23,21,43,.05), 0 24px 60px -20px rgba(23,21,43,.25);
  opacity: 0; transform: translateY(-8px) scale(.98); transform-origin: top center;
  transition: opacity .3s var(--ease), transform .4s var(--ease);
}
.menu.is-open { opacity: 1; transform: none; }
.menu__links { display: grid; gap: 0; }
.menu__links a {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px; border-radius: 12px;
  font-size: 15px; font-weight: 500; color: var(--ink);
  transition: background-color .25s var(--ease);
}
.menu__links a:hover, .menu__links a.is-active { background: #F4F4F7; }
.menu__links .icon { font-size: 18px; color: var(--graphite); }
.menu__links .menu__sep { position: relative; margin-top: 13px; }
.menu__links .menu__sep::before { content: ""; position: absolute; left: 14px; right: 14px; top: -7px; height: 1px; background: var(--line); }
.nav.is-menu-open { background: rgba(251, 251, 253, 0.92); backdrop-filter: saturate(1.6) blur(18px); -webkit-backdrop-filter: saturate(1.6) blur(18px); transform: none; }

@media (max-width: 1080px) {
  .nav__toggle { display: inline-flex; }
  .nav__actions { gap: 10px; }
}
@media (min-width: 1081px) {
  .menu { display: none; }
}
@media (max-width: 720px) {
  .nav__inner { gap: 12px; }
  .nav__actions { gap: 8px; }
  .nav__actions .btn--sm { height: 38px; padding: 0 14px; font-size: 13px; }
  .hero__cta .btn--dark { display: none; }
  .hero__cta .btn--ghost { height: 48px; font-size: 14px; gap: 12px; }
  .hero__cta .btn__icon { width: 34px; height: 34px; font-size: 15px; }
}
