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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--surface-base);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: var(--size-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: var(--tracking-tight);
  line-height: 0.98;
  margin: 0;
  text-transform: uppercase;
}

p { margin: 0; }

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

img {
  max-width: 100%;
  display: block;
}

/* <picture> is an inline element with automatic height, so a percentage
   height on the <img> inside it has nothing to resolve against and the image
   collapses to nothing. Every <picture> on this site wraps a sized image, so
   block is the correct default — and it stops this failing silently again. */
picture {
  display: block;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

/* Visible keyboard focus everywhere, never removed. */
:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
}

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

/* Honour the system reduced-motion setting for every animation. */
@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;
  }
}

.shell {
  width: 100%;
  max-width: var(--shell-max);
  margin-inline: auto;
  padding-inline: var(--shell-pad);
}


/* Visible to screen readers only. */
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* ── Logo ──
   One piece of artwork in both themes: the dark part follows the page's text
   colour (near-black in light, white in dark), the red stays the brand red.
   Size is set per place with --logo-height; the width follows the artwork. */
.logo { display: block; color: var(--text-primary); --logo-red: var(--red); }
.logo svg { display: block; height: var(--logo-height, 40px); width: auto; }
.logo-link { display: inline-flex; align-items: center; }
.logo-link:focus-visible { outline: 2px solid var(--red); outline-offset: 4px; border-radius: 2px; }
