/* ==========================================================================
   Matteo — Fisioterapia & Osteopatia
   Foglio di stile unico, organizzato in layer:
     0. Font (Inter self-hosted)
     1. Design tokens      5. Componenti
     2. Reset              6. Sezioni
     3. Base               7. Utility
     4. Layout             8. Motion
   ========================================================================== */


/* ==========================================================================
   1. DESIGN TOKENS
   Cambiare la palette = cambiare solo i --brand-*, --ink-* e le superfici.
   (Il tema alternativo dark+oro del confronto è stato smontato il 2026-09-19.)
   ========================================================================== */

:root {
  /* Brand — palette fornita da Matteo (2026-09-12): blu #607DB7,
     salvia #8FA1A1, bianco. Il blu è il 500 così com'è; 700 e 900 sono
     la stessa tinta più scura perché #607DB7 su bianco fa 4.1:1, sotto
     la soglia AA per il testo (link, eyebrow, tag usano il 700).
     Il salvia fa da 300 (bordi, accenti sulla banda scura) e tinge
     appena superfici alternate e linee. Le tinte chiare derivano dal blu. */
  --brand-900: #263654;
  --brand-700: #40598c;
  --brand-500: #607db7;
  --brand-300: #8fa1a1;
  --brand-100: #e3e8f2;
  --brand-050: #f1f4f9;

  /* Testo su fondo brand (bottone primario, skip link) */
  --on-brand: #ffffff;

  /* Neutri */
  --ink-900: #0f1419;
  --ink-700: #2b353d;
  --ink-500: #5a666f;
  --ink-300: #8b959d;

  /* Superfici — surface: pagina · panel: card e barre · alt: sezioni pari */
  --surface: #ffffff;
  --surface-alt: #f4f7f7;
  --panel: #ffffff;
  --panel-blur: rgb(255 255 255 / 88%);
  --line: #dde4e4;

  /* Tipografia */
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;

  --step--1: clamp(0.82rem, 0.8rem + 0.1vw, 0.88rem);
  --step-0: clamp(1rem, 0.97rem + 0.15vw, 1.06rem);
  --step-1: clamp(1.15rem, 1.09rem + 0.3vw, 1.31rem);
  --step-2: clamp(1.4rem, 1.28rem + 0.6vw, 1.75rem);
  --step-3: clamp(1.75rem, 1.53rem + 1.1vw, 2.4rem);
  --step-4: clamp(2.1rem, 1.7rem + 2vw, 3.4rem);

  /* Spaziature (scala 4px) */
  --space-2xs: 0.5rem;
  --space-xs: 0.75rem;
  --space-s: 1rem;
  --space-m: 1.5rem;
  --space-l: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;

  /* Forma */
  --radius-s: 8px;
  --radius-m: 14px;
  --radius-l: 24px;
  --radius-pill: 999px;

  /* Elevazione */
  --shadow-s: 0 1px 2px rgb(15 20 25 / 6%), 0 2px 6px rgb(15 20 25 / 4%);
  --shadow-m: 0 4px 12px rgb(15 20 25 / 6%), 0 12px 32px rgb(15 20 25 / 6%);
  --shadow-l: 0 12px 28px rgb(15 20 25 / 10%), 0 32px 64px rgb(15 20 25 / 8%);

  /* Misure */
  --container: 1140px;
  --measure: 62ch;

  /* Motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-fast: 160ms;
  --dur-base: 280ms;
}


/* ==========================================================================
   0. FONT — Inter, ospitato qui (assets/fonts/)
   Font variabile 400–800: un file per subset invece di uno per peso.
   unicode-range fa scaricare latin-ext solo se compare un glifo che lo
   richiede: per l'italiano, in pratica, viaggia solo il file latin (48 KB).
   Prima era caricato da Google Fonts: ogni visita mandava l'IP del visitatore
   a Google (USA), cioè un trasferimento extra-UE da dichiarare in privacy.
   Con il self-host non c'è più nessuna richiesta a terzi.
   ========================================================================== */

/* latin — copre l'italiano per intero (accenti, ™, —, €) */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("../fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

/* latin-ext — scaricato solo se serve (nomi stranieri, caratteri rari) */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("../fonts/inter-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}


/* ==========================================================================
   2. RESET
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 6rem; /* compensa l'header sticky negli anchor */
}

/* Rete di sicurezza: nessun elemento può generare scroll orizzontale.
   `clip` invece di `hidden` perché non crea un contenitore di scroll e non
   rompe position:sticky dell'header e della scheda credenziali. */
html,
body {
  overflow-x: clip;
}

img,
picture,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

ul[class],
ol[class] {
  list-style: none;
  padding: 0;
}

:focus-visible {
  outline: 3px solid var(--brand-500);
  outline-offset: 3px;
  border-radius: var(--radius-s);
}


/* ==========================================================================
   3. BASE
   ========================================================================== */

body {
  background: var(--surface);
  color: var(--ink-700);
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
  color: var(--ink-900);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h1 {
  font-size: var(--step-4);
  font-weight: 800;
  letter-spacing: -0.035em;
}

h2 {
  font-size: var(--step-3);
  font-weight: 800;
  letter-spacing: -0.03em;
}

h3 {
  font-size: var(--step-1);
}

p {
  text-wrap: pretty;
}

a {
  color: var(--brand-700);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

strong {
  color: var(--ink-900);
  font-weight: 650;
}

blockquote {
  margin: 0;
}


/* ==========================================================================
   4. LAYOUT
   ========================================================================== */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2rem);
}

.section {
  padding-block: clamp(3.5rem, 8vw, var(--space-2xl));
}

.section--alt {
  background: var(--surface-alt);
  border-block: 1px solid var(--line);
}

.section--brand {
  background: linear-gradient(160deg, var(--brand-900), var(--brand-700));
  color: var(--brand-100);
}

.section--brand h2,
.section--brand h3 {
  color: #fff;
}

/* Intestazione di sezione, centrata e con misura leggibile */
.section-head {
  max-width: 46rem;
  margin-inline: auto;
  margin-bottom: clamp(2rem, 5vw, var(--space-xl));
  text-align: center;
}

.section-head p {
  margin-top: var(--space-s);
  color: var(--ink-500);
  font-size: var(--step-1);
}

.section--brand .section-head p {
  color: var(--brand-100);
}

/* Griglia riusabile: si adatta senza media query dedicate */
.grid {
  display: grid;
  gap: var(--space-m);
}

.grid--3 {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
  counter-reset: step; /* alimenta la numerazione di .card--step */
}


/* ==========================================================================
   5. COMPONENTI
   ========================================================================== */

/* --- Etichetta / pill ---------------------------------------------------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-pill);
  background: var(--brand-050);
  color: var(--brand-700);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.01em;
}

.section--brand .eyebrow {
  background: rgb(255 255 255 / 12%);
  color: #fff;
}

.tag {
  display: block;
  margin-bottom: var(--space-xs);
  color: var(--brand-700);
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.section--brand .tag {
  color: var(--brand-300);
}

/* --- Bottoni ------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2xs);
  padding: 0.9rem 1.6rem;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-size: var(--step-0);
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease-out),
    background-color var(--dur-fast), border-color var(--dur-fast),
    box-shadow var(--dur-fast);
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

.btn svg {
  width: 1.15em;
  height: 1.15em;
  flex: none;
}

.btn--primary {
  background: var(--brand-500);
  color: var(--on-brand);
  box-shadow: var(--shadow-s);
}

.btn--primary:hover {
  background: var(--brand-700);
  box-shadow: var(--shadow-m);
}

.btn--secondary {
  background: var(--panel);
  border-color: var(--line);
  color: var(--ink-900);
}

.btn--secondary:hover {
  border-color: var(--brand-300);
  background: var(--brand-050);
}

.btn--ghost {
  background: rgb(255 255 255 / 10%);
  border-color: rgb(255 255 255 / 25%);
  color: #fff;
}

.btn--ghost:hover {
  background: rgb(255 255 255 / 18%);
}

.btn--sm {
  padding: 0.6rem 1.15rem;
  font-size: var(--step--1);
  /* 44px è il minimo per un bersaglio tattile (WCAG 2.5.8, Apple HIG).
     Con questo padding si arriva a ~41px: senza il min-height il tap
     sulla barra CTA mobile diventa impreciso. */
  min-height: 44px;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

/* --- Card ---------------------------------------------------------------- */

.card {
  padding: clamp(1.4rem, 3vw, 2rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  background: var(--panel);
  transition: border-color var(--dur-base), transform var(--dur-base) var(--ease-out),
    box-shadow var(--dur-base);
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--brand-300);
  box-shadow: var(--shadow-m);
}

.card__icon {
  display: grid;
  place-items: center;
  width: 2.9rem;
  height: 2.9rem;
  margin-bottom: var(--space-s);
  border-radius: var(--radius-s);
  background: var(--brand-050);
  color: var(--brand-500);
}

.card__icon svg {
  width: 1.4rem;
  height: 1.4rem;
}

.card h3 {
  margin-bottom: var(--space-2xs);
}

.card p {
  color: var(--ink-500);
  font-size: calc(var(--step-0) * 0.97);
}

/* Variante numerata: il progressivo compare in filigrana in alto a destra */
.card--step {
  position: relative;
  counter-increment: step;
}

.card--step::before {
  content: "0" counter(step);
  position: absolute;
  top: clamp(1.4rem, 3vw, 2rem);
  right: clamp(1.4rem, 3vw, 2rem);
  color: var(--brand-100);
  font-size: var(--step-2);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
}

.card--step h3 {
  padding-right: 2.5rem; /* lascia spazio al numero */
}


/* ==========================================================================
   6. SEZIONI
   ========================================================================== */

/* --- Header -------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--panel-blur);
  -webkit-backdrop-filter: blur(12px); /* iOS Safari */
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur-base), box-shadow var(--dur-base);
}

.site-header[data-scrolled="true"] {
  border-bottom-color: var(--line);
  box-shadow: var(--shadow-s);
}

.site-header .container {
  display: flex;
  align-items: center;
  gap: var(--space-m);
  min-height: 4.75rem;
}

.brand {
  display: flex;
  flex-direction: column;
  margin-right: auto;
  color: var(--ink-900);
  text-decoration: none;
  line-height: 1.2;
}

.brand__name {
  font-size: var(--step-1);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.brand__role {
  color: var(--ink-300);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.site-nav ul {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.5vw, 2rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  color: var(--ink-500);
  font-size: var(--step--1);
  font-weight: 550;
  text-decoration: none;
  transition: color var(--dur-fast);
}

.site-nav a:hover,
.site-nav a[aria-current="true"] {
  color: var(--brand-700);
}

/* Toggle mobile: nascosto da desktop, mostrato sotto il breakpoint */
.nav-toggle {
  display: none;
  padding: 0.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  background: var(--panel);
  cursor: pointer;
}

.nav-toggle svg {
  width: 1.35rem;
  height: 1.35rem;
}

.nav-toggle__close,
.nav-toggle[aria-expanded="true"] .nav-toggle__open {
  display: none;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__close {
  display: block;
}

/* --- Hero ---------------------------------------------------------------- */

.hero {
  position: relative;
  padding-block: clamp(2.5rem, 7vw, 5.5rem) clamp(3rem, 7vw, 5rem);
  overflow: hidden;
}

/* Alone morbido dietro l'hero, puramente decorativo */
.hero::before {
  content: "";
  position: absolute;
  inset: -30% 40% 30% -20%;
  background: radial-gradient(circle at 50% 50%, var(--brand-050), transparent 68%);
  pointer-events: none;
}

.hero .container {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: clamp(2rem, 5vw, 4rem);
}

/* min-width:0 evita che il testo lungo sfondi la colonna del grid */
.hero__copy {
  min-width: 0;
}

.hero h1 {
  margin-block: var(--space-m) var(--space-s);
}

.hero__lead {
  max-width: 34rem;
  color: var(--ink-500);
  font-size: var(--step-1);
}

.hero .btn-row {
  margin-top: var(--space-l);
}

.hero__note {
  margin-top: var(--space-s);
  color: var(--ink-300);
  font-size: var(--step--1);
}

.hero__media {
  position: relative;
}

.hero__media img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  /* Foto quadrata (1254x1254, fondo uniforme, soggetto centrato): il 4:5
     taglia solo i lati, la posizione verticale non conta. Verificato
     simulando il crop con Pillow (2026-09-19). */
  object-position: center;
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-l);
}

/* Badge sovrapposto alla foto */
.hero__badge {
  position: absolute;
  bottom: clamp(-0.5rem, 2vw, 1.25rem);
  /* sporge un po' fuori dalla foto, ma mai oltre il bordo del viewport */
  left: clamp(-1.5rem, -2vw, -0.5rem);
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  max-width: 15rem;
  padding: var(--space-xs) var(--space-s);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  background: var(--panel);
  box-shadow: var(--shadow-m);
}

.hero__badge strong {
  display: block;
  font-size: var(--step-2);
  line-height: 1;
}

.hero__badge span {
  color: var(--ink-500);
  font-size: var(--step--1);
  line-height: 1.35;
}

/* --- Prima valutazione (ex trust bar) ----------------------------------- */
/* Dal 14/10 e' una sezione a sé: titolo, le 7 voci di Matteo, prezzo e CTA. */

.trust {
  border-block: 1px solid var(--line);
  background: var(--surface-alt);
}

/* Sette voci lunghe (testo di Matteo, 24/09): griglia a colonne, non più
   una riga di spunte brevi. */
.trust ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
  gap: var(--space-s) var(--space-l);
  max-width: 64rem;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}

/* Prezzo + bottoni sotto l'elenco (Matteo 14/10: «A soli 45€») */
.trust__offer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-s) var(--space-l);
  margin-top: var(--space-l);
}

.trust__price {
  margin: 0;
  color: var(--ink-500);
  font-size: var(--step-1);
  font-weight: 600;
}

.trust__price strong {
  margin-left: 0.15em;
  color: var(--brand-700);
  font-size: var(--step-3);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.trust li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2xs);
  color: var(--ink-500);
  font-size: var(--step--1);
  font-weight: 600;
  line-height: 1.45;
}

.trust svg {
  width: 1.1rem;
  height: 1.1rem;
  flex: none;
  margin-top: 0.2em;
  color: var(--brand-500);
}

/* --- Chi sono: scheda credenziali + testo lungo ------------------------- */

.about .container {
  display: grid;
  grid-template-columns: 0.72fr 1.28fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}

/* Resta agganciata durante la lettura del testo accanto */
.credentials {
  position: sticky;
  top: 6.5rem;
  padding: clamp(1.4rem, 3vw, 2rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  background: var(--surface-alt);
}

.credentials h3 {
  margin-bottom: var(--space-m);
}

.credentials dl {
  display: grid;
  gap: var(--space-s);
  margin: 0;
}

.credentials dt {
  color: var(--ink-300);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.credentials dd {
  margin: 0.2rem 0 0;
  color: var(--ink-700);
  font-size: calc(var(--step-0) * 0.94);
  line-height: 1.5;
}

.about__body {
  min-width: 0;
}

.prose {
  max-width: var(--measure);
  margin-top: var(--space-m);
}

.prose p {
  color: var(--ink-500);
}

.prose p + p {
  margin-top: var(--space-s);
}

/* Frase chiave staccata dal flusso del discorso */
.prose .prose__pull {
  margin-block: var(--space-m);
  padding-left: var(--space-m);
  border-left: 3px solid var(--brand-300);
  color: var(--ink-900);
  font-size: var(--step-2);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

/* --- Checklist "questo percorso fa per te se..." ------------------------ */

.checklist {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 23rem), 1fr));
  gap: var(--space-s);
  max-width: 62rem;
  margin-inline: auto;
  padding: 0;
  list-style: none;
}

.checklist li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-s);
  padding: var(--space-m);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  background: var(--panel);
}

.checklist svg {
  width: 1.05rem;
  height: 1.05rem;
  padding: 0.35rem;
  box-sizing: content-box;
  border-radius: var(--radius-pill);
  background: var(--brand-050);
  color: var(--brand-500);
}

.checklist p {
  color: var(--ink-500);
}

.checklist strong {
  color: var(--ink-900);
}

/* --- Problematiche (card con icona, 3x2 da desktop) --------------------- */

.problems {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: var(--space-m);
  margin: 0;
  padding: 0;
  list-style: none;
}

/* --- Galleria studio ----------------------------------------------------- */

.gallery {
  display: grid;
  /* 18rem: con 6 foto e container 1140px fa 3 colonne (15rem ne farebbe 4+2) */
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
  gap: var(--space-s);
}

.gallery figure {
  position: relative;
  margin: 0;
  border-radius: var(--radius-m);
  overflow: hidden;
  background: var(--surface-alt);
}

.gallery img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  transition: transform var(--dur-base) var(--ease-out);
}

.gallery figure:hover img {
  transform: scale(1.04);
}

/* --- Mappa (anteprima statica → iframe Google solo su clic) ------------- */

.map {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: var(--space-m);
  margin-top: var(--space-l);
}

.map__frame {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-m);
  overflow: hidden;
  background: var(--surface-alt);
}

.map__frame img,
.map__frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.map__frame img {
  object-fit: cover;
}

/* Riquadro con il bottone, sopra l'anteprima */
.map__overlay {
  position: absolute;
  inset: auto var(--space-s) var(--space-s);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-xs) var(--space-s);
  padding: var(--space-xs) var(--space-s);
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  background: var(--panel-blur);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow-m);
}

.map__overlay p {
  flex: 1 1 14rem;
  margin: 0;
  color: var(--ink-500);
  font-size: var(--step--1);
}

.map__info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-xs);
  padding: clamp(1.4rem, 3vw, 2rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  background: var(--panel);
}

.map__info h3 {
  margin: 0;
}

.map__info address {
  font-style: normal;
  font-weight: 600;
}

.map__info p {
  color: var(--ink-500);
  font-size: var(--step--1);
}

.map__credit {
  margin-top: auto;
  color: var(--ink-300);
  font-size: calc(var(--step--1) * 0.9);
}

.map__credit a {
  color: inherit;
}

/* --- Recensioni (fonte: scheda Google, copiate come testo) ------------- */

.reviews {
  position: relative;
}

/* Griglia statica, 2 colonne da desktop (24rem impedisce il 3+1):
   nessun carosello, chiesto da Matteo il 14/10. */
.reviews__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 24rem), 1fr));
  gap: var(--space-m);
}

.quote {
  display: flex;
  flex-direction: column;
  padding: clamp(1.4rem, 3vw, 2rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  background: var(--panel);
  box-shadow: var(--shadow-s);
}

.quote__stars {
  margin: 0 0 var(--space-xs);
  color: var(--brand-500);
  font-size: var(--step-1);
  letter-spacing: 0.08em;
  line-height: 1;
}

.quote blockquote {
  flex: 1;
  color: var(--ink-700);
  font-size: var(--step-0);
}

/* Testata «alla Google»: iniziale in un cerchio, nome, data e fonte */
.quote__head {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  margin-bottom: var(--space-xs);
  color: var(--ink-300);
  font-size: var(--step--1);
}

.quote__avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: var(--radius-pill);
  background: var(--brand-100);
  color: var(--brand-700);
  font-size: var(--step-1);
  font-weight: 700;
}

.quote__who {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.quote__who strong {
  color: var(--ink-700);
  font-size: var(--step-0);
  font-weight: 600;
}

.reviews__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-s) var(--space-m);
  margin-top: var(--space-xs);
}


.reviews__source {
  flex: 1 1 16rem;
  margin: 0;
  color: var(--ink-300);
  font-size: var(--step--1);
}

/* --- FAQ ----------------------------------------------------------------- */

.faq {
  max-width: 48rem;
  margin-inline: auto;
  display: grid;
  gap: var(--space-2xs);
}

.faq details {
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  background: var(--panel);
  overflow: hidden;
}

.faq details[open] {
  border-color: var(--brand-300);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-s);
  padding: var(--space-s) var(--space-m);
  color: var(--ink-900);
  font-weight: 650;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  flex: none;
  color: var(--brand-500);
  font-size: var(--step-2);
  font-weight: 400;
  line-height: 1;
  transition: transform var(--dur-base) var(--ease-out);
}

.faq details[open] summary::after {
  transform: rotate(45deg);
}

.faq p {
  padding: 0 var(--space-m) var(--space-m);
  color: var(--ink-500);
}

/* --- CTA finale ---------------------------------------------------------- */

.cta {
  text-align: center;
}

.cta p {
  max-width: 34rem;
  margin: var(--space-s) auto 0;
  color: var(--brand-100);
  font-size: var(--step-1);
}

.cta .btn-row {
  justify-content: center;
  margin-top: var(--space-l);
}

/* Banda «Prenota» tra metodo e problematiche: più compatta */
.cta--compact {
  padding-block: clamp(2.5rem, 5vw, 3.5rem);
}

.cta--compact .section-head {
  margin-bottom: 0;
}

.cta--compact .btn-row {
  margin-top: var(--space-m);
}

/* --- Pagina legale (privacy.html) ---------------------------------------- */
/* Testo lungo da leggere: misura stretta, gerarchia chiara, niente reveal. */

.legal__head {
  max-width: var(--measure);
  margin-bottom: var(--space-l);
}

.legal__head h1 {
  margin-top: var(--space-s);
  font-size: var(--step-3);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.legal__meta {
  margin-top: var(--space-xs);
  color: var(--ink-500);
  font-size: var(--step--1);
}

.legal__body {
  max-width: var(--measure);
}

.legal__body h2 {
  margin-top: var(--space-l);
  font-size: var(--step-1);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.legal__body h3 {
  margin-top: var(--space-m);
  font-size: var(--step-0);
  font-weight: 700;
}

.legal__body p,
.legal__body li {
  margin-top: var(--space-xs);
  color: var(--ink-700);
}

.legal__body ul {
  padding-left: 1.2rem;
  list-style: disc;
}

.legal__body a:not(.btn) {
  color: var(--brand-700);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.legal__body a:not(.btn):hover {
  color: var(--brand-900);
}

/* Riquadro "In breve": la versione a strati chiesta dal Garante (prima il
   succo, poi il dettaglio) */
.legal__summary {
  padding: var(--space-m);
  border-radius: var(--radius-m);
  border: 1px solid var(--line);
  background: var(--surface-alt);
}

.legal__summary h2 {
  margin-top: 0;
  font-size: var(--step-0);
  color: var(--brand-700);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.legal__summary li {
  color: var(--ink-900);
}

.legal__back {
  margin-top: var(--space-l);
}

.legal__body code {
  padding: 0.05em 0.35em;
  border-radius: var(--radius-s);
  background: var(--surface-alt);
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.92em;
}

/* --- Footer -------------------------------------------------------------- */

.site-footer {
  padding-block: var(--space-xl) var(--space-m);
  border-top: 1px solid var(--line);
  background: var(--surface-alt);
  font-size: var(--step--1);
}

.site-footer__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
  gap: var(--space-l);
}

.site-footer h3 {
  margin-bottom: var(--space-xs);
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-300);
  /* Stessa altezza di riga del nome nella prima colonna (step-1 × 1.2):
     i titoli in maiuscoletto restano centrati sulla stessa linea del nome. */
  line-height: calc(var(--step-1) * 1.2);
}

/* Prima colonna: il nome occupa la riga dei titoli h3, con lo stesso
   spazio sotto, così le quattro colonne partono allineate. */
.site-footer .brand__name {
  display: block;
  margin-bottom: var(--space-xs);
  line-height: 1.2;
}

.site-footer__about {
  margin: 0;
  color: var(--ink-500);
}

.site-footer ul {
  display: grid;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer a {
  color: var(--ink-500);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--brand-700);
  text-decoration: underline;
}

.link-btn {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
  min-height: 0;
}

.site-footer .link-btn:hover {
  color: var(--brand-700);
  text-decoration: underline;
}

.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-s);
  margin-top: var(--space-xl);
  padding-top: var(--space-m);
  border-top: 1px solid var(--line);
  color: var(--ink-300);
}

/* --- CTA flottante mobile ----------------------------------------------- */

.sticky-cta {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 40;
  display: none;
  gap: var(--space-2xs);
  padding: var(--space-2xs) var(--space-s) max(var(--space-2xs), env(safe-area-inset-bottom));
  background: var(--panel-blur);
  -webkit-backdrop-filter: blur(12px); /* iOS Safari */
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
}

.sticky-cta .btn {
  flex: 1;
}

/* Finché il banner chiede una scelta, la barra CTA mobile lascia il posto:
   due elementi fissi in basso si coprirebbero. */
body[data-consent="pending"] .sticky-cta {
  display: none;
}

/* --- Banner consenso (Pixel Meta) ---------------------------------------- */

.consent {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 60;
  padding: var(--space-s) var(--space-s) max(var(--space-s), env(safe-area-inset-bottom));
  pointer-events: none;
}

.consent__box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-xs) var(--space-m);
  max-width: var(--container);
  margin-inline: auto;
  padding: var(--space-s) var(--space-m);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  background: var(--panel);
  box-shadow: var(--shadow-l);
  pointer-events: auto;
}

.consent__title {
  flex: 1 1 100%;
  margin: 0;
  font-weight: 700;
}

.consent__text {
  flex: 1 1 24rem;
  margin: 0;
  color: var(--ink-500);
  font-size: var(--step--1);
}

.consent__text a {
  color: var(--brand-700);
}

.consent__actions {
  display: flex;
  gap: var(--space-2xs);
  margin-inline-start: auto;
}


/* ==========================================================================
   7. UTILITY
   ========================================================================== */

.skip-link {
  position: absolute;
  top: var(--space-2xs);
  left: var(--space-2xs);
  z-index: 100;
  padding: 0.65rem 1.1rem;
  border-radius: var(--radius-s);
  background: var(--brand-500);
  color: var(--on-brand);
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-150%);
  transition: transform var(--dur-fast) var(--ease-out);
}

.skip-link:focus-visible {
  transform: translateY(0);
}


/* ==========================================================================
   8. MOTION — reveal all'ingresso, attivato da main.js
   ========================================================================== */

[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* Ritardo a cascata per gli elementi fratelli */
[data-reveal]:nth-child(2) { transition-delay: 70ms; }
[data-reveal]:nth-child(3) { transition-delay: 140ms; }
[data-reveal]:nth-child(4) { transition-delay: 210ms; }

/* Su touch non esiste "passare sopra": il dito tocca e va via, ma il browser
   lascia lo stato :hover attaccato all'ultimo elemento premuto. Il risultato è
   una card che resta sollevata o una foto che resta ingrandita finché non si
   tocca altrove. Qui si annullano solo le trasformazioni, non i cambi di
   colore: quelli restano utili come feedback del tap. */
@media (hover: none) {
  .btn:hover,
  .card:hover,
  .gallery figure:hover img {
    transform: none;
  }

  .card:hover {
    border-color: var(--line);
    box-shadow: none;
  }

  .btn--primary:hover {
    box-shadow: var(--shadow-s);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
  }
}


/* ==========================================================================
   9. BREAKPOINT
   Mobile-first non è praticabile qui (il layout base è a 2 colonne),
   quindi si scala verso il basso in due tappe.
   ========================================================================== */

/* Tablet */
@media (max-width: 62rem) {
  .hero .container,
  .about .container {
    grid-template-columns: 1fr;
  }

  /* Impilata sopra il testo, non ha più senso tenerla agganciata */
  .credentials {
    position: static;
  }

  .hero__media {
    order: -1;
    max-width: 26rem;
    margin-inline: auto;
  }

  /* 4:3 e non 3:2: un formato più panoramico lascerebbe troppo poco del
     busto. Valori verificati simulando il crop, non a occhio. */
  .hero__media img {
    aspect-ratio: 4 / 3;
    /* Foto quadrata: il 4:3 taglia il 25% in altezza. Ancorata in alto la
       testa resta con aria sopra e il taglio cade sugli avambracci; al 45%
       tagliava la fronte. Verificato simulando il crop (2026-09-19). */
    object-position: center top;
  }

  .hero__badge {
    left: auto;
    right: clamp(-0.5rem, 2vw, 1rem);
  }

  .map {
    grid-template-columns: 1fr;
  }
}

/* Mobile */
@media (max-width: 48rem) {
  .nav-toggle {
    display: block;
    order: 3;
  }

  .site-header .container {
    flex-wrap: wrap;
  }

  /* Il menu diventa un pannello a piena larghezza sotto l'header */
  .site-nav {
    display: none;
    flex-basis: 100%;
    order: 4;
  }

  .site-nav[data-open="true"] {
    display: block;
    padding-bottom: var(--space-s);
    border-top: 1px solid var(--line);
  }

  .site-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .site-nav a {
    display: block;
    padding: var(--space-xs) 0;
    border-bottom: 1px solid var(--line);
    font-size: var(--step-0);
  }

  /* Su mobile la CTA vive nella barra flottante in basso */
  .site-header .btn {
    display: none;
  }

  .sticky-cta {
    display: flex;
  }

  body {
    padding-bottom: 4.5rem;
  }

  .trust ul {
    justify-content: flex-start;
    gap: var(--space-xs) var(--space-m);
  }
}
