/* ==========================================================================
   Base: reset, typography, shared utilities
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
}

/* the hidden attribute always wins over a component's display rule (e.g. the
   form "thank you" boxes, which are display: grid) */
[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

/* Lenis smooth scrolling (motion/smooth.js) - rules from its own stylesheet.
   Lenis does the easing itself, so the CSS smooth-scroll is switched off. */
html.lenis,
html.lenis body {
  height: auto;
}

html.lenis {
  scroll-behavior: auto;
}

.lenis:not(.lenis-autoToggle).lenis-stopped {
  overflow: clip;
}

.lenis [data-lenis-prevent] {
  overscroll-behavior: contain;
}

.lenis.lenis-smooth iframe {
  pointer-events: none;
}

body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--ff-ui);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color 600ms var(--ease-ui), color 300ms var(--ease-ui);
}

body.is-locked {
  overflow: hidden;
}

img,
picture,
svg,
video {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  background: none;
  border: 0;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  list-style: none;
  padding: 0;
}

:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: 2px;
}

::selection {
  background: var(--allium-blue);
  color: var(--white);
}

/* ---------- Type ---------- */

h1,
h2,
h3,
h4 {
  color: var(--color-heading);
  font-weight: 400;
  text-wrap: balance;
}

.t-h1,
h1 {
  font-family: var(--ff-display);
  font-size: var(--fs-h1);
  line-height: var(--lh-tight);
}

.t-h2,
h2 {
  font-family: var(--ff-display);
  font-size: var(--fs-h2);
  line-height: var(--lh-tight);
}

.t-h3,
h3 {
  font-family: var(--ff-soft);
  font-size: var(--fs-h3);
  line-height: var(--lh-body);
}

.t-h4 {
  font-family: var(--ff-soft);
  font-size: var(--fs-h4);
  line-height: var(--lh-body);
  color: var(--color-heading);
}

.t-eyebrow {
  font-family: var(--ff-soft);
  font-size: var(--fs-eyebrow);
  line-height: var(--lh-body);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--color-meta);
}

.t-small {
  font-size: var(--fs-small);
  line-height: var(--lh-body);
}

.t-meta {
  font-size: var(--fs-small);
  color: var(--color-meta);
}

p a:not(.btn) {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- Utilities ---------- */

.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;
}

.skip-link {
  position: absolute;
  top: -80px;
  left: var(--page-pad);
  z-index: calc(var(--z-top) + 1);
  padding: 14px 24px;
  background: var(--allium-navy);
  color: var(--white);
  border-radius: 0 0 var(--r-md) var(--r-md);
  transition: top var(--dur-3) var(--ease-ui);
}

.skip-link:focus {
  top: 0;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.stack--5 {
  gap: var(--space-5);
}

.text-center {
  text-align: center;
}

@media (max-width: 1024px) {
  .hide-mobile {
    display: none !important;
  }
}

@media (min-width: 1025px) {
  .hide-desktop {
    display: none !important;
  }
}

/* Elements animated in by JS start hidden, but only when JS is running. */
.js [data-reveal],
.js [data-reveal-batch] > * {
  opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .js [data-reveal],
  .js [data-reveal-batch] > * {
    opacity: 1;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}
