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

:root {
  --bg: #070c17;
  --fg: #edf1f5;
  --muted: #8a9ab5;
  --primary: #34d399;
  --primary-dim: rgba(52, 211, 153, 0.08);
  --border: rgba(255, 255, 255, 0.06);
  --card: rgba(255, 255, 255, 0.025);
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

html.lenis, html.lenis body {
  height: auto;
}

body {
  width: 100%;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ─── Background ─── */
.bg-wrap {
  position: fixed;
  inset: 0;
  z-index: 0;
}

.smoke-fallback {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(58% 46% at 22% 12%, #0076544d, #0000 68%),
    radial-gradient(52% 44% at 82% 26%, #005c4a47, #0000 66%),
    radial-gradient(64% 48% at 48% 96%, #00684e3d, #0000 70%);
}

#fog-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.bg-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(112% 82% at 50% 42%, #0000 50%, #010207b3);
  pointer-events: none;
}

/* ─── Page ─── */
.page {
  position: relative;
  z-index: 1;
}

[data-parallax] {
  will-change: transform;
}

/* ─── Nav ─── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  padding: 0 24px;
  backdrop-filter: blur(16px);
  background: rgba(7, 12, 23, 0.6);
  border-bottom: 1px solid var(--border);
  transition: background 0.4s var(--ease-out), border-color 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out);
}

.nav.scrolled {
  background: rgba(7, 12, 23, 0.88);
  border-bottom-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 30px -8px rgba(0, 0, 0, 0.5);
}

.nav-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--fg);
}

.nav-logo {
  width: 28px;
  height: auto;
  color: var(--primary);
  filter: drop-shadow(0 0 8px rgba(52, 211, 153, 0.3));
  transition: filter 0.3s;
}

.nav-brand:hover .nav-logo {
  filter: drop-shadow(0 0 14px rgba(52, 211, 153, 0.5));
}

.nav-title {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.01em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted);
  padding: 8px 14px;
  border-radius: 4px;
  transition: color 0.25s, background 0.25s;
}

.nav-link:hover {
  color: var(--fg);
  background: rgba(255, 255, 255, 0.04);
}

.nav-link-primary {
  color: var(--primary);
  border: 1px solid rgba(52, 211, 153, 0.25);
}

.nav-link-primary:hover {
  background: var(--primary-dim);
  color: var(--primary);
}

/* ─── Hero ─── */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 200px 24px 80px;
  max-width: 760px;
  margin: 0 auto;
}

.hero-title {
  font-size: clamp(44px, 7.5vw, 76px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.035em;
  margin-bottom: 24px;
}

.text-primary {
  color: var(--primary);
}

.hero-sub {
  font-size: 18px;
  color: var(--muted);
  max-width: 500px;
  line-height: 1.7;
  margin-bottom: 44px;
  font-weight: 400;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

/* ─── Buttons ─── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  color: #070c17;
  background: var(--primary);
  padding: 15px 32px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: all 0.35s var(--ease-out);
  position: relative;
  overflow: hidden;
}

.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.35s;
}

.btn-primary:hover {
  background: #5eead4;
  box-shadow: 0 4px 32px -4px rgba(52, 211, 153, 0.45), 0 0 0 1px rgba(52, 211, 153, 0.15);
  transform: translateY(-2px);
}

.btn-primary:hover::after {
  opacity: 1;
}

.btn-primary:active {
  transform: translateY(0);
  transition-duration: 0.1s;
}

/* ─── Stats ─── */
.stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 48px;
  padding: 24px 24px 100px;
  max-width: 700px;
  margin: 0 auto;
  flex-wrap: wrap;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  opacity: 0;
  transform: translateY(20px) scale(0.92);
  transition: opacity 0.8s var(--ease-out),
              transform 0.8s var(--ease-out);
}

.stat.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.stat-val {
  font-family: var(--font-mono);
  font-size: 36px;
  font-weight: 700;
  color: var(--fg);
  letter-spacing: -0.02em;
  position: relative;
}

.stat.visible .stat-val {
  animation: statPop 0.6s var(--ease-out) forwards;
}

@keyframes statPop {
  0% { transform: scale(0.7); opacity: 0; }
  60% { transform: scale(1.08); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

.stat-val::after {
  content: '';
  position: absolute;
  inset: -4px -8px;
  border-radius: 8px;
  background: radial-gradient(ellipse, rgba(52, 211, 153, 0.12), transparent 70%);
  opacity: 0;
  transition: opacity 0.6s;
  pointer-events: none;
}

.stat.visible .stat-val::after {
  animation: statGlow 1.5s var(--ease-out) forwards;
}

@keyframes statGlow {
  0% { opacity: 0; }
  40% { opacity: 1; }
  100% { opacity: 0; }
}

.stat-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.stat-divider {
  width: 1px;
  height: 40px;
  background: var(--border);
}

/* ─── Sections ─── */
.eyebrow {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 48px;
}

/* ─── Features ─── */
.features {
  max-width: 1120px;
  margin: 0 auto;
  padding: 80px 24px;
  text-align: center;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.feature-card {
  text-align: left;
  padding: 32px 28px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
  backdrop-filter: blur(12px);
  transition: all 0.5s var(--ease-out);
}

.feature-card:hover {
  border-color: rgba(52, 211, 153, 0.15);
  transform: translateY(-6px);
  box-shadow: 0 20px 50px -16px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(52, 211, 153, 0.06);
}

.feature-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--primary-dim);
  color: var(--primary);
  margin-bottom: 20px;
}

.feature-title {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 8px;
}

.feature-desc {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.65;
}

/* ─── How It Works ─── */
.how {
  max-width: 1000px;
  margin: 0 auto;
  padding: 80px 24px 100px;
  text-align: center;
}

.steps {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 0;
}

.step {
  flex: 1;
  max-width: 280px;
  text-align: center;
  padding: 36px 24px 32px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--card);
  backdrop-filter: blur(12px);
  transition: all 0.5s var(--ease-out);
  position: relative;
}

.step:hover {
  border-color: rgba(52, 211, 153, 0.12);
  transform: translateY(-4px);
  box-shadow: 0 16px 48px -12px rgba(0, 0, 0, 0.4);
}

.step-icon-wrap {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  margin: 0 auto 16px;
  border-radius: 12px;
  background: var(--primary-dim);
  color: var(--primary);
  transition: all 0.4s var(--ease-out);
}

.step:hover .step-icon-wrap {
  background: rgba(52, 211, 153, 0.14);
  box-shadow: 0 0 20px -4px rgba(52, 211, 153, 0.2);
}

.step-num {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  opacity: 0.4;
  letter-spacing: 0.1em;
  margin-bottom: 10px;
}

.step-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.step-desc {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.65;
}

.step-connector {
  display: flex;
  align-items: center;
  padding: 0 4px;
  flex-shrink: 0;
}

.step-connector-line {
  width: 40px;
  height: 1px;
  background: linear-gradient(90deg, var(--border), rgba(52, 211, 153, 0.15), var(--border));
}

/* ─── CTA ─── */
.cta {
  padding: 60px 24px 100px;
}

.cta-inner {
  max-width: 580px;
  margin: 0 auto;
  text-align: center;
  padding: 60px 44px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(7, 12, 23, 0.45);
  backdrop-filter: blur(16px);
  position: relative;
  overflow: hidden;
}

.cta-glow {
  position: absolute;
  top: -60px;
  left: 50%;
  transform: translateX(-50%);
  width: 280px;
  height: 120px;
  background: radial-gradient(ellipse, rgba(52, 211, 153, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.cta-logo {
  width: 40px;
  height: auto;
  color: var(--primary);
  margin-bottom: 24px;
  filter: drop-shadow(0 0 12px rgba(52, 211, 153, 0.3));
}

.cta-title {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 10px;
}

.cta-desc {
  font-size: 15px;
  color: var(--muted);
  margin-bottom: 28px;
}

/* ─── Footer ─── */
.footer {
  border-top: 1px solid var(--border);
  padding: 32px 24px;
}

.footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.footer-logo {
  width: 20px;
  height: auto;
  color: var(--primary);
  opacity: 0.6;
}

.footer-copy {
  font-size: 12px;
  color: var(--muted);
  opacity: 0.5;
}

/* ─── Reveal Animations ─── */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.9s var(--ease-out),
              transform 0.9s var(--ease-out);
  will-change: opacity, transform;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* stagger hero children */
.hero .reveal:nth-child(1) { transition-delay: 0.15s; }
.hero .reveal:nth-child(2) { transition-delay: 0.3s; }
.hero .reveal:nth-child(3) { transition-delay: 0.45s; }

/* stagger feature cards */
.feature-card.reveal:nth-child(1) { transition-delay: 0s; }
.feature-card.reveal:nth-child(2) { transition-delay: 0.08s; }
.feature-card.reveal:nth-child(3) { transition-delay: 0.16s; }
.feature-card.reveal:nth-child(4) { transition-delay: 0.24s; }

/* stagger steps */
.step.reveal:nth-child(1) { transition-delay: 0s; }
.step.reveal:nth-child(3) { transition-delay: 0.12s; }
.step.reveal:nth-child(5) { transition-delay: 0.24s; }

/* stat stagger handled in JS */

/* ─── Responsive ─── */
@media (max-width: 640px) {
  .nav-links { gap: 4px; }
  .nav-link { font-size: 10px; padding: 6px 10px; }
  .hero { padding: 160px 20px 60px; }
  .hero-title { font-size: clamp(36px, 10vw, 52px); }
  .stats { gap: 24px; }
  .stat-divider { display: none; }
  .steps { flex-direction: column; align-items: center; gap: 16px; }
  .step-connector { padding: 4px 0; }
  .step-connector-line { width: 1px; height: 28px; background: linear-gradient(180deg, var(--border), rgba(52, 211, 153, 0.15), var(--border)); }
  .step { max-width: 100%; }
  .cta-inner { padding: 40px 24px; }
  .footer-inner { flex-direction: column; text-align: center; }
}

/* ─── Selection ─── */
::selection {
  background: rgba(52, 211, 153, 0.25);
  color: var(--fg);
}

/* ─── Scrollbar ─── */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(7, 12, 23, 0.4);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(52, 211, 153, 0.18), rgba(52, 211, 153, 0.06));
  border-radius: 8px;
  border: 2px solid transparent;
  background-clip: padding-box;
  transition: background 0.3s;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(52, 211, 153, 0.35), rgba(52, 211, 153, 0.12));
  background-clip: padding-box;
}

::-webkit-scrollbar-thumb:active {
  background: linear-gradient(180deg, rgba(52, 211, 153, 0.5), rgba(52, 211, 153, 0.2));
  background-clip: padding-box;
}

/* Firefox scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(52, 211, 153, 0.15) transparent;
}
