:root {
  --paper: #f7f5ef;
  --ink: #111827;
  --muted: #5b6472;
  --line: #dedbd2;
  --blue: #2957ff;
  --mint: #bfffd9;
  --agent: var(--mint);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.6 Arial, sans-serif; }
a { color: inherit; text-decoration: none; }
.shell { width: min(1160px, calc(100% - 48px)); margin-inline: auto; }

header { height: 84px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; width: fit-content; font-weight: 750; }
.brand-mark { width: 38px; line-height: 0; }
.brand-mark img { display: block; width: 100%; }
nav { display: flex; gap: 36px; font-size: 14px; font-weight: 700; }
nav a:hover, footer a:hover { color: var(--blue); }
.header-cta { justify-self: end; font-size: 14px; font-weight: 750; }

.hero { min-height: 690px; display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: 70px; padding-block: 84px 100px; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 26px; font-size: clamp(58px, 6.3vw, 94px); line-height: .94; letter-spacing: -.07em; }
h1 span { color: var(--blue); }
.lead { max-width: 590px; margin-bottom: 32px; color: var(--muted); font-size: 19px; }
.button { min-height: 50px; display: inline-flex; align-items: center; padding: 0 21px; border: 2px solid; font-size: 14px; font-weight: 750; }
.button:hover { box-shadow: 4px 4px 0 var(--ink); transform: translate(-2px, -2px); }
.primary { background: var(--blue); color: white; }

.code-card { overflow: hidden; border: 2px solid var(--ink); background: #0d1424; color: #dfe8ff; box-shadow: 14px 14px 0 var(--mint), 16px 16px 0 var(--ink); transform: rotate(1deg); }
.code-title { display: flex; justify-content: space-between; margin: 0; padding: 15px 18px; border-bottom: 1px solid #293247; color: #aab6cc; font: 11px monospace; }
.code-title span { color: #6f7c94; }
pre { margin: 0; white-space: pre-wrap; font: 13px/1.75 monospace; }
.code-card pre { min-height: 270px; padding: 0 34px; }

.hero-pillars { position: relative; display: grid; gap: 18px; margin: 0; }
.hero-pillars::before { content: ""; position: absolute; top: 14px; bottom: 14px; left: 13px; width: 1px; background: var(--line); }
.hero-pillars div { position: relative; display: grid; grid-template: "step title" auto "step detail" auto / 28px 1fr; column-gap: 15px; }
.hero-pillars div::before { content: "✓"; z-index: 1; grid-area: step; align-self: start; display: grid; width: 28px; aspect-ratio: 1; place-items: center; border: 1px solid var(--blue); background: var(--paper); color: var(--blue); font: 800 14px/1 Arial, sans-serif; }
.hero-pillars dt { grid-area: title; font-size: 15px; font-weight: 800; line-height: 1.25; }
.hero-pillars dd { grid-area: detail; margin: 3px 0 0; color: var(--muted); font-size: 13px; line-height: 1.4; }

.agent-factory { position: relative; margin-top: -112px; margin-bottom: 56px; }
.agent-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.build-stream { position: absolute; z-index: 0; top: -8px; right: calc(9% - 19px); width: 38px; height: 68px; pointer-events: none; }
.build-stream i { --stream-color: var(--blue); position: absolute; bottom: 0; width: 2px; background: repeating-linear-gradient(to bottom, var(--stream-color) 0 3px, transparent 3px 10px); animation: teleport-stream linear infinite; }
.build-stream i:nth-child(2), .build-stream i:nth-child(5) { --stream-color: var(--ink); }
.build-stream i:nth-child(1) { left: 0; height: 62%; opacity: .22; animation-duration: 4.6s; animation-delay: -2.1s; }
.build-stream i:nth-child(2) { left: 9px; height: 82%; opacity: .35; animation-duration: 3.6s; animation-delay: -.8s; }
.build-stream i:nth-child(3) { left: 18px; height: 100%; opacity: .5; animation-duration: 4.2s; animation-delay: -2.8s; }
.build-stream i:nth-child(4) { left: 27px; height: 70%; opacity: .3; animation-duration: 3s; animation-delay: -1.7s; }
.build-stream i:nth-child(5) { left: 36px; height: 90%; opacity: .25; animation-duration: 3.9s; animation-delay: -.4s; }
.assembly-line { position: relative; z-index: 1; padding: 18px 22px 0; }
.agent-row { min-height: 92px; display: grid; grid-template-columns: repeat(7, 1fr); align-items: end; gap: 10px; padding-inline: 8px; }
.pixel-agent { --agent-border: var(--ink); --agent-border-width: 1; --agent-border-dash: none; width: min(68px, 100%); justify-self: center; color: var(--agent); shape-rendering: crispEdges; }
.agent-outline { stroke: var(--agent-border); stroke-width: var(--agent-border-width); stroke-dasharray: var(--agent-border-dash); vector-effect: non-scaling-stroke; }
.accessory { fill: var(--ink); }
.accent-blue { fill: var(--blue); }
.agent-output { --agent-border: var(--blue); --agent-border-width: 1.5; --agent-border-dash: 2 1.5; --ink: transparent; overflow: visible; color: rgba(41, 87, 255, .12); opacity: .86; }
.agent-output-eyes { fill: none; stroke: var(--blue); stroke-width: 1; stroke-dasharray: 1 1; vector-effect: non-scaling-stroke; }
.conveyor-belt { height: 18px; border: 1px solid #b9bfc8; background: repeating-linear-gradient(90deg, #edf0ec 0 23px, #cbd0d6 23px 26px); box-shadow: inset 0 3px 0 #aab1bc; }

@keyframes teleport-stream { to { background-position-y: 10px; } }

.use-cases { padding-block: 120px; border-top: 1px solid var(--line); }
.use-cases > h2, .final h2 { margin-bottom: 22px; font-size: clamp(40px, 5vw, 68px); line-height: 1.03; letter-spacing: -.055em; }
.use-cases > h2 { max-width: 820px; margin-bottom: 0; }

.case-tabs { position: relative; min-width: 0; margin: 70px 0 0; padding: 0; border: 0; }
.case-tabs legend { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.tab-radio { position: absolute; width: 1px; height: 1px; opacity: 0; }
.tab-list { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-bottom: 0; }
.tab-list label { min-height: 68px; display: flex; align-items: center; gap: 12px; padding: 0 22px; border-right: 1px solid var(--line); color: var(--muted); background: var(--paper); font-size: 14px; font-weight: 750; cursor: pointer; }
.tab-list label:last-child { border-right: 0; }
.tab-list small { color: var(--blue); font: 10px monospace; }

#case-customize:checked ~ .tab-list label[for="case-customize"],
#case-automate:checked ~ .tab-list label[for="case-automate"],
#case-organize:checked ~ .tab-list label[for="case-organize"],
#case-operationalize:checked ~ .tab-list label[for="case-operationalize"] { background: var(--ink); color: white; }
#case-customize:checked ~ .tab-list label[for="case-customize"] small,
#case-automate:checked ~ .tab-list label[for="case-automate"] small,
#case-organize:checked ~ .tab-list label[for="case-organize"] small,
#case-operationalize:checked ~ .tab-list label[for="case-operationalize"] small { color: var(--mint); }
#case-customize:focus-visible ~ .tab-list label[for="case-customize"],
#case-automate:focus-visible ~ .tab-list label[for="case-automate"],
#case-organize:focus-visible ~ .tab-list label[for="case-organize"],
#case-operationalize:focus-visible ~ .tab-list label[for="case-operationalize"] { outline: 3px solid #ff8b5c; outline-offset: -5px; }

.tab-panels { border: 1px solid var(--ink); }
.case-panel { min-height: 440px; display: none; grid-template-columns: .9fr 1.1fr; background: white; }
#case-customize:checked ~ .tab-panels .panel-customize,
#case-automate:checked ~ .tab-panels .panel-automate,
#case-organize:checked ~ .tab-panels .panel-organize,
#case-operationalize:checked ~ .tab-panels .panel-operationalize { display: grid; }

.case-copy { display: flex; flex-direction: column; padding: 46px; border-right: 1px solid var(--line); }
.case-copy h3 { max-width: 470px; margin: 0 0 18px; font-size: clamp(32px, 3.8vw, 48px); line-height: 1.04; letter-spacing: -.045em; }
.case-copy > p { max-width: 500px; color: var(--muted); font-size: 15px; }
.case-copy a { margin-top: auto; padding-top: 24px; color: var(--blue); font-size: 13px; font-weight: 750; }

.case-points { display: grid; grid-template-rows: repeat(3, 1fr); margin: 0; padding: 0; list-style: none; background: #f9f8f5; }
.case-points li { display: flex; flex-direction: column; justify-content: center; gap: 8px; padding: 28px 36px; border-bottom: 1px solid var(--line); }
.case-points li:last-child { border-bottom: 0; }
.case-points small { color: var(--blue); font: 10px monospace; text-transform: uppercase; }
.case-points strong { max-width: 420px; font-size: 17px; line-height: 1.45; }

.case-example { min-width: 0; display: flex; flex-direction: column; justify-content: center; padding: 42px; background: #0d1424; color: #dfe8ff; }
.case-example pre { overflow-x: auto; white-space: pre; font-size: 13px; line-height: 1.8; }
.case-example p { margin: 28px 0 0; color: var(--mint); font: 700 10px monospace; text-transform: uppercase; }
.final { padding-block: 110px 125px; border-top: 1px solid var(--line); text-align: center; }
.final-mascot { display: block; width: 92px; margin: 0 auto 28px; }
.final > p { color: var(--muted); font-size: 18px; }
footer { min-height: 150px; display: grid; grid-template-columns: 1fr auto; align-items: center; border-top: 1px solid var(--line); font-size: 13px; }
footer > a:last-child { justify-self: end; font-weight: 700; }
:focus-visible { outline: 3px solid #ff8b5c; outline-offset: 4px; }

@media (max-width: 960px) {
  header { grid-template-columns: 1fr auto; }
  nav { display: none; }
  .hero { grid-template-columns: 1fr; gap: 70px; }
}

@media (max-width: 850px) {
  .tab-list { grid-template-columns: repeat(2, 1fr); }
  .tab-list label:nth-child(2) { border-right: 0; }
  .tab-list label:nth-child(n+3) { border-top: 1px solid var(--line); }
  .case-panel { grid-template-columns: 1fr; }
  .case-copy { min-height: 390px; border-right: 0; border-bottom: 1px solid var(--line); }
}

@media (max-width: 560px) {
  .shell { width: calc(100% - 30px); }
  header { height: 70px; }
  .header-cta { font-size: 12px; }
  .hero { min-height: auto; padding-block: 55px 90px; }
  h1 { font-size: 56px; }
  .lead { font-size: 17px; }
  .button { justify-content: center; }
  .code-card { box-shadow: 8px 8px 0 var(--mint), 10px 10px 0 var(--ink); }
  .code-card pre { min-height: auto; padding: 24px 20px; font-size: 10px; }
  .agent-factory { margin-top: -72px; margin-bottom: 44px; }
  .build-stream { top: -18px; }
  .assembly-line { padding-inline: 8px; }
  .agent-row { min-height: 72px; gap: 4px; padding-inline: 0; }
  .pixel-agent { width: min(46px, 100%); }
  .conveyor-belt { height: 14px; background-size: auto 100%; }
  .use-cases, .final { padding-block: 80px; }
  .use-cases > h2, .final h2 { font-size: 40px; }
  .final-mascot { width: 76px; margin-bottom: 22px; }
  .case-tabs { margin-top: 48px; }
  .tab-list label { min-height: 60px; padding: 0 13px; font-size: 12px; }
  .case-copy { min-height: 410px; padding: 28px; }
  .case-copy h3 { font-size: 34px; }
  .case-points li, .case-example { padding: 24px; }
  .case-example pre { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 11px; }
  footer { padding-block: 32px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}
