/* ============================================================
   BASE — resets and element-level defaults.
   Sets the typographic baseline; no component styling here.
   ============================================================ */

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

* {
  margin: 0;
}

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

body {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  color: var(--text);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}

/* ---- Headings: Plus Jakarta Sans, navy ---- */
h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--heading);
  line-height: var(--lh-tight);
  font-weight: var(--fw-extra);
  letter-spacing: var(--tracking-tight);
  text-wrap: balance;
}

h1 { font-size: var(--fs-hero); }
h2 { font-size: var(--fs-2xl); }
h3 { font-size: var(--fs-lg); line-height: var(--lh-snug); }
h4 { font-size: var(--fs-md); font-weight: var(--fw-bold); }

/* ---- Body copy: readable measure ---- */
p {
  max-width: var(--content);
  line-height: var(--lh-body);
}

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

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

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

strong, b { font-weight: var(--fw-bold); }

button { font-family: inherit; cursor: pointer; }

:focus-visible {
  outline: 3px solid var(--sky);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ---- Skip link for keyboard/screen-reader users ---- */
.skip-link {
  position: absolute;
  left: var(--space-2);
  top: -100%;
  background: var(--navy);
  color: var(--white);
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius);
  z-index: 200;
  transition: top var(--dur) var(--ease);
}
.skip-link:focus { top: var(--space-2); color: var(--white); }

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

.section {
  padding-block: clamp(var(--space-6), 8vw, var(--space-8));
}
.section--tight { padding-block: var(--space-6); }
.section--flush { padding-block-start: 0; }

.section--cool { background: var(--surface-cool); }
.section--warm { background: var(--surface-warm); }
.section--navy {
  background: var(--navy);
  color: var(--frost);
}
.section--navy h2,
.section--navy h3 { color: var(--white); }

.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;
}

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