/* ==================================================================
   Studio dermatologico associato Tositti — foglio di stile del sito
   Costruito esclusivamente sui token di assets/css/tokens.css.
   Nessun colore, spazio o raggio è scritto a mano: tutto passa
   dalle variabili del design system.
   ================================================================== */

/* ---------- 1. Reset ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 104px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 24px;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg, video { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }

h1, h2, h3, h4, p, figure, blockquote, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }

a { color: inherit; text-decoration: none; }

:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

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

.skip-link {
  position: fixed;
  top: -120px;
  left: var(--space-8);
  z-index: 1100;
  padding: var(--space-12) var(--space-24);
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-md);
  transition: top 0.18s ease-out;
}
.skip-link:focus-visible { top: var(--space-8); }


/* ---------- 2. Scala tipografica (responsive) ----------
   Le classi del design system restano la fonte di verità; qui i
   display scalano con la viewport perché 88px non sta su mobile. */

.display-xl { font-size: clamp(40px, 8.2vw, 88px); line-height: 1.045; }
.display-l  { font-size: clamp(32px, 5.6vw, 64px); line-height: 1.09; }
.headline   { font-size: clamp(27px, 3.6vw, 40px); line-height: 1.15; }
.title      { font-size: clamp(21px, 2.1vw, 28px); line-height: 1.28; }
.subtitle   { font-size: clamp(17px, 1.5vw, 20px); line-height: 1.45; }
.body-lg    { font-size: clamp(16px, 1.25vw, 18px); line-height: 1.56; }

.balance { text-wrap: balance; }
.pretty  { text-wrap: pretty; }

.muted       { color: var(--ink-muted); }
.on-inverse  { color: var(--ink-on-inverse); }
.muted-inverse { color: var(--ink-muted-on-inverse); }

/* Il maiuscolo scenografico del riferimento: texture grafica, non regola
   di scrittura. Usato solo su blocchi-dichiarazione dentro sezioni scure. */
.statement {
  font-size: clamp(19px, 2.05vw, 27px);
  line-height: 1.36;
  font-weight: 500;
  letter-spacing: 0.005em;
  text-transform: uppercase;
}
.statement .sep {
  display: inline-block;
  width: 9px; height: 9px;
  margin: 0 var(--space-8) 0.16em var(--space-4);
  border-radius: var(--radius-full);
  background: var(--brand-500);
  vertical-align: middle;
}


/* ---------- 3. Layout ---------- */

.wrap {
  width: 100%;
  max-width: 1440px;
  margin-inline: auto;
  padding-inline: var(--space-24);
}
@media (min-width: 900px)  { .wrap { padding-inline: var(--space-48); } }
@media (min-width: 1280px) { .wrap { padding-inline: var(--space-64); } }

.section { padding-block: var(--space-64); }
@media (min-width: 900px)  { .section { padding-block: var(--space-96); } }
@media (min-width: 1280px) { .section { padding-block: var(--space-128); } }

.section--tight { padding-block: var(--space-48); }
@media (min-width: 900px) { .section--tight { padding-block: var(--space-64); } }

.section--inverse {
  background: var(--surface-inverse);
  color: var(--ink-on-inverse);
}
.section--sunken { background: var(--surface-sunken); }

.stack > * + * { margin-top: var(--space-16); }
.stack-lg > * + * { margin-top: var(--space-24); }
.stack-xl > * + * { margin-top: var(--space-32); }

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-24);
  margin-bottom: var(--space-48);
}


/* ---------- 4. Tag / eyebrow ---------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-8);
  color: var(--ink-muted);
}
.eyebrow::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: var(--radius-full);
  background: var(--brand-500);
  flex: none;
}
.section--inverse .eyebrow,
.card .eyebrow { color: var(--ink-muted-on-inverse); }

.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-8);
  padding: var(--space-4) var(--space-12);
  border-radius: var(--radius-full);
  font-size: 13px;
  line-height: 20px;
  font-weight: 500;
}
.badge--ok     { background: var(--success-fill); color: var(--success); }
.badge--danger { background: var(--danger-fill);  color: var(--danger); }

.chip {
  display: inline-block;
  padding: var(--space-4) var(--space-12);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  line-height: 20px;
  color: var(--ink-muted);
}


/* ---------- 5. Bottoni ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-8);
  padding: var(--space-16) var(--space-32);
  border: 1px solid transparent;
  border-radius: var(--radius-full);
  font-size: 13px;
  line-height: 16px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease,
              border-color 0.2s ease, transform 0.2s ease;
}
.btn:active { transform: translateY(1px); }

.btn--primary { background: var(--brand-500); color: var(--on-brand); }
.btn--primary:hover { background: var(--brand-700); color: var(--ink-on-inverse); }

.btn--secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--border-strong);
}
.btn--secondary:hover { border-color: var(--ink); }

.section--inverse .btn--secondary,
.site-footer .btn--secondary,
.hero .btn--secondary,
.site-header:not(.is-solid):not(.is-stuck) .btn--secondary { color: var(--ink-on-inverse); }
.section--inverse .btn--secondary:hover,
.site-footer .btn--secondary:hover,
.hero .btn--secondary:hover,
.site-header:not(.is-solid):not(.is-stuck) .btn--secondary:hover {
  border-color: var(--ink-on-inverse);
}

.btn--ghost {
  padding-inline: 0;
  background: none;
  color: var(--brand-700);
}
.btn--ghost:hover { text-decoration: underline; text-underline-offset: 4px; }
.section--inverse .btn--ghost, .card .btn--ghost { color: var(--brand-500); }

.btn--block { width: 100%; }
.btn--lg { padding: var(--space-24) var(--space-48); font-size: 14px; }


/* ---------- 6. Freccia dei link ---------- */

.arrow {
  width: 20px; height: 20px;
  flex: none;
  transition: transform 0.25s ease;
}
a:hover .arrow, button:hover .arrow { transform: translateX(4px); }


/* ---------- 7. Header ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  padding-block: var(--space-16);
  color: var(--ink-on-inverse);
  transition: background-color 0.3s ease, color 0.3s ease,
              border-color 0.3s ease, padding 0.3s ease;
  border-bottom: 1px solid transparent;
}
/* Pagine con hero scuro: l'header parte trasparente. Sulle pagine chiare
   parte già "solido", classe applicata dal markup. */
.site-header.is-solid,
.site-header.is-stuck {
  background: var(--surface);
  color: var(--ink);
  border-bottom-color: var(--border);
}
@media (min-width: 900px) {
  .site-header.is-stuck { padding-block: var(--space-12); }
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-24);
}

.brand { display: inline-flex; align-items: center; flex: none; }
.brand img { height: 44px; width: auto; }
@media (min-width: 900px) { .brand img { height: 52px; } }
/* Coppia coerente col fondo: a colori su chiaro, negativa su scuro. */
.brand .logo--light { display: none; }
.site-header.is-solid .brand .logo--light,
.site-header.is-stuck .brand .logo--light { display: block; }
.site-header.is-solid .brand .logo--dark,
.site-header.is-stuck .brand .logo--dark { display: none; }

.nav { display: none; }
/* Sotto i 1160px le cinque voci in maiuscolo tracciato non stanno su una
   riga accanto al logo e ai due pulsanti: resta il solo menu a tutto schermo. */
@media (min-width: 1160px) {
  .nav { display: flex; align-items: center; gap: var(--space-24); }
}
@media (min-width: 1320px) { .nav { gap: var(--space-32); } }
.nav a {
  font-size: 13px;
  line-height: 16px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding-block: var(--space-4);
  white-space: nowrap;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.nav a:hover { border-bottom-color: currentColor; }
.nav a[aria-current="page"] { border-bottom-color: var(--brand-500); }

.header-actions { display: flex; align-items: center; gap: var(--space-12); }
.header-actions .btn { padding: var(--space-12) var(--space-24); }
.header-actions .btn--phone { display: none; }
@media (min-width: 720px) { .header-actions .btn--phone { display: inline-flex; } }

.menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  padding: 0;
  background: none;
  border: 0;
  cursor: pointer;
  color: inherit;
}
.menu-toggle__bars { display: block; width: 22px; }
.menu-toggle__bars span {
  display: block;
  height: 1.5px;
  background: currentColor;
  border-radius: var(--radius-full);
  transition: transform 0.25s ease, opacity 0.2s ease;
}
.menu-toggle__bars span + span { margin-top: 6px; }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }


/* ---------- 8. Menu a tutto schermo ---------- */

.menu-panel {
  position: fixed;
  inset: 0;
  z-index: 99;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--surface-inverse);
  color: var(--ink-on-inverse);
  padding-block: 120px var(--space-48);
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.menu-panel.is-open { opacity: 1; visibility: visible; }
body.menu-open { overflow: hidden; }

.menu-panel__grid {
  display: grid;
  gap: var(--space-48);
}
@media (min-width: 900px) {
  .menu-panel__grid { grid-template-columns: 1.3fr 1fr; gap: var(--space-96); }
}
.menu-panel__list li + li { margin-top: var(--space-12); }
.menu-panel__list a {
  display: inline-flex;
  align-items: center;
  gap: var(--space-16);
  font-size: clamp(30px, 5vw, 56px);
  line-height: 1.16;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink-on-inverse);
  transition: color 0.2s ease;
}
.menu-panel__list a:hover { color: var(--brand-500); }
.menu-panel__meta a { color: var(--brand-500); }
.menu-panel__meta dt { margin-bottom: var(--space-4); }
.menu-panel__meta dd + dt { margin-top: var(--space-24); }


/* ---------- 9. Segnaposto immagine / video ----------
   Richiesta del cliente: segnaposto NEUTRO GRIGIO, in attesa del
   servizio fotografico professionale. Il design system prescriveva
   invece un blocco pieno brand-300 → brand-400: per tornarci basta
   cambiare i due valori qui sotto.  */

:root {
  --ph-bg: var(--surface-sunken);
  --ph-bg-inverse: #26333a;
  --ph-ink: var(--ink-faint);
}

.ph {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-8);
  padding: var(--space-24);
  text-align: center;
  background: var(--ph-bg);
  color: var(--ph-ink);
  border-radius: var(--radius-lg);
  overflow: hidden;
  isolation: isolate;
}
/* Trama tecnica leggerissima: si legge come "non è ancora una foto". */
.ph::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(to right, currentColor 1px, transparent 1px),
    linear-gradient(to bottom, currentColor 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.09;
}
.ph__icon { width: 28px; height: 28px; opacity: 0.55; }
.ph__label { letter-spacing: 0.08em; text-transform: uppercase; font-size: 12px; font-weight: 600; }
.ph__brief {
  max-width: 46ch;
  font-size: 13px;
  line-height: 19px;
  opacity: 0.85;
}
.ph--inverse { background: var(--ph-bg-inverse); color: var(--ink-muted-on-inverse); }
/* Nessuna foto prevista in quel punto: resta la sola trama, senza etichette
   che annuncino un'immagine che non arriverà. */
.ph--bare { padding: 0; }
.ph--bare::before { opacity: 0.07; }
.ph--xl { border-radius: var(--radius-xl); }
.ph--flat { border-radius: 0; }

.ph--16x9  { aspect-ratio: 16 / 9; }
.ph--4x3   { aspect-ratio: 4 / 3; }
.ph--3x4   { aspect-ratio: 3 / 4; }
.ph--1x1   { aspect-ratio: 1 / 1; }
.ph--21x9  { aspect-ratio: 21 / 9; }
@media (max-width: 720px) { .ph--21x9 { aspect-ratio: 3 / 2; } }
.ph--fill  { position: absolute; inset: 0; border-radius: inherit; }


/* ---------- 10. Hero ---------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-block: 140px var(--space-48);
  background: var(--surface-inverse);
  color: var(--ink-on-inverse);
  overflow: hidden;
}
.hero--short { min-height: 78svh; }

.hero__media { position: absolute; inset: 0; z-index: 0; }
.hero__media .ph { position: relative; z-index: 2; height: 100%; border-radius: 0; }
/* Nell'hero il brief fotografico va in alto a destra: al centro finirebbe
   addosso al titolo. Sparisce del tutto quando arriva la foto o il video. */
.hero__media .ph {
  align-items: flex-end;
  justify-content: flex-start;
  padding: 108px var(--space-24) var(--space-24);
  text-align: right;
}
@media (min-width: 900px) {
  .hero__media .ph { padding: 116px var(--space-48) var(--space-48); }
}
.hero__media .ph__brief { max-width: 38ch; }
/* Velo che tiene il testo leggibile quando arriverà il video vero. */
.hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to top,
    rgba(20, 29, 33, 0.92) 0%,
    rgba(20, 29, 33, 0.72) 38%,
    rgba(20, 29, 33, 0.48) 100%);
}
.hero__inner { position: relative; z-index: 1; width: 100%; }
.hero__title { margin-bottom: var(--space-24); }
.hero__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-16) var(--space-32);
  padding-top: var(--space-24);
  border-top: 1px solid rgba(242, 245, 246, 0.22);
}
.hero__lead { max-width: 58ch; color: var(--ink-muted-on-inverse); }

.scroll-cue {
  display: none;
  position: absolute;
  right: var(--space-48);
  bottom: var(--space-48);
  z-index: 1;
  align-items: center;
  gap: var(--space-8);
  color: var(--ink-muted-on-inverse);
}
@media (min-width: 1080px) { .scroll-cue { display: inline-flex; } }
.scroll-cue svg { animation: cue 2.4s ease-in-out infinite; }
@keyframes cue { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(5px); } }


/* ---------- 11. Stelle ----------
   Solo dentro la singola testimonianza (componente Testimonial del design
   system). Nessun badge di valutazione aggregata: scelta del cliente. */

.stars { display: inline-flex; gap: 3px; color: var(--brand-700); }
.section--inverse .stars, .hero .stars, .card .stars,
.quote-card .stars { color: var(--brand-700); }
.stars svg { width: 15px; height: 15px; }


/* ---------- 12. Card ---------- */

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface-inverse);
  color: var(--ink-on-inverse);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.3, 1);
}
.card:hover { transform: translateY(-4px); }
.card__media { position: relative; }
.card__media .ph { border-radius: 0; }
.card__body {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-16);
  padding: var(--space-24);
}
.card__tag { position: absolute; top: var(--space-24); left: var(--space-24); z-index: 2; }
.card__title { flex: 1; }
.card a::after { content: ""; position: absolute; inset: 0; }

/* Card grande e "editoriale" con l'immagine come fondo */
.card--feature { min-height: 380px; justify-content: space-between; }
.card--feature .card__media { position: absolute; inset: 0; }
.card--feature .card__head,
.card--feature .card__body { position: relative; z-index: 1; }
.card--feature .card__head { padding: var(--space-32) var(--space-32) 0; }
.card--feature .card__body { padding: var(--space-32); }
.card--feature .card__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(20, 29, 33, 0.9), rgba(20, 29, 33, 0.35));
}

.grid { display: grid; gap: var(--space-24); }
@media (min-width: 720px) {
  .grid--2 { grid-template-columns: repeat(2, 1fr); gap: var(--space-32); }
}
@media (min-width: 900px) {
  .grid--2 { gap: var(--space-48); }
  .grid--3 { grid-template-columns: repeat(3, 1fr); gap: var(--space-32); }
}
@media (min-width: 720px) and (max-width: 1079px) {
  .grid--3 { grid-template-columns: repeat(2, 1fr); gap: var(--space-32); }
}
@media (min-width: 1080px) {
  .grid--4 { grid-template-columns: repeat(4, 1fr); gap: var(--space-32); }
}
@media (min-width: 620px) and (max-width: 1079px) {
  .grid--4 { grid-template-columns: repeat(2, 1fr); gap: var(--space-32); }
}


/* ---------- 13. Sezione trattamenti (colonna sticky) ---------- */

.split { display: grid; gap: var(--space-48); }
@media (min-width: 1080px) {
  .split { grid-template-columns: 0.85fr 1.15fr; gap: var(--space-96); }
  .split__aside { position: sticky; top: 130px; align-self: start; }
}


/* ---------- 14. Barra di ricerca ---------- */

.search {
  position: relative;
  z-index: 3;
  margin-top: calc(var(--space-48) * -1);
}
.search__card {
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-24);
  box-shadow: var(--shadow-md);
}
@media (min-width: 900px) { .search__card { padding: var(--space-32); } }

.search__field {
  display: flex;
  align-items: center;
  gap: var(--space-12);
  padding: var(--space-8) var(--space-8) var(--space-8) var(--space-24);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-full);
  transition: border-color 0.2s ease;
}
.search__field:focus-within { border-color: var(--brand-700); }
.search__field svg { flex: none; color: var(--ink-muted); }
.search__field input {
  flex: 1;
  min-width: 0;
  padding-block: var(--space-12);
  background: none;
  border: 0;
  font-size: 16px;
  line-height: 24px;
}
.search__field input:focus { outline: none; }
.search__field input::placeholder { color: var(--ink-faint); }
.search__field .btn { flex: none; }
.search__field .btn span { display: none; }
@media (min-width: 720px) { .search__field .btn span { display: inline; } }

.search__hint {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-8);
  margin-top: var(--space-16);
  font-size: 13px;
  color: var(--ink-muted);
}
.search__hint button {
  padding: var(--space-4) var(--space-12);
  background: var(--surface-sunken);
  border: 0;
  border-radius: var(--radius-full);
  font-size: 13px;
  color: var(--ink-muted);
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.search__hint button:hover { background: var(--brand-200); color: var(--ink); }

.search__results { margin-top: var(--space-24); }
.search__results:empty { display: none; }
.search__status { font-size: 13px; color: var(--ink-muted); margin-bottom: var(--space-12); }
.search__list li + li { border-top: 1px solid var(--border); }
.search__list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-16);
  padding-block: var(--space-12);
  transition: color 0.2s ease;
}
.search__list a:hover { color: var(--brand-700); }
.search__list mark { background: var(--brand-200); color: var(--ink); border-radius: 3px; padding: 0 2px; }
.search__cat { font-size: 12px; letter-spacing: 0.02em; text-transform: uppercase; color: var(--ink-faint); }
/* Risposta per una prestazione che lo studio non esegue: è un'informazione,
   non un errore, e non deve avere l'aria di un fallimento della ricerca. */
.search__note {
  padding: var(--space-16) var(--space-24);
  margin-bottom: var(--space-8);
  background: var(--surface-sunken);
  border-radius: var(--radius-md);
  font-size: 15px;
  line-height: 24px;
  color: var(--ink-muted);
}


/* ---------- 15. Elenco trattamenti (pagina indice) ---------- */

.tlist { display: grid; gap: 0 var(--space-48); }
@media (min-width: 820px) { .tlist { grid-template-columns: repeat(2, 1fr); } }
.tlist a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-24);
  padding-block: var(--space-16);
  border-bottom: 1px solid var(--border);
  transition: color 0.2s ease;
}
.tlist a > span:first-child { transition: transform 0.25s ease; }
.tlist a:hover { color: var(--brand-700); }
.tlist a:hover > span:first-child { transform: translateX(8px); }
.section--inverse .tlist a { border-bottom-color: rgba(242, 245, 246, 0.16); }
.section--inverse .tlist a:hover { color: var(--brand-500); }


/* ---------- 16. Tabella specifiche ---------- */

.specs { display: grid; gap: 0; }
@media (min-width: 720px) { .specs { grid-template-columns: repeat(2, 1fr); gap: 0 var(--space-64); } }
.specs > div {
  padding-block: var(--space-24);
  border-top: 1px solid var(--border);
}
.specs dt { margin-bottom: var(--space-4); color: var(--ink-muted); }
.specs dd { font-size: 18px; line-height: 28px; }


/* ---------- 17. Liste con segno ---------- */

.ticks li, .crosses li {
  position: relative;
  padding-left: var(--space-32);
  padding-block: var(--space-8);
}
.ticks li::before, .crosses li::before {
  position: absolute;
  left: 0;
  top: var(--space-8);
  font-weight: 600;
}
.ticks li::before  { content: "\2014"; color: var(--brand-700); }
.crosses li::before { content: "\2014"; color: var(--danger); }
.section--inverse .ticks li::before { color: var(--brand-500); }

.notice {
  padding: var(--space-24);
  background: var(--surface-sunken);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.notice::before {
  content: "";
  display: block;
  width: 6px; height: 6px;
  margin-bottom: var(--space-12);
  border-radius: var(--radius-full);
  background: var(--brand-500);
}


/* ---------- 18. Accordion FAQ ---------- */

.faq { border-top: 1px solid var(--border); }
.faq__item { border-bottom: 1px solid var(--border); }
.faq__q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-24);
  width: 100%;
  padding: var(--space-24) 0;
  background: none;
  border: 0;
  text-align: left;
  font-size: clamp(17px, 1.5vw, 20px);
  line-height: 1.45;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.2s ease;
}
.faq__q:hover { color: var(--brand-700); }
.faq__sign { position: relative; width: 16px; height: 16px; flex: none; }
.faq__sign::before, .faq__sign::after {
  content: "";
  position: absolute;
  inset: 50% 0 auto 0;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.3s ease;
}
.faq__sign::after { transform: rotate(90deg); }
.faq__q[aria-expanded="true"] .faq__sign::after { transform: rotate(0deg); }
.faq__a {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.35s ease;
}
.faq__a > div { overflow: hidden; }
.faq__item.is-open .faq__a { grid-template-rows: 1fr; }
.faq__a p { max-width: 74ch; padding-bottom: var(--space-24); color: var(--ink-muted); }


/* ---------- 19. Testimonianze ---------- */

.quote { max-width: 80ch; margin-inline: auto; text-align: center; }
.quote__mark { color: var(--brand-500); margin-bottom: var(--space-24); }
.quote blockquote { font-size: clamp(19px, 1.9vw, 25px); line-height: 1.5; }
.quote figcaption { margin-top: var(--space-24); }

/* Binario orizzontale con frecce e barra di avanzamento, al posto della
   scrollbar di sistema. Lo scorrimento nativo resta (touch, trackpad,
   tastiera): le frecce sono un secondo modo, non l'unico. */
.carousel { position: relative; }

.carousel__viewport,
.quote-track, .track {
  display: flex;
  gap: var(--space-24);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  margin-inline: calc(var(--space-24) * -1);
  padding-inline: var(--space-24);
  /* La barra di sistema sparisce: la sostituiscono frecce e avanzamento. */
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.carousel__viewport::-webkit-scrollbar { display: none; }
@media (prefers-reduced-motion: reduce) {
  .carousel__viewport { scroll-behavior: auto; }
}
.carousel__viewport:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 4px;
  border-radius: var(--radius-lg);
}

.quote-track > * { flex: 0 0 min(88%, 420px); scroll-snap-align: start; }
.track > * { flex: 0 0 min(72%, 300px); scroll-snap-align: start; }
@media (min-width: 900px) {
  .carousel__viewport, .quote-track, .track { margin-inline: 0; padding-inline: 0; }
  .track > * { flex-basis: 300px; }
}

/* Il binario resta dentro la colonna, con lo stesso margine a destra e a
   sinistra: su schermo grande un binario che sborda da un lato solo si legge
   come un errore di impaginazione.
   «safe center» centra le card quando ci stanno tutte, e torna ad allinearle
   a sinistra quando eccedono — senza «safe» le prime card finirebbero oltre
   il bordo scrollabile e diventerebbero irraggiungibili. */
.carousel__viewport { justify-content: safe center; }

.carousel__controls {
  display: flex;
  align-items: center;
  gap: var(--space-24);
  margin-top: var(--space-24);
}
.carousel:not([data-overflow]) .carousel__controls { display: none; }
/* Sul telefono i controlli spariscono: si scorre col dito, e frecce e
   segmenti sarebbero due bersagli in più che rubano spazio senza aggiungere
   nulla. Restano da tablet in su, dove il gesto non è altrettanto ovvio. */
@media (max-width: 719px) {
  .carousel__controls { display: none; }
}

/* Un segmento per schermata: si riempie da sinistra quando è quello attivo.
   Il riempimento è una scala, non una larghezza: nessun ricalcolo di layout
   a ogni fotogramma. Ogni segmento è anche un pulsante, per saltare. */
.carousel__dots { display: flex; align-items: center; gap: var(--space-4); flex: 1; }

.carousel__dot {
  position: relative;
  width: 34px;
  height: 24px;
  padding: 0;
  background: none;
  border: 0;
  cursor: pointer;
}
.carousel__dot::before,
.carousel__dot span {
  content: "";
  position: absolute;
  inset: 11px 0;
  border-radius: var(--radius-full);
}
.carousel__dot::before { background: var(--border-strong); }
.carousel__dot span {
  background: var(--brand-500);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.carousel__dot[aria-current="true"] span { transform: scaleX(1); }
.carousel__dot:hover::before { background: var(--ink-faint); }

.section--inverse .carousel__dot::before { background: rgba(242, 245, 246, 0.28); }
.section--inverse .carousel__dot:hover::before { background: rgba(242, 245, 246, 0.55); }

.carousel__nav { display: flex; gap: var(--space-8); }
.carousel__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  padding: 0;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease,
              border-color 0.2s ease, opacity 0.2s ease;
}
.carousel__btn svg { width: 20px; height: 20px; }
.carousel__btn:hover:not(:disabled) {
  background: var(--ink);
  color: var(--surface);
  border-color: var(--ink);
}
.carousel__btn:disabled { opacity: 0.32; cursor: default; }
.section--sunken .carousel__btn { background: var(--surface-raised); }
.section--inverse .carousel__btn {
  background: transparent;
  color: var(--ink-on-inverse);
  border-color: rgba(242, 245, 246, 0.28);
}
.section--inverse .carousel__btn:hover:not(:disabled) {
  background: var(--ink-on-inverse);
  color: var(--surface-inverse);
}

.quote-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-16);
  height: 100%;
  padding: var(--space-32);
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.quote-card blockquote { flex: 1; font-size: 17px; line-height: 27px; }


/* ---------- 20. Équipe ---------- */

.person { display: flex; flex-direction: column; gap: var(--space-16); }
.person__name { margin-top: var(--space-8); }
.person__role { color: var(--ink-muted); font-size: 14px; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 600; }
.card .person__role { color: var(--ink-muted-on-inverse); }


/* ---------- 21. Modulo ---------- */

.form { display: grid; gap: var(--space-24); }
@media (min-width: 720px) { .form__row { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-24); } }
.field { display: flex; flex-direction: column; gap: var(--space-8); }
.field > label { font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 600; color: var(--ink-muted); }
.field input, .field select, .field textarea {
  padding: var(--space-16);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  transition: border-color 0.2s ease;
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--brand-700);
  box-shadow: 0 0 0 3px rgba(87, 170, 197, 0.22);
}
.field--check { flex-direction: row; align-items: flex-start; gap: var(--space-12); }
.field--check input { margin-top: 3px; flex: none; width: 18px; height: 18px; accent-color: var(--brand-700); }
.field--check label { font-size: 14px; line-height: 21px; text-transform: none; letter-spacing: 0; font-weight: 400; color: var(--ink-muted); }
.field__help { font-size: 13px; color: var(--ink-muted); }


/* ---------- 21b. Mappa ----------
   Leaflet autoospitato su tile CARTO Positron: basemap quasi monocroma,
   così l'unico colore forte nella vista è il teal del segnaposto. */

.map-wrap {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  isolation: isolate;
}
.map {
  height: 520px;
  background: var(--surface-sunken);
}
/* I tile OpenStreetMap sono a colori pieni: qui vengono portati a una resa
   quasi monocroma, coerente con la tavolozza teal + inchiostro dello studio.
   Così l'unico colore forte nella vista resta il segnaposto del marchio. */
.map .leaflet-tile-pane {
  filter: grayscale(1) contrast(0.86) brightness(1.08) opacity(0.92);
}
@media (max-width: 899px) { .map { height: 420px; } }

/* Scheda dell'indirizzo sovrapposta, nello stile delle altre superfici. */
.map-card {
  position: absolute;
  z-index: 500;
  top: var(--space-16);
  left: var(--space-16);
  right: var(--space-16);
  padding: var(--space-24);
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}
@media (min-width: 900px) {
  .map-card {
    top: var(--space-24);
    left: var(--space-24);
    right: auto;
    width: 320px;
  }
}
.map-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-8);
  margin-top: var(--space-16);
}
.map-card__actions .btn { padding: var(--space-12) var(--space-24); }

.map-fallback { padding: var(--space-32); text-align: center; }

/* Segnaposto del marchio. L'alone respira piano: è un punto di interesse,
   non una notifica. */
.map-pin { position: relative; }
.map-pin svg { position: relative; z-index: 1; }
.map-pin__pulse {
  position: absolute;
  left: 50%;
  bottom: 2px;
  width: 30px; height: 30px;
  margin-left: -15px;
  border-radius: var(--radius-full);
  background: var(--brand-500);
  opacity: 0.28;
  animation: map-pulse 2.8s ease-out infinite;
}
@keyframes map-pulse {
  0%   { transform: scale(0.5); opacity: 0.34; }
  70%  { transform: scale(1.9); opacity: 0; }
  100% { transform: scale(1.9); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .map-pin__pulse { animation: none; opacity: 0.22; }
}

/* Controlli e attribuzione riportati nel linguaggio del sito. */
.map-wrap .leaflet-container {
  font-family: var(--font-sans);
  background: var(--surface-sunken);
}
.map-wrap .leaflet-bar {
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.map-wrap .leaflet-bar a,
.map-wrap .leaflet-bar a:hover {
  width: 36px;
  height: 36px;
  line-height: 34px;
  background: var(--surface-raised);
  color: var(--ink);
  border-bottom-color: var(--border);
  font-weight: 400;
}
.map-wrap .leaflet-bar a:hover { background: var(--surface-sunken); }
.map-wrap .leaflet-control-attribution {
  padding: 2px var(--space-8);
  background: rgba(255, 255, 255, 0.86);
  border-radius: var(--radius-sm) 0 0 0;
  font-size: 11px;
  color: var(--ink-muted);
}
.map-wrap .leaflet-control-attribution a { color: var(--ink-muted); text-decoration: underline; }


/* ---------- 22. Footer ---------- */

.site-footer {
  background: var(--surface-inverse);
  color: var(--ink-on-inverse);
  padding-block: var(--space-64) var(--space-32);
}
@media (min-width: 900px) { .site-footer { padding-block: var(--space-96) var(--space-32); } }

.footer-cta { padding-block: var(--space-64); text-align: center; }
@media (min-width: 900px) { .footer-cta { padding-block: var(--space-96); } }

.footer-grid { display: grid; gap: var(--space-48); }
@media (min-width: 900px) { .footer-grid { grid-template-columns: 1.2fr 1fr 1.25fr 1fr; gap: var(--space-48); } }
.footer-grid h2, .footer-grid h3 { font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 600; color: var(--ink-muted-on-inverse); margin-bottom: var(--space-16); }
.footer-grid li + li { margin-top: var(--space-8); }
.footer-grid a { color: var(--ink-on-inverse); transition: color 0.2s ease; }
.footer-grid a:hover { color: var(--brand-500); }
.footer-grid .brand img { height: 56px; }

/* Gli orari compaiono sia nel footer scuro sia sulla pagina Contatti chiara:
   i colori seguono il fondo, non lo danno per scontato.
   Tre colonne: una corsia fissa a sinistra per il tag «oggi», poi il giorno,
   poi l'orario. La corsia resta riservata anche nelle righe senza tag, così i
   giorni restano allineati e gli orari non vanno mai a capo. */
.hours { font-size: 14px; line-height: 22px; color: var(--ink-muted); }
.hours div {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: baseline;
  gap: var(--space-8);
}
.hours div + div { margin-top: var(--space-4); }
.hours__time { text-align: right; white-space: nowrap; }
.site-footer .hours,
.section--inverse .hours { color: var(--ink-muted-on-inverse); }

/* Giorno corrente: non si distingue per il solo colore — c'è anche
   l'etichetta «oggi» e il peso del carattere. */
.hours .is-today { color: var(--ink); font-weight: 500; }
.site-footer .hours .is-today,
.section--inverse .hours .is-today { color: var(--ink-on-inverse); }
.hours__today {
  display: inline-block;
  padding: 1px var(--space-8);
  border-radius: var(--radius-full);
  background: var(--brand-200);
  color: var(--on-brand);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-8) var(--space-24);
  margin-top: var(--space-64);
  padding-top: var(--space-24);
  border-top: 1px solid rgba(242, 245, 246, 0.16);
  font-size: 13px;
  line-height: 20px;
  color: var(--ink-muted-on-inverse);
}
.footer-legal a:hover { color: var(--brand-500); }
.footer-credit a {
  color: var(--ink-on-inverse);
  border-bottom: 1px solid rgba(242, 245, 246, 0.3);
  transition: color 0.2s ease, border-color 0.2s ease;
}
.footer-credit a:hover { color: var(--brand-500); border-bottom-color: var(--brand-500); }


/* ---------- 22b. Apertura di marca (solo home, solo prima visita) ----------
   Non è un caricatore: nessuno spinner, nessuna barra di avanzamento. È il
   marchio che si presenta e si toglie di mezzo. L'intera sequenza è guidata
   dal CSS, così si conclude da sola anche se JavaScript non gira: il
   JavaScript serve solo a ricordare la visita e a permettere di saltarla. */

.splash {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  background: var(--surface-inverse);
  animation: splash-veil 2400ms cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
/* Lockup verticale completo, versione negativa: su surface-inverse il
   wordmark a colori si confonderebbe con l'inchiostro del fondo.
   Il design system fissa a 140px l'altezza minima leggibile del verticale:
   la larghezza minima qui sotto tiene il lockup sopra quella soglia. */
.splash__logo {
  width: clamp(116px, 13vw, 168px);
  height: auto;
  animation: splash-logo 2400ms cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}

@keyframes splash-veil {
  0%, 62%   { opacity: 1; visibility: visible; }
  100%      { opacity: 0; visibility: hidden; pointer-events: none; }
}
@keyframes splash-logo {
  0%   { opacity: 0; transform: scale(0.96); }
  30%  { opacity: 1; transform: scale(1); }
  58%  { opacity: 1; transform: scale(1); }
  82%  { opacity: 0; transform: scale(1.008); }
  100% { opacity: 0; transform: scale(1.008); }
}

/* La pagina entra mentre il velo se ne va. Il riempimento in avanti chiude
   la sequenza su opacità piena: se le animazioni non girano, il contenuto
   resta comunque visibile. */
.splash-page:not(.no-splash) body > *:not(.splash):not(.skip-link) {
  animation: splash-page-in 900ms cubic-bezier(0.22, 0.61, 0.36, 1) 1420ms both;
}
@keyframes splash-page-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

/* Già vista, oppure saltata dall'utente: nulla di tutto questo. */
.no-splash .splash { display: none; }

@media (prefers-reduced-motion: reduce) {
  .splash { display: none; }
  .splash-page:not(.no-splash) body > * { animation: none; }
}


/* ---------- 23. Barra azioni mobile ---------- */

.action-bar {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 90;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-8);
  padding: var(--space-8);
  background: var(--surface-raised);
  border-top: 1px solid var(--border);
}
@media (min-width: 720px) { .action-bar { display: none; } }
@media (max-width: 719px) { body { padding-bottom: 76px; } }
.action-bar .btn { padding: var(--space-16) var(--space-12); }


/* ---------- 23b. Documenti (privacy, cookie, note legali) ---------- */

.legal__block + .legal__block { margin-top: var(--space-64); }
.legal__block h2 { margin-bottom: var(--space-16); }
.legal__block > * + * { margin-top: var(--space-16); }
.legal a { color: var(--brand-700); text-decoration: underline; text-underline-offset: 3px; }
.legal a:hover { color: var(--ink); }
.legal strong { font-weight: 600; color: var(--ink); }
.legal .specs > div { padding-block: var(--space-16); }
.legal .specs dd { font-size: 16px; line-height: 25px; }
.legal .ticks li { padding-block: var(--space-4); }

.legal__toc { counter-reset: toc; }
.legal__toc li {
  counter-increment: toc;
  padding-block: var(--space-4);
  padding-left: var(--space-24);
  position: relative;
}
.legal__toc li::before {
  content: counter(toc, decimal-leading-zero);
  position: absolute;
  left: 0;
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
}
.legal__toc a { color: var(--ink-muted); }
.legal__toc a:hover { color: var(--brand-700); text-decoration: underline; text-underline-offset: 3px; }


/* ---------- 24. Briciole di pane ---------- */

.crumbs { display: flex; flex-wrap: wrap; gap: var(--space-8); font-size: 13px; }
.crumbs li:not(:last-child)::after { content: "/"; margin-left: var(--space-8); opacity: 0.5; }
.crumbs a:hover { text-decoration: underline; text-underline-offset: 3px; }


/* ---------- 25. Entrata in scena ---------- */

.reveal { opacity: 0; transform: translateY(16px); }
.reveal.is-in { opacity: 1; transform: none; transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.3, 1); }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

.rule { height: 1px; background: var(--border); border: 0; }
.section--inverse .rule { background: rgba(242, 245, 246, 0.16); }


/* ---------- 26. Stampa ---------- */

@media print {
  .site-header, .menu-panel, .action-bar, .scroll-cue, .search, .footer-cta { display: none !important; }
  body { color: #000; }
  .ph { display: none; }
  .section--inverse, .card, .site-footer { background: #fff !important; color: #000 !important; }
}
