/* ============================================================
   RESET
   A small, modern reset. Normalises browser defaults so the
   styles in main.css start from a predictable baseline.
   Nothing brand-specific belongs in this file.
   ============================================================ */

/* Border-box sizing everywhere — padding no longer inflates widths */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Strip default margins; spacing is applied deliberately in main.css */
* {
  margin: 0;
}

html {
  -webkit-text-size-adjust: 100%;   /* stop iOS inflating text on rotate */
}

body {
  min-height: 100vh;
  min-height: 100svh;               /* accounts for mobile browser chrome */
  line-height: var(--leading-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Media defaults to block-level and never overflows its container */
img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

/* Form elements should inherit typography rather than use OS defaults */
input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

/* Long words break rather than forcing horizontal scroll */
p,
h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
}

/* Headings inherit weight/size; main.css sets them explicitly */
h1, h2, h3, h4, h5, h6 {
  font-size: inherit;
  font-weight: inherit;
}

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

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

/* Visible focus for keyboard users — never remove this without a replacement */
:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 3px;
}

/* ------------------------------------------------------------
   REDUCED MOTION
   Respect the OS-level "reduce motion" setting. Animation is a
   preference, not a requirement — some people get motion sick.
   JS checks this too (see js/animations.js).
   ------------------------------------------------------------ */
@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;
  }
}
