/* ==========================================================================
   02-RESET.CSS  —  modern reset + base element styles
   Levels out the differences between browsers and sets the page defaults.
   Contains no colours of its own — everything points at 01-tokens.css.
   ========================================================================== */

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

* {
  margin: 0;
}

html {
  -webkit-text-size-adjust: 100%;   /* stops iOS inflating text in landscape */
  scroll-behavior: smooth;
  /* Belt and braces against sideways scrolling on small screens */
  overflow-x: hidden;
}

body {
  min-height: 100svh;
  background-color: var(--cream);
  color: var(--ink-soft);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Headings inherit the display face; sizes are set per-component */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: var(--lh-tight);
  text-wrap: balance;
  font-weight: 700;
}

p {
  text-wrap: pretty;
}

/* Media never overflows its container */
img,
picture,
svg,
video {
  display: block;
  max-width: 100%;
}

svg {
  height: auto;
}

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

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

hr {
  border: 0;
  border-top: 1px solid var(--hairline);
}

/* --------------------------------------------------------------------------
   FOCUS — a keyboard user must always be able to see where they are.
   We remove the default ring only to replace it with a clearer orange one.
   -------------------------------------------------------------------------- */
:focus-visible {
  outline: 2px solid var(--orange-deep);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

:focus:not(:focus-visible) {
  outline: none;
}

/* Anchor jumps stop short of the fixed navbar instead of hiding under it */
[id] {
  scroll-margin-top: var(--anchor-offset);
}

/* The brand link points at #top, which really means "the very top of the page" */
#top {
  scroll-margin-top: 0;
}

/* --------------------------------------------------------------------------
   REDUCED MOTION — if the visitor's device asks for less movement, all
   animation stops. Nothing on this page depends on motion to become visible.
   -------------------------------------------------------------------------- */
@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;
  }

  /* Staggered delays would otherwise still hold content back for half a second */
  *,
  *::before,
  *::after {
    animation-delay: 0ms !important;
    transition-delay: 0ms !important;
  }
}
