/* ==========================================================================
   STACKHAUS v2 — applied AI consulting
   Theme: "Vercel" — black on white. Geist Sans + Geist Mono, hairline
   borders (#ebebeb), near-black ink (#171717), one blue link accent.
   Same markup, selectors and flow as v1 — only the skin changed.
   ========================================================================== */

:root {
  --bg:        #fafafa;
  --bg-2:      #f5f5f5;
  --panel:     #ffffff;
  --ink:       #171717;
  --ink-dim:   #525252;
  --ink-faint: #8f8f8f;
  --acc:       #171717;   /* primary accent — near-black, replaces v1 amber */
  --acc-hi:    #000000;
  --blue:      #0072f5;   /* vercel link blue — used sparingly */
  --green:     #46a758;   /* success states */
  --paper:     #ffffff;
  --paper-ink: #171717;
  --paper-dim: #525252;
  --hair:      rgba(23, 23, 23, 0.12);
  --hair-soft: rgba(23, 23, 23, 0.07);
  --sans:  "Geist", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Geist", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif; /* vercel is all-sans: display slots reuse Geist */
  --mono:  "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --ease:  cubic-bezier(0.22, 1, 0.36, 1);
  --pad:   clamp(2rem, 4vw, 4.5rem);
  --max:   clamp(100rem, 94vw, 150rem); /* fluid: sections widen with the viewport */
  --rail:  4.5rem;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; color-scheme: light; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: -0.011em;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--ink); color: #fafafa; }

a { color: inherit; text-decoration: none; }

:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 2px; }

/* ---------- progress ---------- */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 70; background: transparent; }
.progress span { display: block; height: 100%; width: 0; background: var(--ink); }

/* ---------- edge rails (wide screens) ----------
   The side gutters become part of the composition: a section index on the
   left, a running "where am I" label on the right, hairlines framing the page. */
.rail { display: none; }

@media (min-width: 1400px) {
  body { padding-inline: var(--rail); }
  .nav, .progress { left: var(--rail); right: var(--rail); }

  .rail {
    position: fixed; top: 0; bottom: 0; width: var(--rail); z-index: 45;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    background: var(--bg);
  }
  .rail-left  { left: 0;  border-right: 1px solid var(--hair-soft); }
  .rail-right { right: 0; border-left: 1px solid var(--hair-soft); }

  .rail-index { display: flex; flex-direction: column; gap: 1.05rem; }
  .rail-index a {
    position: relative; font-family: var(--mono); font-size: 0.62rem;
    letter-spacing: 0.16em; color: var(--ink-faint); padding: 0.25rem 0.3rem;
    transition: color 0.3s;
  }
  .rail-index a::before {
    content: ""; position: absolute; right: calc(100% + 0.35rem); top: 50%;
    width: 0.6rem; height: 1px; background: var(--ink);
    transform: scaleX(0); transform-origin: right; transition: transform 0.35s var(--ease);
  }
  .rail-index a::after {
    content: attr(data-label); position: absolute; left: calc(100% + 0.9rem); top: 50%;
    transform: translate(-6px, -50%); white-space: nowrap;
    font-size: 0.6rem; letter-spacing: 0.16em; text-transform: uppercase;
    color: var(--ink); background: var(--panel); border: 1px solid var(--hair);
    padding: 0.35rem 0.65rem; border-radius: 6px;
    opacity: 0; pointer-events: none;
    transition: opacity 0.25s, transform 0.3s var(--ease);
  }
  .rail-index a:hover::after, .rail-index a:focus-visible::after { opacity: 1; transform: translate(0, -50%); }
  .rail-index a:hover { color: var(--ink); }
  .rail-index a.active { color: var(--ink); }
  .rail-index a.active::before { transform: scaleX(1); }

  .rail-label, .rail-foot {
    writing-mode: vertical-rl; transform: rotate(180deg);
    font-family: var(--mono); text-transform: uppercase; color: var(--ink-faint);
  }
  .rail-label { margin: auto 0; font-size: 0.62rem; letter-spacing: 0.32em; }
  .rail-foot  { margin: 0 0 1.5rem; font-size: 0.56rem; letter-spacing: 0.28em; opacity: 0.7; }
}
/* short viewports: drop the footer mark so it can't crowd the running label */
@media (min-width: 1400px) and (max-height: 720px) {
  .rail-foot { display: none; }
}

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; gap: 2rem;
  padding: 0.85rem var(--pad);
  background: rgba(250, 250, 250, 0.85);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--hair-soft);
  transition: border-color 0.4s;
}
.nav.scrolled { border-bottom-color: var(--hair); }

.brand { display: flex; align-items: center; gap: 0.7rem; margin-right: auto; }
.brand-mark { width: 30px; height: 30px; flex: none; }
.brand-mark .m1 { fill: #e2622b; }
.brand-mark .m2 { fill: var(--ink); opacity: 0.8; }
.brand-mark .m3 { fill: var(--ink); opacity: 0.4; }
.brand-word {
  font-family: var(--sans); font-weight: 600; font-size: 1.08rem; line-height: 1.05;
  letter-spacing: -0.02em; display: flex; flex-direction: column;
}
.brand-word em {
  font-family: var(--mono); font-style: normal; font-weight: 400; font-size: 0.58rem;
  letter-spacing: 0.34em; text-transform: uppercase; color: var(--ink-faint);
}

.nav-links { display: flex; gap: 1.6rem; }
.nav-links a {
  font-family: var(--sans); font-size: 0.85rem; font-weight: 400;
  color: var(--ink-dim); letter-spacing: -0.01em;
  position: relative; padding: 0.2rem 0; transition: color 0.3s;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: -2px; height: 1px; width: 0;
  background: var(--ink); transition: width 0.35s var(--ease);
}
.nav-links a:hover, .nav-links a.active { color: var(--ink); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }

.nav-toggle {
  display: none; background: var(--panel); border: 1px solid var(--hair); border-radius: 6px;
  width: 42px; height: 38px; cursor: pointer; flex-direction: column;
  align-items: center; justify-content: center; gap: 6px;
}
.nav-toggle span { display: block; width: 18px; height: 1.5px; background: var(--ink); transition: transform 0.3s var(--ease); }
.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.75px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child  { transform: translateY(-3.75px) rotate(-45deg); }

/* ---------- buttons — vercel: near-black, radius 6, sentence case ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--sans); font-size: 0.9rem; font-weight: 500;
  letter-spacing: -0.01em;
  padding: 0.8rem 1.6rem; border-radius: 6px; cursor: pointer;
  border: 1px solid transparent; white-space: nowrap;
  transition: background 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s;
  will-change: transform;
}
.btn-solid { background: var(--ink); color: #ffffff; }
.btn-solid:hover { background: #3d3d3d; }
.btn-ghost { border-color: var(--hair); color: var(--ink); background: var(--panel); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-lg { padding: 0.95rem 2rem; font-size: 0.95rem; }
.btn-nav { padding: 0.5rem 1rem; font-size: 0.82rem; }

/* ---------- hero ---------- */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  padding: calc(72px + 4vh) var(--pad) 6vh;
  background:
    repeating-linear-gradient(to right, rgba(23, 23, 23, 0.04) 0 1px, transparent 1px calc(100% / 6)),
    #ffffff;
}
#mesh { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.5; }

.hero-inner {
  position: relative; z-index: 2; width: 100%; max-width: var(--max); margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, 1fr) clamp(24rem, 34vw, 40rem);
  gap: clamp(2rem, 5vw, 5rem); align-items: center;
}

.eyebrow {
  display: flex; align-items: center; gap: 0.65rem;
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.3em;
  text-transform: uppercase; color: var(--ink); margin-bottom: 1.6rem;
}
.tick { width: 26px; height: 1px; background: var(--ink); flex: none; }
.nobr { white-space: nowrap; }

h1 {
  font-family: var(--sans); font-weight: 500;
  font-size: clamp(2.5rem, 5.4vw, 4.6rem);
  line-height: 1.04; letter-spacing: -0.055em; margin-bottom: 1.5rem;
}
h1 em, h2 em {
  font-style: normal; font-weight: 500; color: #737373; /* two-tone headline, the vercel tell */
}

.lede { max-width: 38rem; color: var(--ink-dim); font-size: clamp(1rem, 1.3vw, 1.13rem); margin-bottom: 2.2rem; }

.hero-cta { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-bottom: 3rem; }

.hero-stats {
  display: grid; grid-template-columns: repeat(4, auto); gap: clamp(1.5rem, 3.5vw, 3.5rem);
  justify-content: space-between;
  border-top: 1px solid var(--hair); padding-top: 1.6rem; width: 100%; max-width: 76rem;
}
.hero-stats dt {
  font-family: var(--sans); font-weight: 600; letter-spacing: -0.03em;
  font-size: clamp(1.7rem, 2.6vw, 2.5rem);
  color: var(--ink); line-height: 1; margin-bottom: 0.4rem; font-variant-numeric: tabular-nums;
}
.hero-stats dd {
  font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--ink-faint); max-width: 13rem; line-height: 1.55;
  text-wrap: balance;
}

/* terminal — white card, hairline border, soft vercel shadow */
.hero-term {
  border: 1px solid var(--hair); border-radius: 12px; overflow: hidden;
  background: #ffffff;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06), 0 2px 8px rgba(0, 0, 0, 0.04);
}
.term-bar {
  display: flex; align-items: center; gap: 7px;
  padding: 0.7rem 1rem; border-bottom: 1px solid var(--hair-soft);
  background: var(--bg);
}
.dot { width: 9px; height: 9px; border-radius: 50%; background: #d4d4d4; }
.dot:first-child { background: var(--ink); }
.term-title { margin-left: auto; font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.18em; color: var(--ink-faint); text-transform: uppercase; }
.term-body {
  font-family: var(--mono); font-size: clamp(0.72rem, 0.95vw, 0.8rem);
  line-height: 1.75; padding: 1.2rem 1.3rem 1.5rem;
  min-height: 21em; white-space: pre-wrap; word-break: break-word; color: var(--ink-dim);
}
.term-body .c-cmd { color: var(--ink); font-weight: 500; }
.term-body .c-out { color: var(--ink-dim); }
.term-body .c-ok  { color: var(--green); }
.term-body .c-acc { color: var(--blue); }
.term-body .cursor { display: inline-block; width: 0.55em; height: 1.05em; background: var(--ink); vertical-align: text-bottom; animation: blink 1.05s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.scroll-hint { position: absolute; left: 50%; bottom: 2rem; transform: translateX(-50%); z-index: 2; }
@media (max-height: 800px) { .scroll-hint { display: none; } }
.scroll-hint span { display: block; width: 1px; height: 44px; background: linear-gradient(var(--ink), transparent); animation: drip 2.2s var(--ease) infinite; }
@keyframes drip { 0% { transform: scaleY(0); transform-origin: top; } 45% { transform: scaleY(1); transform-origin: top; } 55% { transform: scaleY(1); transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* ---------- ticker ---------- */
.ticker {
  border-top: 1px solid var(--hair-soft); border-bottom: 1px solid var(--hair-soft);
  overflow: hidden; padding: 0.85rem 0; background: var(--bg);
}
.ticker-track { display: flex; gap: 3rem; width: max-content; animation: tick 40s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-track span {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.26em;
  text-transform: uppercase; color: var(--ink-faint); white-space: nowrap;
  display: flex; align-items: center; gap: 3rem;
}
.ticker-track span::after { content: "·"; color: var(--ink); font-size: 1rem; }
@keyframes tick { to { transform: translateX(-50%); } }

/* ---------- sections ---------- */
.section { max-width: var(--max); margin: 0 auto; padding: clamp(5rem, 11vh, 9rem) var(--pad) 0; }
section[id] { scroll-margin-top: 4rem; }

.section-head { margin-bottom: clamp(2.5rem, 5vw, 4rem); max-width: 46rem; }
.index {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.34em;
  color: var(--ink-faint); margin-bottom: 1.1rem; display: flex; align-items: center; gap: 0.8rem;
}
.index::after { content: ""; height: 1px; width: 56px; background: var(--hair); }
h2 {
  font-family: var(--sans); font-weight: 560;
  font-size: clamp(1.9rem, 3.6vw, 3.1rem);
  line-height: 1.08; letter-spacing: -0.035em;
}
.section-sub { margin-top: 1.1rem; color: var(--ink-dim); font-size: 1.02rem; max-width: 38rem; }

/* cards — white panels, hairline border, no corner ticks */
.cards-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(24rem, 100%), 1fr)); gap: 1.1rem; }
.cards-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(34rem, 100%), 1fr)); gap: 1.1rem; }

.card {
  position: relative; border: 1px solid var(--hair-soft); border-radius: 12px;
  background: var(--panel);
  padding: 1.9rem 1.7rem 1.8rem;
  transition: transform 0.45s var(--ease), border-color 0.45s, box-shadow 0.45s;
}
.card:hover {
  transform: translateY(-5px); border-color: var(--hair);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.07);
}

.card-no { font-family: var(--mono); font-size: 0.95rem; color: var(--ink-faint); margin-bottom: 1.1rem; }
.card h3 { font-family: var(--sans); font-weight: 600; letter-spacing: -0.02em; font-size: 1.28rem; line-height: 1.25; margin-bottom: 0.7rem; }
.card p { color: var(--ink-dim); font-size: 0.94rem; max-width: 38rem; }

.svc header { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 0.7rem; }
.svc header h3 { margin-bottom: 0; }
.tag {
  font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--ink-dim); border: 1px solid var(--hair-soft); background: var(--bg);
  border-radius: 99px; padding: 0.28rem 0.7rem; white-space: nowrap; flex: none;
}
.svc ul { list-style: none; margin-top: 1.2rem; border-top: 1px dashed var(--hair); padding-top: 1rem; }
.svc li {
  position: relative; padding-left: 1.35rem; margin-bottom: 0.5rem;
  font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.03em; color: var(--ink-dim);
}
.svc li::before { content: "→"; position: absolute; left: 0; color: var(--ink); }

/* white band — the light rhythm break (v1's cream spread) */
.band-paper {
  margin-top: clamp(5rem, 11vh, 9rem);
  padding: clamp(4rem, 9vh, 7rem) 0 clamp(3rem, 6vh, 5rem);
  background: var(--paper); color: var(--paper-ink);
  border-top: 1px solid var(--hair-soft); border-bottom: 1px solid var(--hair-soft);
}
.band-inner { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }
.band-paper .index { color: var(--ink-faint); }
.band-paper .steps { border-top-color: var(--hair); }
.band-paper .step { border-bottom-color: var(--hair); }
.band-paper .step:hover { background: linear-gradient(to right, rgba(23, 23, 23, 0.035), transparent 70%); }
.band-paper .step-no { color: var(--ink); }
.band-paper .step p { color: var(--paper-dim); }

/* steps */
.steps { list-style: none; counter-reset: step; border-top: 1px solid var(--hair); }
.step {
  display: grid; grid-template-columns: 7rem 1fr; gap: clamp(1.2rem, 3vw, 3rem);
  padding: 2.1rem 0; border-bottom: 1px solid var(--hair);
  transition: background 0.4s, padding-left 0.4s var(--ease);
}
.step:hover { background: linear-gradient(to right, rgba(23,23,23,0.03), transparent 70%); padding-left: 0.8rem; }
.step-no {
  font-family: var(--mono); font-size: 0.85rem; color: var(--ink);
  letter-spacing: 0.2em; padding-top: 0.35rem;
}
.step h3 { font-family: var(--sans); font-weight: 600; letter-spacing: -0.02em; font-size: 1.45rem; margin-bottom: 0.5rem; }
.step p { color: var(--ink-dim); max-width: 40rem; font-size: 0.97rem; }

/* wide screens: steps become a 4-column timeline so the band uses its full width */
@media (min-width: 1200px) {
  .steps { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid var(--hair); }
  .step { display: block; padding: 2.2rem 2rem 2.4rem 0; border-bottom: none; }
  .step + .step { border-left: 1px dashed var(--hair); padding-left: 2rem; }
  .step:hover { padding-left: 0; }
  .step + .step:hover { padding-left: 2rem; }
  .step-no { padding-top: 0; margin-bottom: 1rem; }
  .step p { max-width: none; }
  .band-paper .steps { border-bottom-color: var(--hair); }
  .band-paper .step + .step { border-left-color: var(--hair); }
}

/* fit */
.fit-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(34rem, 100%), 1fr)); border-top: 1px solid var(--hair-soft); border-left: 1px solid var(--hair-soft); }
.fit-item { padding: 2rem 1.8rem; border-right: 1px solid var(--hair-soft); border-bottom: 1px solid var(--hair-soft); transition: background 0.4s; }
.fit-item:hover { background: rgba(23, 23, 23, 0.02); }
.fit-item h3 { font-family: var(--sans); font-weight: 600; letter-spacing: -0.02em; font-size: 1.22rem; margin-bottom: 0.55rem; }
.fit-item h3::before { content: "◆ "; color: var(--ink); font-size: 0.7em; vertical-align: 0.12em; }
.fit-item p { color: var(--ink-dim); font-size: 0.93rem; max-width: 36rem; }

/* operator */
.op-grid {
  display: grid; grid-template-columns: minmax(0, 46rem) minmax(22rem, 28rem);
  justify-content: space-between; gap: clamp(2rem, 5vw, 4.5rem); align-items: start;
}
.op-copy p { color: var(--ink-dim); font-size: 1.04rem; margin-bottom: 1.3rem; }
.op-copy strong { color: var(--ink); font-weight: 550; }
.op-note {
  border-left: 2px solid var(--ink); padding: 0.4rem 0 0.4rem 1.2rem;
  font-weight: 500; font-size: 1.08rem !important; color: var(--ink) !important;
}
.op-facts { border: 1px solid var(--hair-soft); border-radius: 12px; background: var(--panel); padding: 1.6rem 1.5rem; position: sticky; top: 96px; }
.facts-title {
  font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--ink); margin-bottom: 1.1rem;
}
.op-facts ul { list-style: none; }
.op-facts li { padding: 0.85rem 0; border-top: 1px dashed var(--hair); font-size: 0.88rem; color: var(--ink-dim); }
.op-facts li span {
  display: block; font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--ink-faint); margin-bottom: 0.25rem;
}

/* faq — two columns on wide screens so the right half isn't dead space */
.faq-list { max-width: 50rem; border-top: 1px solid var(--hair); }
@media (min-width: 1200px) {
  #faq {
    display: grid; grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr);
    gap: clamp(2rem, 4vw, 4.5rem); align-items: start;
  }
  #faq .section-head { position: sticky; top: 6.5rem; margin-bottom: 0; }
  #faq .faq-list { max-width: 64rem; }
}
details { border-bottom: 1px solid var(--hair); }
summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  font-family: var(--sans); font-weight: 550; letter-spacing: -0.02em; font-size: clamp(1.05rem, 1.8vw, 1.3rem);
  padding: 1.5rem 0.2rem; transition: color 0.3s, padding-left 0.3s var(--ease);
}
summary::-webkit-details-marker { display: none; }
summary:hover { color: var(--ink-dim); padding-left: 0.6rem; }
.plus { position: relative; width: 15px; height: 15px; flex: none; }
.plus::before, .plus::after {
  content: ""; position: absolute; background: var(--ink); inset: 0; margin: auto;
  transition: transform 0.35s var(--ease);
}
.plus::before { width: 100%; height: 1.5px; }
.plus::after  { width: 1.5px; height: 100%; }
details[open] .plus::after { transform: rotate(90deg); }
details p { padding: 0 0.2rem 1.6rem; color: var(--ink-dim); max-width: 42rem; font-size: 0.96rem; }

/* ---------- showcase: GUI agent ---------- */
.showcase-grid { display: grid; grid-template-columns: minmax(0, 1fr) clamp(30rem, 42vw, 42rem); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.showcase-copy p { color: var(--ink-dim); font-size: 1.02rem; margin-bottom: 1.2rem; max-width: 36rem; }
.showcase-copy em { color: var(--ink); font-style: normal; font-weight: 500; }
.showcase-points { list-style: none; margin-top: 1.4rem; border-top: 1px dashed var(--hair); padding-top: 1.2rem; }
.showcase-points li {
  position: relative; padding-left: 1.5rem; margin-bottom: 0.65rem;
  font-family: var(--mono); font-size: 0.76rem; letter-spacing: 0.03em; color: var(--ink-dim);
}
.showcase-points li::before { content: "✓"; position: absolute; left: 0; color: var(--green); }

.agent { filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.09)); }
.agent-tabs { display: flex; gap: 0.5rem; padding: 0 0.4rem 0.6rem; }
.agent-tab {
  font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-faint); background: var(--panel); border: 1px solid var(--hair-soft);
  border-radius: 99px; padding: 0.42rem 0.95rem; cursor: pointer;
  transition: color 0.3s, border-color 0.3s, background 0.3s;
}
.agent-tab:hover { color: var(--ink); border-color: var(--ink); }
.agent-tab.active { color: #ffffff; border-color: var(--ink); background: var(--ink); }

.agent-panel {
  background: #ffffff; color: var(--ink);
  border-radius: 12px; overflow: hidden;
  border: 1px solid var(--hair);
  font-size: 0.95rem;
}
.agent-row { display: flex; align-items: baseline; gap: 0.9rem; padding: 1rem 1.3rem; }
.agent-task { border-bottom: 1px solid var(--hair-soft); align-items: flex-start; }
.agent-label {
  font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--ink-faint); flex: none; padding-top: 0.15rem;
}
.agent-task p { font-weight: 500; line-height: 1.45; min-height: 2.6em; }
.agent-task p::after { content: "▌"; color: var(--ink); animation: blink 1s steps(1) infinite; }
.agent-task p.done::after { content: ""; }

.agent-steps { list-style: none; padding: 0.6rem 1.3rem; min-height: 11.2em; }
.agent-steps li {
  display: flex; align-items: center; gap: 0.7rem; padding: 0.42rem 0;
  color: var(--ink-faint); font-size: 0.88rem; transition: color 0.3s;
}
.agent-steps li .step-ic {
  width: 1.15rem; height: 1.15rem; flex: none; border-radius: 50%;
  border: 1.5px solid #d4d4d4; display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.62rem; color: transparent; transition: all 0.3s;
}
.agent-steps li.active { color: var(--ink); }
.agent-steps li.active .step-ic { border-color: var(--ink); }
.agent-steps li.active .step-ic::before {
  content: ""; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--ink);
  animation: pulse 0.9s ease-in-out infinite;
}
@keyframes pulse { 50% { transform: scale(0.55); opacity: 0.6; } }
.agent-steps li.done { color: var(--ink-dim); }
.agent-steps li.done .step-ic { background: var(--ink); border-color: var(--ink); color: #ffffff; }
.agent-steps li.done .step-ic::before { content: "✓"; animation: none; width: auto; height: auto; background: none; }

.agent-progress { height: 3px; background: rgba(23, 23, 23, 0.08); margin: 0 1.3rem; border-radius: 99px; overflow: hidden; }
.agent-progress span { display: block; height: 100%; width: 0; background: var(--ink); border-radius: 99px; transition: width 0.6s var(--ease); }

.agent-result { padding: 1rem 1.3rem 0.4rem; opacity: 0; transform: translateY(6px); transition: opacity 0.5s, transform 0.5s var(--ease); }
.agent-result.show { opacity: 1; transform: none; }
.agent-result-title { font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--green); margin-bottom: 0.5rem; }
.agent-result ul { list-style: none; }
.agent-result li { position: relative; padding-left: 1.2rem; margin-bottom: 0.3rem; font-size: 0.86rem; color: var(--ink-dim); }
.agent-result li::before { content: "→"; position: absolute; left: 0; color: var(--ink); }
.agent-result-foot { margin-top: 0.7rem; padding: 0.55rem 0.8rem; background: var(--bg-2); border-radius: 6px; font-size: 0.8rem; font-weight: 500; color: var(--ink); min-height: 1.2em; }

.agent-meta {
  border-top: 1px solid var(--hair-soft); margin-top: 0.9rem;
  padding: 0.75rem 1.3rem; font-family: var(--mono); font-size: 0.66rem;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-faint);
  display: flex; align-items: center; gap: 1rem;
}
.agent-status { display: inline-flex; align-items: center; gap: 0.45rem; }
.agent-status i { width: 8px; height: 8px; border-radius: 50%; background: #d4d4d4; }
.agent-status.run i { background: var(--ink); animation: pulse 0.9s ease-in-out infinite; }
.agent-status.ok i  { background: var(--green); }
.agent-status b { font-weight: 500; }
.agent-time { font-variant-numeric: tabular-nums; }
.agent-replay { margin-left: auto; color: var(--ink-faint); }

/* ---------- CTA — inverted black band, vercel-style ---------- */
.cta {
  margin-top: clamp(5rem, 11vh, 9rem);
  padding: clamp(5rem, 12vh, 9rem) var(--pad);
  background:
    repeating-linear-gradient(to right, rgba(255, 255, 255, 0.06) 0 1px, transparent 1px calc(100% / 6)),
    #0a0a0a;
  color: #fafafa;
  border-top: 1px solid var(--hair-soft);
}
.cta-inner { max-width: 44rem; margin: 0 auto; text-align: center; }
.cta-inner .index { justify-content: center; color: #8f8f8f; }
.cta-inner .index::after { display: none; }
.cta-inner h2 { color: #ffffff; }
.cta-inner h2 em { color: #8f8f8f; }
.cta-inner p { color: #a3a3a3; margin: 1.4rem auto 2.4rem; max-width: 34rem; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; justify-content: center; }
.cta .btn-solid { background: #ffffff; color: #0a0a0a; }
.cta .btn-solid:hover { background: #d4d4d4; }
.cta .btn-ghost { background: transparent; border-color: rgba(255, 255, 255, 0.24); color: #ffffff; }
.cta .btn-ghost:hover { border-color: #ffffff; }
.cta-inner .cta-note {
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.16em;
  text-transform: uppercase; color: #737373;
  max-width: none; margin: 1.8rem auto 0;
}

/* ---------- footer ---------- */
.footer {
  max-width: var(--max); margin: 0 auto; padding: 3.5rem var(--pad) 2.5rem;
  display: flex; flex-wrap: wrap; align-items: center; gap: 1.5rem 2.5rem;
}
.foot-brand { display: flex; align-items: center; gap: 0.8rem; margin-right: auto; }
.foot-brand .brand-mark { width: 24px; height: 24px; }
.foot-brand p { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.1em; color: var(--ink-faint); text-transform: uppercase; }
.foot-links { display: flex; gap: 1.4rem; }
.foot-links a { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-dim); transition: color 0.3s; }
.foot-links a:hover { color: var(--ink); }
.foot-line { width: 100%; border-top: 1px solid var(--hair-soft); padding-top: 1.4rem; font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.12em; color: var(--ink-faint); }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .ticker-track, .scroll-hint span, .term-body .cursor { animation: none !important; }
}

/* ---------- responsive ---------- */
@media (max-width: 1020px) {
  .hero-inner { grid-template-columns: 1fr; gap: 3rem; }
  .hero-term { max-width: 36rem; }
  .op-grid { grid-template-columns: 1fr; }
  .op-facts { position: static; }
  .showcase-grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .nav { background: rgba(250, 250, 250, 0.97); backdrop-filter: none; -webkit-backdrop-filter: none; }
  .hero-stats { grid-template-columns: 1fr 1fr; width: 100%; }
  .nav-links {
    position: fixed; inset: 0; z-index: -1; flex-direction: column; justify-content: center;
    align-items: center; gap: 2rem; background: rgba(250, 250, 250, 0.97);
    opacity: 0; pointer-events: none; transition: opacity 0.35s;
  }
  .nav-links.open { opacity: 1; pointer-events: auto; }
  .nav-links a { font-size: 1rem; }
  .nav-toggle { display: inline-flex; }
  .btn-nav { display: none; }
  .cards-3 { grid-template-columns: 1fr; }
  .cards-2 { grid-template-columns: 1fr; }
  .fit-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .hero-stats { grid-template-columns: 1fr 1fr; width: 100%; }
  .step { grid-template-columns: 3.2rem 1fr; }
  .hero-cta .btn, .cta-actions .btn { width: 100%; }
}

/* ---------- print ----------
   Already dark-on-white; just hide chrome and force scroll-reveal
   content visible (it would otherwise print blank). */
@media print {
  .progress, .rail, .nav, .ticker, .scroll-hint, #mesh, .hero-term, .agent { display: none !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
  .hero { min-height: 0; padding-top: 2rem; }
  .band-paper { border-block: 1px solid var(--hair); }
  .cta { background: #ffffff; color: #171717; }
  .cta-inner h2, .cta-inner h2 em { color: #171717; }
  .cta-inner p { color: #525252; }
}
