/* ==========================================================================
   Base — page canvas, containers, sections, links, utilities
   ========================================================================== */
body {
  background: var(--color-background);
  overflow-x: hidden;
}

/* --- Skip link (a11y §61) --- */
.skip-link {
  position: absolute;
  left: 1rem; top: -100px;
  z-index: 1000;
  padding: 0.7rem 1.1rem;
  background: var(--color-graphite);
  color: #fff;
  border-radius: var(--radius-sm);
  font-weight: var(--fw-semibold);
  transition: top var(--dur) var(--ease);
}
.skip-link:focus { top: 1rem; }

/* --- Focus visibility --- */
:focus-visible {
  outline: 3px solid var(--color-steel-light);
  outline-offset: 2px;
  border-radius: 4px;
}
.on-dark :focus-visible { outline-color: #ffb98f; }

/* --- Containers --- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.container-wide { max-width: var(--container-wide); }
.container-narrow { max-width: var(--container-narrow); }

/* --- Sections --- */
.section { padding-block: var(--section-pad); }
.section--tight { padding-block: clamp(2.5rem, 1.5rem + 4vw, 4rem); }
.section--dark { background: var(--color-graphite); color: var(--color-text-light); }
.section--graphite { background: var(--gradient-dark); color: var(--color-text-light); }
.section--steel { background: var(--color-surface-steel); }
.section--surface { background: var(--color-surface); }

.section--dark h1, .section--dark h2, .section--dark h3, .section--dark h4,
.section--graphite h1, .section--graphite h2, .section--graphite h3, .section--graphite h4 { color: #fff; }
.section--dark .lead, .section--graphite .lead { color: rgba(244, 246, 248, 0.78); }

/* --- Section header block --- */
.section-head { max-width: 720px; margin-bottom: clamp(2rem, 1.4rem + 2vw, 3.25rem); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head h2 { margin-top: 0.7rem; }
.section-head .lead { margin-top: 1rem; }

/* --- Links in prose --- */
.prose a, a.text-link {
  color: var(--color-steel);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1.5px;
  transition: color var(--dur) var(--ease);
}
.prose a:hover, a.text-link:hover { color: var(--color-primary); }
.on-dark a.text-link, .section--dark .prose a { color: #9dc0d8; }
.on-dark a.text-link:hover { color: var(--color-primary); }

/* --- Utilities --- */
.text-center { text-align: center; }
.text-muted { color: var(--color-text-muted); }
.mt-0 { margin-top: 0; }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mb-lg { margin-bottom: var(--space-lg); }
.flow > * + * { margin-top: 1.1rem; }
.flow-lg > * + * { margin-top: 1.6rem; }
.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;
}
.no-scroll { overflow: hidden; }
