/* =========================================================================
   SECTION: Reset, elements, typography primitives
   Loaded on every page after tokens.css.
   ========================================================================= */

/* --- Optional self-hosted fonts -------------------------------------------
   Drop Inter and Plus Jakarta Sans .woff2 files into public/assets/fonts/
   and uncomment. Until then the token stacks fall back to system fonts, so
   the site ships fast, offline-safe, and free of third-party font requests.

@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/inter-variable.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
}
@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("/assets/fonts/plus-jakarta-sans-variable.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
}
------------------------------------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  -moz-tab-size: 4;
  tab-size: 4;
  scroll-behavior: smooth;
}

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

body {
  font-family: var(--font-ui);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-secondary);
  background-color: var(--bg-page);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text-primary);
  line-height: 1.15;
  font-weight: var(--fw-bold);
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

a {
  color: var(--color-primary);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

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

img,
picture,
svg,
video {
  display: block;
  max-width: 100%;
  height: auto;
}

ul,
ol {
  padding-left: 1.25rem;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid transparent;
  box-shadow: var(--focus-ring);
  border-radius: var(--radius-sm);
}

/* Remove default focus ring only where we replace it with a custom one. */
button:focus:not(:focus-visible),
a:focus:not(:focus-visible) {
  outline: none;
}

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: var(--space-8) 0;
}

::selection {
  background: var(--color-primary);
  color: #fff;
}

/* --- Skip link ---------------------------------------------------------- */
.skip-link {
  position: absolute;
  left: var(--space-4);
  top: -3rem;
  z-index: var(--z-toast);
  background: var(--color-primary);
  color: #fff;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  transition: top var(--transition);
}

.skip-link:focus {
  top: var(--space-4);
  color: #fff;
}

/* =========================================================================
   SECTION: Typography classes (spec 1.2)
   ========================================================================= */

.h1-hero {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: var(--fw-extrabold);
  letter-spacing: -0.02em;
  color: var(--text-primary);
  line-height: 1.1;
}

.h2-section {
  font-family: var(--font-heading);
  font-size: clamp(1.875rem, 3vw, 2.25rem);
  font-weight: var(--fw-bold);
  letter-spacing: -0.02em;
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: 1.5rem;
}

.h3-card {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: var(--fw-semibold);
  color: var(--text-heading-3);
  line-height: 1.3;
}

.body-text {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text-secondary);
}

.eyebrow {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: var(--fw-semibold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-secondary);
  margin-bottom: 0.75rem;
}

.lead {
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

@media (min-width: 48rem) {
  .body-text {
    font-size: 1.125rem;
  }
  .lead {
    font-size: 1.25rem;
  }
}

/* --- Prose (legal pages) ---------------------------------------------- */
.prose {
  max-width: var(--measure);
  color: var(--text-secondary);
}

.prose h2 {
  font-size: 1.375rem;
  margin: 2.5rem 0 0.75rem;
  color: var(--text-primary);
}

.prose h3 {
  font-size: 1.125rem;
  margin: 1.75rem 0 0.5rem;
  color: var(--text-primary);
}

.prose p,
.prose ul,
.prose ol {
  margin-bottom: 1rem;
  line-height: 1.75;
}

.prose ul,
.prose ol {
  padding-left: 1.5rem;
}

.prose li {
  margin-bottom: 0.375rem;
}

.prose a {
  word-break: break-word;
}

.prose > :first-child {
  margin-top: 0;
}
