/* ---------------------------------------------------------------
   base.css - reset and global primitives
   --------------------------------------------------------------- */

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

html {
  -moz-text-size-adjust: none;
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height, 6rem) + 1rem);
}

body {
  min-height: 100dvh;
  line-height: 1.6;
  font-family: var(--font-body, sans-serif);
  font-size: var(--text-base);
  color: var(--color-text);
  background: var(--color-bg);
}

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

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

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

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

ol,
ul {
  list-style: none;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  line-height: 0.98;
  font-weight: 800;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

p {
  max-width: 62ch;
  text-wrap: pretty;
}

em {
  font-style: normal;
}

::selection {
  color: #fff;
  background: var(--color-primary);
}

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

.skip-link {
  position: fixed;
  z-index: 999;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.75rem 1.15rem;
  font-weight: 700;
  color: #fff;
  background: var(--color-primary);
  border-radius: var(--radius-pill);
  transform: translateY(-200%);
  transition: transform 220ms var(--ease-out);
}

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

/* Screen-reader-only utility. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Reduced motion: every timeline on the page collapses to its end state. */
@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;
    scroll-behavior: auto !important;
  }
}
