/* =============================================
   MATT Methodology Page
   Dark, weighty, animated — pure CSS
   ============================================= */

:root {
  --bg: #000a12;
  --bg-section: #001018;
  --bg-card: #001a28;
  --border: rgba(229, 231, 235, 0.08);
  --text: #e8eaed;
  --text-muted: #8ba3b5;
  --text-dim: #4a6575;
  --lime: #BFF549;
  --lime-glow: rgba(191, 245, 73, 0.4);
  --ember: #EB4203;
  --ember-glow: rgba(235, 66, 3, 0.4);
  --peach: #FF9C5F;
  --peach-glow: rgba(255, 156, 95, 0.4);
  --sand: #FCEFC3;
  --radius: 12px;
  --radius-sm: 8px;
  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-heading: 'Fraunces', Georgia, serif;
}

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

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ---- Nav ---- */
.m-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px;
  background: rgba(0, 10, 18, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}
.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--lime);
  color: var(--bg);
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 20px;
  border-radius: 8px;
}
.logo-mark.small {
  width: 24px;
  height: 24px;
  font-size: 14px;
  border-radius: 6px;
}
.logo-text {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 1px;
}
.nav-right {
  display: flex;
  align-items: center;
  gap: 20px;
}
.nav-link {
  color: var(--text-muted);
  font-size: 14px;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-link:hover { color: var(--lime); }
.nav-cta {
  display: inline-flex;
  align-items: center;
  padding: 7px 18px;
  background: transparent;
  color: var(--lime);
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--lime);
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.2s, box-shadow 0.2s;
}
.nav-cta:hover {
  background: rgba(191, 245, 73, 0.08);
  box-shadow: 0 0 16px rgba(191, 245, 73, 0.15);
}
.nav-tagline {
  color: var(--text-dim);
  font-size: 13px;
}

/* ---- Scanline — the persistent animated line on the left ---- */
.scanline-track {
  position: fixed;
  left: 24px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgba(191, 245, 73, 0.06);
  z-index: 50;
}
.scanline-glow {
  position: absolute;
  top: 0;
  left: -1px;
  width: 4px;
  height: 15%;
  background: linear-gradient(180deg, transparent, var(--lime), transparent);
  border-radius: 2px;
  box-shadow: 0 0 12px 2px var(--lime-glow), 0 0 40px 6px rgba(191, 245, 73, 0.15);
  animation: scanline 6s cubic-bezier(.43,.12,.42,1.02) infinite;
}

@keyframes scanline {
  0% { top: 0; height: 10%; }
  50% { height: 25%; }
  100% { top: 80%; height: 10%; }
}

/* ---- Hero ---- */
.m-hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px 140px;
  position: relative;
  overflow: hidden;
}
.m-hero::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 800px;
  height: 800px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(191, 245, 73, 0.04) 0%, transparent 70%);
  pointer-events: none;
}
.m-hero-inner {
  max-width: 700px;
  position: relative;
  z-index: 1;
}
.m-hero-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 3px;
  margin-bottom: 16px;
}
.m-hero-title {
  font-family: var(--font-heading);
  font-size: clamp(4rem, 10vw, 7rem);
  font-weight: 800;
  color: var(--lime);
  line-height: 1;
  margin-bottom: 8px;
  text-shadow: 0 0 60px rgba(191, 245, 73, 0.2);
  animation: title-glow 4s ease-in-out infinite alternate;
}
@keyframes title-glow {
  0% { text-shadow: 0 0 40px rgba(191, 245, 73, 0.15); }
  100% { text-shadow: 0 0 80px rgba(191, 245, 73, 0.3), 0 0 120px rgba(191, 245, 73, 0.1); }
}
.m-hero-subtitle {
  font-family: var(--font-heading);
  font-size: 18px;
  color: var(--text-muted);
  font-weight: 400;
  letter-spacing: 2px;
  margin-bottom: 32px;
}
.m-hero-desc {
  font-size: 17px;
  line-height: 1.7;
  color: var(--text-muted);
  margin-bottom: 40px;
}
.m-hero-cta {
  position: absolute;
  bottom: 48px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  z-index: 2;
}
.m-scroll-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.3s;
}
.m-scroll-cta:hover {
  color: var(--lime);
}
.m-scroll-text {
  font-family: var(--font-heading);
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  font-weight: 500;
  margin-bottom: 14px;
  letter-spacing: 0.5px;
}
.m-chevrons {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.m-chev {
  color: var(--text-dim);
  opacity: 0;
  animation: chev-bounce 3s ease-in-out infinite;
}
.m-chev-1 { animation-delay: 0s; }
.m-chev-2 { animation-delay: 0.2s; }
.m-chev-3 { animation-delay: 0.4s; }
@keyframes chev-bounce {
  0%, 100% { opacity: 0.1; transform: translateY(0); }
  40% { opacity: 0.4; transform: translateY(4px); }
  60% { opacity: 0.4; transform: translateY(4px); }
  80% { opacity: 0.1; transform: translateY(0); }
}

/* Morphing blobs */
.m-hero-blobs {
  position: absolute;
  inset: 60px 0 100px 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.m-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
  animation-direction: alternate;
}
/* All blobs start centered — bright together, then drift apart */
.m-blob-1 {
  width: 300px;
  height: 300px;
  background: rgba(191, 245, 73, 0.15);
  top: 50%;
  left: 50%;
  margin-top: -150px;
  margin-left: -150px;
  animation: blob-orbit-1 14s ease-in-out infinite;
}
.m-blob-2 {
  width: 280px;
  height: 280px;
  background: rgba(191, 245, 73, 0.12);
  top: 50%;
  left: 50%;
  margin-top: -140px;
  margin-left: -140px;
  animation: blob-orbit-2 18s ease-in-out infinite;
}
.m-blob-3 {
  width: 240px;
  height: 240px;
  background: rgba(255, 156, 95, 0.1);
  top: 50%;
  left: 50%;
  margin-top: -120px;
  margin-left: -120px;
  animation: blob-orbit-3 12s ease-in-out infinite;
}

/* Blob 1: orbits upper-left */
@keyframes blob-orbit-1 {
  0% {
    transform: translate(0, 0) scale(1);
    border-radius: 50%;
    opacity: 1;
  }
  25% {
    transform: translate(-180px, -100px) scale(1.15);
    border-radius: 40% 60% 60% 40% / 60% 30% 70% 40%;
    opacity: 0.7;
  }
  50% {
    transform: translate(-120px, -60px) scale(0.9);
    border-radius: 60% 40% 30% 70% / 50% 60% 40% 50%;
    opacity: 0.85;
  }
  75% {
    transform: translate(-200px, -30px) scale(1.1);
    border-radius: 30% 70% 50% 50% / 40% 50% 60% 50%;
    opacity: 0.6;
  }
  100% {
    transform: translate(0, 0) scale(1);
    border-radius: 50%;
    opacity: 1;
  }
}
/* Blob 2: orbits upper-right */
@keyframes blob-orbit-2 {
  0% {
    transform: translate(0, 0) scale(1);
    border-radius: 50%;
    opacity: 1;
  }
  25% {
    transform: translate(200px, -80px) scale(1.2);
    border-radius: 60% 40% 60% 40% / 50% 50% 50% 50%;
    opacity: 0.6;
  }
  50% {
    transform: translate(140px, -120px) scale(0.85);
    border-radius: 50% 50% 40% 60% / 40% 60% 40% 60%;
    opacity: 0.8;
  }
  75% {
    transform: translate(180px, 20px) scale(1.1);
    border-radius: 40% 60% 50% 50% / 60% 40% 60% 40%;
    opacity: 0.5;
  }
  100% {
    transform: translate(0, 0) scale(1);
    border-radius: 50%;
    opacity: 1;
  }
}
/* Blob 3: orbits lower-center */
@keyframes blob-orbit-3 {
  0% {
    transform: translate(0, 0) scale(1);
    border-radius: 50%;
    opacity: 1;
  }
  25% {
    transform: translate(-60px, 120px) scale(1.15);
    border-radius: 60% 40% 50% 50% / 40% 60% 40% 60%;
    opacity: 0.7;
  }
  50% {
    transform: translate(80px, 100px) scale(0.9);
    border-radius: 40% 60% 40% 60% / 60% 40% 60% 40%;
    opacity: 0.85;
  }
  75% {
    transform: translate(20px, 140px) scale(1.1);
    border-radius: 50% 50% 30% 70% / 40% 50% 60% 50%;
    opacity: 0.6;
  }
  100% {
    transform: translate(0, 0) scale(1);
    border-radius: 50%;
    opacity: 1;
  }
}

/* Particles */
.m-hero-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.particle {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--lime);
  opacity: 0;
  animation: particle-drift 8s ease-in-out infinite;
}
@keyframes particle-drift {
  0% { transform: translate(0, 0); opacity: 0; }
  20% { opacity: 0.4; }
  80% { opacity: 0.2; }
  100% { transform: translate(var(--dx), var(--dy)); opacity: 0; }
}

/* ---- Buttons ---- */
.m-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 36px;
  background: var(--lime);
  color: var(--bg);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  border: none;
  border-radius: var(--radius);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}
.m-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(191, 245, 73, 0.3);
}
.m-btn-lg {
  padding: 18px 48px;
  font-size: 17px;
}

/* ---- Wave Dividers ---- */
.wave-divider {
  position: relative;
  height: 60px;
  overflow: hidden;
}
.wave-divider svg {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 200%;
  height: 100%;
}
.wave {
  fill: none;
  stroke-width: 1;
}
.wave-1 {
  stroke: var(--lime);
  opacity: 0.15;
  animation: wave-pan 8s linear infinite;
}
.wave-2 {
  stroke: var(--peach);
  opacity: 0.08;
  animation: wave-pan 11s linear infinite reverse;
}
.wave-3 {
  stroke: var(--ember);
  opacity: 0.06;
  animation: wave-pan 14s linear infinite;
}
.wave-divider.flip {
  transform: scaleY(-1);
}
@keyframes wave-pan {
  0% { transform: translateX(0); }
  100% { transform: translateX(-720px); }
}

/* ---- Sections ---- */
.m-section {
  padding: 100px 24px;
  position: relative;
}
.m-section-dark {
  background: var(--bg-section);
}
.m-section-inner {
  max-width: 900px;
  margin: 0 auto;
}
.m-section-badge {
  display: inline-block;
  background: rgba(191, 245, 73, 0.1);
  color: var(--lime);
  font-size: 12px;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 20px;
}
.m-section h2 {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  line-height: 1.25;
  margin-bottom: 16px;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
}
.m-section-body {
  font-size: 17px;
  line-height: 1.7;
  color: var(--text-muted);
  margin-bottom: 48px;
  max-width: 640px;
}

/* ---- Stats ---- */
.m-stat-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.m-stat {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.m-stat::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(191, 245, 73, 0.03) 0%, transparent 60%);
  pointer-events: none;
}
.m-stat-number {
  font-family: var(--font-heading);
  font-size: 56px;
  font-weight: 800;
  color: var(--lime);
  line-height: 1;
  margin-bottom: 12px;
  text-shadow: 0 0 40px rgba(191, 245, 73, 0.2);
}
.m-stat-label {
  font-size: 15px;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.4;
}
.m-stat-source {
  font-size: 12px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ---- Research Cards ---- */
.m-research-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 16px;
}
.m-research-card {
  background: rgba(0, 26, 40, 0.8);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(20px);
  transition: border-color 0.3s, transform 0.2s;
}
.m-research-card:hover {
  transform: translateY(-3px);
}
.m-research-card[data-theme="lime"] { border-color: rgba(191, 245, 73, 0.15); }
.m-research-card[data-theme="lime"]:hover { border-color: rgba(191, 245, 73, 0.4); }
.m-research-card[data-theme="peach"] { border-color: rgba(255, 156, 95, 0.15); }
.m-research-card[data-theme="peach"]:hover { border-color: rgba(255, 156, 95, 0.4); }
.m-research-card[data-theme="ember"] { border-color: rgba(235, 66, 3, 0.15); }
.m-research-card[data-theme="ember"]:hover { border-color: rgba(235, 66, 3, 0.4); }

.m-research-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  animation: gradient-shift 6s ease infinite;
  background-size: 300% 100%;
}
.m-research-card[data-theme="lime"]::before {
  background: linear-gradient(90deg, transparent, var(--lime), transparent);
}
.m-research-card[data-theme="peach"]::before {
  background: linear-gradient(90deg, transparent, var(--peach), transparent);
}
.m-research-card[data-theme="ember"]::before {
  background: linear-gradient(90deg, transparent, var(--ember), transparent);
}
@keyframes gradient-shift {
  0%, 100% { background-position: 0 50%; }
  50% { background-position: 100% 50%; }
}

/* Pulse ring kept for other uses */
@keyframes pulse-ring {
  0%, 100% { transform: scale(0.9); opacity: 0.15; }
  50% { transform: scale(1.15); opacity: 0.35; }
}

/* Card badge */
.m-card-badge {
  display: inline-block;
  background: rgba(191, 245, 73, 0.12);
  color: var(--lime);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 14px;
}

/* SVG icon replacing emoji */
.m-research-icon-svg {
  margin-bottom: 16px;
}

/* Card visualization area */
.m-card-viz {
  margin-top: 20px;
  background: rgba(0, 16, 24, 0.6);
  border-radius: var(--radius-sm);
  padding: 12px 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

/* Node pulse animation */
.node-pulse {
  animation: node-breathe 3s ease-in-out infinite;
}
@keyframes node-breathe {
  0%, 100% { opacity: 0.5; filter: drop-shadow(0 0 0px currentColor); }
  50% { opacity: 1; filter: drop-shadow(0 0 6px currentColor); }
}

/* Synapse connections */
.synapse {
  animation: synapse-fire 2s ease-in-out infinite;
}
@keyframes synapse-fire {
  0%, 100% { opacity: 0.15; }
  50% { opacity: 0.6; }
}

/* Signal flow — dashes moving left to right */
.signal-flow {
  stroke-dasharray: 4 8;
  animation: flow-right 2.5s linear infinite;
}
.signal-flow-rev {
  stroke-dasharray: 4 8;
  animation: flow-left 2.5s linear infinite;
}
@keyframes flow-right {
  0% { stroke-dashoffset: 24; }
  100% { stroke-dashoffset: -24; }
}
@keyframes flow-left {
  0% { stroke-dashoffset: -24; }
  100% { stroke-dashoffset: 24; }
}

/* Match ring pulse */
.match-ring {
  animation: match-pulse 2s ease-in-out infinite;
}
@keyframes match-pulse {
  0%, 100% { r: 14; opacity: 0.4; }
  50% { r: 17; opacity: 0.8; }
}
.match-text {
  animation: match-text-glow 2s ease-in-out infinite;
}
@keyframes match-text-glow {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* Wave trace — sine wave drawing */
.wave-trace {
  stroke-dasharray: 600;
  stroke-dashoffset: 600;
  animation: draw-wave 3s ease-in-out infinite alternate;
}
@keyframes draw-wave {
  0% { stroke-dashoffset: 600; }
  100% { stroke-dashoffset: 0; }
}

/* Funnel dots — flowing through the funnel */
/* Funnel dots — use transform for cross-browser SVG animation */
.funnel-dot {
  opacity: 0;
  will-change: transform, opacity;
}
.funnel-dot-1 { animation: fflow-1 3s ease-in-out infinite; }
.funnel-dot-2 { animation: fflow-2 3s ease-in-out 0.6s infinite; }
.funnel-dot-3 { animation: fflow-3 3s ease-in-out 1.2s infinite; }
.funnel-dot-4 { animation: fflow-leak-l 3s ease-in-out 0.3s infinite; }
.funnel-dot-5 { animation: fflow-leak-r 3s ease-in-out 0.9s infinite; }

@keyframes fflow-1 {
  0%   { transform: translate(100px, 15px); opacity: 0; }
  10%  { opacity: 0.9; }
  50%  { transform: translate(135px, 50px); opacity: 0.7; }
  90%  { transform: translate(148px, 82px); opacity: 0.9; }
  100% { transform: translate(150px, 88px); opacity: 0; }
}
@keyframes fflow-2 {
  0%   { transform: translate(200px, 15px); opacity: 0; }
  10%  { opacity: 0.9; }
  50%  { transform: translate(165px, 50px); opacity: 0.7; }
  90%  { transform: translate(152px, 82px); opacity: 0.9; }
  100% { transform: translate(150px, 88px); opacity: 0; }
}
@keyframes fflow-3 {
  0%   { transform: translate(150px, 15px); opacity: 0; }
  10%  { opacity: 0.9; }
  50%  { transform: translate(150px, 50px); opacity: 0.7; }
  90%  { transform: translate(150px, 82px); opacity: 0.9; }
  100% { transform: translate(150px, 88px); opacity: 0; }
}
@keyframes fflow-leak-l {
  0%   { transform: translate(120px, 15px); opacity: 0; }
  10%  { opacity: 0.7; }
  35%  { transform: translate(85px, 40px); opacity: 0.5; }
  55%  { transform: translate(45px, 58px); opacity: 0; }
  100% { opacity: 0; }
}
@keyframes fflow-leak-r {
  0%   { transform: translate(185px, 15px); opacity: 0; }
  10%  { opacity: 0.7; }
  35%  { transform: translate(220px, 40px); opacity: 0.5; }
  55%  { transform: translate(255px, 58px); opacity: 0; }
  100% { opacity: 0; }
}

/* Leak line pulse */
.leak-line {
  animation: leak-pulse 2s ease-in-out infinite;
}
@keyframes leak-pulse {
  0%, 100% { opacity: 0.1; }
  50% { opacity: 0.35; }
}

.m-research-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 4px;
}
.m-research-authors {
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 14px;
  font-style: italic;
}
.m-research-card p {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-muted);
}
.m-research-quote {
  margin-top: 16px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.03);
  border-left: 2px solid var(--text-dim);
  font-size: 13px;
  font-style: italic;
  color: var(--text-muted);
  line-height: 1.6;
}
.m-quote-src {
  font-style: normal;
  color: var(--text-dim);
}

/* ---- Dimensions ---- */
.m-dimensions {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 48px;
}
.m-dimension {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s;
  animation: dim-slide-in 0.6s ease backwards;
  animation-delay: var(--dim-delay);
}
.m-dimension:hover {
  border-color: var(--dim-color);
}
@keyframes dim-slide-in {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.m-dim-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
}
.m-dim-weight {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 800;
  color: var(--dim-color);
  min-width: 60px;
  text-shadow: 0 0 20px color-mix(in srgb, var(--dim-color) 30%, transparent);
}
.m-dim-header h3 {
  font-size: 18px;
  font-weight: 700;
}
.m-dim-basis {
  font-size: 12px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 2px;
}
.m-dim-bar {
  height: 3px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 2px;
  margin-bottom: 14px;
  overflow: hidden;
}
.m-dim-fill {
  height: 100%;
  background: var(--dim-color);
  border-radius: 2px;
  animation: dim-bar-fill 1.5s ease-out backwards;
  animation-delay: calc(var(--dim-delay) + 0.3s);
}
@keyframes dim-bar-fill {
  from { width: 0; }
}
.m-dimension p {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-muted);
}

/* ---- Formula ---- */
.m-formula {
  background: var(--bg-card);
  border: 1px solid rgba(191, 245, 73, 0.15);
  border-radius: var(--radius);
  padding: 24px 28px;
  text-align: center;
}
.m-formula-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--lime);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 8px;
}
.m-formula-eq {
  font-family: 'DM Sans', monospace;
  font-size: 15px;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

/* ---- Timeline ---- */
.m-timeline {
  position: relative;
  padding-left: 40px;
  margin-top: 48px;
}
.m-timeline-line {
  position: absolute;
  left: 15px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--lime), var(--peach), var(--ember));
  opacity: 0.3;
}
.m-tl-step {
  display: flex;
  gap: 24px;
  margin-bottom: 40px;
  position: relative;
}
.m-tl-step:last-child {
  margin-bottom: 0;
}
.m-tl-node {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--node-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: var(--node-color);
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}
.m-tl-pulse {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1px solid var(--node-color);
  animation: tl-pulse 3s ease-in-out infinite;
  opacity: 0;
}
@keyframes tl-pulse {
  0%, 100% { transform: scale(0.8); opacity: 0; }
  50% { transform: scale(1.3); opacity: 0.3; }
}
.m-tl-content h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 6px;
}
.m-tl-content p {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-muted);
}

/* ---- CTA Section ---- */
.m-cta-section {
  padding: 100px 24px;
  text-align: center;
  position: relative;
}
.m-cta-section::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 600px;
  height: 600px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(191, 245, 73, 0.04) 0%, transparent 70%);
  pointer-events: none;
}
.m-cta-inner {
  max-width: 500px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}
.m-cta-inner h2 {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  margin-bottom: 12px;
}
.m-cta-inner p {
  font-size: 16px;
  color: var(--text-muted);
  margin-bottom: 32px;
}

/* ---- Footer ---- */
.m-footer {
  text-align: center;
  padding: 40px 24px;
  border-top: 1px solid var(--border);
}
.m-footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.m-footer p {
  font-size: 13px;
  color: var(--text-dim);
}
.m-footer a {
  color: var(--peach);
  text-decoration: none;
}
.m-footer a:hover { text-decoration: underline; }

/* ---- Scroll Animations ---- */
/* Base state — hidden, big movements */
.scroll-anim {
  opacity: 0;
  will-change: transform, opacity;
  transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.8s ease;
}

/* ---- IN animations (entering viewport) — big, theatrical ---- */

/* Slide from left side of stage */
.scroll-anim[data-anim="slide-right"] {
  transform: translateX(-120px);
}
.scroll-anim[data-anim="slide-right"].anim-in {
  opacity: 1;
  transform: translateX(0);
}

/* Slide from right side of stage */
.scroll-anim[data-anim="slide-left"] {
  transform: translateX(120px);
}
.scroll-anim[data-anim="slide-left"].anim-in {
  opacity: 1;
  transform: translateX(0);
}

/* Rise from below */
.scroll-anim[data-anim="slide-up"] {
  transform: translateY(80px);
}
.scroll-anim[data-anim="slide-up"].anim-in {
  opacity: 1;
  transform: translateY(0);
}

/* Fade up (gentler) */
.scroll-anim[data-anim="fade-up"] {
  transform: translateY(40px);
}
.scroll-anim[data-anim="fade-up"].anim-in {
  opacity: 1;
  transform: translateY(0);
}

/* Fade down */
.scroll-anim[data-anim="fade-down"] {
  transform: translateY(-30px);
}
.scroll-anim[data-anim="fade-down"].anim-in {
  opacity: 1;
  transform: translateY(0);
}

/* Scale in — dramatic */
.scroll-anim[data-anim="scale-in"] {
  transform: scale(0.7);
}
.scroll-anim[data-anim="scale-in"].anim-in {
  opacity: 1;
  transform: scale(1);
}

/* Spread in — cards fly in from their side (left card from left, right from right) */
.scroll-anim[data-anim="spread-in"] {
  transform: translateX(var(--spread-from, 0px)) translateY(60px);
}
.scroll-anim[data-anim="spread-in"].anim-in {
  opacity: 1;
  transform: translateX(0) translateY(0);
}

/* ---- OUT animations — scatter offstage away from center ---- */

.scroll-anim[data-anim="slide-right"].anim-out {
  opacity: 0;
  transform: translateX(-100px) translateY(-30px);
  transition: transform 0.6s cubic-bezier(0.55, 0, 1, 0.45), opacity 0.4s ease-in;
}
.scroll-anim[data-anim="slide-left"].anim-out {
  opacity: 0;
  transform: translateX(100px) translateY(-30px);
  transition: transform 0.6s cubic-bezier(0.55, 0, 1, 0.45), opacity 0.4s ease-in;
}
.scroll-anim[data-anim="slide-up"].anim-out,
.scroll-anim[data-anim="fade-up"].anim-out {
  opacity: 0;
  transform: translateY(-60px);
  transition: transform 0.6s cubic-bezier(0.55, 0, 1, 0.45), opacity 0.4s ease-in;
}
.scroll-anim[data-anim="fade-down"].anim-out {
  opacity: 0;
  transform: translateY(-40px);
  transition: transform 0.6s cubic-bezier(0.55, 0, 1, 0.45), opacity 0.4s ease-in;
}
.scroll-anim[data-anim="scale-in"].anim-out {
  opacity: 0;
  transform: scale(0.8) translateY(-40px);
  transition: transform 0.6s cubic-bezier(0.55, 0, 1, 0.45), opacity 0.4s ease-in;
}
/* Spread out — scatter away from center */
.scroll-anim[data-anim="spread-in"].anim-out {
  opacity: 0;
  transform: translateX(var(--spread-exit, 0px)) translateY(-40px);
  transition: transform 0.6s cubic-bezier(0.55, 0, 1, 0.45), opacity 0.4s ease-in;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .m-nav { padding: 12px 16px; }
  .scanline-track { left: 8px; }
  .m-section { padding: 60px 16px; }
  .m-stat-row { grid-template-columns: 1fr; }
  .m-research-grid { grid-template-columns: 1fr; }
  .m-timeline { padding-left: 32px; }
  .m-timeline-line { left: 11px; }
  .m-dim-weight { font-size: 22px; min-width: 48px; }
  .nav-tagline { display: none; }
}
