/* ============================================================
   EBPC — Base (v2.2)
   Reset, typography, global element styles, layout primitives,
   utilities. Component styles live in components.css.
   ============================================================ */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "kern" 1, "liga" 1, "cv11";
  text-rendering: optimizeLegibility;
}

/* ---------- Headings ---------- */
h1, h2, h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: var(--fw-extrabold);
  line-height: var(--lh-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--navy-900);
  text-wrap: balance;
}

h1 { font-size: var(--fs-4xl); font-weight: var(--fw-extrabold); }
h2 { font-size: var(--fs-3xl); font-weight: var(--fw-bold); }
h3 { font-size: var(--fs-2xl); font-weight: var(--fw-bold); }

h4, h5, h6 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: var(--fw-bold);
  line-height: var(--lh-snug);
  letter-spacing: var(--tracking-snug);
  color: var(--navy-900);
}

h4 { font-size: var(--fs-xl); }
h5 { font-size: var(--fs-lg); }
h6 { font-size: var(--fs-base); }

/* ---------- Body text ---------- */
p {
  margin: 0 0 var(--sp-4);
  text-wrap: pretty;
}
p:last-child { margin-bottom: 0; }

strong, b { font-weight: var(--fw-semibold); color: var(--ink-900); }
em, i     { font-style: italic; }
small     { font-size: var(--fs-sm); }

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

/* ---------- Links ---------- */
a {
  color: var(--action);
  text-decoration: none;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: color var(--dur) var(--ease);
}

a:hover {
  color: var(--action-hover);
  text-decoration: underline;
}

/* ---------- Focus ---------- */
:focus { outline: none; }

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

@supports not selector(:focus-visible) {
  :focus {
    outline: 3px solid var(--focus-ring);
    outline-offset: 3px;
  }
}

/* ---------- Media ---------- */
img,
svg,
video,
canvas {
  display: block;
  max-width: 100%;
  height: auto;
}

img {
  background-color: var(--bg-ice);
  font-style: italic;
  color: var(--ink-400);
}

/* ---------- Lists ---------- */
ul, ol { margin: 0; padding: 0; }

/* ---------- Forms ---------- */
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
  margin: 0;
}

button { cursor: pointer; }
textarea { resize: vertical; }

/* ---------- Tables ---------- */
table { border-collapse: collapse; width: 100%; }

/* ---------- Selection ---------- */
::selection {
  background: var(--blue-200);
  color: var(--navy-900);
}

/* ============================================================
   LAYOUT PRIMITIVES
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}
.container--narrow { max-width: var(--container-narrow); }
.container--wide   { max-width: var(--container-wide); }

/* ============================================================
   UTILITIES
   ============================================================ */
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: var(--sp-4);
  z-index: 999;
  display: inline-block;
  padding: var(--sp-3) var(--sp-5);
  background: var(--navy-900);
  color: #fff;
  font-family: var(--font-display);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-sm);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: top var(--dur) var(--ease);
}
.skip-link:focus,
.skip-link:focus-visible {
  top: var(--sp-4);
  color: #fff;
  text-decoration: none;
}

.muted { color: var(--fg-muted); }

.text-xs { font-size: var(--fs-xs); }
.text-sm { font-size: var(--fs-sm); }
.text-lg { font-size: var(--fs-lg); }

.mt-lg { margin-top: var(--sp-8); }

.stack-lg > * + * {
  margin-top: var(--sp-12);
}

body.is-locked {
  overflow: hidden;
  padding-right: var(--scrollbar-width, 0);
}

/* ---------- Scroll reveal ---------- */
[data-reveal] { opacity: 1; }

@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] {
    opacity: 0;
    transform: translateY(14px);
    transition:
      opacity var(--dur-reveal) var(--ease-out),
      transform var(--dur-reveal) var(--ease-out);
    will-change: opacity, transform;
  }

  .js [data-reveal].is-visible {
    opacity: 1;
    transform: none;
  }

  .js [data-reveal][data-reveal-delay="1"] { transition-delay: 80ms; }
  .js [data-reveal][data-reveal-delay="2"] { transition-delay: 160ms; }
  .js [data-reveal][data-reveal-delay="3"] { transition-delay: 240ms; }
}