/* base.css — reset minimale, font self-hosted (OFL, spediti nel tema in assets/fonts/), tipografia
   editoriale (display DM Serif Display + testo Poppins), accessibilità base. food_producer.
   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:"DM Serif Display"; font-style:normal; font-weight:400; font-display:swap;
  src:url("../assets/fonts/dm-serif-display-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family:"Poppins"; font-style:normal; font-weight:400; font-display:swap;
  src:url("../assets/fonts/poppins-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family:"Poppins"; font-style:normal; font-weight:500; font-display:swap;
  src:url("../assets/fonts/poppins-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family:"Poppins"; font-style:normal; font-weight:600; font-display:swap;
  src:url("../assets/fonts/poppins-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family:"Poppins"; font-style:normal; font-weight:700; font-display:swap;
  src:url("../assets/fonts/poppins-latin-700-normal.woff2") format("woff2"); }
/* Pacifico: brush-script del wordmark d'intestazione, il più vicino al lettering del logo del cliente. */
@font-face { font-family:"Pacifico"; font-style:normal; font-weight:400; font-display:swap;
  src:url("../assets/fonts/pacifico-latin-400-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: serif DM Serif Display. Peso 400 (l'unico che ha: alle scale display il "grassetto"
   sintetico impasta). Nessun tracking negativo — il serif ha già le sue proporzioni e stretto si chiude.
   ⚠ DM Serif ha alto contrasto e occhio da display: sta SOLO nei titoli grandi (h1/h2, >=24px).
   Le card e i titolini (h3) restano in Poppins: sotto ~24px il serif si sfarina. */
h1, h2 { font-family: var(--font-display); font-weight: 400; line-height: var(--lh-snug); letter-spacing: var(--tracking-display); text-wrap: balance; }
h1 { font-size: var(--text-3xl); line-height: var(--lh-tight); }
h2 { font-size: var(--text-xl); }
h3 { font-family: var(--font-body); font-weight: 600; font-size: var(--text-lg); line-height: 1.25; }
p { text-wrap: pretty; }

/* Eyebrow = kicker Poppins uppercase con filetto d'arancio. Su fondo chiaro usa --accent-text (arancio
   testo, AA); su fondo scuro serve la variante --light (--on-dark-muted, crema), mai --accent-text sul dark. */
.eyebrow {
  font-family: var(--font-body); font-weight: 600; font-size: var(--text-sm);
  letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--accent-text);
  display: flex; align-items: center; gap: var(--space-3);
}
.eyebrow::before { content: ""; width: 1.8rem; height: 2px; background: var(--accent-deco); flex: none; }
/* Su banda bordeaux l'arancio-testo scende sotto AA (4.1:1): l'eyebrow diventa crema, il filetto resta arancio (deco 3:1). */
.eyebrow--light { color: var(--on-dark-muted); }
.eyebrow--light::before { background: var(--accent-fill); }

/* Utilità tipografiche. --muted vale solo su fondo chiaro; sul dark il testo secondario è --on-dark-muted. */
.lead { font-size: var(--text-md); line-height: 1.5; color: var(--ink); }
.muted { color: var(--ink-muted); }
.small { font-size: var(--text-sm); }
/* Statement: display serif di sezione su mezza colonna. Size PROPRIA e non --text-2xl: la copy reale del
   cliente arriva dal suo materiale e può superare i 120 caratteri, dove una size da titolo breve frantuma
   la colonna (lezione DeMartini: 67 vs 123 caratteri → 10 righe). */
.statement { font-family: var(--font-display); font-weight: 400; font-size: clamp(1.7rem, 1.1rem + 2.1vw, 2.5rem); line-height: var(--lh-snug); }

/* Prosa delle pagine legali/lunghe */
.prose h2 { margin-block: var(--space-6) var(--space-3); }
.prose p { margin-bottom: var(--space-4); color: var(--ink); max-width: 68ch; }

/* 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(--brand); 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); }
/* Le ancore (sotto-menu Prodotti, link interni #) atterrano sotto l'header fisso (~76px), non nascoste. */
section[id] { scroll-margin-top: 92px; }
.section--flush-top { padding-block-start: 0; }
.alt { background: var(--surface); }
/* 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; }
.stack > * + * { margin-top: var(--space-4); }
