/* ==========================================================================
   Reset & base — minimal, modern reset with brand-aligned defaults
   ========================================================================== */

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

* { margin: 0; padding: 0; }

html {
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
  /* Account for the fixed nav AND the iOS safe-area when jumping to anchors */
  scroll-padding-top: calc(var(--nav-height) + env(safe-area-inset-top) + var(--spacing-16));
  /* Guard against accidental horizontal overflow.
     `clip` (vs `hidden`) does NOT create a new scroll container, so descendant
     `position: sticky` elements keep working — this matters for the first-visit
     timeline video and any future sticky elements. */
  overflow-x: clip;
}

body { overflow-x: clip; }

body {
  font-family: var(--font-primary);
  font-size: var(--body-size);
  font-weight: var(--body-weight);
  line-height: var(--body-leading);
  letter-spacing: var(--body-tracking);
  color: var(--text-default);
  background-color: var(--bg-default);
  min-height: 100vh;
  min-height: 100dvh;
  text-rendering: optimizeLegibility;
}

/* Headings use condensed display font, uppercase for gym aesthetic */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: inherit;
  text-transform: uppercase;
}

h1 {
  font-size: var(--h1-size);
  font-weight: var(--h1-weight);
  letter-spacing: var(--h1-tracking);
  line-height: var(--h1-leading);
}

h2 {
  font-size: var(--h2-size);
  font-weight: var(--h2-weight);
  letter-spacing: var(--h2-tracking);
  line-height: var(--h2-leading);
}

h3 {
  font-size: var(--h3-size);
  font-weight: var(--h3-weight);
  letter-spacing: var(--h3-tracking);
  line-height: var(--h3-leading);
}

p { max-width: var(--max-width-text); }

a {
  color: inherit;
  text-decoration: none;
  transition: opacity var(--transition-fast), color var(--transition-fast);
}

a:hover { opacity: 0.75; }

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

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

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

ul, ol {
  list-style: none;
}

:focus-visible {
  outline: 2px solid var(--color-black);
  outline-offset: 2px;
  border-radius: 2px;
}

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

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