/* =========================================================================
   GTEX/STUDIO — Section-specific styles
   Composes locked tokens from styles.css. No magic numbers.
   ========================================================================= */

/* =========================================================================
   Shared section primitives
   ========================================================================= */

.bg-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse at center, rgba(0,0,0,0.6), transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at center, rgba(0,0,0,0.6), transparent 70%);
}

.grad-mesh {
  position: absolute; inset: 0;
  filter: blur(80px);
  opacity: 0.55;
  pointer-events: none;
}
.grad-mesh__b1, .grad-mesh__b2, .grad-mesh__b3 {
  position: absolute;
  border-radius: 50%;
  mix-blend-mode: screen;
}
.grad-mesh__b1 { top: 10%; left: 10%; width: 480px; height: 480px; background: rgba(124,92,255,0.45); animation: mesh-1 60s var(--ease-smooth) infinite; }
.grad-mesh__b2 { bottom: 5%; right: 8%; width: 520px; height: 520px; background: rgba(0,229,255,0.32); animation: mesh-2 60s var(--ease-smooth) infinite; }
.grad-mesh__b3 { top: 40%; left: 55%; width: 360px; height: 360px; background: rgba(255,77,216,0.25); animation: mesh-3 60s var(--ease-smooth) infinite; }
@keyframes mesh-1 { 0%,100% { transform: translate(0,0); } 33% { transform: translate(120px,80px); } 66% { transform: translate(-60px,180px); } }
@keyframes mesh-2 { 0%,100% { transform: translate(0,0); } 33% { transform: translate(-100px,-60px); } 66% { transform: translate(80px,-160px); } }
@keyframes mesh-3 { 0%,100% { transform: translate(0,0); } 50% { transform: translate(-180px,120px); } }

.scroll-hint {
  position: absolute;
  bottom: 32px; left: 50%;
  transform: translateX(-50%);
  z-index: var(--z-text);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase;
}
.scroll-hint__line {
  width: 1px; height: 28px;
  background: linear-gradient(to bottom, transparent, var(--text-muted), transparent);
  position: relative; overflow: hidden;
}
.scroll-hint__line::after {
  content: ""; position: absolute; top: -100%; left: 0; right: 0; height: 50%;
  background: linear-gradient(to bottom, transparent, var(--cyan));
  animation: scroll-bead 1.8s var(--ease-smooth) infinite;
}
@keyframes scroll-bead { 0% { top: -100%; } 100% { top: 200%; } }

/* =========================================================================
   Section 1 — HERO
   Layered (z-stack):
     bg     — radial mesh gradient (z=0)
     motion — canvas particles + gradient wordmark (z=1)
     text   — content grid (z=10)
     ctrls  — buttons (z=20)
   ========================================================================= */
.s-hero { background: var(--bg); }
.s-hero__bg {
  background:
    radial-gradient(ellipse 80% 60% at 50% 110%, rgba(124,92,255,0.22), transparent 60%),
    radial-gradient(ellipse 50% 40% at 80% 0%,   rgba(0,229,255,0.10), transparent 60%),
    radial-gradient(ellipse 30% 30% at 10% 30%,  rgba(255,77,216,0.06), transparent 70%),
    var(--bg);
  animation: hero-bg-pan 60s linear infinite;
}
@keyframes hero-bg-pan {
  0%,100% { background-position: 0 0, 0 0, 0 0, 0 0; }
  50%     { background-position: -6% 4%, 4% -4%, 6% -3%, 0 0; }
}

.s-hero__canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  display: block;
  pointer-events: none;
}

.s-hero__wordmark {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  flex-direction: column;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, #7C5CFF 0%, #00E5FF 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  opacity: 0;
  transition: opacity 800ms var(--ease-smooth), transform 800ms var(--ease-smooth);
  pointer-events: none;
}
.s-hero__wordmark-mark {
  font-size: clamp(96px, 13vw, 220px);
  line-height: 0.92;
  display: block;
}
.s-hero__wordmark-sub {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: clamp(28px, 4vw, 70px);
  letter-spacing: 0.02em;
  margin-top: -0.08em;
  display: block;
}
.s-hero__wordmark.phase-2,
.s-hero__wordmark.phase-3 { opacity: 0.95; }
.s-hero__wordmark.phase-4 { opacity: 0; transform: translateY(-12px); }

/* Content grid — content occupies cols 2-11, vertically centered */
.s-hero__inner { align-content: center; align-items: center; }
.s-hero__content {
  grid-column: 2 / 12;
  align-self: center;
  position: relative;
  z-index: var(--z-text);
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.s-hero__eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  opacity: 0;
  transition: opacity 600ms var(--ease-smooth);
}
.s-hero__eyebrow[data-vis="true"] { opacity: 1; }
.s-hero__live-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #18A957;
  box-shadow: 0 0 0 0 rgba(24,169,87,0.6);
  animation: hero-dot-pulse 2.4s ease-out infinite;
}
@keyframes hero-dot-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(24,169,87,0.55); }
  70%  { box-shadow: 0 0 0 8px rgba(24,169,87,0); }
  100% { box-shadow: 0 0 0 0 rgba(24,169,87,0); }
}

.s-hero__title {
  font-family: var(--font-display);
  font-size: clamp(44px, 7vw, 104px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 600;
  margin: 0;
  max-width: 18ch;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.s-hero__title em {
  font-style: normal;
  background: linear-gradient(135deg, #7C5CFF 0%, #00E5FF 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
/* Stage-based reveal — clean, no per-character math */
.reveal-mask .line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.06em;          /* keep descender room so masks don't clip */
}
.reveal-mask .line .word {
  display: inline-block;
  transform: translateY(110%);
  transition: transform 900ms var(--ease-smooth);
  will-change: transform;
}
.reveal-mask.stage-1 .line:nth-child(1) .word { transform: translateY(0); }
.reveal-mask.stage-2 .line:nth-child(1) .word { transform: translateY(0); }
.reveal-mask.stage-2 .line:nth-child(2) .word { transform: translateY(0); transition-delay: 80ms; }
.reveal-mask.stage-3 .line:nth-child(1) .word { transform: translateY(0); }
.reveal-mask.stage-3 .line:nth-child(2) .word { transform: translateY(0); transition-delay: 80ms; }

.s-hero__sub {
  max-width: 56ch;
  font-size: clamp(15px, 1.2vw, 18px);
  line-height: 1.6;
  color: var(--text-muted);
  margin: 0;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 800ms var(--ease-smooth), transform 800ms var(--ease-smooth);
}
.s-hero__sub[data-vis="true"] { opacity: 1; transform: none; }

.s-hero__ctas {
  display: flex; gap: 12px; flex-wrap: wrap;
  margin-top: 8px;
  opacity: 0;
  transform: scale(0.96);
  transition: opacity 600ms var(--ease-smooth), transform 600ms var(--ease-elastic);
}
.s-hero__ctas[data-vis="true"] { opacity: 1; transform: none; }

.s-hero__meta {
  display: flex; align-items: center; gap: 24px; flex-wrap: wrap;
  border-top: 1px solid var(--border);
  margin-top: 28px;
  padding-top: 18px;
  opacity: 0;
  transition: opacity 600ms var(--ease-smooth) 200ms;
}
.s-hero__meta[data-vis="true"] { opacity: 1; }
.s-hero__meta-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-dim);
  flex-shrink: 0;
}
.s-hero__meta-marquee {
  flex: 1 1 0;
  min-width: 0;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 88%, transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 88%, transparent 100%);
}
.s-hero__meta-track {
  display: flex;
  width: max-content;
  animation: hero-marquee 52s linear infinite;
  will-change: transform;
}
.s-hero__meta-marquee:hover .s-hero__meta-track,
.s-hero__meta-marquee:focus-within .s-hero__meta-track {
  animation-play-state: paused;
}
.s-hero__meta-group {
  display: flex;
  align-items: center;
  gap: 28px;
  padding-right: 28px;
  flex-shrink: 0;
}
.s-hero__logo {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  white-space: nowrap;
  color: var(--text-muted);
  transition: color 240ms var(--ease-smooth);
}
.s-hero__logo:hover { color: var(--text); }
.s-hero__logo-sep {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  opacity: 0.5;
}
@keyframes hero-marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .s-hero__meta-track { animation: none; }
}

.s-hero__scroll-hint {
  position: absolute;
  bottom: 28px; left: 50%;
  transform: translateX(-50%);
  z-index: var(--z-text);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: 0.24em;
  color: var(--text-dim);
  opacity: 0.7;
}
.s-hero__scroll-line {
  width: 1px; height: 36px;
  background: linear-gradient(to bottom, transparent, var(--text-dim), transparent);
  position: relative; overflow: hidden;
}
.s-hero__scroll-line::after {
  content: ""; position: absolute; left: 0; right: 0; top: -50%;
  height: 50%;
  background: linear-gradient(to bottom, transparent, var(--cyan));
  animation: hero-scroll-bead 2s var(--ease-smooth) infinite;
}
@keyframes hero-scroll-bead {
  0%   { top: -50%; }
  100% { top: 150%; }
}

/* ---------- Responsive ---------- */

/* Tablet */
@media (max-width: 1024px) {
  .s-hero__content { grid-column: 1 / -1; gap: 20px; }
  .s-hero__title   { font-size: clamp(40px, 7vw, 80px); }
  .s-hero__meta-group { gap: 22px; padding-right: 22px; }
}

/* Small tablet & large phone */
@media (max-width: 768px) {
  .s-hero__wordmark-mark { font-size: clamp(80px, 16vw, 140px); }
  .s-hero__wordmark-sub  { font-size: clamp(22px, 5vw, 44px); }
  .s-hero__title { font-size: clamp(36px, 9vw, 68px); max-width: 100%; }
  .s-hero__sub   { font-size: 15px; }
  .s-hero__meta  { gap: 16px; }
}

/* Mobile */
@media (max-width: 520px) {
  .s-hero__content { gap: 18px; }
  .s-hero__title   { font-size: clamp(34px, 11vw, 52px); }
  .s-hero__sub     { font-size: 14px; max-width: 100%; }
  .s-hero__ctas .btn { padding: 12px 18px; font-size: 13px; }
  .s-hero__meta { display: none; }
  .s-hero__scroll-hint { bottom: 16px; }
  .s-hero__eyebrow { font-size: 10px; gap: 8px; }
  .s-hero__eyebrow span:last-child { white-space: normal; }
}

/* Short viewports — landscape phones (iPhone landscape ~375h, Pixel ~393h).
   Compress safe zones, shrink type, hide non-essential rows. */
@media (max-height: 500px) {
  .s-hero {
    --safe-top: 72px;
    --safe-bottom: 16px;
  }
  .s-hero__content { gap: 10px; }
  .s-hero__eyebrow { font-size: 9px; letter-spacing: 0.16em; gap: 6px; margin-bottom: 0; }
  .s-hero__title   { font-size: clamp(26px, 5.4vw, 44px); line-height: 1; max-width: 22ch; }
  .s-hero__sub     { font-size: 12px; line-height: 1.5; max-width: 64ch; }
  .s-hero__ctas    { margin-top: 4px; gap: 8px; }
  .s-hero__ctas .btn { padding: 9px 14px; font-size: 12px; }
  .s-hero__meta        { display: none; }
  .s-hero__scroll-hint { display: none; }
  .s-hero__wordmark-mark { font-size: clamp(60px, 11vw, 110px); }
  .s-hero__wordmark-sub  { font-size: clamp(20px, 3.6vw, 36px); }
  .section__index { bottom: 12px; font-size: 9px; }
}

/* =========================================================================
   Section 2 — ORBIT
   ========================================================================= */
.s-orbit__inner {
  align-content: center;
  align-items: center;
}
.s-orbit__head {
  grid-column: 2 / 6;
  align-self: center;
  padding-top: 0;
  max-width: 540px;
}
.s-orbit__head h2 { margin-top: 16px; }
.s-orbit__head p  { margin-top: 18px; max-width: 460px; }
.s-orbit__stage {
  grid-column: 6 / 10;
  position: relative;
  align-self: center;
  width: 100%;
  aspect-ratio: 1 / 1;
  max-height: min(60vh, 560px);
  min-height: 420px;
}
.s-orbit__lines {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  overflow: visible;
}
.s-orbit__lines line {
  stroke: rgba(255,255,255,0.05);
  stroke-width: 1;
  stroke-linecap: round;
  transition: stroke 450ms var(--ease-smooth), stroke-width 450ms var(--ease-smooth),
              opacity 450ms var(--ease-smooth), filter 450ms var(--ease-smooth);
}
.s-orbit__lines line.lit {
  stroke: var(--cyan);
  stroke-width: 1.4;
  opacity: 0.5;
  filter: drop-shadow(0 0 4px rgba(0,229,255,0.55));
}

/* HTML light packets — CSS-animated, no JS. */
.s-orbit__packet {
  position: absolute;
  width: 6px; height: 6px;
  margin: -3px 0 0 -3px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 10px rgba(0,229,255,0.9), 0 0 4px rgba(0,229,255,1);
  pointer-events: none;
  opacity: 0;
  animation: s-orbit-packet 1.7s var(--ease-smooth) infinite;
  will-change: transform, opacity;
}
@keyframes s-orbit-packet {
  0%   { transform: translate(0, 0);                   opacity: 0; }
  12%  { opacity: 1; }
  88%  { opacity: 1; }
  100% { transform: translate(var(--dx, 0), var(--dy, 0)); opacity: 0; }
}

.s-orbit__node {
  position: absolute;
  width: 96px; height: 96px;
  border-radius: 50%;
  display: grid; place-items: center; gap: 3px;
  background: rgba(18,18,26,0.78);
  border: 1px solid var(--border-hi);
  color: var(--text-muted);
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.1em; text-transform: uppercase;
  cursor: pointer;
  transform: translate(-50%, -50%) scale(0.88);
  transform-origin: center;
  transition: background 320ms var(--ease-smooth), border-color 320ms var(--ease-smooth),
              color 320ms var(--ease-smooth), box-shadow 320ms var(--ease-smooth),
              transform 360ms var(--ease-smooth);
}
.s-orbit__node:focus-visible { outline: 2px solid var(--violet); outline-offset: 4px; }
.s-orbit__node-icon { width: 28px; height: 28px; opacity: 0.55; transition: opacity 320ms var(--ease-smooth), color 320ms var(--ease-smooth); }
.s-orbit__node-label { line-height: 1.05; text-align: center; max-width: 84px; transition: font-size 280ms var(--ease-smooth); }

/* Tiers — same DOM size, scale + color/glow do the hierarchy work. */
.s-orbit__node.is-distant {
  background: rgba(18,18,26,0.65);
  border-color: var(--border);
  transform: translate(-50%, -50%) scale(0.78);
  opacity: 0.7;
}
.s-orbit__node.is-distant .s-orbit__node-icon { opacity: 0.4; }
.s-orbit__node.is-adjacent {
  background: rgba(34,28,58,0.85);
  border-color: var(--border-hi);
  color: var(--text);
  transform: translate(-50%, -50%) scale(0.92);
  opacity: 0.95;
}
.s-orbit__node.is-adjacent .s-orbit__node-icon { opacity: 0.85; }
.s-orbit__node.is-active {
  background: rgba(124,92,255,0.22);
  border-color: var(--violet);
  color: #fff;
  box-shadow: 0 0 48px var(--glow-violet), inset 0 0 28px rgba(124,92,255,0.18);
  transform: translate(-50%, -50%) scale(1.06);
  opacity: 1;
}
.s-orbit__node.is-active .s-orbit__node-icon { opacity: 1; color: #fff; }
.s-orbit__node.is-active .s-orbit__node-label { font-size: 12px; letter-spacing: 0.08em; }

@media (prefers-reduced-motion: reduce) {
  .s-orbit__packet { display: none; }
  .s-orbit__node, .s-orbit__lines line { transition: none; }
}
.s-orbit__panel {
  grid-column: 10 / 13;
  align-self: center;
  display: flex; flex-direction: column; justify-content: center;
  padding: 24px;
  padding-right: 0;
  border-left: 1px solid var(--border);
}
.s-orbit__panel-eyebrow { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 12px; }
.s-orbit__panel-kicker { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--violet-hi); margin-bottom: 8px; }
.s-orbit__panel-title { font-family: var(--font-display); font-size: 28px; font-weight: 600; letter-spacing: -0.02em; margin: 0 0 10px; line-height: 1.1; }
.s-orbit__panel-desc { color: var(--text-muted); font-size: 14px; line-height: 1.55; }
.s-orbit__panel-stack { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; }
.s-orbit__panel-stack span { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; padding: 4px 8px; border-radius: 6px; background: var(--surface); border: 1px solid var(--border); color: var(--text-muted); }

@media (max-width: 1024px) {
  .s-orbit__head  { grid-column: 1 / -1; }
  .s-orbit__stage { grid-column: 1 / 9; height: 360px; }
  .s-orbit__panel { grid-column: 9 / 13; height: auto; border-left: 0; margin-left: 0; }
}
@media (max-width: 768px) {
  /* Constellation collapses to unreadable overlap under 768px. Hide the
     animated stage; the auto-cycling panel still tours all 8 disciplines. */
  .s-orbit__stage { display: none; }
  .s-orbit__panel { grid-column: 1 / -1; padding: 0; margin-top: 24px; }
  .s-orbit__panel-title { font-size: 24px; }
}

/* =========================================================================
   Section 3 — WEB · Interfaces that convert
   Pinned 200vh on desktop. Sticky inner holds head + stage + marquee.
   ========================================================================= */
.s-web {
  height: 200vh;
  min-height: 200vh;
  overflow: visible; /* enable sticky to anchor against the viewport, not section */
}
.s-web__sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  width: 100%;
}
.s-web__inner {
  height: 100vh;
  padding-top: 88px;
  padding-bottom: 56px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  row-gap: 20px;
}

/* Header --------------------------------------------------------------- */
.s-web__head {
  grid-column: 2 / 12;
  display: grid; gap: 18px;
  align-self: start;
}
.s-web__eyebrow {
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.s-web__title {
  font-family: var(--font-display);
  font-size: 96px;
  line-height: 1.0;
  letter-spacing: -0.03em;
  color: var(--text);
  font-weight: 600;
  margin: 0;
}
.s-web__title-grad {
  background: linear-gradient(120deg, var(--violet), var(--cyan));
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
}
.s-web__sub {
  font-size: 18px;
  line-height: 1.4;
  color: var(--text-muted);
  max-width: 560px;
  margin: 4px 0 0;
}

/* Stage (50/50 split) -------------------------------------------------- */
.s-web__stage {
  grid-column: 2 / 12;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  min-height: clamp(400px, 50vh, 480px);
}

/* Panel chrome (shared between metrics + browser mockup) --------------- */
.s-web__panel {
  position: relative;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.s-web__panel-bar {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.015);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  flex-shrink: 0;
}
.s-web__panel-dots { display: inline-flex; gap: 6px; }
.s-web__panel-dots i { width: 10px; height: 10px; border-radius: 50%; }
.s-web__panel-dots i:nth-child(1) { background: #FF5C7A; }
.s-web__panel-dots i:nth-child(2) { background: #FFB454; }
.s-web__panel-dots i:nth-child(3) { background: #3DDC97; }
.s-web__panel-name {
  font-size: 13px;
  color: var(--text-muted);
  margin-left: 4px;
}
/* Case-study panel (left half) ---------------------------------------- */
.cs-case-tag {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.cs-case-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #22C55E;
}
.cs-body {
  flex: 1;
  display: flex; flex-direction: column;
  padding: 24px 28px;
  gap: 22px;
  min-height: 0;
}
.cs-client {
  display: flex; flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
}
.cs-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.cs-name {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 400;
  color: var(--text);
  letter-spacing: -0.005em;
}
.cs-rows {
  flex: 1;
  display: flex; flex-direction: column;
  min-height: 0;
}
.cs-row {
  flex: 1 1 0;
  min-height: 0;
  display: grid;
  grid-template-columns: 40% 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 0;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.cs-row:first-child { border-top: none; }
.cs-row-label {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.cs-row-values {
  display: inline-flex; align-items: baseline;
  gap: 8px;
  font-variant-numeric: tabular-nums;
  min-width: 0;
}
.cs-before {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 400;
  color: var(--text-muted);
}
.cs-arrow {
  font-family: var(--font-display);
  font-size: 18px;
  color: #444;
  user-select: none;
}
.cs-after {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 500;
  color: var(--text);
  letter-spacing: -0.01em;
}
.cs-delta {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 500;
  color: #22C55E;
  text-align: right;
  min-width: 72px;
  opacity: 0;
  transition: opacity 320ms var(--ease-smooth);
}
.cs-delta.is-on {
  opacity: 1;
  animation: cs-delta-pulse 200ms var(--ease-smooth);
}
@keyframes cs-delta-pulse {
  0%   { color: #4ADE80; transform: scale(1.04); }
  100% { color: #22C55E; transform: scale(1); }
}
.cs-foot {
  flex-shrink: 0;
  height: 56px;
  padding: 0 28px;
  display: flex; align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  border-top: 1px solid var(--border);
  opacity: 0;
  transition: opacity 240ms var(--ease-smooth);
}
.cs-foot.is-on { opacity: 1; }

/* Browser mockup (right half) ----------------------------------------- */
.s-web__status {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 6px;
  color: #3DDC97;
  font-family: var(--font-mono);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.s-web__status-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #3DDC97;
  box-shadow: 0 0 6px rgba(61,220,151,0.7);
}
.s-web__frame-body {
  position: relative;
  flex: 1;
  min-height: 0;
  background:
    radial-gradient(circle at 18% 12%, rgba(124,92,255,0.12), transparent 55%),
    radial-gradient(circle at 82% 88%, rgba(0,229,255,0.10), transparent 55%),
    rgba(10,10,15,0.5);
  overflow: hidden;
}
.s-web__state {
  position: absolute; inset: 24px;
  display: flex; flex-direction: column;
  animation: s-web-state-wipe 600ms var(--ease-smooth);
}
@keyframes s-web-state-wipe {
  0%   { clip-path: inset(0 100% 0 0); opacity: 0.4; }
  100% { clip-path: inset(0 0 0 0); opacity: 1; }
}
.s-web__state-dots {
  position: absolute; left: 50%; bottom: 14px;
  transform: translateX(-50%);
  display: flex; gap: 8px;
  pointer-events: none;
}
.s-web__state-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #444;
  transition: background 400ms var(--ease-smooth), transform 400ms var(--ease-smooth);
}
.s-web__state-dot.is-on {
  background: linear-gradient(120deg, var(--violet), var(--cyan));
  transform: scale(1.18);
}

/* =========================================================================
   Mockup states (mw-*)  — every state is fully populated, no skeletons
   ========================================================================= */
.mw {
  flex: 1;
  display: flex; flex-direction: column;
  gap: 14px;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 12px;
  min-height: 0;
}
.mw-row { display: flex; align-items: center; gap: 10px; }
.mw-row--head { justify-content: space-between; }
.mw-title { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
.mw-chip {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.mw-chip--ok { color: #3DDC97; border-color: rgba(61,220,151,0.32); }
.mw-chip--accent {
  background: rgba(124,92,255,0.16);
  border-color: rgba(124,92,255,0.45);
  color: var(--violet);
}

/* Dashboard --------------------------------------------------------- */
.mw-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.mw-kpi {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  background: rgba(255,255,255,0.02);
  display: flex; flex-direction: column; gap: 6px;
  min-width: 0;
}
.mw-kpi-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.mw-kpi-row { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.mw-kpi-value { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
.mw-kpi-value.is-accent {
  background: linear-gradient(120deg, var(--violet), var(--cyan));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.mw-kpi-trend { font-family: var(--font-mono); font-size: 11px; }
.mw-kpi-trend.is-up   { color: #3DDC97; }
.mw-kpi-trend.is-down { color: #FF7A8F; }
.mw-spark { display: block; }
.mw-main { display: grid; grid-template-columns: 1.6fr 1fr; gap: 10px; flex: 1; min-height: 0; }
.mw-chart {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  background: rgba(255,255,255,0.015);
  min-height: 0;
}
.mw-aside {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  background: rgba(255,255,255,0.015);
  display: flex; flex-direction: column; gap: 10px;
  min-height: 0;
}
.mw-aside-title {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-muted);
}
.mw-activity { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.mw-act { display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 10px; }
.mw-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 600; font-size: 12px;
  color: var(--text);
}
.mw-avatar--v { background: linear-gradient(135deg, rgba(124,92,255,0.55), rgba(124,92,255,0.2)); }
.mw-avatar--c { background: linear-gradient(135deg, rgba(0,229,255,0.55), rgba(0,229,255,0.18)); }
.mw-act-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.mw-act-who { font-size: 13px; font-weight: 500; }
.mw-act-what { font-size: 11px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mw-act-when { font-family: var(--font-mono); font-size: 11px; color: var(--text-muted); }

/* Checkout --------------------------------------------------------- */
.mw-co { display: grid; grid-template-columns: 1.2fr 1fr; gap: 14px; flex: 1; min-height: 0; }
.mw-co-left, .mw-co-right {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  background: rgba(255,255,255,0.015);
  display: flex; flex-direction: column; gap: 10px;
  min-height: 0;
}
.mw-section {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-muted);
}
.mw-line {
  display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: 10px;
  padding: 6px 0;
}
.mw-prod {
  width: 36px; height: 36px; border-radius: 6px;
  background:
    repeating-linear-gradient(135deg, rgba(255,255,255,0.06) 0 4px, transparent 4px 8px),
    linear-gradient(135deg, #2A2440, #1A2032);
  border: 1px solid var(--border);
}
.mw-prod--a { background: repeating-linear-gradient(45deg, rgba(255,255,255,0.05) 0 4px, transparent 4px 8px), linear-gradient(135deg, #46324E, #2C2A4A); }
.mw-prod--b { background: repeating-linear-gradient(135deg, rgba(0,229,255,0.08) 0 5px, transparent 5px 10px), linear-gradient(135deg, #1F2E40, #14213A); }
.mw-line-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.mw-line-name { font-size: 13px; font-weight: 500; }
.mw-line-meta { font-size: 11px; color: var(--text-muted); }
.mw-line-price { font-family: var(--font-mono); font-size: 13px; font-variant-numeric: tabular-nums; }
.mw-totals { margin-top: auto; display: flex; flex-direction: column; gap: 6px; padding-top: 8px; border-top: 1px solid var(--border); }
.mw-tot { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 12px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.mw-tot-em { color: #3DDC97; }
.mw-tot--grand { color: var(--text); font-family: var(--font-display); font-size: 14px; font-weight: 600; padding-top: 6px; border-top: 1px dashed rgba(255,255,255,0.08); }
.mw-pay {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255,255,255,0.015);
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  transition: border-color 240ms var(--ease-smooth), background 240ms var(--ease-smooth);
}
.mw-pay:hover { border-color: rgba(255,255,255,0.18); }
.mw-pay-dot { width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,0.25); flex-shrink: 0; }
.mw-pay-dot--on { background: #fff; border-color: #fff; box-shadow: 0 0 0 3px rgba(124,92,255,0.55); }
.mw-pay--active {
  background: linear-gradient(120deg, rgba(124,92,255,0.18), rgba(0,229,255,0.14));
  border-color: var(--violet);
  box-shadow: 0 0 24px rgba(124,92,255,0.25);
}
.mw-pay-tag {
  margin-left: auto;
  font-family: var(--font-mono); font-size: 10px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(124,92,255,0.22);
  color: var(--violet);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.mw-cta {
  margin-top: auto;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 18px;
  border-radius: 999px;
  background: linear-gradient(120deg, var(--violet), var(--cyan));
  background-origin: border-box; background-clip: border-box;
  color: #06060A;
  font-family: var(--font-display); font-weight: 700;
  font-size: 14px;
  border: 0;
  cursor: pointer;
}
.mw-cta-arr { display: inline-block; }
.mw-pay-meta { font-family: var(--font-mono); font-size: 11px; color: var(--text-muted); text-align: center; }

/* Marketing -------------------------------------------------------- */
.mw-mk-hero { display: flex; flex-direction: column; gap: 10px; padding: 4px 0 8px; }
.mw-mk-h { margin: 0; font-size: 22px; font-weight: 700; line-height: 1.05; letter-spacing: -0.02em; }
.mw-mk-grad { background: linear-gradient(120deg, var(--violet), var(--cyan)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.mw-mk-sub { margin: 0; font-size: 13px; color: var(--text-muted); line-height: 1.45; max-width: 32ch; }
.mw-mk-ctas { display: flex; gap: 10px; margin-top: 4px; }
.mw-cta--mk { padding: 9px 16px; font-size: 13px; }
.mw-cta--ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 9px 16px;
  border-radius: 999px;
  font-family: var(--font-display); font-weight: 500;
  font-size: 13px;
  display: inline-flex; align-items: center;
}
.mw-mk-visual {
  position: relative;
  flex: 1;
  min-height: 80px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: radial-gradient(circle at 30% 30%, rgba(124,92,255,0.4), transparent 60%),
              radial-gradient(circle at 80% 70%, rgba(0,229,255,0.32), transparent 55%),
              #0E0E1A;
  overflow: hidden;
}
.mw-mk-visual-shape {
  position: absolute; left: 24%; top: 22%;
  width: 120px; height: 120px;
  border-radius: 24px;
  background: linear-gradient(135deg, #7C5CFF, #00E5FF);
  filter: blur(0.3px);
  box-shadow: 0 12px 40px rgba(124,92,255,0.4);
  transform: rotate(-8deg);
}
.mw-mk-visual-shape--2 {
  left: 58%; top: 38%;
  width: 80px; height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(0,229,255,0.65), rgba(124,92,255,0.35));
  transform: none;
  filter: blur(0.4px);
}
.mw-mk-visual-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 20px 20px;
  mix-blend-mode: screen;
  opacity: 0.6;
}
.mw-mk-feats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.mw-mk-feat {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  background: rgba(255,255,255,0.015);
  display: flex; flex-direction: column; gap: 4px;
  color: var(--text);
}
.mw-mk-feat svg { color: var(--violet); }
.mw-mk-feat-label { font-size: 13px; font-weight: 600; }
.mw-mk-feat-sub { font-size: 11px; color: var(--text-muted); }

/* =========================================================================
   Stack marquee (two opposite rows)
   ========================================================================= */
.s-web__marq-block {
  grid-column: 1 / -1;
  display: flex; flex-direction: column;
  gap: 10px;
  padding: 0;
}
.s-web__marq-eyebrow {
  grid-column: 2 / 12;
  margin: 0 var(--grid-margin);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.s-web__marq-row {
  position: relative;
  overflow: hidden;
  width: 100%;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 10%, #000 90%, transparent 100%);
          mask-image: linear-gradient(to right, transparent 0%, #000 10%, #000 90%, transparent 100%);
}
.s-web__marq-track {
  display: flex; align-items: center;
  width: max-content;
  will-change: transform;
}
.s-web__marq-track.is-left  { animation: s-web-marq-left  44s linear infinite; }
.s-web__marq-track.is-right { animation: s-web-marq-right 60s linear infinite; }
.s-web__marq-row:hover .s-web__marq-track { animation-play-state: paused; }
@keyframes s-web-marq-left  { from { transform: translateX(0); }    to { transform: translateX(-50%); } }
@keyframes s-web-marq-right { from { transform: translateX(-50%); } to { transform: translateX(0); } }
.s-web__marq-group {
  display: flex; align-items: center;
  gap: 48px;
  padding-right: 48px;
  flex-shrink: 0;
}
.s-web__marq-item {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 18px;
  letter-spacing: -0.01em;
  color: rgba(245,245,250,0.45);
  white-space: nowrap;
  transition: color 200ms var(--ease-smooth);
}
.s-web__marq-item:hover { color: var(--text); }
.s-web__marq-div {
  font-family: var(--font-mono);
  font-size: 18px;
  color: rgba(245,245,250,0.3);
  opacity: 0.6;
}

/* =========================================================================
   Reduced motion
   ========================================================================= */
@media (prefers-reduced-motion: reduce) {
  .s-web__state { animation: none; }
  .s-web__marq-track { animation: none; transform: translateX(0); }
  .s-web__marq-row { -webkit-mask-image: none; mask-image: none; justify-content: center; }
  .cs-delta.is-on { animation: none; }
  .cs-foot { transition: none; }
}

/* =========================================================================
   Responsive
   ========================================================================= */
@media (max-width: 1180px) {
  .s-web__title { font-size: 72px; }
}
@media (max-width: 1024px) {
  .s-web__title { font-size: 56px; }
  .cs-after { font-size: 20px; }
  .cs-before, .cs-arrow { font-size: 16px; }
  .mw-kpis { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .s-web              { height: auto; min-height: auto; overflow: hidden; }
  .s-web__sticky      { position: static; height: auto; }
  .s-web__inner       { height: auto; grid-template-rows: auto auto auto; row-gap: 24px; padding-top: var(--safe-top); padding-bottom: var(--safe-bottom); }
  .s-web__head        { grid-column: 1 / -1; }
  .s-web__title       { font-size: 40px; }
  .s-web__sub         { font-size: 16px; }
  /* Kill the desktop stage min-height — it was forcing both stacked
     panels to share 400px and crushing rows/mockups to unreadable. */
  .s-web__stage       { grid-column: 1 / -1; grid-template-columns: 1fr; gap: 16px; min-height: 0; }
  .s-web__marq-item   { font-size: 14px; }
  .s-web__marq-group  { gap: 32px; padding-right: 32px; }
  .mw-main, .mw-co    { grid-template-columns: 1fr; }
  .mw-kpis            { grid-template-columns: repeat(2, 1fr); }
  /* Let the case-study rows take their natural height (no flex: 1). */
  .cs-body            { padding: 24px; gap: 20px; }
  .cs-rows            { display: flex; flex-direction: column; }
  .cs-row             { flex: 0 0 auto; padding: 14px 0; gap: 10px; grid-template-columns: 38% 1fr auto; min-height: 0; }
  .cs-after           { font-size: 20px; }
  /* Desktop reserves 72px for the delta; on mobile that eats into the value
     column and "$162k" collides with "↑ 93%". Let the chip size itself. */
  .cs-delta           { min-width: 0; }
  .cs-foot            { padding: 0 24px; height: 48px; }
  /* Hide the browser mockup on mobile — only the case-study card and the
     stack marquee stay. Targets the second .s-web__panel (not the CS one). */
  .s-web__stage .s-web__panel:not(.cs-panel) { display: none; }
}

/* =========================================================================
   Section 4 — AI INTEGRATION
   ========================================================================= */
.s-ai__inner { grid-template-rows: 1fr; }
.s-ai__head {
  grid-column: 2 / 6;
  align-self: center;
  display: grid; gap: 22px;
}
.s-ai__head h2 { max-width: 11ch; }
.s-ai__head p { max-width: 420px; }
.s-ai__stack { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.s-ai__viz {
  grid-column: 6 / 13;
  align-self: center;
  position: relative;
  height: 540px;
}
.s-ai__network {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
}
.s-ai__chat {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 320px;
  max-height: 240px;
  border-radius: var(--r-md);
  background: rgba(10,10,15,0.86);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-hi);
  padding: 14px;
  display: grid; gap: 10px;
  font-size: 12px;
  z-index: var(--z-controls);
  box-shadow: var(--shadow-soft);
}
.s-ai__chat-head {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-dim);
}
.s-ai__chat-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--success); box-shadow: 0 0 8px var(--success); }
.s-ai__chat-msg {
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  line-height: 1.5;
  word-wrap: break-word;
}
.s-ai__chat-msg.is-user { background: rgba(124,92,255,0.14); border-color: rgba(124,92,255,0.34); align-self: flex-end; max-width: 85%; }
.s-ai__chat-msg.is-bot  { background: var(--surface); }
.s-ai__chat-tool {
  display: inline-flex; align-items: center; gap: 6px;
  align-self: flex-start;
  font-family: var(--font-mono); font-size: 10px;
  padding: 4px 8px;
  background: rgba(0,229,255,0.08);
  color: var(--cyan-hi);
  border: 1px solid rgba(0,229,255,0.3);
  border-radius: 6px;
}
.s-ai__chat-tool::before { content: ""; width: 5px; height: 5px; background: var(--cyan); border-radius: 50%; box-shadow: 0 0 6px var(--cyan); animation: pulse 1.2s var(--ease-smooth) infinite; }
@keyframes pulse { 50% { opacity: 0.4; } }

@media (max-width: 1024px) {
  .s-ai__head { grid-column: 1 / -1; }
  .s-ai__viz  { grid-column: 1 / -1; height: 360px; margin-top: 32px; }
  .s-ai__chat { width: 280px; }
}
@media (max-width: 768px) {
  /* Section 4 on mobile: let it grow, stack the neural net over the chat
     agent so the popup can be full-width, unclipped, and readable. */
  .s-ai            { height: auto; min-height: 100vh; }
  .s-ai__inner     { grid-template-rows: auto auto; }
  .s-ai__viz       { height: auto; display: flex; flex-direction: column; gap: 20px; margin-top: 24px; }
  .s-ai__network   { position: relative; height: 220px; inset: auto; }
  /* Reserve space for the full streamed response so the layout doesn't
     jump each frame the bot text grows. Sized for the ~155-char response
     wrapping at 327px content width. */
  .s-ai__chat      { position: static; width: 100%; max-height: none; min-height: 260px; }
  .s-ai__chat-msg  { font-size: 13px; line-height: 1.5; }
  .s-ai__chat-msg.is-user { max-width: 100%; }
  .s-ai__chat-msg.is-bot  { min-height: 108px; }
}

/* =========================================================================
   Section 5 — TRAINING (polished)
   Header → training visualization (sources | graph | improvements) → compare card
   ========================================================================= */
.s-training__inner {
  grid-template-rows: auto 1fr auto;
  row-gap: 40px;
  align-content: center;
}
.s-training__head {
  grid-column: 2 / 12;
  grid-row: 1;
  text-align: center;
  display: grid; gap: 14px; justify-items: center;
}
.s-training__head h2 {
  max-width: 22ch;
  font-size: clamp(28px, 3.6vw, 48px);
  line-height: 1.05;
}
.s-training__head p { max-width: 580px; font-size: 16px; }

/* Training visualization ----------------------------------------------- */
.train-vis {
  grid-column: 2 / 12;
  grid-row: 2;
  display: grid;
  grid-template-columns: 200px 1fr 220px;
  gap: 64px;
  align-items: center;
}

/* Side columns */
.train-aside {
  display: flex; flex-direction: column; gap: 16px;
  align-self: center;
}
.train-aside-title {
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: #8A8A9A;
}
.train-aside--right { text-align: right; }
.train-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 11px; }
.train-list li {
  font-family: var(--font-display);
  font-size: 13px; color: #F5F5FA;
  line-height: 1;
  display: flex; align-items: center; gap: 10px;
}
.train-aside--right .train-list li { justify-content: flex-end; }
.train-list-arrow { color: #444; font-family: var(--font-mono); width: 12px; flex-shrink: 0; }
.train-list-arrow--green { color: #22C55E; font-weight: 600; }
.train-list-text { white-space: nowrap; }

/* Center column */
.train-center {
  display: flex; flex-direction: column; align-items: center;
  gap: 24px;
  position: relative;
  min-width: 0;
}
.train-stats {
  display: flex; align-items: baseline; gap: 24px;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}
.train-stat { display: inline-flex; align-items: baseline; gap: 8px; }
.train-stat-label {
  font-size: 11px; letter-spacing: 0.15em; text-transform: uppercase;
  color: #8A8A9A;
}
.train-stat strong {
  font-size: 18px; font-weight: 500;
  color: #F5F5FA;
  letter-spacing: -0.005em;
}
.train-stat strong.violet { color: #7C5CFF; }
.train-stat strong.cyan   { color: #00E5FF; }
.train-stat-div { color: #444; font-size: 18px; }

.train-graph {
  width: min(560px, 100%);
  height: 240px;
  position: relative;
}
.train-curve { width: 100%; height: 100%; overflow: visible; display: block; }
.train-grid line { stroke: rgba(255,255,255,0.04); stroke-width: 1; }
.train-axis text { fill: #8A8A9A; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.08em; }
.train-line-main { filter: drop-shadow(0 0 6px rgba(124,92,255,0.55)); }
.train-lead {
  fill: #00E5FF;
  filter: drop-shadow(0 0 8px rgba(0,229,255,0.9));
}

/* Streaming chips ------------------------------------------------------ */
.train-chips {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.train-chip {
  position: absolute;
  top: 50%; left: 50%;
  padding: 4px 10px;
  border: 1px solid rgba(255,255,255,0.12);
  background: #12121A;
  border-radius: 4px;
  font-family: var(--font-mono); font-size: 11px;
  color: #8A8A9A;
  white-space: nowrap;
  letter-spacing: 0.02em;
  opacity: 0;
  transform: translate(calc(-50% + var(--sx, 0px)), calc(-50% + var(--sy, 0px)));
  will-change: transform, opacity;
}
.train-chip.is-running {
  animation: train-chip-stream 1400ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: var(--start, 0ms);
}
@keyframes train-chip-stream {
  0%   { opacity: 0; transform: translate(calc(-50% + var(--sx)), calc(-50% + var(--sy))) scale(1); }
  15%  { opacity: 1; }
  82%  { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(0.55); }
}

/* Legend below graph --------------------------------------------------- */
.train-legend {
  display: flex; gap: 24px;
  justify-content: center;
  font-family: var(--font-mono); font-size: 12px;
  color: #F5F5FA;
  margin-top: -8px;
}
.train-legend-item { display: inline-flex; align-items: center; gap: 8px; }
.train-legend-dim { color: #8A8A9A; margin-left: 2px; }
.train-legend-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: linear-gradient(120deg, #7C5CFF, #00E5FF);
}
.train-legend-dash {
  width: 16px; height: 2px;
  background: repeating-linear-gradient(to right, #444 0 4px, transparent 4px 8px);
}

/* Comparison card ------------------------------------------------------ */
.train-compare {
  grid-column: 2 / 12;
  grid-row: 3;
  background: #12121A;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 24px;
  display: flex; flex-direction: column;
  gap: 24px;
}
.train-compare-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
}
.train-compare-eyebrow {
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: #8A8A9A;
}

/* Pill toggle */
.train-toggle {
  display: inline-flex; gap: 4px;
  padding: 4px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 999px;
}
.train-toggle button {
  padding: 10px 20px;
  border: 1px solid rgba(255,255,255,0.12);
  background: transparent;
  border-radius: 999px;
  font-family: var(--font-mono); font-size: 12px;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: #8A8A9A;
  cursor: pointer;
  white-space: nowrap;
  transition: background 200ms cubic-bezier(0.16, 1, 0.3, 1),
              color 200ms cubic-bezier(0.16, 1, 0.3, 1),
              border-color 200ms cubic-bezier(0.16, 1, 0.3, 1);
}
.train-toggle button.is-active {
  background: linear-gradient(120deg, #7C5CFF, #00E5FF);
  border-color: transparent;
  color: #0A0A0F;
  font-weight: 600;
}

/* Prompt row */
.train-compare-prompt { display: flex; flex-direction: column; gap: 8px; }
.train-compare-label {
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: #8A8A9A;
}
.train-compare-promptbox {
  background: #0A0A0F;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  padding: 16px;
  font-family: var(--font-mono); font-size: 14px;
  color: #F5F5FA;
  line-height: 1.5;
}

/* Response columns */
.train-compare-responses {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.train-response {
  background: #12121A;
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: 8px;
  padding: 24px;
  display: flex; flex-direction: column;
  gap: 12px;
  opacity: 0.5;
  color: #5A5A6A;
  transition: border-color 400ms cubic-bezier(0.16, 1, 0.3, 1),
              background 400ms cubic-bezier(0.16, 1, 0.3, 1),
              opacity 400ms cubic-bezier(0.16, 1, 0.3, 1),
              color 400ms cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 400ms cubic-bezier(0.16, 1, 0.3, 1);
}
.train-response-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  min-height: 32px;
}
.train-response-label {
  font-family: var(--font-mono); font-size: 12px;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: inherit;
  transition: color 400ms cubic-bezier(0.16, 1, 0.3, 1);
}
.train-response-text {
  font-size: 16px; line-height: 1.5;
  color: inherit;
  margin: 0;
}
.train-response-badge {
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: #22C55E;
  background: rgba(34,197,94,0.08);
  border: 1px solid rgba(34,197,94,0.3);
  padding: 4px 10px;
  border-radius: 4px;
  flex-shrink: 0;
}

.train-response--generic.is-active {
  border-color: rgba(255,255,255,0.12);
  opacity: 1;
  color: #F5F5FA;
}
.train-response--generic.is-active .train-response-label { color: #F5F5FA; }
.train-response--tuned.is-active {
  border-color: rgba(124,92,255,0.3);
  box-shadow: inset 0 0 40px rgba(124,92,255,0.06);
  opacity: 1;
  color: #F5F5FA;
}
.train-response--tuned.is-active .train-response-label { color: #F5F5FA; }

/* Reduced motion ------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .train-chip.is-running { animation: none; opacity: 0; }
  .train-response, .train-toggle button, .train-response-label { transition: none; }
}

/* Responsive ----------------------------------------------------------- */
@media (max-width: 1100px) {
  .train-vis { grid-template-columns: 160px 1fr 180px; gap: 32px; }
}
@media (max-width: 900px) {
  .train-vis {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .train-aside--left  { order: 1; align-items: center; text-align: center; }
  .train-aside--left .train-list li { justify-content: flex-start; }
  .train-center      { order: 2; }
  .train-aside--right { order: 3; text-align: left; align-items: center; }
  .train-aside--right .train-list li { justify-content: flex-start; }
}
@media (max-width: 768px) {
  /* Base .section pins to 100vh with overflow:hidden — that was clipping
     the compare panel's response cards below the fold. Let it grow. */
  .s-training { height: auto; min-height: 100vh; }
  .train-compare-responses { grid-template-columns: 1fr; }
  .train-compare-head { flex-direction: column; align-items: flex-start; gap: 12px; }
  .train-toggle { width: 100%; }
  .train-toggle button { flex: 1; padding: 8px 14px; font-size: 11px; }
  .train-stats { flex-wrap: wrap; justify-content: center; gap: 12px; }
  .train-stat-div { display: none; }
}

/* =========================================================================
   Section 6 — MBS (Mobile / Blockchain / Security) horizontal scroll
   ========================================================================= */
.s-mbs {
  height: 300vh;
  overflow: visible;        /* sticky child requires non-clipping ancestor */
}
.s-mbs__sticky {
  position: sticky;
  top: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}
.s-mbs__track {
  display: flex;
  width: 300vw;
  height: 100vh;
  will-change: transform;
}
.s-mbs__panel {
  flex: 0 0 100vw;
  height: 100vh;
  position: relative;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: var(--grid-gutter);
  padding: var(--safe-top) var(--grid-margin) var(--safe-bottom);
  overflow: hidden;
}
.s-mbs__progress {
  position: absolute;
  top: calc(var(--safe-top) - 32px);
  left: var(--grid-margin);
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-dim);
  z-index: var(--z-text);
}
.s-mbs__progress strong { color: var(--text); margin-right: 8px; }

/* --- Panel 1: Mobile --- */
.s-mbs__head {
  grid-column: 2 / 7;
  align-self: start;
  display: grid; gap: 18px;
  z-index: var(--z-text);
  position: relative;
}
.s-mbs__head h2 { max-width: 14ch; }
.s-mbs__head p { max-width: 420px; }
.s-mbs__stack-row { display: flex; flex-wrap: wrap; gap: 8px; }
.s-mbs__phones {
  grid-column: 7 / 13;
  align-self: center;
  position: relative;
  height: 520px;
  perspective: 1000px;
}
.s-mbs__phone {
  position: absolute;
  width: 220px;
  height: 460px;
  border-radius: 36px;
  background: linear-gradient(180deg, #1A1A24, #0F0F16);
  border: 1px solid var(--border-hi);
  box-shadow: 0 30px 80px rgba(0,0,0,0.5), 0 0 0 1px rgba(124,92,255,0.1) inset;
  overflow: hidden;
  transform-style: preserve-3d;
}
.s-mbs__phone--ios { left: 6%; top: 20px; transform: rotateY(15deg) rotateZ(-8deg); }
.s-mbs__phone--droid { right: 6%; top: 60px; transform: rotateY(-15deg) rotateZ(8deg); }
.s-mbs__phone-screen {
  position: absolute; inset: 8px;
  border-radius: 28px;
  background: #06060A;
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
}
.s-mbs__phone-status {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 16px 8px;
  font-family: var(--font-mono); font-size: 10px;
  color: var(--text-muted);
}
.s-mbs__phone-app {
  padding: 12px 16px; display: grid; gap: 10px;
}
.s-mbs__phone-app .head { display: flex; align-items: center; gap: 8px; }
.s-mbs__phone-app .avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--grad-vc); }
.s-mbs__phone-app .name { font-size: 12px; font-weight: 600; color: var(--text); }
.s-mbs__phone-app .balance {
  margin-top: 8px;
  padding: 14px;
  border-radius: 12px;
  background: var(--grad-vc);
  color: #06060A;
}
.s-mbs__phone-app .balance .lbl { font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.14em; text-transform: uppercase; }
.s-mbs__phone-app .balance .val { font-family: var(--font-display); font-size: 24px; font-weight: 700; letter-spacing: -0.02em; margin-top: 2px; }
.s-mbs__phone-app .row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
  font-size: 11px;
}
.s-mbs__phone-app .row .l { color: var(--text-muted); }
.s-mbs__phone-app .row .r { color: var(--text); font-family: var(--font-mono); }

/* --- Panel 2: Blockchain --- */
.s-mbs__chain-stage {
  grid-column: 1 / -1;
  position: relative;
  height: calc(100vh - var(--safe-top) - var(--safe-bottom));
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  align-items: center;
  gap: 32px;
}
.s-mbs__chain-text {
  display: grid; gap: 18px;
  padding-right: 24px;
  z-index: var(--z-text);
}
.s-mbs__chain-text h2 { max-width: 12ch; }
.s-mbs__chain-text ul {
  list-style: none; margin: 16px 0 0; padding: 0;
  display: grid; gap: 10px;
}
.s-mbs__chain-text li {
  display: flex; align-items: center; gap: 10px;
  font-size: 14px; color: var(--text-muted);
}
.s-mbs__chain-text li::before { content: ""; width: 16px; height: 1px; background: var(--violet); }
.s-mbs__chain-stage-right {
  position: relative;
  height: 100%;
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: 18px;
  z-index: var(--z-motion);
}
.s-mbs__solidity {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 16px;
  font-family: var(--font-mono); font-size: 11px;
  line-height: 1.65;
  color: #C8C8D8;
  /* Honor the \n characters in the JSX so each Solidity line renders on
     its own line instead of collapsing into one long run-on paragraph. */
  white-space: pre-wrap;
  overflow: hidden;
  position: relative;
}
.s-mbs__solidity .ln { color: var(--text-faint); display: inline-block; width: 22px; }
.s-mbs__solidity .k { color: var(--violet-hi); }
.s-mbs__solidity .t { color: var(--cyan-hi); }
.s-mbs__solidity .s { color: #7CE2A4; }
.s-mbs__solidity .c { color: var(--text-faint); font-style: italic; }
.s-mbs__chain-flow {
  position: relative;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 18px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  align-items: center;
}
.s-mbs__chain-step {
  display: grid; gap: 6px;
  text-align: center;
  padding: 12px 6px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  position: relative;
}
.s-mbs__chain-step .ic {
  width: 32px; height: 32px;
  margin: 0 auto;
  border-radius: 8px;
  background: var(--surface-hi);
  display: grid; place-items: center;
  color: var(--violet-hi);
}
.s-mbs__chain-step.is-active .ic { background: var(--grad-vc); color: #06060A; }
.s-mbs__chain-step .lbl { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); }
.s-mbs__chain-arrow {
  position: absolute;
  top: 50%; right: -10px;
  width: 16px; height: 1px;
  background: var(--text-faint);
  transform: translateY(-50%);
}
.s-mbs__chain-arrow::after { content: "▶"; position: absolute; right: -3px; top: -7px; font-size: 8px; color: var(--text-faint); }
.s-mbs__chain-link {
  position: absolute;
  bottom: 28%;
  left: 0; right: 0;
  display: flex; justify-content: center; gap: 14px;
  z-index: var(--z-motion);
  pointer-events: none;
}
.s-mbs__chain-cube {
  width: 44px; height: 44px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(124,92,255,0.5), rgba(0,229,255,0.5));
  box-shadow: 0 0 24px rgba(124,92,255,0.3);
  border: 1px solid rgba(255,255,255,0.18);
  position: relative;
}
.s-mbs__chain-cube::after {
  content: ""; position: absolute; right: -16px; top: 50%;
  width: 14px; height: 1px;
  background: rgba(124,92,255,0.5);
  transform: translateY(-50%);
}
.s-mbs__chain-cube:last-child::after { display: none; }

/* --- Panel 3: Security --- */
.s-mbs__shield-stage {
  grid-column: 1 / -1;
  position: relative;
  height: calc(100vh - var(--safe-top) - var(--safe-bottom));
}
.s-mbs__shield {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 280px; height: 280px;
}
.s-mbs__shield-svg {
  width: 100%; height: 100%;
  filter: drop-shadow(0 0 32px rgba(124,92,255,0.4));
  animation: shield-rot 12s linear infinite;
}
@keyframes shield-rot { from { transform: rotate(0); } to { transform: rotate(360deg); } }
.s-mbs__shield-rings {
  position: absolute; inset: -80px;
  border: 1px dashed rgba(124,92,255,0.18);
  border-radius: 50%;
  animation: ring-rot 30s linear infinite reverse;
}
.s-mbs__shield-rings:nth-child(2) { inset: -160px; opacity: 0.6; animation-duration: 60s; }
@keyframes ring-rot { to { transform: rotate(360deg); } }
.s-mbs__sec-cards {
  position: absolute; inset: 0;
  pointer-events: none;
}
.s-mbs__sec-card {
  position: absolute;
  top: 50%; left: 50%;
  width: 180px;
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(18,18,26,0.85);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-hi);
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text);
  transform-origin: center;
  transition: transform 800ms var(--ease-smooth), opacity 600ms var(--ease-smooth);
  opacity: 0;
}
.s-mbs__sec-card .desc {
  display: block;
  margin-top: 6px;
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text-muted);
}
.s-mbs.is-sec-fanned .s-mbs__sec-card { opacity: 1; }
.s-mbs__threat {
  position: absolute;
  top: 50%; left: 50%;
  width: 60vw; height: 1px;
  background: linear-gradient(to right, transparent, rgba(255,92,122,0.7), transparent);
  transform-origin: 0 0;
  pointer-events: none;
  opacity: 0;
}
.s-mbs__compliance {
  position: absolute;
  bottom: var(--safe-bottom);
  left: var(--grid-margin); right: var(--grid-margin);
  display: flex; justify-content: center; gap: 14px;
  z-index: var(--z-text);
}
.s-mbs__compliance span {
  padding: 6px 12px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-muted);
}

@media (max-width: 1024px) {
  .s-mbs__phones, .s-mbs__chain-stage, .s-mbs__shield-stage { grid-column: 1 / -1; }
  .s-mbs__chain-stage { grid-template-columns: 1fr; }
}

/* =========================================================================
   Section 7 — DEVOPS + DATA (vertical split)
   ========================================================================= */
.s-devops__inner {
  grid-template-rows: 1fr 1px 1fr;
  row-gap: 0;
  padding-top: 96px;
  padding-bottom: 64px;
}
.s-devops__half {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: var(--grid-gutter);
  padding: 24px 0;
  align-items: center;
}
.s-devops__divider {
  grid-column: 1 / -1;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--border-hi), transparent);
  margin: 0;
}
.s-devops__head {
  grid-column: 1 / 5;
  display: grid; gap: 18px;
}
.s-devops__head h3 { font-size: clamp(28px, 3.4vw, 44px); line-height: 1.05; letter-spacing: -0.025em; font-weight: 600; margin: 0; }
.s-devops__head p { color: var(--text-muted); font-size: 15px; line-height: 1.55; max-width: 380px; }
.s-devops__stage {
  grid-column: 5 / 13;
  position: relative;
  height: 280px;
}

/* DevOps — isometric cloud architecture */
.iso { position: absolute; inset: 0; }
.iso svg { width: 100%; height: 100%; overflow: visible; }
.iso .node rect { fill: #1A1A24; stroke: var(--border-hi); }
.iso .node text { fill: var(--text-muted); font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase; }
.iso .conn { stroke: rgba(255,255,255,0.1); stroke-width: 1; fill: none; }
.iso .pkt { fill: var(--cyan); filter: drop-shadow(0 0 6px var(--cyan)); }

.metrics {
  position: absolute;
  top: 0; right: 0;
  width: 220px;
  border-radius: var(--r-md);
  background: rgba(18,18,26,0.85);
  border: 1px solid var(--border-hi);
  backdrop-filter: blur(12px);
  padding: 14px;
  display: grid; gap: 12px;
}
.metrics h6 { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-dim); margin: 0; font-weight: 500; }
.metrics .row { display: flex; justify-content: space-between; align-items: baseline; }
.metrics .row .l { font-size: 11px; color: var(--text-muted); }
.metrics .row .r { font-family: var(--font-mono); font-size: 14px; color: var(--text); font-weight: 500; }
.metrics .row .r.up { color: var(--success); }
.metrics .row .r.down { color: var(--cyan-hi); }

/* Data half */
.s-devops__data-pipe {
  position: relative;
  width: 100%; height: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
  gap: 12px;
  align-items: center;
}
.pipe-stage {
  position: relative;
  padding: 14px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  text-align: center;
  display: grid; gap: 6px;
}
.pipe-stage .ic { width: 28px; height: 28px; border-radius: 6px; background: var(--surface-hi); margin: 0 auto; display: grid; place-items: center; color: var(--cyan-hi); }
.pipe-stage .lbl { font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted); }
.pipe-stage::after {
  content: ""; position: absolute; right: -10px; top: 50%;
  width: 8px; height: 1px; background: var(--text-faint);
  transform: translateY(-50%);
}
.pipe-stage:last-child::after { display: none; }
.pipe-stage.is-active { background: rgba(0,229,255,0.06); border-color: rgba(0,229,255,0.4); }
.pipe-stage.is-active .ic { background: var(--grad-vc); color: #06060A; }

.dash {
  position: absolute;
  top: 0; right: -8px;
  width: 220px;
  border-radius: var(--r-md);
  background: rgba(18,18,26,0.85);
  border: 1px solid var(--border-hi);
  backdrop-filter: blur(12px);
  padding: 14px;
  display: grid; gap: 10px;
}
.dash h6 { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-dim); margin: 0; font-weight: 500; }
.dash .stat { display: flex; justify-content: space-between; align-items: baseline; }
.dash .stat .l { font-size: 11px; color: var(--text-muted); }
.dash .stat .r { font-family: var(--font-mono); font-size: 13px; color: var(--text); }
.dash .insight {
  display: flex; gap: 8px; align-items: center;
  padding: 8px 10px; border-radius: 8px;
  background: rgba(124,92,255,0.12); border: 1px solid rgba(124,92,255,0.3);
  font-size: 11px; color: var(--violet-hi);
}

@media (max-width: 1024px) {
  .s-devops__head { grid-column: 1 / -1; }
  .s-devops__stage { grid-column: 1 / -1; height: 220px; margin-top: 24px; }
  .metrics, .dash { position: relative; right: auto; top: auto; width: 100%; margin-top: 16px; }
}

/* =========================================================================
   Section 8 — ENGAGE
   ========================================================================= */
.s-engage { min-height: 100vh; height: auto; }
.s-engage__inner {
  grid-template-rows: auto auto auto;
  row-gap: 64px;
  padding-bottom: 0;
}
.s-engage__head {
  grid-column: 2 / 12;
  text-align: center;
  display: grid; gap: 16px; justify-items: center;
}
.s-engage__cards {
  grid-column: 2 / 12;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  perspective: 1000px;
}
.engage-card {
  position: relative;
  border-radius: var(--r-lg);
  background: rgba(18,18,26,0.55);
  backdrop-filter: blur(18px);
  border: 1px solid var(--border);
  padding: 28px;
  display: grid; gap: 18px;
  align-content: start;
  min-height: 320px;
  transform-style: preserve-3d;
  transition: transform 400ms var(--ease-smooth), border-color 400ms var(--ease-smooth);
}
.engage-card.is-mid { border-color: rgba(124,92,255,0.5); box-shadow: 0 0 60px rgba(124,92,255,0.18); background: rgba(28,22,48,0.55); }
.engage-card__lbl { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--violet-hi); }
.engage-card__title { font-family: var(--font-display); font-size: 24px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; margin: 0; }
.engage-card__price { font-family: var(--font-display); font-size: 18px; color: var(--text); font-weight: 500; }
.engage-card__price small { color: var(--text-muted); font-size: 13px; font-weight: 400; }
.engage-card__list { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 8px; }
.engage-card__list li { font-size: 13px; color: var(--text-muted); display: flex; gap: 8px; line-height: 1.45; }
.engage-card__list li::before { content: "→"; color: var(--cyan); flex-shrink: 0; }
.engage-card__cta { margin-top: auto; }

.s-engage__form-wrap {
  grid-column: 1 / -1;
  position: relative;
  padding: 80px var(--grid-margin) 48px;
  margin: 0 calc(-1 * var(--grid-margin));
  display: grid;
  place-items: center;
  text-align: center;
}
.s-engage__bigtitle {
  position: absolute;
  inset: 0;
  display: grid; place-items: center;
  pointer-events: none;
  z-index: var(--z-bg);
  font-family: var(--font-display);
  font-size: clamp(80px, 14vw, 200px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 0.9;
  color: transparent;
  -webkit-text-stroke: 1px rgba(124,92,255,0.4);
  text-stroke: 1px rgba(124,92,255,0.4);
  opacity: 0.5;
  white-space: nowrap;
  text-align: center;
  user-select: none;
}
.s-engage__form {
  position: relative;
  z-index: var(--z-text);
  width: 100%;
  max-width: 640px;
  display: grid;
  gap: 14px;
  background: rgba(10,10,15,0.4);
  backdrop-filter: blur(8px);
  border-radius: var(--r-lg);
  padding: 28px;
}
.s-engage__form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.s-engage__form .field {
  display: grid; gap: 6px;
}
.s-engage__form label {
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--text-dim);
  text-align: left;
}
.s-engage__form input,
.s-engage__form select,
.s-engage__form textarea {
  width: 100%;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-size: 14px;
  font-family: var(--font-body);
  transition: border-color 200ms var(--ease-smooth), background 200ms var(--ease-smooth);
  /* Force dark-mode native controls (calendar picker, autofill, option list). */
  color-scheme: dark;
}
/* Custom-styled <select> — the OS-native chevron/arrow gets in the way and the
   native picker on light-mode devices renders white-on-white otherwise. */
.s-engage__form select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'><path d='M1 1l5 5 5-5' stroke='%237C5CFF' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 12px 8px;
}
.s-engage__form select option {
  background: #12121A;
  color: var(--text);
}
.field-opt { color: var(--text-faint); text-transform: none; letter-spacing: 0; font-size: 10px; margin-left: 4px; }

/* Custom <select> replacement — see G.Select in shared.jsx.
   Native picker on some mobile browsers renders white-on-white and pops up
   detached from the trigger; this listbox is fully in-flow and themed. */
.x-select {
  position: relative;
  width: 100%;
}
.x-select__trigger {
  width: 100%;
  padding: 12px 40px 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-size: 14px;
  font-family: var(--font-body);
  text-align: left;
  cursor: pointer;
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px;
  transition: border-color 200ms var(--ease-smooth), background 200ms var(--ease-smooth);
  min-height: 46px;
}
.x-select__trigger:focus-visible,
.x-select.is-open .x-select__trigger {
  outline: none;
  border-color: var(--violet);
  background: var(--surface-hi);
  box-shadow: 0 0 0 3px rgba(124,92,255,0.15);
}
.x-select__value { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.x-select__chev  { transition: transform 200ms var(--ease-smooth); flex-shrink: 0; }
.x-select.is-open .x-select__chev { transform: rotate(180deg); }

.x-select__list {
  position: absolute;
  top: calc(100% + 6px);
  left: 0; right: 0;
  z-index: 50;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: #12121A;
  border: 1px solid var(--border-hi);
  border-radius: 10px;
  box-shadow: 0 20px 48px rgba(0,0,0,0.55);
  max-height: 280px;
  overflow-y: auto;
  animation: fade-in 160ms var(--ease-smooth);
}
.x-select__option {
  padding: 10px 12px;
  border-radius: 6px;
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
  user-select: none;
  transition: background 120ms var(--ease-smooth), color 120ms var(--ease-smooth);
}
.x-select__option.is-focused { background: rgba(124,92,255,0.14); color: var(--text); }
.x-select__option.is-selected { color: var(--violet-hi); }
.x-select__option.is-selected.is-focused { background: rgba(124,92,255,0.22); color: #fff; }

@media (max-width: 768px) {
  .x-select__trigger { font-size: 16px; padding: 14px 44px 14px 14px; }
  .x-select__option  { font-size: 15px; padding: 12px 12px; }
}
.s-engage__form input:focus,
.s-engage__form select:focus,
.s-engage__form textarea:focus {
  outline: none;
  border-color: var(--violet);
  background: var(--surface-hi);
  box-shadow: 0 0 0 3px rgba(124,92,255,0.15);
}
.s-engage__form textarea { resize: vertical; min-height: 96px; }
.s-engage__submit {
  margin-top: 6px;
  padding: 14px 20px;
  border-radius: 12px;
  background: var(--grad-vc);
  color: #06060A;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -0.005em;
  cursor: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  transition: transform 200ms var(--ease-smooth), box-shadow 200ms var(--ease-smooth);
  animation: submit-breathe 3s var(--ease-smooth) infinite;
}
.s-engage__submit:hover { transform: translateY(-1px); box-shadow: 0 12px 32px rgba(124,92,255,0.4); }
.s-engage__submit:disabled { opacity: 0.7; cursor: default; animation: none; }
.s-engage__submit.is-ok  { background: linear-gradient(135deg, #3DDC97, #00E5FF); }
.s-engage__submit.is-err { background: linear-gradient(135deg, #FF5C7A, #FFB454); }
.s-engage__form-captcha { display: flex; justify-content: flex-start; margin-top: 4px; min-height: 65px; }
.turnstile { display: inline-block; }
@keyframes submit-breathe {
  0%, 100% { box-shadow: 0 0 0 0 rgba(124,92,255,0); }
  50%      { box-shadow: 0 0 32px rgba(124,92,255,0.4); }
}

@media (max-width: 900px) {
  .s-engage__cards { grid-template-columns: 1fr; }
  .s-engage__form-row { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  /* Drop the 3 engagement tier cards on mobile — form is the primary CTA
     here, cards were making the section a scroll marathon. Also hide the
     subhead that references "Three ways", since it dangles without them. */
  .s-engage__cards      { display: none; }
  .s-engage__head p     { display: none; }
  /* iOS Safari auto-zooms the viewport when focusing a field whose font-size
     is under 16px — that's the "flying away" behavior. Bump on mobile. */
  .s-engage__form input,
  .s-engage__form select,
  .s-engage__form textarea { font-size: 16px; padding: 14px; }
}

@keyframes fade-in {
  from { opacity: 0; transform: scale(0.985); }
  to   { opacity: 1; transform: scale(1); }
}

/* =========================================================================
   Sentinel for active-section detection (anchor IDs are on the sections)
   ========================================================================= */
.section[id] { scroll-margin-top: 96px; }

/* =========================================================================
   About page (about.html · SectionAbout)
   ========================================================================= */
.s-about__inner {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: var(--grid-gutter);
  padding-top: calc(var(--safe-top) + 40px);
  padding-bottom: var(--safe-bottom);
  row-gap: 72px;
  align-content: start;
}
.s-about__head       { grid-column: 2 / 10; display: grid; gap: 22px; }
.s-about__head p     { font-size: 18px; line-height: 1.55; color: var(--text-muted); max-width: 640px; }
.s-about__lede       { grid-column: 2 / 10; display: grid; gap: 22px; }
.s-about__lede p     { font-size: 16px; line-height: 1.7; color: var(--text-muted); max-width: 720px; }
.s-about__lede strong{ color: var(--text); font-weight: 500; }

.s-about__offices    { grid-column: 2 / 12; display: grid; gap: 20px; }
.s-about__office-grid{ display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.s-about__office     {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: rgba(255,255,255,0.02);
  display: grid; gap: 8px;
}
.s-about__office-city    { font-family: var(--font-display); font-size: 22px; font-weight: 600; letter-spacing: -0.01em; }
.s-about__office-country { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-dim); }
.s-about__office-note    { font-size: 14px; line-height: 1.55; color: var(--text-muted); margin: 4px 0 0; }

.s-about__principles     { grid-column: 2 / 12; display: grid; gap: 20px; }
.s-about__principle-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.s-about__principle {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: rgba(255,255,255,0.02);
}
.s-about__principle h3 { margin: 0 0 8px; font-family: var(--font-display); font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
.s-about__principle p  { margin: 0; font-size: 14px; line-height: 1.6; color: var(--text-muted); }

.s-about__cta { grid-column: 2 / 12; display: grid; gap: 20px; justify-items: start; padding: 20px 0 40px; }

@media (max-width: 900px) {
  .s-about__office-grid, .s-about__principle-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .s-about__inner { row-gap: 48px; }
  .s-about__head, .s-about__lede, .s-about__offices, .s-about__principles, .s-about__cta { grid-column: 1 / -1; }
}

/* =========================================================================
   Careers page (careers.html · SectionCareers)
   ========================================================================= */
.s-careers__panels {
  grid-column: 2 / 12;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 8px;
}
.s-careers__panel {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: rgba(255,255,255,0.02);
}
.s-careers__panel h3 { margin: 0 0 12px; font-family: var(--font-display); font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
.s-careers__panel ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.s-careers__panel li { position: relative; padding-left: 20px; color: var(--text-muted); font-size: 14px; line-height: 1.55; }
.s-careers__panel li::before { content: "—"; position: absolute; left: 0; color: var(--violet); }
@media (max-width: 900px) {
  .s-careers__panels { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .s-careers__panels { grid-column: 1 / -1; }
}

/* =========================================================================
   Cookie banner + preferences modal
   ========================================================================= */
.cookie-banner {
  position: fixed;
  left: 16px; right: 16px; bottom: 16px;
  z-index: 200;
  background: rgba(12,12,18,0.94);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-hi);
  border-radius: var(--r-md);
  box-shadow: 0 24px 60px rgba(0,0,0,0.55);
  padding: 16px 20px;
  animation: fade-in 320ms var(--ease-smooth);
}
.cookie-banner__inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}
.cookie-banner p {
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.55;
  max-width: 720px;
}
.cookie-banner p a { color: var(--cyan-hi); text-decoration: underline; text-underline-offset: 3px; }
.cookie-banner__actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.cookie-banner__actions .btn { padding: 8px 14px; font-size: 13px; }

.cookie-modal {
  position: fixed; inset: 0; z-index: 210;
  background: rgba(6,6,10,0.65);
  backdrop-filter: blur(8px);
  display: grid; place-items: center;
  padding: 24px;
  animation: fade-in 200ms var(--ease-smooth);
}
.cookie-modal__panel {
  background: #12121A;
  border: 1px solid var(--border-hi);
  border-radius: var(--r-lg);
  padding: 28px;
  max-width: 560px;
  width: 100%;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  color: var(--text);
}
.cookie-modal__panel h3 { margin: 0 0 8px; font-family: var(--font-display); font-size: 22px; letter-spacing: -0.01em; }
.cookie-modal__panel > p { margin: 0 0 20px; color: var(--text-muted); font-size: 14px; line-height: 1.55; }
.cookie-row {
  display: grid; grid-template-columns: 24px 1fr; gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--border);
  align-items: start;
  cursor: pointer;
}
.cookie-row:first-of-type { border-top: none; }
.cookie-row input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--violet); }
.cookie-row strong { display: block; font-family: var(--font-display); font-size: 15px; font-weight: 600; margin-bottom: 2px; }
.cookie-row span { display: block; color: var(--text-muted); font-size: 13px; line-height: 1.5; }
.cookie-modal__actions { margin-top: 20px; display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.cookie-modal__actions .btn { padding: 10px 18px; font-size: 13px; }

@media (max-width: 768px) {
  .cookie-banner { left: 12px; right: 12px; bottom: 12px; padding: 14px 16px; }
  .cookie-banner__inner { grid-template-columns: 1fr; }
  .cookie-banner__actions { justify-content: stretch; }
  .cookie-banner__actions .btn { flex: 1; }
}
