/* Apex Current, website.
   Tokens from the product's own stylesheet. Dark is
   the default; light is one click away in the header. The page is a flat
   ground so the phone film, shot on the same ground, dissolves into it. */

:root,
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #15171a;
  --bg-raised: #1b1e21;
  --bg-sunk: #111315;
  --ink: #eff4f3;
  --ink-2: #bfc9c7;
  --ink-3: #8a9694;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);
  --accent: #3ae3cd;
  --accent-hover: #5eead4;
  --on-accent: #04302b;
  --accent-text: #6ceddb;
  --glow: rgba(58, 227, 205, 0.14);
  --shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.75);
  --header: rgba(21, 23, 26, 0.78);

  /* one colour per product, as marks */
  --amber: #fe9d2b;
  --sky: #1aa3dc;
  --violet: #a071fc;
  --blue: #3d7ef0;
  --magenta: #d25799;
  --green: #1aa65a;
  --apex: #3fdcc5;
  --on-apex: #10231f;
  /* and as words */
  --amber-text: #f8ab5e;
  --sky-text: #6dc9fe;
  --violet-text: #c4afff;
  --green-text: #7cd591;

  --logo-from: #19e0a6;
  --logo-to: #5eeac4;
  --mark-ring: rgba(255, 255, 255, 0.1);
}

[data-theme="light"] {
  color-scheme: light;
  --bg: #f4eaea;
  --bg-raised: #fbf6f6;
  --bg-sunk: #efe3e3;
  --ink: #0d2b28;
  --ink-2: #2f4f4b;
  --ink-3: #4a6461;
  --line: rgba(13, 43, 40, 0.1);
  --line-2: rgba(13, 43, 40, 0.18);
  --accent: #07564f;
  --accent-hover: #0b7a6e;
  --on-accent: #ffffff;
  --accent-text: #054841;
  --glow: rgba(10, 118, 107, 0.12);
  --shadow: 0 30px 70px -34px rgba(24, 48, 45, 0.45);
  --header: rgba(244, 234, 234, 0.8);

  --amber: #f08c14;
  --sky: #0791ca;
  --violet: #8b5cf6;
  --blue: #2065e0;
  --magenta: #ca488f;
  --green: #059a46;
  --apex: #1e1830;
  --on-apex: #2de3ad;
  --amber-text: #834c01;
  --sky-text: #03628b;
  --violet-text: #6443a4;
  --green-text: #046e30;

  --logo-from: #0a9c72;
  --logo-to: #19b98a;
  --mark-ring: rgba(13, 43, 40, 0.1);
}

/* ---------------------------------------------------------------- base */

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
}

body {
  font-family: "Instrument Sans", ui-sans-serif, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink-2);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

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

img, video, svg { display: block; max-width: 100%; }

.wrap {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding-left: clamp(16px, 4vw, 40px);
  padding-right: clamp(16px, 4vw, 40px);
}

.defs { position: absolute; width: 0; height: 0; overflow: hidden; }

h1, h2, h3 {
  font-family: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  color: var(--ink);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.08;
  font-variation-settings: "opsz" 96;
}

h2 { font-size: clamp(28px, 3.4vw, 42px); text-wrap: balance; }

h3 {
  font-size: 18px;
  line-height: 1.25;
  letter-spacing: -0.01em;
  font-variation-settings: "opsz" 24;
}

p { text-wrap: pretty; }

.mono {
  font-family: "Spline Sans Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* ------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 10px;
  font: 600 15px/1 "Instrument Sans", ui-sans-serif, system-ui, sans-serif;
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); }

.btn-ghost {
  background: transparent;
  border-color: var(--line-2);
  color: var(--ink);
}

.btn-ghost:hover { border-color: var(--ink-3); }

.btn-lg { height: 48px; padding: 0 22px; font-size: 16px; }

/* -------------------------------------------------------------- header */

.bar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease;
}

.bar.scrolled { border-bottom-color: var(--line); }

.bar .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo { display: block; height: 38px; flex: none; }
.logo svg { height: 100%; width: auto; }
/* The peak's gradient is defined once, in the page's shared defs. */
.s1 { stop-color: var(--logo-from); }
.s2 { stop-color: var(--logo-to); }

.bar-right { display: flex; align-items: center; gap: 12px; }
/* On a phone, one button opens the page's sections; on a desktop there is
   too little to scroll to need it. */
.icon-btn.menu-btn { display: none; }
[aria-expanded="true"].menu-btn .open,
[aria-expanded="false"].menu-btn .close { display: none; }

.mnav {
  border-top: 1px solid var(--line);
  background: var(--bg);
  padding: 6px clamp(16px, 4vw, 40px) 12px;
}

.mnav[hidden] { display: none; }

.mnav a {
  display: flex;
  align-items: center;
  height: 48px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-family: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  font-variation-settings: "opsz" 24;
  font-size: 19px;
  font-weight: 600;
  text-decoration: none;
}

.mnav a:last-child { border-bottom: 0; }

.icon-btn {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--line-2);
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.icon-btn:hover { color: var(--ink); border-color: var(--ink-3); }
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
[data-theme="dark"] .icon-btn .moon,
[data-theme="light"] .icon-btn .sun { display: none; }


@media (min-width: 701px) {
  .mnav { display: none !important; }
}

@media (max-width: 700px) {
  .icon-btn.menu-btn { display: grid; }
  .bar-right { gap: 8px; }
  .bar .wrap { height: 60px; }
  .logo { height: 30px; }
  .bar .btn { height: 36px; padding: 0 14px; font-size: 14px; }
  .icon-btn { width: 36px; height: 36px; }
}

/* ---------------------------------------------------------------- hero */

.hero {
  position: relative;
  padding: clamp(40px, 6vw, 72px) 0 clamp(56px, 8vw, 104px);
}

.hero::before {
  content: "";
  position: absolute;
  inset: -64px 0 auto 0;
  height: 560px;
  pointer-events: none;
  background: radial-gradient(60% 70% at 30% 0%, var(--glow), transparent 70%);
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  grid-template-areas: "qs side" "film film";
  align-items: end;
  column-gap: 48px;
  row-gap: clamp(32px, 4.5vw, 52px);
}

.qs { grid-area: qs; }
.hero-side { grid-area: side; }
.film { grid-area: film; }

/* The four questions, still, each with its word in the colour of the product
   that answers it. */
.qs {
  font-size: clamp(30px, 4.3vw, 58px);
  font-weight: 650;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.q {
  position: relative;
  display: block;
  width: fit-content;
  color: var(--ink);
}

.q em {
  font-style: normal;
  color: var(--q);
}

.hero-side { padding-bottom: 0.35em; }

.lede {
  font-size: clamp(16px, 1.45vw, 18px);
  line-height: 1.55;
  color: var(--ink-2);
}

.lede + .lede { margin-top: 12px; }

/* the film */
.film {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  overflow: hidden;
  background: var(--bg-sunk);
  border: 1px solid var(--line-2);
  box-shadow: var(--shadow);
}

.film video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.film-btn {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 2;
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(10, 14, 13, 0.55);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: #ffffff;
  font: 600 13px/1 "Instrument Sans", ui-sans-serif, system-ui, sans-serif;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.film:hover .film-btn,
.film-btn:focus-visible,
.film.paused .film-btn { opacity: 1; }

/* Before the film has ever played (reduced motion, a slow connection, a
   phone in low power mode): the poster, and one clear way to start it. */
.film-play {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: none;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.film-play span {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  padding: 0 20px 0 16px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font: 600 15px/1 "Instrument Sans", ui-sans-serif, system-ui, sans-serif;
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.5);
}

.film-play svg { width: 14px; height: 14px; fill: currentColor; }

.film.idle .film-play { display: flex; }
.film.idle .film-btn { display: none; }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; grid-template-areas: "qs" "side" "film"; row-gap: 24px; }
  .hero-side { padding-bottom: 0; }
}

/* On a phone the film is its own portrait cut: the model and its labels on
   the page's own ground, edge to edge, fading into the page. */
@media (max-width: 700px) {
  .hero { padding-top: 28px; padding-bottom: 48px; }
  .hero::before { height: 420px; background: radial-gradient(90% 60% at 20% 0%, var(--glow), transparent 70%); }
  .hero-grid { grid-template-areas: "qs" "film" "side"; row-gap: 4px; }
  .qs { font-size: min(7.6vw, 34px); }
  .hero-side { margin-top: 12px; }
  .film {
    aspect-ratio: 4 / 5;
    margin: -20px calc(-1 * clamp(16px, 4vw, 40px)) 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: var(--bg);
    -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 9%, #000 90%, transparent 100%);
    mask-image: linear-gradient(to bottom, transparent 0, #000 9%, #000 90%, transparent 100%);
  }
  .film-btn { opacity: 1; right: 16px; bottom: 16px; }
}

/* ------------------------------------------------------------ sections */

.band { padding: clamp(64px, 8vw, 104px) 0; }
.band + .band { border-top: 1px solid var(--line); }

.band-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-bottom: clamp(28px, 4vw, 44px);
}

.band-head p { color: var(--ink-3); font-size: 16px; max-width: 42ch; }

.band-head.stacked { display: block; margin-bottom: 20px; }
.band-head .eyebrow { display: block; margin-bottom: 12px; color: var(--accent-text); }
.band-head.stacked p { margin-top: 12px; max-width: 58ch; font-size: 17px; }

/* the living database, named */
.drivers {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-bottom: clamp(28px, 4vw, 40px);
}

.drivers ul { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }

.drivers li {
  height: 30px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: var(--bg-raised);
  font-size: 13.5px;
  color: var(--ink);
}

.live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: "Spline Sans Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-text);
}

.live i {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.live i::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1.5px solid var(--accent);
  opacity: 0;
  animation: pulse 2.4s ease-out infinite;
}

@keyframes pulse {
  0% { transform: scale(0.5); opacity: 0.8; }
  100% { transform: scale(1.6); opacity: 0; }
}

.grid3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

@media (max-width: 980px) {
  .grid3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .grid3 { grid-template-columns: 1fr; gap: 16px; }
  /* One card to a row: each drawing takes the height it needs. */
  .grid3 .viz { height: auto; min-height: 220px; }
  .grid3 .viz svg.fit { height: auto; }
}

.card {
  display: flex;
  flex-direction: column;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 10px;
  transition: border-color 0.2s ease;
}

.card:hover { border-color: var(--line-2); }

.card-text { padding: 16px 10px 10px; }

.name {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.card-text p { font-size: 15px; color: var(--ink-2); }

.mark {
  flex: none;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 26%;
  background: var(--hue);
  color: var(--on-hue, #ffffff);
  box-shadow: inset 0 0 0 1px var(--mark-ring);
}

.mark svg {
  width: 64%;
  height: 64%;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mark-lg { width: 40px; height: 40px; }

/* ------------------------------------------------------------ graphics */

.viz {
  position: relative;
  height: 232px;
  border-radius: 12px;
  background: var(--bg-sunk);
  border: 1px solid var(--line);
  overflow: hidden;
  color: var(--ink);
}

.viz svg.fit { width: 100%; height: 100%; }

.viz text { font-family: "Instrument Sans", ui-sans-serif, system-ui, sans-serif; }
.viz .t-mono { font-family: "Spline Sans Mono", ui-monospace, monospace; font-size: 9.5px; letter-spacing: 0.06em; fill: var(--ink-3); }
.viz .t-ink { fill: var(--ink); }
.viz .t-ink2 { fill: var(--ink-2); }
.viz .t-mute { fill: var(--ink-3); }
.viz .f-hue { fill: var(--hue); }
.viz .f-track { fill: color-mix(in srgb, var(--hue) 16%, transparent); }
.viz .f-neutral { fill: color-mix(in srgb, var(--ink) 26%, transparent); }
.viz .f-ink { fill: var(--ink); }
.viz .f-bg { fill: var(--bg-sunk); }
.viz .f-raised { fill: var(--bg-raised); }
.viz .s-hue { stroke: var(--hue); fill: none; }
.viz .s-line { stroke: var(--line-2); fill: none; }
.viz .s-bg { stroke: var(--bg-sunk); }
.viz .pill-box { fill: var(--bg-raised); stroke: var(--line-2); stroke-width: 1; }
.viz .hub-box { fill: var(--bg-raised); stroke: var(--hue); stroke-width: 1.5; }
.viz .dim { opacity: 0.55; }

/* the three data layers */
.viz .lay1 { fill: var(--hue); }
.viz .lay1-side { fill: color-mix(in srgb, var(--hue) 72%, #000); }
.viz .lay1-side2 { fill: color-mix(in srgb, var(--hue) 56%, #000); }
.viz .lay2 { fill: color-mix(in srgb, var(--hue) 46%, var(--bg-sunk)); }
.viz .lay2-side { fill: color-mix(in srgb, var(--hue) 32%, var(--bg-sunk)); }
.viz .lay2-side2 { fill: color-mix(in srgb, var(--hue) 24%, var(--bg-sunk)); }
.viz .lay3 { fill: color-mix(in srgb, var(--hue) 22%, var(--bg-sunk)); }
.viz .lay3-side { fill: color-mix(in srgb, var(--hue) 15%, var(--bg-sunk)); }
.viz .lay3-side2 { fill: color-mix(in srgb, var(--hue) 10%, var(--bg-sunk)); }

/* the cost sheet, drawn */
.sheet { padding: 18px 20px; display: flex; flex-direction: column; height: 100%; }

.sheet-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 18px; }

.figure { font-size: 30px; font-weight: 600; line-height: 1.05; color: var(--ink); letter-spacing: -0.01em; }
.figure-sm { font-size: 15px; font-weight: 600; color: var(--ink); margin-top: 6px; }

.key { display: inline-flex; align-items: center; gap: 6px; }
.key i { width: 8px; height: 8px; border-radius: 3px; background: var(--k); }

.rows { display: grid; gap: 11px; }

.row {
  display: grid;
  grid-template-columns: 66px 1fr 50px;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
}

.row span:first-child { color: var(--ink-2); }
.row span:last-child { text-align: right; color: var(--ink); font-variant-numeric: tabular-nums; }

.track { height: 8px; border-radius: 0 4px 4px 0; background: color-mix(in srgb, var(--hue) 16%, transparent); overflow: hidden; }
.track i { display: block; height: 100%; width: var(--w); border-radius: 0 4px 4px 0; background: var(--hue); }

/* the quote against the should-cost */
.gap { padding: 18px 20px; display: flex; flex-direction: column; height: 100%; }

.gap-bars { display: grid; gap: 12px; margin: 14px 0 0; }

.gap-bar { display: grid; gap: 6px; }

.gap-label { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--ink-2); }
.gap-label b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }

.gap-track { position: relative; height: 12px; }
.gap-track i { position: absolute; top: 0; bottom: 0; left: 0; border-radius: 0 4px 4px 0; }
.gap-track .base { width: var(--w); background: color-mix(in srgb, var(--ink) 30%, transparent); }
.gap-track .room { left: calc(var(--from) + 2px); width: calc(var(--w) - var(--from) - 2px); background: var(--hue); }

.gap-note { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 13px; font-weight: 600; color: var(--ink); }
.gap-note i { width: 8px; height: 8px; border-radius: 3px; background: var(--hue); }

.chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: auto; }

.chip {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--hue) 55%, transparent);
  background: color-mix(in srgb, var(--hue) 10%, transparent);
  font-size: 11.5px;
  color: var(--ink);
  white-space: nowrap;
}

/* suggestions, as Apex Suggest raises them */
.ideas { padding: 14px 14px 14px 16px; display: flex; flex-direction: column; height: 100%; }
.ideas ul { list-style: none; display: grid; gap: 7px; margin-top: 10px; }
.ideas li {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 12px;
  padding: 6px 10px 7px 13px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--hue) 8%, transparent);
  overflow: hidden;
}
.ideas li::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--hue); }
.ideas .tag { font-family: "Spline Sans Mono", ui-monospace, monospace; font-size: 9.5px; line-height: 1.35; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); }
.ideas .save { text-align: right; white-space: nowrap; }
.ideas .save b { display: block; font-size: 14px; font-weight: 600; line-height: 1.2; color: var(--ink); }
.ideas .save small { display: block; margin-top: 1px; font-size: 10.5px; line-height: 1.3; color: var(--ink-3); }
.ideas p { margin-top: 1px; font-size: 12.5px; line-height: 1.35; color: var(--ink); }

/* enterprise security, at a glance */
.secure { display: grid; grid-template-columns: 56px minmax(0, 1fr); align-items: center; gap: 14px; height: 100%; padding: 16px 18px; }
.secure svg { width: 56px; height: auto; }
.secure .shield { fill: color-mix(in srgb, var(--hue) 14%, transparent); stroke: var(--hue); stroke-width: 2; stroke-linejoin: round; }
.secure .tick { fill: none; stroke: var(--hue); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.checks { list-style: none; display: grid; gap: 8px; }
.checks li { display: grid; grid-template-columns: 16px 1fr; gap: 9px; align-items: center; font-size: 12px; line-height: 1.3; color: var(--ink); }

@media (max-width: 420px) {
  .secure { grid-template-columns: 44px minmax(0, 1fr); gap: 12px; padding: 16px 14px; }
  .secure svg { width: 44px; }
}
.checks li::before {
  content: "";
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--hue) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.4l2.3 2.3 4.7-4.9' fill='none' stroke='white' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px no-repeat;
}

/* the audit trail */
.log { padding: 18px 20px; display: flex; flex-direction: column; height: 100%; }

.log ol { list-style: none; position: relative; display: grid; gap: 14px; margin-top: 14px; }

.log ol::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: color-mix(in srgb, var(--hue) 40%, transparent);
}

.log li { position: relative; display: grid; grid-template-columns: 9px 40px 1fr; gap: 10px; align-items: baseline; font-size: 12.5px; color: var(--ink-2); }
.log li::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--hue); box-shadow: 0 0 0 2px var(--bg-sunk); transform: translateY(1px); }
.log time { font-family: "Spline Sans Mono", ui-monospace, monospace; font-size: 11px; color: var(--ink-3); }

.lock {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

.lock svg { width: 16px; height: 16px; fill: none; stroke: var(--hue); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* run by Apex */
.services {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.service {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.service h3 { margin-bottom: 4px; }
.service p { font-size: 15px; color: var(--ink-2); }

@media (max-width: 640px) {
  .services { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------- team */

.team {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 40px;
  align-items: center;
  max-width: 920px;
}

.portrait {
  aspect-ratio: 1;
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(180deg, #d6dde0, #aeb9bd);
  border: 1px solid var(--line);
}

.portrait img { width: 100%; height: 100%; object-fit: cover; object-position: top; }

.team h2 { margin-bottom: 14px; }
.team p { font-size: 17px; color: var(--ink-2); max-width: 56ch; }
.team p + p { margin-top: 10px; }

.who { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px; margin-top: 20px; font-size: 15px; }
.who b { color: var(--ink); font-weight: 600; }
.who span { color: var(--ink-3); }
.who a { color: var(--accent-text); font-weight: 600; text-decoration: none; }
.who a:hover { text-decoration: underline; }

@media (max-width: 700px) {
  .team { grid-template-columns: 1fr; gap: 24px; }
  .portrait { width: 160px; }
}

.asi { margin-top: 44px; padding-top: 28px; border-top: 1px solid var(--line); max-width: 920px; }
.asi .mono { display: block; margin-bottom: 16px; }
.asi-stats { display: flex; flex-wrap: wrap; gap: 16px 48px; margin-bottom: 16px; }
.asi-stats div { display: flex; align-items: baseline; gap: 10px; }
.asi-stats b {
  font-family: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  font-variation-settings: "opsz" 96;
  font-size: 34px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.asi-stats span { font-size: 15px; color: var(--ink-2); }
.asi-industries { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.asi-industries li {
  height: 30px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  font-size: 13.5px;
  color: var(--ink);
}
.asi p { font-size: 15px; color: var(--ink-3); max-width: 70ch; }

/* -------------------------------------------------------------- footer */

footer {
  border-top: 1px solid var(--line);
  background: var(--bg-sunk);
  padding: clamp(44px, 6vw, 64px) 0 28px;
  font-size: 14px;
  color: var(--ink-3);
}

.foot {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 36px clamp(32px, 6vw, 96px);
  align-items: start;
}

.foot-brand .logo { height: 38px; }

.foot-brand p {
  margin-top: 16px;
  max-width: 27ch;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink-2);
}

.foot-cols {
  display: grid;
  grid-template-columns: repeat(3, auto);
  justify-content: space-between;
  gap: 32px 40px;
}

.foot-col .mono { margin-bottom: 14px; }

.foot-col ul { list-style: none; display: grid; gap: 12px; }

.foot-col a,
.foot-col button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: var(--ink-2);
  text-decoration: none;
  cursor: pointer;
}

.foot-col a:hover,
.foot-col button:hover { color: var(--ink); }

.foot-col button { gap: 8px; }

.copy-ico {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.6;
}

.copy-btn:hover .copy-ico { opacity: 1; }

.mark-sm { width: 20px; height: 20px; }

.foot-base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  margin-top: clamp(40px, 5vw, 56px);
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.foot-legal { display: flex; gap: 22px; }
.foot-legal a { color: var(--ink-3); text-decoration: none; }
.foot-legal a:hover { color: var(--ink); }

@media (max-width: 860px) {
  .foot { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .foot-brand .logo { height: 32px; }
  .foot-cols { grid-template-columns: 1fr 1fr; justify-content: stretch; gap: 28px 16px; }
  .foot-col:last-child { grid-column: 1 / -1; }
}

/* --------------------------------------------------------- policy pages */

.policy {
  max-width: 760px;
  padding: clamp(40px, 6vw, 72px) 0 clamp(64px, 9vw, 104px);
}

.policy h1 { font-size: clamp(34px, 5vw, 52px); margin-bottom: 10px; }

.policy .updated { display: block; margin-bottom: 28px; }

.policy h2 { font-size: 21px; margin: 32px 0 10px; font-variation-settings: "opsz" 24; }

.policy p { margin-bottom: 14px; font-size: 16px; }

.policy a { color: var(--accent-text); }

.contact-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; margin-top: 18px; }

.email { font-family: "Spline Sans Mono", ui-monospace, monospace; font-size: 14px; color: var(--ink); }

/* ------------------------------------------------------------ motion */

.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.6s ease, transform 0.6s ease; transition-delay: var(--d, 0s); }
.reveal.in { opacity: 1; transform: none; }
/* A card linked to directly is already in place, so the jump lands on it. */
.reveal:target { opacity: 1; transform: none; transition: none; }

/* ---------------------------------------------------------- copied, notice */

.copied {
  position: fixed;
  z-index: 70;
  padding: 7px 11px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--bg);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.16s ease, transform 0.16s ease;
  box-shadow: 0 10px 24px -10px rgba(0, 0, 0, 0.45);
}
.copied.below { transform: translateY(-4px); }
.copied.show { opacity: 1; transform: none; }
.copied::after {
  content: "";
  position: absolute;
  left: var(--arrow, 50%);
  width: 8px;
  height: 8px;
  background: inherit;
  transform: translateX(-50%) rotate(45deg);
}
.copied:not(.below)::after { bottom: -4px; }
.copied.below::after { top: -4px; }

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


.notice {
  position: fixed;
  left: 50%;
  bottom: 16px;
  z-index: 55;
  display: none;
  align-items: center;
  gap: 14px;
  width: calc(100% - 32px);
  max-width: 460px;
  transform: translateX(-50%);
  padding: 10px 10px 10px 16px;
  border-radius: 12px;
  background: var(--bg-raised);
  border: 1px solid var(--line-2);
  box-shadow: var(--shadow);
  font-size: 14px;
  color: var(--ink-2);
}

.notice.show { display: flex; }
.notice p { flex: 1; }
.notice a { color: var(--accent-text); }
.notice .btn { height: 34px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .live i::after { animation: none; }
}

/* --------------------------------------------------------- the recorded run */

.run {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
}

.run-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}

.run-meta { font-size: 13.5px; color: var(--ink-3); }
.run-replay { margin-left: auto; height: 34px; font-size: 14px; }

.run-body {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  grid-template-areas: "you trace" "ans trace";
  align-items: start;
  gap: 16px 28px;
  padding: 20px 18px 22px;
}

.msg { padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg-sunk); }
.msg .mono { display: block; margin-bottom: 8px; }
.msg-you { grid-area: you; }
.msg-you p { font-size: 15px; line-height: 1.55; color: var(--ink); }
.msg-apex { grid-area: ans; transition: opacity 0.5s ease; }
.run-price { font-size: 15px; color: var(--ink-2); margin-bottom: 12px; }
.run-price b { font-size: 26px; font-weight: 600; color: var(--ink); margin-right: 4px; }
.run-rows { gap: 8px; }
.run-rows .row { grid-template-columns: 76px 1fr 56px; }
.run-note { margin-top: 12px; font-size: 13px; color: var(--ink-3); }

.run-trace { grid-area: trace; }

.steps { list-style: none; display: grid; gap: 12px; }

.step { transition: opacity 0.3s ease; }
.step.sub { margin-left: 18px; padding-left: 12px; border-left: 1px solid var(--line-2); }

.step-top { display: flex; align-items: baseline; gap: 10px; margin-bottom: 6px; font-size: 13.5px; }
.step .who { flex: none; font-weight: 600; color: var(--ink); }
.step .what { flex: 1; min-width: 0; color: var(--ink-2); }
.step .dur { flex: none; font-variant-numeric: tabular-nums; color: var(--ink-3); font-size: 12.5px; }

.track-t {
  position: relative;
  height: 10px;
  border-radius: 3px;
  background: color-mix(in srgb, var(--ink) 6%, transparent);
}

.track-t i {
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(var(--s) / var(--total) * 100%);
  width: max(6px, calc((var(--e) - var(--s)) / var(--total) * 100%));
  border-radius: 3px;
  background: var(--violet);
  transform-origin: left center;
  transform: scaleX(var(--f, 1));
}

.step[data-kind="engine"] .track-t i { background: var(--amber); box-shadow: 0 0 0 3px color-mix(in srgb, var(--amber) 30%, transparent); }
.step[data-kind="engine"] .who { color: var(--amber-text); }
.step[data-kind="handoff"] .track-t i { background: transparent; border: 1.5px solid var(--ink-3); }

/* the steps sit under one clock: 0 to 38 seconds */
.axis { position: relative; height: 18px; margin-top: 8px; font-size: 11.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.axis span { position: absolute; top: 0; }
.axis span:nth-child(1) { left: 0; }
.axis span:nth-child(2) { left: calc(10 / 38.2 * 100%); }
.axis span:nth-child(3) { left: calc(20 / 38.2 * 100%); }
.axis span:nth-child(4) { left: calc(30 / 38.2 * 100%); }

.legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 10px; font-size: 12.5px; color: var(--ink-2); }
.legend .key i { width: 10px; height: 10px; border-radius: 3px; background: var(--k); }
.legend .key-outline i { background: transparent; border: 1.5px solid var(--ink-3); }

/* played once as it comes into view: bars grow on a compressed clock */
.run.anim .step { opacity: 0.25; }
.run.anim .step.on { opacity: 1; }
.run.anim .msg-apex { opacity: 0.25; }
.run.anim.done .msg-apex { opacity: 1; }

@media (max-width: 860px) {
  .run-body { grid-template-columns: 1fr; grid-template-areas: "you" "trace" "ans"; }
}

@media (max-width: 480px) {
  .step-top { flex-wrap: wrap; row-gap: 2px; }
  .step .what { flex-basis: 100%; order: 3; }
  .step .dur { margin-left: auto; }
}

/* --------------------------------------------------------- the engine, explained */

.flow {
  display: grid;
  grid-template-columns: 1fr 1.15fr 1fr 1.15fr 1fr;
  gap: 14px;
  align-items: stretch;
}

.node, .gate {
  position: relative;
  padding: 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--bg-raised);
}

.node .mono, .gate .mono { display: block; margin-bottom: 8px; }
.node h3, .gate h3 { font-size: 17px; margin-bottom: 6px; }
.node p, .gate p { font-size: 13.5px; color: var(--ink-2); }
.node ul { list-style: none; display: grid; gap: 5px; font-size: 13.5px; color: var(--ink-2); }
.node ul li::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 8px; border-radius: 50%; background: var(--k, var(--ink-3)); transform: translateY(-2px); }

.node-ai { --k: var(--violet); border-color: color-mix(in srgb, var(--violet) 45%, transparent); }
.node-ai .mono { color: var(--violet-text); }
.node-engine { --k: var(--amber); border-color: color-mix(in srgb, var(--amber) 45%, transparent); }
.node-engine .mono { color: var(--amber-text); }
.node-out h3 { font-size: 22px; }

.gate {
  border-style: solid;
  background: var(--bg-sunk);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.gate code {
  display: block;
  margin-bottom: 10px;
  font-family: "Spline Sans Mono", ui-monospace, monospace;
  font-size: 11.5px;
  line-height: 1.55;
  color: var(--ink);
  word-break: break-word;
}

/* arrows between the steps */
.flow > * + *::before {
  content: "";
  position: absolute;
  left: -11px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-top: 1.5px solid var(--ink-3);
  border-right: 1.5px solid var(--ink-3);
  transform: translateY(-50%) rotate(45deg);
}

@media (max-width: 980px) {
  .flow { grid-template-columns: 1fr; gap: 16px; }
  .flow > * + *::before { left: 50%; top: -12px; transform: translateX(-50%) rotate(135deg); }
}

.facts { margin-top: clamp(36px, 5vw, 56px); }
.facts-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 20px; margin-bottom: 16px; }
.facts-note { font-size: 13.5px; color: var(--ink-3); }

.facts-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}

.fact { display: flex; flex-direction: column; gap: 4px; padding: 18px 20px 20px; background: var(--bg-raised); }
.fact b { font-size: 34px; font-weight: 600; line-height: 1.1; letter-spacing: -0.02em; color: var(--ink); }
.fact-label { font-size: 15px; font-weight: 600; color: var(--ink); }
.fact-sub { font-size: 13.5px; color: var(--ink-3); }

@media (max-width: 760px) {
  .facts-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fact { padding: 14px 14px 16px; }
  .fact b { font-size: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  .step, .msg-apex { transition: none; }
}
