@font-face {
  font-family: "Geist Sans";
  src: url("/_next/static/media/caa3a2e1cccd8315-s.p.0wgildi0cnwt9.woff2") format("woff2");
  font-display: swap;
  font-weight: 100 900;
}

@font-face {
  font-family: "Geist Mono";
  src: url("/_next/static/media/797e433ab948586e-s.p.0r6juujl39pe6.woff2") format("woff2");
  font-display: swap;
  font-weight: 100 900;
}

:root {
  --bg: #050705;
  --surface: #0c0f0d;
  --surface-2: #111511;
  --text: #f5f2e9;
  --muted: #a6afa6;
  --green: #9dff45;
  --green-bright: #bcff83;
  --cream: #f3efe4;
  --cream-2: #e9e3d6;
  --ink: #111511;
  --line: rgba(255, 255, 255, 0.12);
  --container: 1240px;
  --cjk: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

body {
  min-width: 0;
  color: var(--text);
  background: var(--bg);
  font-family: "Geist Sans", var(--cjk);
  font-size: 16px;
  line-height: 1.7;
  overflow-x: clip;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body::before {
  background: linear-gradient(180deg, #060806, #050705 58%, #090c09);
}

.page-grid,
.cursor-glow {
  display: none;
}

.nav-shell {
  width: min(var(--container), calc(100% - 64px));
  height: 64px;
}

.site-header.is-scrolled {
  background: rgba(5, 7, 5, 0.8);
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
}

.brand-mark img {
  border-radius: 6px;
}

.brand-name {
  font-size: 18px;
}

.desktop-nav {
  gap: 22px;
}

.desktop-nav a,
.footer-links a {
  font-size: 14px;
  font-weight: 500;
}

.button {
  min-height: 54px;
  padding: 0 24px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 650;
  transition: transform 220ms var(--ease), background 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.button-small {
  min-height: 42px;
  padding-inline: 17px;
  font-size: 14px;
}

.hero {
  position: relative;
  width: 100%;
  min-height: 92svh;
  margin: 0;
  padding: 142px 0 92px;
  display: flex;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(ellipse 66% 72% at 79% 44%, rgba(157, 255, 69, 0.12), transparent 66%),
    linear-gradient(96deg, #050705 32%, #060907 54%, #020302 100%);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(5, 7, 5, 0.99) 0%, rgba(5, 7, 5, 0.92) 31%, rgba(5, 7, 5, 0.36) 52%, rgba(5, 7, 5, 0.08) 72%),
    linear-gradient(180deg, rgba(5, 7, 5, 0.5) 0%, transparent 20%, transparent 76%, #050705 100%);
}

.hero-inner {
  position: relative;
  z-index: 4;
  width: min(var(--container), calc(100% - 64px));
  margin: 0 auto;
  pointer-events: none;
}

.hero-copy {
  width: min(560px, 49vw);
  padding: 0;
  pointer-events: auto;
}

.hero-watermark {
  position: absolute;
  top: 70px;
  left: 50%;
  z-index: 0;
  color: transparent;
  font: 700 clamp(130px, 19vw, 300px) / 1 "Geist Sans", sans-serif;
  letter-spacing: -0.07em;
  white-space: nowrap;
  -webkit-text-stroke: 1px rgba(157, 255, 69, 0.11);
  transform: translateX(-44%);
  mask-image: linear-gradient(90deg, #000 42%, transparent 88%);
  opacity: 0.55;
}

.hero-grid {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(245, 242, 233, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(245, 242, 233, 0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(70% 62% at 54% 42%, #000 20%, transparent 76%);
  opacity: 0.46;
}

.hero-edge {
  position: absolute;
  z-index: 3;
  inset: 0 0 0 auto;
  width: 14vw;
  pointer-events: none;
  background:
    linear-gradient(transparent 8%, rgba(157, 255, 69, 0.52) 32% 68%, transparent 92%) right 18px top / 1px 100% no-repeat,
    radial-gradient(70% 32% at 100% 86%, rgba(157, 255, 69, 0.1), transparent 70%);
}

.hero-wordmark {
  margin: 0 0 13px -3px;
  color: var(--text);
  font: 760 clamp(30px, 3.1vw, 46px) / 1 "Geist Sans", sans-serif;
  letter-spacing: -0.055em;
  text-shadow: 0 0 42px rgba(157, 255, 69, 0.08);
}

.hero-manifest {
  margin: 0 0 19px;
  color: rgba(245, 242, 233, 0.48);
  font: 600 11px / 1.4 "Geist Mono", monospace;
  letter-spacing: 0.19em;
}

.eyebrow {
  margin-bottom: 23px;
  padding: 0;
  color: var(--green);
  background: transparent;
  border: 0;
  border-radius: 0;
  font-family: "Geist Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.12em;
}

.hero h1 {
  max-width: 560px;
  margin: 0;
  font-family: var(--cjk);
  font-size: clamp(38px, 3.6vw, 54px);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: 0.01em;
}

.hero h1 span {
  color: var(--green);
}

.hero-lead {
  max-width: 490px;
  margin-top: 25px;
  color: #b5bdb5;
  font-size: 17px;
  line-height: 1.8;
}

.hero-actions {
  gap: 14px;
  margin-top: 34px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  margin-top: 24px;
  color: #7f897f;
  font: 550 11px / 1.4 "Geist Mono", monospace;
  letter-spacing: 0.07em;
}

.hero-meta span {
  position: relative;
  padding-left: 12px;
}

.hero-meta span::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 4px;
  height: 4px;
  background: var(--green);
  transform: translateY(-50%) rotate(45deg);
}

.hero-visual {
  position: absolute;
  z-index: 1;
  inset: 64px 0 0;
  transform: translate3d(0, var(--hero-parallax, 0), 0);
  pointer-events: none;
}

.character-stage {
  position: absolute;
  top: 50%;
  right: clamp(84px, 7vw, 120px);
  width: clamp(680px, 51vw, 820px);
  aspect-ratio: 1677 / 938;
  height: auto;
  padding: 0;
  overflow: hidden;
  color: inherit;
  background: transparent;
  border: 0;
  cursor: pointer;
  pointer-events: auto;
  touch-action: manipulation;
  transform: translateY(-48%);
  animation: none;
  mask-image: linear-gradient(180deg, transparent 0%, #000 8%, #000 88%, transparent 100%);
}

.character-stage:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: -10px;
}

.character-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  opacity: 1;
  pointer-events: none;
  filter: saturate(0.96) contrast(1.03);
  transform: translate3d(0, 0, 0) scale(1);
  transition: filter 320ms ease, opacity 180ms ease, transform 420ms var(--ease);
}

.character-ghost {
  z-index: 2;
  opacity: 0;
  mix-blend-mode: screen;
  filter: saturate(2) contrast(1.5) hue-rotate(18deg);
}

.character-image.is-hidden {
  opacity: 0;
}

.character-image-ready,
.character-image-execution,
.character-image-completed {
  opacity: 0;
}

.character-image-ready.is-visible,
.character-image-execution.is-visible,
.character-image-completed.is-visible {
  opacity: 1;
}

.character-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 5;
  opacity: 0;
  pointer-events: none;
  mix-blend-mode: screen;
  background:
    repeating-linear-gradient(0deg, rgba(157, 255, 69, 0.24) 0 2px, transparent 2px 7px),
    repeating-linear-gradient(90deg, rgba(94, 230, 190, 0.12) 0 1px, transparent 1px 9px);
}

.character-stage.is-glitching .character-image {
  animation: characterSwapGlitch 700ms step-end both;
}

.character-stage.is-glitching .character-ghost {
  opacity: 0.42;
  animation: characterGhostGlitch 700ms steps(8, end) both;
}

.character-stage.is-glitching::after {
  animation: characterNoise 700ms steps(9, end) both;
}

.character-scanline {
  position: absolute;
  z-index: 6;
  left: 18%;
  right: 3%;
  top: 12%;
  height: 2px;
  opacity: 0;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(157, 255, 69, 0.95), rgba(232, 255, 216, 0.6), transparent);
  box-shadow: 0 0 14px rgba(157, 255, 69, 0.55);
}

.character-stage:hover .character-scanline,
.character-stage:focus-visible .character-scanline {
  animation: scanSweep 900ms var(--ease) 1;
}

.character-stage.is-glitching .character-scanline {
  animation: scanClick 700ms linear both;
}

.character-state,
.character-hint {
  position: absolute;
  z-index: 7;
  right: 32px;
  display: inline-flex;
  align-items: center;
  color: rgba(245, 242, 233, 0.72);
  font: 600 10px / 1.3 "Geist Mono", monospace;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.character-state {
  top: 32px;
  gap: 8px;
}

.character-state-dot {
  width: 6px;
  height: 6px;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 12px var(--green);
}

.character-hint {
  bottom: 28px;
  min-height: 44px;
  padding: 0 13px;
  color: rgba(245, 242, 233, 0.62);
  background: rgba(5, 7, 5, 0.56);
  border: 1px solid rgba(157, 255, 69, 0.2);
  backdrop-filter: blur(10px);
  transition: color 180ms ease, border-color 180ms ease, background 180ms ease;
}

.character-stage:hover .character-hint,
.character-stage:focus-visible .character-hint {
  color: var(--green);
  background: rgba(5, 7, 5, 0.76);
  border-color: rgba(157, 255, 69, 0.42);
}

.character-runtime {
  position: absolute;
  z-index: 6;
  right: 8%;
  bottom: 18%;
  display: grid;
  grid-template-columns: repeat(3, 5px) auto;
  align-items: center;
  gap: 6px;
  padding: 12px 14px;
  color: rgba(225, 255, 205, 0.78);
  background: rgba(4, 9, 5, 0.62);
  border: 1px solid rgba(157, 255, 69, 0.24);
  opacity: 0;
  transform: translateY(8px);
  backdrop-filter: blur(12px);
  transition: opacity 260ms ease, transform 260ms var(--ease);
}

.character-runtime i {
  width: 5px;
  height: 5px;
  background: var(--green);
  border-radius: 50%;
  opacity: 0.28;
}

.character-runtime b {
  grid-column: 1 / -1;
  font: 500 9px / 1.5 "Geist Mono", monospace;
  letter-spacing: 0.06em;
}

.character-stage[data-state="execution"] .character-image,
.character-stage[data-state="completed"] .character-image {
  filter: saturate(1.08) contrast(1.06) brightness(1.03);
}

.character-stage[data-state="ready"] .character-image {
  filter: saturate(1.02) contrast(1.04) brightness(1.04);
}

.character-stage[data-state="ready"] .character-image-ready {
  transform: translate3d(-6px, -3px, 0) scale(1.012);
}

.character-stage[data-state="execution"] .character-image-execution {
  transform: translate3d(-10px, -4px, 0) scale(1.018);
}

.character-stage[data-state="completed"] .character-image-completed {
  transform: translate3d(2px, 3px, 0) scale(0.996);
}

.character-stage[data-state="execution"] .character-runtime,
.character-stage[data-state="completed"] .character-runtime {
  opacity: 1;
  transform: translateY(0);
}

.character-stage[data-state="execution"] .character-runtime i {
  animation: runtimePulse 1.2s ease-in-out infinite;
}

.character-stage[data-state="execution"] .character-runtime i:nth-child(2) { animation-delay: 160ms; }
.character-stage[data-state="execution"] .character-runtime i:nth-child(3) { animation-delay: 320ms; }

.character-stage[data-state="completed"] .character-runtime {
  color: #071005;
  background: rgba(157, 255, 69, 0.9);
}

.character-stage[data-state="resting"] .character-image {
  filter: saturate(0.72) brightness(0.78);
}

.character-stage[data-state="resting"] {
  animation-duration: 12s;
}

.character-stage[data-state="playful"] .character-image {
  filter: saturate(1.22) contrast(1.08);
}

.character-stage[data-state="playful"] .character-state-dot {
  animation: playfulDot 280ms steps(2, end) infinite;
}

.character-corner {
  position: absolute;
  z-index: 7;
  right: 26px;
  width: 18px;
  height: 18px;
  opacity: 0.4;
  border-right: 1px solid var(--green);
}

.corner-top {
  top: 64px;
  border-top: 1px solid var(--green);
}

.corner-bottom {
  bottom: 82px;
  border-bottom: 1px solid var(--green);
}

@keyframes characterFloat {
  0%, 100% { transform: translateY(-48%); }
  50% { transform: translateY(calc(-48% - 6px)); }
}

@keyframes runtimePulse {
  50% { opacity: 1; box-shadow: 0 0 10px var(--green); }
}

@keyframes playfulDot {
  50% { opacity: 0.25; }
}

@keyframes characterGhostGlitch {
  0%, 100% { clip-path: inset(0); transform: translateX(0); opacity: 0; }
  15% { clip-path: inset(12% 0 61%); transform: translateX(10px); opacity: 0.5; }
  35% { clip-path: inset(58% 0 12%); transform: translateX(-8px); opacity: 0.3; }
  55% { clip-path: inset(32% 0 39%); transform: translateX(12px); opacity: 0.55; }
  78% { clip-path: inset(70% 0 5%); transform: translateX(-5px); opacity: 0.25; }
}

@keyframes scanSweep {
  0% { top: 12%; opacity: 0; }
  10% { opacity: 0.9; }
  70% { top: 82%; opacity: 0.72; }
  100% { top: 86%; opacity: 0; }
}

@keyframes scanClick {
  0% { top: 12%; opacity: 0; }
  16% { opacity: 1; }
  72% { top: 82%; opacity: 0.9; }
  100% { top: 86%; opacity: 0; }
}

@keyframes characterSwapGlitch {
  0%, 100% { clip-path: none; filter: none; transform: none; }
  8% { clip-path: inset(5% 0 64%); filter: saturate(2.1) brightness(1.12); transform: translate(-10px, 2px); }
  17% { clip-path: inset(57% 0 9%); filter: contrast(1.7); transform: translate(8px, -2px); }
  26% { clip-path: inset(29% 0 34%); filter: saturate(0.2) brightness(1.8); transform: translate(-5px, 5px); }
  34% { clip-path: none; filter: contrast(1.4) brightness(1.25); transform: translate(11px, -4px); }
  43% { clip-path: inset(13% 0 46%); filter: saturate(2.8); transform: translate(-13px, 0); }
  51% { clip-path: inset(67% 0 4%); filter: brightness(1.6) contrast(1.8); transform: translate(6px, 3px); }
  60% { clip-path: none; filter: contrast(2.1) brightness(0.72); transform: translate(-6px, -6px); }
  70% { clip-path: inset(22% 0 51%); filter: saturate(1.7); transform: translate(8px, 2px); }
  82% { clip-path: inset(48% 0 17%); filter: brightness(1.3); transform: translate(-3px, 1px); }
  90% { clip-path: none; filter: saturate(1.1); transform: translate(2px, -1px); }
}

@keyframes characterNoise {
  0%, 100% { opacity: 0; transform: none; }
  12% { opacity: 0.9; transform: translateY(-6px); }
  30% { opacity: 0.3; transform: translateY(8px); }
  46% { opacity: 1; transform: translateY(-3px) scaleY(1.04); }
  64% { opacity: 0.45; transform: translateY(5px); }
  82% { opacity: 0.8; transform: none; }
}

.signal-strip {
  background: var(--green);
  border: 0;
}

.signal-track {
  min-height: 54px;
  color: rgba(7, 12, 5, 0.72);
}

.signal-track i {
  background: #111511;
}

.section {
  padding-block: 128px;
}

.section h2,
.final-cta h2 {
  font-family: var(--cjk);
  font-size: clamp(38px, 4.2vw, 62px);
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: 0.01em;
}

.section-heading {
  gap: 96px;
  margin-bottom: 64px;
}

.section-heading > p,
.workflow-copy > p:not(.section-kicker),
.source-copy p:not(.section-kicker) {
  font-size: 16px;
  line-height: 1.75;
}

.section-kicker,
.feature-index,
.mode-label,
.workflow-list > li > span,
.workflow-list b {
  font-family: "Geist Mono", monospace;
}

.section-light {
  color: var(--ink);
  background: var(--cream);
  box-shadow: 0 0 0 100vmax var(--cream);
  clip-path: inset(0 -100vmax);
}

.section-light .section-kicker {
  color: #4b8e20;
}

.section-light .section-heading > p {
  color: #62695f;
}

.capability-grid {
  gap: 1px;
  overflow: hidden;
  background: rgba(17, 21, 17, 0.16);
  border: 1px solid rgba(17, 21, 17, 0.16);
  border-radius: 0;
}

.feature-card {
  min-height: 300px;
  padding: 32px;
  background: var(--cream);
  border: 0;
  border-radius: 0;
}

.feature-card:hover {
  background: #ebe6da;
  border-color: transparent;
  transform: none;
}

.feature-card::after {
  display: none;
}

.feature-icon {
  color: #397715;
  background: rgba(78, 151, 34, 0.08);
  border-color: rgba(57, 119, 21, 0.24);
  border-radius: 50%;
}

.feature-index,
.mode-label {
  color: #777d73;
}

.feature-card h3 {
  font-family: var(--cjk);
  font-size: 24px;
  font-weight: 760;
  letter-spacing: 0;
}

.feature-card p {
  color: #61685f;
  font-size: 15px;
  line-height: 1.7;
}

.mini-flow span {
  border-color: rgba(17, 21, 17, 0.18);
}

.mini-flow i {
  background: linear-gradient(90deg, rgba(17, 21, 17, 0.18), #599d2c);
}

.workflow {
  background: #0a0d0b;
}

.workflow-shell {
  gap: 120px;
}

.workflow-list li {
  min-height: 170px;
}

.workflow-list h3 {
  font-family: var(--cjk);
  font-size: 25px;
  font-weight: 750;
  letter-spacing: 0;
}

.workflow-list p {
  font-size: 15px;
  line-height: 1.7;
}

.mode-grid {
  gap: 16px;
}

.mode-card {
  color: var(--ink);
  background: transparent;
  border-color: rgba(17, 21, 17, 0.2);
  border-radius: 0;
}

.mode-card:hover {
  border-color: #397715;
}

.mode-card-primary {
  color: #0b1207;
  background: var(--green);
  border-color: var(--green);
}

.mode-card h3 {
  font-family: var(--cjk);
  font-weight: 780;
  letter-spacing: 0;
}

.mode-card p {
  color: #62695f;
  font-size: 15px;
  line-height: 1.7;
}

.open-source {
  padding-top: 128px;
}

.source-panel {
  border-radius: 0;
}

.source-brandline {
  display: flex;
  align-items: center;
  gap: 14px;
  align-self: start;
  color: var(--green);
  transform: rotate(-4deg);
}

.source-brandline span {
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  border: 1px solid rgba(157, 255, 69, 0.44);
  border-radius: 50%;
  font: 800 18px / 1 "Geist Mono", monospace;
  box-shadow: 0 0 42px rgba(157, 255, 69, 0.1);
}

.source-brandline strong {
  writing-mode: vertical-rl;
  font: 650 9px / 1 "Geist Mono", monospace;
  letter-spacing: 0.16em;
}

.source-copy p:not(.section-kicker) {
  color: #a6afa6;
}

.final-cta {
  min-height: 680px;
  color: #0b1207;
  background: var(--green);
  border: 0;
}

.final-cta p:not(.section-kicker) {
  color: rgba(11, 18, 7, 0.68);
  font-size: 17px;
}

.final-cta .section-kicker {
  color: rgba(11, 18, 7, 0.62);
}

.final-cta .button-primary {
  color: var(--cream);
  background: #0b1207;
  box-shadow: none;
}

.final-cta .button-primary:hover {
  background: #182415;
}

.final-orb {
  border-color: rgba(11, 18, 7, 0.18);
  box-shadow: inset 0 0 120px rgba(11, 18, 7, 0.06);
}

.final-orb::before,
.final-orb::after {
  border-color: rgba(11, 18, 7, 0.14);
}

/* MonkeyCode design system: hard edges, paper sections, and explicit state. */
.section,
.proof-strip,
.final-cta {
  position: relative;
  isolation: isolate;
}

.section[data-watermark] {
  overflow: hidden;
}

.section[data-watermark]::before {
  content: attr(data-watermark);
  position: absolute;
  top: 34px;
  left: 50%;
  z-index: 0;
  color: transparent;
  font: 780 clamp(88px, 14vw, 210px) / 0.82 "Geist Sans", sans-serif;
  letter-spacing: -0.075em;
  white-space: nowrap;
  -webkit-text-stroke: 1px rgba(245, 242, 233, 0.065);
  transform: translateX(-50%);
  pointer-events: none;
}

.section[data-watermark] > * {
  position: relative;
  z-index: 1;
}

.section-light[data-watermark]::before {
  -webkit-text-stroke-color: rgba(17, 21, 17, 0.08);
}

.section-kicker {
  color: var(--color-action);
  font: 650 11px / 1.4 "Geist Mono", monospace;
  letter-spacing: 0.11em;
}

.section-light .section-kicker {
  color: var(--mc-green-700);
}

.section-light .section-heading > p,
.feature-card p,
.mode-card p {
  color: var(--color-text-muted-paper);
}

.agent-state-rail {
  position: absolute;
  left: 50%;
  bottom: 26px;
  z-index: 8;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  width: min(var(--container), calc(100% - 64px));
  overflow: hidden;
  background: rgba(5, 7, 5, 0.88);
  border: 1px solid var(--color-border-dark);
  backdrop-filter: blur(16px);
  transform: translateX(-50%);
}

.agent-state-rail button {
  position: relative;
  min-height: 66px;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 14px;
  padding: 12px 18px;
  color: var(--color-text-muted-dark);
  text-align: left;
  background: transparent;
  border: 0;
  border-right: 1px solid var(--color-border-dark);
  cursor: pointer;
  transition: color 180ms ease, background 180ms ease;
}

.agent-state-rail button:last-child {
  border-right: 0;
}

.agent-state-rail button::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 3px;
  background: var(--color-action);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 240ms var(--ease);
}

.agent-state-rail button:hover,
.agent-state-rail button:focus-visible,
.agent-state-rail button.is-active {
  color: var(--color-text-on-dark);
  background: rgba(157, 255, 69, 0.055);
}

.agent-state-rail button:focus-visible {
  outline: 2px solid var(--color-action);
  outline-offset: -3px;
}

.agent-state-rail button.is-active::after {
  transform: scaleX(1);
}

.agent-state-rail button:hover::after,
.agent-state-rail button:focus-visible::after {
  transform: scaleX(0.36);
}

.agent-state-rail button.is-active:hover::after,
.agent-state-rail button.is-active:focus-visible::after {
  transform: scaleX(1);
}

.agent-state-rail span {
  grid-row: 1 / 3;
  align-self: center;
  color: var(--color-action);
  font: 650 10px / 1 "Geist Mono", monospace;
}

.agent-state-rail strong {
  font: 650 12px / 1.2 "Geist Mono", monospace;
  letter-spacing: 0.08em;
}

.agent-state-rail small {
  font: 500 11px / 1.3 var(--cjk);
}

.proof-strip {
  display: grid;
  grid-template-columns: minmax(240px, 0.65fr) minmax(0, 1.35fr);
  gap: clamp(48px, 8vw, 120px);
  padding: 94px max(32px, calc((100vw - var(--container)) / 2));
  color: var(--color-text-on-paper);
  background: var(--color-surface-paper);
  border-block: 1px solid var(--color-border-paper);
}

.proof-intro {
  align-self: center;
}

.proof-intro h2 {
  max-width: 420px;
  margin: 0;
  font: 900 clamp(34px, 4vw, 56px) / 1.1 var(--cjk);
}

.proof-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--color-border-paper);
  border: 1px solid var(--color-border-paper);
}

.proof-grid article {
  min-height: 178px;
  padding: 26px;
  background: var(--color-surface-paper);
  box-shadow: inset 0 0 0 0 var(--color-action);
  transition: background 180ms ease, box-shadow 180ms ease;
}

.proof-grid article:hover {
  background: var(--color-canvas-paper);
  box-shadow: inset 4px 0 0 var(--color-action);
}

.proof-grid span {
  color: var(--mc-green-700);
  font: 650 10px / 1.4 "Geist Mono", monospace;
  letter-spacing: 0.08em;
}

.proof-grid h3 {
  margin: 20px 0 8px;
  font: 780 21px / 1.25 var(--cjk);
}

.proof-grid p {
  margin: 0;
  color: var(--color-text-muted-paper);
  font-size: 14px;
  line-height: 1.65;
}

.capability-grid,
.proof-grid {
  box-shadow: 6px 6px 0 rgba(17, 21, 17, 0.08);
}

.feature-card {
  box-shadow: inset 0 0 0 0 var(--color-action);
  transition: background 180ms ease, box-shadow 180ms ease;
}

.feature-card:hover {
  box-shadow: inset 5px 0 0 var(--color-action);
}

.feature-index,
.mode-label {
  color: var(--color-text-muted-paper);
}

.workflow-agent {
  position: relative;
  aspect-ratio: 16 / 9;
  margin: 44px 0 0;
  overflow: hidden;
  background: var(--color-surface-raised);
  border: 1px solid var(--color-border-dark);
}

.workflow-agent::after,
.final-agent::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, transparent 0 5px, rgba(157, 255, 69, 0.035) 5px 6px);
}

.workflow-agent img,
.final-agent img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 74% center;
}

.workflow-agent figcaption,
.final-agent figcaption {
  position: absolute;
  z-index: 2;
  inset: auto 0 0;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  color: var(--color-text-on-dark);
  background: rgba(5, 7, 5, 0.88);
  border-top: 1px solid var(--color-border-dark);
  font: 600 9px / 1.4 "Geist Mono", monospace;
  letter-spacing: 0.08em;
}

.workflow-agent figcaption span,
.final-agent figcaption span {
  color: var(--color-action);
}

.mode-card {
  box-shadow: 0 0 0 transparent;
}

.mode-card:hover {
  box-shadow: 5px 5px 0 rgba(17, 21, 17, 0.12);
  transform: translate(-2px, -2px);
}

.mode-card-primary {
  box-shadow: 5px 5px 0 var(--mc-green-700);
}

.source-panel {
  background: var(--color-surface-dark);
  border-color: var(--color-border-dark);
  box-shadow: 8px 8px 0 rgba(157, 255, 69, 0.08);
}

.final-cta {
  min-height: 0;
  display: block;
  padding: 120px 24px;
  color: var(--color-text-on-paper);
  text-align: left;
  background: var(--color-canvas-paper);
  border-block: 1px solid var(--color-border-paper);
}

.final-cta-inner {
  position: relative;
  z-index: 2;
  width: min(var(--container), 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(320px, 0.72fr) minmax(0, 1.28fr);
  align-items: center;
  gap: clamp(48px, 8vw, 110px);
}

.final-cta h2 {
  max-width: 600px;
  margin: 0;
}

.final-cta p:not(.section-kicker) {
  max-width: 490px;
  color: var(--color-text-muted-paper);
}

.final-cta .section-kicker {
  color: var(--ink);
}

.final-cta .button-primary {
  color: var(--cream);
  background: var(--ink);
  box-shadow: none;
}

.final-cta .button-primary:hover {
  background: #20352c;
  box-shadow: 0 12px 32px rgba(18, 32, 28, 0.2);
}

.final-agent {
  position: relative;
  aspect-ratio: 16 / 9;
  margin: 0;
  overflow: hidden;
  background: var(--color-surface-dark);
  border: 1px solid var(--color-border-paper);
  box-shadow: 8px 8px 0 rgba(17, 21, 17, 0.12);
}

.final-orb {
  right: -150px;
  opacity: 0.16;
  border-color: var(--mc-green-700);
}

.site-footer {
  border-top-color: var(--color-border-dark);
}

@media (max-width: 1080px) {
  .hero {
    min-height: 980px;
    padding-top: 126px;
    align-items: flex-start;
  }

  .hero-inner {
    width: min(var(--container), calc(100% - 48px));
  }

  .hero-copy {
    width: min(620px, 72vw);
  }

  .hero-visual {
    inset: 300px 0 0;
  }

  .character-stage {
    right: 0;
    width: min(880px, 96vw);
  }

  .hero::before {
    background:
      linear-gradient(180deg, rgba(5, 7, 5, 0.98) 0%, rgba(5, 7, 5, 0.8) 32%, rgba(5, 7, 5, 0.06) 53%, rgba(5, 7, 5, 0.3) 78%, #050705 100%);
  }

  .hero-watermark {
    top: 90px;
    font-size: clamp(120px, 25vw, 240px);
  }

  .workflow-shell {
    gap: 64px;
  }
}

@media (max-width: 760px) {
  .nav-shell {
    width: calc(100% - 32px);
  }

  .hero {
    min-height: 870px;
    padding: 104px 0 48px;
  }

  .hero-inner {
    width: calc(100% - 40px);
  }

  .hero-copy {
    width: 100%;
  }

  .hero-wordmark {
    margin-bottom: 17px;
    font-size: clamp(28px, 8vw, 38px);
  }

  .hero h1 {
    max-width: 360px;
    font-size: clamp(34px, 10vw, 46px);
    line-height: 1.12;
  }

  .hero h1 span {
    display: block;
    margin-top: 4px;
  }

  .hero-lead {
    width: 100%;
    max-width: 410px;
    font-size: 16px;
    line-height: 1.72;
  }

  .hero-actions {
    max-width: 410px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-actions .button {
    width: auto;
    min-width: 0;
    padding-inline: 14px;
  }

  .hero-meta {
    gap: 10px 16px;
    font-size: 9px;
  }

  .hero-visual {
    inset: 350px 0 -10px;
  }

  .character-stage {
    right: -8%;
    width: 108vw;
    max-width: 610px;
  }

  .character-state {
    top: 22px;
    right: 18px;
  }

  .character-hint {
    right: 18px;
    bottom: 34px;
  }

  .character-runtime {
    right: 13%;
    bottom: 14%;
    transform: scale(0.86) translateY(8px);
    transform-origin: right bottom;
  }

  .character-stage[data-state="execution"] .character-runtime,
  .character-stage[data-state="completed"] .character-runtime {
    transform: scale(0.86) translateY(0);
  }

  .character-corner {
    right: 14px;
  }

  .hero-watermark,
  .hero-edge {
    display: none;
  }

  .section {
    padding-block: 88px;
  }

  .section-heading {
    margin-bottom: 42px;
  }

  .section h2,
  .final-cta h2 {
    font-size: clamp(34px, 10vw, 48px);
  }

  .capability-grid {
    gap: 1px;
  }

  .feature-card {
    min-height: 270px;
    padding: 28px 24px;
  }

  .workflow {
    padding-inline: 20px;
  }

  .workflow-list li {
    min-height: 145px;
  }

  .open-source {
    padding-top: 88px;
  }

  .source-panel {
    padding: 38px 24px;
  }
}

@media (max-width: 440px) {
  .hero {
    min-height: 820px;
  }

  .hero-actions {
    grid-template-columns: 1fr;
  }

  .hero-meta span:last-child {
    display: none;
  }

  .hero-visual {
    top: 390px;
  }

  .character-state {
    top: 16px;
  }

  .character-hint {
    bottom: 22px;
  }
}

/* Hero spatial composition: shared light, unframed character, and foreground telemetry. */
.hero {
  min-height: max(680px, 92svh);
  padding: 126px 0 116px;
  align-items: center;
  background:
    radial-gradient(ellipse 48% 62% at 80% 38%, rgba(184, 238, 98, 0.14), transparent 72%),
    linear-gradient(101deg, #080b0b 0 37%, #0a100e 61%, #050707 100%);
}

.hero::before {
  z-index: 2;
  background:
    linear-gradient(90deg, rgba(8, 11, 11, 0.99) 0%, rgba(8, 11, 11, 0.92) 27%, rgba(8, 11, 11, 0.52) 43%, rgba(8, 11, 11, 0.06) 67%),
    linear-gradient(180deg, rgba(8, 11, 11, 0.64) 0%, transparent 18%, transparent 72%, #080b0b 100%);
}

.hero::after {
  content: "";
  position: absolute;
  z-index: 7;
  inset: auto 0 0;
  height: 150px;
  pointer-events: none;
  background:
    linear-gradient(180deg, transparent, rgba(8, 11, 11, 0.72) 68%, #080b0b 100%),
    repeating-linear-gradient(90deg, transparent 0 72px, rgba(184, 238, 98, 0.07) 72px 73px);
  mask-image: linear-gradient(180deg, transparent, #000 38%);
}

.hero-inner {
  width: min(var(--container), calc(100% - 64px));
}

.hero-copy {
  width: min(540px, 42vw);
  margin-top: -18px;
}

.hero-watermark {
  top: 12%;
  left: 46%;
  font-size: clamp(118px, 18vw, 286px);
  transform: translateX(-48%);
  mask-image: linear-gradient(90deg, #000 34%, transparent 86%);
  opacity: 0.44;
}

.hero-grid {
  background-size: 64px 64px;
  mask-image: linear-gradient(90deg, transparent, #000 38%, #000 86%, transparent);
  opacity: 0.34;
}

.hero-edge {
  width: 8vw;
  opacity: 0.72;
}

.hero-scene-meta {
  position: absolute;
  z-index: 6;
  top: 116px;
  right: clamp(22px, 2.6vw, 48px);
  display: grid;
  gap: 7px;
  color: rgba(214, 228, 217, 0.44);
  font: 600 9px / 1 "Geist Mono", monospace;
  letter-spacing: 0.08em;
  text-align: right;
  pointer-events: none;
}

.hero-scene-meta span:first-child {
  color: rgba(184, 238, 98, 0.82);
}

.hero-visual {
  z-index: 1;
  inset: 66px 0 0;
  transform: translate3d(0, var(--hero-hold, 0), 0);
}

.hero-visual::before {
  top: 8%;
  right: -3%;
  width: 65vw;
  height: 82%;
  aspect-ratio: auto;
  border: 0;
  border-radius: 0;
  background:
    linear-gradient(112deg, transparent 22%, rgba(184, 238, 98, 0.055) 54%, transparent 72%),
    radial-gradient(ellipse at 70% 42%, rgba(209, 255, 138, 0.14), transparent 48%);
  box-shadow: none;
  transform: translate3d(0, var(--hero-parallax, 0), 0);
  animation: heroEnvironment 9s ease-in-out infinite;
}

.character-stage {
  top: 50%;
  right: -2.5vw;
  width: min(76vw, 122vh, 1180px);
  aspect-ratio: 1677 / 938;
  overflow: hidden;
  transform: translateY(-48%);
  transform-origin: center;
  transform-style: flat;
  animation: none;
  transition: filter 320ms ease;
  -webkit-mask-image: radial-gradient(ellipse 96% 96% at 68% 44%, #000 58%, rgba(0, 0, 0, 0.94) 70%, transparent 100%);
  mask-image: radial-gradient(ellipse 96% 96% at 68% 44%, #000 58%, rgba(0, 0, 0, 0.94) 70%, transparent 100%);
}

.character-stage:hover {
  filter: brightness(1.035) drop-shadow(0 24px 42px rgba(184, 238, 98, 0.08));
}

.character-stage.is-glitching .character-image {
  animation: characterSceneSwap 560ms ease both;
}

.character-stage.is-glitching .character-ghost {
  opacity: 0.14;
  animation: characterSceneGhost 560ms ease both;
}

.character-stage.is-glitching::after {
  animation: characterSceneNoise 560ms ease both;
}

.character-stage:focus-visible {
  outline: 0;
}

.character-stage:focus-visible .character-hint {
  outline: 2px solid var(--green);
  outline-offset: 3px;
}

.character-stage::before {
  inset: 7% 2% 8% 20%;
  background:
    radial-gradient(ellipse at 70% 38%, rgba(232, 255, 216, 0.13), transparent 30%),
    linear-gradient(115deg, transparent 41%, rgba(184, 238, 98, 0.07) 53%, transparent 64%);
  opacity: 0.64;
  animation: characterLight 8s ease-in-out infinite;
}

.character-image,
.character-stage[data-state="ready"] .character-image-ready,
.character-stage[data-state="execution"] .character-image-execution,
.character-stage[data-state="completed"] .character-image-completed {
  object-fit: contain;
  object-position: center;
  transform: translate3d(0, 0, 0) scale(1);
  animation: none;
}

.character-corner {
  display: none;
}

.character-state,
.character-hint {
  right: 5.5%;
  animation: none;
}

.character-state {
  top: 15%;
}

.character-hint {
  bottom: 13%;
  color: rgba(232, 240, 232, 0.78);
  background: rgba(5, 9, 7, 0.5);
  border-color: rgba(184, 238, 98, 0.18);
}

.character-runtime {
  right: 7%;
  bottom: 21%;
  border-color: rgba(184, 238, 98, 0.16);
}

.hero-task-feed {
  position: absolute;
  z-index: 8;
  right: clamp(28px, 4vw, 72px);
  bottom: 130px;
  width: min(292px, 22vw);
  display: grid;
  color: rgba(218, 230, 220, 0.54);
  font: 600 9px / 1.2 "Geist Mono", monospace;
  letter-spacing: 0.04em;
  pointer-events: none;
}

.hero-task-feed > span {
  min-height: 29px;
  display: grid;
  grid-template-columns: 5px 48px 1fr auto;
  align-items: center;
  gap: 8px;
  border-top: 1px solid rgba(184, 238, 98, 0.12);
}

.hero-task-feed > span:last-child {
  border-bottom: 1px solid rgba(184, 238, 98, 0.12);
}

.hero-task-feed i {
  width: 4px;
  height: 4px;
  background: var(--green);
  transform: rotate(45deg);
  opacity: 0.42;
}

.hero-task-feed b,
.hero-task-feed em,
.hero-task-feed strong {
  font: inherit;
}

.hero-task-feed b {
  color: rgba(184, 238, 98, 0.68);
}

.hero-task-feed em {
  overflow: hidden;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hero-task-feed strong {
  color: rgba(238, 244, 235, 0.72);
  text-align: right;
}

.hero[data-agent-state="ready"] .hero-task-feed > span:first-child i,
.hero[data-agent-state="execution"] .hero-task-feed i,
.hero[data-agent-state="completed"] .hero-task-feed i {
  opacity: 1;
  animation: taskSignal 1.8s ease-in-out infinite;
}

.hero[data-agent-state="execution"] .hero-task-feed > span:nth-child(2),
.hero[data-agent-state="completed"] .hero-task-feed > span {
  color: rgba(218, 230, 220, 0.8);
}

.agent-state-rail {
  left: max(32px, calc((100vw - var(--container)) / 2));
  bottom: 28px;
  width: min(760px, calc(100% - 64px));
  background: rgba(5, 8, 7, 0.62);
  border-color: rgba(205, 229, 212, 0.13);
  transform: translate3d(0, var(--hero-rail-y, 0), 0);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
}

.agent-state-rail button {
  min-height: 60px;
  padding: 10px 14px;
}

.signal-strip {
  position: relative;
  z-index: 12;
  margin-top: -10px;
  overflow: hidden;
  clip-path: polygon(0 9px, 100% 0, 100% calc(100% - 9px), 0 100%);
  transform: rotate(-0.25deg) scaleX(1.006);
  transform-origin: center;
}

.signal-track {
  min-height: 58px;
  padding-block: 4px;
}

.js .hero-copy.reveal > * {
  opacity: 0;
  transform: translate3d(0, 16px, 0);
  transition: opacity 520ms ease, transform 680ms var(--ease);
}

.js .hero-copy.reveal.is-visible > * {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.js .hero-copy.reveal.is-visible > :nth-child(2) { transition-delay: 70ms; }
.js .hero-copy.reveal.is-visible > :nth-child(3) { transition-delay: 130ms; }
.js .hero-copy.reveal.is-visible > :nth-child(4) { transition-delay: 190ms; }
.js .hero-copy.reveal.is-visible > :nth-child(5) { transition-delay: 250ms; }
.js .hero-copy.reveal.is-visible > :nth-child(6) { transition-delay: 310ms; }
.js .hero-copy.reveal.is-visible > :nth-child(7) { transition-delay: 370ms; }

@keyframes heroEnvironment {
  0%, 100% { opacity: 0.56; transform: translate3d(0, var(--hero-parallax, 0), 0); }
  50% { opacity: 0.82; transform: translate3d(-1.5%, calc(var(--hero-parallax, 0) - 4px), 0); }
}

@keyframes taskSignal {
  0%, 100% { opacity: 0.45; transform: rotate(45deg) scale(0.78); }
  50% { opacity: 1; transform: rotate(45deg) scale(1.22); }
}

@keyframes characterSceneSwap {
  0%, 100% { transform: translate3d(0, 0, 0); }
  45% { filter: saturate(1.18) brightness(1.08); transform: translate3d(-2px, 0, 0); }
  55% { filter: saturate(0.9) brightness(1.14); transform: translate3d(2px, 0, 0); }
}

@keyframes characterSceneGhost {
  0%, 100% { opacity: 0; transform: translate3d(0, 0, 0); }
  48% { opacity: 0.14; transform: translate3d(4px, 0, 0); }
}

@keyframes characterSceneNoise {
  0%, 100% { opacity: 0; transform: translate3d(0, 0, 0); }
  48% { opacity: 0.2; transform: translate3d(0, -2px, 0); }
}

@media (min-width: 761px) and (max-width: 1080px) {
  .hero {
    min-height: max(680px, 94svh);
  }

  .hero-copy {
    width: min(480px, 48vw);
  }

  .character-stage {
    right: -15vw;
    width: min(94vw, 120vh, 980px);
  }

  .hero-task-feed,
  .hero-scene-meta {
    display: none;
  }

  .agent-state-rail {
    left: 24px;
    width: calc(100% - 48px);
  }
}

@media (min-width: 761px) and (max-height: 720px) {
  .hero {
    min-height: 680px;
    padding-top: 108px;
    padding-bottom: 100px;
  }

  .hero h1 {
    font-size: clamp(38px, 3.4vw, 48px);
  }

  .hero-lead {
    margin-top: 18px;
    font-size: 15px;
    line-height: 1.65;
  }

  .hero-actions {
    margin-top: 24px;
  }

  .hero-meta {
    margin-top: 16px;
  }

  .character-stage {
    width: min(72vw, 122vh, 1040px);
  }

  .hero-task-feed {
    display: none;
  }
}

@media (max-width: 760px) {
  .hero {
    min-height: 0;
    padding: 102px 0 24px;
    background:
      radial-gradient(ellipse 86% 38% at 68% 67%, rgba(184, 238, 98, 0.12), transparent 72%),
      linear-gradient(180deg, #080b0b, #07100d 64%, #080b0b);
  }

  .hero::before {
    background: linear-gradient(180deg, rgba(8, 11, 11, 0.46), transparent 22%, transparent 74%, #080b0b 100%);
  }

  .hero::after {
    height: 108px;
  }

  .hero-inner {
    width: calc(100% - 40px);
  }

  .hero-copy {
    width: 100%;
    margin-top: 0;
  }

  .hero-watermark {
    top: 82px;
    left: 56%;
    font-size: 29vw;
  }

  .hero-scene-meta,
  .hero-task-feed {
    display: none;
  }

  .hero-visual {
    height: clamp(350px, 88vw, 486px);
    margin-top: 14px;
  }

  .hero-visual::before {
    top: 3%;
    right: -28%;
    width: 120vw;
    height: 94%;
  }

  .character-stage {
    top: 50%;
    right: 48%;
    width: min(720px, 126vw);
    aspect-ratio: 1677 / 938;
    transform: translate(50%, -50%);
    -webkit-mask-image: radial-gradient(ellipse 98% 98% at 68% 46%, #000 62%, rgba(0, 0, 0, 0.92) 76%, transparent 100%);
    mask-image: radial-gradient(ellipse 98% 98% at 68% 46%, #000 62%, rgba(0, 0, 0, 0.92) 76%, transparent 100%);
  }

  .character-stage:hover,
  .character-stage:focus-visible {
    transform: translate(50%, -50%);
  }

  .character-image {
    object-position: center;
  }

  .character-state {
    top: 12%;
    right: 7%;
  }

  .character-hint {
    right: 7%;
    bottom: 10%;
  }

  .character-runtime {
    right: 7%;
    bottom: 22%;
  }

  .agent-state-rail {
    left: auto;
    bottom: auto;
    width: calc(100% - 32px);
    margin-inline: auto;
    transform: none;
  }

  .signal-strip {
    margin-top: -4px;
    clip-path: polygon(0 5px, 100% 0, 100% calc(100% - 5px), 0 100%);
    transform: rotate(-0.14deg) scaleX(1.004);
  }
}

@media (max-width: 440px) {
  .hero {
    padding-top: 92px;
  }

  .hero-wordmark,
  .hero-manifest,
  .hero-meta {
    display: none;
  }

  .eyebrow {
    margin-bottom: 12px;
  }

  .hero h1 {
    font-size: clamp(34px, 10vw, 42px);
  }

  .hero-lead {
    margin-top: 14px;
    font-size: 14px;
    line-height: 1.55;
  }

  .hero-actions {
    margin-top: 18px;
  }

  .hero-actions .button-secondary {
    display: none;
  }

  .hero-visual {
    height: clamp(288px, 78vw, 336px);
    margin-top: 8px;
  }

  .character-stage {
    right: 50%;
    width: 124vw;
  }

  .character-state,
  .character-hint {
    right: 5%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-visual::before,
  .character-stage::before,
  .hero-task-feed i {
    animation: none;
  }

  .js .hero-copy.reveal > * {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .character-stage {
    animation: none;
    transform: translateY(-48%);
  }

  .character-stage.is-glitching .character-image,
  .character-stage.is-glitching::after,
  .character-stage:hover .character-scanline,
  .character-stage:focus-visible .character-scanline,
  .character-stage.is-glitching .character-scanline {
    animation: none;
  }

  .character-image {
    transition: opacity 120ms ease;
  }
}

/* Scroll choreography: staggered capabilities, active workflow, assembled modules. */
.js [data-stagger-group] .feature-card:nth-child(1) { transition-delay: 0ms; }
.js [data-stagger-group] .feature-card:nth-child(2) { transition-delay: 55ms; }
.js [data-stagger-group] .feature-card:nth-child(3) { transition-delay: 110ms; }
.js [data-stagger-group] .feature-card:nth-child(4) { transition-delay: 165ms; }
.js [data-stagger-group] .feature-card:nth-child(5) { transition-delay: 220ms; }
.js [data-stagger-group] .feature-card:nth-child(6) { transition-delay: 275ms; }

.workflow-list [data-workflow-step] {
  position: relative;
  overflow: hidden;
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(0.985);
  transform-origin: left center;
  transition: opacity 260ms ease, transform 320ms var(--ease), background 260ms ease, border-color 260ms ease;
}

.workflow-list [data-workflow-step]::after {
  content: "";
  position: absolute;
  inset: 0 0 0 auto;
  width: 3px;
  pointer-events: none;
  background: var(--color-action);
  box-shadow: 0 0 18px rgba(184, 238, 98, 0.32);
  opacity: 0;
  transform: scaleY(0.22);
  transition: opacity 220ms ease, transform 320ms var(--ease);
}

.workflow-list [data-workflow-step].is-current {
  opacity: 1;
  background: rgba(184, 238, 98, 0.055);
  transform: translate3d(8px, 0, 0) scale(1);
}

.workflow-list [data-workflow-step].is-current::after {
  opacity: 1;
  transform: scaleY(1);
}

.workflow-list [data-workflow-step].is-current > span,
.workflow-list [data-workflow-step].is-current > b {
  color: var(--color-action);
}

.source-code > div {
  opacity: 0.32;
  transform: translate3d(-14px, 0, 0);
  transition: opacity 260ms ease, transform 360ms var(--ease), background 260ms ease;
}

.source-panel.is-assembled .source-code > div {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.source-panel.is-assembled .source-code > div:nth-child(1) { transition-delay: 0ms; }
.source-panel.is-assembled .source-code > div:nth-child(2) { transition-delay: 90ms; }
.source-panel.is-assembled .source-code > div:nth-child(3) { transition-delay: 180ms; }
.source-panel.is-assembled .source-code > div:nth-child(4) { transition-delay: 270ms; }

.source-agent figcaption span {
  opacity: 0;
  transform: translate3d(0, 12px, 0) scale(0.94);
  transition: opacity 260ms ease, transform 380ms var(--ease), box-shadow 260ms ease;
}

.source-agent.is-assembled figcaption span {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
  box-shadow: 0 0 18px rgba(184, 238, 98, 0.12);
}

.source-agent.is-assembled figcaption span:nth-child(1) { transition-delay: 280ms; }
.source-agent.is-assembled figcaption span:nth-child(2) { transition-delay: 390ms; }
.source-agent.is-assembled figcaption span:nth-child(3) { transition-delay: 500ms; }

.source-agent img {
  transition: filter 520ms ease, transform 620ms var(--ease);
}

.source-agent.is-assembled img {
  filter: saturate(1.06) brightness(1.03);
}

@media (max-width: 760px) {
  .workflow-list [data-workflow-step].is-current {
    transform: translate3d(4px, 0, 0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .js [data-stagger-group] .feature-card,
  .workflow-list [data-workflow-step],
  .source-code > div,
  .source-agent figcaption span,
  .source-agent img {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

@media (max-width: 1080px) {
  .agent-state-rail {
    width: calc(100% - 48px);
  }

  .proof-strip {
    grid-template-columns: 1fr;
    gap: 42px;
    padding-inline: 24px;
  }

  .proof-intro h2 {
    max-width: 620px;
  }

  .workflow-agent {
    margin-top: 34px;
  }

  .final-cta-inner {
    grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.2fr);
    gap: 48px;
  }
}

@media (max-width: 760px) {
  .hero {
    min-height: 980px;
    padding-bottom: 150px;
  }

  .hero-visual {
    bottom: 104px;
  }

  .agent-state-rail {
    bottom: 20px;
    grid-template-columns: repeat(2, 1fr);
    width: calc(100% - 32px);
  }

  .agent-state-rail button {
    min-height: 58px;
    padding: 9px 12px;
  }

  .agent-state-rail button:nth-child(2) {
    border-right: 0;
  }

  .agent-state-rail button:nth-child(-n + 2) {
    border-bottom: 1px solid var(--color-border-dark);
  }

  .agent-state-rail small {
    font-size: 10px;
  }

  .proof-strip {
    padding-block: 72px;
    padding-inline: 20px;
  }

  .proof-grid article {
    min-height: 160px;
    padding: 22px;
  }

  .section[data-watermark]::before {
    top: 24px;
    font-size: 22vw;
  }

  .workflow-agent {
    max-width: 560px;
  }

  .workflow-agent figcaption,
  .final-agent figcaption {
    display: grid;
  }

  .final-cta {
    padding: 88px 20px;
  }

  .final-cta-inner {
    grid-template-columns: 1fr;
    gap: 52px;
  }

  .final-agent {
    width: 100%;
  }
}

@media (max-width: 440px) {
  .hero {
    min-height: 980px;
  }

  .hero-visual {
    bottom: 106px;
  }

  .agent-state-rail strong {
    font-size: 10px;
  }

  .proof-grid {
    grid-template-columns: 1fr;
  }

  .proof-grid article {
    min-height: 142px;
  }

  .final-agent {
    aspect-ratio: 4 / 3;
  }

  .final-agent img {
    object-position: 72% center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .agent-state-rail button::after,
  .feature-card,
  .proof-grid article,
  .mode-card {
    transition: none;
  }
}

/* Cindy-inspired controls, adapted to MonkeyCode's hard-edge system. */
.button {
  position: relative;
  min-height: 52px;
  padding-inline: 28px;
  overflow: hidden;
  border-radius: 0;
  isolation: isolate;
  transition: transform 180ms var(--ease), background 180ms ease, color 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.button::after {
  content: "";
  position: absolute;
  z-index: 1;
  top: 0;
  bottom: 0;
  left: -140%;
  width: 55%;
  pointer-events: none;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.32), transparent);
  transform: skewX(-20deg);
  transition: left 500ms var(--ease);
}

.button:hover::after,
.button:focus-visible::after {
  left: 170%;
}

.button-primary {
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
  box-shadow: 4px 4px 0 var(--mc-green-700, #356b12);
}

.button-primary:hover {
  box-shadow: 6px 6px 0 var(--mc-green-700, #356b12);
  transform: translate(-2px, -2px);
}

.button-primary:active {
  box-shadow: 2px 2px 0 var(--mc-green-700, #356b12);
  transform: translate(-1px, -1px) scale(0.97);
}

.button-secondary {
  background: transparent;
  border-width: 1.5px;
  box-shadow: none;
}

.button-secondary:hover {
  color: var(--green);
  background: rgba(157, 255, 69, 0.08);
  border-color: var(--green);
  box-shadow: inset 0 0 0 0.5px var(--green);
  transform: translateY(-2px);
}

.button-secondary:active {
  transform: translateY(-1px) scale(0.97);
}

.button:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .button,
  .button::after {
    transition: none;
  }
}

/* Visual calibration: one dark mineral palette with lime as a functional accent. */
:root {
  --bg: #080b0b;
  --surface: #101718;
  --surface-2: #172021;
  --text: #f3f5ed;
  --muted: #aab6b0;
  --green: #b8ee62;
  --green-bright: #d1ff8a;
  --green-deep: #35572c;
  --cream: #e6ece2;
  --cream-2: #d8e1d7;
  --ink: #12201c;
  --color-action: #b8ee62;
  --color-canvas-paper: #e6ece2;
  --color-surface-paper: #f0f3ea;
  --color-text-on-paper: #12201c;
  --color-text-muted-paper: #52625b;
  --color-border-paper: rgba(18, 32, 28, 0.2);
  --color-surface-dark: #101718;
  --color-surface-raised: #182223;
  --color-text-on-dark: #f3f5ed;
  --color-text-muted-dark: #aab6b0;
  --color-border-dark: rgba(208, 232, 218, 0.16);
  --mc-green-700: #3f6728;
}

body::before {
  background:
    radial-gradient(circle at 76% 9%, rgba(184, 238, 98, 0.1), transparent 28%),
    radial-gradient(circle at 16% 66%, rgba(73, 118, 106, 0.12), transparent 32%),
    linear-gradient(180deg, #0b1010, #080b0b 62%, #0d1212);
}

.hero {
  background:
    radial-gradient(ellipse 58% 68% at 78% 42%, rgba(184, 238, 98, 0.13), transparent 68%),
    linear-gradient(96deg, #080b0b 30%, #0b1111 56%, #060808 100%);
}

.signal-strip {
  color: var(--ink);
  background: var(--green);
}

.section-light {
  background: var(--cream);
  box-shadow: 0 0 0 100vmax var(--cream);
}

.mode-card-primary {
  color: #132018;
  background: var(--green);
  border-color: var(--green);
}

.final-cta {
  color: var(--ink);
  background:
    radial-gradient(circle at 78% 48%, rgba(255, 255, 255, 0.26), transparent 24%),
    var(--green);
}

.final-cta p:not(.section-kicker) {
  color: #273b31;
}

.source-code > div {
  color: #9aa69e;
}

.source-code code {
  overflow-wrap: anywhere;
}

.hero-visual::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 17%;
  right: 8%;
  width: min(42vw, 620px);
  aspect-ratio: 1;
  border: 1px solid rgba(184, 238, 98, 0.18);
  border-radius: 50%;
  background: radial-gradient(circle at var(--character-light-x, 50%) var(--character-light-y, 46%), rgba(209, 255, 138, 0.18), transparent 42%);
  box-shadow: 0 0 100px rgba(184, 238, 98, 0.1), inset 0 0 80px rgba(88, 135, 117, 0.08);
  transform: translate3d(0, var(--hero-parallax, 0), 0) scale(0.94);
  animation: characterHalo 8s ease-in-out infinite;
  pointer-events: none;
}

.character-stage {
  transform: translateY(-48%);
  transform-style: flat;
  transition: transform 500ms var(--ease), filter 350ms ease;
}

.character-stage:hover {
  filter: drop-shadow(0 24px 36px rgba(184, 238, 98, 0.12));
}

.character-stage::before {
  content: "";
  position: absolute;
  z-index: 4;
  inset: 8% 9% 12% 12%;
  pointer-events: none;
  background:
    radial-gradient(circle at var(--character-light-x, 50%) var(--character-light-y, 46%), rgba(232, 255, 216, 0.18), transparent 22%),
    linear-gradient(115deg, transparent 35%, rgba(184, 238, 98, 0.1) 49%, transparent 61%);
  mix-blend-mode: screen;
  opacity: 0.72;
  animation: characterLight 6s ease-in-out infinite;
}

.character-image {
  filter: saturate(0.9) contrast(1.04) brightness(1.02);
  animation: none;
}

.character-stage[data-state="execution"] .character-image {
  animation-duration: 2.8s;
}

.character-stage[data-state="completed"] .character-image {
  filter: saturate(1.04) contrast(1.06) brightness(1.06);
}

@keyframes characterBreath {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(0, -3px, 0) scale(1.008); }
}

@keyframes characterHalo {
  0%, 100% { opacity: 0.58; transform: translate3d(0, var(--hero-parallax, 0), 0) scale(0.94); }
  50% { opacity: 0.9; transform: translate3d(0, calc(var(--hero-parallax, 0) - 8px), 0) scale(1); }
}

@keyframes characterLight {
  0%, 100% { opacity: 0.48; transform: translateX(-2%); }
  50% { opacity: 0.86; transform: translateX(3%); }
}

@media (max-width: 760px) {
  .hero-visual::before {
    top: 24%;
    right: -12%;
    width: 92vw;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-visual::before,
  .character-stage::before,
  .character-image {
    animation: none;
  }

  .character-stage {
    transform: translateY(-48%);
  }
}

/* Hero camera: closer character, slower exit, and restrained live HUD signals. */
.hero {
  min-height: 112svh;
}

.hero-copy {
  opacity: var(--hero-copy-opacity, 1);
  transform: translate3d(0, var(--hero-copy-y, 0), 0);
  will-change: transform, opacity;
}

.hero-visual {
  transform: translate3d(0, var(--hero-hold, 0), 0);
  will-change: transform;
}

.character-stage {
  right: clamp(88px, 6.5vw, 140px);
  width: clamp(760px, 55vw, 940px);
  aspect-ratio: 4 / 3;
  transform-origin: 58% 52%;
}

.character-image {
  object-fit: cover;
  object-position: 70% 38%;
}

.agent-state-rail {
  opacity: var(--hero-rail-opacity, 1);
  transform: translate3d(-50%, var(--hero-rail-y, 0), 0);
  will-change: transform, opacity;
}

.character-state-dot {
  animation: stateBeacon 3.2s ease-in-out infinite;
}

.character-state,
.character-hint {
  animation: hudSignal 6.4s steps(1, end) infinite;
}

.character-hint {
  animation-delay: -2.1s;
}

.agent-state-rail button.is-active strong,
.agent-state-rail button.is-active small {
  animation: hudTextPulse 4.8s steps(1, end) infinite;
}

.character-stage[data-state="execution"] .character-runtime b {
  animation: runtimeSignal 2.6s steps(1, end) infinite;
}

.character-stage[data-state="execution"] .character-runtime b:nth-of-type(2) {
  animation-delay: -0.8s;
}

.character-stage[data-state="execution"] .character-runtime b:nth-of-type(3) {
  animation-delay: -1.6s;
}

@keyframes stateBeacon {
  0%, 84%, 100% { opacity: 1; transform: scale(1); }
  88% { opacity: 0.34; transform: scale(0.72); }
  91% { opacity: 1; transform: scale(1.22); }
  94% { opacity: 0.48; transform: scale(0.82); }
}

@keyframes hudSignal {
  0%, 91%, 100% { opacity: 1; transform: translateX(0); }
  92% { opacity: 0.34; transform: translateX(2px); }
  93% { opacity: 1; transform: translateX(-1px); }
  94% { opacity: 0.5; transform: translateX(1px); }
  96% { opacity: 1; transform: translateX(0); }
}

@keyframes hudTextPulse {
  0%, 88%, 100% { opacity: 1; }
  90% { opacity: 0.26; }
  92% { opacity: 1; }
  94% { opacity: 0.5; }
}

@keyframes runtimeSignal {
  0%, 76%, 100% { opacity: 0.82; transform: translateX(0); }
  78% { opacity: 0.25; transform: translateX(2px); }
  82% { opacity: 1; transform: translateX(0); }
}

@media (max-width: 1080px) {
  .hero {
    min-height: 118svh;
  }

  .character-stage {
    right: -2vw;
    width: min(920px, 104vw);
  }

  .character-image {
    object-position: 76% 36%;
  }
}

@media (min-width: 761px) and (max-width: 1080px) and (max-height: 640px) {
  .hero {
    min-height: 760px;
    padding-bottom: 110px;
  }

  .agent-state-rail {
    bottom: 16px;
  }
}

@media (max-width: 760px) {
  .hero {
    min-height: 920px;
  }

  .character-stage {
    right: -5%;
    width: 116vw;
    max-width: 640px;
  }

  .character-image {
    object-position: 82% 34%;
  }

  .hero-copy {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-copy,
  .hero-visual {
    opacity: 1;
    transform: none;
  }

  .agent-state-rail {
    opacity: 1;
    transform: translateX(-50%);
  }

  .character-state-dot,
  .character-state,
  .character-hint,
  .agent-state-rail button.is-active strong,
  .agent-state-rail button.is-active small,
  .character-stage[data-state="execution"] .character-runtime b {
    animation: none;
  }
}

/* Character story stages: responsive crop, masks, and restrained scroll light. */
.story-stage,
.source-agent,
.final-agent {
  --story-shift: 0px;
  --story-scan: -140%;
  position: relative;
  overflow: hidden;
  background: var(--color-surface-dark);
  border: 1px solid var(--color-border-dark);
  isolation: isolate;
}

.story-stage::before,
.source-agent::before,
.final-agent::before {
  content: "";
  position: absolute;
  z-index: 2;
  inset: 0 auto 0 -20%;
  width: 20%;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(157, 255, 69, 0.16), transparent);
  transform: translate3d(var(--story-scan), 0, 0) skewX(-12deg);
  will-change: transform;
}

.story-stage::after,
.source-agent::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, transparent 0 5px, rgba(157, 255, 69, 0.035) 5px 6px);
}

.story-stage img,
.source-agent img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: translate3d(0, var(--story-shift), 0) scale(1.06);
  will-change: transform;
}

.parallel-stage {
  width: min(var(--container), calc(100% - 48px));
  aspect-ratio: 16 / 8.1;
  margin: 72px auto 0;
  box-shadow: 8px 8px 0 rgba(17, 21, 17, 0.12);
}

.parallel-stage img {
  object-position: 28% 42%;
}

.parallel-stage::after {
  background:
    linear-gradient(90deg, rgba(5, 7, 5, 0.28), transparent 34%, transparent 78%, rgba(5, 7, 5, 0.38)),
    repeating-linear-gradient(0deg, transparent 0 5px, rgba(157, 255, 69, 0.035) 5px 6px);
}

.story-stage-hud {
  position: absolute;
  z-index: 3;
  top: 18px;
  right: 18px;
  display: flex;
  gap: 8px;
}

.story-stage-hud span,
.source-agent figcaption span {
  padding: 7px 9px;
  color: var(--color-action);
  background: rgba(5, 7, 5, 0.78);
  border: 1px solid rgba(157, 255, 69, 0.28);
  font: 650 9px / 1 "Geist Mono", monospace;
  letter-spacing: 0.07em;
  backdrop-filter: blur(8px);
}

.story-stage > figcaption {
  position: absolute;
  z-index: 3;
  inset: auto 0 0;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  color: var(--color-text-on-dark);
  background: rgba(5, 7, 5, 0.84);
  border-top: 1px solid var(--color-border-dark);
  font: 600 10px / 1.4 "Geist Mono", monospace;
  letter-spacing: 0.07em;
  backdrop-filter: blur(10px);
}

.story-stage > figcaption span {
  color: var(--color-action);
}

.source-panel {
  min-height: 650px;
  grid-template-columns: minmax(300px, 0.72fr) minmax(440px, 1.28fr);
  grid-template-rows: 1fr auto;
  gap: 28px 48px;
  padding: 72px;
}

.source-brandline {
  position: absolute;
  z-index: 4;
  top: 24px;
  left: 24px;
}

.source-copy,
.source-code {
  position: relative;
  z-index: 4;
  grid-column: 1;
}

.source-copy {
  align-self: end;
}

.source-code {
  align-self: start;
  background: rgba(5, 7, 5, 0.82);
  backdrop-filter: blur(10px);
}

.source-agent {
  grid-column: 2;
  grid-row: 1 / 3;
  align-self: stretch;
  min-height: 500px;
  margin: 0;
  border: 0;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 13%, #000 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 13%, #000 100%);
}

.source-agent img {
  object-position: 76% 46%;
}

.source-agent figcaption {
  position: absolute;
  z-index: 3;
  right: 18px;
  bottom: 18px;
  display: flex;
  gap: 8px;
}

.final-agent img {
  transform: translate3d(0, var(--story-shift), 0) scale(1.06);
  object-position: 52% center;
  will-change: transform;
}

.final-agent {
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 8%, #000 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 8%, #000 100%);
}

@media (max-width: 1080px) {
  .source-panel {
    grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.2fr);
    padding: 56px 42px 42px;
  }

  .source-agent {
    min-height: 440px;
  }
}

@media (max-width: 760px) {
  .parallel-stage {
    width: calc(100% - 40px);
    aspect-ratio: 4 / 5;
    margin-top: 48px;
  }

  .parallel-stage img {
    object-position: 20% 35%;
  }

  .story-stage-hud {
    right: 12px;
    left: 12px;
    flex-wrap: wrap;
  }

  .story-stage > figcaption {
    display: grid;
  }

  .source-panel {
    min-height: 0;
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    padding: 72px 20px 20px;
  }

  .source-copy,
  .source-code,
  .source-agent {
    grid-column: 1;
  }

  .source-copy,
  .source-code {
    grid-row: auto;
  }

  .source-agent {
    grid-row: auto;
    min-height: 430px;
    aspect-ratio: 4 / 5;
    -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 9%, #000 100%);
    mask-image: linear-gradient(180deg, transparent 0, #000 9%, #000 100%);
  }

  .source-agent img {
    object-position: 78% 42%;
  }

  .final-agent {
    aspect-ratio: 4 / 5;
    -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 7%, #000 100%);
    mask-image: linear-gradient(180deg, transparent 0, #000 7%, #000 100%);
  }

  .final-agent img {
    object-position: 53% center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .story-stage::before,
  .source-agent::before,
  .final-agent::before {
    display: none;
  }

  .story-stage img,
  .source-agent img,
  .final-agent img {
    transform: none;
  }
}

/* Mobile composition keeps copy, character, and state controls in separate flow rows. */
@media (max-width: 760px) {
  .hero {
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 104px 0 24px;
  }

  .hero-inner {
    order: 1;
  }

  .hero-visual {
    position: relative;
    order: 2;
    inset: auto;
    width: 100%;
    height: clamp(360px, 72vw, 520px);
    margin-top: 30px;
    opacity: 1;
    transform: none;
  }

  .character-stage {
    top: 50%;
    right: 50%;
    width: min(640px, 112vw);
    max-width: none;
    transform: translate(50%, -50%);
    animation: none;
  }

  .character-stage:hover,
  .character-stage:focus-visible {
    transform: translate(50%, -50%);
  }

  .character-image {
    object-position: 88% 34%;
  }

  .hero-visual::before {
    top: 8%;
    right: -8%;
    width: 88vw;
  }

  .agent-state-rail {
    position: relative;
    left: auto;
    bottom: auto;
    order: 3;
    width: calc(100% - 32px);
    margin: 0 auto;
    opacity: 1;
    transform: none;
  }

  .mobile-nav .mobile-nav-cta {
    justify-content: center;
    margin-top: 6px;
    color: var(--ink);
    background: var(--green);
    font-weight: 700;
  }

  .parallel-stage {
    width: 100%;
    aspect-ratio: 4 / 3;
  }

  .parallel-stage img {
    object-position: 72% 38%;
  }

  .source-agent,
  .final-agent {
    min-height: 0;
    aspect-ratio: 4 / 3;
  }

  .source-panel {
    padding-top: 110px;
  }

  .js .workflow-list [data-workflow-step].is-visible {
    opacity: 1;
  }

  .js .workflow-list [data-workflow-step].is-visible.is-current {
    opacity: 1;
  }

  .footer-links a {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
  }
}

@media (max-width: 440px) {
  .hero {
    padding-top: 94px;
  }

  .hero-visual {
    height: clamp(350px, 102vw, 450px);
    margin-top: 22px;
  }

  .character-stage {
    width: 126vw;
  }

  .character-image {
    object-position: 94% 34%;
  }

  .hero-meta span:last-child {
    display: inline;
  }

  .parallel-stage,
  .source-agent,
  .final-agent {
    aspect-ratio: 4 / 5;
  }

  .parallel-stage img {
    object-position: 78% 38%;
  }

  .story-stage-hud {
    justify-content: flex-end;
    gap: 5px;
    flex-wrap: wrap;
  }

  .story-stage-hud span {
    padding: 6px 7px;
    font-size: 10px;
    letter-spacing: 0;
  }

  .story-stage > figcaption {
    font-size: 11px;
  }
}

/* Final hero cascade guard. Keep this after legacy refinement layers. */
.hero {
  min-height: max(680px, 92svh);
  padding: 126px 0 116px;
  align-items: center;
  background:
    radial-gradient(ellipse 48% 62% at 80% 38%, rgba(184, 238, 98, 0.14), transparent 72%),
    linear-gradient(101deg, #080b0b 0 37%, #0a100e 61%, #050707 100%);
}

.hero::before {
  z-index: 2;
  background:
    linear-gradient(90deg, rgba(8, 11, 11, 0.99) 0%, rgba(8, 11, 11, 0.92) 27%, rgba(8, 11, 11, 0.52) 43%, rgba(8, 11, 11, 0.06) 67%),
    linear-gradient(180deg, rgba(8, 11, 11, 0.64) 0%, transparent 18%, transparent 72%, #080b0b 100%);
}

.hero-copy {
  width: min(540px, 42vw);
  margin-top: -18px;
}

.hero-visual {
  z-index: 1;
  inset: 66px 0 0;
  transform: translate3d(0, var(--hero-hold, 0), 0);
}

.hero-visual::before {
  top: 8%;
  right: -3%;
  width: 65vw;
  height: 82%;
  aspect-ratio: auto;
  border: 0;
  border-radius: 0;
  background:
    linear-gradient(112deg, transparent 22%, rgba(184, 238, 98, 0.055) 54%, transparent 72%),
    radial-gradient(ellipse at 70% 42%, rgba(209, 255, 138, 0.14), transparent 48%);
  box-shadow: none;
  transform: translate3d(0, var(--hero-parallax, 0), 0);
  animation: heroEnvironment 9s ease-in-out infinite;
}

.character-stage {
  top: 50%;
  right: -2.5vw;
  width: min(76vw, 122vh, 1180px);
  max-width: none;
  aspect-ratio: 1677 / 938;
  transform: translateY(-48%);
  transform-origin: center;
  transform-style: flat;
  animation: none;
  -webkit-mask-image: radial-gradient(ellipse 96% 96% at 68% 44%, #000 58%, rgba(0, 0, 0, 0.94) 70%, transparent 100%);
  mask-image: radial-gradient(ellipse 96% 96% at 68% 44%, #000 58%, rgba(0, 0, 0, 0.94) 70%, transparent 100%);
}

.character-stage:hover,
.character-stage:focus-visible {
  transform: translateY(-48%);
}

.character-stage::before {
  inset: 7% 2% 8% 20%;
  background:
    radial-gradient(ellipse at 70% 38%, rgba(232, 255, 216, 0.13), transparent 30%),
    linear-gradient(115deg, transparent 41%, rgba(184, 238, 98, 0.07) 53%, transparent 64%);
  opacity: 0.64;
  animation: characterLight 8s ease-in-out infinite;
}

.character-image,
.character-stage[data-state="ready"] .character-image-ready,
.character-stage[data-state="execution"] .character-image-execution,
.character-stage[data-state="completed"] .character-image-completed {
  object-fit: contain;
  object-position: center;
  transform: translate3d(0, 0, 0) scale(1);
  animation: none;
}

.character-state,
.character-hint {
  right: 5.5%;
  animation: none;
}

.character-state {
  top: 15%;
}

.character-hint {
  right: 25%;
  bottom: 13%;
  color: rgba(238, 244, 235, 0.9);
  background: rgba(5, 9, 7, 0.78);
  border-color: rgba(184, 238, 98, 0.34);
  box-shadow: 0 8px 24px rgba(3, 7, 5, 0.32);
  backdrop-filter: blur(12px);
}

.character-runtime {
  right: 7%;
  bottom: 21%;
}

.agent-state-rail {
  left: max(32px, calc((100vw - var(--container)) / 2));
  bottom: 28px;
  width: min(760px, calc(100% - 64px));
  opacity: var(--hero-rail-opacity, 1);
  transform: translate3d(0, var(--hero-rail-y, 0), 0);
}

.agent-state-rail button.is-active strong,
.agent-state-rail button.is-active small {
  animation: none;
}

@media (min-width: 761px) and (max-width: 1080px) {
  .hero {
    min-height: max(680px, 94svh);
  }

  .hero-copy {
    width: min(480px, 48vw);
  }

  .character-stage {
    right: -15vw;
    width: min(94vw, 120vh, 980px);
  }

  .agent-state-rail {
    left: 24px;
    width: calc(100% - 48px);
  }
}

@media (min-width: 761px) and (max-height: 720px) {
  .hero {
    min-height: 680px;
    padding-top: 108px;
    padding-bottom: 100px;
  }

  .character-stage {
    width: min(72vw, 122vh, 1040px);
  }
}

@media (max-width: 760px) {
  .hero {
    min-height: 0;
    padding: 102px 0 24px;
    background:
      radial-gradient(ellipse 86% 38% at 68% 67%, rgba(184, 238, 98, 0.12), transparent 72%),
      linear-gradient(180deg, #080b0b, #07100d 64%, #080b0b);
  }

  .hero::before {
    background: linear-gradient(180deg, rgba(8, 11, 11, 0.46), transparent 22%, transparent 74%, #080b0b 100%);
  }

  .hero-inner {
    width: calc(100% - 40px);
  }

  .hero-copy {
    width: 100%;
    margin-top: 0;
  }

  .hero-visual {
    position: relative;
    inset: auto;
    width: 100%;
    height: clamp(300px, 52vw, 390px);
    margin-top: 14px;
    overflow: hidden;
    opacity: 1;
    transform: none;
  }

  .hero-visual::before {
    top: 3%;
    right: -28%;
    width: 120vw;
    height: 94%;
  }

  .character-stage {
    top: 54%;
    right: 48%;
    width: min(720px, 126vw);
    max-width: none;
    aspect-ratio: 1677 / 938;
    transform: translate(50%, -50%);
    -webkit-mask-image: radial-gradient(ellipse 98% 98% at 68% 46%, #000 62%, rgba(0, 0, 0, 0.92) 76%, transparent 100%);
    mask-image: radial-gradient(ellipse 98% 98% at 68% 46%, #000 62%, rgba(0, 0, 0, 0.92) 76%, transparent 100%);
  }

  .character-stage:hover,
  .character-stage:focus-visible {
    transform: translate(50%, -50%);
  }

  .character-state {
    top: 12%;
    right: 7%;
  }

  .character-hint {
    right: 7%;
    bottom: 10%;
  }

  .character-runtime {
    display: none;
  }

  .agent-state-rail {
    position: relative;
    left: auto;
    bottom: auto;
    grid-template-columns: repeat(4, 1fr);
    width: calc(100% - 32px);
    margin-inline: auto;
    opacity: 1;
    transform: none;
  }

  .agent-state-rail button {
    min-height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 6px;
    border-right: 1px solid var(--color-border-dark);
    border-bottom: 0;
    text-align: center;
  }

  .agent-state-rail button:last-child {
    border-right: 0;
  }

  .agent-state-rail span {
    display: inline;
  }

  .agent-state-rail small {
    display: none;
  }
}

@media (max-width: 440px) {
  .hero {
    padding-top: 92px;
  }

  .hero-visual {
    height: clamp(334px, 96vw, 424px);
    margin-top: 8px;
  }

  .character-stage {
    right: 50%;
    width: 132vw;
  }

  .agent-state-rail {
    grid-template-columns: repeat(4, 1fr);
  }

  .agent-state-rail button {
    min-height: 64px;
    flex-direction: column;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 8px 3px;
    border-right: 1px solid var(--color-border-dark);
    border-bottom: 0;
    text-align: center;
  }

  .agent-state-rail button:last-child {
    border-right: 0;
  }

  .agent-state-rail span {
    display: none;
  }

  .agent-state-rail strong {
    font-size: 9px;
    letter-spacing: 0.03em;
  }

  .agent-state-rail small {
    display: block;
    color: rgba(238, 244, 235, 0.88);
    font-size: 11px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
  }
}

@media (max-width: 440px) and (max-height: 750px) {
  .hero {
    padding-top: 82px;
    padding-bottom: 10px;
  }

  .hero-lead {
    display: none;
  }

  .hero h1 {
    font-size: 34px;
  }

  .hero-actions {
    margin-top: 16px;
  }

  .hero-actions .button-primary {
    min-height: 46px;
  }

  .hero-visual {
    height: clamp(196px, 64vw, 240px);
    margin-top: 4px;
  }

  .agent-state-rail button {
    min-height: 58px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-visual::before,
  .character-stage::before,
  .hero-task-feed i {
    animation: none;
  }

  .agent-state-rail {
    transform: none;
  }
}

/* Click-triggered character motion stays scoped to the active task sequence. */
.character-stage[data-state="ready"] .character-image-ready {
  animation: characterReadySettle 900ms var(--ease) both;
}

.character-stage[data-state="execution"] .character-image-execution {
  animation: characterExecuting 3.4s ease-in-out infinite;
}

.character-stage[data-state="execution"] .character-scanline {
  animation: executionScan 2.8s linear infinite;
}

.character-stage[data-state="completed"] .character-image-completed {
  animation: characterCompletedSettle 900ms var(--ease) both;
}

@keyframes characterReadySettle {
  0% { opacity: 0.58; transform: translate3d(5px, 2px, 0) scale(0.995); }
  100% { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}

@keyframes characterExecuting {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(-3px, -2px, 0) scale(1.004); }
}

@keyframes characterCompletedSettle {
  0% { opacity: 0.72; transform: translate3d(-3px, 0, 0) scale(1.006); }
  100% { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}

@keyframes executionScan {
  0% { top: 13%; opacity: 0; }
  12% { opacity: 0.76; }
  82% { opacity: 0.46; }
  100% { top: 84%; opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .character-stage[data-state="ready"] .character-image-ready,
  .character-stage[data-state="execution"] .character-image-execution,
  .character-stage[data-state="execution"] .character-scanline,
  .character-stage[data-state="completed"] .character-image-completed {
    animation: none;
  }
}

/* Use one crop across all agent states so the subject stays visually centered. */
.character-stage {
  -webkit-mask-image: none;
  mask-image: none;
}

.character-media {
  position: absolute;
  z-index: 0;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  -webkit-mask-image: radial-gradient(ellipse 96% 96% at 68% 44%, #000 58%, rgba(0, 0, 0, 0.94) 70%, transparent 100%);
  mask-image: radial-gradient(ellipse 96% 96% at 68% 44%, #000 58%, rgba(0, 0, 0, 0.94) 70%, transparent 100%);
}

.character-image {
  translate: -19% 0;
  scale: 1.12;
  transform-origin: center;
}

.character-energy {
  position: absolute;
  z-index: 4;
  inset: 2% 3% 7% 12%;
  overflow: hidden;
  pointer-events: none;
  mix-blend-mode: screen;
  opacity: 0.68;
  filter: drop-shadow(0 0 7px rgba(157, 255, 69, 0.52));
}

.character-energy::before {
  content: "";
  position: absolute;
  inset: 9% 12% 14% 24%;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(210, 255, 166, 0.14), rgba(157, 255, 69, 0.035) 42%, transparent 70%);
  animation: characterEnergyPulse 3.6s ease-in-out infinite;
}

.character-energy svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.character-arc {
  fill: none;
  stroke: rgba(193, 255, 125, 0.9);
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: bevel;
  stroke-dasharray: 18 82;
  vector-effect: non-scaling-stroke;
  opacity: 0;
  animation: characterArcFlash 3.2s steps(1, end) infinite;
}

.character-arc-b {
  stroke: rgba(159, 248, 255, 0.8);
  animation-delay: -1.05s;
}

.character-arc-c {
  stroke-width: 1.4;
  animation-delay: -2.2s;
}

.character-energy i {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #e8ffd8;
  box-shadow: 0 0 5px #e8ffd8, 0 0 15px rgba(157, 255, 69, 0.95), 0 0 28px rgba(94, 230, 190, 0.65);
  opacity: 0;
  animation: characterSpark 2.8s steps(1, end) infinite;
}

.character-energy i:nth-of-type(1) {
  top: 31%;
  left: 46%;
}

.character-energy i:nth-of-type(2) {
  top: 48%;
  left: 67%;
  width: 3px;
  height: 3px;
  animation-delay: -0.9s;
}

.character-energy i:nth-of-type(3) {
  top: 24%;
  left: 76%;
  animation-delay: -1.8s;
}

.character-stage[data-state="execution"] .character-energy {
  opacity: 0.92;
  filter: drop-shadow(0 0 9px rgba(157, 255, 69, 0.72));
}

.character-stage[data-state="completed"] .character-energy {
  filter: hue-rotate(24deg) drop-shadow(0 0 9px rgba(157, 255, 69, 0.68));
}

@keyframes characterArcFlash {
  0%, 72%, 100% { opacity: 0; stroke-dashoffset: 0; }
  74% { opacity: 0.28; }
  76% { opacity: 0.95; stroke-dashoffset: -30; }
  78% { opacity: 0.16; }
  80% { opacity: 0.76; stroke-dashoffset: -54; }
  83% { opacity: 0; }
}

@keyframes characterSpark {
  0%, 66%, 100% { opacity: 0; transform: scale(0.5); }
  68% { opacity: 1; transform: scale(1.8); }
  70% { opacity: 0.22; transform: scale(0.8); }
  72% { opacity: 0.84; transform: scale(1.2); }
  75% { opacity: 0; transform: scale(0.5); }
}

@keyframes characterEnergyPulse {
  0%, 100% { opacity: 0.4; transform: scale(0.96); }
  50% { opacity: 0.9; transform: scale(1.03); }
}

@media (max-width: 760px) {
  .character-media {
    -webkit-mask-image: radial-gradient(ellipse 98% 98% at 68% 46%, #000 62%, rgba(0, 0, 0, 0.92) 76%, transparent 100%);
    mask-image: radial-gradient(ellipse 98% 98% at 68% 46%, #000 62%, rgba(0, 0, 0, 0.92) 76%, transparent 100%);
  }

  .character-image {
    translate: -12% 0;
    scale: 1.07;
  }

  .character-state {
    right: 14%;
  }

  .character-hint {
    right: 20%;
  }

  .character-energy {
    inset: 3% -2% 8% 6%;
    opacity: 0.58;
  }
}

@media (prefers-reduced-motion: reduce) {
  .character-energy::before,
  .character-arc,
  .character-energy i {
    animation: none;
  }

  .character-energy::before {
    opacity: 0.5;
  }

  .character-arc {
    opacity: 0.22;
    stroke-dasharray: 12 90;
  }
}

/* Keep the hero HUD clear of the subject and the viewport edge. */
.hero-watermark {
  left: 36%;
}

.hero-scene-meta {
  right: clamp(88px, 8vw, 132px);
}

.character-hint {
  right: auto;
  left: 3%;
  bottom: 13%;
  color: #e8ffd8;
  background: rgba(5, 9, 7, 0.92);
  border-color: rgba(184, 238, 98, 0.5);
  box-shadow: 0 8px 28px rgba(3, 7, 5, 0.5), 0 0 18px rgba(157, 255, 69, 0.08);
}

@media (min-width: 761px) and (max-width: 1080px) {
  .character-hint {
    left: 5%;
  }
}

@media (max-width: 760px) {
  .character-hint {
    right: auto;
    left: 18%;
    bottom: 10%;
  }
}
