/* chatspaces — Terminal Elegance */

:root {
  --bg: #0a0a0a;
  --surface: #111111;
  --surface-2: #1a1a1a;
  --border: #222222;
  --border-2: #2a2a2a;

  --text: #f8f8f8;
  --text-muted: #aaaaaa;
  --text-subtle: #666666;

  --primary: #10f0a0;
  --primary-hover: #00e08a;
  --primary-glow: 0 0 25px -5px rgb(16 240 160 / 0.7);
  --primary-glow-soft: 0 0 60px -10px rgb(16 240 160 / 0.35);

  --cyan: #22d3ee;
  --indigo: #6366f1;
  --amber: #fbbf24;
  --error: #f87171;

  /* per-agent brand cues — matched to the mobile app theme */
  --claude: #cc6b43;
  --codex: #6d5df6;

  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;

  --ease: cubic-bezier(0.23, 1, 0.32, 1);
  --r-card: 12px;
  --r-btn: 6px;

  --container: 1280px;
  --pad-x: 2rem;
}

@media (min-width: 960px) {
  :root { --pad-x: 5rem; }
}

* {
  box-sizing: border-box;
}

html { color-scheme: dark; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  max-width: 100%;
}

img, svg, video, canvas, table, pre { max-width: 100%; }

body {
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(16, 240, 160, 0.07), transparent 60%),
    radial-gradient(900px 500px at -10% 30%, rgba(34, 211, 238, 0.045), transparent 60%),
    var(--bg);
}

::selection {
  background: rgba(16, 240, 160, 0.25);
  color: var(--text);
}

a {
  color: var(--text);
  text-decoration: none;
  transition: color 160ms var(--ease);
}

a:hover { color: var(--primary); }

a.link {
  color: var(--primary);
  border-bottom: 1px dashed rgba(16, 240, 160, 0.35);
}
a.link:hover { border-bottom-color: var(--primary); }

code, .mono {
  font-family: var(--font-mono);
  background: #121212;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 0.92em;
  color: var(--text);
}

h1, h2, h3, h4 {
  font-family: var(--font-mono);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin: 0 0 0.5rem;
  color: var(--text);
}

p { margin: 0 0 1rem; max-width: 65ch; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: -1000px; top: 0; padding: 12px 16px;
  background: var(--primary); color: #000;
  font-family: var(--font-mono); font-weight: 600;
  z-index: 100;
}
.skip:focus { left: 12px; top: 12px; outline: none; }

/* -------- nav -------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 64px;
  background: rgba(17, 17, 17, 0.78);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--pad-x);
  height: 100%;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text);
  letter-spacing: -0.01em;
}
.logo:hover { color: var(--text); }
.logo-name { color: var(--text); }

/* terminal mark + gentle AI glimmer */
.logo-mark { width: 22px; height: 22px; flex: 0 0 auto; color: var(--primary); }
.logo-spark { fill: #aff5de; transform-box: fill-box; transform-origin: center; }
.logo-spark-1 { animation: glimmer 5s ease-in-out infinite; }
.logo-spark-2 { animation: glimmer 5s ease-in-out 0.45s infinite; }
@keyframes glimmer {
  0%, 60%, 100% { opacity: 0.5; transform: scale(0.8); }
  74% { opacity: 1; transform: scale(1.15); }
  88% { opacity: 0.7; transform: scale(0.95); }
}

.cursor {
  display: inline-block;
  margin-left: 2px;
  color: var(--primary);
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

.nav-links {
  display: none;
  margin-left: auto;
  gap: 1.75rem;
  font-family: var(--font-mono);
  font-size: 0.92rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.nav-links a {
  color: var(--text-muted);
}
.nav-links a:hover { color: var(--text); }

.nav-cta {
  margin-left: auto;
}

@media (min-width: 760px) {
  .nav-links { display: inline-flex; }
  .nav-cta { margin-left: 0; }
}

/* -------- buttons -------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  height: 48px;
  padding: 0 1.1rem;
  border-radius: var(--r-btn);
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  user-select: none;
  border: 1px solid transparent;
  transition: transform 220ms var(--ease), box-shadow 220ms var(--ease), background 160ms var(--ease), color 160ms var(--ease), border-color 160ms var(--ease);
  white-space: nowrap;
}

.btn-lg { height: 56px; padding: 0 1.4rem; font-size: 0.95rem; }

.btn .i { width: 18px; height: 18px; }
.nav-cta .i { width: 22px; height: 22px; }

.btn-primary {
  background: var(--primary);
  color: #001b10;
  border-color: var(--primary);
  box-shadow: 0 0 0 0 rgb(16 240 160 / 0);
}
.btn-primary:hover {
  background: var(--primary-hover);
  color: #001b10;
  transform: translateY(-1px) scale(1.02);
  box-shadow: var(--primary-glow);
}
.btn-primary:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px #0a0a0a, 0 0 0 5px var(--primary), var(--primary-glow);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-2);
}
.btn-ghost:hover {
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: var(--primary-glow-soft);
  transform: translateY(-1px);
}

/* -------- app store badges -------- */

.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  height: 56px;
  padding: 0 1.25rem;
  border-radius: var(--r-btn);
  border: 1px solid var(--primary);
  background: var(--primary);
  color: #001b10;
  font-family: var(--font-mono);
  white-space: nowrap;
  transition: transform 220ms var(--ease), box-shadow 220ms var(--ease), background 160ms var(--ease), border-color 160ms var(--ease), color 160ms var(--ease);
}
.store-badge:hover {
  color: #001b10;
  background: var(--primary-hover);
  transform: translateY(-1px) scale(1.02);
  box-shadow: var(--primary-glow);
}
.store-badge:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px #0a0a0a, 0 0 0 5px var(--primary), var(--primary-glow);
}
.store-badge-i { width: 26px; height: 26px; flex: 0 0 auto; }
.store-badge-text { display: flex; flex-direction: column; line-height: 1.1; text-align: left; }
.store-badge-top {
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.85;
}
.store-badge-name { font-size: 1.05rem; font-weight: 600; letter-spacing: -0.01em; }

/* "coming soon" variant — muted, non-interactive */
.store-badge-soon {
  background: transparent;
  color: var(--text-muted);
  border-color: var(--border-2);
  cursor: default;
}
.store-badge-soon:hover {
  background: transparent;
  color: var(--text-muted);
  transform: none;
  box-shadow: none;
}
.store-badge-soon .store-badge-name { color: var(--text); }

.store-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  justify-content: center;
  margin: 0 0 0.5rem;
}

/* -------- hero -------- */

.hero {
  position: relative;
  padding: 5rem var(--pad-x) 7rem;
  overflow: hidden;
}

.hero-inner {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 4rem;
  align-items: center;
}

@media (min-width: 1024px) {
  .hero { padding: 7rem var(--pad-x) 9rem; }
  .hero-inner {
    grid-template-columns: 1.05fr 1fr;
    gap: 5rem;
  }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--border-2);
  border-radius: 999px;
  background: rgba(17,17,17,0.7);
  margin-bottom: 1.5rem;
}
.eyebrow .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 12px var(--primary);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

h1 {
  font-size: clamp(2.1rem, 5.5vw, 4.25rem);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 1.25rem;
  text-wrap: balance;
}

.grad {
  background: linear-gradient(100deg, var(--primary) 0%, #5ef3c0 40%, var(--cyan) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* "Claude or Codex" rendered in both agents' brand colors */
.grad-agents {
  background: linear-gradient(100deg, #f2a46f 0%, var(--claude) 38%, var(--codex) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede {
  font-family: var(--font-sans);
  font-size: 1.15rem;
  line-height: 1.7;
  color: var(--text-muted);
  max-width: 36rem;
  margin: 0 0 2rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-bottom: 2rem;
}

.trust-row {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem 1.75rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.trust-row li {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}
.trust-row .i {
  width: 14px; height: 14px;
  color: var(--primary);
}

/* faint scanlines layer over hero (style guide allows ≤5%) */
.scanlines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255,255,255,0.025) 0,
    rgba(255,255,255,0.025) 1px,
    transparent 1px,
    transparent 4px
  );
  opacity: 0.5;
  z-index: 0;
  mask-image: linear-gradient(to bottom, black 50%, transparent 100%);
}

.hero-inner { position: relative; z-index: 1; }

/* -------- sections -------- */

.section {
  padding: 6rem var(--pad-x);
  max-width: var(--container);
  margin: 0 auto;
}

@media (min-width: 1024px) {
  .section { padding: 8rem var(--pad-x); }
}

.section-alt {
  background: linear-gradient(180deg, transparent, rgba(17,17,17,0.5), transparent);
  max-width: none;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-alt > * {
  max-width: var(--container);
  margin-left: auto;
  margin-right: auto;
}

.section-head {
  margin-bottom: 3rem;
  max-width: 56rem;
}

.section-title {
  font-size: clamp(1.6rem, 3vw, 2.25rem);
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text);
}
.section-title::before {
  content: none;
}

.section-sub {
  font-family: var(--font-sans);
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 56ch;
}

/* -------- cards -------- */

.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
@media (min-width: 720px)  { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .cards { grid-template-columns: repeat(3, 1fr); } }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: 1.75rem;
  transition: border-color 200ms var(--ease), box-shadow 200ms var(--ease), transform 200ms var(--ease);
}
.card:hover {
  border-color: rgba(16, 240, 160, 0.35);
  box-shadow: var(--primary-glow-soft);
  transform: translateY(-2px);
}
.card-i {
  width: 22px; height: 22px;
  color: var(--primary);
  margin-bottom: 1rem;
}
.card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}
.card p {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--text-muted);
  margin: 0;
}

/* -------- faq -------- */

.faq {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--border);
}

.faq details {
  border-bottom: 1px solid var(--border);
  padding: 1.25rem 0;
}
.faq summary {
  list-style: none;
  cursor: pointer;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: var(--text);
  padding: 0.25rem 0;
  transition: color 160ms var(--ease);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-family: var(--font-mono);
  color: var(--primary);
  font-weight: 600;
  transition: transform 200ms var(--ease);
  font-size: 1.4rem;
  line-height: 1;
}
.faq details[open] summary::after { content: "−"; }
.faq summary:hover { color: var(--primary); }
.faq details > p {
  margin: 0.75rem 0 0;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 0.98rem;
  max-width: 65ch;
}

/* -------- final cta -------- */

.final {
  padding-bottom: 7rem;
}
.final-card {
  background:
    radial-gradient(800px 300px at 50% 0%, rgba(16,240,160,0.08), transparent 70%),
    var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--r-card);
  padding: 3rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
@media (min-width: 720px) { .final-card { padding: 4.5rem 3rem; } }

.final-card h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  margin-bottom: 0.75rem;
}
.final-card > p {
  color: var(--text-muted);
  margin: 0 auto 2rem;
  max-width: 40rem;
}

.micro {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-subtle);
  letter-spacing: 0.04em;
}
.final-card .micro { margin-top: 1.25rem; }

/* -------- footer -------- */

.footer {
  border-top: 1px solid var(--border);
  background: rgba(17,17,17,0.4);
  padding: 4rem var(--pad-x) 2rem;
}
.footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--border);
}
@media (min-width: 720px) {
  .footer-inner { grid-template-columns: 1.2fr 2fr; gap: 4rem; }
}
.footer-brand .logo-name { font-family: var(--font-mono); font-size: 1.1rem; font-weight: 600; }
.footer-brand .micro { margin-top: 0.5rem; }
.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}
.footer-cols h4 {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-subtle);
  margin-bottom: 1rem;
  font-weight: 500;
}
.footer-cols a {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.92rem;
  color: var(--text-muted);
  padding: 0.25rem 0;
}
.footer-cols a:hover { color: var(--primary); }
.footer-bottom {
  max-width: var(--container);
  margin: 0 auto;
  padding-top: 2rem;
}

/* -------- phone mockup (mirrors the in-app empty state) -------- */

.phone-wrap {
  display: flex;
  justify-content: center;
  position: relative;
}

.phone {
  position: relative;
  width: 300px;
  max-width: 100%;
  border-radius: 44px;
  padding: 10px;
  background: linear-gradient(160deg, #2a2a2a, #0d0d0d);
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.04),
    0 40px 90px -30px rgba(0,0,0,0.85),
    var(--primary-glow-soft);
}

/* drifting colored orbs behind the screen — the app's LiveBackground */
.phone-orbs {
  position: absolute;
  inset: 0;
  border-radius: 44px;
  overflow: hidden;
  filter: blur(46px);
  opacity: 0.5;
  pointer-events: none;
}
.orb {
  position: absolute;
  border-radius: 50%;
  opacity: 0.5;
}
.orb-1 { width: 220px; height: 220px; top: -40px; left: -50px; background: var(--primary); animation: drift1 11s ease-in-out infinite alternate; }
.orb-2 { width: 200px; height: 200px; top: 200px; left: 120px; background: var(--cyan);    animation: drift2 14s ease-in-out infinite alternate; }
.orb-3 { width: 240px; height: 240px; top: 420px; left: -30px; background: var(--indigo);  animation: drift3 17s ease-in-out infinite alternate; }
@keyframes drift1 { to { transform: translate(40px, 60px) scale(1.15); } }
@keyframes drift2 { to { transform: translate(-50px, 45px) scale(1.15); } }
@keyframes drift3 { to { transform: translate(45px, -60px) scale(1.15); } }

.phone-screen {
  position: relative;
  z-index: 1;
  border-radius: 36px;
  background: rgba(10,10,10,0.82);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.05);
  padding: 0.65rem 1.25rem 1.4rem;
  overflow: hidden;
}

.phone-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text);
  padding: 0.35rem 0.15rem 0.6rem;
}
.phone-status-r { display: inline-flex; align-items: center; gap: 4px; color: var(--text-muted); }
.phone-status-r i { width: 3px; height: 9px; border-radius: 1px; background: var(--text-muted); display: inline-block; }
.phone-status-r i:nth-child(1) { height: 5px; }
.phone-status-r i:nth-child(2) { height: 7px; }

.phone-appbar {
  display: grid;
  grid-template-columns: 24px 1fr 24px;
  align-items: center;
  margin-bottom: 1.4rem;
}
.phone-avatar { width: 22px; height: 22px; border-radius: 50%; background: linear-gradient(135deg, #d9c089, #7d6b3a); }
.phone-appname { text-align: center; font-family: var(--font-mono); font-weight: 600; font-size: 0.85rem; color: var(--text); }
.phone-plus { text-align: right; color: var(--text-muted); font-size: 1.2rem; line-height: 1; }

/* animated flow stage — scenes cross-fade; JS toggles .is-active + .run */
.phone-stage { position: relative; height: 416px; margin-top: 0.35rem; }

.scene {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transition: opacity 320ms var(--ease);
}
.scene.is-active { opacity: 1; visibility: visible; }
.sc-spacer { flex: 1 1 auto; min-height: 0.5rem; }

.sc-eyebrow {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-subtle);
  margin-bottom: 0.9rem;
}

/* status dot — mirrors the app's StatusDot vocabulary */
.sdot { width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; background: var(--text-muted); }
.sdot.cyan { background: var(--cyan); box-shadow: 0 0 10px var(--cyan); }
.sdot.emerald { background: var(--primary); box-shadow: 0 0 10px var(--primary); }
.sdot.claude { background: var(--claude); box-shadow: 0 0 10px var(--claude); }
.sdot.pulse { animation: pulse 1s ease-in-out infinite; }

/* Scene 0 — create. Repo + branch in a single mono pill, like the app. */
.sc-pill {
  display: flex; align-items: center; gap: 0.55rem; flex-wrap: wrap;
  font-family: var(--font-mono); font-size: 0.9rem; color: var(--text);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 999px; padding: 0.6rem 0.9rem;
}
.sc-pill .i-gh { width: 17px; height: 17px; color: var(--text); flex: 0 0 auto; }
.sc-branch {
  display: inline-flex; align-items: center; gap: 0.35rem;
  font-size: 0.78rem; color: var(--text-muted);
  padding-left: 0.55rem; margin-left: 0.1rem; border-left: 1px solid var(--border-2);
}
.sc-branch svg { width: 13px; height: 13px; }
.sc-pick { display: flex; gap: 0.5rem; margin-top: 0.7rem; }
.pick {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-family: var(--font-mono); font-size: 0.72rem; font-weight: 600;
  padding: 0.3rem 0.7rem; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text-muted);
}
.pick i { width: 8px; height: 8px; border-radius: 50%; }
.pick-claude { color: var(--claude); border-color: rgba(204,107,67,0.45); background: rgba(204,107,67,0.1); }
.pick-claude i { background: linear-gradient(135deg, #f2a46f, #9f4f35); }
.pick-codex  { color: var(--codex);  border-color: rgba(109,93,246,0.45); background: rgba(109,93,246,0.12); }
.pick-codex i { background: linear-gradient(135deg, #8fb7ff, #9b5cff); }
.sc-cta {
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  background: var(--primary); color: #001b10; font-weight: 700; font-size: 0.9rem;
  border: 0; border-radius: 10px; padding: 0.85rem 1rem; font-family: inherit;
}
.sc-cta svg { width: 16px; height: 16px; }

/* Scene 1 — provisioning. Mirrors the app's "Preparing your chatspace" card. */
.prep {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: 0.85rem; background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--r-card); padding: 1.75rem 1.5rem;
}
.prep-title { font-family: var(--font-mono); font-size: 1rem; color: var(--text); }
.prep-sub { font-size: 0.8rem; line-height: 1.5; color: var(--text-muted); margin: 0; }
.spin { width: 15px; height: 15px; flex: 0 0 auto; border-radius: 50%; border: 2px solid var(--border-2); border-top-color: var(--primary); animation: spin 0.8s linear infinite; }
.spin.big { width: 26px; height: 26px; border-width: 2.5px; }

/* Scene 2 — ready + branded open buttons (solid fill, like the app). */
.sc-head { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; }
.repo-mini { font-family: var(--font-mono); font-size: 0.95rem; color: var(--text); }
.status { display: inline-flex; align-items: center; gap: 0.4rem; font-family: var(--font-mono); font-size: 0.74rem; color: var(--text-muted); }
.sc-meta { font-family: var(--font-mono); font-size: 0.74rem; color: var(--text-subtle); margin-top: 0.5rem; }
.open-btn {
  display: flex; align-items: center; gap: 0.6rem; width: 100%; text-align: left;
  font-family: var(--font-mono); font-size: 0.86rem; font-weight: 600; color: #fff;
  border-radius: 10px; padding: 0.85rem 0.95rem; margin-top: 0.7rem; border: 0;
}
.open-btn svg { width: 15px; height: 15px; margin-left: auto; }
.open-claude { background: linear-gradient(120deg, #d97a4e, var(--claude)); }
.open-codex  { background: linear-gradient(120deg, #7b6cf8, var(--codex)); }

/* Scene 3 — a tiny Claude-app conversation, then the "Links" row. */
.msg { display: flex; align-items: flex-end; gap: 0.5rem; }
.msg-user { justify-content: flex-end; }
.msg-claude { margin-top: 0.6rem; }
.bubble { max-width: 82%; font-size: 0.82rem; line-height: 1.45; padding: 0.55rem 0.75rem; border-radius: 14px; }
.bubble-user { background: var(--surface2); border: 1px solid var(--border); color: var(--text); border-bottom-right-radius: 5px; }
.bubble-claude { background: rgba(204,107,67,0.09); border: 1px solid rgba(204,107,67,0.28); color: var(--text); border-bottom-left-radius: 5px; }
.claude-name { display: block; font-family: var(--font-mono); font-size: 0.66rem; font-weight: 600; letter-spacing: 0.04em; color: var(--claude); margin-bottom: 2px; }
.claude-ava { flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #f2a46f, var(--claude) 55%, #9f4f35); color: #fff; }
.claude-ava svg { width: 13px; height: 13px; }
.typing { display: flex; align-items: center; gap: 0.5rem; opacity: 0; max-height: 0; overflow: hidden; }
.tdots { display: inline-flex; gap: 4px; background: rgba(204,107,67,0.09); border: 1px solid rgba(204,107,67,0.28); border-radius: 12px; border-bottom-left-radius: 5px; padding: 0.5rem 0.65rem; }
.tdots i { width: 6px; height: 6px; border-radius: 50%; background: var(--claude); opacity: 0.5; animation: typedot 1.1s ease-in-out infinite; }
.tdots i:nth-child(2) { animation-delay: 0.18s; }
.tdots i:nth-child(3) { animation-delay: 0.36s; }
.preview-card {
  display: flex; align-items: center; gap: 0.65rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  padding: 0.7rem 0.8rem;
}
.preview-card .i-globe { width: 18px; height: 18px; color: var(--primary); flex: 0 0 auto; }
.preview-card .i-copy { width: 15px; height: 15px; color: var(--text-subtle); flex: 0 0 auto; }
.link-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.link-label { font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-subtle); }
.purl { font-family: var(--font-mono); font-size: 0.78rem; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Scene 4 — the live preview */
.browser { border: 1px solid var(--border-2); border-radius: 12px; overflow: hidden; background: #0d0d0d; height: 100%; display: flex; flex-direction: column; }
.browser-bar { display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem 0.7rem; background: #0f0f0f; border-bottom: 1px solid var(--border); }
.bdots { display: inline-flex; gap: 4px; }
.bdots i { width: 8px; height: 8px; border-radius: 50%; background: var(--border-2); }
.burl { font-family: var(--font-mono); font-size: 0.66rem; color: var(--text-subtle); background: #0a0a0a; border-radius: 6px; padding: 0.2rem 0.55rem; }
.browser-view { flex: 1; padding: 1rem; display: flex; flex-direction: column; gap: 0.7rem; }
.pv-hero { height: 74px; border-radius: 10px; background: linear-gradient(120deg, rgba(16,240,160,0.85), rgba(34,211,238,0.7)); position: relative; overflow: hidden; }
.pv-hero span { position: absolute; left: 14px; bottom: 14px; width: 46%; height: 11px; border-radius: 999px; background: rgba(0,0,0,0.45); }
.pv-row { height: 11px; border-radius: 999px; background: var(--surface2); }
.pv-row.pv-short { width: 60%; }
.pv-btn { align-self: flex-start; margin-top: auto; font-family: var(--font-mono); font-size: 0.78rem; font-weight: 700; color: #001b10; background: var(--primary); border-radius: 8px; padding: 0.45rem 0.9rem; }

/* tap ripple — cartoonish ping over a control */
.tap {
  position: absolute; width: 34px; height: 34px; border-radius: 50%; opacity: 0;
  border: 2px solid var(--primary); background: rgba(16,240,160,0.18); pointer-events: none;
}
.tap-cta { left: 50%; bottom: 8px; margin-left: -17px; }
.tap-claude { left: 38px; bottom: 70px; }
.tap-open { right: 16px; bottom: 18px; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes popIn { 0% { opacity: 0; transform: translateY(10px) scale(0.85); } 60% { opacity: 1; transform: translateY(0) scale(1.04); } 100% { transform: translateY(0) scale(1); } }
@keyframes slideUp { 0% { opacity: 0; transform: translateY(16px); } 100% { opacity: 1; transform: translateY(0); } }
@keyframes tapPing { 0% { opacity: 0; transform: scale(0.4); } 25% { opacity: 0.95; } 70% { opacity: 0.5; } 100% { opacity: 0; transform: scale(1.7); } }
@keyframes pressDown { 40% { transform: scale(0.95); } 100% { transform: scale(1); } }
@keyframes typedot { 0%, 60%, 100% { opacity: 0.4; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }
@keyframes typingCycle {
  0% { opacity: 0; max-height: 0; margin-top: 0; }
  14% { opacity: 1; max-height: 44px; margin-top: 0.6rem; }
  72% { opacity: 1; max-height: 44px; margin-top: 0.6rem; }
  100% { opacity: 0; max-height: 0; margin-top: 0; }
}

/* in-scene entrance choreography, triggered when JS adds .run */
.scene-create.run .sc-eyebrow { animation: popIn 0.4s var(--ease) both; }
.scene-create.run .sc-pill { animation: popIn 0.45s var(--ease) 0.08s both; }
.scene-create.run .sc-pick { animation: popIn 0.45s var(--ease) 0.18s both; }
.scene-create.run .sc-cta { animation: popIn 0.45s var(--ease) 0.3s both, pressDown 0.4s var(--ease) 1.35s; }
.scene-create.run .tap-cta { animation: tapPing 0.7s ease-out 1.2s; }

.scene-make.run .prep { animation: popIn 0.5s var(--ease) 0.1s both; }

.scene-ready.run .sc-head { animation: popIn 0.45s var(--ease) both; }
.scene-ready.run .sc-meta { animation: popIn 0.4s var(--ease) 0.15s both; }
.scene-ready.run .open-claude { animation: slideUp 0.45s var(--ease) 0.3s both; }
.scene-ready.run .open-codex { animation: slideUp 0.45s var(--ease) 0.45s both; }
.scene-ready.run .tap-claude { animation: tapPing 0.7s ease-out 1.2s; }

.scene-work.run .msg-user { animation: popIn 0.4s var(--ease) both; }
.scene-work.run .typing { animation: typingCycle 1.7s var(--ease) 0.4s both; }
.scene-work.run .msg-claude { animation: popIn 0.45s var(--ease) 1.7s both; }
.scene-work.run .preview-card { animation: slideUp 0.5s var(--ease) 2.3s both; }
.scene-work.run .tap-open { animation: tapPing 0.7s ease-out 3.2s; }

.scene-preview.run .browser { animation: popIn 0.45s var(--ease) both; }
.scene-preview.run .pv-hero { animation: popIn 0.5s var(--ease) 0.35s both; }
.scene-preview.run .pv-row { animation: popIn 0.45s var(--ease) 0.55s both; }
.scene-preview.run .pv-row.pv-short { animation: popIn 0.45s var(--ease) 0.7s both; }
.scene-preview.run .pv-btn { animation: popIn 0.5s var(--ease) 0.9s both; }

/* -------- agent cards -------- */

.agents {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
@media (min-width: 720px) { .agents { grid-template-columns: 1fr 1fr; } }

.agent-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: 1.75rem;
  overflow: hidden;
  transition: border-color 200ms var(--ease), box-shadow 200ms var(--ease), transform 200ms var(--ease);
}
.agent-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
}
.agent-claude::before { background: linear-gradient(90deg, #f2a46f, var(--claude), #9f4f35); }
.agent-codex::before  { background: linear-gradient(90deg, #8fb7ff, var(--codex), #9b5cff); }
.agent-card h3 { font-size: 1.1rem; margin-bottom: 0.4rem; }
.agent-card p { font-family: var(--font-sans); font-size: 0.95rem; color: var(--text-muted); margin: 0; }
.agent-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-bottom: 1rem; }
.agent-claude .agent-dot { background: var(--claude); box-shadow: 0 0 14px var(--claude); }
.agent-codex .agent-dot  { background: var(--codex);  box-shadow: 0 0 14px var(--codex); }
.agent-claude:hover { border-color: rgba(204,107,67,0.45); transform: translateY(-2px); }
.agent-codex:hover  { border-color: rgba(109,93,246,0.45); transform: translateY(-2px); }

/* -------- pricing plans -------- */

.plans {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
@media (min-width: 860px) { .plans { grid-template-columns: repeat(3, 1fr); align-items: start; } }

.plan {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: 1.75rem;
}
.plan-pop {
  border-color: rgba(16,240,160,0.4);
  box-shadow: var(--primary-glow-soft);
}
.plan-badge {
  position: absolute;
  top: -10px;
  left: 1.75rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #001b10;
  background: var(--primary);
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-weight: 600;
}
.plan-name {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}
.plan-price { font-family: var(--font-mono); font-size: 2.1rem; font-weight: 700; letter-spacing: -0.02em; color: var(--text); }
.plan-price span { font-size: 0.95rem; font-weight: 500; color: var(--text-subtle); }
.plan-tag { font-size: 0.95rem; color: var(--text-muted); margin: 0.35rem 0 1.25rem; }
.plan-feats { list-style: none; margin: 0; padding: 0; font-family: var(--font-mono); font-size: 0.9rem; }
.plan-feats li {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  padding: 0.5rem 0;
  border-top: 1px dashed var(--border);
  color: var(--text);
}
.plan-feats li::before { content: "+"; color: var(--primary); font-weight: 700; }
.plans-note {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-subtle);
  text-align: center;
  margin: 1.75rem auto 0;
  max-width: none;
}

/* -------- legal / doc pages -------- */

.legal { max-width: 760px; }
.legal .doc-eyebrow {
  font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--text-subtle); margin-bottom: 0.75rem;
}
.legal h1 { font-size: clamp(1.8rem, 4vw, 2.5rem); margin-bottom: 0.5rem; }
.legal .doc-meta { font-family: var(--font-mono); font-size: 0.8rem; color: var(--text-subtle); margin-bottom: 2rem; }
.legal .doc-note {
  border: 1px dashed var(--border-2); border-left: 2px solid var(--amber);
  border-radius: var(--r-btn); background: rgba(251,191,36,0.05);
  padding: 0.9rem 1.1rem; margin-bottom: 2.5rem;
  font-size: 0.9rem; color: var(--text-muted);
}
.legal h2 { font-size: 1.2rem; margin: 2.25rem 0 0.6rem; }
.legal p, .legal li { color: var(--text-muted); font-size: 1rem; line-height: 1.7; }
.legal ul { padding-left: 1.2rem; }
.legal a.link { color: var(--primary); }
.back-home {
  display: inline-flex; align-items: center; gap: 0.4rem; font-family: var(--font-mono);
  font-size: 0.85rem; color: var(--text-muted); margin-bottom: 2rem;
}
.back-home:hover { color: var(--primary); }

/* longer legal documents */
.legal .lead { font-size: 1.05rem; color: var(--text-muted); margin-bottom: 1.75rem; }
.legal h2 { scroll-margin-top: 90px; }
.legal h3 { font-size: 1.02rem; color: var(--text); margin: 1.5rem 0 0.4rem; }
.legal ol { padding-left: 1.2rem; }
.legal ol li { margin-bottom: 0.45rem; }
.legal ul li { margin-bottom: 0.3rem; }
.legal p strong, .legal li strong { color: var(--text); font-weight: 600; }
.legal hr { border: none; border-top: 1px solid var(--border-2); margin: 2.5rem 0; }

/* table of contents */
.legal .doc-toc {
  border: 1px solid var(--border-2); border-radius: var(--r-card);
  background: var(--surface); padding: 1.1rem 1.3rem; margin-bottom: 2.5rem;
}
.legal .doc-toc h2 { font-size: 0.78rem; font-family: var(--font-mono); letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--text-subtle); margin: 0 0 0.6rem; }
.legal .doc-toc ol { columns: 2; column-gap: 2rem; padding-left: 1.1rem; margin: 0; }
.legal .doc-toc li { margin-bottom: 0.25rem; font-size: 0.9rem; }
@media (max-width: 620px) { .legal .doc-toc ol { columns: 1; } }

/* neutral info callout (vs. the amber draft note) */
.legal .doc-callout {
  border: 1px solid var(--border-2); border-left: 2px solid var(--primary);
  border-radius: var(--r-btn); background: rgba(16, 240, 160, 0.04);
  padding: 0.9rem 1.1rem; margin: 1.5rem 0;
  font-size: 0.92rem; color: var(--text-muted);
}
.legal .doc-callout p:first-child { margin-top: 0; }
.legal .doc-callout p:last-child { margin-bottom: 0; }

/* sub-processor / data tables */
.legal .table-wrap { overflow-x: auto; margin: 1rem 0 1.5rem; }
.legal table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.legal th, .legal td {
  text-align: left; padding: 0.6rem 0.7rem; border-bottom: 1px solid var(--border-2);
  vertical-align: top; color: var(--text-muted); line-height: 1.5;
}
.legal th {
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--text-subtle); font-weight: 600;
}
.legal td:first-child { color: var(--text); }

.doc-foot { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--border-2);
  font-size: 0.85rem; color: var(--text-subtle); }
.doc-foot a.link { color: var(--text-muted); }

/* -------- focus -------- */

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

/* -------- reduced motion -------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .cursor, .eyebrow .dot { animation: none !important; }
  .orb { animation: none !important; }
}

/* -------- mobile tweaks -------- */

@media (max-width: 759px) {
  .nav-links { display: none; }
  .nav-cta { padding: 0 0.95rem; font-size: 0.78rem; height: 44px; letter-spacing: 0.03em; gap: 0.45rem; }
  .nav-cta .i { width: 18px; height: 18px; }
  .hero { padding-top: 3.5rem; padding-bottom: 4.5rem; }
  .hero-inner { gap: 3rem; }
  .lede { font-size: 1.05rem; }
  .section { padding: 4rem var(--pad-x); }
  .section-head { margin-bottom: 2rem; }
  .footer { padding: 3rem var(--pad-x) 2rem; }
  .footer-cols { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
  .btn-lg { font-size: 0.88rem; padding: 0 1.15rem; }
  .cta-row { gap: 0.6rem; }
  .final-card { padding: 2.25rem 1.25rem; }
}

@media (max-width: 480px) {
  .footer-cols { grid-template-columns: 1fr; gap: 1.25rem; }
  .footer-cols a { padding: 0.35rem 0; }
  h1 { font-size: clamp(1.95rem, 8vw, 2.4rem); }
  .nav-inner { gap: 1rem; padding: 0 1rem; }
  .nav-cta-extra { display: none; }
  .nav-cta { padding: 0 0.7rem; gap: 0.35rem; }
  .hero, .section, .footer { padding-left: 1rem; padding-right: 1rem; }
  .phone { width: 270px; }
}
