/* Reset-ish + base typography. Everything draws from tokens.css. */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--ip-header-h) + var(--ip-s4));
}

body {
  margin: 0;
  background: var(--ip-bg);
  color: var(--ip-ink);
  font-family: var(--ip-font-body);
  font-size: var(--ip-fs-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  /* Never pan sideways on a phone (owner saw the whole page drag left on an iPhone, 10 Nov 2026).
     clip, not hidden: hidden makes body a scroll container and breaks position: sticky. */
  overflow-x: clip;
  /* A product name with no spaces in it ("Unicorn/Mermaids/Fairies/…", supplier codes) must break
     at the edge instead of widening the page (break-ui test, 10 Nov 2026). Only words that can't
     fit are broken. */
  overflow-wrap: break-word;
}

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

a { color: var(--ip-red); text-decoration: none; }
a:hover { color: var(--ip-red-dark); }

h1, h2, h3, h4 {
  font-family: var(--ip-font-display);
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1.15;
  text-wrap: balance;
  margin: 0 0 var(--ip-s4);
}
h1 { font-size: var(--ip-fs-3xl); }
h2 { font-size: var(--ip-fs-2xl); }
h3 { font-size: var(--ip-fs-lg); }

p { margin: 0 0 var(--ip-s4); }

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

:focus-visible {
  outline: 3px solid var(--ip-red);
  outline-offset: 2px;
  border-radius: var(--ip-r-sm);
}

.ip-sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.ip-skip-link {
  position: absolute; left: var(--ip-s4); top: -100px; z-index: 999;
  background: var(--ip-red); color: var(--ip-ink-invert);
  padding: var(--ip-s3) var(--ip-s5); border-radius: var(--ip-r-pill);
  font-weight: 700;
  transition: top .15s ease;
}
.ip-skip-link:focus { top: var(--ip-s4); color: var(--ip-ink-invert); }

/* Layout helper */
.ip-wrap {
  max-width: var(--ip-wrap);
  margin-inline: auto;
  padding-inline: var(--ip-gutter);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
