/* Fonts (self-hosted, SIL OFL: see /fonts/OFL-*.txt) */
@font-face {
  font-family: "Montserrat";
  src: url("../fonts/montserrat-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  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-padding-top: calc(var(--header-height) + var(--space-4));
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  min-height: 100vh;
  background: var(--color-bg-light);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  -webkit-font-smoothing: antialiased;
}

img,
picture,
svg,
video {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

/* Typography */
h1,
h2,
h3,
h4,
.h1,
.h2,
.h3,
.h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: var(--leading-tight);
  letter-spacing: -0.01em;
  text-wrap: balance;
}

/* .h1–.h4 give a heading's look without changing the document outline */
h1, .h1 { font-size: var(--text-h1); font-weight: 700; }
h2, .h2 { font-size: var(--text-h2); }
h3, .h3 { font-size: var(--text-h3); }
h4, .h4 { font-size: var(--text-h4); }

p,
li {
  text-wrap: pretty;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition: color var(--transition);
}

strong {
  font-weight: 600;
}

/* Long-form text (rich text output) */
.prose {
  max-width: var(--container-narrow);
}

.prose > * + * {
  margin-top: var(--space-4);
}

.prose > :is(h2, h3, h4) {
  margin-top: var(--space-6);
}

.prose ul,
.prose ol {
  padding-left: 1.25em;
}

.prose li + li {
  margin-top: var(--space-2);
}

.prose blockquote {
  padding-left: var(--space-4);
  border-left: 2px solid var(--color-champagne);
  font-style: italic;
}

/* Focus: always visible for keyboard users */
:focus-visible {
  outline: 2px solid var(--color-focus-on-light);
  outline-offset: 3px;
  border-radius: 2px;
}

.theme-dark :focus-visible {
  outline-color: var(--color-focus);
}

/* Accessibility helpers */
.skip-link {
  position: absolute;
  top: var(--space-2);
  left: var(--space-2);
  z-index: 100;
  padding: var(--space-3) var(--space-4);
  background: var(--color-gold);
  color: var(--color-bg-dark);
  font-weight: 600;
  border-radius: var(--radius-sm);
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Icons from /images/icons.svg */
.icon {
  width: 1.5rem;
  height: 1.5rem;
  flex-shrink: 0;
}

.icon--sm {
  width: 1.25rem;
  height: 1.25rem;
}

.icon--lg {
  width: 2rem;
  height: 2rem;
}

/* Content still to be filled in by the client */
.placeholder {
  padding: 0 0.25em;
  background: rgb(212 162 31 / 0.18);
  border-radius: 2px;
  font-family: ui-monospace, monospace;
  font-size: 0.9em;
}
