/* Landing. Phosphor: amber terminal character on the black layout.
   The ASCII portrait is the one loud thing; the hex field is texture behind it. */

body.home {
  --line: #262219; --line-2: #3b3424; --ink-1: #0a0907; --ink-2: #110f0b;
  --txt: var(--bone); --txt-2: var(--bone-2); --txt-3: #7d8378;
  background: var(--black); color: var(--txt);
}
body.home ::selection { background: var(--amber); color: var(--black); }
body.home :focus-visible { outline: 2px solid var(--amber); outline-offset: 4px; }

/* ---------- Chrome shared with pages.css: top bar, buttons, footer ---------- */
body.home .top { padding: 20px var(--gutter); }
body.home .brand { font: 400 16px/1 var(--pixel); letter-spacing: 0; gap: 11px; color: var(--txt); }
body.home .brand .mark { width: 20px; height: 20px; color: var(--amber); }
body.home .top nav { font-size: 15px; color: var(--txt-2); }
body.home .top nav .link { transition: color .2s; }
body.home .top nav .link:hover { color: var(--txt); }
body.home .top nav .link::after { background: var(--amber); }
body.home .top nav .nav-key {
  font: 400 13px/1 var(--pixel); color: var(--amber); padding: 9px 12px; border: 1px solid var(--amber-dim); border-radius: 2px;
  transition: background .2s, color .2s, border-color .2s;
}
body.home .top nav .nav-key::after { display: none; }
body.home .top nav .nav-key:hover { background: var(--amber); border-color: var(--amber); color: var(--black); }

body.home .btn { border-color: var(--line-2); color: var(--txt); border-radius: 2px; }
body.home .btn::before { background: var(--bone); }
body.home .btn:hover { color: var(--black); border-color: var(--bone); }
body.home .btn-solid { background: var(--amber); border-color: var(--amber); color: var(--black); font-weight: 600; }
body.home .btn-solid::before { background: var(--black); }
body.home .btn-solid:hover { color: var(--amber); border-color: var(--amber); }
body.home .btn:focus-visible { outline-offset: 3px; }

body.home .end-row { border-top-color: var(--line); color: var(--txt-3); font-size: 13.5px; align-items: center; }
body.home .end-row .link { color: var(--txt); }
body.home .end-row .link::after { background: var(--amber); }
.foot-brand { font: 400 13px/1 var(--pixel); color: var(--txt-2, var(--bone-2)); }

/* ---------- One quiet pixel label, used in the hero only ---------- */
.eyebrow { font: 400 13px/1.3 var(--pixel); color: var(--amber); }

/* ---------- Hero ---------- */
body.home .hero {
  height: auto; min-height: max(100svh, 660px); background: var(--black); overflow: hidden;
}
/* The hex field is only texture here: dim, and gone where the copy sits. */
body.home .hero > canvas {
  position: absolute; inset: 0; width: 100%; height: 100%; opacity: .2;
  -webkit-mask-image: linear-gradient(100deg, transparent 0, rgba(0,0,0,.25) 34%, #000 62%, #000 100%);
  mask-image: linear-gradient(100deg, transparent 0, rgba(0,0,0,.25) 34%, #000 62%, #000 100%);
}
.hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 30%; pointer-events: none;
  background: linear-gradient(to bottom, transparent, var(--black) 78%);
}
.hero-main {
  position: relative; z-index: 2; flex: 1; display: grid;
  grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: clamp(24px, 4vw, 72px);
  padding: 8px var(--gutter) 28px; max-width: 1640px; width: 100%; margin: 0 auto;
}
.hero-copy { min-width: 0; }
.hero-copy h1 {
  margin-top: 22px; font-size: clamp(2.5rem, 5.5vw, 5.6rem); line-height: .96; letter-spacing: -.05em; font-weight: 500;
  color: var(--white); max-width: 11ch; text-wrap: balance;
}
.hero-copy .h1-b { color: var(--amber); }
body.home .lede { margin-top: 26px; max-width: 40ch; color: var(--txt-2); font-size: clamp(1.05rem, 1.35vw, 1.25rem); line-height: 1.4; letter-spacing: -.01em; }
.hero-copy .actions { margin-top: 32px; }

/* The portrait. scenes.js sets the height from the width (100 x 56 cells). */
.hero-art {
  --pw: min(50vw, calc((100svh - 250px) * 1.06), 860px);
  position: relative; width: max(var(--pw), 300px); margin: 0; justify-self: end;
}
.hero-art::before {
  content: ""; position: absolute; inset: -12% -18%; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, rgba(255,180,61,.13), rgba(255,180,61,.04) 55%, transparent 100%);
}
.hero-art .portrait { position: relative; width: 100%; min-height: 200px; overflow: hidden; }
.hero-art .portrait canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

.hero-stats {
  position: relative; z-index: 2; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0 var(--gutter);
  border-top: 1px solid var(--line-2);
}
.hero-stats div { display: flex; flex-direction: column-reverse; gap: 8px; padding: 18px 20px 24px 0; }
.hero-stats div + div { padding-left: 20px; border-left: 1px solid var(--line); }
.hero-stats dd { margin: 0; font: 400 clamp(1.5rem, 2.4vw, 2.1rem)/1 var(--pixel); color: var(--bone); }
.hero-stats dd.live { color: var(--amber); }
.hero-stats dd.live::after {
  content: ""; display: inline-block; width: .3em; height: .3em; margin-left: .4em; vertical-align: .22em; background: var(--mint);
  animation: blink 1.6s steps(2) infinite;
}
.hero-stats dt { font: 400 12px/1.35 var(--pixel); color: var(--txt-3); }

@media (max-width: 900px) {
  .hero-main { grid-template-columns: minmax(0, 1fr); align-items: start; gap: 0; padding-top: 0; }
  .hero-art { --pw: min(100%, 520px); width: var(--pw); grid-row: 1; justify-self: center; }
  .hero-copy { grid-row: 2; margin-top: -34px; position: relative; }
  .hero-copy h1 { max-width: 12ch; margin-top: 14px; }
  .hero-stats { grid-template-columns: 1fr 1fr; }
  .hero-stats div { padding: 14px 12px 16px 0; }
  .hero-stats div:nth-child(odd) { padding-left: 0; border-left: 0; }
  .hero-stats div:nth-child(even) { padding-left: 14px; }
  .hero-stats div:nth-child(n+3) { border-top: 1px solid var(--line); }
  body.home .hero > canvas { opacity: .13; -webkit-mask-image: none; mask-image: none; }
}

/* ---------- Statement ---------- */
body.home .say { padding: clamp(90px, 17vh, 200px) 0 clamp(90px, 16vh, 190px); }
body.home .say p { max-width: 20ch; }
body.home .say .w { color: #3a352b; }
body.home .say .w.lit { color: var(--bone); }

/* ---------- Sections ---------- */
body.home .sec > .wrap::before { content: ""; display: block; height: 1px; background: var(--line-2); margin-bottom: clamp(36px, 6vh, 64px); }
body.home .h2 { color: var(--white); }
body.home .sec-head p { color: var(--txt-2); }
body.home .ul { text-decoration-color: var(--amber-dim); }
body.home .ul:hover { text-decoration-color: var(--amber); color: var(--amber); }

/* Request path: agent -> panel -> container, and the desktop stream back to the browser.
   Nodes are neutral; amber is the path only. */
.route {
  display: grid; align-items: stretch; row-gap: 20px;
  grid-template-columns: minmax(0, 1fr) minmax(96px, .5fr) minmax(0, 1fr) minmax(96px, .5fr) minmax(0, 1.15fr);
}
.node {
  display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 22px 24px 24px;
  border: 1px solid var(--line-2); border-radius: 3px; background: var(--ink-1);
}
.node-tag { font: 400 12px/1.3 var(--pixel); color: var(--txt-3); margin-bottom: 10px; }
.node strong { font-size: clamp(1.2rem, 1.7vw, 1.5rem); font-weight: 500; letter-spacing: -.03em; line-height: 1.1; color: var(--white); }
.node > span:last-child { font-size: 15.5px; line-height: 1.4; color: var(--txt-2); }
.node ul { list-style: none; padding: 0; margin-top: 14px; border-bottom: 1px solid var(--line); }
.node li { padding: 10px 0; border-top: 1px solid var(--line); font-size: 15.5px; color: var(--txt-2); }
.n-agent { grid-area: 1 / 1; } .c-mcp { grid-area: 1 / 2; } .n-panel { grid-area: 1 / 3; } .c-proxy { grid-area: 1 / 4; }
.n-box { grid-area: 1 / 5 / 3 / 6; }
.c-stream { grid-area: 2 / 2 / 3 / 5; } .n-browser { grid-area: 2 / 1; }

.conn {
  position: relative; align-self: center; height: 1px; margin: 0 12px 0 10px;
  background: repeating-linear-gradient(90deg, var(--amber) 0 6px, transparent 6px 12px) 0 0 / 12px 1px repeat-x;
  animation: route-x 1.1s linear infinite;
}
.conn span {
  position: absolute; left: 50%; bottom: 11px; transform: translateX(-50%); white-space: nowrap;
  font: 400 12.5px/1 var(--pixel); color: var(--amber);
}
.conn::after {
  content: ""; position: absolute; right: -1px; top: 50%; width: 7px; height: 7px;
  border-top: 1px solid var(--amber); border-right: 1px solid var(--amber); transform: translateY(-50%) rotate(45deg);
}
.c-stream { margin: 0 10px 0 12px; animation-direction: reverse; }
.c-stream::after { right: auto; left: -1px; transform: translateY(-50%) rotate(-135deg); }
@keyframes route-x { to { background-position: 12px 0; } }
@keyframes route-y { to { background-position: 0 12px; } }
.route-note { margin-top: 22px; color: var(--txt-3); font-size: 16px; }

@media (max-width: 900px) {
  .route { display: flex; flex-direction: column; row-gap: 0; }
  .node { padding: 18px 20px 20px; }
  .node-tag { margin-bottom: 6px; }
  .conn, .c-stream {
    align-self: flex-start; width: 1px; height: 52px; margin: 8px 0 10px 28px;
    background: repeating-linear-gradient(180deg, var(--amber) 0 6px, transparent 6px 12px) 0 0 / 1px 12px repeat-y;
    animation: route-y 1.1s linear infinite;
  }
  .conn span { left: 18px; bottom: auto; top: 50%; transform: translateY(-50%); }
  .conn::after, .c-stream::after { right: auto; left: 50%; top: auto; bottom: -1px; transform: translateX(-50%) rotate(135deg); }
}

body.home .term-bar {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 18px;
  border-bottom: 1px solid var(--line); font: 400 12.5px/1.3 var(--pixel); color: var(--txt-3);
}

/* Terminal */
body.home .term { background: var(--ink-1); border: 1px solid var(--line-2); border-radius: 3px; color: var(--bone); }
body.home .term #status { color: var(--amber); }
body.home .term pre { font: 14px/1.75 var(--mono); min-height: 440px; padding: 22px 20px 26px; }
body.home .term .m { color: var(--amber-dim); }
body.home .caret { background: var(--amber); }

body.home .facts, body.home .facts li { border-color: var(--line-2); }
body.home .facts strong { color: var(--bone); }
body.home .facts span { color: var(--txt-3); }

/* Steps */
body.home .flow, body.home .flow li { border-color: var(--line-2); }
body.home .flow li { grid-template-columns: 5ch 2fr 5fr; transition: background .3s; }
body.home .flow li::before { content: counter(flow, decimal-leading-zero); font: 400 15px/1 var(--pixel); color: var(--amber); }
body.home .flow h3 { color: var(--white); }
body.home .flow p { color: var(--txt-2); }
@media (max-width: 760px) { body.home .flow li { grid-template-columns: 4ch 1fr; } }

/* Pricing rows invert to amber. */
body.home .rows, body.home .row { border-color: var(--line-2); }
body.home .row::before { background: var(--amber); }
body.home .row h3 { color: var(--white); transition: color .3s; }
body.home .row .amt { font: 400 clamp(1.5rem, 2.6vw, 2.2rem)/1 var(--pixel); letter-spacing: 0; color: var(--amber); transition: color .3s; }
body.home .row .amt small { font: 400 12.5px/1 var(--pixel); opacity: .75; }
body.home .row .go { min-width: 13ch; text-align: right; font: 400 13px/1 var(--pixel); }
body.home .row:hover, body.home .row:focus-visible { color: var(--black); outline-offset: -2px; }
body.home .row:hover h3, body.home .row:hover .amt, body.home .row:focus-visible h3, body.home .row:focus-visible .amt { color: var(--black); }
body.home .row:hover p, body.home .row:focus-visible p { opacity: .8; }
body.home .row:focus-visible { outline-color: var(--white); }

/* ---------- Closer ---------- */
body.home .end { padding-top: 0; background: var(--black); }
body.home .end > canvas {
  top: -30vh; height: calc(100% + 30vh); opacity: .16;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 60%); mask-image: linear-gradient(to bottom, transparent 0, #000 60%);
}
.closer { padding-top: clamp(40px, 9vh, 110px); }
body.home .end .closer h2 { color: var(--white); max-width: 14ch; text-wrap: balance; }
.closer-note { margin-top: 22px; font: 400 13px/1.3 var(--pixel); color: var(--amber); }
body.home .end .actions { margin-top: 34px; }
body.home .end-row { margin-top: clamp(64px, 11vh, 120px); }

@media (prefers-reduced-motion: reduce) {
  .hero-stats dd.live::after, .conn, .c-stream { animation: none; }
  body.home .say .w { color: var(--bone); }
  body.home .row h3, body.home .row .amt { transition: none; }
}
@media (max-width: 900px) { body.home .row .go { min-width: 0; text-align: left; } }
