/* =====================================================================
   LULU'S LAB — BASE
   Reset, accessibility, element defaults, fluid root scale.
   ===================================================================== */

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

/* CAPPED EDITORIAL SCALE
   The comp is a 1024px-wide artboard where 1rem = 16px, so 1.5625vw
   reproduces it exactly at 1024.
   The upper clamp is the important half: it STOPS at 18.75px, which is
   reached at a 1200px viewport. Past that the composition is frozen and
   the extra viewport width becomes white space, instead of every element
   inflating with the window. Without that cap a 1440 screen rendered the
   design at 1.4x and it read like a presentation board rather than an
   editorial page. */
html {
  font-size: clamp(13px, 1.5625vw, 18.75px);
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-ink);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* The page is centred and capped so the hero photograph bleeds to the
   real viewport edge on typical desktops, without the composition
   growing without limit on very wide monitors. */
.page-shell {
  max-width: var(--page-max);
  margin-inline: auto;
  overflow-x: clip;
}

h1, h2, h3, h4 { margin: 0; font-weight: 400; line-height: var(--lh-tight); }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
li { list-style: none; }

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

a { color: var(--color-link); text-decoration: none; transition: color var(--transition-fast); }

:focus-visible {
  outline: var(--focus-width) solid var(--color-focus);
  outline-offset: var(--focus-offset);
}
:focus:not(:focus-visible) { outline: none; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 999;
  padding: 0.5rem 1rem;
  background: var(--color-ink);
  color: #fff;
}
.skip-link:focus { left: 1rem; top: 1rem; }

.visually-hidden {
  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;
}

.prose > * + * { margin-top: var(--space-paragraph); }
