/* Yoyology — built on the Yoyology design system (dark theme, the website default).
   Layout: 1200px column; uneven bento + two-column case studies; one orchestrated motion per section. */
:root {
  /* color */
  --bg: #07080C;
  --panel: #0D0F15;
  --panel-2: #151925;
  --line: #232837;
  --line-control: #5C657C;
  --ink: #EDEFF4;
  --ink-muted: #A3A9B8;
  --ink-subtle: #7D8496;
  --on-ink: #07080C;
  --signal: #4FE3C1;
  --signal-soft: #0B2620;
  --on-signal: #03110D;
  --cobalt: #8297FF;
  --cobalt-soft: #141B3B;

  /* type */
  --font-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* spacing */
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px;
  --space-6: 24px; --space-8: 32px; --space-16: 64px; --space-36: 144px;

  /* radius */
  --radius-sm: 6px; --radius-md: 12px; --radius-lg: 20px; --radius-xl: 28px; --radius-full: 9999px;

  /* depth */
  --shadow-float: 0 40px 120px -20px #000000cc, 0 0 80px -20px #4fe3c12e;
  --glow-signal: 0 0 12px #4fe3c199;
  --focus-ring: 0 0 0 2px #07080c, 0 0 0 4px #8297ff;

  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --gutter: var(--space-6);
  --nav-h: 68px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--nav-h) + 16px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  overflow-x: clip;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
::selection { background: var(--signal); color: var(--on-signal); }
:focus-visible { outline: 2px solid transparent; box-shadow: var(--focus-ring); border-radius: 6px; }

.container {
  width: 100%;
  max-width: 1248px;
  margin: 0 auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}
.mono { font-family: var(--font-mono); }
.signal { color: var(--signal); }
.accent { color: var(--signal); }
.muted { color: var(--ink-subtle); }
.ico { width: 16px; height: 16px; flex: none; }
s { color: var(--ink-subtle); text-decoration-thickness: 1.5px; }

.grad-text {
  background: linear-gradient(135deg, var(--signal) 10%, var(--cobalt) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

h1, h2, h3 { text-wrap: balance; }

/* ============ Buttons ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  height: 44px; padding: 0 20px;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  font: 500 15px/1 var(--font-sans); letter-spacing: -0.005em;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color .2s, border-color .2s, transform .2s var(--ease), box-shadow .2s;
}
.btn .ico { transition: transform .2s var(--ease); }
.btn:hover .ico { transform: translateX(3px); }
.btn-primary { background: var(--ink); color: var(--on-ink); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 30px -10px #4fe3c166; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-control); }
.btn-ghost:hover { background: var(--panel-2); }
.btn-sm { height: 36px; padding: 0 16px; font-size: 14px; }
.btn-lg { height: 52px; padding: 0 26px; font-size: 16px; }
.btn:focus-visible { box-shadow: var(--focus-ring); border-radius: var(--radius-full); }

.pulse-dot {
  width: 7px; height: 7px; flex: none;
  border-radius: var(--radius-full);
  background: var(--signal);
  box-shadow: var(--glow-signal);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: .35; } }

/* ============ Nav ============ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  padding-top: env(safe-area-inset-top, 0px);
  border-bottom: 1px solid transparent;
  transition: background-color .3s, border-color .3s, backdrop-filter .3s;
}
.nav.scrolled, .nav.menu-open {
  background: rgba(7, 8, 12, .78);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  backdrop-filter: saturate(140%) blur(14px);
  border-bottom-color: var(--line);
}
.nav-inner { height: var(--nav-h); display: flex; align-items: center; justify-content: space-between; gap: var(--space-6); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; font-size: 18px; letter-spacing: -0.02em; color: var(--ink); }
.brand-mark { width: 26px; height: 26px; }
.nav-links { display: flex; gap: 2px; }
.nav-links a {
  padding: 8px 14px; border-radius: var(--radius-full);
  font-size: 14px; color: var(--ink-muted); text-decoration: none;
  transition: color .2s, background-color .2s;
}
.nav-links a:hover { color: var(--ink); background: var(--panel-2); }
.nav-cta { display: flex; align-items: center; gap: var(--space-3); }
.nav-toggle {
  display: none; width: 40px; height: 40px; padding: 0;
  border-radius: var(--radius-full); border: 1px solid var(--line-control);
  background: transparent; cursor: pointer; position: relative;
}
.nav-toggle span { position: absolute; left: 12px; right: 12px; height: 1.5px; background: var(--ink); transition: transform .25s var(--ease); }
.nav-toggle span:first-child { top: 15px; }
.nav-toggle span:last-child { top: 22px; }
.menu-open .nav-toggle span:first-child { transform: translateY(3.5px) rotate(45deg); }
.menu-open .nav-toggle span:last-child { transform: translateY(-3.5px) rotate(-45deg); }
.mobile-menu { display: none; }

/* ============ Hero: ASCII globe ============ */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding-top: calc(var(--nav-h) + env(safe-area-inset-top, 0px));
  padding-bottom: 88px;
}
.globe-wrap {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  display: flex; justify-content: center; align-items: flex-start;
  padding-top: calc(var(--nav-h) + env(safe-area-inset-top, 0px) + 4px);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 58%, rgba(0, 0, 0, .35) 78%, transparent 96%);
  mask-image: linear-gradient(180deg, #000 0%, #000 58%, rgba(0, 0, 0, .35) 78%, transparent 96%);
}
.globe {
  --globe-d: min(calc(100svh - 250px), 94vw, 860px);
  position: relative; width: var(--globe-d); height: var(--globe-d);
  flex: none;
}
.globe::before {
  content: ""; position: absolute; inset: -6%; border-radius: 50%;
  background: radial-gradient(circle, #8297ff1a 0%, #4fe3c10d 45%, transparent 68%);
}
.globe-layer {
  position: absolute; left: 0; top: 0; margin: 0;
  font-family: var(--font-mono); font-size: 10px; line-height: 1;
  white-space: pre; letter-spacing: 0;
  user-select: none;
}
.g-ocean { color: var(--ink-subtle); opacity: .4; }
.g-land { color: var(--ink-muted); }
.g-signal { color: var(--signal); text-shadow: 0 0 10px #4fe3c199; }

.hero-content { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; }
.hero-content::before {
  content: ""; position: absolute; z-index: -1; left: 50%; top: 50%;
  width: min(1100px, 120%); height: 140%; transform: translate(-50%, -50%);
  background: radial-gradient(ellipse 50% 50% at 50% 55%, #07080cd9 0%, #07080c99 45%, transparent 75%);
  pointer-events: none;
}
.hud {
  position: absolute; left: 0; right: 0; bottom: 28px;
  display: flex; justify-content: space-between; align-items: flex-end;
  padding-left: max(32px, env(safe-area-inset-left, 0px)); padding-right: max(32px, env(safe-area-inset-right, 0px));
  font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-subtle);
  pointer-events: none;
}
.hud-scroll { display: inline-flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; pointer-events: auto; }
.hud-scroll:hover { color: var(--ink); }
.hud-coords { display: inline-flex; align-items: center; gap: 10px; font-variant-numeric: tabular-nums; }
.scroll-line { position: relative; width: 1px; height: 36px; background: var(--line); overflow: hidden; }
.scroll-line::after { content: ""; position: absolute; left: 0; top: -40%; width: 1px; height: 40%; background: var(--signal); animation: drip 2.2s var(--ease) infinite; }
@keyframes drip { to { top: 100%; } }
.hero-grid {
  position: absolute; inset: 0; z-index: -3; pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  background-position: center top;
  opacity: .45;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 0%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 0%, transparent 75%);
}
.hero h1 {
  margin: 0 0 20px;
  font-size: clamp(42px, 6.6vw, 84px);
  line-height: 1.02;
  font-weight: 500;
  letter-spacing: -0.045em;
}
.lead { margin: 0; max-width: 600px; font-size: 19px; line-height: 1.6; color: var(--ink-muted); }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-3); margin-top: 34px; }

/* Console (AgentLog) */
.console {
  position: relative;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(13, 15, 21, .92), rgba(10, 12, 17, .96));
  box-shadow: var(--shadow-float);
  overflow: hidden;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.console::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 1px;
  background: linear-gradient(90deg, transparent, #4fe3c166, #8297ff66, transparent);
}
.console-bar { display: flex; align-items: center; gap: var(--space-3); padding: 12px var(--space-4); border-bottom: 1px solid var(--line); }
.dots { display: flex; gap: 6px; }
.dots i { width: 10px; height: 10px; border-radius: var(--radius-full); background: var(--panel-2); border: 1px solid var(--line); }
.console-title { flex: 1; min-width: 0; font-size: 12px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.console-title span { color: var(--ink-subtle); }
.live {
  display: inline-flex; align-items: center; gap: 8px;
  height: 24px; padding: 0 10px; border-radius: var(--radius-full);
  background: var(--signal-soft); color: var(--signal);
  font-size: 11px; font-weight: 500; letter-spacing: .1em;
}
.console-log { list-style: none; margin: 0; padding: 18px var(--space-4); display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; line-height: 1.5; min-height: 300px; }
.console-log li { display: grid; grid-template-columns: 62px 74px minmax(0, 1fr); gap: 10px; align-items: start; padding: 5px 0; }
.js .console-log li { opacity: 0; transform: translateY(6px); transition: opacity .45s var(--ease), transform .45s var(--ease); }
.js .console-log li.on { opacity: 1; transform: none; }
.console-log .t { color: var(--ink-subtle); font-variant-numeric: tabular-nums; }
.console-log .m { color: var(--ink); min-width: 0; }
.console-log .m b { color: var(--signal); font-weight: 500; }
.tag {
  justify-self: start; padding: 1px 6px; border-radius: var(--radius-sm);
  border: 1px solid var(--line-control); font-size: 10.5px; letter-spacing: .06em; color: var(--ink-muted);
}
.tag-in { color: var(--cobalt); background: var(--cobalt-soft); border-color: transparent; }
.tag-ok { color: var(--signal); background: var(--signal-soft); border-color: transparent; }
.console-foot {
  display: flex; justify-content: space-between; gap: var(--space-4);
  padding: 12px var(--space-4); border-top: 1px solid var(--line); background: var(--panel-2); font-size: 12px;
}
.console-foot div { display: flex; gap: 10px; }
.console-foot .k { color: var(--ink-subtle); }
.console-foot .v { font-variant-numeric: tabular-nums; }
.console-foot .strike { color: var(--ink-subtle); text-decoration: line-through; }

/* Stats */
.stats {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}
.stat { padding: 28px 24px 36px 0; min-width: 0; }
.stat + .stat { padding-left: 24px; border-left: 1px solid var(--line); }
.stat-v { font-size: 26px; line-height: 1.2; font-weight: 500; letter-spacing: -0.025em; font-variant-numeric: tabular-nums; }
.stat-v .arrow { color: var(--ink-subtle); margin: 0 2px; }
.stat-k { margin-top: 8px; font-size: 14px; line-height: 1.5; color: var(--ink-subtle); }

/* ============ Ticker ============ */
.ticker {
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  overflow: hidden; padding: 20px 0; background: var(--panel);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.ticker-track { display: flex; width: max-content; animation: marquee 48s linear infinite; }
.ticker-track span {
  display: inline-flex; align-items: center; gap: 40px; padding-right: 40px;
  font: 500 12px/1 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-subtle); white-space: nowrap;
}
.ticker-track span::after { content: ""; width: 6px; height: 6px; border-radius: var(--radius-full); border: 1.5px solid var(--signal); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ============ Sections ============ */
.section { position: relative; padding: var(--space-36) 0 0; }
.section-loop { padding-bottom: 96px; }
.section-cta { padding-bottom: var(--space-36); }
.section-head { max-width: 760px; margin-bottom: var(--space-16); }
.kicker {
  display: inline-flex; align-items: center; gap: 10px;
  font: 500 12px/1.4 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--signal);
}
.kicker::before { content: ""; width: 20px; height: 1px; background: currentColor; }
.section h2 {
  margin: 20px 0 22px;
  font-size: clamp(34px, 4.6vw, 56px);
  line-height: 1.05;
  font-weight: 500;
  letter-spacing: -0.035em;
}
.dim { color: var(--ink-subtle); }
.section-sub { margin: 0; max-width: 620px; font-size: 18px; line-height: 1.6; color: var(--ink-muted); }

/* ============ Bento ============ */
.bento { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--space-4); }
.card {
  position: relative;
  display: flex; flex-direction: column;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--panel);
  overflow: hidden;
  min-width: 0;
  transition: border-color .3s;
}
.card::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), #4fe3c112, transparent 45%);
  opacity: 0; transition: opacity .35s;
}
.card:hover { border-color: #2e3446; }
.card:hover::before { opacity: 1; }
.card-body { padding: var(--space-8); display: flex; flex-direction: column; gap: 10px; }
.card-top { display: flex; justify-content: space-between; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-subtle); margin-bottom: 14px; }
.card-num { color: var(--signal); }
.card h3 { margin: 0; font-size: 20px; line-height: 1.35; font-weight: 500; letter-spacing: -0.01em; }
.card p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--ink-muted); }
.card-visual { padding: 0 var(--space-8) var(--space-8); margin-top: auto; }

.span-2 { grid-column: span 2; }
.span-4 { grid-column: span 4; }
.split { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); align-items: center; }
.split .card-visual { padding: var(--space-8) var(--space-8) var(--space-8) 0; margin: 0; }

/* audit table */
.audit { border: 1px solid var(--line); border-radius: var(--radius-md); overflow: hidden; font-size: 13px; background: var(--bg); }
.audit-row { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) 76px; gap: 14px; align-items: center; padding: 12px 14px; }
.audit-row + .audit-row { border-top: 1px solid var(--line); }
.audit-head { font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-subtle); background: var(--panel-2); padding-top: 9px; padding-bottom: 9px; }
.audit-row > span:first-child { color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.meter { height: 6px; border-radius: var(--radius-full); background: var(--panel-2); overflow: hidden; }
.meter i { display: block; height: 100%; width: var(--v); border-radius: inherit; background: linear-gradient(90deg, #4fe3c159, var(--signal)); }
.js .meter i { width: 0; transition: width 1.4s var(--ease); }
.js .in-view .meter i { width: var(--v); }
.audit-row:nth-child(3) .meter i { transition-delay: .1s; }
.audit-row:nth-child(4) .meter i { transition-delay: .2s; }
.audit-row:nth-child(5) .meter i { transition-delay: .3s; }
.fit { white-space: nowrap; justify-self: end; font: 500 10.5px/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; padding: 5px 8px; border-radius: var(--radius-full); }
.fit.hi { color: var(--signal); background: var(--signal-soft); }
.fit.md { color: var(--cobalt); background: var(--cobalt-soft); }

/* agent graph */
.agent-svg { width: 100%; height: auto; overflow: visible; }
.agent-svg .edge { fill: none; stroke: var(--line-control); stroke-width: 1.5; stroke-dasharray: 4 6; animation: flow 1.6s linear infinite; }
.agent-svg .edge.loop { stroke: var(--signal); opacity: .55; animation-duration: 3s; }
.agent-svg .node circle:first-child { fill: var(--panel-2); stroke: var(--line-control); stroke-width: 1.5; }
.agent-svg .node .core { fill: var(--ink-subtle); }
.agent-svg .n2 .core { fill: var(--cobalt); }
.agent-svg .n3 circle:first-child { stroke: var(--signal); }
.agent-svg .n3 .core { fill: var(--signal); }
.agent-svg .lbl { font: 500 11px var(--font-mono); letter-spacing: .08em; fill: var(--ink-subtle); text-transform: uppercase; }
.agent-svg .lbl-loop { fill: var(--signal); }
@keyframes flow { to { stroke-dashoffset: -20; } }

/* integration pills */
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pills span {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 12px; border-radius: var(--radius-full);
  border: 1px solid var(--line); background: var(--panel-2);
  font: 500 12px/1 var(--font-mono); color: var(--ink-muted);
  animation: pill-glow 8s var(--ease) infinite;
}
.pills span::before { content: ""; width: 6px; height: 6px; border-radius: var(--radius-full); background: var(--ink-subtle); }
.pills span:nth-child(2) { animation-delay: 1s; } .pills span:nth-child(3) { animation-delay: 2s; }
.pills span:nth-child(4) { animation-delay: 3s; } .pills span:nth-child(5) { animation-delay: 4s; }
.pills span:nth-child(6) { animation-delay: 5s; } .pills span:nth-child(7) { animation-delay: 6s; }
.pills span:nth-child(8) { animation-delay: 7s; }
@keyframes pill-glow {
  0%, 14%, 100% { border-color: var(--line); color: var(--ink-muted); }
  4%, 10% { border-color: #4fe3c166; color: var(--ink); }
}

/* rollout */
.rollout { border: 1px solid var(--line); border-radius: var(--radius-md); padding: 18px; background: var(--bg); }
.rollout-head { display: flex; justify-content: space-between; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-subtle); }
.rollout-bar { height: 6px; margin: 12px 0 16px; border-radius: var(--radius-full); background: var(--panel-2); overflow: hidden; }
.rollout-bar i { display: block; height: 100%; width: 75%; border-radius: inherit; background: var(--signal); box-shadow: var(--glow-signal); }
.js .rollout-bar i { width: 0; transition: width 1.6s var(--ease) .2s; }
.js .in-view .rollout-bar i { width: 75%; }
.rollout ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.rollout li { display: flex; align-items: center; gap: 10px; color: var(--ink-muted); }
.rollout li.done .ico { color: var(--signal); }
.rollout li.active { color: var(--ink); }
.spinner {
  width: 14px; height: 14px; margin: 0 1px; flex: none; border-radius: var(--radius-full);
  border: 1.5px solid var(--line-control); border-top-color: var(--signal);
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============ The loop ============ */
.section-loop { background: linear-gradient(180deg, transparent, #0d0f1599 30%, #0d0f1599 70%, transparent); }
.loop { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 64px; align-items: center; }
.stages { position: relative; list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.stages::before { content: ""; position: absolute; left: 30px; top: 36px; bottom: 36px; width: 1px; background: var(--line); }
.stage {
  position: relative;
  display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 16px;
  padding: 20px 22px 20px 16px;
  border-radius: var(--radius-md); border: 1px solid transparent;
  transition: background-color .4s, border-color .4s;
}
.stage-node {
  position: relative; z-index: 1;
  width: 14px; height: 14px; margin: 3px 0 0 7px;
  border-radius: var(--radius-full); border: 1.5px solid var(--line-control); background: var(--bg);
  transition: background-color .3s, border-color .3s, box-shadow .3s;
}
.stage-k { font-size: 11px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-subtle); transition: color .3s; }
.stage h3 { margin: 6px 0 6px; font-size: 19px; line-height: 1.35; font-weight: 500; letter-spacing: -0.01em; }
.stage p { margin: 0; font-size: 15px; color: var(--ink-muted); }
.stage.active { background: var(--panel); border-color: var(--line); }
.stage.active .stage-node { border-color: var(--signal); background: var(--signal); box-shadow: var(--glow-signal); }
.stage.active .stage-k, .stage.done .stage-k { color: var(--signal); }
.stage.done .stage-node { border-color: var(--signal); }

/* ============ Case studies ============ */
.case {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 72px; align-items: start;
  padding: var(--space-16) 0 96px;
  border-top: 1px solid var(--line);
}
.case:last-child { padding-bottom: 0; }
.case.reverse { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
.case.reverse .case-visual { order: -1; }
.case-copy { min-width: 0; }
.case-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-subtle); }
.case-index { color: var(--signal); }
.case-meta .sep { width: 4px; height: 4px; border-radius: var(--radius-full); background: var(--line-control); }
.case h3 { margin: 18px 0 8px; font-size: clamp(28px, 3vw, 36px); line-height: 1.12; font-weight: 500; letter-spacing: -0.025em; }
.case-block { margin-top: 32px; }
.case-block h4 { margin: 0 0 10px; font-size: 12px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-subtle); }
.case-block p { margin: 0; color: var(--ink-muted); max-width: 62ch; }
.built { list-style: none; padding: 0; margin: 20px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 24px; }
.built li { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; line-height: 1.5; color: var(--ink); }
.built .ico { margin-top: 3px; color: var(--signal); }
.outcomes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 40px; }
.outcome { padding: 18px; border-radius: var(--radius-md); border: 1px solid var(--line); background: var(--panel); min-width: 0; }
.outcome-v { font-size: 22px; line-height: 1.2; font-weight: 500; letter-spacing: -0.02em; color: var(--ink); white-space: nowrap; }
.outcome-k { margin-top: 6px; font-size: 13px; line-height: 1.45; color: var(--ink-subtle); }

.case-visual { position: sticky; top: calc(var(--nav-h) + 32px); min-width: 0; }
.viz {
  position: relative;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background:
    radial-gradient(500px 240px at 100% 0%, #8297ff10, transparent 70%),
    var(--panel);
  padding: var(--space-6);
  box-shadow: 0 30px 80px -30px #000000b3;
  overflow: hidden;
}
.viz-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 22px; font-size: 12px; color: var(--ink-subtle); }
.viz-note { padding: 4px 9px; border-radius: var(--radius-full); border: 1px solid var(--line); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; }

/* race */
.race { display: flex; flex-direction: column; gap: 16px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.race-label { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: 13.5px; color: var(--ink-muted); }
.race-label .mono { font-size: 12.5px; }
.race-track { height: 10px; border-radius: var(--radius-full); background: var(--panel-2); overflow: hidden; }
.race-track i { display: block; height: 100%; width: var(--w); min-width: 10px; border-radius: inherit; }
.before .race-track i { background: repeating-linear-gradient(-45deg, #3a4155 0 6px, #2c3243 6px 12px); }
.after .race-track i { background: var(--signal); box-shadow: var(--glow-signal); }
.js .race-track i { width: 0; transition: width 2.4s var(--ease); }
.js .after .race-track i { transition-duration: .5s; transition-delay: .2s; }
.js .in-view .race-track i { width: var(--w); }

/* chat */
.chat { display: flex; flex-direction: column; gap: 12px; padding-top: 22px; }
.bubble { max-width: 88%; padding: 14px 16px; border-radius: var(--radius-md); font-size: 14px; line-height: 1.55; }
.bubble p { margin: 6px 0 0; }
.bubble-meta { display: flex; align-items: center; gap: 8px; font-size: 11px; letter-spacing: .04em; color: var(--ink-subtle); }
.bubble.in { align-self: flex-start; background: var(--panel-2); border: 1px solid var(--line); border-top-left-radius: 4px; color: var(--ink); }
.out-wrap { position: relative; display: flex; justify-content: flex-end; }
.bubble.out { background: var(--signal-soft); border: 1px solid #4fe3c133; border-top-right-radius: 4px; color: var(--ink); }
.bubble.out .bubble-meta { color: #8fd9c5; }
.badge { padding: 2px 7px; border-radius: var(--radius-full); background: #4fe3c126; color: var(--signal); font-size: 10.5px; }
.typing {
  position: absolute; right: 0; top: 0;
  display: inline-flex; gap: 4px; padding: 12px 14px;
  border-radius: var(--radius-md); border-top-right-radius: 4px;
  background: var(--signal-soft); border: 1px solid #4fe3c133;
  opacity: 0; pointer-events: none;
}
.typing i { width: 6px; height: 6px; border-radius: var(--radius-full); background: var(--signal); animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
.handoff {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  padding: 10px 12px; border-radius: var(--radius-md);
  border: 1px dashed var(--line-control); font-size: 11.5px; color: var(--ink-muted);
}
.handoff .ico { width: 14px; height: 14px; color: var(--signal); }
.handoff .arrow { color: var(--ink-subtle); }
.js [data-step] { opacity: 0; transform: translateY(8px); transition: opacity .5s var(--ease), transform .5s var(--ease); }
.js [data-step].show { opacity: 1; transform: none; }
.js .typing[data-step] { transform: none; }

/* mail */
.tabs { display: inline-flex; gap: 4px; padding: 3px; border-radius: var(--radius-full); border: 1px solid var(--line); background: var(--bg); }
.tabs button {
  min-width: 40px; height: 28px; padding: 0 10px; border: 0; border-radius: var(--radius-full);
  background: transparent; color: var(--ink-subtle); cursor: pointer;
  font: 500 11.5px/1 var(--font-mono); letter-spacing: .08em;
  transition: background-color .2s, color .2s;
}
.tabs button:hover { color: var(--ink); }
.tabs button[aria-selected="true"] { background: var(--ink); color: var(--on-ink); }
.mail { border-radius: var(--radius-md); border: 1px solid var(--line); padding: 16px; }
.mail-in { background: var(--panel-2); }
.mail-top { display: flex; align-items: center; gap: 12px; }
.avatar {
  width: 34px; height: 34px; flex: none; display: grid; place-items: center;
  border-radius: var(--radius-full); background: var(--cobalt-soft); color: var(--cobalt); font-size: 12px; font-weight: 500;
}
.mail-who { flex: 1; min-width: 0; }
.mail-from { font-size: 14px; font-weight: 500; }
.mail-role, .mail-time { font-size: 11px; color: var(--ink-subtle); }
.mail-time { white-space: nowrap; }
.mail-subject { margin-top: 14px; font-size: 14.5px; font-weight: 500; }
.mail-body { margin: 6px 0 0; font-size: 14px; line-height: 1.6; color: var(--ink-muted); }
.mail-gloss { display: flex; gap: 10px; margin: 12px 0 0; padding-top: 10px; border-top: 1px dashed var(--line); font-size: 12.5px; line-height: 1.5; color: var(--ink-subtle); }
.mail-gloss .mono { flex: none; padding: 1px 6px; height: fit-content; border-radius: var(--radius-sm); border: 1px solid var(--line-control); font-size: 10px; letter-spacing: .08em; }
.mail-body, .mail-gloss, .mail-subject, .mail-from { transition: opacity .3s; }
.swap .mail-body, .swap .mail-gloss, .swap .mail-subject, .swap .mail-from, .swap .mail-role, .swap .avatar { opacity: 0; }

.pipeline { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 10px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 10px; border-radius: var(--radius-full);
  border: 1px solid var(--line); font: 500 11px/1 var(--font-mono); letter-spacing: .02em; color: var(--ink-subtle);
  transition: color .3s, border-color .3s, background-color .3s;
}
.chip-ico { width: 10px; height: 10px; border-radius: var(--radius-full); border: 1.5px solid var(--line-control); flex: none; }
.chip.active { color: var(--ink); border-color: var(--line-control); }
.chip.active .chip-ico { border-color: var(--line-control); border-top-color: var(--signal); animation: spin .8s linear infinite; }
.chip.done { color: var(--signal); border-color: transparent; background: var(--signal-soft); }
.chip.done .chip-ico { border: 0; background: var(--signal); box-shadow: inset 0 0 0 3px var(--signal-soft); }

.kv { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 0 0 14px; }
.kv div { min-width: 0; padding: 8px 10px; border-radius: var(--radius-sm); background: var(--bg); border: 1px solid var(--line); }
.kv dt { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-subtle); }
.kv dd { margin: 3px 0 0; font-size: 11.5px; color: var(--ink); overflow-wrap: anywhere; transition: opacity .3s; }
.kv.pending dd { opacity: .2; }

.mail-out { border-color: #4fe3c133; background: linear-gradient(180deg, #4fe3c10d, transparent 60%), var(--panel); }
.draft-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 11px; letter-spacing: .04em; color: var(--ink-subtle); }
.draft-head b { color: var(--ink); font-weight: 500; }
.draft-status { padding: 3px 8px; border-radius: var(--radius-full); background: var(--panel-2); color: var(--ink-muted); white-space: nowrap; transition: color .3s, background-color .3s; }
.draft-status.sent { background: var(--signal-soft); color: var(--signal); }
.draft-text { margin: 12px 0 0; min-height: 132px; font-size: 14px; line-height: 1.6; color: var(--ink); white-space: pre-line; }
.draft-text.typing-on::after { content: ""; display: inline-block; width: 7px; height: 15px; margin-left: 2px; vertical-align: -2px; background: var(--signal); animation: blink 1s steps(1) infinite; }
.draft-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 11px; }
.approve {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px;
  border-radius: var(--radius-full); background: var(--panel-2); color: var(--ink-subtle);
  font-size: 12.5px; font-weight: 500; white-space: nowrap;
  transition: background-color .3s, color .3s;
}
.approve .ico { width: 14px; height: 14px; }
.approve.ready { background: var(--ink); color: var(--on-ink); }
.approve.sent { background: var(--signal); color: var(--on-signal); }

/* ============ Process ============ */
.steps { position: relative; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-6); }
.steps-line { position: absolute; top: 22px; left: 22px; right: 22px; height: 1px; background: var(--line); }
.steps-line i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, var(--signal), var(--cobalt)); transform-origin: left; }
.js .steps-line i { transform: scaleX(0); transition: transform 2s var(--ease) .2s; }
.js .steps.in-view .steps-line i { transform: scaleX(1); }
.step { position: relative; min-width: 0; padding-right: var(--space-4); }
.step-node {
  position: relative; z-index: 1;
  width: 44px; height: 44px; display: grid; place-items: center;
  border-radius: var(--radius-full); border: 1px solid var(--line-control); background: var(--bg);
  font-size: 12px; color: var(--signal);
}
.step h3 { margin: 28px 0 10px; font-size: 20px; font-weight: 500; letter-spacing: -0.01em; }
.step p { margin: 0; font-size: 15px; color: var(--ink-muted); }
.step-out { display: inline-block; margin-top: 18px; font-size: 12px; color: var(--ink-subtle); }

/* ============ Principles ============ */
.principles { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 72px; align-items: start; }
.principles-head { position: sticky; top: calc(var(--nav-h) + 40px); }
.principles-list { display: flex; flex-direction: column; }
.principle { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: var(--space-4); padding: 32px 0; border-top: 1px solid var(--line); }
.principle:last-child { border-bottom: 1px solid var(--line); }
.p-ring { position: relative; width: 22px; height: 22px; margin-top: 4px; border-radius: var(--radius-full); border: 1.5px solid var(--signal); }
.p-ring::after { content: ""; position: absolute; inset: 6px; border-radius: inherit; background: var(--signal); }
.principle h3 { margin: 0 0 8px; font-size: 22px; line-height: 1.3; font-weight: 500; letter-spacing: -0.015em; }
.principle p { margin: 0; color: var(--ink-muted); max-width: 56ch; }

/* ============ CTA ============ */
.cta {
  position: relative; overflow: hidden; isolation: isolate;
  padding: 112px 48px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--line);
  text-align: center;
  background:
    radial-gradient(640px 320px at 50% -10%, #4fe3c124, transparent 70%),
    radial-gradient(520px 300px at 100% 110%, #8297ff1f, transparent 70%),
    var(--panel);
}
.cta-grid {
  position: absolute; inset: 0; z-index: -1;
  background-image: radial-gradient(circle, var(--line-control) 1px, transparent 1.5px);
  background-size: 24px 24px; opacity: .35;
  -webkit-mask-image: radial-gradient(ellipse 60% 70% at 50% 50%, #000, transparent 80%);
  mask-image: radial-gradient(ellipse 60% 70% at 50% 50%, #000, transparent 80%);
}
.cta-mark { width: 48px; height: 48px; margin: 0 auto 28px; }
.cta h2 { margin: 0 auto 20px; max-width: 760px; font-size: clamp(36px, 5vw, 64px); line-height: 1.04; font-weight: 500; letter-spacing: -0.04em; }
.cta p { margin: 0 auto; max-width: 560px; font-size: 18px; color: var(--ink-muted); }
.cta-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-3); margin-top: 40px; }
.copy-email { gap: 12px; }
.copy-email .mono { font-size: 14.5px; }
.copy-hint { padding: 3px 8px; border-radius: var(--radius-full); background: var(--panel-2); color: var(--ink-subtle); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; transition: color .2s, background-color .2s; }
.copy-email.copied .copy-hint { background: var(--signal-soft); color: var(--signal); }

/* ============ Footer ============ */
.footer { position: relative; overflow: hidden; padding-top: 72px; border-top: 1px solid var(--line); }
.footer-inner { display: flex; justify-content: space-between; align-items: flex-start; gap: 40px; flex-wrap: wrap; }
.footer-brand p { margin: 14px 0 0; max-width: 340px; font-size: 14px; color: var(--ink-subtle); }
.footer-links { display: flex; flex-wrap: wrap; gap: 4px 28px; }
.footer-links a { font-size: 14px; color: var(--ink-muted); text-decoration: none; transition: color .2s; }
.footer-links a:hover { color: var(--ink); }
.footer-base { position: relative; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 56px; padding-top: 24px; padding-bottom: 24px; font-size: 12px; color: var(--ink-subtle); }
.footer-base::before { content: ""; position: absolute; top: 0; left: max(var(--gutter), env(safe-area-inset-left, 0px)); right: max(var(--gutter), env(safe-area-inset-right, 0px)); height: 1px; background: var(--line); }
.footer-base a { color: inherit; text-decoration: none; }
.footer-base a:hover { color: var(--ink); }
.footer-base .status { display: inline-flex; align-items: center; gap: 8px; }
.wordmark {
  font-size: clamp(96px, 21vw, 300px); line-height: .78; font-weight: 600; letter-spacing: -0.06em;
  text-align: center; margin-bottom: -0.08em; user-select: none; pointer-events: none;
  background: linear-gradient(180deg, #edeff414 0%, #edeff405 70%, transparent 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ============ Reveal ============ */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: calc(var(--d, 0) * 90ms); }
.js .reveal.in-view { opacity: 1; transform: none; }

/* ============ Responsive ============ */
@media (max-width: 1080px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(3) { padding-left: 0; border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
  .bento { grid-template-columns: minmax(0, 1fr); }
  .span-2, .span-4 { grid-column: auto; }
  .bento > .card { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); align-items: center; }
  .bento > .card .card-visual { padding: var(--space-8) var(--space-8) var(--space-8) 0; margin: 0; }
  .loop { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .loop .console { max-width: 680px; }
  .case, .case.reverse { grid-template-columns: minmax(0, 1fr); gap: 48px; }
  .case.reverse .case-visual { order: 0; }
  .case-visual { position: relative; top: 0; max-width: 640px; }
  .principles { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .principles-head { position: static; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 48px; }
  .steps-line { display: none; }
}

@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-cta .btn { display: none; }
  .nav-toggle { display: block; }
  .mobile-menu {
    display: flex; flex-direction: column; gap: 4px;
    max-height: 0; overflow: hidden; visibility: hidden;
    padding: 0 max(var(--gutter), env(safe-area-inset-right, 0px)) 0 max(var(--gutter), env(safe-area-inset-left, 0px));
    transition: max-height .35s var(--ease), padding-bottom .35s var(--ease), visibility 0s .35s;
  }
  .menu-open .mobile-menu { max-height: 420px; padding-bottom: 20px; visibility: visible; transition: max-height .35s var(--ease), padding-bottom .35s var(--ease), visibility 0s; }
  .mobile-menu a:not(.btn) { padding: 12px 4px; font-size: 17px; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line); }
  .mobile-menu .btn { margin-top: 16px; height: 48px; }
}

@media (max-width: 640px) {
  :root { --gutter: var(--space-4); --space-36: 96px; }
  .hero { padding-bottom: 48px; }
  .globe { --globe-d: min(calc(100svh - 330px), 112vw); }
  .globe-wrap { padding-top: calc(var(--nav-h) + env(safe-area-inset-top, 0px) + 8px); }
  .lead { font-size: 16.5px; }
  .hero-actions { width: 100%; }
  .hero-actions .btn { flex: 1 1 auto; }
  .hud { display: none; }
  .console-log { min-height: 0; padding: 14px 12px; font-size: 11.5px; }
  .console-log li { grid-template-columns: 66px minmax(0, 1fr); gap: 4px 8px; }
  .console-log .t { grid-row: span 2; }
  .console-log .m { grid-column: 2; }
  .console-foot { flex-direction: column; gap: 4px; }
  .stats { grid-template-columns: minmax(0, 1fr); }
  .stat, .stat + .stat { padding: 20px 0; border-left: 0; }
  .stat + .stat { border-top: 1px solid var(--line); }
  .stat-v { font-size: 22px; }
  .section-sub { font-size: 16.5px; }
  .bento > .card { display: flex; }
  .bento > .card .card-visual { padding: 0 var(--space-6) var(--space-6); }
  .card-body { padding: var(--space-6); }
  .card-visual { padding: 0 var(--space-6) var(--space-6); }
  .stage { padding: 16px 12px 16px 8px; gap: 12px; }
  .stages::before { left: 22px; }
  .audit-row { grid-template-columns: minmax(0, 1fr) 76px; }
  .audit-row .meter { display: none; }
  .audit-head span:nth-child(2) { display: none; }
  .built { grid-template-columns: minmax(0, 1fr); }
  .outcomes { grid-template-columns: minmax(0, 1fr); }
  .outcome { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
  .outcome-k { margin: 0; text-align: right; }
  .viz { padding: 16px; }
  .viz-head { flex-wrap: wrap; }
  .bubble { max-width: 100%; }
  .kv { grid-template-columns: minmax(0, 1fr); }
  .draft-foot .muted { display: none; }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .principle h3 { font-size: 19px; }
  .cta { padding: 72px 20px; }
  .cta-actions .btn { width: 100%; }
  .footer-inner { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; transition-delay: 0s !important; }
  .ticker-track { animation: none; }
}
