/* base.css — reset minimale, font self-hosted (OFL, spediti nel tema in assets/fonts/), tipografia
   editoriale (display Cormorant Garamond + testo Inter), accessibilità base. artisan_atelier.
   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:"Cormorant Garamond"; font-style:normal; font-weight:400; font-display:swap;
  src:url("../assets/fonts/cormorant-garamond-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family:"Cormorant Garamond"; font-style:normal; font-weight:500; font-display:swap;
  src:url("../assets/fonts/cormorant-garamond-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family:"Inter"; font-style:normal; font-weight:400; font-display:swap;
  src:url("../assets/fonts/inter-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family:"Inter"; font-style:normal; font-weight:600; font-display:swap;
  src:url("../assets/fonts/inter-latin-600-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 Cormorant Garamond. Il peso resta 400/500: alle scale display il 700 impasta.
   Nessun tracking negativo — il serif ha già le sue proporzioni e stretto si chiude.
   ⚠ Cormorant ha occhio piccolo e contrasto alto: sotto ~24px si sfarina → sta SOLO nei display, mai nel corpo. */
h1, h2, h3 { 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-size: var(--text-lg); font-weight: 500; }   /* al minimo della scala display il 500 tiene il corpo */
p { text-wrap: pretty; }

/* Eyebrow = kicker Inter uppercase con filetto d'ottone. Su fondo chiaro usa --accent-text (ottone
   testo, AA); su fondo scuro serve la variante --light (--accent-lt), 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: 1px; background: var(--accent-deco); flex: none; }
.eyebrow--light { color: var(--accent-lt); }
.eyebrow--light::before { background: var(--accent-lt); }

/* 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); }
/* Statement: display 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. */
.statement { font-family: var(--font-display); font-size: clamp(1.7rem, 1.1rem + 2.2vw, 2.5rem); line-height: var(--lh-snug); }

/* 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); }
/* 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); }
/* 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); }
