/* ============================================================
   AlignIt Landing Page — style.css
   Aesthetic: Bio-digital organism. Deep-space dark, bioluminescent accent.
   Typography: Instrument Serif (display) + DM Mono (data/labels)
   ============================================================ */

/* ── Custom Properties ──────────────────────────────────────── */
:root {
  /* Dark theme (default) — unified design system */
  --bg:            #0a0a0f;
  --bg-secondary:  #0e0e18;
  --bg-panel:      #141420;
  --bg-card:       #141420;
  --bg-card-hover: #1a1a28;
  --border:        rgba(30, 30, 46, 0.9);
  --border-accent: rgba(0, 229, 160, 0.25);
  --text:          #e0e0e8;
  --text-muted:    #888898;
  --text-faint:    #3a3a52;
  --accent:        #00e5a0;
  --accent-dim:    rgba(0, 229, 160, 0.10);
  --accent-glow:   rgba(0, 229, 160, 0.35);
  --accent-pulse:  rgba(0, 229, 160, 0.07);
  --heading:       #e0e0e8;
  --serif:         'Instrument Serif', Georgia, serif;
  --mono:          'DM Mono', 'Fira Mono', monospace;

  /* Layout */
  --container:     1160px;
  --header-h:      72px;
  --section-pad-y: clamp(80px, 12vw, 140px);

  /* Motion */
  --ease-out:      cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring:   cubic-bezier(0.34, 1.56, 0.64, 1);
  --transition:    0.3s var(--ease-out);
}

[data-theme="light"] {
  --bg:            #f8f8fa;
  --bg-secondary:  #f0f0f6;
  --bg-panel:      #ffffff;
  --bg-card:       #ffffff;
  --bg-card-hover: #f8f8fc;
  --border:        rgba(224, 224, 232, 0.9);
  --border-accent: rgba(0, 180, 120, 0.3);
  --text:          #1a1a2e;
  --text-muted:    #666680;
  --text-faint:    #c4c4d4;
  --accent:        #00cc8e;
  --accent-dim:    rgba(0, 184, 120, 0.08);
  --accent-glow:   rgba(0, 184, 120, 0.3);
  --accent-pulse:  rgba(0, 184, 120, 0.05);
  --heading:       #1a1a2e;
}

/* ── Reset & Base ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  font-size: 16px;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--serif);
  line-height: 1.65;
  overflow-x: hidden;
  transition: background-color 0.4s var(--ease-out), color 0.4s var(--ease-out);
}

/* Grain texture overlay — baked into pseudo-element */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
  opacity: 0.6;
}

[data-theme="light"] body::before { opacity: 0.3; }

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; background: none; border: none; font: inherit; color: inherit; }
ul, ol { list-style: none; }

/* ── Typography helpers ─────────────────────────────────────── */
.mono-label {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.body-large {
  font-family: var(--serif);
  font-size: clamp(1.05rem, 1.8vw, 1.2rem);
  line-height: 1.75;
  color: var(--text);
}

.body-large em {
  font-style: italic;
  color: var(--heading);
}

/* ── Skip link ──────────────────────────────────────────────── */
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 10000;
  padding: 8px 16px;
  background: var(--accent);
  color: #06060d;
  font-family: var(--mono);
  font-size: 12px;
  border-radius: 4px;
  transition: top 0.2s;
}
.skip-link:focus { top: 16px; }

/* ── Layout ─────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 60px);
}

.section {
  padding: var(--section-pad-y) 0;
  position: relative;
}

/* ── Header ─────────────────────────────────────────────────── */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  background: rgba(6, 6, 13, 0.7);
  border-bottom: 1px solid var(--border);
  transition: background-color 0.4s var(--ease-out), border-color 0.4s var(--ease-out);
}

[data-theme="light"] .site-header {
  background: rgba(244, 244, 248, 0.8);
}

.header-inner {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 60px);
  display: flex;
  align-items: center;
  gap: 32px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--accent);
  flex-shrink: 0;
  transition: opacity var(--transition);
}
.logo:hover { opacity: 0.8; }

.logo-text {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--heading);
  letter-spacing: -0.01em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.nav-link {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: 4px;
  transition: color var(--transition), background var(--transition);
}
.nav-link:hover { color: var(--text); background: var(--accent-dim); }

.nav-cta {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: var(--accent);
  border: 1px solid var(--border-accent);
  padding: 7px 18px;
  border-radius: 4px;
  margin-left: 8px;
  transition: background var(--transition), box-shadow var(--transition), color var(--transition);
}
.nav-cta:hover {
  background: var(--accent-dim);
  box-shadow: 0 0 20px var(--accent-glow);
}

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 6px;
  color: var(--text-muted);
  transition: color var(--transition), background var(--transition);
  flex-shrink: 0;
  margin-left: 4px;
}
.theme-toggle:hover { color: var(--text); background: var(--accent-dim); }

.theme-icon { display: flex; align-items: center; justify-content: center; }

[data-theme="dark"] .theme-icon--dark { display: none; }
[data-theme="light"] .theme-icon--light { display: none; }

/* ── Mobile nav ─────────────────────────────────────────────── */
.nav-mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 28px;
  padding: 4px;
  margin-left: 8px;
}
.nav-mobile-toggle span {
  display: block;
  height: 1.5px;
  background: var(--text-muted);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s, background 0.25s;
  transform-origin: center;
}
.nav-mobile-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-mobile-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-mobile-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.mobile-nav {
  position: fixed;
  inset: var(--header-h) 0 0 0;
  z-index: 90;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: opacity 0.3s var(--ease-out), transform 0.3s var(--ease-out);
}
.mobile-nav[aria-hidden="false"] {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}

.mobile-nav-link {
  font-family: var(--serif);
  font-size: 2rem;
  color: var(--text-muted);
  transition: color 0.2s;
}
.mobile-nav-link:hover { color: var(--heading); }

.mobile-nav-cta {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.1em;
  color: var(--accent);
  border: 1px solid var(--border-accent);
  padding: 12px 32px;
  border-radius: 4px;
  margin-top: 16px;
  transition: background var(--transition), box-shadow var(--transition);
}
.mobile-nav-cta:hover {
  background: var(--accent-dim);
  box-shadow: 0 0 30px var(--accent-glow);
}

/* ── Hero ───────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100svh;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding-top: var(--header-h);
}

.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.65;
}

[data-theme="light"] .hero-canvas { opacity: 0.35; }

/* Atmospheric glow orbs */
.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}
.hero-orb--1 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(0, 229, 160, 0.12) 0%, transparent 70%);
  top: -100px;
  right: -100px;
  animation: orb-drift 18s ease-in-out infinite;
}
.hero-orb--2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(100, 100, 255, 0.08) 0%, transparent 70%);
  bottom: 0;
  left: -80px;
  animation: orb-drift 22s ease-in-out infinite reverse;
}

[data-theme="light"] .hero-orb--1 { background: radial-gradient(circle, rgba(0, 184, 120, 0.1) 0%, transparent 70%); }
[data-theme="light"] .hero-orb--2 { background: radial-gradient(circle, rgba(100, 100, 255, 0.06) 0%, transparent 70%); }

@keyframes orb-drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%       { transform: translate(40px, 30px) scale(1.05); }
  66%       { transform: translate(-20px, 50px) scale(0.97); }
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 clamp(20px, 5vw, 60px);
  max-width: 900px;
  animation: hero-enter 1.2s var(--ease-out) both;
}

@keyframes hero-enter {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 32px;
  animation: hero-enter 1s 0.15s var(--ease-out) both;
}

.hero-heading {
  font-family: var(--serif);
  font-size: clamp(3rem, 9vw, 7.5rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--heading);
  margin-bottom: 28px;
  animation: hero-enter 1s 0.25s var(--ease-out) both;
}

.hero-heading em {
  font-style: italic;
  color: var(--accent);
  text-shadow: 0 0 60px var(--accent-glow), 0 0 120px rgba(0, 229, 160, 0.15);
  animation: pulse-text 4s ease-in-out infinite;
}

@keyframes pulse-text {
  0%, 100% { text-shadow: 0 0 60px var(--accent-glow), 0 0 120px rgba(0, 229, 160, 0.15); }
  50%       { text-shadow: 0 0 90px var(--accent-glow), 0 0 180px rgba(0, 229, 160, 0.25); }
}

[data-theme="light"] .hero-heading em {
  text-shadow: 0 0 40px rgba(0, 184, 120, 0.3);
  animation: none;
}

.hero-sub {
  font-family: var(--serif);
  font-size: clamp(1.1rem, 2.2vw, 1.4rem);
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 48px;
  animation: hero-enter 1s 0.4s var(--ease-out) both;
}

.br-desk { display: none; }
@media (min-width: 600px) { .br-desk { display: block; } }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  animation: hero-enter 1s 0.55s var(--ease-out) both;
}

/* ── CTA buttons ────────────────────────────────────────────── */
.cta-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  color: #06060d;
  background: var(--accent);
  padding: 14px 32px;
  border-radius: 6px;
  transition: transform 0.2s var(--ease-spring), box-shadow 0.3s var(--ease-out), background 0.2s;
  box-shadow: 0 0 0 0 var(--accent-glow);
  position: relative;
  overflow: hidden;
}

.cta-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, transparent 60%);
  pointer-events: none;
}

.cta-primary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 0 40px var(--accent-glow), 0 8px 30px rgba(0,0,0,0.3);
}

.cta-primary:active { transform: translateY(0) scale(0.99); }

.cta-ghost {
  display: inline-flex;
  align-items: center;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 14px 24px;
  border: 1px solid var(--border);
  border-radius: 6px;
  transition: color var(--transition), border-color var(--transition), background var(--transition);
}
.cta-ghost:hover {
  color: var(--text);
  border-color: var(--border-accent);
  background: var(--accent-dim);
}

/* ── Pulse dot ──────────────────────────────────────────────── */
.pulse-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  position: relative;
  flex-shrink: 0;
}
.pulse-dot::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.4;
  animation: pulse-ring 2s ease-out infinite;
}

.pulse-dot--sm { width: 6px; height: 6px; }
.pulse-dot--sm::after { inset: -3px; }

@keyframes pulse-ring {
  0%   { transform: scale(0.8); opacity: 0.5; }
  100% { transform: scale(2.5); opacity: 0; }
}

/* ── Scroll indicator ───────────────────────────────────────── */
.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  z-index: 2;
  animation: hero-enter 1s 0.9s var(--ease-out) both;
}

.scroll-line {
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, var(--text-muted), transparent);
  animation: scroll-pulse 2s ease-in-out infinite;
}

@keyframes scroll-pulse {
  0%, 100% { opacity: 0.4; transform: scaleY(1); }
  50%       { opacity: 0.9; transform: scaleY(1.1); }
}

/* ── Section label + heading ────────────────────────────────── */
.section-label {
  margin-bottom: 24px;
  color: var(--accent);
}

.section-heading {
  font-family: var(--serif);
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.025em;
  color: var(--heading);
}

.section-heading em {
  font-style: italic;
  color: var(--accent);
}

.section-heading.centered { text-align: center; }

/* ── What is AlignIt ────────────────────────────────────────── */
.what-is {
  border-top: 1px solid var(--border);
}

.what-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 100px);
  align-items: start;
  margin-top: 16px;
}

.what-text { position: sticky; top: calc(var(--header-h) + 40px); }

.what-body { display: flex; flex-direction: column; gap: 24px; }

.what-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.tag {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: var(--accent);
  border: 1px solid var(--border-accent);
  padding: 5px 12px;
  border-radius: 3px;
  background: var(--accent-dim);
  transition: box-shadow var(--transition);
}
.tag:hover { box-shadow: 0 0 16px var(--accent-glow); }

/* ── How it's different ─────────────────────────────────────── */
.different {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.different::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--border-accent), transparent);
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  margin-top: clamp(48px, 7vw, 80px);
}

.card {
  background: var(--bg-card);
  padding: clamp(32px, 4vw, 52px) clamp(28px, 3vw, 44px);
  display: flex;
  flex-direction: column;
  gap: 20px;
  transition: background var(--transition);
  position: relative;
  overflow: hidden;
}

.card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(to right, transparent, var(--accent-dim), transparent);
  opacity: 0;
  transition: opacity var(--transition);
}

.card:hover { background: var(--bg-card-hover); }
.card:hover::after { opacity: 1; }

.card--accent { background: var(--bg-panel); }
.card--accent .card-icon { color: var(--accent); }
.card--accent .card-num { color: var(--accent); opacity: 0.6; }

.card-icon {
  color: var(--text-faint);
  transition: color var(--transition), filter var(--transition);
  width: 40px;
}
.card:hover .card-icon { color: var(--accent); filter: drop-shadow(0 0 8px var(--accent-glow)); }
.card--accent .card-icon { color: var(--accent); filter: drop-shadow(0 0 8px var(--accent-glow)); }

.card-num {
  font-size: 10px;
  color: var(--text-faint);
  letter-spacing: 0.2em;
}

.card-heading {
  font-family: var(--serif);
  font-size: clamp(1.4rem, 2.5vw, 1.9rem);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--heading);
}

.card-body {
  font-family: var(--serif);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-muted);
  flex-grow: 1;
}

.card-body em {
  font-style: italic;
  color: var(--text);
}

/* ── Live stats ─────────────────────────────────────────────── */
.alive {
  border-top: 1px solid var(--border);
}

.stats-panel {
  margin-top: clamp(40px, 6vw, 70px);
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-panel);
  overflow: hidden;
  transition: border-color var(--transition);
}
.stats-panel:hover { border-color: var(--border-accent); }

.stats-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 28px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-secondary);
}

.stats-updated {
  margin-left: auto;
  color: var(--text-faint);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-bottom: 1px solid var(--border);
}

.stat-block {
  padding: clamp(24px, 3vw, 40px) clamp(20px, 2.5vw, 32px);
  border-right: 1px solid var(--border);
  transition: background var(--transition);
}
.stat-block:last-child { border-right: none; }
.stat-block:hover { background: var(--accent-dim); }

.stat-value {
  font-family: var(--mono);
  font-size: clamp(1.6rem, 3vw, 2.8rem);
  font-weight: 300;
  color: var(--heading);
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 10px;
  transition: color 0.3s;
}

.stat-value--mood { color: var(--accent); }

.stat-loading {
  color: var(--text-faint);
  font-size: 1.2rem;
}

.stat-label { margin-top: 4px; }

/* Activity bars */
.activity-panel {
  padding: clamp(24px, 3vw, 36px) clamp(20px, 2.5vw, 32px);
}

.activity-label {
  margin-bottom: 20px;
  color: var(--accent);
}

.activity-bars {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.activity-row {
  display: grid;
  grid-template-columns: 80px 1fr;
  align-items: center;
  gap: 16px;
}

.activity-region {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.activity-bar-track {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}

.activity-bar {
  height: 100%;
  width: var(--val, 0%);
  background: linear-gradient(to right, var(--accent), rgba(0, 229, 160, 0.6));
  border-radius: 2px;
  transition: width 1.2s var(--ease-out);
  box-shadow: 0 0 6px var(--accent-glow);
}

.stats-offline {
  padding: 24px 28px;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
}

.stats-offline p {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.alive-cta {
  margin-top: clamp(48px, 7vw, 80px);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.alive-cta-text {
  font-family: var(--serif);
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  font-style: italic;
  color: var(--text-muted);
}

/* ── Footer ─────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: clamp(48px, 8vw, 80px) 0 clamp(32px, 5vw, 48px);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 32px;
  justify-content: space-between;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-brand .logo-text {
  font-size: 1.1rem;
}

.footer-tagline { color: var(--text-faint); }

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  align-items: center;
}

.footer-link {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: 4px;
  transition: color var(--transition), background var(--transition);
}
.footer-link:hover { color: var(--text); background: var(--accent-dim); }
.footer-link--cta { color: var(--accent); border: 1px solid var(--border-accent); }
.footer-link--cta:hover { box-shadow: 0 0 16px var(--accent-glow); }

.footer-copy {
  width: 100%;
  color: var(--text-faint);
  padding-top: 24px;
  border-top: 1px solid var(--border);
  margin-top: 8px;
}

/* ── Fade-in animation ──────────────────────────────────────── */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

.fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.fade-in:nth-child(2) { transition-delay: 0.08s; }
.fade-in:nth-child(3) { transition-delay: 0.16s; }
.fade-in:nth-child(4) { transition-delay: 0.24s; }
.fade-in:nth-child(5) { transition-delay: 0.32s; }

/* Cards stagger */
.cards-grid .card:nth-child(1) { transition-delay: 0s; }
.cards-grid .card:nth-child(2) { transition-delay: 0.12s; }
.cards-grid .card:nth-child(3) { transition-delay: 0.24s; }

/* Stats grid stagger */
.stats-grid .stat-block:nth-child(1) { transition-delay: 0s; }
.stats-grid .stat-block:nth-child(2) { transition-delay: 0.07s; }
.stats-grid .stat-block:nth-child(3) { transition-delay: 0.14s; }
.stats-grid .stat-block:nth-child(4) { transition-delay: 0.21s; }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 900px) {
  .what-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .what-text { position: static; }

  .cards-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .stat-block:nth-child(2) { border-right: none; }
  .stat-block:nth-child(3) { border-top: 1px solid var(--border); }
  .stat-block:nth-child(4) {
    border-top: 1px solid var(--border);
    border-right: none;
  }
}

@media (max-width: 700px) {
  :root { --header-h: 60px; }

  .site-nav { display: none; }
  .nav-mobile-toggle { display: flex; margin-left: auto; }
  .theme-toggle { order: 1; }

  .hero-heading { font-size: clamp(2.6rem, 12vw, 4rem); }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-inner {
    flex-direction: column;
    gap: 24px;
  }

  .activity-row {
    grid-template-columns: 64px 1fr;
  }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .stat-block { border-right: none; border-bottom: 1px solid var(--border); }
  .stat-block:last-child { border-bottom: none; }
}

/* ── Reduced motion ─────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.2s !important; }
  .hero-canvas { display: none; }
  .fade-in { opacity: 1; transform: none; }
}
