/* ==========================================================================
   Base — reset, document defaults, typography primitives, utilities
   ========================================================================== */

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

* {
  margin: 0;
}

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

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--ff-body);
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizelegibility;
  overflow-x: hidden;
}

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

/* `video` needs this as much as `img` does: its width/height attributes become
   presentational hints, and a fixed height silently overrides `aspect-ratio`. */
img,
video {
  height: auto;
}

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

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

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

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

h1,
h2,
h3,
h4 {
  color: var(--ink-strong);
  font-weight: 700;
  line-height: 1.08;
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

:focus-visible {
  border-radius: 4px;
  outline: 3px solid var(--amber);
  outline-offset: 3px;
}

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

/* --- Type primitives ------------------------------------------------- */

.display {
  font-family: var(--ff-display);
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 0.9;
  text-transform: uppercase;
}

.condensed {
  font-family: var(--ff-condensed);
  font-weight: 400;
  letter-spacing: 0.005em;
  line-height: 0.95;
  text-transform: uppercase;
}

.serif {
  font-family: var(--ff-serif);
  font-weight: 400;
  line-height: 1.12;
}

/* Small caps section label — "MANAGEMENT TEAM" (deck p5) */
.eyebrow {
  align-items: center;
  color: var(--teal-label);
  display: flex;
  font-size: var(--fs-sm);
  font-weight: 700;
  gap: var(--sp-3);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow::before {
  background: currentcolor;
  block-size: 1.15em;
  border-radius: 1px;
  content: "";
  flex: none;
  inline-size: 3px;
}

.lead {
  font-size: var(--fs-lead);
  line-height: 1.72;
}

/* --- Layout utilities -------------------------------------------------- */

.wrap {
  margin-inline: auto;
  max-inline-size: var(--wrap);
  padding-inline: var(--gutter);
  inline-size: 100%;
}

.wrap--wide {
  max-inline-size: var(--wrap-wide);
}

.section {
  padding-block: var(--section-y);
  position: relative;
}

.visually-hidden {
  block-size: 1px;
  clip-path: inset(50%);
  inline-size: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
}

.skip-link {
  background: var(--teal-deep);
  border-radius: 0 0 var(--r-sm) 0;
  color: var(--white);
  inset-block-start: 0;
  inset-inline-start: 0;
  padding: var(--sp-3) var(--sp-5);
  position: fixed;
  transform: translateY(-110%);
  transition: transform 0.2s var(--ease);
  z-index: 999;
}

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

/* --- Scroll reveal ------------------------------------------------------
   Pure CSS, no JS. Progressive: only applied where the browser supports
   scroll-driven animations, so unsupported browsers simply show content.  */

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .reveal {
      animation: reveal-in linear both;
      animation-range: entry 0% cover 26%;
      animation-timeline: view();
    }
  }
}

@keyframes reveal-in {
  from {
    opacity: 0;
    transform: translateY(28px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

/* Zoom-in variant — the element scales up into place as it scrolls in.
   Put this on a WRAPPER, never on an element that also has a hover
   transform: `animation-fill-mode: both` holds the final keyframe forever
   and an animation always beats a plain declaration. */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    /* Range completes while the card is still entering, so anything
       substantially in view sits at full opacity. With a `cover` range the
       last visible card in a short scroller never finishes and reads as
       washed out at rest. */
    .reveal-zoom {
      animation: reveal-zoom linear both;
      animation-range: entry 0% entry 85%;
      animation-timeline: view();
    }
  }
}

@keyframes reveal-zoom {
  from {
    opacity: 0;
    transform: scale(0.85) translateY(26px);
  }

  to {
    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;
  }
}
