/* Lekha AI — site stylesheet
   Design tokens follow the website PRD (section 4: Brand & Design System) */

:root {
  /* Ink palette */
  --ink-900: #0A0F1C;
  --ink-800: #111827;
  --ink-700: #1F2937;
  --ink-600: #374151;
  --ink-500: #6B7280;
  --ink-400: #9CA3AF;
  --ink-300: #D1D5DB;
  --ink-200: #E5E7EB;
  --ink-100: #F3F4F6;
  --ink-50:  #FAFAF8;

  /* Accent — deep teal */
  --accent: #0F766E;
  --accent-hover: #0D5F58;
  --accent-soft: #CCFBF1;
  --accent-soft-2: #E6FAF6;

  /* Functional */
  --success: #16A34A;
  --warn: #D97706;
  --danger: #DC2626;

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

  /* Layout */
  --container: 1200px;
  --container-wide: 1280px;
  --container-prose: 896px;

  /* Radius */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 12px;
  --r-xl: 16px;
  --r-2xl: 20px;
  --r-pill: 999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(10, 15, 28, 0.04), 0 1px 1px rgba(10, 15, 28, 0.02);
  --shadow-md: 0 4px 12px -2px rgba(10, 15, 28, 0.06), 0 2px 4px -2px rgba(10, 15, 28, 0.04);
  --shadow-lg: 0 18px 40px -12px rgba(10, 15, 28, 0.10), 0 8px 16px -8px rgba(10, 15, 28, 0.06);
}

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

body {
  font-family: var(--font-sans);
  color: var(--ink-800);
  background: var(--ink-50);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01", "cv11";
  font-size: 16px;
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }

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

/* Tabular numbers */
.tnum { font-variant-numeric: tabular-nums; font-family: var(--font-mono); letter-spacing: -0.01em; }

/* Container */
.container { width: 100%; max-width: var(--container-wide); margin-inline: auto; padding-inline: 32px; }
@media (max-width: 720px) { .container { padding-inline: 20px; } }

/* Section */
.section { padding-block: 112px; }
.section-tight { padding-block: 80px; }
@media (max-width: 720px) { .section { padding-block: 72px; } }

.bg-ink-50 { background: var(--ink-50); }
.bg-ink-100 { background: var(--ink-100); }
.bg-white { background: #ffffff; }
.bg-ink-900 { background: var(--ink-900); color: #E5E7EB; }
.bg-ink-900 h1, .bg-ink-900 h2, .bg-ink-900 h3 { color: #fff; }

/* Type scale */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; line-height: 1; letter-spacing: 0.08em; text-transform: uppercase;
  font-weight: 600;
  color: var(--accent);
}
.eyebrow::before { content: ""; width: 6px; height: 6px; background: var(--accent); border-radius: 999px; }

.display-2xl { font-size: 72px; line-height: 1.05; letter-spacing: -0.025em; font-weight: 700; color: var(--ink-900); }
.display-xl  { font-size: 60px; line-height: 1.07; letter-spacing: -0.022em; font-weight: 700; color: var(--ink-900); }
.display-lg  { font-size: 48px; line-height: 1.1;  letter-spacing: -0.02em;  font-weight: 700; color: var(--ink-900); }
.display-md  { font-size: 36px; line-height: 1.18; letter-spacing: -0.015em; font-weight: 700; color: var(--ink-900); }
.display-sm  { font-size: 28px; line-height: 1.25; letter-spacing: -0.012em; font-weight: 600; color: var(--ink-900); }

@media (max-width: 900px) {
  .display-2xl { font-size: 48px; }
  .display-xl  { font-size: 40px; }
  .display-lg  { font-size: 34px; }
  .display-md  { font-size: 28px; }
}

.lead { font-size: 20px; line-height: 1.55; color: var(--ink-600); }
.body { font-size: 16px; line-height: 1.65; color: var(--ink-600); }
.muted { color: var(--ink-500); }

.bg-ink-900 .lead, .bg-ink-900 .body, .bg-ink-900 .muted { color: #B6BEC9; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 22px;
  border-radius: var(--r-lg);
  font-family: var(--font-sans);
  font-size: 15px; font-weight: 600; letter-spacing: -0.005em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease, transform 120ms ease;
}
.btn-primary { background: var(--ink-900); color: #fff; }
.btn-primary:hover { background: var(--ink-700); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-hover); }
.btn-ghost { background: transparent; color: var(--ink-800); border-color: var(--ink-200); }
.btn-ghost:hover { background: var(--ink-100); }
.btn-sm { height: 38px; padding: 0 16px; font-size: 14px; border-radius: 8px; }
.btn-arrow::after { content: "→"; transition: transform 160ms ease; }
.btn-arrow:hover::after { transform: translateX(2px); }

/* Pill / badge */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  font-size: 12px; font-weight: 500; letter-spacing: 0;
  background: #fff; color: var(--ink-700);
  border: 1px solid var(--ink-200);
  border-radius: 999px;
}
.pill-soft { background: var(--accent-soft); border-color: transparent; color: #0a554e; }
.pill-dark { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.12); color: #D1FAE5; }
.pill-live::before { content: ""; width: 6px; height: 6px; background: var(--success); border-radius: 999px; }
.pill-soon::before { content: ""; width: 6px; height: 6px; background: var(--ink-400); border-radius: 999px; }

/* Card */
.card {
  background: #fff;
  border: 1px solid var(--ink-200);
  border-radius: var(--r-xl);
  padding: 28px;
}
.card-dark {
  background: #0F1626;
  border: 1px solid #1E2A40;
  color: #B6BEC9;
}

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 250, 248, 0.85);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--ink-200);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.nav-left { display: flex; align-items: center; gap: 40px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; color: var(--ink-900); }
.brand-mark {
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--ink-900);
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-mono);
  font-weight: 700; font-size: 14px;
  letter-spacing: -0.02em;
}
.brand-name { letter-spacing: -0.01em; }
.brand-name .dot { color: var(--accent); }
.nav-links { display: flex; gap: 28px; }
.nav-links a { font-size: 14px; color: var(--ink-600); font-weight: 500; }
.nav-links a:hover { color: var(--ink-900); }
.nav-links a.active { color: var(--ink-900); }
.nav-right { display: flex; align-items: center; gap: 14px; }

/* Footer */
.footer { background: #0F1626; color: #B6BEC9; padding: 80px 0 36px; position: relative; }
.footer h4 { color: #fff; font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; font-weight: 600; margin: 0 0 16px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; align-items: start; }
.footer-grid a { color: #B6BEC9; font-size: 14px; line-height: 2; }
.footer-grid a:hover { color: #fff; }
.footer .brand { color: #fff; }
.footer .brand-mark { background: #fff; color: var(--ink-900); }
.footer-bottom { margin-top: 64px; padding-top: 24px; border-top: 1px solid #1E2A40; display: flex; justify-content: space-between; font-size: 13px; color: var(--ink-500); }
@media (max-width: 720px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 12px; }
}

/* Stat strip */
.stat-strip {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
  border: 1px solid var(--ink-200);
  border-radius: var(--r-xl);
  background: #fff;
  overflow: hidden;
}
.stat-strip > div { padding: 24px 28px; border-left: 1px solid var(--ink-200); }
.stat-strip > div:first-child { border-left: 0; }
.stat-strip .num { font-family: var(--font-mono); font-size: 28px; font-weight: 600; color: var(--ink-900); letter-spacing: -0.02em; }
.stat-strip .lbl { font-size: 13px; color: var(--ink-500); margin-top: 6px; }
@media (max-width: 900px) { .stat-strip { grid-template-columns: repeat(2, 1fr); }
  .stat-strip > div:nth-child(3) { border-left: 0; border-top: 1px solid var(--ink-200); }
  .stat-strip > div:nth-child(4) { border-top: 1px solid var(--ink-200); }
}

/* Generic grid */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media (max-width: 980px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px)  { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* Utility */
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.col { display: flex; flex-direction: column; gap: 12px; }
.mt-4 { margin-top: 16px; } .mt-6 { margin-top: 24px; } .mt-8 { margin-top: 32px; } .mt-10 { margin-top: 40px; } .mt-12 { margin-top: 48px; } .mt-16 { margin-top: 64px; }
.text-center { text-align: center; }
.divider { height: 1px; background: var(--ink-200); }
.kbd {
  display: inline-block; padding: 2px 7px; font-family: var(--font-mono); font-size: 12px;
  background: #fff; color: var(--ink-700);
  border: 1px solid var(--ink-200); border-bottom-width: 2px;
  border-radius: 6px;
}

/* Hero grid bg */
.grid-bg {
  background-image:
    linear-gradient(var(--ink-200) 1px, transparent 1px),
    linear-gradient(90deg, var(--ink-200) 1px, transparent 1px);
  background-size: 64px 64px;
  background-position: -1px -1px;
}
.grid-bg-soft {
  background-image:
    linear-gradient(rgba(15,118,110,0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15,118,110,0.07) 1px, transparent 1px);
  background-size: 48px 48px;
}

/* Checkmark */
.check {
  width: 18px; height: 18px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent);
  display: inline-flex; align-items: center; justify-content: center;
  flex: 0 0 18px;
}
.check svg { width: 11px; height: 11px; }

/* Accordion */
details.faq {
  border-top: 1px solid var(--ink-200);
  padding: 22px 0;
}
details.faq:last-of-type { border-bottom: 1px solid var(--ink-200); }
details.faq summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  font-size: 17px; font-weight: 500; color: var(--ink-900); letter-spacing: -0.005em;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after {
  content: "+"; font-family: var(--font-mono); font-size: 22px; color: var(--ink-400); font-weight: 400;
  transition: transform 200ms ease;
}
details.faq[open] summary::after { content: "−"; }
details.faq .answer {
  margin-top: 14px; color: var(--ink-600); font-size: 16px; line-height: 1.65; max-width: 720px;
}

/* Sample doc preview tile */
.doc-tile {
  position: relative;
  aspect-ratio: 8.5/11;
  background: #fff;
  border: 1px solid var(--ink-200);
  border-radius: 10px;
  padding: 18px;
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 8px; line-height: 1.5;
  color: var(--ink-400);
}
.doc-tile .doc-line { height: 4px; background: var(--ink-100); border-radius: 2px; margin-bottom: 4px; }
.doc-tile .doc-line.w-60 { width: 60%; } .doc-tile .doc-line.w-40 { width: 40%; }
.doc-tile .doc-line.w-80 { width: 80%; } .doc-tile .doc-line.w-30 { width: 30%; }
.doc-tile .watermark {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  transform: rotate(-22deg); color: rgba(15,118,110,0.10);
  font-family: var(--font-sans); font-weight: 700; font-size: 28px; letter-spacing: 0.2em;
}

/* Timeline */
.timeline { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; position: relative; }
.timeline .axis {
  position: absolute; left: 24px; right: 24px; top: 22px; height: 2px; background: var(--ink-200);
  z-index: 0;
}
.timeline .day { position: relative; padding-right: 16px; }
.timeline .node {
  width: 44px; height: 44px; border-radius: 999px;
  background: #fff; border: 1px solid var(--ink-200);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-weight: 600; font-size: 13px; color: var(--ink-700);
  position: relative; z-index: 1;
  margin-bottom: 18px;
}
.timeline .day.live .node { background: var(--accent); color: #fff; border-color: var(--accent); }
.timeline .day h4 { margin: 0 0 6px; font-size: 16px; color: var(--ink-900); font-weight: 600; letter-spacing: -0.005em; }
.timeline .day p { margin: 0; font-size: 13.5px; color: var(--ink-600); line-height: 1.55; }
@media (max-width: 900px) {
  .timeline { grid-template-columns: 1fr; gap: 24px; }
  .timeline .axis { display: none; }
}

/* Page progress chip in nav */
.chip-live { font-size: 11px; padding: 2px 8px; background: var(--accent-soft); color: var(--accent); border-radius: 999px; font-weight: 600; letter-spacing: 0.02em; }

/* =====================================================
   MOTION & TRANSITIONS  — added in v2
   ===================================================== */

/* Soft fades into and out of dark sections, so the page doesn't
   slam from warm-white to ink-900. */
.fade-into-dark {
  height: 96px;
  background: linear-gradient(to bottom, var(--ink-100) 0%, #0F1626 100%);
  position: relative;
  overflow: hidden;
}
.fade-into-dark::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    radial-gradient(rgba(15,118,110,0.18) 1px, transparent 1.4px);
  background-size: 22px 22px;
  background-position: center;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 100%);
          mask-image: linear-gradient(to bottom, transparent 0%, black 100%);
  opacity: 0.5;
}
.fade-from-dark {
  height: 96px;
  background: linear-gradient(to bottom, #0F1626 0%, var(--ink-50) 100%);
  position: relative;
  overflow: hidden;
}
.fade-from-dark::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    radial-gradient(rgba(15,118,110,0.18) 1px, transparent 1.4px);
  background-size: 22px 22px;
  background-position: center;
  -webkit-mask-image: linear-gradient(to top, transparent 0%, black 100%);
          mask-image: linear-gradient(to top, transparent 0%, black 100%);
  opacity: 0.5;
}

/* Dark section recolored — slightly warmer & non-black so the eye relaxes. */
.bg-ink-deep {
  background: #0F1626;
  color: #E5E7EB;
  position: relative;
}
.bg-ink-deep h1, .bg-ink-deep h2, .bg-ink-deep h3 { color: #fff; }
.bg-ink-deep .lead, .bg-ink-deep .body, .bg-ink-deep .muted { color: #B6BEC9; }
/* Spotlight glow at top of dark section, behind content */
.bg-ink-deep .spotlight {
  position: absolute; inset: -20% 0 auto 0; height: 60%;
  background: radial-gradient(60% 80% at 50% 0%, rgba(15,118,110,0.22) 0%, rgba(15,118,110,0) 70%);
  pointer-events: none;
}

/* Reveal-on-scroll */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 700ms cubic-bezier(.2,.7,.2,1), transform 700ms cubic-bezier(.2,.7,.2,1); will-change: opacity, transform; }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: 60ms; }
.reveal[data-delay="2"] { transition-delay: 120ms; }
.reveal[data-delay="3"] { transition-delay: 180ms; }
.reveal[data-delay="4"] { transition-delay: 240ms; }
.reveal[data-delay="5"] { transition-delay: 300ms; }
.reveal[data-delay="6"] { transition-delay: 360ms; }
.reveal[data-delay="7"] { transition-delay: 420ms; }
.reveal[data-delay="8"] { transition-delay: 480ms; }

/* Live pulse (used on Live status pills) */
@keyframes pulse-live {
  0%   { box-shadow: 0 0 0 0 rgba(22,163,74,0.55); }
  70%  { box-shadow: 0 0 0 7px rgba(22,163,74,0); }
  100% { box-shadow: 0 0 0 0 rgba(22,163,74,0); }
}
.pill-live::before { animation: pulse-live 2.2s ease-out infinite; }
.pill-soft.pill-live::before { background: var(--success); }

/* Card hover lift */
.card-hover { transition: transform 220ms cubic-bezier(.2,.7,.2,1), box-shadow 220ms cubic-bezier(.2,.7,.2,1), border-color 220ms ease; }
.card-hover:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--ink-300); }

/* Generic float (used on hero glyphs) */
@keyframes float-y {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}

/* Slow rotate (used on the 80% ring) */
@keyframes spin-slow {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* Marching ants — used on data-moat connectors */
@keyframes dash {
  to { stroke-dashoffset: -32; }
}

/* Live agent ticker */
.ticker {
  display: flex; align-items: center; gap: 12px;
  background: #fff; border: 1px solid var(--ink-200); border-radius: 999px;
  padding: 8px 14px 8px 10px;
  font-family: var(--font-mono); font-size: 12.5px;
  overflow: hidden; max-width: 100%;
}
.ticker-dot { width: 8px; height: 8px; background: var(--success); border-radius: 999px; flex: 0 0 8px;
  animation: pulse-live 2.2s ease-out infinite; }
.ticker-label { color: var(--ink-500); flex: 0 0 auto; }
.ticker-strip { flex: 1; overflow: hidden; position: relative; height: 18px; }
.ticker-strip .row {
  position: absolute; inset: 0;
  display: flex; gap: 32px;
  animation: ticker-scroll 28s linear infinite;
  will-change: transform;
  white-space: nowrap;
}
.ticker-strip span { color: var(--ink-700); }
.ticker-strip span b { color: var(--accent); font-weight: 600; }
@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* Animated 80/20 ring (homepage) */
.ring-80 { transform: rotate(-90deg); }
.ring-80 .arc { fill: none; stroke: #0a554e; stroke-width: 18; stroke-linecap: round; transition: stroke-dashoffset 1400ms cubic-bezier(.2,.7,.2,1); }
.ring-80 .track { fill: none; stroke: rgba(10,85,78,0.18); stroke-width: 18; }

/* Counter element — keeps tnum styling but allows animated text */
.counter[data-counter] { display: inline-block; min-width: 1ch; }

/* Day timeline node — animated when in view */
.timeline .day .node { transition: transform 260ms cubic-bezier(.2,.7,.2,1), box-shadow 260ms ease; }
.timeline .day .node.lit { transform: scale(1.06); box-shadow: 0 0 0 6px rgba(15,118,110,0.10); }
.timeline .day.lit .node { background: var(--accent); border-color: var(--accent); color: #fff; }
.timeline .day:not(.lit) .node { background: #fff; border-color: var(--ink-200); color: var(--ink-700); }
.timeline .axis-fill {
  position: absolute; left: 24px; top: 22px; height: 2px; background: var(--accent);
  z-index: 0; width: 0; transition: width 700ms cubic-bezier(.2,.7,.2,1);
}
@media (max-width: 900px) {
  .timeline .axis-fill { display: none; }
}

/* Hover micro-interaction for nav links */
.nav-links a { position: relative; }
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -22px; height: 2px;
  background: var(--accent); transform: scaleX(0); transform-origin: left;
  transition: transform 260ms cubic-bezier(.2,.7,.2,1);
}
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(0.6); }
.nav-links a.active::after { transform: scaleX(1); }

/* Pricing toggle — animated indicator */
.toggle {
  display: inline-flex; background:#fff; border: 1px solid var(--ink-200);
  border-radius: 999px; padding: 4px; position: relative;
}
.toggle .opt {
  background: transparent; border: 0; padding: 8px 18px; border-radius: 999px;
  font-size: 13px; font-weight: 500; cursor: pointer; color: var(--ink-600);
  position: relative; z-index: 2; transition: color 200ms ease;
  white-space: nowrap;
}
.toggle .opt.active { color: #fff; }
.toggle .indicator {
  position: absolute; top: 4px; bottom: 4px; left: 4px;
  background: var(--ink-900); border-radius: 999px;
  transition: transform 320ms cubic-bezier(.2,.8,.2,1), width 320ms cubic-bezier(.2,.8,.2,1);
  z-index: 1;
}

/* Tier card hover */
.tier { transition: transform 260ms cubic-bezier(.2,.7,.2,1), box-shadow 260ms ease, border-color 260ms ease; }
.tier:not(.tier-featured):hover { transform: translateY(-3px); border-color: var(--ink-300); box-shadow: var(--shadow-md); }
.tier-featured:hover { transform: translateY(-11px); }

/* Animated underline on accent links */
.link-arrow { color: var(--accent); font-weight: 500; position: relative; display: inline-block; }
.link-arrow::after { content: " →"; display: inline-block; transition: transform 200ms ease; }
.link-arrow:hover::after { transform: translateX(3px); }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal.in { opacity: 1 !important; transform: none !important; transition: none !important; }
  .ticker-strip .row, .pill-live::before, .ticker-dot { animation: none !important; }
}

/* =====================================================
   Brand mark — SVG glyph version sits alongside text
   ===================================================== */
.brand-svg { width: 32px; height: 32px; flex: 0 0 32px; }
/* legacy inline-SVG color rules; harmless for the new <img> brand logo */
.brand-svg .arc { fill: none; stroke: var(--ink-900); stroke-width: 2.4; stroke-linecap: round; }
.brand-svg .dot { fill: var(--accent); }
.footer .brand-svg .arc { stroke: #fff; }
.footer .brand-svg .dot { fill: #6DD5C8; }

/* =====================================================
   Hero animated background — restrained, on-brand
   ===================================================== */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: 110px 80px;
  isolation: isolate;
}

/* Layer 1 — slow morphing teal mesh, very low opacity */
.hero-mesh {
  position: absolute; inset: -10%;
  z-index: -3;
  background:
    radial-gradient(38% 55% at 15% 28%, rgba(15,118,110,0.16) 0%, rgba(15,118,110,0) 70%),
    radial-gradient(34% 50% at 82% 70%, rgba(15,118,110,0.10) 0%, rgba(15,118,110,0) 70%),
    radial-gradient(28% 45% at 65% 18%, rgba(204,251,241,0.55) 0%, rgba(204,251,241,0) 75%),
    radial-gradient(40% 55% at 30% 90%, rgba(217,119,6,0.05)  0%, rgba(217,119,6,0)  70%);
  filter: blur(36px);
  animation: hero-mesh 22s ease-in-out infinite alternate;
}
@keyframes hero-mesh {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(-26px, 14px) scale(1.04); }
  100% { transform: translate(20px, -10px) scale(1.06); }
}

/* Layer 2 — dotted grid, fades out radially so it doesn't crowd the type */
.hero-grid {
  position: absolute; inset: 0;
  z-index: -2;
  background-image: radial-gradient(rgba(15,118,110,0.16) 1px, transparent 1.4px);
  background-size: 28px 28px;
  background-position: center;
  -webkit-mask-image: radial-gradient(70% 80% at 65% 50%, black 30%, transparent 100%);
          mask-image: radial-gradient(70% 80% at 65% 50%, black 30%, transparent 100%);
  opacity: 0.85;
}

/* Layer 3 — pulsing accent dots scattered across the hero */
.hero-pulses { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.hero-pulses i {
  position: absolute; width: 8px; height: 8px; border-radius: 999px;
  background: var(--accent); opacity: 0;
  box-shadow: 0 0 0 0 rgba(15,118,110,0.30);
  animation: hero-dot 7s ease-in-out infinite;
}
@keyframes hero-dot {
  0%, 100% { opacity: 0; transform: scale(0.6); box-shadow: 0 0 0 0 rgba(15,118,110,0.30); }
  20%      { opacity: 0.85; transform: scale(1); box-shadow: 0 0 0 0 rgba(15,118,110,0.30); }
  60%      { opacity: 0; transform: scale(1.4); box-shadow: 0 0 0 12px rgba(15,118,110,0); }
}

/* Layer 4 — slow rotating dashed ring, decorative */
.hero-ring {
  position: absolute; top: -120px; right: -200px;
  width: 640px; height: 640px;
  z-index: -1; pointer-events: none;
  animation: spin-slow 90s linear infinite;
  opacity: 0.4;
}
.hero-ring .r1, .hero-ring .r2, .hero-ring .r3 { fill: none; stroke: rgba(15,118,110,0.45); }
.hero-ring .r1 { stroke-dasharray: 2 8; stroke-width: 1; }
.hero-ring .r2 { stroke-dasharray: 4 10; stroke-width: 1; }
.hero-ring .r3 { stroke-dasharray: 6 14; stroke-width: 1; }

/* Reduced motion stillness */
@media (prefers-reduced-motion: reduce) {
  .hero-mesh, .hero-ring, .hero-pulses i { animation: none !important; }
}

/* =====================================================
   Hero — interactive layer
   ===================================================== */

/* Cursor spotlight — radial glow follows mouse */
.hero-spotlight {
  position: absolute; inset: 0;
  z-index: -2; pointer-events: none;
  background: radial-gradient(
    340px circle at var(--mx, 50%) var(--my, 40%),
    rgba(15,118,110,0.18) 0%,
    rgba(15,118,110,0) 60%
  );
  transition: opacity 240ms ease;
}
.hero { cursor: crosshair; }
.hero .container,
.hero .btn,
.hero a,
.hero button,
.hero .ticker,
.hero .live-close,
.hero .stat-strip,
.hero input { cursor: auto; }

/* Click-spawn pill */
.spawn-pill {
  position: absolute;
  z-index: 5; pointer-events: none;
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--ink-200);
  padding: 5px 11px; border-radius: 999px;
  color: var(--accent);
  box-shadow: 0 6px 20px -8px rgba(15,118,110,0.45);
  transform-origin: center;
  animation: spawn-pop 1.7s cubic-bezier(.2,.7,.2,1) forwards;
  white-space: nowrap;
}
@keyframes spawn-pop {
  0%   { opacity: 0; transform: translate(-50%, -50%) scale(0.4); }
  18%  { opacity: 1; transform: translate(-50%, -50%) scale(1.05); }
  100% { opacity: 0; transform: translate(-50%, -180%) scale(0.95); }
}

/* Magnetic button — JS sets transform; we just smooth it */
.btn-magnetic { transition: transform 220ms cubic-bezier(.2,.7,.2,1), background 120ms ease; }

/* =====================================================
   Live Close demo widget
   ===================================================== */
.live-close {
  background: #fff;
  border: 1px solid var(--ink-200);
  border-radius: 18px;
  padding: 22px;
  box-shadow: 0 24px 60px -22px rgba(10, 15, 28, 0.16), 0 4px 12px -6px rgba(10, 15, 28, 0.06);
  width: 100%;
  max-width: 440px;
  position: relative;
  overflow: hidden;
}
.live-close::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(120% 60% at 50% -10%, rgba(204,251,241,0.6), transparent 70%);
}
.lc-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--ink-100); position: relative; }
.lc-title { font-size: 15px; font-weight: 600; color: var(--ink-900); letter-spacing: -0.005em; }
.lc-sub { font-size: 12px; color: var(--ink-500); margin-top: 2px; font-family: var(--font-mono); }
.lc-progress { height: 4px; background: var(--ink-100); border-radius: 999px; overflow: hidden; margin: 16px 0 8px; }
.lc-progress .bar { height: 100%; width: 0%; background: linear-gradient(90deg, var(--accent), #2DD4BF); border-radius: 999px; transition: width 600ms cubic-bezier(.2,.7,.2,1); }
.lc-tasks { display: flex; flex-direction: column; padding: 4px 0; }
.lc-task { display: flex; align-items: center; gap: 12px; padding: 9px 0; position: relative; }
.lc-task .icon {
  width: 24px; height: 24px; border-radius: 7px;
  background: var(--ink-100); color: var(--ink-500);
  display: flex; align-items: center; justify-content: center;
  flex: 0 0 24px;
  font-family: var(--font-mono); font-size: 10.5px; font-weight: 600;
  transition: background 280ms ease, color 280ms ease, transform 280ms ease;
}
.lc-task .label { flex: 1; font-size: 13.5px; color: var(--ink-700); line-height: 1.4; }
.lc-task .meta { font-family: var(--font-mono); font-size: 11px; color: var(--ink-400); flex: 0 0 auto; }
.lc-task.active .icon { background: var(--accent-soft); color: var(--accent); transform: scale(1.08); animation: pulse-live 1.4s ease-out infinite; }
.lc-task.active .meta { color: var(--accent); }
.lc-task.done .icon { background: var(--accent); color: #fff; transform: scale(1); animation: none; }
.lc-task.done .label { color: var(--ink-900); }
.lc-task.done .meta { color: var(--success); }
.lc-task.done .meta::before { content: "✓ "; }

.lc-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; height: 44px;
  background: var(--ink-900); color: #fff;
  border: 0; border-radius: 12px;
  font-family: var(--font-sans); font-size: 14px; font-weight: 600; letter-spacing: -0.005em;
  cursor: pointer;
  margin-top: 14px;
  transition: background 160ms ease, transform 160ms ease;
  position: relative; overflow: hidden;
}
.lc-button:hover { background: var(--ink-700); }
.lc-button:active { transform: translateY(1px); }
.lc-button.running { background: var(--accent); pointer-events: none; }
.lc-button.done { background: var(--success); }
.lc-button .play-glyph { width: 14px; height: 14px; }
.lc-button.running .play-glyph,
.lc-button.done .play-glyph { display: none; }
.lc-button .spinner {
  display: none; width: 14px; height: 14px; border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff; border-radius: 999px; animation: spin-slow 0.8s linear infinite;
}
.lc-button.running .spinner { display: inline-block; animation-duration: 0.8s; }

.lc-foot {
  font-size: 11px; color: var(--ink-400); text-align: center; margin-top: 12px;
  font-family: var(--font-mono); letter-spacing: 0.02em;
}
.lc-foot kbd {
  display: inline-block; padding: 1px 6px; font-family: var(--font-mono); font-size: 10px;
  background: var(--ink-100); color: var(--ink-700);
  border: 1px solid var(--ink-200); border-radius: 4px;
}

/* Confetti badge — tiny floating tags during 'Match' step */
.lc-confetti { position: absolute; pointer-events: none; z-index: 4;
  font-family: var(--font-mono); font-size: 10px; font-weight: 600;
  background: var(--accent-soft); color: var(--accent);
  padding: 2px 7px; border-radius: 999px;
  animation: confetti-up 1.4s cubic-bezier(.2,.7,.2,1) forwards;
}
@keyframes confetti-up {
  0%   { opacity: 0; transform: translate(-50%, 0) scale(0.6); }
  20%  { opacity: 1; transform: translate(-50%, -20px) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -64px) scale(0.95); }
}

/* Hero 2-col layout */
.hero-grid-2col {
  display: grid;
  grid-template-columns: 1.35fr 0.95fr;
  gap: 64px;
  align-items: center;
}
@media (max-width: 1080px) {
  .hero-grid-2col { grid-template-columns: 1fr; gap: 48px; }
}
