/* ==========================================================================
   /ai — AI Development & Implementation
   Art direction: precise, technical, luminous. Mono details, node graphs, live systems.
   Bespoke pieces: hero prompt · particle morph (idea → system) · agent console · workflow graph.
   ========================================================================== */

.ai-hero, .ai-morph, .ai-agents, .ai-flows, .ai-band, .ai-run { --volt-soft: color-mix(in srgb, var(--accent) 16%, transparent); }

/* ── 01 · HERO ───────────────────────────────────────────────────────────── */
.ai-hero__grid {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(244, 241, 234, .055) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(244, 241, 234, .055) 1px, transparent 1px);
  background-size: clamp(56px, 8.333vw, 140px) clamp(56px, 8.333vw, 140px);
  background-position: var(--gutter) 0;
  -webkit-mask-image: radial-gradient(90% 80% at 76% 38%, #000 0, rgba(0, 0, 0, .35) 45%, transparent 78%);
  mask-image: radial-gradient(90% 80% at 76% 38%, #000 0, rgba(0, 0, 0, .35) 45%, transparent 78%);
}
.ai-hero__state { display: inline-flex; align-items: center; gap: 1em; color: var(--fg); }
.ai-hero__state .spot { width: 7px; height: 7px; }
.ai-hero .hero__inner { gap: clamp(16px, 2vw, 30px); }
.ai-hero .hero__title { margin-top: clamp(0px, .6vw, 10px); }
.ai-hero .hero__lead { max-width: 28ch; }

.ai-prompt {
  justify-self: start;
  display: inline-flex; align-items: center; gap: .9em;
  max-width: 100%;
  min-height: 44px;
  padding: 0 18px 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: rgba(7, 7, 10, .55);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  font-family: var(--font-mono);
  font-size: clamp(.75rem, .62rem + .42vw, 1rem);
  letter-spacing: .01em;
  line-height: 1;
  color: var(--fg);
  white-space: nowrap;
  overflow: hidden;
  box-shadow: 0 0 0 4px rgba(7, 7, 10, .25), 0 18px 60px -24px color-mix(in srgb, var(--accent) 60%, transparent);
}
.ai-prompt__k { color: var(--accent); flex: none; }
.ai-prompt__txt { min-width: 0; overflow: hidden; text-overflow: clip; }
.ai-caret {
  flex: none; width: .56em; height: 1.15em; margin-left: -.55em;
  background: var(--accent);
  animation: ai-blink 1.05s steps(2, jump-none) infinite;
}
@keyframes ai-blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }

/* ── 02 · IDEA → REALITY ─────────────────────────────────────────────────── */
.ai-morph { position: relative; background: var(--ink); border-top: 1px solid var(--line); }
.ai-morph__sticky { position: relative; overflow: hidden; padding-block: var(--section); }
.ai-morph__canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.ai-morph__inner { position: relative; z-index: 1; display: grid; gap: clamp(40px, 6vw, 96px); }
.ai-morph__top { display: flex; justify-content: space-between; align-items: center; gap: var(--s-4); }
.ai-morph__count { display: none; align-items: baseline; gap: .7em; }
.ai-morph__count b { font-weight: 450; color: var(--accent); font-variant-numeric: tabular-nums; }
.ai-morph__stages { display: grid; gap: clamp(48px, 7vw, 104px); }
.ai-stage { display: grid; gap: clamp(14px, 1.6vw, 24px); max-width: min(100%, 780px); }
.ai-stage__k { display: inline-flex; align-items: center; gap: 1em; color: var(--fg); }
.ai-stage__k i { font-style: normal; color: var(--accent); }
.ai-stage__k i::after { content: ""; display: inline-block; vertical-align: middle; width: 28px; height: 1px; margin-left: 1em; background: var(--line-strong); }
.ai-stage__t { text-wrap: balance; }
.ai-stage__p { max-width: 30ch; color: var(--fg-mute); }
.ai-morph__rail { display: none; }

/* static layouts (no JS / reduced motion): keep the copy off the drawing */
@media (min-width: 900px) {
  .ai-morph:not(.is-live) .ai-stage { max-width: 46%; }
}
@media (max-width: 899px) {
  .ai-morph:not(.is-live) .ai-morph__canvas { opacity: .28; }
}

/* live: tall scroll track + sticky viewport, stages cross-fade in place */
.ai-morph.is-live { height: 340vh; }
.ai-morph.is-live .ai-morph__sticky {
  position: sticky; top: 0;
  height: 100vh; height: 100svh;
  padding-block: calc(var(--nav-h) + clamp(12px, 2vw, 28px)) clamp(20px, 2.6vw, 40px);
  display: flex;
}
.ai-morph.is-live .ai-morph__inner { display: flex; flex-direction: column; flex: 1; min-height: 0; gap: 0; }
.ai-morph.is-live .ai-morph__count { display: inline-flex; }
.ai-morph.is-live .ai-morph__stages { display: grid; gap: 0; margin-top: auto; padding-bottom: clamp(22px, 3vw, 44px); }
.ai-morph.is-live .ai-stage {
  grid-area: 1 / 1; align-self: end;
  opacity: 0; visibility: hidden;
  transition: opacity .5s var(--ease-io), visibility 0s linear .5s;
}
.ai-morph.is-live .ai-stage > * { transform: translate3d(0, 28px, 0); transition: transform .9s var(--ease-out); }
.ai-morph.is-live .ai-stage > :nth-child(2) { transition-delay: .05s; }
.ai-morph.is-live .ai-stage > :nth-child(3) { transition-delay: .1s; }
.ai-morph.is-live .ai-stage.is-active { opacity: 1; visibility: visible; transition: opacity .7s var(--ease-io) .12s, visibility 0s; }
.ai-morph.is-live .ai-stage.is-active > * { transform: none; }
.ai-morph.is-live .ai-stage.is-past > * { transform: translate3d(0, -28px, 0); }

.ai-morph.is-live .ai-morph__rail {
  position: relative;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono); font-size: var(--fs-label); letter-spacing: .14em; text-transform: uppercase;
  color: var(--fg-mute);
}
.ai-morph__rail span { display: inline-flex; align-items: center; gap: .9em; transition: color .4s; }
.ai-morph__rail span::before { content: ""; width: 7px; height: 7px; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--line-strong); transition: background-color .4s, box-shadow .4s; }
.ai-morph__rail span.is-on { color: var(--fg); }
.ai-morph__rail span.is-on::before { background: var(--accent); box-shadow: 0 0 0 4px var(--volt-soft); }
.ai-morph__rail span:nth-child(2) { justify-self: center; }
.ai-morph__rail span:nth-child(3) { justify-self: end; }
.ai-morph__rail i { position: absolute; left: 0; top: -1px; width: 100%; height: 1px; background: var(--accent); transform-origin: left; transform: scaleX(var(--p, 0)); }

@media (min-width: 900px) {
  .ai-morph.is-live .ai-stage { max-width: 52%; }
}
@media (max-width: 899px) {
  .ai-morph.is-live { height: 300vh; }
  .ai-stage__p { max-width: 26ch; }
}

/* ── 03 · AGENTS ─────────────────────────────────────────────────────────── */
.ai-agents { overflow: hidden; overflow: clip; }
.ai-agents__grid { display: grid; gap: clamp(48px, 7vw, 72px) var(--gap); grid-template-columns: minmax(0, 1fr); align-items: center; }
.ai-agents__copy { display: grid; gap: clamp(20px, 2.2vw, 32px); justify-items: start; }
.ai-agents__copy h2 { max-width: 9ch; }
.ai-agents__text { max-width: 36ch; color: var(--fg-mute); font-size: var(--fs-lead); line-height: 1.32; letter-spacing: -.015em; }
.ai-agents__where { display: grid; gap: 14px; margin-top: clamp(4px, 1vw, 16px); }

.ai-agents__stage { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); }
.ai-agents__media {
  position: relative; overflow: hidden;
  aspect-ratio: 4 / 3.3;
  border-radius: var(--r-l);
  background: var(--ink-2);
}
.ai-agents__media-in { position: absolute; inset: -8% 0; }
.ai-agents__media video { width: 100%; height: 100%; object-fit: cover; filter: saturate(.75) brightness(.8); }
.ai-agents__media::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(200deg, transparent 30%, rgba(7, 7, 10, .78)), var(--noise);
  background-blend-mode: normal, overlay;
}

.ai-console {
  position: relative; z-index: 2;
  margin: -84px 12px 0;
  border-radius: 16px;
  background: rgba(12, 12, 17, .9);
  -webkit-backdrop-filter: blur(18px) saturate(1.2); backdrop-filter: blur(18px) saturate(1.2);
  box-shadow: inset 0 0 0 1px var(--line-strong), 0 40px 90px -30px rgba(0, 0, 0, .9), 0 0 120px -40px color-mix(in srgb, var(--accent) 55%, transparent);
  font-family: var(--font-mono);
  font-size: clamp(.6875rem, .62rem + .3vw, .8125rem);
  line-height: 1.4;
  overflow: hidden;
}
.ai-console__bar { display: flex; align-items: center; gap: 14px; padding: 13px 16px; border-bottom: 1px solid var(--line); color: var(--fg-mute); }
.ai-console__dots { display: inline-flex; gap: 6px; }
.ai-console__dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--ink-4); }
.ai-console__dots i:last-child { background: var(--accent); }
.ai-console__name { color: var(--fg); }
.ai-console__tag { margin-left: auto; font-size: .82em; letter-spacing: .12em; text-transform: uppercase; white-space: nowrap; }
.ai-console__body { padding: clamp(16px, 1.8vw, 24px) clamp(16px, 1.8vw, 24px) clamp(12px, 1.4vw, 18px); display: grid; gap: 14px; }
.ai-console__cmd { color: var(--fg); min-height: 1.4em; }
.ai-console__cmd > span:first-child { color: var(--accent); }
.ai-console__log { display: grid; }
.ai-line {
  display: grid; grid-template-columns: 2.2ch 7.2ch minmax(0, 1fr) auto; column-gap: 1.2ch; align-items: baseline;
  padding-block: .62em;
  border-top: 1px dashed var(--line);
}
.ai-line__no { color: var(--fg-mute); opacity: .7; }
.ai-line__verb { color: var(--accent); }
.ai-line__txt { color: var(--fg); min-width: 0; }
.ai-line--tool .ai-line__txt { color: var(--fg-mute); }
.ai-line__st { color: var(--fg-mute); text-transform: uppercase; font-size: .82em; letter-spacing: .1em; min-width: 5.5ch; text-align: right; white-space: nowrap; }
.ai-line__st[data-st="approved"], .ai-line.is-done .ai-line__st[data-st="approved"] { color: var(--ink); background: var(--bone); padding: .28em .6em; border-radius: 4px; }
.ai-line__st[data-st="done"] { color: var(--accent); }
.ai-console__end { display: flex; align-items: center; gap: 1ch; color: var(--accent); padding-top: .3em; }
.ai-console__end .spot { width: 7px; height: 7px; }
.ai-console__foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 16px; border-top: 1px solid var(--line); min-height: 46px; }
.ai-console__steps { display: inline-flex; gap: 6px; }
.ai-console__steps i { width: 18px; height: 3px; border-radius: 2px; background: var(--accent); transition: background-color .4s; }
.ai-console__replay { font: inherit; font-size: .82em; letter-spacing: .12em; text-transform: uppercase; color: var(--fg-mute); padding: 4px 0; transition: color var(--t-fast); }
.ai-console__replay:hover { color: var(--accent); }

/* console — live (JS types the run) */
.ai-console.is-live .ai-line > * { opacity: 0; transition: opacity .35s; }
.ai-console.is-live .ai-line.is-on > * { opacity: 1; }
.ai-console.is-live .ai-line.is-on .ai-line__st { color: var(--accent); background: none; padding: 0; }
.ai-console.is-live .ai-line.is-wait .ai-line__st { color: var(--bone); animation: ai-blink 1s steps(2, jump-none) infinite; }
.ai-console.is-live .ai-line.is-done .ai-line__st { color: var(--fg-mute); animation: none; }
.ai-console.is-live .ai-line.is-done .ai-line__st[data-st="approved"] { color: var(--ink); background: var(--bone); padding: .28em .6em; }
.ai-console.is-live .ai-line.is-done .ai-line__st[data-st="done"] { color: var(--accent); }
.ai-console.is-live .ai-console__end { opacity: 0; transition: opacity .4s; }
.ai-console.is-live.is-end .ai-console__end { opacity: 1; }
.ai-console.is-live .ai-console__steps i { background: var(--ink-4); }
.ai-console.is-live .ai-console__steps i.is-on { background: var(--accent); }
.ai-console.is-live .ai-console__cmd.is-typing::after { content: ""; display: inline-block; width: .56em; height: 1.05em; margin-left: .15em; vertical-align: text-bottom; background: var(--accent); }

@media (min-width: 900px) {
  .ai-agents__grid { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .ai-agents__copy { grid-column: 1 / span 5; }
  .ai-agents__stage { grid-column: 6 / -1; grid-template-columns: repeat(7, minmax(0, 1fr)); padding-bottom: clamp(40px, 5vw, 80px); }
  .ai-agents__media { grid-column: 3 / -1; grid-row: 1; aspect-ratio: 4 / 4.7; }
  .ai-console { grid-column: 1 / span 5; grid-row: 1; align-self: end; margin: 0 0 calc(clamp(40px, 5vw, 80px) * -1); }
}
@media (min-width: 1280px) {
  .ai-agents__copy { grid-column: 1 / span 4; }
  .ai-agents__stage { grid-column: 6 / -1; }
}
@media (max-width: 480px) {
  .ai-line { grid-template-columns: 2.2ch 6.6ch minmax(0, 1fr) auto; column-gap: .9ch; }
  .ai-console { margin-inline: 8px; }
  .ai-console__tag { display: none; }
}

/* ── 04 · WORKFLOW GRAPH ─────────────────────────────────────────────────── */
.ai-flow {
  position: relative;
  border-radius: var(--r-l);
  background-color: var(--ink-2);
  background-image: radial-gradient(circle, rgba(244, 241, 234, .13) 1px, transparent 1.4px);
  background-size: 22px 22px;
  box-shadow: inset 0 0 0 1px var(--line);
  overflow: hidden;
  isolation: isolate;
}
.ai-flow::before {
  content: ""; position: absolute; z-index: -1; left: 24%; top: 50%; width: 46%; aspect-ratio: 1; transform: translate(-50%, -50%);
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 20%, transparent), transparent 62%);
  pointer-events: none;
}
.ai-flow__bar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px clamp(16px, 2.4vw, 32px);
  border-bottom: 1px solid var(--line);
  background: rgba(14, 14, 19, .8);
  font-family: var(--font-mono); font-size: var(--fs-label); letter-spacing: .08em; color: var(--fg-mute);
}
.ai-flow__file { display: inline-flex; align-items: center; gap: 1em; color: var(--fg); min-width: 0; }
.ai-flow__file .spot { width: 7px; height: 7px; flex: none; }
.ai-flow__hint { text-transform: uppercase; letter-spacing: .14em; white-space: nowrap; }
.ai-flow__canvas { position: relative; padding: clamp(22px, 3vw, 48px) clamp(16px, 3vw, 48px) clamp(28px, 4vw, 64px); }
.ai-flow__wires { position: absolute; left: 0; top: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; z-index: 0; }
.ai-flow__cols { position: relative; z-index: 1; display: grid; gap: 44px; }
.ai-flow__col { display: grid; gap: 12px; min-width: 0; }
.ai-flow__kind {
  justify-self: start;
  display: inline-flex; gap: .9em; align-items: center;
  font-family: var(--font-mono); font-size: var(--fs-label); letter-spacing: .14em; text-transform: uppercase; color: var(--fg-mute);
}
.ai-flow__kind i { font-style: normal; color: var(--accent); }
.ai-flow__nodes { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; }

.ai-node {
  position: relative;
  display: grid; gap: 6px; align-content: center;
  min-height: 72px;
  padding: 14px 30px 14px 16px;
  border-radius: 14px;
  background: var(--ink-3);
  box-shadow: inset 0 0 0 1px var(--line-strong), 0 16px 40px -22px rgba(0, 0, 0, .9);
  min-width: 0;
}
.ai-node__dot { position: absolute; right: 12px; top: 12px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.ai-node__title { font-family: var(--font-display); font-weight: 600; font-variation-settings: "opsz" 96; font-size: clamp(1rem, .9rem + .45vw, 1.3125rem); letter-spacing: -.02em; line-height: 1.05; }
.ai-node__sub { font-family: var(--font-mono); font-size: .6875rem; letter-spacing: .06em; line-height: 1.35; color: var(--fg-mute); }
.ai-node--agent { background: var(--accent); color: var(--ink); box-shadow: 0 0 0 6px var(--volt-soft), 0 0 90px -10px color-mix(in srgb, var(--accent) 70%, transparent); min-height: 104px; }
.ai-node--agent .ai-node__title { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.25rem); }
.ai-node--agent .ai-node__sub { color: rgba(7, 7, 10, .7); }
.ai-node--agent .ai-node__dot { background: var(--ink); }
.ai-node--human { background: var(--bone); color: var(--ink); box-shadow: 0 16px 40px -22px rgba(0, 0, 0, .9); }
.ai-node--human .ai-node__sub { color: #5F5D69; }
.ai-node--human .ai-node__dot { background: var(--ink); }
.ai-node--out { background: rgba(14, 14, 19, .7); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 55%, transparent); }

.ai-wire { fill: none; stroke: rgba(244, 241, 234, .3); stroke-width: 1.25; stroke-dasharray: 1; stroke-dashoffset: 0; }
.ai-wire-p { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-dasharray: .12 3; stroke-dashoffset: .12; filter: drop-shadow(0 0 5px var(--accent)); }
.ai-wire-end { fill: var(--ink-2); stroke: rgba(244, 241, 234, .45); stroke-width: 1.25; }

/* armed by JS → assembles when scrolled into view */
.ai-flow.is-armed .ai-node { opacity: 0; transform: translate3d(0, 14px, 0) scale(.96); }
.ai-flow.is-armed .ai-flow__kind { opacity: 0; }
.ai-flow.is-armed .ai-wire { stroke-dashoffset: 1; }
.ai-flow.is-armed .ai-wire-end { opacity: 0; }
.ai-flow.is-armed.is-in .ai-node { opacity: 1; transform: none; transition: opacity .6s var(--ease-out) calc(var(--c) * .22s), transform .9s var(--ease-out) calc(var(--c) * .22s); }
.ai-flow.is-armed.is-in .ai-flow__kind { opacity: 1; transition: opacity .6s calc(var(--c) * .22s); }
.ai-flow.is-armed.is-in .ai-wire { stroke-dashoffset: 0; transition: stroke-dashoffset .8s var(--ease-io) calc(var(--c) * .22s + .25s); }
.ai-flow.is-armed.is-in .ai-wire-end { opacity: 1; transition: opacity .4s calc(var(--c) * .22s + .8s); }
.ai-flow.is-in .ai-wire-p { animation: ai-packet 4.8s linear calc(var(--c) * .9s + 1.6s) infinite; }
.ai-flow.is-in .ai-node__dot { animation: ai-ping 4.8s linear calc(var(--c) * .9s + 1.5s) infinite; }
.ai-flow.is-paused .ai-wire-p, .ai-flow.is-paused .ai-node__dot { animation-play-state: paused; }
@keyframes ai-packet { 0% { stroke-dashoffset: .12; } 20%, 100% { stroke-dashoffset: -1; } }
@keyframes ai-ping {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, currentColor 0%, var(--accent)); }
  14% { box-shadow: 0 0 0 9px transparent; }
  100% { box-shadow: 0 0 0 9px transparent; }
}
.reduced-motion .ai-wire-p { display: none; }

@media (max-width: 899px) {
  .ai-flow__col.is-multi .ai-node { padding: 12px 10px; min-height: 64px; }
  .ai-flow__col.is-multi .ai-node__dot { right: 8px; top: 8px; width: 5px; height: 5px; }
  .ai-flow__col.is-multi .ai-node__title { font-size: .9375rem; padding-right: 8px; }
  .ai-flow__col.is-multi .ai-node__sub { display: none; }
  .ai-flow__col:not(.is-multi) .ai-flow__nodes { justify-content: center; grid-auto-columns: minmax(0, 260px); }
  .ai-flow__kind { background: var(--ink-2); padding: 2px 8px 2px 0; }
  .ai-flow::before { left: 50%; top: 26%; width: 90%; }
}
@media (min-width: 900px) {
  .ai-flow__cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr) minmax(0, 1.12fr) minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(36px, 5.2vw, 104px); min-height: clamp(400px, 34vw, 540px); }
  .ai-flow__col { grid-template-rows: auto 1fr; gap: 20px; }
  .ai-flow__nodes { grid-auto-flow: row; align-content: center; gap: clamp(12px, 1.3vw, 20px); padding-bottom: 28px; }
}
.ai-flows__first { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; margin-top: clamp(24px, 3vw, 44px); }

/* ── 05 · STATEMENT BAND ─────────────────────────────────────────────────── */
.ai-band {
  position: relative; overflow: hidden; isolation: isolate;
  min-height: min(100vh, 980px); min-height: min(100svh, 980px);
  display: flex; align-items: stretch;
  background: var(--ink);
  border-block: 1px solid var(--line);
}
.ai-band__media { position: absolute; inset: -9% 0; z-index: -2; }
.ai-band__media video { width: 100%; height: 100%; object-fit: cover; filter: hue-rotate(-98deg) saturate(1.15) brightness(.9); }
.ai-band::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(7, 7, 10, .82) 0, rgba(7, 7, 10, .12) 30%, rgba(7, 7, 10, .2) 55%, rgba(7, 7, 10, .92) 100%),
    linear-gradient(90deg, rgba(7, 7, 10, .7), transparent 62%);
}
.ai-band__inner { display: flex; flex-direction: column; gap: clamp(20px, 2.4vw, 36px); padding-block: clamp(72px, 9vw, 140px) clamp(36px, 5vw, 80px); width: 100%; }
.ai-band__k { display: inline-flex; align-items: center; gap: 1em; color: var(--fg); margin-bottom: auto; }
.ai-band__k .spot { width: 8px; height: 8px; }
.ai-band__title { max-width: 11ch; }
.ai-band__cap { color: var(--fg); padding-top: clamp(16px, 2vw, 28px); border-top: 1px solid var(--line-strong); }

/* ── 06 · TRAINING (bone) ────────────────────────────────────────────────── */
.ai-train { margin-top: clamp(12px, 1.4vw, 24px); margin-inline: clamp(0px, 1vw, 16px); }
.ai-train__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(36px, 5vw, 56px) var(--gap); }
.ai-train__main, .ai-train__second { position: relative; }
.ai-train__side { display: grid; gap: clamp(28px, 3vw, 48px); align-content: start; }
.ai-train .tile { box-shadow: 0 30px 70px -40px rgba(7, 7, 10, .55); }
.ai-train .svc-row__title { font-size: var(--fs-s); }
.ai-note {
  position: absolute; z-index: 3;
  padding: .28em .8em .36em;
  border-radius: var(--r-pill);
  background: var(--accent); color: var(--ink);
  font-family: var(--font-serif); font-style: italic; font-size: clamp(1.25rem, 1rem + 1.1vw, 2.125rem); line-height: 1.1; letter-spacing: -.01em;
  white-space: nowrap;
  box-shadow: 0 14px 34px -14px rgba(7, 7, 10, .55);
}
.ai-note--a { right: clamp(12px, 3vw, 48px); top: 0; margin-top: -.8em; rotate: 4deg; }
.ai-note--b { left: clamp(10px, 2vw, 28px); bottom: 0; margin-bottom: -.7em; rotate: -5deg; background: var(--ink); color: var(--bone); }
@media (min-width: 900px) {
  .ai-train__grid { grid-template-columns: repeat(12, minmax(0, 1fr)); align-items: start; }
  .ai-train__main { grid-column: 1 / span 7; }
  .ai-train__side { grid-column: 9 / -1; padding-top: clamp(40px, 7vw, 128px); }
  .ai-train__second { margin-left: -28%; }
}

/* ── 07 · HOW IT RUNS ────────────────────────────────────────────────────── */
.ai-run { --bg: var(--ink); }
.ai-run__head { display: grid; gap: clamp(18px, 2vw, 28px); }
.ai-run__head h2 { max-width: 13ch; }
.ai-run__track { align-items: stretch; }
.ai-run__item { width: min(80vw, 460px); display: flex; }
.ai-run__item--media { width: min(80vw, 560px); }
.ai-run__item > * { flex: 1; min-width: 0; }
.ai-run .hscroll__item > .card, .ai-run .hscroll__item > .tile { height: clamp(400px, 56vh, 580px); }
.ai-step { gap: 0; padding: clamp(20px, 2vw, 32px); }
.ai-step__top { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-family: var(--font-mono); font-size: var(--fs-label); letter-spacing: .14em; text-transform: uppercase; color: var(--fg-mute); }
.ai-step__cp { display: inline-flex; align-items: center; gap: .9em; color: var(--fg); }
.ai-step__cp .spot { width: 8px; height: 8px; }
.ai-step__no {
  position: absolute; z-index: -1; right: -.06em; top: .12em;
  font-family: var(--font-display); font-weight: 600; font-variation-settings: "opsz" 96;
  font-size: clamp(11rem, 17vw, 17rem); line-height: .8; letter-spacing: -.06em;
  color: transparent; -webkit-text-stroke: 1px rgba(244, 241, 234, .13);
  transition: -webkit-text-stroke-color .6s;
}
.ai-step:hover .ai-step__no { -webkit-text-stroke-color: color-mix(in srgb, var(--accent) 70%, transparent); }
.ai-step__title { margin-top: auto; }
.ai-step__text { margin-top: 14px; color: var(--fg-mute); max-width: 30ch; }
.ai-step__get { display: grid; gap: 8px; margin-top: clamp(20px, 2.2vw, 32px); padding-top: 16px; border-top: 1px solid var(--line); font-size: var(--fs-small); color: var(--fg); }
.ai-step--cta .ai-step__text { color: rgba(7, 7, 10, .72); }
.ai-step__cta { margin-top: clamp(20px, 2.2vw, 32px); }

/* ── 08 · END ────────────────────────────────────────────────────────────── */
.ai-end .next-svc { margin-top: clamp(40px, 6vw, 96px); border-top: 0; }
.ai-end { padding-bottom: 0; }

/* ---- launch fixes ---- */
/* sticker must not cover the photo caption */
.ai-note--b { left: auto; right: clamp(10px, 2vw, 28px); bottom: auto; top: 0; margin: -.7em 0 0; rotate: 4deg; }
/* indexes on the bone section need ink, not volt */
.section--bone .svc-row__idx { color: var(--ink); opacity: .6; }
.ai-hero .link, .ai-console button, .ai-term button { min-height: 44px; }
