/* ==========================================================================
   Base — reset, typography, utilities
   ========================================================================== */

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

* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 1rem);
}

body {
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: var(--fs-base);
  font-weight: 400;
  line-height: var(--lh-body);
  color: var(--color-text);
  background: var(--color-cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body.is-locked { overflow: hidden; }

img,
picture,
video,
svg,
iframe { display: block; max-width: 100%; }

img { height: auto; }

/* the hidden attribute must win over display rules set on components */
[hidden] { display: none !important; }

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

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

a { color: inherit; text-decoration: none; }

:where(ul[role="list"], ol[role="list"]) { list-style: none; padding: 0; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: var(--lh-tight);
  letter-spacing: -0.01em;
  color: var(--color-ink);
  text-wrap: balance;
}

h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); line-height: var(--lh-snug); }

p { text-wrap: pretty; }

em { font-style: italic; }

::selection { background: var(--color-coral); color: var(--color-white); }

:focus-visible {
  outline: 2px solid var(--color-coral-600);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---- Layout helpers ---- */
.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--section-pad); }

.section-head {
  display: grid;
  gap: var(--space-4);
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.section-head--center {
  text-align: center;
  justify-items: center;
  max-width: var(--container-narrow);
  margin-inline: auto;
}

.section-head--split {
  align-items: end;
}

@media (min-width: 900px) {
  .section-head--split {
    grid-template-columns: 1fr auto;
    gap: var(--space-8);
  }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--color-bronze);
}

.eyebrow::before {
  content: "";
  width: 2rem;
  height: 1px;
  background: currentColor;
  opacity: 0.7;
}

.section-head--center .eyebrow::after {
  content: "";
  width: 2rem;
  height: 1px;
  background: currentColor;
  opacity: 0.7;
}

.lead {
  font-size: var(--fs-md);
  color: var(--color-muted);
  max-width: 60ch;
}

.section-head--center .lead { margin-inline: auto; }

/* ---- Accessibility ---- */
.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;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 999;
  padding: 0.75rem 1.25rem;
  background: var(--color-ink);
  color: var(--color-white);
  border-radius: var(--radius-sm);
  font-weight: 500;
  transform: translateY(-200%);
  transition: transform var(--dur) var(--ease);
}

.skip-link:focus { transform: translateY(0); }

/* ---- Scroll reveal ---- */
.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

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

  .js .reveal { opacity: 1; transform: none; }
}
