/* ═══════════════════════════════════════════════════════════════
   GROOT — Landing Page
   ═══════════════════════════════════════════════════════════════ */

:root {
  color-scheme: dark;
  --bg:       #0b1120;
  --surface:  rgba(15, 25, 45, 0.82);
  --primary:  #34d399;
  --accent:   #22d3ee;
  --purple:   #a78bfa;
  --text:     #f0f4fc;
  --muted:    #8b94a5;
  --border:   rgba(255,255,255,0.07);
  --border-m: rgba(255,255,255,0.12);
  --shadow:   0 24px 64px rgba(2,6,16,0.55);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
/* Ensure [hidden] always wins even when a display class is present */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
  font-family: "Space Grotesk", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

/* Layer 1 — large outer atmospheric blooms */
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none; z-index: 0;
  background:
    radial-gradient(ellipse 90% 65% at -10% -10%, rgba(34,211,238,.13) 0%, transparent 62%),
    radial-gradient(ellipse 85% 60% at 110% -10%, rgba(52,211,153,.10) 0%, transparent 62%),
    radial-gradient(ellipse 55% 42% at 50%   0%,  rgba(167,139,250,.07) 0%, transparent 55%);
}

/* Layer 2 — concentrated inner cores + purple nebula + trailing streaks */
body::after {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none; z-index: 0;
  background:
    radial-gradient(ellipse 44% 40% at  3%  3%,  rgba(34,211,238,.16) 0%, transparent 50%),
    radial-gradient(ellipse 42% 38% at 97%  3%,  rgba(52,211,153,.13) 0%, transparent 50%),
    radial-gradient(ellipse 30% 24% at 50%  6%,  rgba(167,139,250,.10) 0%, transparent 44%),
    radial-gradient(ellipse 20% 55% at  0% 28%,  rgba(34,211,238,.05) 0%, transparent 58%),
    radial-gradient(ellipse 20% 50% at 100% 24%, rgba(52,211,153,.04) 0%, transparent 55%);
}

main, nav, footer { position: relative; z-index: 1; }
a { color: inherit; }

/* ── Shared ─────────────────────────────────────────────────── */
.section-title {
  text-align: center;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 12px;
}

.section-sub {
  text-align: center;
  font-size: 1rem;
  color: var(--muted);
  max-width: 640px;
  margin: 0 auto 48px;
  line-height: 1.7;
}

.badge {
  display: inline-flex;
  padding: 5px 14px;
  border-radius: 999px;
  border: 1px solid rgba(34,211,238,.25);
  background: rgba(34,211,238,.07);
  color: var(--accent);
  font-size: 0.75rem; font-weight: 600;
  letter-spacing: 0.05em; text-transform: uppercase;
}
.badge-teal {
  border-color: rgba(52,211,153,.28);
  background: rgba(52,211,153,.08);
  color: var(--primary);
}

.btn-primary {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 28px;
  border: none; border-radius: 999px;
  background: linear-gradient(135deg, #34d399, #22d3b8);
  color: #041510; font-family: inherit;
  font-size: 0.95rem; font-weight: 700;
  text-decoration: none; cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(52,211,153,.28); }

.btn-secondary {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 24px;
  border: 1px solid rgba(52,211,153,.3);
  border-radius: 999px;
  background: rgba(52,211,153,.07);
  color: var(--primary); font-family: inherit;
  font-size: 0.9rem; font-weight: 600;
  text-decoration: none; cursor: pointer;
  transition: transform 180ms ease, background 180ms ease;
}
.btn-secondary:hover { transform: translateY(-1px); background: rgba(52,211,153,.13); }

/* ═══════════════════════════════════════════════════════════════
   NAV
   ═══════════════════════════════════════════════════════════════ */
.nav {
  position: sticky; top: 0; z-index: 200;
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  background: rgba(11,17,32,.80);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 1100px; margin: 0 auto; padding: 0 28px; height: 62px;
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--text);
  font-size: 1.2rem; font-weight: 700; letter-spacing: -0.03em;
}
.nav-logo-img { width: 30px; height: 30px; object-fit: contain; }
.nav-cta { font-size: 0.85rem; min-height: 38px; padding: 0 20px; }

/* ═══════════════════════════════════════════════════════════════
   HERO — two column: copy left, visual panel right
   ═══════════════════════════════════════════════════════════════ */
.hero {
  max-width: 1100px;
  margin: 0 auto;
  padding: 88px 28px 72px;
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 56px;
  align-items: start;
  position: relative;
}

/* Dot-grid texture — fades toward bottom and edges, behind the glow */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 30px 30px;
  mask-image:
    radial-gradient(ellipse 90% 95% at 14% 18%, rgba(0,0,0,.55) 0%, transparent 68%),
    radial-gradient(ellipse 65% 75% at 84% 28%, rgba(0,0,0,.18) 0%, transparent 62%);
  mask-composite: add;
  -webkit-mask-image:
    radial-gradient(ellipse 90% 95% at 14% 18%, rgba(0,0,0,.55) 0%, transparent 68%),
    radial-gradient(ellipse 65% 75% at 84% 28%, rgba(0,0,0,.18) 0%, transparent 62%);
  -webkit-mask-composite: source-over;
  pointer-events: none;
}

.hero-copy  { position: relative; }
.hero-visual { position: relative; }

.hero-copy h1 {
  font-size: clamp(2rem, 3.8vw, 3.1rem);
  font-weight: 700; line-height: 1.12;
  letter-spacing: -0.035em;
}
.highlight { color: var(--primary); }

.hero-copy .hero-sub {
  margin: 22px 0 0;
  max-width: 440px;
  font-size: clamp(.98rem, 1.65vw, 1.1rem);
  line-height: 1.78; color: var(--muted);
}
.hero-sub-em {
  color: var(--text);
  opacity: .82;
}
.hero-cta {
  margin-top: 34px;
  display: inline-flex;
  font-size: 1rem; min-height: 52px; padding: 0 34px;
}

/* ── Hub-and-spoke hero graphic ─────────────────────────────── */
.hub-wrap {
  position: relative;
  width: 100%;
  max-width: 420px;
  aspect-ratio: 1;
  align-self: center;
  margin: 0 auto;
}

.hub-svg {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  overflow: visible;
  pointer-events: none;
}

.hub-spoke {
  stroke-width: 1;
  /* stroke set per-element via url(#spoke-grad) in SVG */
}

/* External logo nodes */
.hub-node {
  position: absolute;
  width: 11%;   /* ≈ 46px on 420px */
  aspect-ratio: 1;
  border-radius: 22%;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,.08);
  background: #fff;
  transform: translate(-50%, -50%);
  box-shadow: 0 3px 14px rgba(0,0,0,.3), 0 1px 3px rgba(0,0,0,.2);
  transition: transform 200ms ease, box-shadow 200ms ease;
}
.hub-node:hover {
  transform: translate(-50%, -50%) scale(1.14);
  box-shadow: 0 6px 22px rgba(0,0,0,.4), 0 0 12px rgba(34,211,238,.18);
}
.hub-node img {
  width: 60%; height: 60%;
  object-fit: contain; display: block;
}

/* Center: Groot */
@keyframes hub-pulse {
  0%, 100% { box-shadow: 0 0 24px rgba(34,211,238,.14), 0 0 0 5px rgba(34,211,238,.04); }
  50%       { box-shadow: 0 0 44px rgba(34,211,238,.28), 0 0 0 8px rgba(34,211,238,.08); }
}
.hub-center {
  position: absolute;
  width: 17%;   /* ≈ 71px on 420px */
  aspect-ratio: 1;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  border-radius: 22%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(34,211,238,.07);
  border: 1.5px solid rgba(34,211,238,.30);
  box-shadow: 0 0 24px rgba(34,211,238,.14), 0 0 0 5px rgba(34,211,238,.04);
  animation: hub-pulse 3.5s ease-in-out infinite;
}
.hub-center img {
  width: 66%; height: 66%;
  object-fit: contain;
}

/* ═══════════════════════════════════════════════════════════════
   HOW IT WORKS — 3-step explainer bridge
   ═══════════════════════════════════════════════════════════════ */
.how-section {
  max-width: 1100px;
  margin: 112px auto 0;
  padding: 0 28px;
}

.how-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 48px;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}

.how-step {
  padding: 28px 24px;
  border-right: 1px solid var(--border);
}
.how-step:last-child { border-right: none; }

.how-step-num {
  font-size: .67rem; font-weight: 700;
  color: var(--accent);
  letter-spacing: .1em; text-transform: uppercase;
  margin-bottom: 12px;
}

.how-step h3 {
  font-size: .97rem; font-weight: 700;
  margin-bottom: 9px; letter-spacing: -.015em;
}

.how-step p {
  font-size: .85rem; line-height: 1.7;
  color: var(--muted);
}

/* ═══════════════════════════════════════════════════════════════
   SCENARIOS SECTION
   ═══════════════════════════════════════════════════════════════ */
.scenarios-section {
  max-width: 1100px;
  margin: 120px auto 0;
  padding: 0 28px;
}

/* Tab row */
.sc-tabs {
  display: flex;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  width: fit-content;
  margin: 0 auto 40px;
  overflow: hidden;
}
.sc-tab {
  flex: 1;
  width: 120px;
  padding: 10px 0;
  text-align: center;
  background: transparent;
  border: none;
  font-family: inherit;
  font-size: .82rem; font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: color 160ms, background 160ms;
}
.sc-tab + .sc-tab { border-left: 1px solid var(--border); }
.sc-tab-active { color: var(--text); background: rgba(255,255,255,.06); }
.sc-tab:hover:not(.sc-tab-active) { color: var(--text); background: rgba(255,255,255,.03); }

/* Side-by-side: description left, timeline right */
.sc-body {
  display: grid;
  grid-template-columns: 2fr 3fr;
  gap: 48px;
  align-items: start;
}

/* Description panel */
.sc-desc h3 {
  font-size: 1.05rem; font-weight: 700;
  margin-bottom: 14px; letter-spacing: -.015em;
}
.sc-desc p {
  font-size: .88rem; line-height: 1.75;
  color: var(--muted); margin-bottom: 10px;
}
.sc-desc p:last-child { margin-bottom: 0; }

.sc-why {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}
.sc-why-label {
  display: block;
  font-size: .68rem; font-weight: 700;
  color: var(--accent);
  letter-spacing: .08em; text-transform: uppercase;
  margin-bottom: 8px;
}
.sc-why p { font-size: .85rem; }

/* ── Timeline panel (right column) ──────────────────────────── */
.scenario-panel {
  background: var(--surface);
  border: 1px solid var(--border-m);
  border-radius: 18px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  overflow: hidden;
}

.timeline-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,.02);
}
.timeline-header-left {
  display: flex; align-items: center; gap: 8px;
  font-size: .82rem; font-weight: 600;
}
.timeline-header-left img { opacity: .7; }
.timeline-header-left span { color: var(--text); }
.timeline-header-logo { width: 20px; height: 20px; object-fit: contain; }

/* ── sc-flow scene ───────────────────────────────────────────── */
.sc-flow {
  display: flex; flex-direction: column; gap: 8px;
  padding: 16px 14px;
}

/* EVENT box — stream arrival, cyan accent */
.sc-event {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(34,211,238,.18);
  border-left: 2px solid var(--accent);
  background: rgba(34,211,238,.04);
}
.sc-event-body { flex: 1; min-width: 0; }
.sc-event-header {
  display: flex; align-items: center; gap: 8px; margin-bottom: 3px;
}
.sc-event-name {
  font-family: monospace; font-size: .67rem; font-weight: 700;
  color: var(--accent);
  background: rgba(34,211,238,.1);
  padding: 1px 6px; border-radius: 4px;
  letter-spacing: -.01em;
}
.sc-event-source { font-size: .67rem; color: var(--muted); }
.sc-event-detail { font-size: .74rem; color: var(--text); line-height: 1.45; }

/* AGENT box — neutral bordered container */
.sc-agent {
  display: flex; flex-direction: column; gap: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border-m);
  background: rgba(255,255,255,.015);
}
.sc-agent-reason {
  display: flex; gap: 10px; align-items: flex-start;
}
.sc-agent-reason > span {
  font-size: .74rem; color: var(--muted);
  font-style: italic; line-height: 1.5; padding-top: 2px;
}

/* Tool calls list inside agent box */
.sc-agent-tools {
  display: flex; flex-direction: column; gap: 5px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}
.sc-tool {
  display: flex; align-items: center; gap: 8px;
}
.sc-tool-dir {
  font-size: .7rem; font-weight: 700;
  width: 10px; flex-shrink: 0; text-align: center;
}
.sc-tool-read  .sc-tool-dir { color: var(--accent); }
.sc-tool-write .sc-tool-dir { color: var(--primary); }
.sc-tool-text {
  display: flex; flex-direction: column; gap: 1px; min-width: 0;
}
.sc-tool-system { font-size: .74rem; font-weight: 600; color: var(--text); }
.sc-tool-desc   { font-size: .69rem; color: var(--muted); line-height: 1.35; }

/* Logos inside sc-* boxes */
.sc-logo {
  width: 28px; height: 28px; border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; overflow: hidden;
}
.sc-logo img { width: 18px; height: 18px; object-fit: contain; display: block; }
.sc-logo-dark,
.sc-logo-white { background: #fff; border: 1px solid rgba(0,0,0,.1); }
.sc-logo-agent {
  background: rgba(34,211,238,.08);
  border: 1px solid rgba(34,211,238,.2);
}
.sc-bot-icon { width: 13px; height: 13px; color: var(--accent); }

/* WAIT / loop divider */
.sc-wait {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 2px;
}
.sc-wait-line { flex: 1; height: 1px; background: var(--purple); opacity: .28; }
.sc-wait-label {
  font-size: .66rem; font-weight: 700; color: var(--purple);
  background: rgba(167,139,250,.08);
  padding: 2px 9px; border-radius: 999px;
  border: 1px solid rgba(167,139,250,.18);
  white-space: nowrap;
}

/* ═══════════════════════════════════════════════════════════════
   TRUST SECTION
   ═══════════════════════════════════════════════════════════════ */
.trust-section {
  max-width: 1100px;
  margin: 120px auto 0;
  padding: 0 28px;
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 48px;
}

.trust-card {
  padding: 28px 24px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.012);
  transition: border-color 250ms, transform 250ms;
}
.trust-card:hover { border-color: var(--border-m); transform: translateY(-2px); }

.trust-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
}
.trust-icon svg { width: 18px; height: 18px; }
.trust-icon-cyan   { background: rgba(34,211,238,.1);  color: var(--accent); }
.trust-icon-teal   { background: rgba(52,211,153,.1);  color: var(--primary); }
.trust-icon-purple { background: rgba(167,139,250,.1); color: var(--purple); }

.trust-card h3 { font-size: .97rem; font-weight: 700; margin-bottom: 8px; letter-spacing: -.015em; }
.trust-card p  { font-size: .87rem; line-height: 1.72; color: var(--muted); }

/* ═══════════════════════════════════════════════════════════════
   COMMUNITY EDITION
   ═══════════════════════════════════════════════════════════════ */
.community { max-width: 1100px; margin: 120px auto 0; padding: 0 28px; }

.community-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 40px; padding: 50px 52px;
  border-radius: 24px;
  border: 1px solid rgba(52,211,153,.18);
  border-left: 3px solid var(--primary);
  background: linear-gradient(135deg, rgba(52,211,153,.04) 0%, transparent 50%), var(--surface);
  box-shadow: var(--shadow);
}
.community-text .badge { margin-bottom: 16px; }
.community-text h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 700; letter-spacing: -.025em; margin-bottom: 12px; }
.community-text p  { font-size: .97rem; line-height: 1.72; color: var(--muted); max-width: 460px; margin-bottom: 26px; }
.community-logo { flex-shrink: 0; opacity: .1; }
.community-logo img { width: 110px; height: 110px; object-fit: contain; }

/* ═══════════════════════════════════════════════════════════════
   WAITLIST / FINAL CTA
   ═══════════════════════════════════════════════════════════════ */
.final-cta {
  max-width: 600px; margin: 120px auto 0; padding: 0 28px;
  text-align: center;
}
.waitlist-heading {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 700; letter-spacing: -.03em; margin-bottom: 10px;
}
.waitlist-sub {
  font-size: .97rem; color: var(--muted); line-height: 1.65;
  margin-bottom: 30px;
}
.waitlist-form {
  display: flex; gap: 10px; justify-content: center; flex-wrap: wrap;
}
.waitlist-input {
  flex: 1; min-width: 220px; max-width: 320px;
  height: 50px; padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--border-m);
  background: rgba(255,255,255,.04);
  color: var(--text); font-family: inherit; font-size: .95rem;
  outline: none; transition: border-color 160ms, box-shadow 160ms;
}
.waitlist-input::placeholder { color: var(--muted); opacity: .6; }
.waitlist-input:focus {
  border-color: rgba(34,211,238,.4);
  box-shadow: 0 0 0 3px rgba(34,211,238,.08);
}
.waitlist-btn { height: 50px; padding: 0 28px; font-size: .95rem; }
.waitlist-success {
  font-size: 1rem; font-weight: 600; color: var(--primary);
  padding: 14px 0;
}

/* ═══════════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════════ */
.footer {
  max-width: 1100px; margin: 96px auto 0;
  padding: 26px 28px 48px;
  border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  gap: 10px; flex-wrap: wrap;
  font-size: .82rem; color: var(--muted); opacity: .55;
}
.footer-logo { width: 20px; height: 20px; object-fit: contain; }
.footer-name { font-weight: 700; letter-spacing: -.02em; }
.footer-sep  { opacity: .4; }
.footer a    { text-decoration: none; color: inherit; }
.footer a:hover { opacity: 1; }

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 960px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 72px 28px 56px;
  }
  .hero-copy h1 { font-size: clamp(2rem, 5vw, 2.8rem); }
  .hero-copy .hero-sub { max-width: 100%; }

  .how-steps { grid-template-columns: 1fr; }
  .how-step  { border-right: none; border-bottom: 1px solid var(--border); }
  .how-step:last-child { border-bottom: none; }

  .sc-body {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .sc-desc { order: 1; }
  .scenario-panel { order: 2; }

  .trust-grid { grid-template-columns: 1fr; gap: 16px; }

  .community-inner  { flex-direction: column; padding: 36px 28px; }
  .community-logo   { display: none; }
}

@media (max-width: 640px) {
  .nav-inner { padding: 0 16px; }

  .hero { padding: 56px 16px 48px; }

  .how-section,
  .scenarios-section,
  .trust-section,
  .community,
  .final-cta { padding: 0 16px; }

  .how-section,
  .scenarios-section,
  .trust-section,
  .community,
  .final-cta { margin-top: 72px; }

  .sc-tabs { width: 100%; }
  .sc-tab  { width: auto; padding: 10px 0; }

  .community-inner { padding: 30px 20px; }
  .footer { margin-top: 72px; }
}
