/* ==========================================================================
   base.css — shared reset + primitives.
   Loaded by the storefront AND all four demo templates. Contains no colour
   decisions: each theme file owns its own palette.
   ========================================================================== */

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

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

body {
  margin: 0;
  min-height: 100%;
  overflow-x: hidden;          /* belt-and-braces against a stray wide child */
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, p, figure, blockquote, dl, dd { margin: 0; }
ul[class], ol[class] { list-style: none; margin: 0; padding: 0; }

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

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

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

/* Visible, consistent keyboard focus everywhere. Uses each theme's --accent. */
:focus-visible {
  outline: 2px solid var(--accent, currentColor);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Skip link — off-screen until focused. */
.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 999;
  padding: 10px 16px;
  background: var(--accent, #000);
  color: var(--accent-ink, #fff);
  font-size: 14px;
}
.skip:focus { left: 8px; top: 8px; }

.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;
}

/* Shared shell. Themes override --shell-max / --shell-pad. */
.shell {
  width: 100%;
  max-width: var(--shell-max, 1180px);
  margin-inline: auto;
  padding-inline: var(--shell-pad, clamp(20px, 5vw, 56px));
}

/* One global honour of the OS setting. Every animation in this project is
   CSS-only, so switching them off here switches all of them off. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}
