/* ============================================================================
   RabtCore — design tokens + styles
   Dark, near-black canvas with a single blue accent family taken straight from
   the logo's ice-blue → cobalt gradient. One accent family only: a second hue
   would read as a second brand next to the mark.
   ========================================================================= */

:root {
  /* Surfaces, darkest → lightest. Elevation is expressed by surface + a 1px
     border, not by shadow. */
  --void:      #08090c;
  --abyss:     #0e111b;
  --deep-sea:  #0d172b;
  --panel:     #12244f;

  /* Accent family, sampled from the logo gradient */
  --ice:       #dfeaff;
  --frost:     #85a6e9;
  --cobalt:    #2862d7;
  --pulse:     #305fbd;
  --logo-blue: #3183dc;   /* the blue sampled from the logo's tagline bullets */

  /* Text */
  --quartz:    #ffffff;
  --mist:      #c7c9d1;
  --ash:       #abaebb;
  --slate:     #7d8494;

  /* Borders */
  --edge:      #172540;
  --inkline:   #151e32;
  --hairline:  #24375a;

  --font-display: 'Figtree', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-ui:      'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  /* Geometric sans matching the logo's wordmark: light weight, circular O,
     pointed A. Used for the wordmark and every small uppercase label. */
  --font-brand:   'Jost', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  /* One-word accent inside the hero headline only — not used anywhere else,
     so it stays a single deliberate flourish rather than a second brand voice. */
  --font-cursive: 'Caveat', 'Segoe Script', cursive;

  --wrap: 1180px;
  --radius: 12px;
  --pill: 9999px;

  --section-gap: clamp(72px, 9vw, 120px);

  /* Short, decisive easing — motion should confirm an action, not perform. */
  --ease: cubic-bezier(.22,.61,.36,1);
  /* Slower, softer curve for entrances: things settle rather than snap. */
  --ease-air: cubic-bezier(.16,.84,.44,1);
  --dur-enter: .6s;
  --loop-cycle: 9s;       /* one full revolution of the engine loop */
}

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

/* overflow-x lives on html, not body. Setting it on body alone is a very
   common real-world cause of "the page won't scroll" bugs: per spec it can
   decouple body's scrolling from the viewport's in ways mainline Chromium
   handles correctly but plenty of embedded/non-standard webviews don't.
   html is the standard, unambiguous place for this. */
html { scroll-behavior: smooth; scroll-padding-top: 88px; overflow-x: hidden; }

body {
  margin: 0;
  background: var(--void);
  color: var(--mist);
  font-family: var(--font-ui);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: var(--font-display); color: var(--quartz); margin: 0; }
p { margin: 0; }
a { color: inherit; }

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

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--quartz); color: #08090c;
  padding: 12px 20px; border-radius: var(--pill);
  font-size: 14px; font-weight: 600; text-decoration: none;
  transition: top .18s var(--ease);
}
.skip:focus { top: 16px; }

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

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

/* ── Navigation ─────────────────────────────────────────────────────────── */

.nav {
  position: sticky; top: 0; z-index: 50;
  transition: background .25s var(--ease), border-color .25s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav[data-scrolled] {
  background: rgba(8, 9, 12, .82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--inkline);
}
.nav__inner {
  max-width: var(--wrap); margin-inline: auto; padding: 14px 24px;
  display: flex; align-items: center; gap: 24px;
}

.logo { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.logo__img { height: 30px; width: auto; flex: none; display: block; }

/* The wordmark is the supplied artwork itself, so the letterforms, tracking and
   metallic fade are exactly the logo's rather than a font approximation.
   Cap-height only (no descenders), so height alone sets the optical size.
   The parent link carries aria-label, so the alt text surfaces only as the
   fallback if the image fails to load. */
.logo__word { height: 13px; width: auto; flex: none; display: block; }

.nav__menu { margin-left: auto; display: flex; align-items: center; gap: 28px; }
.nav__menu a {
  font-size: 15px; font-weight: 500; color: var(--ash);
  text-decoration: none; transition: color .18s var(--ease);
}
.nav__menu a:hover { color: var(--quartz); }
/* .nav__menu a (0,1,1) otherwise beats .btn--primary (0,1,0) and leaves
   this pill's text in --ash grey on white — 2.2:1, a real failure. */
.nav__menu .nav__cta { margin-left: 4px; color: #08090c; }
.nav__menu .nav__cta:hover { color: #08090c; }

.nav__toggle {
  display: none; margin-left: auto;
  width: 44px; height: 44px; align-items: center; justify-content: center;
  background: transparent; border: 1px solid var(--edge); border-radius: 10px;
  color: var(--quartz); cursor: pointer;
}
.nav__bars { display: grid; gap: 5px; }
.nav__bars i { display: block; width: 16px; height: 1.5px; background: currentColor; transition: transform .2s var(--ease); }
.nav__toggle[aria-expanded="true"] .nav__bars i:first-child { transform: translateY(3.25px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] .nav__bars i:last-child  { transform: translateY(-3.25px) rotate(-45deg); }

/* ── Buttons ────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 11px 22px;
  border-radius: var(--pill);
  font-family: var(--font-ui); font-size: 15px; font-weight: 500;
  text-decoration: none; white-space: nowrap;
  transition: background .18s var(--ease), border-color .18s var(--ease), color .18s var(--ease);
}
.btn--primary { background: var(--quartz); color: #08090c; border: 1px solid var(--quartz); }
.btn--primary:hover { background: var(--ice); border-color: var(--ice); }
.btn--ghost { background: transparent; color: var(--quartz); border: 1px solid var(--hairline); }
.btn--ghost:hover { border-color: var(--frost); }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

/* ── Hero ───────────────────────────────────────────────────────────────── */

.hero { position: relative; padding: clamp(48px, 7vw, 88px) 0 var(--section-gap); overflow: hidden; }

.hero__bg {
  position: absolute; inset: 0; pointer-events: none;
  /* Set by script.js while the hero is in view; 0px with no JS or with
     reduced motion, so the glow simply sits still rather than parallaxing. */
  transform: translate3d(0, calc(var(--parallax-y, 0) * 1px), 0);
}

/* Cursor spotlight — a second, brighter glow that follows the pointer.
   Deliberately its own element with its own background rather than a
   transform on the existing aurora: shifting a huge, very soft, low-opacity
   gradient by a few pixels is nearly impossible to see however correct the
   math is — the offset is tiny relative to the gradient's own feathered
   size. A dedicated spotlight with its own visible radius and opacity is the
   pattern that actually reads as "the background responds to the cursor"
   (see Linear, Vercel). --spot-x/--spot-y are px offsets from hero center,
   written by script.js; the whole thing fades in only while the pointer is
   over the hero via .is-active, so it's simply absent rather than sitting at
   a stale position when the pointer leaves. */
.hero__spotlight {
  position: absolute; inset: 0; pointer-events: none;
  opacity: 0;
  transition: opacity .35s var(--ease-air);
  background: radial-gradient(
    480px circle at calc(50% + var(--spot-x, 0) * 1px) calc(50% + var(--spot-y, 0) * 1px),
    rgba(133, 166, 233, .30),
    rgba(48, 95, 189, .12) 45%,
    transparent 70%
  );
}
.hero__spotlight.is-active { opacity: 1; }

/* The only decorative glow on the page, and it stays in the hero. */
.aurora {
  position: absolute; inset: -30% 0 auto 0; height: 900px; pointer-events: none;
  background:
    radial-gradient(60% 60% at 25% 10%, rgba(40, 98, 215, .30), transparent 70%),
    radial-gradient(45% 45% at 78% 32%, rgba(133, 166, 233, .16), transparent 72%);
}

.hero__grid {
  position: relative;
  display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.eyebrow {
  font-family: var(--font-brand);
  font-size: 12.5px; font-weight: 400; letter-spacing: .28em; text-transform: uppercase;
  color: var(--ash); margin-bottom: 20px;
}
.eyebrow span { color: var(--logo-blue); margin: 0 5px; }

.hero h1 {
  font-size: clamp(42px, 6.4vw, 68px); font-weight: 500;
  line-height: 1.04; letter-spacing: -.025em;
}
.lede {
  margin-top: 24px; max-width: 33em;
  font-size: clamp(16px, 1.35vw, 18px); color: var(--ash); line-height: 1.6;
}
.accent-cursive {
  font-family: var(--font-cursive); font-style: normal; font-weight: 600;
  color: var(--ice); letter-spacing: 0;
  /* Caveat sits low on its baseline relative to Figtree; nudge it back level. */
  display: inline-block; transform: translateY(-.04em);
}
.hero__note {
  margin-top: 24px; font-size: 14px; color: var(--slate);
  padding-left: 14px; border-left: 2px solid var(--edge);
}

.hero__visual { display: flex; justify-content: center; }
.loop { width: 100%; max-width: 460px; height: auto; }
.loop__core {
  font-family: var(--font-ui); font-size: 13px; font-weight: 500;
  letter-spacing: .18em; fill: var(--frost); text-anchor: middle;
}
.loop__node rect { fill: #0d172b; stroke: var(--hairline); stroke-width: 1; }
.loop__node text {
  font-family: var(--font-ui); font-size: 15px; font-weight: 500;
  fill: var(--quartz); text-anchor: middle;
}
.loop__outer rect { fill: rgba(18, 36, 79, .5); stroke: #1b2b4a; stroke-width: 1; }
.loop__outer text {
  font-family: var(--font-ui); font-size: 10.5px; font-weight: 500;
  letter-spacing: .13em; fill: var(--frost); text-anchor: middle;
}

/* ── Sections ───────────────────────────────────────────────────────────── */

.section { padding-block: var(--section-gap); }
.section--panel {
  background: var(--abyss);
  border-block: 1px solid var(--inkline);
}

.h2 {
  font-size: clamp(30px, 3.6vw, 44px); font-weight: 500;
  line-height: 1.14; letter-spacing: -.022em; max-width: 20ch;
}
.section__lede { margin-top: 20px; max-width: 60ch; color: var(--ash); font-size: 17px; }

.card {
  background: var(--deep-sea);
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  padding: 26px;
}

.aside {
  margin-top: 36px; padding: 20px 24px;
  background: var(--abyss); border: 1px solid var(--inkline);
  border-left: 2px solid var(--pulse);
  border-radius: var(--radius);
  color: var(--ash); font-size: 15px; max-width: 78ch;
}
.aside strong { color: var(--quartz); font-weight: 600; }

/* The section behind a deck takes the active slide's accent too. @property
   registers --acc as a colour so the change fades instead of snapping. */
@property --acc { syntax: "<color>"; inherits: true; initial-value: #4f8cff; }
.section--tint {
  background-image: radial-gradient(90% 75% at 50% 48%, color-mix(in srgb, var(--acc) 20%, transparent), transparent 72%);
  transition: --acc .6s var(--ease);
}

/* ── Decks (presentation slides) ─────────────────────────────────────────
   One idea per slide, mostly picture. Native scroll-snap, so swipe, trackpad
   and arrow keys work with no JS; script.js adds the tabs, arrows and
   autoplay. Autoplay is driven by the progress bar's own CSS animation (its
   animationend advances the slide), so pausing the bar pauses the deck. */

.deck { margin-top: 44px; }
/* Without JS the slides simply stack (everything readable). script.js adds
   .deck--js, which turns the stack into the swipeable one-slide-wide row. */
.deck--js .deck__track {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
  scroll-behavior: smooth; overscroll-behavior-x: contain; scrollbar-width: none;
}
.deck__track {
  background: var(--deep-sea); border: 1px solid color-mix(in srgb, var(--acc, var(--edge)) 45%, var(--edge)); border-radius: 20px;
  transition: border-color .4s var(--ease);
}
.deck--js .deck__track::-webkit-scrollbar { display: none; }
.deck:not(.deck--js) .slide + .slide { border-top: 1px solid var(--edge); }

.slide {
  --acc: #4f8cff; /* per-slide accent, set inline; drives art, tags, glow, progress */
  background: linear-gradient(135deg, color-mix(in srgb, var(--acc) 26%, var(--deep-sea)), color-mix(in srgb, var(--acc) 9%, var(--deep-sea)) 75%);
  min-height: clamp(360px, 42vw, 460px);
  display: grid; grid-template-columns: 1fr 1.1fr; align-items: center;
  gap: clamp(16px, 4vw, 56px); padding: clamp(24px, 4vw, 56px);
}
.deck--js .slide { flex: 0 0 100%; scroll-snap-align: start; scroll-snap-stop: always; }
.slide__kicker {
  font-family: var(--font-brand); font-size: 13px; letter-spacing: .26em;
  text-transform: uppercase; margin-bottom: 18px;
  /* lightened toward white so small text keeps AA contrast on every accent */
  color: color-mix(in srgb, var(--acc) 50%, #fff);
}
.slide h3 {
  font-size: clamp(30px, 4.2vw, 52px); font-weight: 500;
  line-height: 1.06; letter-spacing: -.025em;
}
.slide__line { margin-top: 16px; font-size: clamp(17px, 1.6vw, 20px); color: var(--ash); max-width: 26em; }

.chips { list-style: none; margin: 24px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li {
  padding: 7px 14px; border-radius: var(--pill);
  background: color-mix(in srgb, var(--acc) 12%, var(--abyss));
  border: 1px solid color-mix(in srgb, var(--acc) 40%, transparent);
  font-size: 14px; font-weight: 500; color: var(--quartz);
}
.chips .chips__soon { border-style: dashed; color: var(--ash); }

.slide__art {
  align-self: stretch; display: grid; place-items: center; border-radius: 14px;
  background: radial-gradient(70% 70% at 50% 45%, color-mix(in srgb, var(--acc) 30%, transparent), transparent 72%);
}
.slide__art svg { width: 100%; max-width: 480px; height: auto; max-height: 100%; }

/* illustration palette: same blue family as the logo, nothing new */
.a-sf { fill: #0d172b; stroke: #24375a; stroke-width: 1.5; }
.a-so { fill: #12244f; }
.a-dm { fill: #1d2f55; }
.a-ac { fill: var(--acc); }
.a-ic { fill: #dfeaff; }
.a-st { fill: none; stroke: var(--acc); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.a-ln { fill: none; stroke: #dfeaff; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.a-gl { fill: none; stroke: #dfeaff; stroke-width: .9; stroke-linecap: round; stroke-linejoin: round; }
.a-dash { fill: none; stroke: var(--acc); opacity: .55; stroke-width: 1.5; stroke-dasharray: 3 7; }
.a-hole { fill: none; stroke: var(--acc); stroke-width: 2; stroke-dasharray: 5 5; }

/* controls */
.deck__bar { margin-top: 16px; display: flex; align-items: center; gap: 12px; }
.deck__tabs { display: flex; flex: 1; gap: 8px; min-width: 0; }
.deck__tab {
  flex: 1; min-width: 0; padding: 10px 0 0; background: none; border: 0; cursor: pointer;
  font: inherit; font-size: 14px; font-weight: 500; color: var(--slate); text-align: left;
  transition: color .2s var(--ease);
}
.deck__tab:hover { color: var(--quartz); }
.deck__tab[aria-current="true"] { color: var(--acc, var(--quartz)); }
.deck__label { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 8px; }
.deck__rail { display: block; height: 3px; border-radius: 3px; background: var(--hairline); overflow: hidden; }
.deck__fill { display: block; height: 100%; width: 0; background: var(--acc, var(--frost)); }
.deck__tab[aria-current="true"] .deck__fill { width: 100%; }
.deck.is-playing .deck__tab[aria-current="true"] .deck__fill {
  width: 0; animation: deckFill var(--deck-ms, 5000ms) linear forwards;
}
.deck.is-held .deck__fill { animation-play-state: paused !important; }
@keyframes deckFill { to { width: 100%; } }

.deck__btn {
  flex: none; width: 44px; height: 44px; display: grid; place-items: center; padding: 0;
  background: transparent; color: var(--quartz); cursor: pointer;
  border: 1px solid var(--hairline); border-radius: 50%;
  transition: border-color .18s var(--ease), opacity .18s var(--ease);
}
.deck__btn:hover:not(:disabled) { border-color: var(--frost); }
.deck__tab .deck__rail { background: color-mix(in srgb, var(--acc, var(--hairline)) 22%, var(--hairline)); }
.deck__btn:disabled { opacity: .35; cursor: default; }
.deck__btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

@media (max-width: 760px) {
  .slide { grid-template-columns: 1fr; gap: 8px; padding: 22px; min-height: 0; }
  .slide__art { order: -1; }
  .slide__art svg { max-width: 300px; }
  /* labels give way to story-style progress segments */
  .deck__label { display: none; }
  .deck__tab { padding: 18px 0 18px; }
}

/* ── Review grid ───────────────────────────────────────────── */

.grid-2 { margin-top: 44px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }

/* ── Pricing ────────────────────────────────────────────────────────────── */

.pricing { margin-top: 36px; padding: clamp(28px, 4vw, 44px); max-width: 800px; }
.pricing__lead { font-size: 18px; color: var(--quartz); font-weight: 500; line-height: 1.5; }
.pricing p + p { margin-top: 14px; color: var(--ash); font-size: 15.5px; }


/* ── Lead form ──────────────────────────────────────────────────────────── */

.lead { margin-top: 44px; padding: clamp(24px, 4vw, 40px); }
.lead__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px 16px; }
.field { display: grid; gap: 8px; align-content: start; min-width: 0; }
.field--wide { grid-column: 1 / -1; }
.field label { font-size: 14px; font-weight: 500; color: var(--quartz); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 44px; padding: 11px 14px;
  background: var(--abyss); color: var(--quartz);
  border: 1px solid var(--hairline); border-radius: 8px;
  font: inherit; font-size: 16px; /* 16px stops iOS zooming on focus */
  transition: border-color .18s var(--ease);
}
.field textarea { resize: vertical; min-height: 110px; }
.field ::placeholder { color: var(--slate); }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--frost); }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline-offset: 1px; border-color: var(--frost); }
.field :user-invalid { border-color: #e08a8a; }
.field select:invalid { color: var(--slate); }
.field select option { color: var(--quartz); background: var(--abyss); }
.lead .btn-row { margin-top: 28px; }
.lead button.btn { cursor: pointer; }
.lead__note { margin-top: 16px; font-size: 13.5px; color: var(--slate); }

/* ── Reviews (section is hidden until real quotes exist) ────────────────── */

.review blockquote { margin: 0; font-size: 17px; color: var(--quartz); line-height: 1.55; }
.review figcaption { margin-top: 16px; font-size: 14px; color: var(--ash); }
.review figcaption strong { color: var(--mist); font-weight: 600; }
.review { margin: 0; }

/* ── Footer ─────────────────────────────────────────────────────────────── */

.footer { border-top: 1px solid var(--inkline); background: var(--abyss); padding-top: 56px; }
.footer__inner { display: grid; grid-template-columns: 1.1fr 1.4fr; gap: 48px; padding-bottom: 44px; }
.footer__tag {
  margin-top: 16px; font-family: var(--font-brand);
  font-size: 11.5px; font-weight: 400;
  letter-spacing: .26em; text-transform: uppercase; color: var(--slate);
  /* wide tracking makes this string long; scale it down rather than let it
     break mid-phrase in the narrow footer column */
  white-space: nowrap;
}
@media (max-width: 1024px) {
  .footer__tag { font-size: 10.5px; letter-spacing: .18em; }
}
.footer__tag span { color: var(--logo-blue); }
.footer__line { margin-top: 12px; font-size: 14px; color: var(--ash); max-width: 30ch; }

.footer__cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.footer__cols h4 {
  font-family: var(--font-brand); font-size: 12px; font-weight: 400;
  letter-spacing: .2em; text-transform: uppercase; color: var(--slate); margin-bottom: 14px;
}
.footer__cols a, .footer__cols p {
  display: block; font-size: 14.5px; color: var(--ash);
  text-decoration: none; margin-bottom: 9px;
}
.footer__cols a:hover { color: var(--quartz); }

.footer__base {
  border-top: 1px solid var(--inkline); padding-block: 22px;
  display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between;
  font-size: 13.5px; color: var(--slate);
}
.footer__honest { color: var(--slate); }

/* ── Motion ──────────────────────────────────────────────────────────────
   Atmospheric and restrained: long, low-amplitude, transform/opacity only so
   everything stays on the compositor. Entrances use `animation-fill-mode:
   backwards`, never a hidden base state — if animations never run, the page
   simply renders finished rather than blank. Every effect here is switched
   off wholesale by the reduced-motion block at the end of this file. */

@keyframes rise {
  from { opacity: 0; transform: translate3d(0, 14px, 0); }
  to   { opacity: 1; transform: none; }
}
@keyframes lineIn {
  from { transform: translate3d(0, 105%, 0); }
  to   { transform: none; }
}
@keyframes fadeScale {
  from { opacity: 0; transform: scale(.97); }
  to   { opacity: 1; transform: none; }
}

/* Hero load sequence. The headline is the one place motion is allowed to be
   the point; everything after it simply follows in reading order. */
/* Compressed on purpose: the whole sequence settles inside ~0.8s, and the
   headline (the first thing a visitor reads) starts moving at 0s flat — a
   blank gap before the first pixel of content appears is worse than skipping
   the choreography entirely, and the original 1.16s→1.44s tail read as
   broken far more than it read as polished. */
.js-motion .hero .eyebrow  { animation: rise .5s var(--ease-air) 0s   backwards; }
.js-motion .hero .lede     { animation: rise .5s var(--ease-air) .18s backwards; }
.js-motion .hero .btn-row  { animation: rise .5s var(--ease-air) .26s backwards; }
.js-motion .hero__note     { animation: rise .5s var(--ease-air) .32s backwards; }
.js-motion .hero__visual   { animation: fadeScale .7s var(--ease-air) .1s  backwards; }

.hero__h1 .line { display: block; overflow: hidden; }
.hero__h1 .line > span { display: block; }
.js-motion .hero__h1 .line > span {
  animation: lineIn var(--dur-enter) var(--ease-air) backwards;
}
.js-motion .hero__h1 .line:nth-child(1) > span { animation-delay: 0s; }
.js-motion .hero__h1 .line:nth-child(2) > span { animation-delay: .08s; }

/* Failsafe. `backwards` holds the pre-animation state during the delay, so if
   the animation clock never advances — a tab opened in the background, a
   throttled webview, a print or screenshot pipeline — the hero would sit
   invisible forever. script.js adds this class shortly after load and it wins,
   guaranteeing the finished state whether or not a single frame ever ran. */
.motion-settled .hero .eyebrow,
.motion-settled .hero .lede,
.motion-settled .hero .btn-row,
.motion-settled .hero__note,
.motion-settled .hero__visual,
.motion-settled .hero__h1 .line > span { animation: none !important; }

/* Ambient drift on the hero glow — the only ongoing motion above the fold,
   slow and small enough to register as atmosphere rather than movement. */
@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(3%, 2.5%, 0) scale(1.1); }
}
.aurora {
  animation: drift 15s cubic-bezier(.45,0,.55,1) infinite alternate;
  will-change: transform;
}

/* ── The engine loop actually runs ───────────────────────────────────────
   The page's central claim is a cycle that keeps repeating, so the diagram
   demonstrates it: one pulse orbits the ring and each stage lights as the
   pulse reaches it. Paused until scrolled into view (see script.js) so it
   costs nothing while off screen. */

@keyframes orbit {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
@keyframes hubBreathe {
  from { opacity: .55; }
  to   { opacity: 1; }
}

.loop__pulse {
  transform-box: view-box;
  transform-origin: 220px 220px;
  animation: orbit var(--loop-cycle) linear infinite;
  animation-play-state: paused;
  opacity: 0;
  transition: opacity .6s var(--ease-air);
}
.loop.is-running .loop__pulse { opacity: 1; animation-play-state: running; }

/* Each stage brightens as the pulse reaches it, then settles back. */
.loop.is-running .loop__node rect {
  animation: nodeGlow var(--loop-cycle) linear infinite;
  /* each stage lights a quarter-cycle apart, in the order the loop runs */
  animation-delay: calc((var(--step) - 1) * var(--loop-cycle) / 4);
}
/* The lit window straddles the cycle boundary (94%→100%/0%→8%) so a stage is
   brightest at the exact instant the pulse reaches it, then fades behind it.
   Lighting up after 0% would leave each stage glowing once the pulse had
   already moved on. */
@keyframes nodeGlow {
  0%, 8%     { stroke: #85a6e9; fill: #14294d; }
  24%, 94%   { stroke: #24375a; fill: #0d172b; }
  100%       { stroke: #85a6e9; fill: #14294d; }
}

.loop.is-running .loop__hub {
  animation: hubBreathe calc(var(--loop-cycle) / 4) ease-in-out infinite alternate;
}

/* ── Hover ───────────────────────────────────────────────────────────────
   Air keeps surfaces flat, so nothing here casts a shadow: cards lift a
   couple of pixels and brighten their hairline instead. */

.btn--primary:hover, .btn--ghost:hover { transform: translate3d(0, -1px, 0); }

/* ── Reveal on scroll ───────────────────────────────────────────────────── */

.reveal { opacity: 0; transform: translateY(14px); }
.reveal.is-in {
  opacity: 1; transform: none;
  transition: opacity .6s var(--ease-air), transform .6s var(--ease-air);
}

/* ── Responsive ─────────────────────────────────────────────────────────── */

@media (max-width: 1024px) {
  .hero__grid { grid-template-columns: 1fr; }
  /* Headline first on narrow screens — the diagram supports the promise, it
     doesn't make it, so it must never push the h1 below the fold. */
  .hero__visual { max-width: 380px; margin-inline: auto; }
}

@media (max-width: 900px) {
  .nav__toggle { display: flex; }
  .nav__menu {
    position: absolute; top: 100%; left: 0; right: 0; z-index: 1;
    display: none; flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px 24px 20px;
    background: rgba(8, 9, 12, .97);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--inkline);
    max-height: calc(100vh - 100%); overflow-y: auto;
  }
  .nav[data-open] .nav__menu { display: flex; }
  .nav__menu a { padding: 13px 0; font-size: 16px; border-bottom: 1px solid var(--inkline); }
  .nav__cta { margin-top: 16px; border-bottom: 0 !important; align-self: flex-start; }

  /* Scrim: dims and blocks the rest of the page while the dropdown is open,
     and gives the dropdown something to overlay rather than ending mid-hero.
     .nav__menu's explicit z-index keeps the dropdown itself painted above
     this even though both are positioned descendants of .nav. */
  .nav__scrim {
    display: none;
    position: fixed; inset: 0;
    background: rgba(4, 5, 7, .6);
  }
  .nav[data-open] .nav__scrim { display: block; }
}

/* Body scroll lock while the mobile menu is open (toggled by script.js). */
html.nav-locked, html.nav-locked body { overflow: hidden; }

@media (max-width: 760px) {
  .wrap { padding-inline: 20px; }
  .lead__grid { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .footer__inner { grid-template-columns: 1fr; gap: 36px; }
  .footer__cols { grid-template-columns: repeat(2, 1fr); }
  .card { padding: 22px; }
}

@media (max-width: 520px) {
  .logo__word { height: 11.5px; }
  .hero__visual { max-width: 320px; }
  .footer__cols { grid-template-columns: 1fr; gap: 28px; }
  .btn { width: 100%; }
  .btn-row { flex-direction: column; }
}

@media (max-width: 420px) {
  /* below this width the nowrap'd tagline no longer fits; wrapping is
     better than a horizontally scrolling page */
  .footer__tag { white-space: normal; letter-spacing: .14em; }
  /* keep the brand tagline on one line at phone widths */
  .eyebrow { font-size: 11.5px; letter-spacing: .15em; }
  .logo__word { height: 10.5px; }
  .logo { gap: 9px; }
}

/* ── Motion preferences ─────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .deck--js .deck__track { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    /* delays matter too: without this the staggered hero entrance would still
       withhold copy for up to 0.68s before snapping it in */
    animation-delay: 0s !important;
    transition-delay: 0s !important;
  }
  .reveal { opacity: 1; transform: none; }
  .loop__pulse { opacity: 0; }
  .hero__bg { transform: none !important; }
  .hero__spotlight { opacity: 0 !important; }
}
