/* ==========================================================================
   base.css — reset, self-hosted fonts, document type, focus, motion.
   ========================================================================== */

/* ---- Fonts (self-hosted, Fontshare FFL). Paths are relative to css/. ---- */
@font-face {
  font-family: "Boska";
  src: url("../fonts/boska-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Boska";
  src: url("../fonts/boska-400-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Boska";
  src: url("../fonts/boska-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Boska";
  src: url("../fonts/boska-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Switzer";
  src: url("../fonts/switzer-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Switzer";
  src: url("../fonts/switzer-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Switzer";
  src: url("../fonts/switzer-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* ---- Reset ---- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
* {
  margin: 0;
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: var(--step-0);
  font-weight: 400;
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Sticky header: keep anchored sections clear of it. */
[id] {
  scroll-margin-top: calc(var(--header-h) + 8px);
}

/* ---- Type ---- */
h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: var(--lh-display);
  letter-spacing: var(--tracking-display);
}
h2 {
  font-size: var(--step-3);
}
h3 {
  font-size: var(--step-1);
}
p {
  max-width: var(--measure);
}
strong {
  font-weight: 500;
}
em {
  font-style: italic;
}

/* ---- Media, links, controls ---- */
img,
picture,
svg,
video {
  display: block;
  max-width: 100%;
}
a {
  color: inherit;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
ul,
ol {
  list-style: none;
  padding: 0;
}

/* ---- Focus: always visible, 2px cape/paper ---- */
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}
.on-cape :focus-visible,
.b-cta :focus-visible,
.b-footer--cape :focus-visible {
  outline-color: var(--paper);
}

/* ---- Reduced motion: kill everything ---- */
@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;
  }
}
