/* ==========================================================================
   base.css — Minimal reset + element defaults that consume tokens
   No hard-coded colours/fonts here — always reference var(--token).
   ========================================================================== */

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

/* Soft cross-fade between pages, site-wide (cross-document View Transitions).
   Browsers without support simply navigate normally — no fallback needed. */
@view-transition {
  navigation: auto;
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.8s;
  animation-timing-function: ease-out;
}

@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation-duration: 0s;
  }
}

html {
  font-size: var(--font-size-base);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding-top: var(--header-height); /* clear the fixed site header */
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  line-height: var(--line-height);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 var(--space-sm);
  font-family: var(--font-heading);
  font-weight: var(--font-weight-bold);
  line-height: 1.2;
}

h1 { font-size: var(--text-2xl); }
h2 { font-size: var(--text-xl); }
h3 { font-size: var(--text-lg); }

p {
  margin: 0 0 var(--space-sm);
}

a {
  color: var(--color-primary);
  text-decoration: none;
}

a:hover {
  color: var(--color-primary-hover);
  text-decoration: underline;
}

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

video {
  max-height: 80vh;
  border-radius: var(--radius-lg);
}

/* Layout helper — centred, max-width container */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--space-md);
}

/* Vertical rhythm for page sections */
.section {
  padding-block: var(--space-lg);
}
