/* ==========================================================================
   Base Reset, Editorial Typography, Focus & Shared Controls
   ========================================================================== */

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

html {
  font-size: 100%;
  scroll-behavior: smooth;
  background-color: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--text-body);
  line-height: 1.6;
  background-color: var(--paper);
  color: var(--ink);
  overflow-x: clip;
}

body.modal-open {
  overflow: hidden;
}

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

h1, h2, h3, h4, p, figure, blockquote, ul, ol, dl, dd {
  margin: 0;
}

ul, ol {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.24em;
  transition: color var(--duration-fast) ease, opacity var(--duration-fast) ease;
}

a:hover {
  color: var(--forest);
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

/* Accessible visible focus rings */
:focus-visible {
  outline: 2px solid var(--forest);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: var(--page-margin);
  top: -4rem;
  z-index: 999;
  padding: 0.65rem 1.1rem;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  font-size: var(--text-label);
}

.skip-link:focus {
  top: 0.75rem;
}

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

/* Editorial Type Utilities */
.eyebrow {
  font-family: var(--font-sans);
  font-size: var(--text-label);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}

.display-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--text-hero);
  line-height: 0.98;
  letter-spacing: -0.02em;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--text-h2);
  line-height: 1.06;
  letter-spacing: -0.015em;
}

.editorial-lead {
  font-family: var(--font-serif-body);
  font-size: var(--text-lead);
  line-height: 1.55;
  max-width: 58ch;
  color: var(--ink-soft);
}

/* Restrained Rectangular Editorial Controls (No arrows, no pill clichés) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0.625rem 1.25rem;
  font-size: var(--text-label);
  font-weight: 500;
  letter-spacing: 0.04em;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  text-decoration: none;
  transition: background-color var(--duration-fast) ease, color var(--duration-fast) ease, border-color var(--duration-fast) ease;
}

.btn:hover {
  background: var(--ink);
  color: var(--paper);
}

.btn-primary {
  background: var(--forest);
  border-color: var(--forest);
  color: var(--paper);
}

.btn-primary:hover {
  background: var(--forest-hover);
  border-color: var(--forest-hover);
  color: var(--white);
}

.btn-subtle {
  border-color: var(--rule-strong);
  background: var(--white);
}

.btn-subtle:hover {
  border-color: var(--ink);
  background: var(--paper-warm);
  color: var(--ink);
}

.btn-selected {
  background: var(--oxblood);
  border-color: var(--oxblood);
  color: var(--white);
}

.btn-selected:hover {
  background: #5b3036;
  border-color: #5b3036;
  color: var(--white);
}

.btn-sm {
  min-height: 2.35rem;
  padding: 0.42rem 0.9rem;
  font-size: var(--text-label);
}

/* Custom Select without native OS arrow */
.select-wrap {
  position: relative;
  display: inline-block;
  width: 100%;
}

.select-wrap select {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  min-height: 2.75rem;
  padding: 0.6rem 2.25rem 0.6rem 0.85rem;
  border: 1px solid var(--ink);
  background: var(--white);
  border-radius: 0;
}

.select-wrap::after {
  content: "";
  position: absolute;
  right: 0.9rem;
  top: 50%;
  width: 0.45rem;
  height: 0.45rem;
  border-right: 1.5px solid var(--ink);
  border-bottom: 1.5px solid var(--ink);
  transform: translateY(-65%) rotate(45deg);
  pointer-events: none;
}
