/* ==========================================================================
   Studio Dentistico Aurora: demo BuilDev (studio, nomi e recapiti di fantasia)
   Tema chiaro sul celeste. Si animano solo transform e opacity.
   ========================================================================== */

/* ---------- Font del sito BuilDev, ospitati in locale (licenza SIL OFL) ---------- */
@font-face {
  font-family: "Mona Sans";
  src: url("../../../fonts/mona-sans-latin.woff2") format("woff2-variations"),
       url("../../../fonts/mona-sans-latin.woff2") format("woff2");
  font-weight: 200 900;
  font-stretch: 75% 125%;
  font-display: swap;
  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;
}
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("../../../fonts/atkinson-hyperlegible-next-latin.woff2") format("woff2-variations"),
       url("../../../fonts/atkinson-hyperlegible-next-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
  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;
}

/* ---------- Colori e misure ---------- */
:root {
  --celeste: #5BB8E8;          /* solo decorazioni: mai testo su fondo chiaro (2,2:1) */
  --celeste-chiaro: #EAF6FD;   /* sezioni alternate */
  --celeste-tenue: #F5FBFF;    /* schede e riquadri */
  --blu: #0B6FA8;              /* pulsanti, link, titoli secondari: 5,45:1 sul bianco */
  --blu-scuro: #095C8C;
  --notte: #12324A;            /* testo e titoli: 13,3:1 sul bianco */
  --sabbia: #F6C79B;           /* accento caldo, con parsimonia */
  --bianco: #FFFFFF;
  --testo-tenue: #46627A;      /* 6,4:1 sul bianco, 5,8:1 sul celeste chiaro */
  --bordo-campo: #7A93A8;      /* 3,2:1: bordo dei campi visibile */
  --errore: #B42318;
  --linea: rgba(18, 50, 74, 0.1);

  --font-titoli: "Mona Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-testo: "Atkinson Hyperlegible Next", system-ui, -apple-system, "Segoe UI", sans-serif;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --gutter: clamp(16px, 5vw, 48px);
  --max: 1200px;
  --testata-h: 72px;
  --r-grande: 28px;
  --r-medio: 20px;
  --r-campo: 16px;

  color-scheme: light;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--testata-h) + 16px);
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
body {
  min-height: 100vh;
  background: var(--celeste-tenue);
  color: var(--notte);
  font-family: var(--font-testo);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
input, button, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: var(--blu); }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
[hidden] { display: none !important; }
h1, h2, h3 { font-family: var(--font-titoli); color: var(--notte); text-wrap: balance; }
p { text-wrap: pretty; }
::selection { background: var(--celeste); color: var(--notte); }

:focus-visible {
  outline: 3px solid var(--blu);
  outline-offset: 3px;
  transition: outline-offset 0.2s var(--ease);
}
:focus:not(:focus-visible) { outline: none; }

.contenitore { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; position: relative; z-index: 1; }
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.salta {
  position: fixed; left: 16px; top: 12px; z-index: 100;
  padding: 12px 18px; border-radius: 999px;
  background: var(--notte); color: var(--bianco); font-weight: 700; text-decoration: none;
  transform: translateY(-180%);
  transition: transform 0.3s var(--ease);
}
.salta:focus-visible { transform: none; }

/* ---------- Cielo: aloni di luce che si muovono lentamente dietro tutta la pagina ---------- */
.cielo { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.cielo i {
  position: absolute;
  width: 70vmax; height: 70vmax;
  border-radius: 50%;
  will-change: transform;
  animation: deriva 34s ease-in-out infinite alternate;
}
.cielo i:nth-child(1) { left: -22vmax; top: -24vmax; background: radial-gradient(closest-side, rgba(91, 184, 232, 0.34), rgba(91, 184, 232, 0)); }
.cielo i:nth-child(2) { right: -26vmax; top: 6vh; background: radial-gradient(closest-side, rgba(150, 212, 244, 0.42), rgba(150, 212, 244, 0)); animation-duration: 41s; animation-delay: -9s; }
.cielo i:nth-child(3) { left: -14vmax; bottom: -30vmax; background: radial-gradient(closest-side, rgba(246, 199, 155, 0.3), rgba(246, 199, 155, 0)); animation-duration: 47s; animation-delay: -20s; }
.cielo i:nth-child(4) { left: 30vw; top: 30vh; width: 55vmax; height: 55vmax; background: radial-gradient(closest-side, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0)); animation-duration: 29s; animation-delay: -5s; }
.cielo i:nth-child(5) { right: -10vmax; bottom: -26vmax; width: 60vmax; height: 60vmax; background: radial-gradient(closest-side, rgba(91, 184, 232, 0.26), rgba(91, 184, 232, 0)); animation-duration: 38s; animation-delay: -14s; }
@keyframes deriva {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(9vw, 7vh, 0) scale(1.12); }
  100% { transform: translate3d(-6vw, 12vh, 0) scale(0.94); }
}

/* ---------- Fascia demo e barra di avanzamento ---------- */
.demo-fascia {
  background: var(--notte);
  color: var(--bianco);
  font-size: 0.8125rem;
  line-height: 1.45;
  text-align: center;
  padding: 8px var(--gutter);
}
.demo-fascia a { color: var(--bianco); font-weight: 700; text-underline-offset: 3px; }
.avanzamento { position: fixed; inset: 0 0 auto; height: 3px; z-index: 60; pointer-events: none; }
.avanzamento span {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--celeste), var(--blu));
  transform-origin: left center;
  transform: scaleX(0);
}

/* ---------- Intestazione ---------- */
.testata { position: sticky; top: 0; z-index: 50; height: var(--testata-h); }
.testata::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(245, 251, 255, 0.84));
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: 0 12px 30px -20px rgba(18, 50, 74, 0.45);
  opacity: 0;
  transition: opacity 0.5s var(--ease);
}
.testata--compatta::before, .testata--aperta::before { opacity: 1; }
.testata__riga { height: 100%; display: flex; align-items: center; gap: 28px; }
.marchio {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 44px; margin-right: auto;
  color: var(--notte); text-decoration: none;
  transform-origin: left center;
  transition: transform 0.5s var(--ease);
}
.testata--compatta .marchio { transform: scale(0.92); }
.marchio__segno { width: 40px; height: 40px; }
.marchio__nome { display: grid; font-family: var(--font-titoli); font-weight: 700; font-size: 1.375rem; line-height: 1.05; letter-spacing: -0.01em; }
.marchio__nome small { font-family: var(--font-testo); font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--testo-tenue); }

.nav { display: none; }
.nav ul { display: flex; gap: 26px; }
.nav a {
  position: relative;
  display: inline-flex; align-items: center; min-height: 44px;
  color: var(--notte); font-weight: 600; font-size: 0.9375rem; text-decoration: none;
}
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 8px; height: 2px; border-radius: 2px;
  background: var(--celeste);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.45s var(--ease);
}
.nav a:hover::after, .nav a:focus-visible::after { transform: scaleX(1); }
.testata .testata__cta { display: none; }
html:not(.js) .menu-pulsante { display: none; }

.menu-pulsante {
  position: relative;
  flex: none;
  width: 48px; height: 48px; border-radius: 16px;
  background: var(--bianco);
  box-shadow: inset 0 0 0 1px var(--linea), 0 6px 18px -10px rgba(18, 50, 74, 0.4);
}
.menu-pulsante i {
  position: absolute; left: 14px; right: 14px; height: 2px; border-radius: 2px;
  background: var(--notte);
  transition: transform 0.45s var(--ease);
}
.menu-pulsante i:nth-of-type(1) { top: 19px; }
.menu-pulsante i:nth-of-type(2) { top: 27px; }
.menu-pulsante[aria-expanded="true"] i:nth-of-type(1) { transform: translateY(4px) rotate(45deg); }
.menu-pulsante[aria-expanded="true"] i:nth-of-type(2) { transform: translateY(-4px) rotate(-45deg); }

.menu-mobile {
  position: absolute; left: 0; right: 0; top: 100%;
  background: var(--bianco);
  border-radius: 0 0 28px 28px;
  box-shadow: 0 30px 50px -30px rgba(18, 50, 74, 0.5);
  padding: 8px 0 24px;
  opacity: 0;
  transform: translateY(-12px);
  transition: opacity 0.4s var(--ease), transform 0.5s var(--ease);
}
.menu-mobile--aperto { opacity: 1; transform: none; }
.menu-mobile ul { display: grid; gap: 2px; }
.menu-mobile li {
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.45s var(--ease), transform 0.55s var(--ease);
  transition-delay: calc(var(--i, 0) * 50ms + 60ms);
}
.menu-mobile--aperto li { opacity: 1; transform: none; }
.menu-mobile a:not(.btn) {
  display: flex; align-items: center; min-height: 52px;
  color: var(--notte); font-family: var(--font-titoli); font-weight: 600; font-size: 1.25rem; text-decoration: none;
  border-bottom: 1px solid var(--linea);
}
.menu-mobile .btn { margin-top: 16px; width: 100%; }

@media (min-width: 768px) {
  .testata .testata__cta { display: inline-flex; }
}
@media (min-width: 1024px) {
  .nav { display: block; }
  .menu-pulsante, .menu-mobile { display: none !important; }
}

/* ---------- Pulsanti: pressione, bagliore, increspatura ---------- */
.btn {
  position: relative;
  isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 26px;
  border-radius: 999px;
  font-weight: 700; font-size: 1rem; line-height: 1.2; text-align: center; text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.4s var(--ease);
}
.btn::after {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  box-shadow: 0 12px 32px -8px rgba(91, 184, 232, 0.9);
  opacity: 0;
  transition: opacity 0.45s var(--ease);
}
.btn:hover::after, .btn:focus-visible::after { opacity: 1; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: scale(0.97); transition-duration: 0.12s; }
.btn--primario { background: var(--blu); color: var(--bianco); }
.btn--secondario { background: var(--bianco); color: var(--blu); box-shadow: inset 0 0 0 1.5px rgba(11, 111, 168, 0.4); }
.increspatura { position: absolute; inset: 0; z-index: -1; border-radius: inherit; overflow: hidden; pointer-events: none; }
.increspatura i {
  position: absolute; width: 20px; height: 20px; margin: -10px 0 0 -10px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transform: scale(0);
  animation: increspa 0.7s var(--ease) forwards;
}
.btn--secondario .increspatura i { background: rgba(91, 184, 232, 0.35); }
@keyframes increspa { to { transform: scale(var(--s, 18)); opacity: 0; } }

/* ---------- Titoli di sezione ---------- */
.occhiello {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--blu); font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
}
.occhiello::before { content: ""; width: 22px; height: 3px; border-radius: 3px; background: var(--celeste); }
.testa { max-width: 720px; margin-bottom: clamp(40px, 5vw, 64px); }
.testa h2 { margin-top: 12px; font-size: clamp(1.875rem, 1.3rem + 2.3vw, 3rem); font-weight: 650; line-height: 1.1; letter-spacing: -0.022em; }
.testa__intro { margin-top: 16px; color: var(--testo-tenue); font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem); max-width: 36em; }

/* ---------- Sezioni e separatori a onda ---------- */
.sezione {
  position: relative;
  overflow: clip;
  background: transparent;
  padding-block: clamp(72px, 9vw, 128px) clamp(112px, 13vw, 176px);
}
.sezione--celeste { background: linear-gradient(180deg, rgba(234, 246, 253, 0) 0%, rgba(234, 246, 253, 0.8) 16%, rgba(234, 246, 253, 0.8) 84%, rgba(234, 246, 253, 0) 100%); }
.onda {
  position: absolute; left: 0; right: 0; bottom: -1px;
  height: clamp(36px, 6vw, 90px);
  overflow: hidden;
  pointer-events: none;
}
.onda svg {
  position: absolute; left: 0; bottom: 0;
  width: 200%; max-width: none; height: 100%;
  animation: onda 26s linear infinite;
}
.onda .onda__retro { opacity: 0.5; animation-duration: 40s; animation-direction: reverse; }
/* Tra le sezioni: due linee che scorrono; verso il footer l'onda è piena */
.onda--linee path { fill: none; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.onda--linee .onda__retro path { stroke: rgba(91, 184, 232, 0.55); stroke-width: 1.5; }
.onda--linee .onda__fronte path { stroke: rgba(11, 111, 168, 0.28); stroke-width: 2; }
.onda--linee .onda__retro { opacity: 1; }
.onda--notte path { fill: var(--notte); }
@keyframes onda { to { transform: translateX(-50%); } }

/* Forme decorative di sfondo, con parallasse leggera (js) e lenta rotazione interna */
.forma { position: absolute; width: clamp(220px, 30vw, 420px); aspect-ratio: 1; pointer-events: none; z-index: 0; }
.forma::before {
  content: ""; position: absolute; inset: 0;
  border-radius: 42% 58% 63% 37% / 41% 44% 56% 59%;
  background: radial-gradient(closest-side at 45% 45%, rgba(91, 184, 232, 0.26), rgba(91, 184, 232, 0));
  animation: ruota 48s linear infinite;
}
.forma--a { top: 4%; right: -10%; }
.forma--b { top: 18%; left: -12%; }
.forma--c { bottom: 10%; right: -8%; }
.forma--c::before { background: radial-gradient(closest-side at 45% 45%, rgba(246, 199, 155, 0.34), rgba(246, 199, 155, 0)); }
.forma--d { top: 6%; left: -10%; }
@keyframes ruota { to { transform: rotate(360deg); } }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: clip;
  background: radial-gradient(60% 60% at 85% 20%, rgba(91, 184, 232, 0.22), rgba(91, 184, 232, 0) 70%);
  padding: clamp(32px, 6vw, 80px) 0 clamp(56px, 10vw, 150px);
}
.hero__sfondo { position: absolute; inset: 0; pointer-events: none; }
.hero__sfondo .strato { position: absolute; inset: 0; }
.strato { will-change: transform; }
.bolla {
  position: absolute; border-radius: 50%;
  background: radial-gradient(circle at 32% 30%, rgba(255, 255, 255, 0.95), rgba(91, 184, 232, 0.32) 58%, rgba(91, 184, 232, 0) 72%);
  animation: fluttua 14s ease-in-out infinite alternate;
}
.bolla--1 { width: 460px; height: 460px; top: -170px; left: -160px; }
.bolla--2 { width: 170px; height: 170px; left: 6%; bottom: 14%; animation-duration: 11s; animation-delay: -4s; }
.bolla--3 { width: 86px; height: 86px; left: 48%; top: 8%; animation-duration: 9s; animation-delay: -2s; }
.bolla--4 { width: 54px; height: 54px; right: 6%; bottom: 20%; animation-duration: 8s; animation-delay: -6s; }
@keyframes fluttua {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(16px, -26px, 0) scale(1.05); }
}

.hero__griglia { display: grid; gap: clamp(32px, 5vw, 56px); align-items: center; }
.hero__testo { max-width: 640px; }
.hero h1 {
  margin-top: 18px;
  font-size: clamp(2.25rem, 1.3rem + 4.2vw, 4.25rem);
  font-weight: 650; line-height: 1.04; letter-spacing: -0.028em;
}
.hero h1 span { display: block; color: var(--blu); }
.hero__sotto { margin-top: 22px; max-width: 34em; color: var(--testo-tenue); font-size: clamp(1.0625rem, 1rem + 0.4vw, 1.25rem); }
.hero__azioni { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

/* Ingresso dell'hero: solo CSS, così funziona anche senza JavaScript */
.hero__testo > * { animation: entra 0.9s var(--ease) both; }
.hero__testo > :nth-child(2) { animation-delay: 0.1s; }
.hero__testo > :nth-child(3) { animation-delay: 0.22s; }
.hero__testo > :nth-child(4) { animation-delay: 0.34s; }
.hero__visivo { animation: entra-visivo 0.9s var(--ease) 0.2s both; }
@keyframes entra { from { opacity: 0; transform: translateY(26px); } }
@keyframes entra-visivo { from { opacity: 0; transform: scale(0.94); } }

.hero__visivo { position: relative; width: min(100%, 460px); aspect-ratio: 1; margin-inline: auto; }
.hero__visivo .strato { position: absolute; inset: 0; }
/* Il dente 3D (js/dente3d.js): prima un'immagine statica dello stesso dente, poi la scena che ruota */
.alone {
  position: absolute; inset: 6%;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 42%, #FFFFFF 0%, #EAF6FD 55%, rgba(91, 184, 232, 0.45) 100%);
  box-shadow: inset 0 -30px 60px -30px rgba(11, 111, 168, 0.35), 0 40px 80px -50px rgba(11, 111, 168, 0.6);
}
.dente { position: absolute; inset: 0; }
.dente__poster, .dente__canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.dente__poster { animation: galleggia 6s ease-in-out infinite alternate; transition: opacity 0.6s var(--ease); }
.dente__canvas { opacity: 0; transition: opacity 0.9s var(--ease); }
.dente--3d .dente__canvas { opacity: 1; }
.dente--3d .dente__poster { opacity: 0; }
.dente__ombra {
  position: absolute; left: 32%; right: 32%; bottom: 9%; height: 5%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(11, 111, 168, 0.28), rgba(11, 111, 168, 0));
  animation: ombra-respira 6s ease-in-out infinite alternate;
}
@keyframes galleggia { to { transform: translateY(-8px); } }
@keyframes ombra-respira { to { transform: scaleX(0.85); opacity: 0.7; } }
.anello {
  position: absolute; inset: 3%;
  border-radius: 50%;
  border: 1.5px dashed rgba(11, 111, 168, 0.28);
  animation: ruota 70s linear infinite;
}
.hero__visivo .strato--chip1 { inset: 9% auto auto -4%; }
.hero__visivo .strato--chip2 { inset: 87% auto auto 0; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px 10px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 16px 36px -18px rgba(11, 111, 168, 0.55);
  color: var(--notte); font-weight: 700; font-size: 0.875rem; white-space: nowrap;
  animation: fluttua-chip 7s ease-in-out infinite alternate;
}
.strato--chip2 .chip { animation-delay: -3s; }
.chip svg { width: 22px; height: 22px; padding: 3px; border-radius: 50%; background: var(--celeste-chiaro); fill: none; stroke: var(--blu); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
@keyframes fluttua-chip { to { transform: translateY(-10px); } }


@media (max-width: 1023.98px) {
  .hero__visivo { width: min(78vw, 340px); }
  .chip { font-size: 0.8125rem; padding: 8px 14px 8px 10px; }
}
@media (min-width: 1024px) {
  .hero { min-height: calc(100svh - var(--testata-h) - 36px); display: flex; align-items: center; }
  .hero__griglia { grid-template-columns: 1.15fr 0.85fr; }
  .bolla--1 { left: auto; right: -140px; top: -160px; }
}

/* ---------- Comparsa allo scorrimento (solo con JavaScript) ---------- */
.js [data-rivela]:not(.visibile) { opacity: 0; }
.js [data-rivela].visibile { animation: rivela 0.8s var(--ease) var(--ritardo, 0s) backwards; }
@keyframes rivela { from { opacity: 0; transform: translateY(28px); } }
@keyframes dissolvi { from { opacity: 0; } }

/* ---------- Trattamenti ---------- */
.schede { display: grid; gap: 20px; }
@media (min-width: 640px) { .schede { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .schede { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; } }
.scheda {
  position: relative;
  isolation: isolate;
  display: flex; flex-direction: column; gap: 12px;
  padding: 28px 28px 20px;
  border-radius: var(--r-grande);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: inset 0 0 0 1px rgba(91, 184, 232, 0.22), 0 18px 40px -32px rgba(11, 111, 168, 0.45);
  transform: perspective(900px) translateY(var(--sy, 0px)) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 0.5s var(--ease);
}
.scheda::after {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  background: var(--bianco);
  box-shadow: 0 34px 60px -30px rgba(11, 111, 168, 0.5);
  opacity: 0;
  transition: opacity 0.5s var(--ease);
}
.scheda:hover, .scheda:focus-within { --sy: -6px; }
.scheda:hover::after, .scheda:focus-within::after { opacity: 1; }
.scheda h3 { font-size: 1.25rem; font-weight: 650; letter-spacing: -0.01em; margin-top: 6px; }
.scheda p { color: var(--testo-tenue); }
.scheda__icona {
  display: grid; place-items: center;
  width: 60px; height: 60px; border-radius: 20px;
  background: linear-gradient(135deg, var(--bianco), var(--celeste-chiaro));
  box-shadow: inset 0 0 0 1px rgba(91, 184, 232, 0.3);
}
.scheda__icona svg { width: 32px; height: 32px; fill: none; stroke: var(--blu); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.scheda__icona path { stroke-dasharray: 1; stroke-dashoffset: 0; }
.js .scheda.visibile .scheda__icona path { animation: traccia 1s var(--ease) calc(var(--ritardo, 0s) + 0.25s) backwards; }
.scheda:hover .scheda__icona path, .scheda:focus-within .scheda__icona path { animation: traccia-ancora 0.9s var(--ease) both; }
@keyframes traccia { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes traccia-ancora { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
.scheda__link {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; margin-top: auto;
  font-weight: 700; text-decoration: none;
}
.scheda__link::after { content: "→"; transition: transform 0.4s var(--ease); }
.scheda__link:hover::after, .scheda__link:focus-visible::after { transform: translateX(4px); }

/* ---------- Percorso ---------- */
.percorso__corpo { position: relative; }
.passi { display: grid; gap: 40px; position: relative; }
.passi__linea {
  position: absolute; left: 27px; top: 28px; bottom: 28px; width: 3px;
  border-radius: 3px;
  background: rgba(91, 184, 232, 0.3);
}
.passi__linea span {
  position: absolute; inset: 0; border-radius: inherit;
  background: linear-gradient(180deg, var(--celeste), var(--blu));
  transform-origin: top center;
}
.js .passi__linea span { transform: scaleY(var(--p, 0)); }
.passo { position: relative; padding-left: 84px; }
.passo h3 { font-size: 1.3125rem; font-weight: 650; letter-spacing: -0.01em; padding-top: 12px; }
.passo p { margin-top: 8px; color: var(--testo-tenue); max-width: 30em; }
.passo__punto {
  position: absolute; left: 0; top: 0;
  display: grid; place-items: center;
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--bianco);
  box-shadow: inset 0 0 0 2px rgba(91, 184, 232, 0.45);
  font-family: var(--font-titoli); font-weight: 700; font-size: 1.125rem;
}
.passo__punto::before, .passo__punto::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.passo__punto::before { background: linear-gradient(135deg, var(--blu), var(--blu-scuro)); }
.passo__punto::after { inset: -8px; background: rgba(91, 184, 232, 0.22); z-index: -1; }
.passo__punto b { position: relative; color: var(--bianco); transition: color 0.4s var(--ease); }
.js .passo:not(.acceso) .passo__punto::before { opacity: 0; transform: scale(0.6); }
.js .passo:not(.acceso) .passo__punto::after { opacity: 0; transform: scale(0.8); }
.js .passo:not(.acceso) .passo__punto b { color: var(--blu); }
@media (min-width: 900px) {
  .passi { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
  .passi__linea { left: 28px; right: calc((100% - 64px) / 3 - 28px); top: 27px; bottom: auto; width: auto; height: 3px; }
  .passi__linea span { background: linear-gradient(90deg, var(--celeste), var(--blu)); transform-origin: left center; }
  .js .passi__linea span { transform: scaleX(var(--p, 0)); }
  .passo { padding-left: 0; padding-top: 84px; }
  .passo h3 { padding-top: 0; }
}

/* ---------- Lo studio ---------- */
.studio__griglia, .domande__griglia, .prenota__griglia, .contatti__griglia { display: grid; gap: 8px 64px; }
@media (min-width: 1024px) {
  .studio__griglia, .domande__griglia, .prenota__griglia, .contatti__griglia { grid-template-columns: 5fr 7fr; align-items: start; }
  .testa--colonna { position: sticky; top: calc(var(--testata-h) + 32px); }
}
.punti { display: grid; gap: 16px; }
@media (min-width: 640px) { .punti { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.punto {
  display: grid; gap: 14px; align-content: start;
  padding: 26px;
  border-radius: var(--r-medio);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: inset 0 0 0 1px rgba(91, 184, 232, 0.22), 0 18px 40px -32px rgba(11, 111, 168, 0.45);
}
.punto h3 { font-size: 1.1875rem; font-weight: 650; }
.punto p { margin-top: 6px; color: var(--testo-tenue); }
.punto__icona { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--celeste-chiaro); }
.punto__icona svg { width: 24px; height: 24px; fill: none; stroke: var(--blu); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Team ---------- */
.persone { display: grid; gap: 20px; }
@media (min-width: 768px) { .persone { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; } }
.persona {
  display: grid; justify-items: center; align-content: start; gap: 6px;
  padding: 36px 28px 32px;
  border-radius: var(--r-grande);
  background: var(--bianco);
  text-align: center;
  box-shadow: 0 30px 60px -40px rgba(11, 111, 168, 0.45);
}
.persona h3 { margin-top: 14px; font-size: 1.1875rem; font-weight: 650; }
.persona__ruolo { color: var(--blu); font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.persona p:last-child { margin-top: 6px; color: var(--testo-tenue); }
.avatar {
  display: grid; padding: 5px; border-radius: 50%;
  background: linear-gradient(135deg, var(--celeste), var(--sabbia));
}
.avatar svg { width: 104px; height: 104px; transition: transform 0.6s var(--ease); }
.avatar circle { fill: var(--bianco); }
.avatar--2 circle { fill: var(--celeste-tenue); }
.avatar--3 circle { fill: #FFF8F1; }
.avatar text { font-family: var(--font-titoli); font-size: 36px; font-weight: 700; fill: var(--blu); letter-spacing: -0.02em; }
.persona:hover .avatar svg { transform: translateY(-4px) rotate(-4deg) scale(1.03); }
.js .persona.visibile .avatar { animation: avvicina 0.9s var(--ease) calc(var(--ritardo, 0s) + 0.1s) backwards; }
@keyframes avvicina { from { opacity: 0; transform: scale(0.6); } }

/* ---------- Domande frequenti ---------- */
.faq__voce { border-bottom: 1px solid var(--linea); }
.faq__voce:first-child { border-top: 1px solid var(--linea); }
.faq__domanda {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  width: 100%; min-height: 68px; padding: 18px 0;
  text-align: left;
  font-family: var(--font-titoli); font-weight: 600; font-size: 1.125rem; line-height: 1.35; color: var(--notte);
}
.faq__icona {
  position: relative; flex: none;
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--celeste-chiaro);
  transition: transform 0.5s var(--ease);
}
.faq__icona::before, .faq__icona::after {
  content: ""; position: absolute; left: 12px; right: 12px; top: 18px; height: 2px; border-radius: 2px;
  background: var(--blu);
}
.faq__icona::after { transform: rotate(90deg); }
.faq__domanda[aria-expanded="true"] .faq__icona { transform: rotate(135deg); }
.faq__risposta { display: grid; grid-template-rows: 1fr; }
.faq__risposta > div { overflow: hidden; }
.faq__risposta p { padding-bottom: 22px; color: var(--testo-tenue); max-width: 40em; }
.js .faq__risposta {
  grid-template-rows: 0fr;
  visibility: hidden;
  transition: grid-template-rows 0.5s var(--ease), visibility 0s linear 0.5s;
}
.js .faq__risposta p { opacity: 0; transition: opacity 0.4s var(--ease); }
.js .faq__voce--aperta .faq__risposta { grid-template-rows: 1fr; visibility: visible; transition: grid-template-rows 0.5s var(--ease), visibility 0s; }
.js .faq__voce--aperta .faq__risposta p { opacity: 1; transition-delay: 0.1s; }

/* ---------- Richiesta di appuntamento ---------- */
.prenota { padding-bottom: clamp(72px, 9vw, 128px); }
.avviso-demo {
  display: flex; align-items: flex-start; gap: 10px;
  margin-top: 24px; padding: 14px 18px;
  border-radius: var(--r-medio);
  background: rgba(246, 199, 155, 0.28);
  color: var(--notte); font-size: 0.9375rem; font-weight: 600;
}
.avviso-demo svg { flex: none; width: 22px; height: 22px; margin-top: 1px; fill: none; stroke: var(--notte); stroke-width: 1.8; stroke-linecap: round; }
.modulo-scheda {
  position: relative;
  padding: clamp(24px, 4vw, 40px);
  border-radius: 32px;
  background: var(--bianco);
  box-shadow: 0 40px 80px -44px rgba(11, 111, 168, 0.5);
}
.modulo { display: grid; gap: 16px; }
.campo { position: relative; }
.campo::after {
  content: ""; position: absolute; inset: 0; border-radius: var(--r-campo); pointer-events: none;
  box-shadow: 0 0 0 4px rgba(91, 184, 232, 0.35), 0 10px 24px -12px rgba(91, 184, 232, 0.8);
  opacity: 0;
  transition: opacity 0.35s var(--ease);
}
.campo:focus-within::after { opacity: 1; }
.campo__input {
  display: block; width: 100%; height: 62px;
  padding: 24px 16px 8px;
  border: 1.5px solid var(--bordo-campo);
  border-radius: var(--r-campo);
  background: var(--bianco);
  color: var(--notte); font-size: 1rem;
  appearance: none;
}
.campo__input:focus { outline: none; border-color: var(--blu); }
.campo--select .campo__input {
  padding-right: 48px; cursor: pointer;
  background: var(--bianco) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230B6FA8' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 16px center / 20px;
}
.campo__etichetta {
  position: absolute; left: 17px; top: 19px;
  color: var(--testo-tenue);
  pointer-events: none;
  transform-origin: left top;
  transition: transform 0.35s var(--ease);
}
.campo__input:focus + .campo__etichetta,
.campo:not(.campo--select) .campo__input:not(:placeholder-shown) + .campo__etichetta,
.campo--select .campo__input:valid + .campo__etichetta { transform: translateY(-11px) scale(0.78); }
.campo__input:focus + .campo__etichetta { color: var(--blu); }
.campo--errore .campo__input { border-color: var(--errore); }
.campo--errore .campo__etichetta { color: var(--errore); }
.fasce { border: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.fasce legend { width: 100%; margin-bottom: 10px; font-weight: 700; }
.fascia { position: relative; }
.fascia input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.fascia span {
  display: inline-flex; align-items: center; min-height: 46px; padding: 0 20px;
  border-radius: 999px;
  border: 1.5px solid var(--bordo-campo);
  font-weight: 600;
  transition: transform 0.3s var(--ease);
}
.fascia input:checked + span { background: var(--blu); border-color: var(--blu); color: var(--bianco); }
.fascia input:focus-visible + span { outline: 3px solid var(--blu); outline-offset: 3px; }
.fascia input:active + span { transform: scale(0.96); }
.modulo__errore { color: var(--errore); font-weight: 600; font-size: 0.9375rem; }
.modulo__invia { width: 100%; margin-top: 6px; }

.conferma { display: grid; justify-items: center; gap: 12px; padding: 24px 8px; text-align: center; }
.conferma:focus { outline: none; }
.conferma__segno { width: 76px; height: 76px; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.conferma__segno circle { stroke: var(--celeste); stroke-width: 3; stroke-dasharray: 1; animation: traccia 0.8s var(--ease) both; }
.conferma__segno path { stroke: var(--blu); stroke-width: 3.5; stroke-dasharray: 1; animation: traccia 0.5s var(--ease) 0.55s both; }
.conferma__titolo { font-family: var(--font-titoli); font-size: 1.375rem; font-weight: 650; line-height: 1.3; max-width: 20em; }
.conferma p:not(.conferma__titolo) { color: var(--testo-tenue); }
.conferma .btn { margin-top: 8px; }
.conferma:not([hidden]) { animation: dissolvi 0.5s var(--ease); }

/* ---------- Contatti e orari ---------- */
.contatti { padding-bottom: clamp(100px, 12vw, 150px); }
.recapiti { display: grid; gap: 16px; }
@media (min-width: 640px) { .recapiti { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.recapiti > div { padding: 24px; border-radius: var(--r-medio); background: var(--bianco); }
.recapiti > div:nth-child(n+3) { grid-column: 1 / -1; }
.recapiti dt { color: var(--blu); font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.recapiti dd { margin-top: 6px; font-size: 1.0625rem; font-weight: 600; overflow-wrap: anywhere; }
.orario { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; padding: 10px 0; border-bottom: 1px dashed var(--linea); }
.orario:last-child { border-bottom: 0; padding-bottom: 0; }
.orario span:first-child { color: var(--testo-tenue); font-weight: 400; }

/* ---------- Footer ---------- */
.piede { background: var(--notte); color: #D5E6F1; padding: 56px 0 48px; font-size: 0.9375rem; }
.piede__griglia { display: grid; gap: 32px; }
@media (min-width: 900px) { .piede__griglia { grid-template-columns: 1fr 1fr; gap: 64px; } }
.piede__marchio { font-family: var(--font-titoli); font-size: 1.25rem; font-weight: 700; color: var(--bianco); }
.piede__legale { margin-top: 10px; }
.piede__demo { padding: 22px 24px; border-radius: var(--r-medio); background: rgba(255, 255, 255, 0.06); box-shadow: inset 0 0 0 1px rgba(91, 184, 232, 0.35); }
.piede__demo strong { color: var(--bianco); }
.piede__link { display: flex; flex-wrap: wrap; gap: 4px 24px; margin-top: 12px; }
.piede__link a { display: inline-flex; align-items: center; min-height: 44px; color: var(--bianco); font-weight: 700; text-underline-offset: 4px; }
.piede :focus-visible { outline-color: var(--celeste); }

/* ---------- Barra fissa su telefono ---------- */
.barra { display: none; }
@media (max-width: 767.98px) {
  .barra {
    position: fixed; left: 12px; right: 12px; z-index: 40;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    display: flex;
    padding: 8px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.92);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    box-shadow: 0 18px 40px -18px rgba(18, 50, 74, 0.5);
    transform: translateY(160%);
    transition: transform 0.5s var(--ease);
  }
  .barra--visibile { transform: none; }
  .barra .btn { flex: 1; }
  /* Spazio in fondo: la barra non copre mai il footer */
  .piede { padding-bottom: calc(112px + env(safe-area-inset-bottom, 0px)); }
}

/* Animazioni in loop ferme quando la sezione non è visibile */
[data-loop].in-pausa, [data-loop].in-pausa * { animation-play-state: paused !important; }

/* ---------- Movimento ridotto: niente loop, parallasse o spostamenti; solo dissolvenze brevi ---------- */
@media (prefers-reduced-motion: reduce) {
  .bolla, .anello, .chip, .onda svg, .forma::before, .dente__poster, .dente__ombra, .cielo i { animation: none; }
  .hero__testo > *, .hero__visivo { animation: dissolvi 0.4s ease both; }
  .js [data-rivela].visibile { animation: dissolvi 0.4s ease backwards; }
  .js .persona.visibile .avatar, .js .scheda.visibile .scheda__icona path,
  .scheda:hover .scheda__icona path, .scheda:focus-within .scheda__icona path { animation: none; }
  .scheda, .btn, .btn:hover, .btn:active, .persona:hover .avatar svg, .fascia input:active + span { transform: none; }
  .scheda:hover, .scheda:focus-within { --sy: 0px; }
  .menu-mobile, .menu-mobile li { transform: none; transition: opacity 0.2s ease; transition-delay: 0s; }
  .barra { transition: opacity 0.3s ease, visibility 0s 0.3s; transform: none; opacity: 0; visibility: hidden; }
  .barra--visibile { opacity: 1; visibility: visible; transition: opacity 0.3s ease; }
  .passi__linea span, .passo__punto::before, .passo__punto::after, .faq__icona, .js .faq__risposta, .marchio { transition-duration: 0.01ms; }
  .conferma__segno circle, .conferma__segno path { animation: none; }
}
