/* Base typography & layout primitives */

body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-loose);
  font-feature-settings: "ss01", "cv11";
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(201,255,58,0.06), transparent 70%),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(162,210,255,0.04), transparent 60%);
  background-attachment: fixed;
}

/* Subtle grain overlay for premium feel */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.04 0'/></filter><rect width='200' height='200' filter='url(%23n)'/></svg>");
  opacity: 0.6;
  mix-blend-mode: overlay;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  line-height: var(--lh-snug);
  letter-spacing: var(--ls-tight);
  font-weight: 600;
  color: var(--color-text);
  text-wrap: balance;
}

h1 { font-size: var(--fs-h1); line-height: var(--lh-tight); letter-spacing: var(--ls-tighter); font-weight: 700; }
h2 { font-size: var(--fs-h2); line-height: var(--lh-tight); letter-spacing: var(--ls-tighter); font-weight: 600; }
h3 { font-size: var(--fs-h3); font-weight: 600; }
h4 { font-size: var(--fs-h4); }
h5 { font-size: var(--fs-h5); }
h6 { font-size: var(--fs-h6); }

p { text-wrap: pretty; max-width: 60ch; }

strong { font-weight: 600; color: var(--color-text); }
em { font-style: italic; }

/* ─── Containers ─── */
.container {
  width: 100%;
  max-width: var(--max-content);
  margin-inline: auto;
  padding-inline: var(--gutter);
  position: relative;
  z-index: 2;
}

.container-narrow { max-width: var(--max-narrow); margin-inline: auto; padding-inline: var(--gutter); }
.container-wide   { max-width: var(--max-wide);   margin-inline: auto; padding-inline: var(--gutter); }

/* ─── Section primitive ─── */
.section {
  padding-block: var(--section-py);
  position: relative;
}

.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-mono);
  font-size: var(--fs-eyebrow);
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
  color: var(--color-accent);
  font-weight: 500;
}
.section-eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  background: var(--color-accent);
}

.section-title {
  margin-top: var(--space-sm);
  max-width: 18ch;
}

.section-lede {
  margin-top: var(--space-md);
  color: var(--color-text-soft);
  font-size: var(--fs-body-lg);
  max-width: 56ch;
}

/* ─── Utility helpers ─── */
.text-accent { color: var(--color-accent); }
.text-soft   { color: var(--color-text-soft); }
.text-muted  { color: var(--color-text-muted); }
.text-data   { color: var(--color-data); }
.font-mono   { font-family: var(--font-mono); }
.font-display{ font-family: var(--font-display); }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ─── Motion preferences ─── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

html { scroll-behavior: smooth; }
