:root {
  /* Neutrals — off-black, never #000 */
  --ink: #0E0E10;
  --ink-2: #1A1A1D;
  --ink-3: #2A2A2E;
  --paper: #FFFFFF;
  --paper-2: #FAFAF8;
  --paper-3: #F2F1ED;
  --line: rgba(14, 14, 16, 0.08);
  --line-2: rgba(14, 14, 16, 0.14);
  --muted: #6E6E76;
  --muted-2: #9A9AA0;

  /* Mythic orange — slightly desaturated brand accent */
  --mythic: #E8741C;
  --mythic-deep: #C24A0C;
  --mythic-soft: #F4A559;
  --mythic-tint: rgba(232, 116, 28, 0.10);
  --mythic-tint-2: rgba(232, 116, 28, 0.22);
  --mythic-grad: linear-gradient(135deg, #F4A559 0%, #E8741C 48%, #C24A0C 100%);

  /* Type */
  --font-display: 'Geist', 'Satoshi', ui-sans-serif, system-ui, sans-serif;
  --font-sans: 'Satoshi', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  /* Geometry */
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-xl: 32px;

  --container: 1240px;
  --gutter: 28px;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in: cubic-bezier(0.4, 0, 0.2, 1);

  /* Diffusion shadows — tinted, never harsh */
  --shadow-sm: 0 1px 1px rgba(14,14,16,0.04), 0 4px 12px rgba(14,14,16,0.04);
  --shadow: 0 1px 2px rgba(14,14,16,0.05), 0 16px 40px -16px rgba(14,14,16,0.10);
  --shadow-lg: 0 1px 3px rgba(14,14,16,0.06), 0 30px 60px -20px rgba(14,14,16,0.16);
  --shadow-mythic: 0 14px 36px -10px rgba(232,116,28,0.36);
}

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

html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  font-feature-settings: "ss01", "cv11";
  background: var(--paper);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }

/* Typography — control hierarchy with weight + color, not just scale */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  letter-spacing: -0.025em;
  line-height: 1.04;
  margin: 0;
  font-weight: 800;
  color: var(--ink);
}
h1 { font-size: clamp(2.6rem, 4.6vw, 4.2rem); }
h2 { font-size: clamp(1.9rem, 3.0vw, 2.6rem); letter-spacing: -0.028em; }
h3 { font-size: 1.18rem; font-weight: 700; letter-spacing: -0.018em; }
h4 {
  font-size: 0.78rem;
  font-family: var(--font-sans);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  font-weight: 600;
}

p { margin: 0; color: var(--muted); max-width: 65ch; }

em { font-style: normal; }

/* Numbers — always mono */
.num, dd, .plan__amount, .trend strong, .ring__num strong, .vs strong, .hero__stats dd, .dbcounter strong, .panel__title em {
  font-family: var(--font-mono);
  font-feature-settings: "tnum";
}

/* Container */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Section spacing */
section { padding: 110px 0; position: relative; }
@media (max-width: 760px) { section { padding: 72px 0; } }

/* Section heads */
.section-head {
  max-width: 760px;
  margin-bottom: 64px;
}
.section-head h2 { margin-top: 18px; max-width: 22ch; }
.section-head p { margin-top: 14px; font-size: 1.05rem; max-width: 56ch; }
.section-head__sub { color: var(--muted); }

/* Eyebrow */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
  padding: 7px 12px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: var(--paper-2);
}
.eyebrow::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--ink-3);
}
.eyebrow--mythic { color: var(--mythic-deep); border-color: var(--mythic-tint-2); background: var(--mythic-tint); }
.eyebrow--mythic::before { background: var(--mythic); }

.text-mythic {
  background: var(--mythic-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Buttons */
.btn {
  --bg: transparent;
  --fg: var(--ink);
  --bd: var(--line-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  font-family: inherit;
  border: 1px solid var(--bd);
  background: var(--bg);
  color: var(--fg);
  cursor: pointer;
  white-space: nowrap;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), background .25s var(--ease), border-color .25s var(--ease);
  will-change: transform;
}
.btn:active { transform: translateY(1px) scale(0.985); }

.btn--sm { padding: 9px 16px; font-size: 0.88rem; }
.btn--lg { padding: 15px 26px; font-size: 1rem; }
.btn--block { width: 100%; }

.btn--primary {
  --bg: var(--ink);
  --fg: var(--paper);
  --bd: var(--ink);
  position: relative;
  background: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 12px 28px -10px rgba(14,14,16,0.45);
}
.btn--primary::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  background: var(--mythic-grad);
  opacity: 0;
  transition: opacity .35s var(--ease);
  z-index: 0;
}
.btn--primary > * { position: relative; z-index: 1; }
.btn--primary:hover::after { opacity: 1; }
.btn--primary:hover { box-shadow: var(--shadow-mythic); }

.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn--ghost:hover { background: var(--paper-2); border-color: var(--ink-3); }

/* Grain overlay (fixed, pointer-events-none — performance safe) */
.grain {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: 0.035;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* Reusable sub-pieces (used across components) */
.dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--muted);
  flex: none;
}
.dot--ok { background: #2EA05A; box-shadow: 0 0 0 4px rgba(46,160,90,0.12); }
.dot--prog { background: var(--mythic); animation: pulse 1.6s ease-in-out infinite; }
.dot--u { background: #4A7BFF; }
.dot--r { background: #D8554A; }
.dot--g { background: #4FA266; }

@keyframes pulse {
  0%, 100% { opacity: .35; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1); }
}

/* Reveal on intersect */
[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}
[data-reveal].is-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
