/* base.css — reset minimale, font self-hosted (OFL, spediti nel tema in assets/fonts/), tipografia moderna
   (display grottesco Space Grotesk + testo Inter), accessibilità base. stone_atelier (marmo monocromo).
   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:"Space Grotesk"; font-style:normal; font-weight:500; font-display:swap;
  src:url("../assets/fonts/space-grotesk-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family:"Space Grotesk"; font-style:normal; font-weight:600; font-display:swap;
  src:url("../assets/fonts/space-grotesk-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family:"Space Grotesk"; font-style:normal; font-weight:700; font-display:swap;
  src:url("../assets/fonts/space-grotesk-latin-700-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:500; font-display:swap;
  src:url("../assets/fonts/inter-latin-500-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"); }
@font-face { font-family:"Inter"; font-style:normal; font-weight:700; font-display:swap;
  src:url("../assets/fonts/inter-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: grottesca moderna Space Grotesk. I titoli grandi (h1/h2) vanno in MAIUSCOLO — impatto
   architettonico, coerente col logo — con tracking quasi neutro (moderno, non il caps romano largo). I titoli
   minori (h3, card) restano in tono-frase per leggibilità/registro editoriale. Corpo, lead e testi = Inter. */
h1, h2 {
  font-family: var(--font-display); font-weight: 600; line-height: var(--lh-snug);
  text-transform: uppercase; letter-spacing: var(--tracking-display); text-wrap: balance;
}
h1 { font-size: var(--text-3xl); line-height: var(--lh-tight); font-weight: 700; }
h2 { font-size: var(--text-xl); }
h3 { font-family: var(--font-display); font-weight: 600; font-size: var(--text-lg); line-height: 1.2; letter-spacing: -0.005em; }
p { text-wrap: pretty; }

/* Eyebrow = kicker Inter uppercase con filetto/vena grigia. Su fondo chiaro usa --accent-text (grafite);
   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 grottesco di sezione su mezza colonna (maiuscolo, breve). */
.statement { font-family: var(--font-display); font-weight: 600; text-transform: uppercase;
  letter-spacing: var(--tracking-display); font-size: clamp(1.7rem, 1.25rem + 1.9vw, 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); }
.prose > * + * { margin-top: var(--space-4); }
.prose h2 { margin-top: var(--space-6); }
