/* =====================================================================
   Edoardo Fraternale — Osteopata · Design system v2 + motore scene
   Tema unico (chiaro): le clip di Edoardo hanno fondo carta e il sito
   deve fondersi con esse, per questo non esiste una dark mode.
   Tipografia: Fraunces (display, corsivo blu per l'accento) + Instrument Sans.
   ===================================================================== */

:root {
  /* — colore — */
  --paper: #F5F2EE;            /* fondo carta = fondo delle clip di Edoardo */
  --paper-2: #FBF9F6;          /* carte, superfici in rilievo */
  --paper-3: #ECE7E0;          /* chip, filetti pieni */
  --ink: #1E2530;              /* inchiostro blu-grafite */
  --ink-2: #4A5261;            /* testo secondario */
  --ink-3: #6B727D;            /* etichette, note (≥ 4,5:1 su carta) */
  --hair: rgba(30, 37, 48, .13);
  --accent: #1E56A0;           /* unico accento: blu clinico (6,5:1 su carta, 7,3:1 con bianco) */
  --accent-2: #4F7FC4;         /* variante chiara (hover link, dettagli) */
  --accent-deep: #17468A;      /* hover del bottone pieno */
  --accent-soft: #E3ECF8;      /* velature, chip attive */

  /* — tipografia — */
  --f-display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --f-body: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;

  /* — ritmo — */
  --gutter: clamp(1.25rem, 4vw, 4rem);
  --header-h: 5.25rem;
  --scene-fade: 1000ms;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ---------- reset essenziale ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; }
img, video { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul, ol, dl, dd, figure, blockquote, p, h1, h2, h3 { margin: 0; padding: 0; }
ul, ol { list-style: none; }
strong { font-weight: 600; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 2px; }

/* ---------- documento ---------- */
html { scroll-behavior: smooth; background: var(--paper); }
@media (min-width: 768px) and (min-aspect-ratio: 11/10) { html { scroll-snap-type: y mandatory; } }
body {
  background: var(--paper); color: var(--ink);
  font-family: var(--f-body); font-weight: 400; font-size: 1rem; line-height: 1.55;
  -webkit-font-smoothing: antialiased; overflow-x: clip;
  font-feature-settings: "ss01", "cv11";
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* =====================================================================
   PILA DELLE SCENE — un layer fisso per sezione, cross-fade in opacità
   ===================================================================== */
.stage { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.layer {
  position: absolute; inset: 0; background: var(--paper);
  opacity: 0; transition: opacity var(--scene-fade) ease-in-out; will-change: opacity;
}
.layer.is-active { opacity: 1; }
.layer__video {
  position: absolute; left: -2%; bottom: 0; width: 100%; height: 92%;
  object-fit: contain; object-position: left bottom; background: transparent;
}
@media (max-width: 767.98px), (max-aspect-ratio: 11/10) {
  /* --clip-h: quota di schermo riservata a Edoardo nelle scene con clip (home, contatti).
     Default 47% (52% sui telefoni stretti); app.js la riduce se il testo non entra. */
  .layer, .scene { --clip-h: 47vh; }
  @supports (height: 1svh) { .layer, .scene { --clip-h: 47svh; } }
  .layer__video {
    left: 0; bottom: 0; width: 100%; height: var(--clip-h);
    object-fit: contain; object-position: center bottom;   /* mai ritagliare la testa */
  }
}
/* telefoni (in verticale) */
@media (max-width: 480px) and (max-aspect-ratio: 1/1) {
  .layer, .scene { --clip-h: 52vh; }
  @supports (height: 1svh) { .layer, .scene { --clip-h: 52svh; } }
  .eyebrow__long { display: none; }
  .scene__content--hero { gap: .65rem; }
  .scene__content--hero .display { font-size: 2.7rem; }
  .scene__content--hero .lead { font-size: .95rem; }
  .scene__content--hero .btn--secondary { display: none; }
  .scene__content--hero .btn--primary { width: 100%; justify-content: center; }
}
/* telefoni bassi (iPhone SE/8, Android compatti): tutto un gradino più piccolo */
@media (max-width: 767.98px) and (max-height: 720px) {
  :root { --header-h: 3.75rem; }
  .layer, .scene { --clip-h: 44vh; }
  @supports (height: 1svh) { .layer, .scene { --clip-h: 44svh; } }
  .display { font-size: 2.2rem; }
  .scene__content--hero { gap: .5rem; }
  .scene__content--hero .lead { font-size: .88rem; line-height: 1.45; }
  .scene__content--hero .btn { padding: .75rem 1.25rem; min-height: 2.75rem; font-size: .88rem; }
  #contatti .phone { font-size: 1.45rem; }
  .contact dd { font-size: .88rem; }
  .title { font-size: clamp(1.9rem, 8vw, 2.4rem); }
}
@media (prefers-reduced-motion: reduce) { .layer { transition: none; } }

/* =====================================================================
   HEADER
   ===================================================================== */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50; height: var(--header-h);
  padding: 0 var(--gutter); display: flex; align-items: center; justify-content: space-between; gap: 2rem;
  background: linear-gradient(to bottom, var(--paper) 55%, rgba(245, 242, 238, 0));
}
.brand { display: flex; flex-direction: column; line-height: 1.05; }
.brand__name { font-family: var(--f-display); font-size: 1.35rem; font-weight: 600; letter-spacing: -.01em; font-variation-settings: "opsz" 48; }
.brand__role { font-size: .66rem; text-transform: uppercase; letter-spacing: .2em; color: var(--ink-3); margin-top: .4rem; font-weight: 600; }

.nav { display: flex; gap: 2.1rem; }
.nav a {
  font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 600;
  color: var(--ink-2); padding: .4rem 0; position: relative; transition: color .3s var(--ease);
}
.nav a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 1px; background: var(--accent); transition: right .35s var(--ease); }
.nav a:hover, .nav a.is-current { color: var(--ink); }
.nav a:hover::after, .nav a.is-current::after { right: 0; }

.burger { display: none; width: 2.5rem; height: 2.5rem; position: relative; }
.burger span { position: absolute; left: .55rem; right: .55rem; height: 1.5px; background: var(--ink); transition: transform .35s var(--ease), top .35s var(--ease); }
.burger span:first-child { top: 1rem; }
.burger span:last-child { top: 1.45rem; }
.burger[aria-expanded="true"] span:first-child { top: 1.2rem; transform: rotate(45deg); }
.burger[aria-expanded="true"] span:last-child { top: 1.2rem; transform: rotate(-45deg); }

.menu {
  position: fixed; inset: 0; z-index: 40; background: var(--paper);
  padding: calc(var(--header-h) + 1rem) var(--gutter) 2.5rem;
  display: flex; flex-direction: column; justify-content: space-between;
}
.menu[hidden] { display: none; }
.menu nav { display: flex; flex-direction: column; }
.menu nav a { font-family: var(--f-display); font-weight: 500; font-size: clamp(2rem, 8vw, 2.8rem); line-height: 1.2; padding: .3rem 0; border-bottom: 1px solid var(--hair); }

@media (max-width: 767.98px), (max-aspect-ratio: 11/10) {
  :root { --header-h: 4.25rem; }
  .nav, .header .header__cta { display: none; }
  .burger { display: block; }
  .brand__name { font-size: 1.15rem; white-space: nowrap; }
  .brand__role { font-size: .58rem; }
}

/* =====================================================================
   INDICATORE DI SEZIONE (bordo destro)
   ===================================================================== */
.dots { position: fixed; right: calc(var(--gutter) * .55); top: 50%; transform: translateY(-50%); z-index: 45; display: flex; flex-direction: column; gap: 1.1rem; }
.dots a { position: relative; width: 1.25rem; height: 1.25rem; display: grid; place-items: center; }
.dots a::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--ink-3); transition: transform .4s var(--ease), background .4s; }
.dots a.is-current::before { background: var(--accent); transform: scale(1.7); }
.dots a span {
  position: absolute; right: 1.75rem; top: 50%; transform: translateY(-50%) translateX(6px);
  font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; font-weight: 500;
  color: var(--ink-2); opacity: 0; pointer-events: none; transition: opacity .3s var(--ease), transform .3s var(--ease);
}
.dots a:hover span, .dots a:focus-visible span { opacity: 1; transform: translateY(-50%) translateX(0); }
@media (max-width: 767.98px), (max-aspect-ratio: 11/10) { .dots { display: none; } }

/* =====================================================================
   SCENE (sezioni a schermo intero, scroll-snap)
   ===================================================================== */
.scenes { position: relative; z-index: 1; }
.scene {
  position: relative; min-height: 100vh; min-height: 100svh;
  scroll-snap-align: start; scroll-snap-stop: always;
  display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 1.5rem; align-items: center;
  padding: var(--header-h) var(--gutter) 2rem;
}
.scene__content {
  grid-column: 7 / 13; max-width: 46rem; padding: 0 3rem 0 1.5rem;
  display: flex; flex-direction: column; gap: 1.35rem; align-self: center; transform: translateY(-1.5vh);
  /* nessuno scroller interno: la rotellina/il dito muovono SEMPRE la pagina */
}
/* schermi bassi (laptop piccoli, tablet orizzontali): scala più compatta */
@media (max-height: 820px) and (min-aspect-ratio: 11/10) {
  :root { --header-h: 4.5rem; }
  .scene__content { gap: 1.1rem; }
  .title { font-size: clamp(2.1rem, 4vw, 3rem); }
  .display { font-size: clamp(2.6rem, 4.8vw, 4.2rem); }
  .lead { font-size: 1.05rem; }
  .tree__head { font-size: 1.2rem; padding: .5rem 0; }
  .steps li, .pillar, .timeline li { padding: .6rem 0; }
}
@media (max-height: 800px) and (min-aspect-ratio: 11/10) {
  :root { --header-h: 4rem; }
  .scene { padding-bottom: 1.25rem; }
  .scene__content { gap: .85rem; transform: none; }
  .tree__list li { font-size: .78rem; padding: .25rem .65rem; }
  .tree__item.is-open .tree__list { padding-bottom: .5rem; }
  .tree__head { font-size: 1rem; padding: .28rem 0; }
  .note { display: none; }
  #terapie .lead { display: none; }
  .title { font-size: clamp(1.9rem, 3.4vw, 2.5rem); }
  .display { font-size: clamp(2.3rem, 4.2vw, 3.4rem); }
  .lead { font-size: 1rem; }
  .body { font-size: .95rem; }
  .signature { display: none; }
  .tree__head { font-size: 1.05rem; padding: .35rem 0; }
  .steps li, .pillar, .timeline li { padding: .45rem 0; }
  .card { min-height: 9rem; }
}
@media (max-width: 1100px) and (min-aspect-ratio: 11/10) {
  .scene__content { grid-column: 6 / 13; padding-right: 2rem; }
  .pillar { grid-template-columns: 1fr; gap: .25rem; padding: .55rem 0; }
  .pillar h3 { font-size: 1.1rem; }
  .steps li { padding: .5rem 0; }
}
@media (max-width: 1200px) and (min-aspect-ratio: 11/10) {
  .nav { gap: 1.3rem; }
  .nav a { font-size: .7rem; letter-spacing: .08em; white-space: nowrap; }
  .brand__role { white-space: nowrap; }
}
.scene__content--hero { gap: 1.75rem; }

/* ingresso morbido del testo quando la scena diventa attiva */
.js .scene__content > * { transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js .scene:not(.is-active) .scene__content > * { opacity: 0; transform: translateY(14px); }
.js .scene.is-active .scene__content > * { opacity: 1; transform: none; }
.js .scene.is-active .scene__content > :nth-child(2) { transition-delay: .08s; }
.js .scene.is-active .scene__content > :nth-child(3) { transition-delay: .16s; }
.js .scene.is-active .scene__content > :nth-child(4) { transition-delay: .24s; }
.js .scene.is-active .scene__content > :nth-child(5) { transition-delay: .32s; }
.js .scene.is-active .scene__content > :nth-child(6) { transition-delay: .40s; }
@media (prefers-reduced-motion: reduce) {
  .js .scene__content > * { transition: none; }
  .js .scene:not(.is-active) .scene__content > * { opacity: 1; transform: none; }
}

@media (max-width: 767.98px), (max-aspect-ratio: 11/10) {
  /* Scene in flusso naturale: la sezione è alta almeno uno schermo, di più se il
     contenuto lo richiede. Scroll nativo, nessuno snap, nessuno scroller interno. */
  .scene {
    display: flex; flex-direction: column; justify-content: flex-start;
    min-height: 100vh; min-height: 100svh; padding: calc(var(--header-h) + 1.25rem) 0 0;
    scroll-snap-align: none; scroll-snap-stop: normal;
  }
  /* Su mobile il clip NON è fisso: vive dentro la sezione (home, contatti), nella
     fascia bassa riservata da --clip-h, e scorre con il testo. Niente sovrapposizioni,
     niente layer fissi da ricomporre a ogni frame → scroll nativo fluido. */
  .stage { display: none; }
  .scene:not([data-mobile="text"]) { padding-bottom: var(--clip-h); }
  .scene__clip { position: absolute; left: 0; right: 0; bottom: 0; height: var(--clip-h); pointer-events: none; }
  .scene__clip .layer__video { position: absolute; left: 0; bottom: 0; width: 100%; height: 100%; object-fit: contain; object-position: center bottom; }
  /* testo sempre visibile: niente ingresso ritardato durante lo scroll naturale */
  .js .scene:not(.is-active) .scene__content > * { opacity: 1; transform: none; }
  .scene__content {
    position: static; transform: none; max-width: none; width: 100%;
    margin: auto 0;              /* centrato quando ci sta, MAI tagliato quando è più alto */
    padding: 0 var(--gutter) 1rem; gap: .9rem;
    text-align: left; align-items: flex-start; justify-content: flex-start;
  }
  .scene__content .lead, .scene__content .body { max-width: 34rem; font-size: 1rem; }
  .scene__content--hero { gap: .8rem; text-align: center; align-items: center; }
  .scene__content--hero .actions { justify-content: center; }
  .scene__content--hero .eyebrow::before { display: none; }
  .tree, .steps, .timeline, .pillars, .contact, .deck { width: 100%; max-width: 34rem; text-align: left; }
  .tree__list { justify-content: flex-start; }
  .footer { width: 100%; max-width: 34rem; }

  /* Coreografia mobile: Edoardo saluta ed esce dopo la prima scena, le sezioni
     centrali sono di solo testo a tutta altezza, e lui rientra nei Contatti. */
  .scene[data-mobile="text"] { padding-bottom: 2.5rem; }
  .scene[data-mobile="text"] .scene__content { gap: 1.2rem; }
  .scene[data-mobile="text"] .scene__content .lead { font-size: 1.1rem; }
  .scene[data-mobile="text"] .scene__content .body { font-size: 1.02rem; }
  .scene[data-mobile="text"] .title { font-size: clamp(2.5rem, 9.5vw, 3.4rem); }
  .scene[data-mobile="text"] .card { min-height: 12rem; }

  /* Contatti su mobile: contenuto compatto nel 60% alto, Edoardo nel 40% basso */
  #contatti, .layer[data-scene="contatti"] { --clip-h: 40vh; }
  @supports (height: 1svh) { #contatti, .layer[data-scene="contatti"] { --clip-h: 40svh; } }
  #contatti .scene__content { gap: .7rem; }
  #contatti .lead { display: none; }
  #contatti .phone { font-size: 1.7rem; }
  .contact { gap: .6rem 1.5rem; }
  .contact dd { font-size: .95rem; }
  .footer { margin-top: .4rem; padding-top: .6rem; flex-wrap: wrap; gap: .25rem .9rem; font-size: .68rem; }
  .footer__links { gap: .9rem; }
}

/* =====================================================================
   TIPOGRAFIA
   ===================================================================== */
.eyebrow {
  font-size: .72rem; letter-spacing: .22em; text-transform: uppercase; font-weight: 700; color: var(--accent);
  display: flex; align-items: center; gap: .75rem;
}
.eyebrow::before { content: ""; width: 1.75rem; height: 1px; background: var(--accent); }
@media (max-width: 767.98px), (max-aspect-ratio: 11/10) { .scene__content--hero .eyebrow::before { display: none; } }

.display {
  font-family: var(--f-display); font-weight: 500; font-variation-settings: "opsz" 144;
  font-size: clamp(3rem, 5.3vw, 5rem); line-height: 1.02; letter-spacing: -.02em; text-wrap: balance;
}
.display em, .title em { font-style: italic; font-weight: 400; color: var(--accent); }
.display--sm { font-size: clamp(2.4rem, 4.2vw, 3.6rem); }

.title {
  font-family: var(--f-display); font-weight: 500; font-variation-settings: "opsz" 120;
  font-size: clamp(2.3rem, 3.9vw, 3.4rem); line-height: 1.08; letter-spacing: -.018em; text-wrap: balance;
}
.lead { font-size: clamp(1.1rem, 1.45vw, 1.28rem); line-height: 1.55; font-weight: 500; color: var(--ink-2); max-width: 31rem; text-wrap: pretty; }
.lead--sm { font-size: clamp(1.05rem, 1.25vw, 1.15rem); max-width: 30rem; }
.body { font-size: 1.05rem; line-height: 1.65; color: var(--ink-2); max-width: 33rem; text-wrap: pretty; }
.body em { font-style: italic; color: var(--ink); }
.note { font-size: .95rem; color: var(--ink-3); }
.note a { color: var(--ink); border-bottom: 1px solid var(--hair); transition: border-color .3s; }
.note a:hover { border-color: var(--accent); }

.actions { display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; align-items: center; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .7rem;
  font-size: .95rem; letter-spacing: .01em; font-weight: 600; line-height: 1;
  padding: 1.05rem 1.7rem; border-radius: 999px; min-height: 3.25rem;
  transition: background .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease), transform .3s var(--ease), box-shadow .3s var(--ease);
}
.btn--primary { background: var(--accent); color: #fff; box-shadow: 0 10px 24px -14px rgba(30, 86, 160, .55); }
.btn--primary:hover { background: var(--accent-deep); transform: translateY(-1px); box-shadow: 0 14px 28px -14px rgba(30, 86, 160, .65); }
.btn__arrow { transition: transform .3s var(--ease); }
.btn--primary:hover .btn__arrow { transform: translateX(4px); }
.btn--secondary { background: transparent; color: var(--ink); border: 1.5px solid rgba(30, 37, 48, .35); }
.btn--secondary:hover { border-color: var(--ink); background: var(--paper-2); }
.header__cta { padding: .75rem 1.3rem; min-height: 2.75rem; font-size: .88rem; box-shadow: none; }

.signature { display: flex; flex-direction: column; gap: .3rem; padding-top: 1.25rem; border-top: 1px solid var(--hair); }
.signature__name { font-family: var(--f-display); font-size: 1.3rem; font-weight: 500; }
.signature__meta { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); font-weight: 500; }
@media (max-width: 767.98px), (max-aspect-ratio: 11/10) { .signature { display: none; } }

/* =====================================================================
   COSA TRATTO — elenco ad albero con chip
   ===================================================================== */
.tree { border-top: 1px solid var(--hair); }
.tree__item { border-bottom: 1px solid var(--hair); }
.tree__head {
  width: 100%; display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  padding: .8rem 0; text-align: left; font-family: var(--f-display); font-size: 1.45rem; font-weight: 500; line-height: 1.2;
  color: var(--ink-2); transition: color .3s var(--ease), padding-left .3s var(--ease);
}
.tree__head:hover { color: var(--ink); padding-left: .35rem; }
.tree__count { font-family: var(--f-body); font-size: .72rem; letter-spacing: .12em; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.tree__list {
  display: flex; flex-wrap: wrap; gap: .5rem;
  max-height: 0; overflow: hidden; opacity: 0;
  transition: max-height .45s var(--ease), opacity .35s var(--ease), padding .45s var(--ease);
}
.tree__list li { font-size: .95rem; color: var(--ink); padding: .5rem .95rem; border: 1px solid var(--hair); border-radius: 999px; background: var(--paper-2); }
.tree__item.is-open .tree__list { max-height: 12rem; opacity: 1; padding-bottom: 1rem; }
.tree__item.is-open .tree__head { color: var(--ink); }
.tree__item.is-open .tree__count { color: var(--accent); }
@media (max-width: 767.98px), (max-aspect-ratio: 11/10) { .tree__head { font-size: 1.12rem; padding: .45rem 0; } .tree__list li { font-size: .82rem; padding: .3rem .7rem; } .tree__item.is-open .tree__list { padding-bottom: .6rem; } }

/* =====================================================================
   LA PRIMA VISITA — tre passi (sequenza reale)
   ===================================================================== */
.steps { display: flex; flex-direction: column; border-top: 1px solid var(--hair); }
.steps li { display: grid; grid-template-columns: 3rem 1fr; gap: 1rem; padding: .7rem 0; border-bottom: 1px solid var(--hair); align-items: baseline; }
.steps__n { font-family: var(--f-display); font-style: italic; font-weight: 500; font-size: 2rem; line-height: 1; color: var(--accent); font-variant-numeric: tabular-nums; }
.steps li div { display: flex; flex-direction: column; gap: .15rem; }
.steps li strong { font-family: var(--f-display); font-weight: 500; font-size: 1.3rem; }
.steps li span:not(.steps__n) { font-size: 1rem; color: var(--ink-2); }
@media (max-width: 767.98px), (max-aspect-ratio: 11/10) { .steps li { padding: .5rem 0; grid-template-columns: 2.2rem 1fr; } .steps__n { font-size: 1.5rem; } .steps li strong { font-size: 1.05rem; } .steps li span:not(.steps__n) { font-size: .85rem; } }

/* =====================================================================
   CHI SONO — cronologia
   ===================================================================== */
.timeline { display: flex; flex-direction: column; border-top: 1px solid var(--hair); }
.timeline li { display: grid; grid-template-columns: 4.5rem 1fr; gap: 1rem; padding: .7rem 0; border-bottom: 1px solid var(--hair); font-size: 1rem; color: var(--ink-2); align-items: baseline; }
.timeline__year { font-family: var(--f-display); font-style: italic; font-weight: 500; font-size: 1.35rem; color: var(--accent); font-variant-numeric: tabular-nums; }

/* =====================================================================
   IL METODO — tre principi
   ===================================================================== */
.pillars { display: flex; flex-direction: column; }
.pillar { padding: .9rem 0; border-top: 1px solid var(--hair); display: grid; grid-template-columns: minmax(10rem, 15rem) 1fr; gap: 1.5rem; align-items: baseline; }
.pillar h3 { font-family: var(--f-display); font-weight: 500; font-size: 1.35rem; line-height: 1.2; text-wrap: balance; }
.pillar p { font-size: 1rem; color: var(--ink-2); text-wrap: pretty; }
@media (max-width: 767.98px), (max-aspect-ratio: 11/10) { .pillar { grid-template-columns: 1fr; gap: .3rem; padding: .7rem 0; } .pillar h3 { font-size: 1.15rem; } }

/* =====================================================================
   RECENSIONI — mazzo di carte (altezza naturale: le carte condividono la cella)
   ===================================================================== */
.deck { display: grid; width: 100%; max-width: 32rem; margin-top: .25rem; }
.card {
  grid-area: 1 / 1; width: 100%; min-height: 11rem;
  background: var(--paper-2); border: 1px solid var(--hair); border-radius: 6px;
  padding: 1.6rem 1.9rem 1.4rem; display: flex; flex-direction: column; justify-content: space-between; gap: 1.25rem;
  box-shadow: 0 24px 48px -32px rgba(30, 37, 48, .4);
  transform-origin: 50% 100%; transition: transform .55s var(--ease), opacity .45s var(--ease);
  cursor: pointer; user-select: none; opacity: 0; transform: translateY(2.5rem) scale(.9); pointer-events: none;
  text-align: left;
}
.card[data-pos="0"] { opacity: 1; transform: none; z-index: 3; pointer-events: auto; }
.card[data-pos="1"] { opacity: 1; transform: translateY(-.7rem) scale(.96); z-index: 2; }
.card[data-pos="2"] { opacity: 1; transform: translateY(-1.4rem) scale(.92); z-index: 1; }
.card[data-pos="1"] > *, .card[data-pos="2"] > * { visibility: hidden; }
.card.is-leaving { opacity: 0; transform: translateX(-3rem) rotate(-3deg); z-index: 4; }
.card blockquote {
  font-family: var(--f-display); font-style: italic; font-weight: 500;
  font-size: clamp(1.2rem, 1.6vw, 1.5rem); line-height: 1.35; text-wrap: pretty; color: var(--ink);
}
.card blockquote::before { content: "“"; color: var(--accent); margin-right: .05em; }
.card blockquote::after { content: "”"; color: var(--accent); margin-left: .05em; }
.card figcaption { font-size: .68rem; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; }
.deck__controls { display: flex; align-items: center; gap: 1rem; }
.deck__btn { width: 2.75rem; height: 2.75rem; border: 1px solid var(--hair); border-radius: 50%; display: grid; place-items: center; transition: border-color .3s, color .3s, background .3s; }
.deck__btn:hover { border-color: var(--accent); color: var(--accent); background: var(--paper-2); }
.deck__counter { font-size: .74rem; letter-spacing: .14em; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.deck__hint { font-size: .74rem; color: var(--ink-3); margin-left: auto; }
@media (max-width: 767.98px), (max-aspect-ratio: 11/10) { .card { padding: 1.3rem 1.4rem 1.1rem; min-height: 9.5rem; } .deck__hint { display: none; } }

/* =====================================================================
   CONTATTI + FOOTER
   ===================================================================== */
.phone {
  font-family: var(--f-display); font-weight: 600; font-size: clamp(1.8rem, 3.2vw, 2.6rem); line-height: 1; letter-spacing: -.02em;
  color: var(--ink); width: fit-content; border-bottom: 1px solid var(--hair); padding-bottom: .35rem;
  transition: color .3s var(--ease), border-color .3s var(--ease); font-variant-numeric: tabular-nums;
}
.phone:hover { color: var(--accent); border-color: var(--accent); }
.contact { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem 2rem; }
.contact dt { font-size: .66rem; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-3); margin-bottom: .3rem; font-weight: 600; }
.contact dd { font-size: 1.02rem; line-height: 1.4; display: flex; flex-direction: column; gap: .15rem; }
.contact dd a { border-bottom: 1px solid transparent; transition: border-color .3s, color .3s; width: fit-content; }
.contact dd a:hover { border-color: var(--accent); color: var(--accent); }
.contact__social { flex-direction: row !important; gap: 1.25rem !important; }
.footer {
  margin-top: .5rem; padding-top: 1rem; border-top: 1px solid var(--hair);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1.5rem;
  font-size: .72rem; color: var(--ink-3); letter-spacing: .03em;
}
.footer__links { display: flex; gap: 1.25rem; }
.footer a:hover { color: var(--ink); }
.footer__made { flex-basis: 100%; }
.footer__made a { color: var(--ink-2); font-weight: 600; border-bottom: 1px solid var(--hair); transition: color .3s, border-color .3s; }
.footer__made a:hover { color: var(--accent); border-color: var(--accent); }
.footer__heart { color: var(--accent); }
@media (max-width: 767.98px), (max-aspect-ratio: 11/10) {
  .contact { grid-template-columns: 1fr 1fr; gap: .7rem 1rem; }
  .contact dd { font-size: .92rem; }
  .phone { font-size: 2rem; }
}

/* =====================================================================
   MOBILE — scala tipografica
   ===================================================================== */
@media (max-width: 767.98px), (max-aspect-ratio: 11/10) {
  .display { font-size: clamp(2.5rem, 10.5vw, 3.4rem); }
  .display--sm { font-size: clamp(2.2rem, 9vw, 2.9rem); }
  .title { font-size: clamp(1.9rem, 7.6vw, 2.5rem); }
  .lead { font-size: 1rem; }
  .btn { padding: .95rem 1.4rem; }
}

/* =====================================================================
   INGRESSO DELLA PAGINA
   ===================================================================== */
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.header, .dots { animation: rise .9s var(--ease) both; animation-delay: .35s; }
@media (prefers-reduced-motion: reduce) { .header, .dots { animation: none; } }
