/* AI Dispatcher product page: a JARVIS-style heads-up display in PURP's own violet. PURP+ pages
   wear the dark theme (owner rule); the live board opens in the shared full-screen viewer like
   every other page. The hero's own top colour runs up under the fixed navigation (and Safari's
   overscroll), so no dark strip sits between them. */
html:has(> body.automate-page) { background: var(--stage-raised); }
.automate-page {
  --hud: #cfa8ff;
  --hud-bright: #efe1ff;
  --hud-data: #86e9ff;
  --hud-dim: #cfa8ff59;
  --hud-line: #cfa8ff2e;
  --hud-panel: #140a24c7;
  --hud-mono: ui-monospace, "SF Mono", "SFMono-Regular", Menlo, Consolas, monospace;
  background: linear-gradient(var(--stage-raised), var(--stage-raised)) top / 100% 480px no-repeat, var(--stage);
}
/* White type on the dark stage only: the light product bar keeps its own dark title. */
.automate-page main { color: #fff; }
.automate-page .product-nav__inner { width: var(--content); max-width: none; }

/* Shared HUD pieces. */
.hud-label { display: inline-flex; align-items: center; gap: 10px; color: var(--hud); font-family: var(--hud-mono); font-size: 11px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; }
.hud-label::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--hud-data); box-shadow: 0 0 10px var(--hud-data); animation: hud-blink 2.4s ease-in-out infinite; }
/* Four corner brackets around a framed display. */
.hud-frame { position: relative; }
.hud-frame::after { content: ""; position: absolute; inset: -9px; z-index: 3; pointer-events: none;
  --c: var(--hud); --l: 22px;
  background:
    linear-gradient(var(--c), var(--c)) top left / var(--l) 1.5px no-repeat, linear-gradient(var(--c), var(--c)) top left / 1.5px var(--l) no-repeat,
    linear-gradient(var(--c), var(--c)) top right / var(--l) 1.5px no-repeat, linear-gradient(var(--c), var(--c)) top right / 1.5px var(--l) no-repeat,
    linear-gradient(var(--c), var(--c)) bottom left / var(--l) 1.5px no-repeat, linear-gradient(var(--c), var(--c)) bottom left / 1.5px var(--l) no-repeat,
    linear-gradient(var(--c), var(--c)) bottom right / var(--l) 1.5px no-repeat, linear-gradient(var(--c), var(--c)) bottom right / 1.5px var(--l) no-repeat;
  filter: drop-shadow(0 0 6px #cfa8ff80); }
.automate-heading { max-width: 950px; margin: 0 auto 52px; text-align: center; }
.automate-heading h2 { margin-top: 18px; font-size: clamp(38px, 4.8vw, 64px); line-height: 1; font-weight: 620; letter-spacing: -.056em; text-wrap: balance; }
.automate-heading p { max-width: 700px; margin: 20px auto 0; color: #d0bddf; font-size: 19px; line-height: 1.42; }
@keyframes hud-blink { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes hud-spin { to { transform: rotate(360deg); } }
@keyframes hud-spin-back { to { transform: rotate(-360deg); } }
@keyframes hud-pulse { 0% { transform: scale(.6); opacity: .9; } 100% { transform: scale(2.4); opacity: 0; } }

/* Hero: the rings boot, the title comes up, and the real board recording is framed as the display
   AI Dispatcher works in. One window: the display takes what the title and status line leave. */
.automate-hero { --hero-stage-height: clamp(240px, calc(100svh - 430px), 640px); position: relative; isolation: isolate; overflow: hidden; padding: 12px var(--gutter) 64px; text-align: center; color: #fff; color-scheme: dark; background: radial-gradient(ellipse 60% 55% at 50% 58%, #2b0f4d, transparent 75%), linear-gradient(180deg, var(--stage-raised), var(--stage)); }
.automate-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(var(--hud-line) 1px, transparent 1px) 0 0 / 44px 44px, linear-gradient(90deg, var(--hud-line) 1px, transparent 1px) 0 0 / 44px 44px; opacity: .35; -webkit-mask: radial-gradient(ellipse 70% 70% at 50% 55%, #000, transparent 75%); mask: radial-gradient(ellipse 70% 70% at 50% 55%, #000, transparent 75%); }
.automate-hero__rings { position: absolute; z-index: -1; left: 50%; top: calc(50% + 40px); width: min(1320px, 150vw); aspect-ratio: 1; transform: translate(-50%, -50%); pointer-events: none; opacity: .75; }
.automate-hero__rings svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.automate-hero__rings circle, .automate-hero__rings path { fill: none; stroke: var(--hud); vector-effect: non-scaling-stroke; }
.automate-hero__rings .ring { transform-origin: 50% 50%; transform-box: fill-box; }
.automate-hero__rings .ring--a { animation: hud-spin 90s linear infinite; }
.automate-hero__rings .ring--b { animation: hud-spin-back 140s linear infinite; }
.automate-hero__rings .ring--c { animation: hud-spin 60s linear infinite; }
.automate-hero__rings circle { stroke-dasharray: var(--dash, none); animation: ring-draw 1.9s cubic-bezier(.2, .7, .1, 1) both; }
.automate-hero__rings .ring--b circle { animation-delay: .15s; }
.automate-hero__rings .ring--c circle { animation-delay: .3s; }
@keyframes ring-draw { from { stroke-dashoffset: 1600; opacity: 0; } }
@keyframes boot-in { from { opacity: 0; transform: translateY(10px); } }
@keyframes boot-fade { from { opacity: 0; } }
.automate-hero__intro { position: relative; animation: boot-in .8s ease .2s both; }
.automate-hero h1 { margin-top: 14px; font-size: clamp(48px, 5.8vw, 80px); line-height: .98; font-weight: 650; letter-spacing: -.065em; color: #fff; text-shadow: 0 0 40px #b27cff66; text-wrap: balance; }
.automate-hero__tagline { margin-top: 4px; font-size: clamp(24px, 2.6vw, 36px); font-weight: 600; line-height: 1.1; letter-spacing: -.03em; color: var(--hud-bright); }
.automate-hero__display { width: min(100%, calc(var(--hero-stage-height) * 16 / 9)); margin: 26px auto 0; animation: boot-in .9s cubic-bezier(.2, .7, .1, 1) .5s both; }
.automate-hero__board { position: relative; overflow: hidden; border: 1px solid var(--hud-dim); border-radius: 14px; background: #1b0d29; box-shadow: 0 30px 90px #030007aa, 0 0 90px #9554ca40, inset 0 0 0 1px #ffffff0d; }
.automate-hero__film { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: contain; }
/* A slow scan across the display, as the system reads the board. */
.automate-hero__scan { position: absolute; inset: 0; z-index: 2; pointer-events: none; background: linear-gradient(90deg, transparent, #b98cff14 42%, #d8bbff55 50%, transparent 51%) no-repeat; background-size: 30% 100%; animation: hud-scan 7s cubic-bezier(.45, 0, .55, 1) 1.4s infinite; opacity: 0; }
@keyframes hud-scan { 0% { background-position: -40% 0; opacity: 0; } 8% { opacity: 1; } 55% { background-position: 140% 0; opacity: 1; } 60%, 100% { background-position: 140% 0; opacity: 0; } }
/* Callouts name what the AI is reading on the real board. */
.automate-callouts { margin: 0; padding: 0; list-style: none; }
.automate-callout { position: absolute; z-index: 4; left: var(--x); top: var(--y); display: flex; align-items: center; gap: 8px; transform: translate(-7px, -50%); pointer-events: none; animation: boot-fade .5s ease calc(1.6s + var(--i) * .35s) both; }
.automate-callout__dot { position: relative; flex: none; width: 14px; height: 14px; border: 1.5px solid var(--hud-data); border-radius: 50%; background: #0b0418aa; box-shadow: 0 0 12px var(--hud-data); }
.automate-callout__dot::after { content: ""; position: absolute; inset: -1.5px; border: 1.5px solid var(--hud-data); border-radius: 50%; animation: hud-pulse 2.2s ease-out infinite; animation-delay: calc(var(--i) * .5s); }
.automate-callout__text { padding: 5px 9px; border: 1px solid #86e9ff66; border-radius: 6px; background: #09031acc; color: #dff9ff; font-family: var(--hud-mono); font-size: 10.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; white-space: nowrap; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.automate-callout--below { flex-direction: column; align-items: flex-start; gap: 6px; transform: translate(-7px, -7px); }
/* Positioned so the display's shadow (a positioned box) paints under it, not over it. */
.automate-hero__status { position: relative; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 26px; width: var(--content); margin: 22px auto 0; color: #d9cbff; font-family: var(--hud-mono); font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; list-style: none; padding: 0; animation: boot-fade .8s ease 1.2s both; }
.automate-hero__status li { display: flex; align-items: center; gap: 8px; }
.automate-hero__status li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--hud-data); box-shadow: 0 0 8px var(--hud-data); }

/* Always analyzing: the radar and the reasoning log play one evening on the board together. */
.automate-watch { position: relative; padding: 110px var(--gutter) 100px; color-scheme: dark; background: radial-gradient(ellipse 65% 22% at 50% 0%, #54207853, transparent 80%), var(--stage); }
.automate-watch__console { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 28px; width: min(var(--content), 1180px); margin: 0 auto; }
.automate-radar { position: relative; align-self: start; aspect-ratio: 1; border: 1px solid var(--hud-line); border-radius: 24px; background: radial-gradient(circle at 50% 50%, #2a0f4a, #0c0418 70%); }
.automate-radar svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.automate-radar__grid circle, .automate-radar__grid line { fill: none; stroke: var(--hud-line); stroke-width: 1; }
.automate-radar__sweep { position: absolute; inset: 7%; border-radius: 50%; background: conic-gradient(from 0deg, #b98cff00 0deg, #b98cff00 300deg, #b98cff40 350deg, #e3cbff99 360deg); animation: hud-spin 5s linear infinite; }
.automate-radar__store { fill: var(--hud-bright); filter: drop-shadow(0 0 6px var(--hud)); }
.automate-radar__route { fill: none; stroke: var(--hud-data); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 400; stroke-dashoffset: 400; filter: drop-shadow(0 0 5px var(--hud-data)); transition: stroke-dashoffset 1.4s ease, opacity .6s ease; }
.automate-radar__route.is-drawn { stroke-dashoffset: 0; }
.automate-radar__route.is-faded { opacity: 0; }
.automate-blip { opacity: 0; transition: opacity .5s ease, transform 1.4s ease; }
.automate-blip.is-on { opacity: 1; }
.automate-blip circle { fill: var(--hud); }
.automate-blip.is-waiting circle { fill: #ffc56b; }
.automate-blip.is-gone { opacity: .12; }
.automate-blip--driver circle { fill: var(--hud-data); }
.automate-blip text { fill: #ecdcff; font-family: var(--hud-mono); font-size: 11px; letter-spacing: .06em; }
.automate-radar__legend { position: absolute; left: 16px; bottom: 14px; display: flex; gap: 14px; color: #bda7d3; font-family: var(--hud-mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; }
.automate-radar__legend span { display: flex; align-items: center; gap: 6px; }
.automate-radar__legend i { width: 8px; height: 8px; border-radius: 50%; background: var(--hud); }
.automate-radar__legend i.is-driver { background: var(--hud-data); }
.automate-radar__legend i.is-waiting { background: #ffc56b; }
.automate-log { display: flex; flex-direction: column; min-height: 0; border: 1px solid var(--hud-line); border-radius: 24px; background: var(--hud-panel); }
.automate-log__bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px 12px; padding: 14px 20px; border-bottom: 1px solid var(--hud-line); }
.automate-log__bar .hud-label { white-space: nowrap; }
.automate-log__clock { color: #bda7d3; font-family: var(--hud-mono); font-size: 12px; font-variant-numeric: tabular-nums; letter-spacing: .1em; }
.automate-log__lines { flex: 1 1 0; display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; min-height: 0; margin: 0; padding: 16px 20px 18px; list-style: none; font-family: var(--hud-mono); font-size: 13px; line-height: 1.5; overflow: hidden; -webkit-mask: linear-gradient(transparent, #000 22%); mask: linear-gradient(transparent, #000 22%); }
.automate-log__lines li { display: grid; grid-template-columns: 62px 82px minmax(0, 1fr); gap: 10px; padding: 5px 0; color: #e7dbf3; animation: log-in .35s ease both; }
.automate-log__lines time { color: #9d86b5; font-variant-numeric: tabular-nums; }
.automate-log__lines b { color: var(--hud); font-weight: 650; letter-spacing: .08em; }
.automate-log__lines li[data-kind="plan"] b, .automate-log__lines li[data-kind="commit"] b { color: var(--hud-data); }
.automate-log__lines li[data-kind="wait"] b { color: #ffc56b; }
.automate-log__lines li.is-typing span::after { content: "▍"; margin-left: 2px; color: var(--hud-data); animation: hud-blink .8s steps(1) infinite; }
@keyframes log-in { from { opacity: 0; transform: translateY(6px); } }
.automate-watch__note { width: min(var(--content), 1180px); margin: 18px auto 0; color: #a993bf; font-size: 14px; text-align: center; }

/* What each plan weighs. */
.automate-weighs { padding: 100px var(--gutter); color-scheme: dark; background: var(--stage); }
.automate-weighs__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; width: min(var(--content), 1180px); margin: 0 auto; padding: 0; list-style: none; }
.automate-weighs__grid li { position: relative; padding: 26px 22px 24px; border: 1px solid var(--hud-line); border-radius: 18px; background: linear-gradient(160deg, #ffffff0a, #ffffff03); overflow: hidden; }
.automate-weighs__grid li::before { content: attr(data-code); display: block; margin-bottom: 18px; color: var(--hud); font-family: var(--hud-mono); font-size: 11px; letter-spacing: .2em; }
.automate-weighs__grid li::after { content: ""; position: absolute; top: 22px; right: 20px; width: 26px; height: 26px; border: 1.5px solid var(--hud-dim); border-top-color: var(--hud-data); border-radius: 50%; animation: hud-spin 3.2s linear infinite; animation-delay: calc(var(--i, 0) * -.4s); }
.automate-weighs__grid strong { display: block; font-size: 20px; font-weight: 620; line-height: 1.2; letter-spacing: -.03em; }
.automate-weighs__grid span { display: block; margin-top: 9px; color: #cdb9dc; font-size: 15.5px; line-height: 1.45; }

/* Manual versus autonomous. */
.automate-compare { padding: 100px var(--gutter); color-scheme: dark; background: var(--stage); }
.automate-compare__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; width: min(var(--content), 1080px); margin: 0 auto; }
.automate-card { padding: 38px; border: 1px solid var(--hud-line); border-radius: 22px; background: #ffffff06; }
.automate-card--ai { background: linear-gradient(160deg, #3d1766, #1d0b31 70%); box-shadow: 0 30px 80px #0006, 0 0 80px #9554ca33; }
.automate-card--ai.hud-frame::after { inset: -1px; }
.automate-card .hud-label { color: #bca9cb; }
.automate-card .hud-label::before { background: #bca9cb; box-shadow: none; animation: none; }
.automate-card--ai .hud-label { color: var(--hud-data); }
.automate-card--ai .hud-label::before { background: var(--hud-data); box-shadow: 0 0 10px var(--hud-data); animation: hud-blink 2.4s ease-in-out infinite; }
.automate-card h3 { margin-top: 14px; font-size: clamp(28px, 2.6vw, 38px); line-height: 1.05; font-weight: 620; letter-spacing: -.045em; }
.automate-card ul { margin: 26px 0 0; padding: 0; list-style: none; }
.automate-card li { padding: 14px 0; border-top: 1px solid #dcc1f022; color: #cdb9dc; font-size: 17px; line-height: 1.4; }
.automate-card--ai li { color: #fff; }
.automate-card a { display: inline-block; margin-top: 22px; color: #efd5ff; font-size: 15px; font-weight: 650; }
.automate-card a:hover { color: #fff; }

/* Guardrails and the controls the team keeps. */
.automate-control { padding: 100px var(--gutter) 110px; color-scheme: dark; background: radial-gradient(ellipse 55% 40% at 50% 70%, #24103f, transparent 80%), var(--stage); }
.automate-control__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; width: min(var(--content), 1180px); margin: 0 auto; padding: 0; list-style: none; counter-reset: protocol; }
.automate-control__grid li { padding: 26px 24px; border: 1px solid var(--hud-line); border-left: 2px solid var(--hud); border-radius: 6px 18px 18px 6px; background: #ffffff07; counter-increment: protocol; }
.automate-control__grid li::before { content: "PROTOCOL " counter(protocol, decimal-leading-zero); display: block; margin-bottom: 12px; color: var(--hud); font-family: var(--hud-mono); font-size: 10.5px; letter-spacing: .2em; }
.automate-control__grid strong { display: block; font-size: 20px; font-weight: 620; line-height: 1.2; letter-spacing: -.03em; }
.automate-control__grid span { display: block; margin-top: 9px; color: #cdb9dc; font-size: 15.5px; line-height: 1.45; }

/* The visitor's own numbers; nothing leaves the page. */
.automate-math { padding: 100px var(--gutter); color-scheme: dark; background: radial-gradient(ellipse 55% 40% at 50% 60%, #2e1150, transparent 80%), var(--stage); }
.automate-math__panel { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); align-items: center; gap: 56px; width: min(var(--content), 1080px); margin: 0 auto; padding: 44px; border: 1px solid var(--hud-line); border-radius: 24px; background: var(--hud-panel); }
.automate-math__inputs { display: grid; gap: 26px; }
.automate-slider__row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.automate-slider label { color: #efe4f8; font-size: 16px; font-weight: 600; }
.automate-slider output { color: var(--hud-data); font-family: var(--hud-mono); font-size: 17px; font-weight: 650; font-variant-numeric: tabular-nums; }
.automate-slider input { display: block; width: 100%; margin: 12px 0 0; accent-color: #b98cff; cursor: pointer; }
.automate-math__result { display: grid; justify-items: center; text-align: center; }
.automate-math__figure { font-size: clamp(56px, 6vw, 88px); line-height: 1; font-weight: 650; letter-spacing: -.06em; font-variant-numeric: tabular-nums; color: #fff; text-shadow: 0 0 30px #b27cff55; }
.automate-math__figure--money { margin-top: 30px; color: var(--hud-bright); }
.automate-math__caption { margin-top: 8px; color: #d0bddf; font-size: 16px; }
.automate-math__note { width: min(var(--content), 1080px); margin: 22px auto 0; color: #b8a3c8; font-size: 14px; line-height: 1.5; text-align: center; }

.automate-finale { color-scheme: dark; color: #fff; padding-bottom: 100px; background: radial-gradient(ellipse 50% 45% at 50% 58%, #42186d, transparent 85%), var(--stage); }
.automate-finale h2 { font-size: clamp(38px, 4.8vw, 64px); letter-spacing: -.055em; }
.automate-finale > p { position: relative; margin-top: 20px; color: #ded0eb; font-size: 19px; }
.automate-finale .pos-link { color: #ead6fa; }
.automate-finale .pos-link:hover { color: #fff; }
.automate-finale .live-cta__actions { margin-top: 38px; }

@media (max-width: 1000px) {
  .automate-callout__text { display: none; }
  .automate-watch__console { grid-template-columns: 1fr; }
  .automate-radar { width: min(100%, 440px); justify-self: center; }
  .automate-log { height: 460px; }
  .automate-weighs__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .automate-control__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .automate-math__panel { grid-template-columns: 1fr; gap: 40px; }
}
@media (max-width: 734px) {
  .automate-page .product-nav__brand { display: none; }
  .automate-page .product-nav__title { font-size: 14px; }
  .automate-hero { padding-top: 28px; padding-bottom: 80px; }
  .automate-hero h1 { font-size: clamp(44px, 12vw, 68px); }
  .automate-hero__display { margin-top: 22px; }
  .automate-hero__board { border-radius: 9px; }
  .hud-frame::after { inset: -6px; --l: 14px; }
  .automate-callout__dot { width: 11px; height: 11px; }
  .automate-hero__status { gap: 8px 16px; font-size: 11px; letter-spacing: .1em; }
  .automate-heading { margin-bottom: 36px; }
  .automate-heading h2 { font-size: clamp(34px, 9vw, 52px); }
  .automate-heading p { font-size: 18px; }
  .automate-watch, .automate-weighs, .automate-compare, .automate-math, .automate-control { padding-top: 80px; padding-bottom: 80px; }
  .automate-log { height: 480px; }
  .automate-log__lines { padding: 12px 14px 14px; font-size: 12px; }
  .automate-log__lines li { grid-template-columns: 50px 64px minmax(0, 1fr); gap: 7px; }
  .automate-weighs__grid, .automate-compare__grid, .automate-control__grid { grid-template-columns: 1fr; }
  .automate-card { padding: 28px 24px; }
  .automate-math__panel { padding: 28px 22px; border-radius: 20px; }
  .automate-finale { padding-bottom: 90px; }
  .automate-finale > p { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .automate-hero__rings .ring, .automate-radar__sweep, .automate-weighs__grid li::after, .hud-label::before, .automate-callout__dot::after { animation: none; }
  .automate-hero__scan { display: none; }
  .automate-hero__rings circle, .automate-hero__intro, .automate-hero__display, .automate-callout, .automate-hero__status { animation: none; }
  .automate-radar__route, .automate-blip { transition: none; }
  .automate-log__lines li { animation: none; }
}
