/* ─────────────────────────────────────────────────────────────
   Computer Agent Labs — landing page
   Palette lifted from the unhinged-code-monkey TUI (dark mode)
   ───────────────────────────────────────────────────────────── */

:root {
  /* surfaces */
  --bg:      #171520;   /* page (bg_ich) */
  --bg-1:    #1c1a26;   /* hairline raise */
  --bg-2:    #26242e;   /* panels (bg_ni) */
  --bg-3:    #3a3843;   /* raised (bg_san) */

  /* text ramp */
  --fg:      #e7e7e9;   /* fg_ich */
  --fg-1:    #c1bfc4;   /* fg_ni  */
  --fg-2:    #a29fa7;   /* fg_san */
  --fg-3:    #78767f;   /* fg_yon */
  --dim:     #656267;   /* dim    */

  /* hues */
  --brand:   #faa72d;   /* sunrise  */
  --pink:    #fa2a62;   /* amaranth */
  --purple:  #9466ff;   /* hexflame */
  --green:   #05d346;   /* malachite */
  --cyan:    #2eb6fa;   /* electric sky */
  --warning: #f96f1f;   /* persimmon */

  --line:    rgba(231, 231, 233, 0.09);
  --line-2:  rgba(231, 231, 233, 0.05);

  --mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --display: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --serif: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --maxw: 1140px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--fg-1);
  font-family: var(--display);
  font-size: 17px;
  line-height: 1.6;
  letter-spacing: -0.01em;
  overflow-x: hidden;
  position: relative;
}

::selection { background: var(--brand); color: #1a1208; }

a { color: inherit; text-decoration: none; }
em { font-style: italic; color: var(--fg); }

/* ── atmosphere ───────────────────────────────────────────────── */
.glow {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(900px 520px at 78% -8%, rgba(250, 167, 45, 0.16), transparent 60%),
    radial-gradient(720px 520px at 8% 0%, rgba(250, 42, 98, 0.10), transparent 55%),
    radial-gradient(1000px 700px at 50% 118%, rgba(148, 102, 255, 0.10), transparent 60%);
}
.grain {
  position: fixed; inset: -50%; z-index: 0; pointer-events: none; opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
/* faint grid behind everything */
body::before {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(var(--line-2) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-2) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(circle at 50% 30%, #000 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(circle at 50% 30%, #000 0%, transparent 75%);
}

main, .nav, .footer { position: relative; z-index: 1; }

/* ── nav ──────────────────────────────────────────────────────── */
.nav {
  display: flex; align-items: center; gap: 24px;
  max-width: var(--maxw); margin: 0 auto;
  padding: 22px 28px;
  font-family: var(--mono);
  font-size: 13px;
}
.nav-brand { display: flex; align-items: center; gap: 11px; font-weight: 500; }
.brand-mark {
  font-family: var(--mono); color: var(--brand);
  font-weight: 700; white-space: pre; letter-spacing: 0;
}
.brand-name { color: var(--fg); letter-spacing: -0.02em; }

/* ── shared layout ────────────────────────────────────────────── */
.section {
  max-width: var(--maxw); margin: 0 auto;
  padding: 110px 28px;
  border-top: 1px solid var(--line-2);
}
.kicker {
  font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--brand); margin-bottom: 28px;
}
.section-title {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(2rem, 4.6vw, 3.4rem); line-height: 1.04;
  letter-spacing: -0.035em; color: var(--fg); max-width: 18ch;
}
.section-title.big { max-width: 24ch; }
.section-title .muted-title { color: var(--fg-3); display: block; }
.lede {
  font-size: clamp(1.05rem, 1.6vw, 1.3rem); line-height: 1.55;
  color: var(--fg-1); max-width: 46ch; letter-spacing: -0.015em;
}
.lede.center { max-width: 60ch; margin: 26px auto 0; text-align: center; }

/* accent helpers */
.hl-brand  { color: var(--brand); }
.hl-pink   { color: var(--pink); }
.hl-purple { color: var(--purple); }
.muted     { color: var(--fg-3); }
.sep       { color: var(--dim); margin: 0 8px; }

/* ── hero ─────────────────────────────────────────────────────── */
.hero {
  max-width: 1010px; margin: 0 auto;
  padding: 76px 28px 100px;
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
}
.eyebrow {
  font-family: var(--mono); font-size: 13px; letter-spacing: 0.04em;
  color: var(--fg-3); margin-bottom: 26px;
  display: flex; align-items: center; justify-content: center;
}
.eyebrow .sep { margin: 0 10px; }
.hero-title {
  font-family: var(--display); font-weight: 800;
  font-size: clamp(2.2rem, 6vw, 3.7rem); line-height: 1.02;
  letter-spacing: -0.045em; color: var(--fg);
}
.hero-sub {
  margin: 28px auto 0; max-width: 52ch;
  font-size: clamp(1.05rem, 1.5vw, 1.22rem); line-height: 1.55;
  color: var(--fg-2); letter-spacing: -0.012em;
}
/* ── terminal component ───────────────────────────────────────── */
.term {
  background: linear-gradient(180deg, #1b1925, #161420);
  border: 1px solid var(--line);
  border-radius: 13px;
  overflow: hidden;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.04) inset,
    0 40px 90px -40px rgba(0,0,0,0.8),
    0 0 0 1px rgba(0,0,0,0.3);
  font-family: var(--mono);
}
.term-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 15px; border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,0.015);
}
.tdot { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.tdot-a { background: var(--brand); }
.tdot-b { background: var(--pink); }
.tdot-c { background: var(--purple); }
.term-title {
  margin-left: 8px; font-size: 12px; color: var(--fg-3); letter-spacing: 0.02em;
}
.term-body {
  padding: 22px 22px 24px; font-size: 13.5px; line-height: 1.85;
  color: var(--fg-1);
}
.hero-term {
  width: 100%; max-width: 780px; margin-top: 52px;
  text-align: left;
}

.tl { white-space: pre-wrap; word-break: break-word; }
.tl.gap { margin-top: 14px; }
.tl.out { color: var(--fg-2); }
.prompt { color: var(--brand); font-weight: 700; margin-right: 8px; }
.cmd { color: var(--fg); }
.ok { color: var(--green); margin-right: 8px; }
.run { color: var(--purple); margin-right: 8px; }
.who {
  color: var(--purple); font-weight: 700; margin-right: 6px;
}
.arrow { color: var(--fg-3); margin-right: 8px; }
.tl.comment { color: var(--dim); }

/* blinking caret */
.caret {
  color: var(--brand); margin-left: 2px;
  animation: blink 1.05s steps(1) infinite;
}
@keyframes blink { 0%,50% { opacity: 1; } 50.01%,100% { opacity: 0; } }

/* ── marquee strip ────────────────────────────────────────────── */
.strip {
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,0.015);
  overflow: hidden; padding: 14px 0;
}
.strip-track {
  display: flex; align-items: center; gap: 38px; width: max-content;
  font-family: var(--mono); font-size: 13px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--fg-3); white-space: nowrap;
  animation: scroll-strip 30s linear infinite;
}
.strip-dot { color: var(--brand); letter-spacing: 0; }
@keyframes scroll-strip { to { transform: translateX(-50%); } }

/* ── thesis ───────────────────────────────────────────────────── */
.thesis-grid {
  margin-top: 48px; display: grid; grid-template-columns: 1fr 1fr;
  gap: 48px; align-items: start;
}
.compare {
  border: 1px solid var(--line); border-radius: 13px;
  background: rgba(255,255,255,0.02); padding: 26px;
}
.compare-row {
  display: grid; grid-template-columns: 1fr auto 1fr; gap: 18px; align-items: stretch;
}
.compare-col { padding: 18px; border-radius: 10px; border: 1px solid var(--line-2); }
.compare-col.bad  { background: rgba(250, 42, 98, 0.06); }
.compare-col.good { background: rgba(5, 211, 70, 0.06); }
.compare-label {
  font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.05em;
  display: block; margin-bottom: 10px;
}
.compare-col.bad  .compare-label { color: var(--pink); }
.compare-col.good .compare-label { color: var(--green); }
.compare-col p { font-size: 14px; color: var(--fg-2); line-height: 1.5; }
.compare-arrow {
  align-self: center; font-family: var(--mono); color: var(--fg-3); font-size: 20px;
}
.compare-foot {
  margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line-2);
  font-family: var(--mono); font-size: 14px; color: var(--fg-1);
}

/* ── how it works ─────────────────────────────────────────────── */
.steps {
  margin-top: 52px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
.step {
  padding: 30px 26px 26px; border: 1px solid var(--line); border-radius: 13px;
  background: linear-gradient(180deg, rgba(255,255,255,0.025), rgba(255,255,255,0));
  position: relative; transition: border-color 0.3s var(--ease), transform 0.3s var(--ease);
}
.step:hover { border-color: rgba(250,167,45,0.4); transform: translateY(-3px); }
.step-num {
  font-family: var(--mono); font-size: 12px; color: var(--brand);
  letter-spacing: 0.1em;
}
.step h3 {
  font-family: var(--display); font-weight: 700; font-size: 1.45rem;
  letter-spacing: -0.03em; color: var(--fg); margin: 14px 0 10px;
}
.step p { font-size: 14.5px; color: var(--fg-2); line-height: 1.5; }
.step-code {
  display: block; margin-top: 18px; font-family: var(--mono); font-size: 12.5px;
  color: var(--fg-1); padding: 10px 12px; border-radius: 8px;
  background: var(--bg); border: 1px solid var(--line-2);
}

/* ── harness / proof ──────────────────────────────────────────── */
.harness { text-align: center; }
.harness .section-title { margin: 0 auto; }
.stats {
  margin: 56px auto 0; max-width: 920px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--line); border: 1px solid var(--line); border-radius: 13px;
  overflow: hidden;
}
.stat {
  background: var(--bg); padding: 30px 18px;
  display: flex; flex-direction: column; gap: 10px; align-items: center;
}
.stat-num {
  font-family: var(--display); font-weight: 700; font-size: clamp(1.8rem, 3vw, 2.6rem);
  letter-spacing: -0.04em; color: var(--fg); line-height: 1;
}
.stat-label {
  font-family: var(--mono); font-size: 11.5px; color: var(--fg-3);
  line-height: 1.4; letter-spacing: 0.01em;
}

.monkey-term { max-width: 720px; margin: 56px auto 0; text-align: left; }
.monkey-body { padding: 20px 20px 16px; }
.splash {
  font-family: var(--mono); font-size: 13px; line-height: 1.65; white-space: pre;
  overflow-x: auto;
}
.splash .brand { color: var(--brand); }
.splash .brand.b { font-weight: 700; }
.splash .dimc { color: var(--dim); }
.splash .pinkc { color: var(--pink); }
.monkey-input {
  display: flex; align-items: center; gap: 9px; margin-top: 16px;
  padding: 12px 14px; border: 1px solid var(--pink); border-radius: 9px;
  background: rgba(250,42,98,0.04);
}
.monkey-input .placeholder { color: var(--fg-3); font-style: italic; font-size: 13.5px; }
.monkey-input .prompt { margin-right: 0; }
.monkey-status {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 14px; font-size: 12.5px; color: var(--fg-2); flex-wrap: wrap; gap: 8px;
}
.status-left { display: inline-flex; align-items: center; gap: 8px; }
.status-mode { color: var(--fg); font-weight: 500; }
.status-sep { color: var(--dim); }
.pinkc { color: var(--pink); }
.dimc { color: var(--dim); }
.status-right { color: var(--fg-3); }
.harness-note {
  margin: 38px auto 0; max-width: 50ch; color: var(--fg-2);
  font-size: 1.05rem;
}

/* ── vision ───────────────────────────────────────────────────── */
.vision .section-title.big { font-size: clamp(2.1rem, 5vw, 3.8rem); }
.vision-grid {
  margin-top: 44px; display: grid; grid-template-columns: 1fr 1fr; gap: 44px;
}
.bignum {
  margin-top: 64px; display: flex; align-items: center; justify-content: center;
  gap: 30px; flex-wrap: wrap;
  padding: 40px 28px; border: 1px solid var(--line); border-radius: 16px;
  background: linear-gradient(180deg, rgba(250,167,45,0.04), rgba(255,255,255,0));
}
.bignum-row { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.bignum-val {
  font-family: var(--display); font-weight: 800; font-size: clamp(2.2rem, 5vw, 3.6rem);
  letter-spacing: -0.045em; color: var(--fg); line-height: 1;
}
.bignum-key { font-family: var(--mono); font-size: 12px; color: var(--fg-3); letter-spacing: 0.04em; }
.bignum-x { font-family: var(--display); font-size: 2rem; color: var(--fg-3); font-weight: 400; }

/* ── founders ─────────────────────────────────────────────────── */
.founders { text-align: center; }
.pullquote {
  font-family: var(--serif); font-style: italic;
  font-size: clamp(2.1rem, 5.5vw, 4rem); line-height: 1.08;
  letter-spacing: -0.01em; color: var(--fg); margin: 8px auto 0; max-width: 16ch;
}
.founder-row {
  margin: 56px auto 0; display: flex; gap: 56px; justify-content: center;
}
.founder { display: flex; flex-direction: column; gap: 4px; }
.founder-name {
  font-family: var(--display); font-weight: 700; font-size: 1.6rem;
  letter-spacing: -0.03em; color: var(--fg);
}
.founder-role { font-family: var(--mono); font-size: 12px; color: var(--brand); letter-spacing: 0.06em; }
.founder-bio {
  margin: 40px auto 0; max-width: 56ch; color: var(--fg-2);
  font-size: 1.08rem; line-height: 1.6;
}

/* ── footer ───────────────────────────────────────────────────── */
.footer {
  max-width: var(--maxw); margin: 0 auto; padding: 70px 28px 90px;
  border-top: 1px solid var(--line);
}
.footer-line {
  font-family: var(--mono); font-size: clamp(1.1rem, 2.4vw, 1.7rem);
  color: var(--fg); display: flex; align-items: center; gap: 12px;
  letter-spacing: -0.01em;
}
.footer-line .prompt { font-size: 1em; }
.footer-meta {
  margin-top: 28px; font-family: var(--mono); font-size: 12.5px;
  color: var(--fg-3); display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.footer-meta .brand-mark { color: var(--brand); }
.footer-meta .sep { margin: 0 2px; }

/* ── buttons ──────────────────────────────────────────────────── */
.btn-primary {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--mono); font-size: 14px; font-weight: 500;
  padding: 13px 22px; border-radius: 9px;
  background: var(--brand); color: #1a1208; border: 1px solid var(--brand);
  box-shadow: 0 10px 34px -12px rgba(250, 167, 45, 0.55);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), filter 0.2s var(--ease);
}
.btn-primary:hover {
  transform: translateY(-2px); filter: brightness(1.04);
  box-shadow: 0 16px 44px -12px rgba(250, 167, 45, 0.7);
}
.hero-cta-row { margin-top: 32px; }

.nav-cta {
  margin-left: auto;
  font-family: var(--mono); font-size: 12.5px; font-weight: 500;
  padding: 8px 14px; border-radius: 8px;
  background: var(--brand); color: #1a1208; border: 1px solid var(--brand);
  transition: transform 0.2s var(--ease), filter 0.2s var(--ease);
  white-space: nowrap;
}
.nav-cta:hover { transform: translateY(-1px); filter: brightness(1.05); }

/* ── early access ─────────────────────────────────────────────── */
.access-card {
  max-width: 760px; margin: 0 auto; text-align: center;
  border: 1px solid var(--line); border-radius: 18px;
  padding: 60px 44px;
  background:
    radial-gradient(130% 150% at 50% -25%, rgba(250, 167, 45, 0.12), transparent 58%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.028), rgba(255, 255, 255, 0));
  box-shadow: 0 50px 110px -50px rgba(0, 0, 0, 0.8);
}
.access-card .kicker { margin-bottom: 22px; }
.access-title {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(1.9rem, 4vw, 2.9rem); line-height: 1.04;
  letter-spacing: -0.035em; color: var(--fg); margin-bottom: 16px;
}
.access-sub {
  color: var(--fg-2); max-width: 50ch; margin: 0 auto 32px;
  font-size: 1.05rem; line-height: 1.55;
}
.access-form {
  display: flex; align-items: center; gap: 10px;
  max-width: 520px; margin: 0 auto;
  background: var(--bg); border: 1px solid var(--line);
  border-radius: 12px; padding: 8px 8px 8px 16px;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.access-form:focus-within {
  border-color: var(--brand); box-shadow: 0 0 0 3px rgba(250, 167, 45, 0.15);
}
.access-form.done { border-color: var(--green); box-shadow: 0 0 0 3px rgba(5, 211, 70, 0.14); }
.access-form .prompt { font-size: 17px; margin-right: 0; }
.access-input {
  flex: 1; min-width: 0; background: transparent; border: none; outline: none;
  font-family: var(--mono); font-size: 14px; color: var(--fg); letter-spacing: -0.01em;
}
.access-input::placeholder { color: var(--fg-3); }
.access-input:disabled { color: var(--fg-2); }
.access-btn {
  font-family: var(--mono); font-size: 13.5px; font-weight: 500;
  padding: 11px 18px; border-radius: 8px; cursor: pointer; white-space: nowrap;
  background: var(--brand); color: #1a1208; border: 1px solid var(--brand);
  transition: transform 0.2s var(--ease), filter 0.2s var(--ease);
}
.access-btn:hover { transform: translateY(-1px); filter: brightness(1.06); }
.access-btn:disabled { cursor: default; background: var(--green); border-color: var(--green); transform: none; }
.access-note {
  margin-top: 18px; font-family: var(--mono); font-size: 12.5px;
  color: var(--fg-3); letter-spacing: 0.01em;
}
.access-note.ok { color: var(--green); }
.access-note.err { color: var(--pink); }

/* ── modal ────────────────────────────────────────────────────── */
.modal {
  position: fixed; inset: 0; z-index: 200;
  display: none; align-items: center; justify-content: center;
  padding: 24px;
}
.modal.open,
.modal:target { display: flex; }
body.modal-open { overflow: hidden; }
.modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(9, 8, 13, 0.74);
  backdrop-filter: blur(7px); -webkit-backdrop-filter: blur(7px);
  animation: modal-fade 0.25s var(--ease);
}
.modal-card {
  position: relative; z-index: 1;
  width: 100%; max-width: 500px; text-align: center;
  padding: 48px 40px 40px;
  border: 1px solid var(--line); border-radius: 18px;
  background:
    radial-gradient(130% 150% at 50% -25%, rgba(250, 167, 45, 0.12), transparent 58%),
    linear-gradient(180deg, #201e2b, #18161f);
  box-shadow: 0 40px 120px -30px rgba(0, 0, 0, 0.85);
  animation: modal-pop 0.3s var(--ease);
}
.modal-close {
  position: absolute; top: 12px; right: 18px;
  font-family: var(--mono); font-size: 22px; line-height: 1;
  color: var(--fg-3); transition: color 0.2s var(--ease);
}
.modal-close:hover { color: var(--fg); }
.modal-title {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(1.5rem, 4vw, 2rem); line-height: 1.08;
  letter-spacing: -0.03em; color: var(--brand); margin-bottom: 14px;
}
.modal-sub {
  color: var(--fg-2); font-size: 0.98rem; line-height: 1.5;
  max-width: 40ch; margin: 0 auto 26px;
}
@keyframes modal-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes modal-pop {
  from { opacity: 0; transform: translateY(14px) scale(0.985); }
  to   { opacity: 1; transform: none; }
}

/* ── reveal animation ─────────────────────────────────────────── */
.reveal {
  opacity: 0; transform: translateY(22px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal[data-delay="1"] { transition-delay: 0.1s; }
.reveal[data-delay="2"] { transition-delay: 0.2s; }
.reveal.in { opacity: 1; transform: none; }

/* ── responsive ───────────────────────────────────────────────── */
@media (max-width: 920px) {
  .hero { padding-bottom: 64px; }
  .hero-term { margin-top: 40px; }
  .thesis-grid, .vision-grid { grid-template-columns: 1fr; gap: 32px; }
  .steps { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 540px) {
  body { font-size: 16px; }
  .section { padding: 76px 20px; }
  .hero { padding: 40px 20px 56px; }
  .nav { padding: 16px 18px; gap: 14px; }
  .access-card { padding: 44px 24px; }
  .access-form { flex-wrap: wrap; padding: 12px; }
  .access-input { flex: 1 1 auto; padding: 4px 0; }
  .access-btn { flex: 1 1 100%; padding: 13px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .compare-row { grid-template-columns: 1fr; }
  .compare-arrow { transform: rotate(90deg); justify-self: center; }
  .founder-row { gap: 32px; }
  .bignum { gap: 16px; padding: 28px 18px; }
  .splash { font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .caret { opacity: 1; }
}
