/* ============================================================
   Elly marketing site — shared stylesheet
   Tokens mirror the product design system (packages/ui tokens):
   Inter, indigo #4f46e5 accent, zinc neutral ramp, 0.5rem radius.
   ============================================================ */

:root {
  /* Brand */
  --accent: #4f46e5;
  --accent-strong: #4338ca;
  --accent-soft: #eef2ff;
  --accent-glow: rgba(79, 70, 229, 0.28);
  --accent-light: #818cf8;

  /* Light surfaces */
  --surface: #fdfdfd;
  --surface-2: #f4f4f5;
  --surface-3: #e9e9ec;
  --sunken: #f7f7f8;

  /* Dark band surfaces (product rail colors) */
  --ink-bg: #0b0b0d;
  --ink-bg-2: #131316;
  --ink-card: #18181b;
  --ink-border: #26262b;
  --ink-fg: #f0f0f2;
  --ink-muted: #a3a5ae;

  /* Text */
  --fg: #1c1c1f;
  --fg-muted: #57585f;
  --fg-subtle: #66676e;

  /* Lines */
  --border: #e4e4e7;
  --border-strong: #d0d0d5;

  /* Status */
  --success: #178246;
  --success-soft: #e5f6ec;

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

  /* Shape + motion */
  --radius: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  --nav-h: 72px;
}

/* ---------- Reset / base ---------- */

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--fg);
  background: var(--surface);
  overflow-x: hidden;
}

img, svg, video { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 { margin: 0 0 0.5em; line-height: 1.15; letter-spacing: -0.02em; font-weight: 700; }
p { margin: 0 0 1em; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

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

.container {
  width: min(1160px, 100% - 48px);
  margin-inline: auto;
}

.container-narrow {
  width: min(820px, 100% - 48px);
  margin-inline: auto;
}

section { position: relative; }

.section-pad { padding: 96px 0; }

.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

.dark-band .eyebrow { color: var(--accent-light); }

.section-title {
  font-size: clamp(28px, 4.2vw, 44px);
  letter-spacing: -0.03em;
  max-width: 720px;
}

.section-lede {
  font-size: 18px;
  color: var(--fg-muted);
  max-width: 640px;
}

.center { text-align: center; }
.center .section-title, .center .section-lede { margin-inline: auto; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 10px;
  border: 1px solid transparent;
  font: 600 15px/1.2 var(--font-sans);
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease), background 0.18s var(--ease), border-color 0.18s var(--ease);
  white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 1px 2px rgba(28, 28, 31, 0.12), 0 0 0 0 var(--accent-glow);
}
.btn-primary:hover {
  background: var(--accent-strong);
  box-shadow: 0 6px 20px -6px var(--accent-glow);
}

.btn-ghost {
  background: transparent;
  color: var(--fg);
  border-color: var(--border-strong);
}
.btn-ghost:hover { border-color: var(--fg-subtle); background: var(--surface-2); }

.dark-band .btn-ghost,
.nav-dark .btn-ghost,
.hero .btn-ghost,
.page-hero .btn-ghost,
.thanks-hero .btn-ghost { color: var(--ink-fg); border-color: #3a3a41; }
.dark-band .btn-ghost:hover,
.nav-dark .btn-ghost:hover,
.hero .btn-ghost:hover,
.page-hero .btn-ghost:hover,
.thanks-hero .btn-ghost:hover { background: var(--ink-card); border-color: #55555e; }

.btn-invert {
  background: #fff;
  color: var(--accent-strong);
}
.btn-invert:hover { background: var(--accent-soft); }

.btn-lg { padding: 15px 28px; font-size: 16px; border-radius: 12px; }

.cta-micro {
  font-size: 13px;
  color: var(--fg-subtle);
  margin-top: 12px;
}
.dark-band .cta-micro { color: var(--ink-muted); }

/* ---------- Navigation ---------- */

.site-nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease), height 0.3s var(--ease), backdrop-filter 0.3s var(--ease);
}

.site-nav.scrolled {
  height: 60px;
  background: rgba(253, 253, 253, 0.82);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  backdrop-filter: blur(14px) saturate(1.4);
  border-bottom-color: var(--border);
}

.site-nav.nav-dark:not(.scrolled) { color: var(--ink-fg); }
.site-nav.nav-dark.scrolled {
  background: rgba(11, 11, 13, 0.78);
  border-bottom-color: var(--ink-border);
  color: var(--ink-fg);
}

.nav-inner {
  width: min(1160px, 100% - 48px);
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.03em;
  color: inherit;
  text-decoration: none;
}
.brand:hover { text-decoration: none; }

.brand-mark {
  width: 32px;
  height: 32px;
  flex: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
  list-style: none;
  padding: 0;
}

.nav-links a {
  display: block;
  padding: 8px 12px;
  border-radius: 8px;
  font: 500 14.5px/1 var(--font-sans);
  color: var(--fg-muted);
  transition: color 0.15s, background 0.15s;
}
.nav-dark:not(.scrolled) .nav-links a { color: var(--ink-muted); }
.nav-dark.scrolled .nav-links a { color: var(--ink-muted); }
.nav-links a:hover { color: var(--fg); background: var(--surface-2); text-decoration: none; }
.nav-dark .nav-links a:hover { color: var(--ink-fg); background: var(--ink-card); }
.nav-links a.active { color: var(--accent); font-weight: 600; }
.nav-dark .nav-links a.active { color: var(--accent-light); }

.nav-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav-actions .btn { padding: 9px 18px; font-size: 14px; }

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  background: transparent;
  border-radius: 10px;
  cursor: pointer;
  color: inherit;
  align-items: center;
  justify-content: center;
}
.nav-toggle svg { width: 22px; height: 22px; }
.nav-toggle .icon-close { display: none; }
.nav-open .nav-toggle .icon-menu { display: none; }
.nav-open .nav-toggle .icon-close { display: block; }

.mobile-menu {
  display: none;
  position: fixed;
  top: var(--nav-h);
  left: 0; right: 0;
  z-index: 99;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 12px 24px 24px;
  box-shadow: 0 24px 48px -24px rgba(28, 28, 31, 0.25);
}
.nav-open .mobile-menu { display: block; }
.mobile-menu a {
  display: block;
  padding: 13px 8px;
  font: 600 17px/1.2 var(--font-sans);
  color: var(--fg);
  border-bottom: 1px solid var(--surface-3);
}
.mobile-menu a:hover { text-decoration: none; color: var(--accent); }
.mobile-menu .mobile-cta {
  display: flex;
  gap: 10px;
  padding-top: 18px;
}
.mobile-menu .mobile-cta .btn { flex: 1; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding: calc(var(--nav-h) + 64px) 0 96px;
  background: var(--ink-bg);
  color: var(--ink-fg);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  width: 900px; height: 900px;
  top: -420px; left: 50%;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(79, 70, 229, 0.35), transparent 70%);
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(240, 240, 242, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(240, 240, 242, 0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 30%, transparent 75%);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid rgba(129, 140, 248, 0.35);
  background: rgba(79, 70, 229, 0.12);
  color: #c7d2fe;
  font: 500 13px/1 var(--font-sans);
  margin-bottom: 22px;
}
.pill .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent-light);
  box-shadow: 0 0 10px var(--accent-light);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(0.8); }
}

.hero h1 {
  font-size: clamp(38px, 5.6vw, 62px);
  letter-spacing: -0.035em;
  line-height: 1.05;
  margin-bottom: 20px;
}
.hero h1 .accent-line {
  background: linear-gradient(100deg, #a5b4fc, #818cf8 45%, #6366f1);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lede {
  font-size: 18.5px;
  line-height: 1.65;
  color: var(--ink-muted);
  max-width: 520px;
  margin-bottom: 32px;
}

.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }

/* staged load reveal */
.stage {
  opacity: 0;
  transform: translateY(18px);
  animation: stage-in 0.7s var(--ease) forwards;
}
.stage-1 { animation-delay: 0.05s; }
.stage-2 { animation-delay: 0.16s; }
.stage-3 { animation-delay: 0.27s; }
.stage-4 { animation-delay: 0.38s; }
.stage-5 { animation-delay: 0.52s; }
@keyframes stage-in { to { opacity: 1; transform: translateY(0); } }

/* ---------- Chat mockup (signature element) ---------- */

.chat-window {
  position: relative;
  background: var(--ink-bg-2);
  border: 1px solid var(--ink-border);
  border-radius: 14px;
  box-shadow:
    0 40px 80px -30px rgba(0, 0, 0, 0.6),
    0 0 60px -20px var(--accent-glow);
  overflow: hidden;
  perspective: 1200px;
}

.stage-tilt {
  opacity: 0;
  transform: translateY(26px) rotateX(7deg);
  transform-origin: 50% 100%;
  animation: tilt-in 1s var(--ease) 0.45s forwards;
}
@keyframes tilt-in { to { opacity: 1; transform: translateY(0) rotateX(0); } }

.chat-titlebar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--ink-border);
  background: var(--ink-bg);
}
.traffic { display: flex; gap: 6px; }
.traffic span { width: 11px; height: 11px; border-radius: 50%; display: block; }
.traffic span:nth-child(1) { background: #f4726f; }
.traffic span:nth-child(2) { background: #f5bd4f; }
.traffic span:nth-child(3) { background: #61c455; }
.chat-channel {
  font: 600 13px/1 var(--font-sans);
  color: var(--ink-fg);
  display: flex;
  align-items: center;
  gap: 6px;
}
.chat-channel .hash { color: var(--accent-light); font-weight: 700; }
.chat-presence {
  margin-left: auto;
  font: 500 12px/1 var(--font-sans);
  color: var(--ink-muted);
  display: flex; align-items: center; gap: 6px;
}
.chat-presence::before {
  content: "";
  width: 7px; height: 7px; border-radius: 50%;
  background: #55d58a;
}

.chat-body {
  padding: 18px 16px 16px;
  min-height: 380px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.msg {
  display: flex;
  gap: 12px;
  opacity: 0;
  transform: translateY(10px) scale(0.985);
}
.msg.shown {
  opacity: 1;
  transform: none;
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
}

.avatar {
  width: 34px; height: 34px;
  flex: none;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font: 700 13px/1 var(--font-sans);
  color: #fff;
}
.avatar.a-customer { background: #b45309; }
.avatar.a-agent { background: #2458c5; }
.avatar.a-ai {
  background: linear-gradient(135deg, #6366f1, #4338ca);
  box-shadow: 0 0 14px -2px var(--accent-glow);
}

.msg-content { min-width: 0; }
.msg-meta {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 3px;
}
.msg-author { font: 600 13.5px/1 var(--font-sans); color: var(--ink-fg); }
.msg-time { font: 400 11.5px/1 var(--font-sans); color: #6f717a; }
.badge-ai {
  font: 600 10px/1 var(--font-sans);
  letter-spacing: 0.06em;
  color: #c7d2fe;
  background: rgba(99, 102, 241, 0.22);
  border: 1px solid rgba(129, 140, 248, 0.35);
  border-radius: 5px;
  padding: 3px 6px;
}
.msg-text {
  font: 400 14px/1.55 var(--font-sans);
  color: #d6d7dc;
  margin: 0;
}
.msg-text .mention { color: var(--accent-light); background: rgba(99,102,241,0.16); border-radius: 4px; padding: 1px 4px; font-weight: 500; }

.msg-card {
  margin-top: 8px;
  border: 1px solid var(--ink-border);
  border-left: 3px solid var(--accent-light);
  background: var(--ink-card);
  border-radius: 8px;
  padding: 10px 12px;
  font: 500 12.5px/1.5 var(--font-sans);
  color: #b9bac2;
}
.msg-card strong { color: var(--ink-fg); }

.typing {
  display: none;
  gap: 12px;
  align-items: center;
}
.typing.shown { display: flex; }
.typing .dots {
  display: inline-flex;
  gap: 4px;
  padding: 10px 14px;
  background: var(--ink-card);
  border: 1px solid var(--ink-border);
  border-radius: 12px;
}
.typing .dots i {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #85878f;
  animation: bounce 1.2s infinite;
}
.typing .dots i:nth-child(2) { animation-delay: 0.15s; }
.typing .dots i:nth-child(3) { animation-delay: 0.3s; }
@keyframes bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30% { transform: translateY(-4px); opacity: 1; }
}
.typing-label { font: 500 12px/1 var(--font-sans); color: #85878f; }

.chat-inputbar {
  margin: 0 16px 16px;
  border: 1px solid var(--ink-border);
  background: var(--ink-bg);
  border-radius: 10px;
  padding: 11px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #6f717a;
  font: 400 13.5px/1 var(--font-sans);
}
.chat-inputbar .send {
  margin-left: auto;
  width: 28px; height: 28px;
  border-radius: 7px;
  background: var(--accent);
  display: flex; align-items: center; justify-content: center;
}
.chat-inputbar .send svg { width: 14px; height: 14px; }

/* ---------- Marquee ---------- */

.marquee-section {
  padding: 26px 0;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.marquee-wrap {
  position: relative;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track {
  display: flex;
  gap: 14px;
  width: max-content;
  animation: marquee 36s linear infinite;
}
.marquee-wrap:hover .marquee-track,
.marquee-track.paused { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--sunken);
  font: 500 13.5px/1 var(--font-sans);
  color: var(--fg-muted);
  white-space: nowrap;
}
.chip svg { width: 15px; height: 15px; color: var(--accent); flex: none; }

.marquee-controls {
  text-align: center;
  margin-top: 10px;
}
.marquee-pause {
  border: none;
  background: none;
  color: var(--fg-subtle);
  font: 500 12px/1 var(--font-sans);
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 6px;
}
.marquee-pause:hover { color: var(--fg); background: var(--surface-2); }

/* ---------- Scroll reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  transition-delay: calc(var(--i, 0) * 90ms);
}
.in-view .reveal, .reveal.in-view {
  opacity: 1;
  transform: none;
}

/* ---------- Pillar cards (cursor glow) ---------- */

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

.glow-card {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface);
  padding: 30px 28px;
  overflow: hidden;
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.glow-card:hover {
  border-color: rgba(79, 70, 229, 0.4);
  transform: translateY(-3px);
  box-shadow: 0 20px 40px -24px rgba(28, 28, 31, 0.25);
}
.glow-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(420px circle at var(--gx, 50%) var(--gy, 0%), rgba(79, 70, 229, 0.1), transparent 65%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.glow-card:hover::before { opacity: 1; }

.card-icon {
  width: 44px; height: 44px;
  border-radius: 11px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}
.card-icon svg { width: 22px; height: 22px; }

.glow-card h3 { font-size: 19px; letter-spacing: -0.02em; }
.glow-card p { font-size: 14.5px; color: var(--fg-muted); margin: 0; }
.glow-card .card-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 16px;
  font: 600 14px/1 var(--font-sans);
}
.glow-card .card-link svg { width: 14px; height: 14px; transition: transform 0.2s var(--ease); }
.glow-card .card-link:hover svg { transform: translateX(3px); }

/* ---------- Stats band ---------- */

.stats-band {
  background: var(--ink-bg);
  color: var(--ink-fg);
  padding: 72px 0;
  position: relative;
  overflow: hidden;
}
.stats-band::before {
  content: "";
  position: absolute;
  width: 700px; height: 700px;
  bottom: -500px; left: 50%;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(79, 70, 229, 0.25), transparent 70%);
}
.stats-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  text-align: center;
}
.stat-num {
  font-size: clamp(34px, 4vw, 52px);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
  font-variant-numeric: tabular-nums;
}
.stat-num .suffix { color: var(--accent-light); }
.stat-label { font-size: 14px; color: var(--ink-muted); margin-top: 6px; }

/* ---------- Alternating feature rows ---------- */

.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  padding: 72px 0;
}
.feature-row + .feature-row { border-top: 1px solid var(--border); }
.feature-row.flip .feature-visual { order: -1; }

.feature-copy h2 {
  font-size: clamp(26px, 3.2vw, 36px);
  letter-spacing: -0.03em;
}
.feature-copy p { color: var(--fg-muted); font-size: 16.5px; }

.feature-list {
  list-style: none;
  padding: 0;
  margin: 22px 0 26px;
  display: grid;
  gap: 12px;
}
.feature-list li {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  font-size: 15px;
  color: var(--fg);
}
.feature-list li svg {
  width: 18px; height: 18px;
  flex: none;
  margin-top: 2px;
  color: var(--accent);
}

/* feature visual panels */
.feature-visual { position: relative; }

.panel {
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: #fff;
  box-shadow: 0 24px 60px -30px rgba(28, 28, 31, 0.3);
  overflow: hidden;
}
.panel-dark {
  background: var(--ink-bg-2);
  border-color: var(--ink-border);
  color: var(--ink-fg);
}
.panel-head {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
  font: 600 13px/1 var(--font-sans);
  color: var(--fg-muted);
}
.panel-dark .panel-head { border-color: var(--ink-border); color: var(--ink-muted); }
.panel-body { padding: 18px; }

.float-card {
  position: absolute;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 18px 40px -18px rgba(28, 28, 31, 0.35);
  padding: 12px 15px;
  font: 500 13px/1.45 var(--font-sans);
  color: var(--fg);
  animation: floaty 6s ease-in-out infinite alternate;
  max-width: 240px;
}
.float-card.delay { animation-delay: 1.6s; }
@keyframes floaty {
  from { transform: translateY(-5px); }
  to { transform: translateY(7px); }
}
.float-card .fc-title {
  display: flex; align-items: center; gap: 7px;
  font-weight: 700; font-size: 12.5px;
  margin-bottom: 4px;
}
.float-card .fc-title svg { width: 14px; height: 14px; color: var(--accent); }
.float-card .fc-sub { color: var(--fg-muted); font-weight: 400; }

/* ---------- Feature tile grid ---------- */

.tile-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 44px;
}
.tile {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  background: var(--surface);
  transition: border-color 0.2s, transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.tile:hover {
  border-color: rgba(79, 70, 229, 0.35);
  transform: translateY(-2px);
  box-shadow: 0 14px 30px -18px rgba(28, 28, 31, 0.2);
}
.tile h4 { font-size: 15.5px; margin-bottom: 5px; display: flex; align-items: center; gap: 9px; }
.tile h4 svg { width: 17px; height: 17px; color: var(--accent); flex: none; }
.tile p { font-size: 13.5px; color: var(--fg-muted); margin: 0; }

/* ---------- Trust strip ---------- */

.trust-strip {
  background: var(--ink-bg);
  color: var(--ink-fg);
  padding: 84px 0;
  position: relative;
  overflow: hidden;
}
.trust-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 44px;
}
.trust-item {
  border: 1px solid var(--ink-border);
  border-radius: var(--radius-lg);
  background: rgba(24, 24, 27, 0.6);
  padding: 22px;
}
.trust-item h4 {
  font-size: 15px;
  display: flex; align-items: center; gap: 10px;
  color: var(--ink-fg);
  margin-bottom: 6px;
}
.trust-item h4 svg { width: 18px; height: 18px; color: var(--accent-light); flex: none; }
.trust-item p { font-size: 13.5px; color: var(--ink-muted); margin: 0; }

/* ---------- Forms / opt-in ---------- */

.form-section {
  background: var(--sunken);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.form-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: 0 30px 70px -40px rgba(28, 28, 31, 0.35);
  padding: 40px;
  max-width: 640px;
  margin-inline: auto;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-grid .full { grid-column: 1 / -1; }

.field label {
  display: block;
  font: 600 13.5px/1 var(--font-sans);
  margin-bottom: 7px;
  color: var(--fg);
}
.field .optional {
  font-weight: 400;
  color: var(--fg-subtle);
  font-size: 12px;
}
.field input, .field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  font: 400 15px/1.4 var(--font-sans);
  color: var(--fg);
  background: var(--surface);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}
.field textarea { resize: vertical; min-height: 96px; }

.consent-box {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--sunken);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.consent-box:hover { border-color: var(--border-strong); }
.consent-box input {
  width: 18px; height: 18px;
  margin: 2px 0 0;
  flex: none;
  accent-color: var(--accent);
  cursor: pointer;
}
.consent-box span { font-size: 12.5px; line-height: 1.55; color: var(--fg-muted); }

.form-legal {
  font-size: 12.5px;
  color: var(--fg-subtle);
  text-align: center;
  margin: 14px 0 0;
}

.form-status {
  display: none;
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 10px;
  font: 500 14px/1.4 var(--font-sans);
}
.form-status.sending { display: block; background: var(--accent-soft); color: var(--accent-strong); }
.form-status.error { display: block; background: #fdecec; color: #c02c2c; }

/* ---------- CTA band ---------- */

.cta-band {
  position: relative;
  background: linear-gradient(135deg, #4338ca, #4f46e5 55%, #6366f1);
  color: #fff;
  padding: 88px 0;
  overflow: hidden;
  text-align: center;
}
.cta-band::before {
  content: "";
  position: absolute;
  width: 600px; height: 600px;
  top: -320px; right: -160px;
  background: radial-gradient(closest-side, rgba(255, 255, 255, 0.18), transparent 70%);
}
.cta-band::after {
  content: "";
  position: absolute;
  width: 500px; height: 500px;
  bottom: -300px; left: -120px;
  background: radial-gradient(closest-side, rgba(255, 255, 255, 0.12), transparent 70%);
}
.cta-band h2 {
  position: relative;
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: -0.03em;
  margin-bottom: 14px;
}
.cta-band p {
  position: relative;
  font-size: 17px;
  color: rgba(255, 255, 255, 0.85);
  max-width: 560px;
  margin: 0 auto 30px;
}
.cta-band .hero-cta { position: relative; justify-content: center; }
.cta-band .btn-ghost { color: #fff; border-color: rgba(255, 255, 255, 0.45); }
.cta-band .btn-ghost:hover { background: rgba(255, 255, 255, 0.12); border-color: #fff; }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--ink-bg);
  color: var(--ink-muted);
  padding: 64px 0 32px;
  font-size: 14px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 40px;
  padding-bottom: 44px;
  border-bottom: 1px solid var(--ink-border);
}
.footer-brand .brand { color: var(--ink-fg); margin-bottom: 14px; }
.footer-brand p { font-size: 13.5px; max-width: 260px; }

.footer-col h5 {
  font: 600 13px/1 var(--font-sans);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-fg);
  margin: 0 0 16px;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-col a { color: var(--ink-muted); }
.footer-col a:hover { color: var(--ink-fg); text-decoration: none; }

.footer-contact li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.footer-contact svg { width: 16px; height: 16px; flex: none; margin-top: 3px; color: var(--accent-light); }

.footer-bottom {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  padding-top: 26px;
  font-size: 13px;
}
.footer-bottom .legal-links { display: flex; gap: 18px; margin-left: auto; }
.footer-bottom a { color: var(--ink-muted); }
.footer-bottom a:hover { color: var(--ink-fg); }

/* ---------- Page hero (interior pages) ---------- */

.page-hero {
  padding: calc(var(--nav-h) + 56px) 0 64px;
  background: var(--ink-bg);
  color: var(--ink-fg);
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: "";
  position: absolute;
  width: 760px; height: 760px;
  top: -460px; left: 50%;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(79, 70, 229, 0.3), transparent 70%);
}
.page-hero h1 {
  position: relative;
  font-size: clamp(34px, 4.8vw, 52px);
  letter-spacing: -0.035em;
}
.page-hero .section-lede { position: relative; color: var(--ink-muted); }

/* ---------- How-it-works scrolly ---------- */

.scrolly {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}
.scrolly-steps { display: grid; gap: 0; }
.scrolly-step {
  padding: 48px 0;
  border-left: 2px solid var(--border);
  padding-left: 32px;
  position: relative;
  opacity: 0.35;
  transition: opacity 0.4s var(--ease);
}
.scrolly-step.active { opacity: 1; }
.scrolly-step.active::before { background: var(--accent); box-shadow: 0 0 0 5px rgba(79, 70, 229, 0.18); }
.scrolly-step::before {
  content: "";
  position: absolute;
  left: -7px; top: 58px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--border-strong);
  transition: background 0.3s, box-shadow 0.3s;
}
.scrolly-step h3 { font-size: 22px; }
.scrolly-step p { color: var(--fg-muted); font-size: 15.5px; }

.scrolly-sticky {
  position: sticky;
  top: calc(var(--nav-h) + 32px);
}
.scrolly-panel { display: none; }
.scrolly-panel.active { display: block; animation: panel-in 0.5s var(--ease); }
@keyframes panel-in {
  from { opacity: 0; transform: translateY(14px) scale(0.99); }
  to { opacity: 1; transform: none; }
}

/* diagram bits used inside scrolly panels */
.diagram {
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, #fff, var(--sunken));
  padding: 28px;
  min-height: 380px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  justify-content: center;
  box-shadow: 0 24px 60px -34px rgba(28, 28, 31, 0.3);
}
.d-node {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 10px;
  padding: 12px 16px;
  font: 600 13.5px/1.3 var(--font-sans);
  display: flex;
  align-items: center;
  gap: 10px;
}
.d-node svg { width: 17px; height: 17px; color: var(--accent); flex: none; }
.d-node .d-sub { font-weight: 400; font-size: 12px; color: var(--fg-muted); display: block; }
.d-node.d-accent { border-color: rgba(79, 70, 229, 0.45); background: var(--accent-soft); }
.d-arrow {
  align-self: center;
  color: var(--fg-subtle);
  font-size: 16px;
  line-height: 1;
}
.d-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.d-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.d-lock {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: 600 11.5px/1 var(--font-sans);
  color: var(--success);
  background: var(--success-soft);
  border-radius: 6px;
  padding: 4px 8px;
}
.d-lock svg { width: 12px; height: 12px; }

/* ---------- Pricing ---------- */

.billing-toggle {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  background: var(--sunken);
  border-radius: 999px;
  padding: 4px;
  position: relative;
  margin: 26px auto 0;
  gap: 2px;
}
.billing-toggle button {
  position: relative;
  z-index: 1;
  border: none;
  background: none;
  padding: 9px 20px;
  border-radius: 999px;
  font: 600 14px/1 var(--font-sans);
  color: var(--fg-muted);
  cursor: pointer;
  transition: color 0.2s;
}
.billing-toggle button.on { color: #fff; background: var(--accent); }
.billing-toggle .save-tag {
  font: 600 11px/1 var(--font-sans);
  color: var(--success);
  background: var(--success-soft);
  border-radius: 999px;
  padding: 4px 8px;
  margin-right: 6px;
}

.plans {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 48px;
  align-items: stretch;
}
.plan {
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: #fff;
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.plan:hover { transform: translateY(-4px); box-shadow: 0 24px 50px -30px rgba(28, 28, 31, 0.3); }
.plan.featured {
  border: 2px solid var(--accent);
  box-shadow: 0 30px 70px -35px var(--accent-glow);
}
.plan-badge {
  position: absolute;
  top: -13px; left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #fff;
  font: 600 11.5px/1 var(--font-sans);
  letter-spacing: 0.04em;
  border-radius: 999px;
  padding: 6px 14px;
  white-space: nowrap;
}
.plan h3 { font-size: 20px; margin-bottom: 4px; }
.plan .plan-desc { font-size: 13.5px; color: var(--fg-muted); min-height: 42px; margin-bottom: 14px; }
.plan .price {
  font-size: 44px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
}
.plan .price .per { font-size: 14px; font-weight: 500; color: var(--fg-subtle); letter-spacing: 0; }
.plan .price-note { font-size: 12.5px; color: var(--fg-subtle); margin: 6px 0 22px; }
.plan ul {
  list-style: none;
  padding: 0;
  margin: 0 0 26px;
  display: grid;
  gap: 10px;
  flex: 1;
}
.plan li {
  display: flex;
  gap: 10px;
  font-size: 14px;
  align-items: flex-start;
}
.plan li svg { width: 16px; height: 16px; color: var(--accent); flex: none; margin-top: 3px; }
.plan .btn { width: 100%; }

.compare-wrap {
  overflow-x: auto;
  margin-top: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.compare {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  min-width: 680px;
  background: #fff;
}
.compare th, .compare td {
  padding: 13px 18px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.compare thead th {
  font: 600 14px/1.3 var(--font-sans);
  background: var(--sunken);
  position: sticky;
  top: 0;
}
.compare thead th:first-child { width: 34%; }
.compare .group-row td {
  background: var(--sunken);
  font: 600 12.5px/1 var(--font-sans);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-subtle);
}
.compare td:not(:first-child), .compare th:not(:first-child) { text-align: center; }
.compare .yes { color: var(--accent); font-weight: 700; }
.compare .no { color: var(--border-strong); }

.faq { margin-top: 48px; display: grid; gap: 12px; }
.faq details {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: #fff;
  padding: 0 22px;
}
.faq summary {
  cursor: pointer;
  font: 600 15.5px/1.4 var(--font-sans);
  padding: 18px 0;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-size: 20px;
  font-weight: 400;
  color: var(--fg-subtle);
  transition: transform 0.25s var(--ease);
  flex: none;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--fg-muted); font-size: 14.5px; padding-bottom: 18px; margin: 0; }

/* ---------- Contact page ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 48px;
  align-items: start;
}

.info-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  background: #fff;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.info-card + .info-card { margin-top: 14px; }
.info-card .card-icon { margin: 0; flex: none; }
.info-card h4 { font-size: 15px; margin-bottom: 3px; }
.info-card p { margin: 0; font-size: 14px; color: var(--fg-muted); }
.info-card a { font-weight: 600; }

/* ---------- Thank-you page ---------- */

.thanks-hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: var(--ink-bg);
  color: var(--ink-fg);
  position: relative;
  overflow: hidden;
  padding: calc(var(--nav-h) + 40px) 0 80px;
}
.thanks-hero::before {
  content: "";
  position: absolute;
  width: 900px; height: 900px;
  top: -420px; left: 50%;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(79, 70, 229, 0.32), transparent 70%);
}
.thanks-card { position: relative; text-align: center; max-width: 620px; margin-inline: auto; }
.check-ring {
  width: 88px; height: 88px;
  margin: 0 auto 28px;
  border-radius: 50%;
  background: rgba(85, 213, 138, 0.12);
  border: 1px solid rgba(85, 213, 138, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: ring-pop 0.7s var(--ease) 0.2s both;
}
.check-ring svg { width: 40px; height: 40px; color: #55d58a; }
@keyframes ring-pop {
  from { transform: scale(0.5); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.thanks-card h1 { font-size: clamp(32px, 4.5vw, 46px); }
.thanks-card p { color: var(--ink-muted); font-size: 17px; }
.next-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 36px 0;
  text-align: left;
}
.next-steps .step {
  border: 1px solid var(--ink-border);
  background: rgba(24, 24, 27, 0.6);
  border-radius: var(--radius-lg);
  padding: 18px;
}
.next-steps .step b { display: block; color: var(--ink-fg); font-size: 14px; margin-bottom: 4px; }
.next-steps .step span { font-size: 12.5px; color: var(--ink-muted); line-height: 1.5; display: block; }
.next-steps .step .n {
  display: inline-flex;
  width: 24px; height: 24px;
  border-radius: 7px;
  background: rgba(99, 102, 241, 0.22);
  color: #c7d2fe;
  align-items: center;
  justify-content: center;
  font: 700 12px/1 var(--font-sans);
  margin-bottom: 10px;
}

/* ---------- Legal prose ---------- */

.prose {
  padding: 64px 0 96px;
}
.prose h2 { font-size: 24px; margin-top: 42px; }
.prose h3 { font-size: 18px; margin-top: 30px; }
.prose p, .prose li { color: var(--fg-muted); font-size: 15.5px; }
.prose .updated {
  font-size: 13.5px;
  color: var(--fg-subtle);
  border: 1px solid var(--border);
  background: var(--sunken);
  display: inline-block;
  border-radius: 999px;
  padding: 7px 14px;
  margin-bottom: 8px;
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .stage, .stage-tilt, .reveal { opacity: 1 !important; transform: none !important; }
  .msg { opacity: 1; transform: none; }
  .marquee-track { animation: none; flex-wrap: wrap; width: auto; justify-content: center; }
}

/* ---------- Responsive ---------- */

@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .hero-lede { max-width: 620px; }
  .chat-window { max-width: 640px; }
  .pillars, .trust-grid, .tile-grid { grid-template-columns: 1fr 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 40px 24px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .nav-links, .nav-actions { display: none; }
  .nav-toggle { display: inline-flex; }
  .section-pad { padding: 72px 0; }
  .feature-row { grid-template-columns: 1fr; gap: 36px; padding: 56px 0; }
  .feature-row.flip .feature-visual { order: 0; }
  .scrolly { grid-template-columns: 1fr; }
  .scrolly-sticky { position: static; margin-top: 8px; display: none; }
  .scrolly-step { opacity: 1; }
  .scrolly-step .step-inline-visual { display: block; margin-top: 20px; }
  .plans { grid-template-columns: 1fr; max-width: 460px; margin-inline: auto; }
  .contact-grid { grid-template-columns: 1fr; }
  .next-steps { grid-template-columns: 1fr; }
  .form-card { padding: 26px 20px; }
  .form-grid { grid-template-columns: 1fr; }
}

@media (min-width: 861px) {
  .scrolly-step .step-inline-visual { display: none; }
}

@media (max-width: 560px) {
  .float-card { display: none; }
  .pillars, .trust-grid, .tile-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero { padding-top: calc(var(--nav-h) + 40px); }
  .hero-cta .btn { width: 100%; }
  .chat-body { min-height: 330px; }
}
