/* ================================================================
   Agentic Anatta — agenticanatta.com
   Vision dark theme: near-black + Vision red
   ================================================================ */

:root {
  --bg: #0a0a0a;
  --panel: #0f0f0f;
  --bubble: #161616;
  --card: #101010;
  --border: #272727;
  --fg: #fafafa;
  --muted: #9a9a9a;
  --red: #e8413f;
  --red-deep: #cc1e1e;
  --gold: #f5b53f;
  --blue: #6ea8ff;
  --orange: #fb8b3c;
  --violet: #c084fc;
  --green: #4ade80;
  --navy: #1a3a6b;
  --mono: "JetBrains Mono", monospace;
  --sans: "Inter", system-ui, -apple-system, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; overflow-x: clip; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--red); color: #fff; }
a { color: inherit; }
h1, h2, h3 { letter-spacing: -0.035em; }
.red { color: var(--red); }
.ok { color: var(--green); }

/* ---------- nav ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 60;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 48px;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  transition: opacity 0.6s ease;
}
body.intro .nav { opacity: 0.22; pointer-events: none; }

.logo { display: flex; gap: 12px; align-items: center; font-weight: 800; font-size: 17px; text-decoration: none; letter-spacing: -0.02em; }
.logo svg { width: 30px; height: 30px; }
.logo b { color: var(--red); }

.navlinks { display: flex; gap: 30px; align-items: center; font-size: 14px; font-weight: 500; }
.navlinks a { color: var(--muted); text-decoration: none; transition: color 0.2s; }
.navlinks a:hover { color: var(--fg); }
.navlinks .cta {
  color: #fff;
  background: var(--red);
  padding: 9px 18px;
  border-radius: 8px;
  font-weight: 600;
  transition: transform 0.15s, box-shadow 0.2s;
}
.navlinks .cta:hover { transform: translateY(-1px); box-shadow: 0 8px 26px rgba(232, 65, 63, 0.4); }

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  font-size: 15px;
  font-weight: 600;
  padding: 14px 27px;
  border-radius: 10px;
  text-decoration: none;
  transition: transform 0.16s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.2s;
}
.btn:active { transform: scale(0.97); }
.btn.primary { background: var(--red); color: #fff; box-shadow: 0 8px 34px rgba(232, 65, 63, 0.32); }
.btn.primary:hover { transform: translateY(-2px); box-shadow: 0 12px 44px rgba(232, 65, 63, 0.45); }
.btn.ghost { border: 1px solid var(--border); color: var(--fg); background: rgba(255, 255, 255, 0.02); }
.btn.ghost:hover { border-color: #4a4a4a; transform: translateY(-2px); }
.btn.big { font-size: 17px; padding: 17px 36px; }

/* ================================================================
   HERO — two acts
   ================================================================ */
.hero {
  position: relative;
  min-height: 100svh;
  padding: 96px 48px 40px;
  display: flex;
  align-items: center;
  background:
    radial-gradient(1000px 600px at 82% 0%, rgba(232, 65, 63, 0.09), transparent 62%),
    radial-gradient(700px 500px at 8% 100%, rgba(232, 65, 63, 0.05), transparent 60%),
    var(--bg);
}

.hero__grid {
  display: flex;
  gap: 56px;
  align-items: center;
  width: 100%;
  max-width: 1360px;
  margin: 0 auto;
}

/* left copy — hidden during intro */
.hero__copy {
  width: 470px;
  flex-shrink: 0;
  transition: opacity 0.7s ease 0.25s, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.25s;
}
body.intro .hero__copy {
  opacity: 0;
  transform: translateX(-36px);
  width: 0;
  height: 0;
  padding: 0;
  overflow: hidden;
  transition: none;
  pointer-events: none;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.28em;
  color: var(--red);
  margin-bottom: 22px;
  white-space: nowrap;
}

.hero__title { font-size: clamp(2.6rem, 4.8vw, 4.35rem); line-height: 1.02; font-weight: 850; }
.tline { display: block; white-space: nowrap; }

/* typewriter reveal on split */
body:not(.intro) .hero__title .tline {
  overflow: hidden;
  max-width: 0;
  animation: typeline 0.7s steps(14) forwards;
}
body:not(.intro) .hero__title .t2 { animation-delay: 0.75s; }
@keyframes typeline { to { max-width: 100%; } }
body.no-intro .hero__title .tline { animation-duration: 0.001s; }

.hero__sub { margin-top: 24px; font-size: 17px; line-height: 1.7; color: var(--muted); }
.hero__sub b { color: var(--fg); font-weight: 600; }
.hero__ctas { display: flex; gap: 14px; margin-top: 32px; flex-wrap: wrap; }

.replay {
  margin-top: 40px;
  display: inline-flex;
  gap: 10px;
  align-items: center;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.18em;
  color: var(--muted);
  border: 1px solid var(--border);
  background: transparent;
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.replay:hover { border-color: var(--red); color: var(--fg); }
.replay i { color: var(--red); font-style: normal; }

/* ---------- chat panel ---------- */
.chatwrap {
  flex: 1;
  min-width: 0;
  display: flex;
  justify-content: center;
  transition: flex 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.chat {
  position: relative;
  width: 100%;
  max-width: 860px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.75), 0 0 80px rgba(232, 65, 63, 0.09);
  overflow: hidden;
  transition: max-width 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
body:not(.intro) .chat { max-width: 760px; }

.chat-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 20px;
  border-bottom: 1px solid var(--border);
  background: #111;
}
.chan { font-weight: 700; font-size: 15px; white-space: nowrap; }
.chan i { color: var(--red); font-style: normal; }
.sub2 { font-size: 12px; color: var(--muted); }
.members { margin-left: auto; display: flex; }
.mini {
  width: 30px; height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 11px;
  border: 2px solid #000;
  margin-left: -8px;
}
.m-vision { background: #3a1212; color: var(--red); }
.m-jarvis { background: #33270e; color: var(--gold); }
.m-heimdall { background: #101c30; color: var(--blue); }
.m-factory { background: #2f1a0c; color: var(--orange); }
.m-edith { background: #231331; color: var(--violet); }
.m-paul { background: #1c1c1c; color: #fff; }
.live { margin-left: 14px; font-family: var(--mono); font-size: 11px; color: var(--green); white-space: nowrap; }
.live::before { content: "● "; }

.msgs {
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: min(560px, 62svh);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #2c2c2c transparent;
}

.msg { display: flex; gap: 12px; }
.msg.pop { animation: msg-in 0.45s cubic-bezier(0.24, 1.2, 0.4, 1) both; }
@keyframes msg-in {
  from { opacity: 0; transform: translateY(14px) scale(0.97); }
  to { opacity: 1; transform: none; }
}

.av {
  width: 40px; height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 14px;
  position: relative;
}
.av::after {
  content: "";
  position: absolute;
  bottom: 0; right: 0;
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--green);
  border: 2.5px solid var(--panel);
}
.msg.human .av::after { background: var(--red); }

.mbody { min-width: 0; max-width: 640px; overflow-wrap: break-word; }
.meta { display: flex; align-items: baseline; gap: 10px; margin-bottom: 5px; flex-wrap: wrap; }
.mname { font-weight: 700; font-size: 13.5px; }
.mrole { font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; color: var(--muted); }
.mtime { font-size: 11px; color: #565656; }

.bubble {
  background: var(--bubble);
  border: 1px solid #222;
  border-radius: 4px 14px 14px 14px;
  padding: 11px 15px;
  font-size: 13.5px;
  line-height: 1.6;
  color: #e3e3e3;
}
.bubble .hl { color: var(--fg); font-weight: 600; }
.bubble .ok { color: var(--green); font-weight: 600; }
.bubble .warn { color: var(--gold); font-weight: 600; }
.msg.human .bubble { background: rgba(232, 65, 63, 0.09); border-color: rgba(232, 65, 63, 0.4); }

.reacts { display: flex; gap: 6px; margin-top: 7px; }
.react {
  font-size: 11px;
  background: #1a1a1a;
  border: 1px solid #2c2c2c;
  border-radius: 20px;
  padding: 3px 9px;
  color: var(--muted);
  animation: msg-in 0.3s cubic-bezier(0.24, 1.2, 0.4, 1) both;
}
.react b { color: var(--fg); }

/* doc/approval card inside a bubble */
.doc {
  margin-top: 10px;
  border: 1px solid #2e2e2e;
  background: #101010;
  border-radius: 12px;
  padding: 13px 15px;
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  max-width: 460px;
}
.doc .ic {
  width: 38px; height: 38px;
  border-radius: 9px;
  background: rgba(232, 65, 63, 0.12);
  border: 1px solid rgba(232, 65, 63, 0.35);
  display: grid;
  place-items: center;
  font-size: 17px;
  flex-shrink: 0;
}
.doc .dt { font-size: 13px; font-weight: 600; }
.doc .dd { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.doc .go { margin-left: auto; display: flex; gap: 8px; }
.doc .b1 {
  background: var(--red);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 8px;
  border: none;
  cursor: default;
  font-family: var(--sans);
}
.doc .b1.pulsing { animation: approve-pulse 1.1s ease-in-out infinite; }
@keyframes approve-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(232, 65, 63, 0.5); }
  50% { box-shadow: 0 0 0 9px rgba(232, 65, 63, 0); }
}
.doc .b1.clicked { transform: scale(0.93); filter: brightness(1.3); }
.doc .b2 { border: 1px solid #333; color: var(--muted); font-size: 12px; font-weight: 600; padding: 8px 13px; border-radius: 8px; }

/* chips */
.chips { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.chip {
  font-family: var(--mono);
  font-size: 10.5px;
  padding: 5px 11px;
  border-radius: 7px;
  border: 1px solid #2e2e2e;
  color: var(--muted);
  transition: color 0.4s, border-color 0.4s, background 0.4s;
}
.chip.g { color: var(--green); border-color: rgba(74, 222, 128, 0.35); background: rgba(74, 222, 128, 0.06); }
.chip.r { color: var(--red); border-color: rgba(232, 65, 63, 0.35); background: rgba(232, 65, 63, 0.06); }

/* divider + typing */
.divider {
  text-align: center;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.2em;
  color: #4e4e4e;
  position: relative;
  animation: msg-in 0.4s ease both;
}
.divider::before, .divider::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 36%;
  height: 1px;
  background: #1f1f1f;
}
.divider::before { left: 0; }
.divider::after { right: 0; }

.typing { display: flex; align-items: center; gap: 12px; animation: msg-in 0.3s ease both; }
.typing .dots {
  background: var(--bubble);
  border: 1px solid #222;
  border-radius: 4px 14px 14px 14px;
  padding: 13px 17px;
  display: flex;
  gap: 5px;
}
.typing .dots i {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #6a6a6a;
  animation: tdot 1s ease-in-out infinite;
}
.typing .dots i:nth-child(2) { animation-delay: 0.15s; }
.typing .dots i:nth-child(3) { animation-delay: 0.3s; }
@keyframes tdot { 0%, 100% { opacity: 0.35; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-3px); } }
.typing .tlabel { font-size: 11.5px; color: var(--muted); font-family: var(--mono); }

/* ghost cursor */
.ghost-cursor {
  position: absolute;
  z-index: 9;
  left: 0;
  top: 0;
  opacity: 0;
  transition: transform 1.1s cubic-bezier(0.3, 0.9, 0.35, 1), opacity 0.3s;
  pointer-events: none;
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.7));
}
.ghost-cursor.on { opacity: 1; }

/* skip control */
.skip {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.2em;
  color: #575757;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 10px;
  transition: color 0.2s, opacity 0.4s;
  animation: hint-bob 2.6s ease-in-out infinite;
}
.skip b { color: var(--muted); }
.skip:hover { color: var(--muted); }
body:not(.intro) .skip { opacity: 0; pointer-events: none; }
@keyframes hint-bob { 0%, 100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(-4px); } }

/* ================================================================
   SECTIONS
   ================================================================ */
section { padding: 110px 48px; max-width: 1360px; margin: 0 auto; }
.hero { max-width: none; }

.shead { max-width: 620px; margin-bottom: 56px; }
.kicker { font-family: var(--mono); font-size: 12px; letter-spacing: 0.28em; color: var(--red); margin-bottom: 16px; }
.shead h2, .outro h2 { font-size: clamp(2rem, 4.2vw, 3.1rem); line-height: 1.05; font-weight: 850; }
.lede { margin-top: 18px; color: var(--muted); font-size: 16.5px; }
.lede b { color: var(--fg); }
.lede i { color: var(--fg); }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1); }
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- pipeline ---------- */
.pipeline { position: relative; padding-top: 20px; }
.rail { position: absolute; top: 47px; left: 28px; right: 28px; height: 2px; background: #242424; }
.rail-fill { position: absolute; inset: 0 100% 0 0; background: var(--red); transition: inset 3.1s cubic-bezier(0.3, 0.6, 0.3, 1); }
.pipeline.go .rail-fill { inset: 0 0 0 0; }
.pulse {
  position: absolute;
  top: -5px; left: 0;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 18px 4px rgba(232, 65, 63, 0.55);
  opacity: 0;
}
.pipeline.go .pulse { animation: pulse-run 3.1s cubic-bezier(0.3, 0.6, 0.3, 1) forwards; }
@keyframes pulse-run { 0% { left: 0; opacity: 1; } 96% { opacity: 1; } 100% { left: 100%; opacity: 0; } }

.stages { display: flex; justify-content: space-between; list-style: none; gap: 6px; position: relative; }
.stage { width: 120px; text-align: center; opacity: 0.35; transition: opacity 0.5s ease; }
.pipeline.go .stage { opacity: 1; }
.pipeline.go .stage:nth-child(1) { transition-delay: 0.1s; }
.pipeline.go .stage:nth-child(2) { transition-delay: 0.4s; }
.pipeline.go .stage:nth-child(3) { transition-delay: 0.7s; }
.pipeline.go .stage:nth-child(4) { transition-delay: 1.0s; }
.pipeline.go .stage:nth-child(5) { transition-delay: 1.3s; }
.pipeline.go .stage:nth-child(6) { transition-delay: 1.6s; }
.pipeline.go .stage:nth-child(7) { transition-delay: 1.9s; }
.pipeline.go .stage:nth-child(8) { transition-delay: 2.2s; }
.pipeline.go .stage:nth-child(9) { transition-delay: 2.5s; }
.pipeline.go .stage:nth-child(10) { transition-delay: 2.8s; }

.node {
  position: relative;
  width: 54px; height: 54px;
  margin: 0 auto;
  border-radius: 50%;
  border: 2px solid #2c2c2c;
  background: var(--card);
  display: grid;
  place-items: center;
  color: var(--muted);
  transition: border-color 0.5s, color 0.5s, box-shadow 0.5s;
}
.node svg {
  width: 21px; height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.node .n {
  position: absolute;
  top: -7px; right: -9px;
  font-style: normal;
  font-family: var(--mono);
  font-size: 9.5px;
  color: #6e6e6e;
  background: var(--bg);
  border: 1px solid #262626;
  border-radius: 6px;
  padding: 1px 4px;
  transition: color 0.5s, border-color 0.5s;
}
.pipeline.go .node .n { color: var(--red); border-color: rgba(232, 65, 63, 0.4); }
.pipeline.go .node { border-color: var(--red); color: #fff; }
.pipeline.go .stage:nth-child(1) .node { transition-delay: 0.1s; }
.pipeline.go .stage:nth-child(2) .node { transition-delay: 0.4s; }
.pipeline.go .stage:nth-child(3) .node { transition-delay: 0.7s; }
.pipeline.go .stage:nth-child(4) .node { transition-delay: 1.0s; }
.pipeline.go .stage:nth-child(5) .node { transition-delay: 1.3s; }
.pipeline.go .stage:nth-child(6) .node { transition-delay: 1.6s; }
.pipeline.go .stage:nth-child(7) .node { transition-delay: 1.9s; }
.pipeline.go .stage:nth-child(8) .node { transition-delay: 2.2s; }
.pipeline.go .stage:nth-child(9) .node { transition-delay: 2.5s; }
.pipeline.go .stage:nth-child(10) .node { transition-delay: 2.8s; }

.stage h3 { margin-top: 13px; font-size: 14.5px; font-weight: 700; }
.stage p { margin-top: 4px; font-size: 11px; color: var(--muted); font-family: var(--mono); line-height: 1.5; }

/* ---------- command / approvals ---------- */
.command__grid { display: flex; gap: 70px; align-items: center; flex-wrap: wrap; }
.command .shead { flex: 1; min-width: 320px; margin-bottom: 0; }
.ticks { list-style: none; margin-top: 26px; }
.ticks li { padding: 10px 0 10px 30px; position: relative; color: var(--muted); font-size: 15px; }
.ticks li::before { content: "✓"; position: absolute; left: 0; color: var(--red); font-weight: 800; }

.queue { position: relative; width: 460px; height: 320px; flex-shrink: 0; }
.qcard {
  position: absolute;
  background: #121212;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 20px;
  width: 400px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
}
.qtag { font-family: var(--mono); font-size: 10px; letter-spacing: 0.16em; color: var(--gold); }
.qcard h4 { font-size: 15px; margin-top: 7px; font-weight: 650; }
.qcard p { font-size: 12px; color: var(--muted); margin-top: 4px; }
.qrow { display: flex; gap: 8px; margin-top: 14px; }
.qok { background: var(--red); color: #fff; font-size: 12px; font-weight: 700; padding: 8px 18px; border-radius: 8px; animation: approve-pulse 1.6s ease-in-out infinite; }
.qno { border: 1px solid #333; color: var(--muted); font-size: 12px; font-weight: 600; padding: 8px 14px; border-radius: 8px; }
.q1 { top: 0; left: 0; z-index: 3; }
.q2 { top: 178px; left: 28px; z-index: 2; opacity: 0.6; transform: scale(0.96); }
.q3 { top: 252px; left: 56px; z-index: 1; opacity: 0.3; transform: scale(0.92); }

/* ---------- watch: health report with receipts ---------- */
.health {
  border: 1px solid var(--border);
  border-radius: 20px;
  background: linear-gradient(180deg, #111, #0c0c0c);
  padding: 30px 34px;
  max-width: 980px;
}
.health__top { display: flex; gap: 40px; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; }
.health__intro { flex: 1; min-width: 300px; }
.health h4 { font-size: 16px; font-weight: 700; }
.upd { font-family: var(--mono); font-size: 10.5px; color: #5a5a5a; margin-left: 10px; letter-spacing: 0.06em; }
.health__summary { margin-top: 10px; color: var(--muted); font-size: 14.5px; line-height: 1.7; max-width: 520px; }

.dials { display: flex; gap: 34px; flex-shrink: 0; }
.dial { text-align: center; }
.dial__ring { position: relative; width: 86px; height: 86px; margin: 0 auto; }
.dial__ring svg { width: 100%; height: 100%; }
.dial__ring b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
.dbg { fill: none; stroke: #232323; stroke-width: 6; }
.dfg {
  fill: none;
  stroke-width: 6;
  stroke-linecap: round;
  stroke-dasharray: 163.4;
  stroke-dashoffset: 163.4;
  transform: rotate(-90deg);
  transform-origin: center;
  transition: stroke-dashoffset 1.5s cubic-bezier(0.3, 0.7, 0.3, 1) 0.45s;
}
.health.is-in .dfg { stroke-dashoffset: var(--off); }
.dfg.blue { stroke: var(--blue); }
.dfg.amber { stroke: var(--gold); }
.dlabel { margin-top: 10px; font-size: 12.5px; font-weight: 600; line-height: 1.5; }
.dstate { display: block; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.08em; }
.dstate.ok { color: var(--green); }
.dstate.slip { color: var(--gold); }

.why { margin-top: 28px; border-top: 1px solid #1e1e1e; padding-top: 22px; }
.why h5 { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.24em; color: #6a6a6a; }
.why ul { list-style: none; margin-top: 14px; display: flex; flex-direction: column; gap: 11px; }
.why li { display: flex; gap: 12px; align-items: baseline; font-size: 13.5px; color: #cfcfcf; line-height: 1.6; }
.why li i { font-style: normal; flex-shrink: 0; opacity: 0.75; }
.why li em { font-style: normal; font-family: var(--mono); font-size: 10.5px; color: var(--red); white-space: nowrap; }
.why__note { margin-top: 18px; font-family: var(--mono); font-size: 11.5px; color: var(--gold); letter-spacing: 0.04em; }

/* ---------- ask vision: scripted demo panel ---------- */
.ask { padding-top: 0; }
.ask__grid { display: flex; gap: 28px; align-items: flex-start; }
.askdemo {
  flex: 1;
  min-width: 0;
  max-width: 780px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #0e0e0e;
  overflow: hidden;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.7), 0 0 70px rgba(232, 65, 63, 0.07);
}
.ad-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  border-bottom: 1px solid #1e1e1e;
  background: #111;
}
.ad-head svg { width: 22px; height: 22px; }
.ad-head b { font-size: 14.5px; }
.ad-scope {
  font-size: 11.5px;
  color: var(--muted);
  border: 1px solid #2a2a2a;
  background: #161616;
  border-radius: 999px;
  padding: 3px 11px;
}
.ad-winbtns { margin-left: auto; display: flex; gap: 14px; color: #5c5c5c; font-size: 13px; }
.ad-winbtns i { font-style: normal; }
.ad-sub {
  display: flex;
  justify-content: space-between;
  padding: 9px 16px;
  border-bottom: 1px solid #1a1a1a;
  font-size: 11.5px;
  color: #6e6e6e;
}
.ad-new { color: var(--muted); }

.ad-msgs {
  height: min(520px, 56svh);
  overflow-y: auto;
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  scrollbar-width: thin;
  scrollbar-color: #2c2c2c transparent;
}

/* user turn: red bubble, right aligned (matches Vision) */
.ad-user { align-self: flex-end; max-width: 78%; text-align: right; animation: msg-in 0.4s cubic-bezier(0.24, 1.2, 0.4, 1) both; }
.ad-user .bub {
  display: inline-block;
  text-align: left;
  background: var(--red);
  color: #fff;
  font-size: 13.5px;
  line-height: 1.55;
  padding: 10px 14px;
  border-radius: 14px 14px 4px 14px;
}
.ad-user .t { display: block; margin-top: 5px; font-size: 10.5px; color: #5c5c5c; font-family: var(--mono); }

/* vision turn */
.ad-vision { display: flex; gap: 10px; max-width: 92%; animation: msg-in 0.4s cubic-bezier(0.24, 1.2, 0.4, 1) both; }
.ad-vision .vav {
  width: 24px; height: 24px;
  flex-shrink: 0;
  margin-top: 2px;
  border-radius: 7px;
  background: rgba(232, 65, 63, 0.14);
  border: 1px solid rgba(232, 65, 63, 0.4);
  display: grid;
  place-items: center;
}
.ad-vision .vav svg { width: 14px; height: 14px; }
.ad-vision .vbody { min-width: 0; font-size: 13.5px; line-height: 1.65; color: #e0e0e0; overflow-wrap: break-word; }
.ad-vision .vbody p { margin: 0 0 8px; }
.ad-vision .vbody p:last-child { margin-bottom: 0; }
.ad-vision .vbody b { color: #fff; }
.ad-vision .vbody ul { margin: 2px 0 8px; padding-left: 18px; }
.ad-vision .vbody li { margin: 3px 0; }
.ad-vision .vbody li::marker { color: var(--red); }
.adot { display: inline-flex; gap: 4px; padding: 4px 0; }
.adot i { width: 6px; height: 6px; border-radius: 50%; background: #6a6a6a; animation: tdot 1s ease-in-out infinite; }
.adot i:nth-child(2) { animation-delay: 0.15s; }
.adot i:nth-child(3) { animation-delay: 0.3s; }

/* process trace (mirrors Vision's ProcessTrace) */
.ad-trace {
  margin: 4px 0 10px;
  border: 1px solid #262626;
  border-radius: 12px;
  background: #101010;
  font-size: 11.5px;
  overflow: hidden;
}
.ad-trace__head { display: flex; align-items: center; gap: 8px; padding: 8px 11px; color: var(--muted); }
.ad-trace__badge {
  width: 18px; height: 18px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1px solid rgba(232, 65, 63, 0.35);
  background: rgba(232, 65, 63, 0.1);
  color: var(--red);
  display: grid;
  place-items: center;
  font-size: 10px;
}
.ad-trace.done .ad-trace__badge { border-color: rgba(74, 222, 128, 0.35); background: rgba(74, 222, 128, 0.08); color: var(--green); }
.ad-trace__badge .spin { display: inline-block; animation: adspin 1s linear infinite; }
@keyframes adspin { to { transform: rotate(360deg); } }
.ad-trace__title { font-weight: 600; color: #ddd; }
.ad-trace__sum { color: #7c7c7c; }
.ad-trace__steps { border-top: 1px solid #1e1e1e; padding: 8px 11px; display: flex; flex-direction: column; gap: 7px; }
.ad-step { display: flex; gap: 9px; align-items: baseline; animation: msg-in 0.3s ease both; }
.ad-step .k {
  flex-shrink: 0;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.08em;
  color: var(--red);
  width: 52px;
}
.ad-step .k.mem { color: var(--blue); }
.ad-step .k.done { color: var(--green); }
.ad-step .w { color: #c9c9c9; min-width: 0; overflow-wrap: anywhere; }
.ad-step .w code { font-family: var(--mono); font-size: 10.5px; color: var(--muted); }
.ad-step .d { margin-left: auto; flex-shrink: 0; font-family: var(--mono); font-size: 10px; color: #5c5c5c; }
.ad-trace.done .ad-trace__steps { display: none; }

/* draft task rows */
.ad-tasks { margin: 4px 0 8px; border: 1px solid #262626; border-radius: 12px; overflow: hidden; }
.ad-task { display: flex; gap: 10px; align-items: center; padding: 8px 12px; border-bottom: 1px solid #1c1c1c; font-size: 12.5px; }
.ad-task:last-child { border-bottom: none; }
.ad-task .id { font-family: var(--mono); font-size: 10.5px; color: #6e6e6e; flex-shrink: 0; }
.ad-task .nm { color: #ddd; min-width: 0; }
.ad-task .rt { margin-left: auto; flex-shrink: 0; font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.06em; color: var(--orange); }
.ad-task .rt.qa { color: var(--violet); }
.ad-task .rt.ops { color: var(--gold); }
.ad-task.more { justify-content: center; color: #6e6e6e; font-family: var(--mono); font-size: 10.5px; }

/* composer */
.ad-composer {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-top: 1px solid #1e1e1e;
  background: #101010;
}
.ad-attach { color: #5c5c5c; font-size: 14px; }
.ad-input { flex: 1; min-width: 0; font-size: 13.5px; color: var(--fg); display: block; white-space: nowrap; overflow: hidden; }
.ad-ph { font-style: normal; color: #5f5f5f; }
.ad-caret { display: inline-block; vertical-align: middle; width: 2px; height: 16px; background: var(--red); margin-left: 1px; opacity: 0; }
.ad-input.is-typing .ad-caret { opacity: 1; animation: caret-blink 1s steps(1) infinite; }
@keyframes caret-blink { 50% { opacity: 0; } }
.ad-send {
  width: 32px; height: 32px;
  flex-shrink: 0;
  border-radius: 9px;
  background: var(--red);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 13px;
  transition: transform 0.15s, filter 0.15s;
}
.ad-send.fire { transform: scale(0.88); filter: brightness(1.35); }

/* zero state before the session starts */
.ad-zero {
  margin: auto;
  text-align: center;
  color: #5f5f5f;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 30px;
}
.ad-zero svg { width: 34px; height: 34px; opacity: 0.5; }
.ad-zero p { font-size: 13px; max-width: 300px; line-height: 1.6; }

/* side rail: artifacts appear as the session produces them */
.ad-side { width: 330px; flex-shrink: 0; }
.ad-side h5, .ad-more h5 {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.24em;
  color: #6a6a6a;
  margin-bottom: 14px;
}
.ad-art {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  border: 1px dashed #2a2a2a;
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 12px;
  opacity: 0.32;
  filter: grayscale(0.7);
  transform: translateY(0);
  transition: opacity 0.5s ease, filter 0.5s ease, transform 0.5s cubic-bezier(0.24, 1.2, 0.4, 1), border-color 0.5s, background 0.5s;
}
.ad-art.on {
  opacity: 1;
  filter: none;
  border-style: solid;
  border-color: #333;
  background: #101010;
  transform: translateY(-2px);
}
.ad-art .aic { font-size: 17px; flex-shrink: 0; }
.ad-art .atxt { min-width: 0; }
.ad-art b { font-size: 13.5px; display: block; }
.ad-art p { font-size: 11.5px; color: var(--muted); margin-top: 3px; line-height: 1.55; }
.ad-art em {
  margin-left: auto;
  flex-shrink: 0;
  font-style: normal;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  color: var(--muted);
  border: 1px solid #2e2e2e;
  border-radius: 6px;
  padding: 3px 7px;
}
.ad-art.ship.on em { color: var(--green); border-color: rgba(74, 222, 128, 0.4); background: rgba(74, 222, 128, 0.07); }
.ad-art.ship.on { box-shadow: 0 0 34px rgba(74, 222, 128, 0.06); }

.ad-more { margin-top: 26px; }
.ad-more ul { list-style: none; }
.ad-more li {
  font-size: 12.5px;
  color: var(--muted);
  padding: 9px 0 9px 20px;
  position: relative;
  border-bottom: 1px solid #1a1a1a;
  line-height: 1.55;
}
.ad-more li::before { content: "→"; position: absolute; left: 0; color: var(--red); }

.askhints { margin-top: 20px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.2em; color: #5c5c5c; }

/* ---------- outro / footer ---------- */
.outro { text-align: center; }
.outro__inner {
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 80px 32px;
  background:
    radial-gradient(700px 300px at 50% -20%, rgba(232, 65, 63, 0.13), transparent 70%),
    radial-gradient(700px 300px at 50% 130%, rgba(204, 30, 30, 0.10), transparent 70%),
    #0d0d0d;
}
.outro .kicker { letter-spacing: 0.34em; }
.outro p { margin: 18px 0 32px; color: var(--muted); font-size: 17px; }

.footer {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 32px 24px 42px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  font-family: var(--mono);
}
.footer .dim { margin-top: 6px; opacity: 0.55; font-size: 12px; }

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 1080px) {
  .hero__grid { flex-direction: column; align-items: stretch; gap: 36px; }
  .hero { padding: 92px 20px 56px; align-items: flex-start; }
  .hero__copy { width: 100%; order: 0; }
  body.intro .hero__copy { width: 100%; height: 0; transform: translateY(-24px); }
  .chatwrap { order: 1; }
  .chat, body:not(.intro) .chat { max-width: 100%; }
  .msgs { height: min(520px, 58svh); }
  .tline { white-space: normal; }
  section { padding: 84px 20px; }
  .nav { padding: 13px 18px; }
  .navlinks { gap: 16px; font-size: 13px; }
  .navlinks a:not(.cta) { display: none; }
  .stages { flex-direction: column; gap: 26px; }
  .stage { width: 100%; display: flex; text-align: left; gap: 18px; align-items: flex-start; }
  .stage .node { margin: 0; flex-shrink: 0; }
  .stage h3 { margin-top: 4px; }
  .rail { left: 26px; right: auto; top: 20px; bottom: 20px; width: 2px; height: auto; }
  .rail-fill { inset: 0 0 100% 0; transition: inset 3.1s cubic-bezier(0.3, 0.6, 0.3, 1); }
  .pipeline.go .rail-fill { inset: 0; }
  .pulse { display: none; }
  .queue { width: 100%; max-width: 460px; }
  .health { padding: 22px 18px; }
  .health__top { gap: 24px; }
  .dials { gap: 22px; }
  .ask__grid { flex-direction: column; }
  .ad-side { width: 100%; }
  .eyebrow { white-space: normal; letter-spacing: 0.2em; }
  .chat-head, .ad-head { flex-wrap: wrap; }
  .doc .go { margin-left: 0; }
  .qcard { width: min(400px, 88vw); }
  .sub2, .members { display: none; }
}

/* ================================================================
   REDUCED MOTION
   ================================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
  }
  .reveal { opacity: 1; transform: none; }
}
