/* Base: reset, page defaults, layout primitives.
   Tokens come from styles/tokens/*.css (mirrored from the VectorShift design system). */

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

html {
  scroll-behavior: smooth;
  /* Sticky 72px header must not cover anchored section headings. */
  scroll-padding-top: 72px;
}

body {
  margin: 0;
  background: var(--bg-page);
  font-family: var(--font-body);
  color: var(--text-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
p,
figure,
blockquote {
  margin: 0;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--text-link);
  text-decoration: none;
}

a:hover {
  color: var(--primary-700);
}

:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
  border-radius: var(--radius-xs);
}

/* Everything the design system animates is opt-out for reduced motion. */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---- Layout primitives ---- */

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding-left: var(--container-pad);
  padding-right: var(--container-pad);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 10px 16px;
  background: var(--accent-500);
  color: var(--text-inverse);
  font: 600 var(--fs-sm) var(--font-body);
  border-radius: 0 0 var(--radius-sm) 0;
}

.skip-link:focus {
  left: 0;
  color: var(--text-inverse);
}

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

/* ---- Shared type styles ---- */

.eyebrow {
  font: 600 var(--fs-xs) var(--font-mono);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--accent-600);
  margin-bottom: 16px;
}

.section-title {
  font: 800 var(--fs-2xl) / var(--lh-snug) var(--font-display);
  letter-spacing: var(--ls-tight);
  color: var(--text-heading);
  text-wrap: pretty;
}

.section-title--flush {
  line-height: 1.15;
}

.lede {
  font: 400 var(--fs-base) / var(--lh-relaxed) var(--font-body);
  color: var(--text-muted);
}

.prose {
  font: 400 var(--fs-base) / var(--lh-relaxed) var(--font-body);
  color: var(--text-body);
  text-wrap: pretty;
}

/* Inline link with the accent rule under it, used to end a copy block. */
.link-underline {
  display: inline-block;
  font: 600 var(--fs-base) var(--font-body);
  color: var(--text-link);
  border-bottom: 2px solid var(--accent-500);
  padding-bottom: 2px;
}

/* A hairline grid: 1px gaps over a subtle background read as dividers. */
.hairline-grid {
  display: grid;
  gap: 1px;
  background: var(--border-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.hairline-grid > * {
  background: var(--surface-card);
}

/* ---- Sections on the dark/teal grounds ---- */

.section--primary {
  background: var(--primary-500);
  color: var(--text-inverse);
}

.section--primary-deep {
  background: var(--primary-800);
  color: var(--text-inverse);
}

.section--sunken {
  background: var(--bg-sunken);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.on-primary .section-title,
.on-primary .eyebrow {
  color: inherit;
}

.on-primary .eyebrow {
  color: var(--accent-400);
}

.on-primary-copy {
  font: 400 var(--fs-base) / var(--lh-relaxed) var(--font-body);
  color: var(--primary-100);
  text-wrap: pretty;
}
