/* Base typography & layout primitives */

html { scroll-behavior: smooth; }

body {
  font-family: var(--ff-body);
  font-size: var(--fs-base);
  line-height: var(--lh-base);
  color: var(--c-text-body);
  background: var(--c-bg);
  font-feature-settings: 'ss01', 'cv11';
}

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

h1, h2, h3, h4, h5, h6 {
  font-family: var(--ff-heading);
  color: var(--c-text);
  font-weight: 700;
  line-height: var(--lh-tight);
  letter-spacing: -0.02em;
}

h1 { font-size: var(--fs-5xl); font-weight: 800; }
h2 { font-size: var(--fs-3xl); }
h3 { font-size: var(--fs-2xl); }
h4 { font-size: var(--fs-xl); font-weight: 600; }
h5 { font-size: var(--fs-lg); font-weight: 600; }

p { color: var(--c-text-body); }
.lead { font-size: var(--fs-md); color: var(--c-text-body); max-width: 60ch; }

a { transition: color var(--t-fast) var(--ease-out); }
a:hover { color: var(--c-accent); }

strong, b { font-weight: 600; color: var(--c-text); }

small { font-size: var(--fs-sm); color: var(--c-text-muted); }

hr { border: 0; border-top: 1px solid var(--c-border); margin: var(--sp-12) 0; }

/* Layout primitives */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding-inline: var(--container-px);
}

.section {
  padding-block: var(--section-py);
}

.section--dark {
  background: var(--c-primary);
  color: var(--c-text-on-dark);
}
.section--dark h1, .section--dark h2, .section--dark h3, .section--dark h4 { color: #fff; }
.section--dark p { color: var(--c-text-on-dark-muted); }
.section--dark .lead { color: var(--c-text-on-dark); }
.section--dark hr { border-top-color: var(--c-border-dark); }

.section--soft { background: var(--c-bg-soft); }

.eyebrow {
  display: inline-block;
  font-family: var(--ff-mono);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--c-accent);
  margin-bottom: var(--sp-4);
  font-weight: 500;
}

.section-header {
  text-align: center;
  margin-bottom: var(--sp-16);
  max-width: 56rem;
  margin-inline: auto;
}
.section-header p { margin-top: var(--sp-4); font-size: var(--fs-md); }

.grid { display: grid; gap: var(--sp-6); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

.cluster { display: flex; flex-wrap: wrap; gap: var(--sp-3); align-items: center; }

.text-accent { color: var(--c-accent); }
.text-mono { font-family: var(--ff-mono); }

/* Visually hidden but accessible */
.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;
}

/* Skip link */
.skip-link {
  position: absolute; top: -100px; left: 0;
  background: var(--c-primary); color: #fff;
  padding: var(--sp-3) var(--sp-4);
  z-index: 1000; border-radius: 0 0 var(--r-md) 0;
}
.skip-link:focus { top: 0; }
