/* Groundwork — stili globali */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: auto; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-stretch: calc(var(--wdth-body) * 1%);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

[hidden] { display: none !important; }
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd { margin: 0; }
hr { border: 0; border-top: var(--border) solid var(--line); margin: 0; }
::selection { background: var(--c-yellow); color: var(--c-ink); }

/* Titoli: condensed, maiuscolo, pesante */
h1, h2, h3, h4, .heading-display-xl, .heading-display-l {
  font-family: var(--font-display);
  font-stretch: calc(var(--wdth-display) * 1%);
  font-weight: var(--fw-display);
  line-height: var(--lh-heading);
  text-transform: uppercase;
  letter-spacing: -0.005em;
}
h1 { font-size: var(--fs-h1); line-height: 0.95; }
h2 { font-size: var(--fs-h2); line-height: 0.96; }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-h4); letter-spacing: 0; }

/* Focus visibile ovunque */
:focus { outline: none; }
:focus-visible {
  outline: 3px solid var(--c-yellow);
  outline-offset: 3px;
  box-shadow: 0 0 0 6px var(--c-ink);
}
[data-theme="yellow"] :focus-visible,
[data-theme="light"] :focus-visible { outline-color: var(--c-ink); box-shadow: 0 0 0 6px var(--c-yellow); }

.skip-link {
  position: fixed; top: 0.5rem; left: 0.5rem; z-index: 2000;
  padding: 0.75rem 1rem; background: var(--c-yellow); color: var(--c-ink);
  font-family: var(--font-mono); font-size: var(--fs-label); text-transform: uppercase;
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

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

/* Movimento ridotto: stessa esperienza, contenuti sempre visibili */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal], [data-settle], [data-split] { opacity: 1 !important; transform: none !important; visibility: visible !important; }
}
