/* base.css — reset minimale, font self-hosted (OFL, spediti nel tema in assets/fonts/), tipografia
   (display Quicksand + testo Nunito Sans), accessibilità base. contract_textile.
   I token vivono in tokens.css: qui si consumano, non si ridichiarano colori. */

/* --- Font self-hosted (no Google Fonts, zero-live). I woff2 OFL sono spediti nel tema (assets/fonts/).
   theme.json dichiara le stesse famiglie/pesi: le due dichiarazioni puntano agli stessi file. --- */
@font-face { font-family:"Quicksand"; font-style:normal; font-weight:500; font-display:swap;
  src:url("../assets/fonts/quicksand-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family:"Quicksand"; font-style:normal; font-weight:600; font-display:swap;
  src:url("../assets/fonts/quicksand-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family:"Quicksand"; font-style:normal; font-weight:700; font-display:swap;
  src:url("../assets/fonts/quicksand-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family:"Nunito Sans"; font-style:normal; font-weight:400; font-display:swap;
  src:url("../assets/fonts/nunito-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family:"Nunito Sans"; font-style:normal; font-weight:600; font-display:swap;
  src:url("../assets/fonts/nunito-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family:"Nunito Sans"; font-style:normal; font-weight:700; font-display:swap;
  src:url("../assets/fonts/nunito-sans-latin-700-normal.woff2") format("woff2"); }

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--lh-body);
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg, picture { max-width: 100%; display: block; height: auto; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; padding: 0; }
button { font: inherit; cursor: pointer; }

/* Tipografia display: Quicksand, il geometrico tondo che riprende il lettering del logo.
   Peso 600 e non 700: alle scale display il 700 impasta le forme tonde e perde l'aria del logo. */
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: var(--lh-snug); letter-spacing: var(--tracking-display); text-wrap: balance; color: var(--deep); }
h1 { font-size: var(--text-3xl); line-height: var(--lh-tight); }
h2 { font-size: var(--text-xl); }
h3 { font-size: var(--text-lg); }

p { text-wrap: pretty; }
strong, b { font-weight: 700; }

/* Eyebrow = kicker uppercase con filetto azzurro. Su fondo chiaro il testo è --azure-ink (AA);
   su fondo scuro serve la variante --light (--azure-lt). ⚠ Il filetto può essere --azure (non è testo). */
.eyebrow {
  font-family: var(--font-body); font-weight: 700; font-size: var(--text-sm);
  letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--azure-ink);
  display: flex; align-items: center; gap: var(--space-3);
}
.eyebrow::before { content: ""; width: 1.8rem; height: 2px; background: var(--azure); flex: none; border-radius: 2px; }
.eyebrow--light { color: var(--azure-lt); }
.eyebrow--light::before { background: var(--azure-lt); }
.eyebrow--center { justify-content: center; }

/* Utilità tipografiche. --muted vale solo su fondo chiaro; sul dark il testo secondario è --muted-on-dark. */
.lead { font-size: var(--text-md); line-height: 1.5; color: var(--ink); }
.muted { color: var(--ink-muted); }
.small { font-size: var(--text-sm); }
.on-dark { color: var(--on-dark); }
.on-dark h1, .on-dark h2, .on-dark h3 { color: var(--on-dark); }
.on-dark .muted { color: var(--muted-on-dark); }

/* Accessibilità: focus visibile coerente */
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
:focus:not(:focus-visible) { outline: none; }

.skip-link {
  position: absolute; left: 0; top: -100%;
  background: var(--deep); color: var(--on-dark);
  padding: var(--space-3) var(--space-5); z-index: 100;
}
.skip-link:focus { top: 0; }

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

/* Layout primitives */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.container--narrow { max-width: var(--container-narrow); }
.section { padding-block: var(--section-y); }
.section--tight { padding-block: calc(var(--section-y) * 0.6); }
/* Due sezioni consecutive sommano i padding-block e aprono un vuoto: la seconda rinuncia a quello sopra. */
.section--flush-top { padding-block-start: 0; }
.alt { background: var(--surface); }
.band-navy { background: var(--navy); color: var(--on-dark); }
/* Bande full-bleed contigue: azzera il block-gap del flow-layout WP tra i figli del post-content (no strisce bianche). */
.wp-block-post-content > * { margin-block: 0; }
/* Il wrapper che WP mette attorno alle template-part limiterebbe le bande piene a piena larghezza. */
.wp-block-template-part { display: contents; }
.stack > * + * { margin-top: var(--space-4); }
.center { text-align: center; }
