/* ============================================================
   EBPC — Base (v3.1)
   Body text unified at weight 500 with darker ink for
   consistent reading weight across every page.
   ============================================================ */

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

html {
  -webkit-tap-highlight-color: transparent;
  -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);
  font-weight: var(--fw-regular);
  line-height: var(--lh-body);
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-family: var(--font-display);
  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 { font-size: var(--fs-xl);  font-weight: var(--fw-semibold); letter-spacing: var(--tracking-snug); }
h5 { font-size: var(--fs-lg);  font-weight: var(--fw-semibold); }
h6 { font-size: var(--fs-base);font-weight: var(--fw-semibold); }

/* ---------- Body text — weight 500, darker ink ---------- */
p {
  margin: 0 0 var(--sp-4);
  color: var(--ink-soft);
  font-weight: var(--fw-medium);
  text-wrap: pretty;
}
p:last-child { margin-bottom: 0; }

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

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

a {
  color: var(--action);
  text-decoration: none;
  text-underline-offset: 3px;
  transition: color var(--dur) var(--ease);
}
a:hover { color: var(--action-hover); text-decoration: underline; }

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

img, svg, video, canvas {
  display: block;
  max-width: 100%;
  height: auto;
}
img {
  background-color: var(--paper);
  font-style: italic;
  color: var(--ink-faint);
}

ul, ol { margin: 0; padding: 0; }

button, input, select, textarea {
  font: inherit;
  color: inherit;
  margin: 0;
}
button { cursor: pointer; }
textarea { resize: vertical; }

table { border-collapse: collapse; width: 100%; }

::selection {
  background: var(--soft-blue-grey);
  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-weight: var(--fw-semibold);
  font-size: var(--fs-sm);
  text-decoration: none;
  border-radius: var(--radius-md);
  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(12px);
    transition:
      opacity var(--dur-reveal) var(--ease-out),
      transform var(--dur-reveal) var(--ease-out);
  }
  .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; }
}