/* ==========================================================================
   Backprop - ML infrastructure
   Plain CSS. No build step, no framework, no third-party code.

   Motion contract: everything animated here is transform/opacity only, and
   every single effect is switched off wholesale by the reduced-motion block
   at the end of this file. Nothing is hidden unless JS is present to reveal
   it (see the html.js guard on [data-reveal]).
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */

:root {
  /* Light (default) */
  --bg:            #fcfcfb;
  --bg-sunk:       #f4f4f1;
  --surface:       #ffffff;
  --ink:           #14161a;
  --ink-2:         #3d434c;
  --muted:         #5b626c;
  --line:          #e4e4df;
  --line-strong:   #cdcdc6;
  --accent:        #0d7a61;
  --accent-hover:  #0a6250;
  --accent-on:     #ffffff;
  --accent-soft:   #e8f3ef;
  --grid:          rgba(13, 122, 97, 0.30);
  --shadow:        0 1px 2px rgba(20, 22, 26, .04), 0 8px 24px -16px rgba(20, 22, 26, .18);
  --shadow-lift:   0 2px 6px rgba(20, 22, 26, .05), 0 22px 48px -28px rgba(20, 22, 26, .32);

  --glow:          rgba(13, 122, 97, .15);
  --glow-2:        rgba(13, 122, 97, .07);
  --panel:         #f7f8f6;
  --aurora-1:      rgba(13, 122, 97, .20);
  --aurora-2:      rgba(23, 155, 170, .14);
  --aurora-3:      rgba(120, 180, 90, .12);

  /* Written by motion.js. Defaults keep everything sane without it. */
  --mx: 50%;
  --my: 0%;
  --rx: 0deg;
  --ry: 0deg;
  --p: 0;

  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
               "Liberation Mono", monospace;

  --pad: clamp(1.25rem, 5vw, 2.5rem);
  --radius: 14px;
  --radius-lg: clamp(18px, 2.2vw, 28px);
  --ease: cubic-bezier(.22, .61, .36, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:           #0a0b0d;
    --bg-sunk:      #0f1114;
    --surface:      #14171c;
    --ink:          #eef0f2;
    --ink-2:        #c3c8cf;
    --muted:        #949ba5;
    --line:         #23272e;
    --line-strong:  #343a43;
    --accent:       #4ecfa6;
    --accent-hover: #6ddcb8;
    --accent-on:    #06120e;
    --accent-soft:  #11251f;
    --grid:         rgba(78, 207, 166, 0.26);
    --shadow:       0 1px 2px rgba(0, 0, 0, .5), 0 8px 28px -18px rgba(0, 0, 0, .9);
    --shadow-lift:  0 2px 6px rgba(0, 0, 0, .5), 0 24px 52px -28px rgba(0, 0, 0, 1);

    --glow:         rgba(78, 207, 166, .22);
    --glow-2:       rgba(78, 207, 166, .10);
    --panel:        #101317;
    --aurora-1:     rgba(78, 207, 166, .20);
    --aurora-2:     rgba(64, 178, 214, .15);
    --aurora-3:     rgba(150, 214, 110, .10);
  }
}

/* --------------------------------------------------------------------------
   2. Base
   -------------------------------------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 1rem;
}
@media (min-width: 48rem) { html { scroll-padding-top: 5.5rem; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: clamp(1rem, .96rem + .2vw, 1.0625rem);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 640;
  line-height: 1.15;
  letter-spacing: -.021em;
  text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; }
li { list-style: none; }

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
a:hover { color: var(--accent-hover); }

strong { font-weight: 620; color: var(--ink); }

::selection { background: var(--accent-soft); color: var(--ink); }

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

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: .7rem 1rem;
  background: var(--accent);
  color: var(--accent-on);
  font: 600 .9rem/1 var(--font-sans);
  border-radius: 0 0 var(--radius) 0;
}
.skip:focus { left: 0; color: var(--accent-on); }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* --------------------------------------------------------------------------
   3. Motion primitives
   --------------------------------------------------------------------------
   [data-reveal] is only hidden when html.js is set - motion.js adds that on
   its first line. No JS means no hiding, so content can never be stranded.
   -------------------------------------------------------------------------- */

.js [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity .75s var(--ease-out) calc(var(--i, 0) * 70ms),
    transform .75s var(--ease-out) calc(var(--i, 0) * 70ms);
  will-change: transform, opacity;
}
.js [data-reveal="left"]  { transform: translateX(-22px); }
.js [data-reveal="right"] { transform: translateX(22px); }
.js [data-reveal="scale"] { transform: scale(.965); }
.js [data-reveal="blur"]  { filter: blur(6px); transition-property: opacity, transform, filter; }

.js [data-reveal].is-in {
  opacity: 1;
  transform: none;
  filter: none;
  will-change: auto;
}

/* Headline: each line rises from behind a mask. */
.lines { display: block; }
.lines .line {
  display: block;
  overflow: hidden;
  padding-bottom: .06em;
  margin-bottom: -.06em;
}
.lines .line > span {
  display: block;
  transform: translateY(105%);
  transition: transform 1s var(--ease-out) calc(var(--i, 0) * 105ms);
}
.js .lines.is-in .line > span,
html:not(.js) .lines .line > span { transform: none; }

/* Card tilt - a few degrees toward the cursor. */
.tilt {
  transform: perspective(900px) rotateX(var(--rx)) rotateY(var(--ry));
  transform-style: preserve-3d;
  transition: transform .5s var(--ease);
}
.tilt.is-tilting { transition: transform .12s linear; }

/* Pointer-tracked bloom. */
.glow { position: relative; isolation: isolate; }
.glow::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(
    22rem circle at var(--mx) var(--my),
    var(--glow) 0%, var(--glow-2) 34%, transparent 68%
  );
  opacity: 0;
  transition: opacity .4s var(--ease);
}
.glow:hover::after, .glow:focus-within::after { opacity: 1; }
.glow > * { position: relative; z-index: 1; }
@media (hover: none) { .glow::after { display: none; } }

/* Scroll progress rail. */
.progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 2px;
  z-index: 80;
  background: var(--accent);
  transform: scaleX(var(--p));
  transform-origin: 0 50%;
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   4. Layout primitives
   -------------------------------------------------------------------------- */

.wrap {
  width: 100%;
  margin-inline: auto;
  padding-inline: var(--pad);
}

.section {
  padding-block: clamp(3.5rem, 8vw, 6.5rem);
  border-top: 1px solid var(--line);
}
.section--sunk { background: var(--bg-sunk); }

.section__head { max-width: 46rem; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section__head > * + * { margin-top: 1rem; }

.eyebrow {
  display: block;
  margin-bottom: .9rem;
  color: var(--muted);
  font: 500 .6875rem/1 var(--font-mono);
  letter-spacing: .14em;
  text-transform: uppercase;
}
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 1.5rem;
  height: 1px;
  margin-right: .6rem;
  vertical-align: .25em;
  background: var(--accent);
  transform: scaleX(var(--rule, 1));
  transform-origin: 0 50%;
  transition: transform .8s var(--ease-out);
}
.js [data-reveal] .eyebrow::before,
.js .section__head[data-reveal] .eyebrow::before { --rule: 0; }
.js [data-reveal].is-in .eyebrow::before { --rule: 1; }

h2 { font-size: clamp(1.6rem, 1.1rem + 1.7vw, 2.3rem); }
h3 { font-size: 1.0625rem; letter-spacing: -.012em; }

.lede {
  color: var(--ink-2);
  font-size: clamp(1.0625rem, 1rem + .38vw, 1.1875rem);
  line-height: 1.6;
}

.note { color: var(--muted); font-size: .875rem; line-height: 1.6; }
.stack > * + * { margin-top: 1rem; }

/* --------------------------------------------------------------------------
   5. Header
   -------------------------------------------------------------------------- */

.site-header {
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
@media (min-width: 48rem) {
  .site-header {
    position: sticky;
    top: 0;
    background: color-mix(in srgb, var(--bg) 86%, transparent);
    backdrop-filter: saturate(160%) blur(12px);
    transition: box-shadow .3s var(--ease), background-color .3s var(--ease);
  }
  @supports not (backdrop-filter: blur(1px)) {
    .site-header { background: var(--bg); }
  }
  .site-header.is-stuck { box-shadow: 0 1px 0 var(--line), 0 8px 28px -22px rgba(0,0,0,.5); }
}

.site-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem 1.5rem;
  min-height: 3.75rem;
  padding-block: .6rem;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  color: var(--ink);
  font-size: 1.0625rem;
  font-weight: 640;
  letter-spacing: -.025em;
  text-decoration: none;
}
.wordmark:hover { color: var(--ink); }
.wordmark svg { display: block; flex: none; overflow: visible; }
/* The mark retraces itself bottom-left to top-right on hover.
   pathLength="100" on the <path> normalizes the dash math, so this holds
   even if the geometry changes. */
.wordmark svg path {
  stroke-dasharray: 100;
  stroke-dashoffset: 0;
}
.wordmark:hover svg path { animation: trace .65s var(--ease-out); }
@keyframes trace {
  from { stroke-dashoffset: 100; }
  to   { stroke-dashoffset: 0; }
}

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .25rem 1.35rem;
  margin-left: auto;
}
.nav a {
  position: relative;
  color: var(--muted);
  font: 500 .8125rem/1 var(--font-mono);
  text-decoration: none;
  padding: .45rem .75rem;
  border-radius: 999px;
  transition: color .18s var(--ease), background-color .18s var(--ease);
}
.nav a:hover { color: var(--ink); background: var(--bg-sunk); }
.nav a[aria-current], .nav a[data-active] { color: var(--ink); background: var(--accent-soft); }
@media (prefers-color-scheme: dark) { .nav a:hover { background: var(--surface); } }

/* --------------------------------------------------------------------------
   6. Buttons
   -------------------------------------------------------------------------- */

.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }

.btn {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .78rem 1.3rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: .9375rem;
  font-weight: 560;
  letter-spacing: -.005em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .18s var(--ease), border-color .18s var(--ease),
              color .18s var(--ease), transform .18s var(--ease),
              box-shadow .28s var(--ease);
}
/* Light sweeps across on hover. */
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 30%,
              rgba(255, 255, 255, .3) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform .7s var(--ease-out);
  pointer-events: none;
}
.btn:hover::before { transform: translateX(120%); }
.btn > * { position: relative; }

.btn--primary { background: var(--accent); color: var(--accent-on); }
.btn--primary:hover {
  background: var(--accent-hover);
  color: var(--accent-on);
  box-shadow: 0 0 0 6px var(--accent-soft), 0 10px 26px -12px var(--glow);
  transform: translateY(-2px);
}
.btn--primary:active { transform: translateY(0); }

.btn--ghost {
  background: var(--surface);
  border-color: var(--line-strong);
  color: var(--ink);
}
.btn--ghost:hover { border-color: var(--accent); color: var(--ink); transform: translateY(-2px); }
.btn--ghost:active { transform: translateY(0); }
@media (prefers-color-scheme: dark) {
  .btn--ghost::before { background: linear-gradient(105deg, transparent 30%,
                        rgba(255,255,255,.09) 50%, transparent 70%); }
}

.btn--mono { font-family: var(--font-mono); font-size: .875rem; font-weight: 500; }
.btn .arrow { transition: transform .28s var(--ease-out); }
.btn:hover .arrow { transform: translateX(4px); }

/* --------------------------------------------------------------------------
   7. Hero
   -------------------------------------------------------------------------- */

.hero { padding-block: clamp(1.5rem, 3vw, 2.5rem) clamp(3rem, 7vw, 5rem); }

.hero-panel {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(2rem, 4vw, 3.25rem) clamp(1.35rem, 2.4vw, 2.25rem);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

/* Drifting aurora. Three blobs on different periods so they never resync. */
.aurora {
  position: absolute;
  inset: -30%;
  z-index: -2;
  pointer-events: none;
  filter: blur(70px);
  opacity: .9;
}
.aurora i {
  position: absolute;
  display: block;
  border-radius: 50%;
  will-change: transform;
}
.aurora i:nth-child(1) {
  width: 46%; height: 52%; left: 2%; top: 6%;
  background: var(--aurora-1);
  animation: drift-a 19s var(--ease) infinite alternate;
}
.aurora i:nth-child(2) {
  width: 40%; height: 46%; right: 6%; top: 30%;
  background: var(--aurora-2);
  animation: drift-b 24s var(--ease) infinite alternate;
}
.aurora i:nth-child(3) {
  width: 34%; height: 40%; left: 38%; bottom: 4%;
  background: var(--aurora-3);
  animation: drift-c 29s var(--ease) infinite alternate;
}
@keyframes drift-a {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  50%  { transform: translate3d(18%, 12%, 0) scale(1.16); }
  100% { transform: translate3d(6%, -10%, 0) scale(.94); }
}
@keyframes drift-b {
  0%   { transform: translate3d(0, 0, 0) scale(1.05); }
  50%  { transform: translate3d(-20%, 14%, 0) scale(.9); }
  100% { transform: translate3d(-8%, -12%, 0) scale(1.2); }
}
@keyframes drift-c {
  0%   { transform: translate3d(0, 0, 0) scale(.95); }
  50%  { transform: translate3d(14%, -16%, 0) scale(1.18); }
  100% { transform: translate3d(-14%, -4%, 0) scale(1); }
}

/* Engineering grid, revealed by the cursor.
   Tinted with the accent rather than neutral gray, and the mask keeps a solid
   core before it falls away - a soft gradient with no defined edge reads as
   nothing at all. motion.js eases --mx/--my so the lit patch trails slightly. */
.hero-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(to right, var(--grid) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid) 1px, transparent 1px);
  background-size: 2.75rem 2.75rem;
  -webkit-mask-image: radial-gradient(17rem circle at var(--mx) var(--my),
                      #000 0%, #000 20%, rgba(0,0,0,.5) 44%, transparent 70%);
  mask-image: radial-gradient(17rem circle at var(--mx) var(--my),
              #000 0%, #000 20%, rgba(0,0,0,.5) 44%, transparent 70%);
}

.hero__grid {
  display: grid;
  gap: clamp(2.25rem, 4vw, 3rem);
  align-items: center;
}
@media (min-width: 62rem) {
  .hero__grid { grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); }
}

.hero h1 {
  font-size: clamp(2.05rem, 1.1rem + 3.6vw, 3rem);
  font-weight: 500;
  letter-spacing: -.033em;
  line-height: 1.06;
}
.hero .lede { margin-top: 1.3rem; max-width: 33rem; }
.hero .btn-row { margin-top: 1.9rem; }

.terms {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .35rem .75rem;
  margin-top: 1.5rem;
  color: var(--muted);
  font: 500 .8125rem/1.5 var(--font-mono);
}
.terms span { display: inline-flex; align-items: center; gap: .75rem; }
.terms span::after {
  content: "";
  width: 3px; height: 3px;
  border-radius: 50%;
  background: var(--accent);
}
.terms span:last-child::after { display: none; }
@media (max-width: 34rem) {
  .terms { flex-direction: column; align-items: flex-start; gap: .35rem; }
  .terms span::after { display: none; }
}

/* --------------------------------------------------------------------------
   8. Hero pipeline - the animated system diagram
   -------------------------------------------------------------------------- */

.pipeline { display: block; width: 100%; height: auto; overflow: visible; }

.pipe-track { fill: none; stroke: var(--line-strong); stroke-width: 1.5; }

/* pathLength="100" normalizes both paths, so one dash period equals one lap
   and the loop is seamless regardless of the actual geometry. */
.pipe-flow {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-dasharray: 9 91;
  stroke-dashoffset: 100;
  animation: flow 3.6s linear infinite;
  filter: drop-shadow(0 0 6px var(--glow));
}
.pipe-flow--loop { stroke-width: 2; opacity: .7; animation-delay: -.35s; }
@keyframes flow { to { stroke-dashoffset: 0; } }

.pipe-node rect {
  fill: var(--surface);
  stroke: var(--line);
  stroke-width: 1;
  transition: stroke .3s var(--ease);
}
.pipe-node text {
  font: 500 11px/1 var(--font-mono);
  letter-spacing: .1em;
  fill: var(--ink-2);
  transition: fill .3s var(--ease);
}
.pipe-node .dot {
  fill: var(--line-strong);
  animation: dot-hit 3.6s linear infinite;
}

/* Each node flares as the pulse passes it. Delays are the pulse's arrival
   time at that node: node center distance / total path length x 3.6s. */
.pipe-node .halo {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.5;
  opacity: 0;
  animation: halo 3.6s linear infinite;
}
.pipe-node:nth-of-type(1) .halo,
.pipe-node:nth-of-type(1) .dot { animation-delay: .20s; }
.pipe-node:nth-of-type(2) .halo,
.pipe-node:nth-of-type(2) .dot { animation-delay: 1.00s; }
.pipe-node:nth-of-type(3) .halo,
.pipe-node:nth-of-type(3) .dot { animation-delay: 1.80s; }
.pipe-node:nth-of-type(4) .halo,
.pipe-node:nth-of-type(4) .dot { animation-delay: 2.60s; }
.pipe-node:nth-of-type(5) .halo,
.pipe-node:nth-of-type(5) .dot { animation-delay: 3.40s; }

@keyframes halo {
  0%        { opacity: 0; }
  3%        { opacity: .9; }
  16%       { opacity: 0; }
  100%      { opacity: 0; }
}
@keyframes dot-hit {
  0%        { fill: var(--line-strong); }
  3%, 12%   { fill: var(--accent); }
  30%, 100% { fill: var(--line-strong); }
}

.pipe-node { cursor: default; }
.pipe-node:hover rect { stroke: var(--accent); }
.pipe-node:hover text { fill: var(--ink); }

.pipe-label {
  font: 500 9.5px/1 var(--font-mono);
  letter-spacing: .12em;
  fill: var(--muted);
  text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   9. Cards + spec lists
   -------------------------------------------------------------------------- */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: box-shadow .4s var(--ease), border-color .4s var(--ease);
}
.card:hover { box-shadow: var(--shadow-lift); border-color: var(--line-strong); }

.card__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: .85rem 1.15rem;
  border-bottom: 1px solid var(--line);
}
.card__head b {
  font: 500 .6875rem/1 var(--font-mono);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.card__head span { font: 500 .6875rem/1 var(--font-mono); color: var(--muted); }

.spec { padding: .35rem 0; }
.spec li {
  display: grid;
  grid-template-columns: 2.25rem minmax(0, 1fr);
  gap: 0 .35rem;
  align-items: baseline;
  padding: .6rem 1.15rem;
  transition: background-color .25s var(--ease);
}
.spec li + li { border-top: 1px solid var(--line); }
.spec li:hover { background: var(--accent-soft); }
.spec .n { color: var(--accent); font: 500 .75rem/1.5 var(--font-mono); }
.spec .t {
  font-size: .9375rem;
  font-weight: 560;
  transition: transform .25s var(--ease-out);
}
.spec li:hover .t { transform: translateX(3px); }
.spec .d { grid-column: 2; color: var(--muted); font-size: .8125rem; line-height: 1.5; }

/* --------------------------------------------------------------------------
   10. Card grids
   -------------------------------------------------------------------------- */

.grid {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
@media (min-width: 40rem) { .grid--2 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 52rem) { .grid--3 { grid-template-columns: repeat(3, 1fr); } }

.cell {
  position: relative;
  isolation: isolate;
  background: var(--bg);
  padding: clamp(1.5rem, 3vw, 2rem);
  transition: background-color .35s var(--ease);
}
.section--sunk .cell { background: var(--bg-sunk); }
.cell > * { position: relative; z-index: 1; }
.cell h3 {
  margin-bottom: .6rem;
  transition: transform .4s var(--ease-out);
}
.cell:hover h3 { transform: translateX(4px); }
.cell p { color: var(--muted); font-size: .9375rem; }
.cell__n {
  display: block;
  margin-bottom: .85rem;
  color: var(--accent);
  font: 500 .75rem/1 var(--font-mono);
  letter-spacing: .06em;
}

.cell::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(
    17rem circle at var(--mx) var(--my),
    var(--glow) 0%, var(--glow-2) 30%, transparent 66%
  );
  opacity: 0;
  transition: opacity .4s var(--ease);
}
.grid:hover .cell::after { opacity: 1; }
@media (hover: none) { .cell::after { display: none; } }

/* Cells cascade in on opacity only - the grid clips overflow, so any
   transform here would flash the hairline background at the edges. */
.js .grid[data-reveal] .cell {
  opacity: 0;
  transition: opacity .7s var(--ease-out) calc(var(--i, 0) * 95ms);
}
.js .grid[data-reveal].is-in .cell { opacity: 1; }

.js .spec[data-stagger] li {
  opacity: 0;
  transition: opacity .6s var(--ease-out) calc(var(--i, 0) * 90ms);
}
.js [data-reveal].is-in .spec[data-stagger] li { opacity: 1; }

/* Hairline that draws in along the top of the hovered cell. */
.cell::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  height: 2px;
  width: 100%;
  z-index: 2;
  pointer-events: none;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform .5s var(--ease-out);
}
.cell:hover::before { transform: scaleX(1); }

.split {
  display: grid;
  gap: clamp(2.25rem, 5vw, 3.25rem);
  align-items: start;
}
@media (min-width: 54rem) { .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }

/* --------------------------------------------------------------------------
   11. Offer block
   -------------------------------------------------------------------------- */

.offer {
  display: grid;
  gap: clamp(1.75rem, 4vw, 2.75rem);
  padding: clamp(1.6rem, 4vw, 2.75rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
@media (min-width: 56rem) {
  .offer { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: start; }
}

.price { display: flex; align-items: baseline; gap: .6rem; margin-bottom: .5rem; }
.price b {
  font-size: clamp(2.4rem, 1.6rem + 3vw, 3.4rem);
  font-weight: 660;
  letter-spacing: -.04em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.price em {
  color: var(--muted);
  font: 500 .8125rem/1 var(--font-mono);
  font-style: normal;
  letter-spacing: .04em;
}

.checks li {
  position: relative;
  padding-left: 1.7rem;
  font-size: .9375rem;
  color: var(--ink-2);
}
.checks li + li { margin-top: .75rem; }
.checks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .34em;
  width: .95rem;
  height: .5rem;
  border-left: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg) scale(0);
  transform-origin: 50% 50%;
  transition: transform .45s var(--ease-out) calc(var(--i, 0) * 90ms);
}
.js .checks.is-in li::before,
html:not(.js) .checks li::before { transform: rotate(-45deg) scale(.8); }

/* --------------------------------------------------------------------------
   12. Timeline
   -------------------------------------------------------------------------- */

.timeline {
  position: relative;
  margin-left: .3rem;
  padding-left: 0;
}
.timeline::before,
.timeline::after {
  content: "";
  position: absolute;
  left: 0; top: 0;
  width: 1px;
  height: 100%;
  background: var(--line-strong);
}
/* Accent rail fills as the section scrolls past. */
.timeline::after {
  background: var(--accent);
  transform: scaleY(var(--p, 0));
  transform-origin: 50% 0;
  transition: transform .12s linear;
}
.timeline li { position: relative; padding: 0 0 1.75rem 1.75rem; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: "";
  position: absolute;
  left: -4.5px;
  top: .55em;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--accent);
  outline: 3px solid var(--bg);
  transform: scale(0);
  transition: transform .5s var(--ease-out) calc(var(--i, 0) * 130ms);
}
.js .timeline.is-in li::before,
html:not(.js) .timeline li::before { transform: scale(1); }
.section--sunk .timeline li::before { outline-color: var(--bg-sunk); }
.timeline b {
  display: block;
  margin-bottom: .2rem;
  font: 500 .75rem/1.4 var(--font-mono);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
}
.timeline p { color: var(--ink-2); font-size: .9375rem; }

/* --------------------------------------------------------------------------
   13. People
   -------------------------------------------------------------------------- */

.people { display: grid; gap: clamp(1.75rem, 4vw, 2.5rem); }
@media (min-width: 50rem) { .people { grid-template-columns: 1fr 1fr; } }

.person { padding-top: 1.5rem; border-top: 2px solid var(--ink); }
.person h3 { font-size: 1.1875rem; }
.person .role { margin-top: .3rem; color: var(--accent); font: 500 .8125rem/1.5 var(--font-mono); }
.person p { margin-top: .9rem; color: var(--ink-2); font-size: .9375rem; }
.person .facts { margin-top: 1.1rem; }
.person .facts li {
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr);
  gap: .75rem;
  padding-block: .5rem;
  border-top: 1px solid var(--line);
  font-size: .875rem;
  color: var(--ink-2);
  overflow-wrap: anywhere;
  transition: padding-left .3s var(--ease), background-color .3s var(--ease);
}
.person .facts li:hover { padding-left: .4rem; background: var(--accent-soft); }
@media (max-width: 30rem) {
  .person .facts li { grid-template-columns: 1fr; gap: .1rem; }
}
.person .facts .k {
  color: var(--muted);
  font: 500 .6875rem/1.6 var(--font-mono);
  letter-spacing: .08em;
  text-transform: uppercase;
}
.person .facts b { font-variant-numeric: tabular-nums; }

/* Kaggle medals. Decorative - the rank next to it carries the meaning, so
   this never has to be read as color alone. */
.medal {
  display: inline-block;
  width: .5rem;
  height: .5rem;
  margin-right: .4rem;
  border-radius: 50%;
  vertical-align: baseline;
}
.medal--gold   { background: #d7a12c; box-shadow: 0 0 0 1px rgba(215, 161, 44, .3); }
.medal--silver { background: #9aa3ad; box-shadow: 0 0 0 1px rgba(154, 163, 173, .3); }
.medal--bronze { background: #b4703c; box-shadow: 0 0 0 1px rgba(180, 112, 60, .3); }

.employers {
  margin-top: clamp(2.25rem, 5vw, 3rem);
  padding: clamp(1.25rem, 3vw, 1.75rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
}
.employers ul { display: flex; flex-wrap: wrap; gap: .5rem .75rem; margin-block: .9rem; }
.employers li {
  padding: .3rem .7rem;
  background: var(--bg-sunk);
  border: 1px solid var(--line);
  border-radius: 999px;
  font: 500 .8125rem/1.4 var(--font-mono);
  color: var(--ink-2);
  transition: transform .5s var(--ease-out) calc(var(--i, 0) * 65ms),
              opacity .5s var(--ease-out) calc(var(--i, 0) * 65ms),
              border-color .25s var(--ease);
}
.js .employers[data-reveal] li { opacity: 0; transform: translateY(10px) scale(.94); }
.js .employers[data-reveal].is-in li { opacity: 1; transform: none; }
.employers li:hover { border-color: var(--accent); }
@media (prefers-color-scheme: dark) { .employers li { background: var(--bg); } }

/* --------------------------------------------------------------------------
   14. FAQ - native <details>, no JS
   -------------------------------------------------------------------------- */

.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem 0;
  font-size: 1rem;
  font-weight: 560;
  cursor: pointer;
  list-style: none;
  transition: color .2s var(--ease), padding-left .3s var(--ease);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  flex: none;
  width: .7rem; height: .7rem;
  margin-top: .35em;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(45deg);
  transition: transform .35s var(--ease-out);
}
.faq details[open] summary::after { transform: rotate(-135deg); }
.faq summary:hover { color: var(--accent); padding-left: .35rem; }
.faq .answer {
  padding-bottom: 1.35rem;
  color: var(--muted);
  font-size: .9375rem;
  max-width: 46rem;
  animation: answer-in .4s var(--ease-out);
}
@keyframes answer-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: none; }
}
.faq .answer p + p { margin-top: .75rem; }

/* --------------------------------------------------------------------------
   15. Contact
   -------------------------------------------------------------------------- */

.contact-card { display: grid; gap: clamp(1.75rem, 4vw, 2.5rem); align-items: center; }
@media (min-width: 54rem) {
  .contact-card { grid-template-columns: minmax(0, 1fr) minmax(0, .85fr); }
}

.mail {
  position: relative;
  display: inline-block;
  font-family: var(--font-mono);
  font-size: clamp(1.05rem, .8rem + 1.1vw, 1.5rem);
  font-weight: 500;
  letter-spacing: -.02em;
  color: var(--accent);
  text-decoration: none;
  padding-bottom: .2rem;
  overflow-wrap: anywhere;
}
.mail::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 2px;
  background: var(--accent);
  transform: scaleX(var(--u, .35));
  transform-origin: 0 50%;
  transition: transform .45s var(--ease-out);
}
.mail:hover::after { --u: 1; }

/* --------------------------------------------------------------------------
   16. Copy confirmation toast
   --------------------------------------------------------------------------
   Built by motion.js when an email CTA is clicked. Non-blocking when hidden,
   selectable when shown, so it also works as a manual fallback if the
   clipboard write itself fails.
   -------------------------------------------------------------------------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  z-index: 90;
  max-width: min(26rem, calc(100vw - 2rem));
  padding: .8rem 1.15rem;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lift);
  transform: translate(-50%, calc(100% + 2.5rem));
  opacity: 0;
  pointer-events: none;
  transition: transform .5s var(--ease-out), opacity .3s var(--ease);
}
.toast.is-shown {
  transform: translate(-50%, 0);
  opacity: 1;
  pointer-events: auto;
}
.toast b {
  display: block;
  font: 500 .875rem/1.4 var(--font-mono);
  letter-spacing: -.01em;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.toast span {
  display: block;
  margin-top: .15rem;
  font-size: .8125rem;
  line-height: 1.45;
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   17. Placeholder marker - unverified content, replace before launch
   -------------------------------------------------------------------------- */

.ph {
  font-family: var(--font-mono);
  font-size: .875em;
  font-style: normal;
  padding: .05em .4em;
  border-radius: 4px;
  background: #fff3c4;
  color: #6b4c00;
  border: 1px dashed #d9a400;
}
@media (prefers-color-scheme: dark) {
  .ph { background: #2e2504; color: #f5cd5a; border-color: #7a6318; }
}

/* --------------------------------------------------------------------------
   17. Footer
   -------------------------------------------------------------------------- */

.site-footer {
  padding-block: 2.5rem 3rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .875rem;
}
.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  align-items: baseline;
  justify-content: space-between;
}
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--ink); text-decoration: underline; }
.site-footer nav {
  display: flex; flex-wrap: wrap; gap: .5rem 1.35rem;
  font-family: var(--font-mono); font-size: .8125rem;
}

/* --------------------------------------------------------------------------
   18. Utilities / small pages
   -------------------------------------------------------------------------- */

.page-hero { padding-block: clamp(1.25rem, 3vw, 2rem) clamp(2rem, 5vw, 3rem); }
.page-hero h1 {
  font-size: clamp(1.95rem, 1.2rem + 3.2vw, 3.15rem);
  font-weight: 500;
  letter-spacing: -.033em;
  line-height: 1.05;
}
.page-hero .lede { margin-top: 1.25rem; max-width: 40rem; }
.page-hero .terms { margin-top: 1.75rem; }

.backlink {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  margin-bottom: 1.5rem;
  color: var(--muted);
  font: 500 .8125rem/1 var(--font-mono);
  text-decoration: none;
  transition: color .2s var(--ease), gap .25s var(--ease);
}
.backlink:hover { color: var(--accent); gap: .75rem; }

.center { text-align: center; }
.narrow { max-width: 40rem; }
.readable { max-width: 52rem; }
.mt-lg { margin-top: clamp(2rem, 4vw, 3rem); }
.mt-md { margin-top: 1.5rem; }

.error-page { display: grid; place-items: center; min-height: 62vh; padding-block: 4rem; }

/* --------------------------------------------------------------------------
   19. Motion preferences - the single off switch
   -------------------------------------------------------------------------- */

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

  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    transition-delay: 0ms !important;
    scroll-behavior: auto !important;
  }

  /* Everything that animates into place starts in place instead. */
  .js [data-reveal],
  .js [data-reveal].is-in { opacity: 1 !important; transform: none !important; filter: none !important; }
  .js .lines .line > span { transform: none !important; }
  .js .checks li::before { transform: rotate(-45deg) scale(.8) !important; }
  .js .timeline li::before { transform: scale(1) !important; }
  .js .employers[data-reveal] li { opacity: 1 !important; transform: none !important; }
  .js .grid[data-reveal] .cell,
  .js .spec[data-stagger] li { opacity: 1 !important; }
  .tilt { transform: none !important; }
  .aurora i { animation: none !important; }
  .pipe-flow, .pipe-flow--loop { animation: none !important; opacity: .55; stroke-dasharray: none; }
  .pipe-node, .pipe-node .halo { animation: none !important; }
  .pipe-node .halo { opacity: 0 !important; }
  .btn::before { display: none; }
  .progress { display: none; }
  .eyebrow::before { transform: none !important; }
}

/* --------------------------------------------------------------------------
   20. Print
   -------------------------------------------------------------------------- */

@media print {
  .site-header, .btn-row, .skip, .progress, .aurora { display: none; }
  body { background: #fff; color: #000; }
  .card, .offer, .employers { box-shadow: none; }
  .js [data-reveal] { opacity: 1 !important; transform: none !important; }
}
