/* ==========================================================================
   Base: reset, typography, buttons, utilities
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  background: var(--ivory);
  scroll-behavior: smooth;
}
html.is-locked { overflow: hidden; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: var(--leading-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

img, video, svg { display: block; }   /* every image is sized explicitly; no max-width anywhere below the hero */
img { height: auto; }

a { color: inherit; text-decoration: none; }
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

h1, h2, h3, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }

h1, h2, h3, .display {
  font-family: var(--font-display);
  font-variation-settings: var(--display-axes);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1;
  text-wrap: balance;
}
p { text-wrap: pretty; }

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* --------------------------------------------------------------------------
   Buttons (constitution §23). Two styles only.
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  min-height: 44px;
  padding: 0.75rem 1.375rem;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius-btn);
  background: var(--ink);
  color: var(--ivory);
  font-family: var(--font-body);
  font-size: var(--text-tile);
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background-color var(--dur-fast) var(--ease-ambient),
    border-color var(--dur-fast) var(--ease-ambient),
    color var(--dur-fast) var(--ease-ambient);
}
.btn:hover,
.btn:focus-visible {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--ink);
}

.btn--secondary {
  background: transparent;
  color: var(--ink);
}
.btn--secondary.btn--on-ivory {
  border-color: var(--ivory);
  color: var(--ivory);
}
.btn--secondary:hover,
.btn--secondary:focus-visible {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--ink);
}

/* Tertiary text link: gold underline on hover */
.link {
  display: inline-block;
  padding: 0.25rem 0;
  font-size: var(--text-tile);
  font-weight: 600;
  letter-spacing: 0.02em;
  background-image: linear-gradient(var(--gold), var(--gold));
  background-repeat: no-repeat;
  background-size: 0% 1.5px;
  background-position: 0 100%;
  transition: background-size var(--dur-fast) var(--ease-ambient);
}
.link:hover,
.link:focus-visible {
  background-size: 100% 1.5px;
}

/* --------------------------------------------------------------------------
   Scroll reveal (one deliberate reveal per element, Intersection Observer)
   -------------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity var(--dur-reveal) var(--ease-enter),
    transform var(--dur-reveal) var(--ease-enter);
}
.reveal.is-in {
  opacity: 1;
  transform: none;
}
.no-js .reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .link { transition: none; }
}
