/* =====================================================================
   Homepage
   ===================================================================== */

/* L'hero resta fermo e il contenuto gli scorre sopra come un foglio */
.hero-sticky { position: sticky; top: 0; height: 100vh; height: 100svh; z-index: 0; }
.home-main {
  position: relative;
  z-index: 2;
  background: var(--cream);
  border-radius: 36px 36px 0 0;
  box-shadow: 0 -30px 80px rgba(16, 40, 58, 0.08);
}

/* ---------------------------------------------------------------------
   Manifesto
--------------------------------------------------------------------- */
.manifesto { padding: clamp(80px, 12vw, 180px) 0 clamp(80px, 10vw, 160px); }
.manifesto__title { margin: 28px 0 clamp(48px, 7vw, 110px); }
.manifesto__title em { padding-right: 0.06em; }
.manifesto__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: clamp(40px, 6vw, 120px);
  align-items: end;
}
.manifesto__text {
  margin: 0;
  font-size: clamp(24px, 2.6vw, 42px);
  line-height: 1.22;
  letter-spacing: -0.02em;
  font-weight: 500;
}
.stats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); }
.stats li { padding: 22px 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.stats li:nth-child(odd) { padding-right: 16px; border-right: 1px solid var(--line); }
.stats li:nth-child(even) { padding-left: 20px; }
.stats strong { font-size: clamp(36px, 3.6vw, 56px); line-height: 1; font-weight: 500; letter-spacing: -0.04em; color: var(--blue); }
.stats li > span { font-size: 13px; color: var(--muted); }
@media (max-width: 900px) { .manifesto__grid { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------------
   Problemi: una linea che racconta
--------------------------------------------------------------------- */
.problems { position: relative; }
.problems__pin {
  position: relative;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  background: var(--ink-2);
  color: var(--paper);
  --p-bg: 0;
}
.problems__canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; }
.problems__media { position: absolute; inset: 0; z-index: 0; }
.problems__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 66% center; opacity: 0; transition: opacity 120ms linear; }
/* confine PRIMA | DOPO che scorre da destra a sinistra sopra i video */
.problems__wipe {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  margin-left: -1px;
  background: #fff;
  box-shadow: 0 0 22px rgba(0, 158, 227, 0.85), 0 0 3px rgba(255, 255, 255, 0.9);
  opacity: 0;
  pointer-events: none;
}
.problems__wipe span {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;
  color: #0B1D2A;
  opacity: var(--lab, 1);
}
.problems__wipe-l { right: 14px; background: var(--pain); }
.problems__wipe-r { left: 14px; background: var(--blue); }
@media (max-width: 760px) {
  .problems__wipe span { top: 64%; }
}
.problems__shade {
  position: absolute;
  inset: 0;
  opacity: 0;
  background:
    linear-gradient(90deg, rgba(11, 29, 42, 0.82) 0%, rgba(11, 29, 42, 0.45) 45%, rgba(11, 29, 42, 0.1) 75%),
    linear-gradient(0deg, rgba(11, 29, 42, 0.6) 0%, rgba(11, 29, 42, 0) 35%);
}
@media (max-width: 760px) {
  .problems__shade { background: linear-gradient(180deg, rgba(11, 29, 42, 0.8) 0%, rgba(11, 29, 42, 0.35) 55%, rgba(11, 29, 42, 0.75) 100%); }
}
.problems__top {
  position: absolute;
  top: 96px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 2;
}
.problems__eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; opacity: 0.7; }
.problems__note { display: block; margin-top: 6px; font-size: 10px; font-weight: 500; letter-spacing: 0.08em; text-transform: none; opacity: 0.75; }
.problems__dots { display: flex; gap: 8px; }
.problems__dots i { width: 28px; height: 3px; border-radius: 3px; background: currentColor; opacity: 0.2; transition: opacity 400ms, background 400ms; }
.problems__dots i.is-active { opacity: 1; background: var(--blue); }

.problems__chapters { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.chapter {
  position: absolute;
  left: var(--gutter);
  top: 50%;
  width: min(520px, 38vw);
  transform: translateY(-62%);
}
.chapter__num {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 22px;
  opacity: 0;
}
.chapter__state { position: absolute; left: 0; right: 0; top: 40px; opacity: 0; }
.chapter__state a { pointer-events: auto; }
.chapter__title {
  margin: 0 0 22px;
  font-size: clamp(40px, 5.4vw, 92px);
  line-height: 0.95;
  letter-spacing: -0.045em;
  font-weight: 500;
}
.chapter__title em { color: var(--pain); }
.chapter__state--solution .chapter__title em { color: var(--blue); }
.chapter__state p { font-size: clamp(16px, 1.3vw, 19px); line-height: 1.55; opacity: 0.75; max-width: 30em; margin: 0 0 26px; }

.problems__meter {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 34px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.problems__track { flex: 1; height: 1px; background: currentColor; opacity: 0.25; position: relative; }
.problems__track i {
  position: absolute;
  top: -6px;
  left: 0;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 6px rgba(0, 158, 227, 0.2);
  transform: translateX(-50%);
}

@media (max-width: 760px) {
  .chapter { top: 120px; width: auto; right: var(--gutter); transform: none; }
  .problems__meter { bottom: 92px; }
  .chapter__title { font-size: 40px; }
  .problems__top { top: 76px; }
}

/* ---------------------------------------------------------------------
   Trattamenti: dente 3D + testo
--------------------------------------------------------------------- */
.treat { position: relative; }
.treat__pin {
  position: relative;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  background: var(--cream);
}
.treat__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 158, 227, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 158, 227, 0.07) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(70% 70% at 65% 50%, #000 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(70% 70% at 65% 50%, #000 30%, transparent 100%);
}
.treat__bignum {
  position: absolute;
  right: -0.04em;
  bottom: -0.2em;
  font-size: clamp(200px, 38vw, 620px);
  line-height: 1;
  font-weight: 500;
  letter-spacing: -0.07em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(0, 158, 227, 0.22);
  user-select: none;
  pointer-events: none;
}
.treat__stage {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 62%;
  cursor: grab;
}
.treat__stage canvas { width: 100% !important; height: 100% !important; }
.treat__copy {
  position: absolute;
  left: var(--gutter);
  top: 0;
  bottom: 0;
  width: min(520px, 40vw);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 32px;
  z-index: 2;
}
.treat__head { display: flex; justify-content: space-between; align-items: center; }
.treat__count { font-size: 13px; font-weight: 700; letter-spacing: 0.08em; color: var(--muted); font-variant-numeric: tabular-nums; }
.treat__count b { color: var(--ink); }
.treat__items { position: relative; min-height: 380px; }
.treat__item {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(34px);
  transition: opacity 450ms var(--ease), transform 800ms var(--ease), visibility 0s 800ms;
}
.treat__item.is-active { opacity: 1; visibility: visible; transform: none; transition-delay: 150ms, 150ms, 0s; }
.treat__item.is-leaving { transform: translateY(-24px); }
.treat__cat {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue);
  padding: 7px 12px;
  border: 1px solid rgba(0, 158, 227, 0.35);
  border-radius: 999px;
  margin-bottom: 20px;
}
.treat__title {
  margin: 0 0 24px;
  font-size: clamp(42px, 4.8vw, 80px);
  line-height: 0.95;
  letter-spacing: -0.045em;
  font-weight: 500;
}
.treat__problem, .treat__solution {
  margin: 0;
  font-size: 17px;
  line-height: 1.5;
  color: var(--muted);
  max-width: 28em;
}
.treat__problem b, .treat__solution b {
  display: block;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.treat__problem b { color: var(--pain); }
.treat__solution b { color: var(--blue); }
.treat__texts { position: relative; min-height: 132px; margin-bottom: 26px; }
.treat__texts > p { position: absolute; left: 0; top: 0; transition: opacity 500ms var(--ease), transform 600ms var(--ease); }
.treat__item[data-phase="problem"] .treat__solution,
.treat__item[data-phase="solution"] .treat__problem { opacity: 0; transform: translateY(12px); }

.treat__meter { display: flex; align-items: center; gap: 14px; font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.treat__track { flex: 1; height: 3px; border-radius: 3px; background: rgba(16, 40, 58, 0.1); overflow: hidden; }
.treat__track i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, var(--pain), var(--blue)); transform-origin: left; transform: scaleX(0); }

.treat__index {
  position: absolute;
  right: var(--gutter);
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 3;
}
.treat__index button {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  border: 0;
  background: none;
  padding: 6px 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
  opacity: 0.55;
  transition: opacity 300ms, color 300ms;
}
.treat__index button::after { content: ''; width: 18px; height: 1.5px; background: currentColor; transition: width 400ms var(--ease); }
.treat__index button span { opacity: 0; transform: translateX(8px); transition: opacity 300ms, transform 400ms var(--ease); }
.treat__index button:hover span, .treat__index button.is-active span { opacity: 1; transform: none; }
.treat__index button.is-active { opacity: 1; color: var(--blue); }
.treat__index button.is-active::after { width: 36px; }

@media (max-width: 900px) {
  .treat__stage { width: 100%; top: 64px; bottom: 46%; }
  .treat__copy { width: auto; right: var(--gutter); top: auto; bottom: 92px; justify-content: flex-end; gap: 16px; }
  .treat__items { min-height: 300px; }
  .treat__title { font-size: 32px; margin-bottom: 12px; }
  .treat__cat { margin-bottom: 12px; }
  .treat__problem, .treat__solution { font-size: 15px; }
  .treat__texts { min-height: 150px; margin-bottom: 14px; }
  .treat__index { display: none; }
  .treat__bignum { font-size: 60vw; bottom: auto; top: 10%; }
}

/* ---------------------------------------------------------------------
   Marquee
--------------------------------------------------------------------- */
.band {
  padding: clamp(40px, 6vw, 80px) 0;
  font-size: clamp(56px, 9vw, 150px);
  line-height: 1;
  letter-spacing: -0.045em;
  font-weight: 500;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.band .serif { color: var(--blue-2); }
.band__dot { width: 0.28em; height: 0.28em; border-radius: 50%; background: var(--blue); margin: 0 0.3em; }

/* ---------------------------------------------------------------------
   Prima visita
--------------------------------------------------------------------- */
.visit { padding: clamp(90px, 12vw, 180px) 0; }
.visit__head { display: grid; gap: 24px; margin-bottom: clamp(48px, 7vw, 100px); }
.visit__steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.visit__steps li {
  position: relative;
  padding: 34px 30px 40px;
  border-radius: var(--radius);
  background: var(--paper);
  border: 1px solid var(--line);
  min-height: 340px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  transition: transform 600ms var(--ease), background 500ms var(--ease), color 500ms var(--ease);
}
.visit__steps li:hover { transform: translateY(-8px); background: var(--ink); color: #fff; }
.visit__steps li:hover p { color: rgba(255, 255, 255, 0.7); }
.visit__n {
  position: absolute;
  top: 18px;
  right: 24px;
  font-size: 120px;
  line-height: 1;
  font-weight: 500;
  letter-spacing: -0.06em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(0, 158, 227, 0.5);
}
.visit__steps p { color: var(--muted); margin: 14px 0 0; transition: color 500ms; }
@media (max-width: 900px) { .visit__steps { grid-template-columns: 1fr; } .visit__steps li { min-height: 260px; } }

/* ---------------------------------------------------------------------
   CTA finale
--------------------------------------------------------------------- */
.cta {
  position: relative;
  overflow: hidden;
  background: var(--blue);
  color: #fff;
  padding: clamp(100px, 14vw, 220px) 0;
  border-radius: 36px 36px 0 0;
  margin-top: 40px;
}
.cta__blob {
  position: absolute;
  width: 60vw;
  height: 60vw;
  left: 50%;
  top: 50%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0) 65%);
  transform: translate(-50%, -50%);
  pointer-events: none;
  transition: transform 1.2s var(--ease);
}
.cta__inner { position: relative; }
.cta__eyebrow { color: var(--ink); }
.cta__eyebrow::before { background: #fff; box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.25); }
.cta__title {
  margin: 26px 0 30px;
  font-size: clamp(52px, 10vw, 176px);
  line-height: 1.1;
  letter-spacing: -0.05em;
  font-weight: 500;
}
.cta__title .serif { color: var(--ink); }
.cta__text { font-size: clamp(17px, 1.4vw, 21px); max-width: 34em; opacity: 0.9; margin: 0 0 44px; }
.cta__actions { display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------------------------------------------------------------------
   Trattamenti su telefono: il dente ha il suo spazio in alto e i testi
   stanno sotto, in colonna. Non possono più sovrapporsi.
--------------------------------------------------------------------- */
@media (max-width: 900px) {
  /* in basso lascia spazio alla barra fissa WhatsApp/Chiama */
  .treat__pin { display: flex; flex-direction: column; padding: 76px var(--gutter) 88px; }
  .treat__stage { position: relative; inset: auto; width: auto; flex: 1 1 0; min-height: 150px; margin: 0 calc(-1 * var(--gutter)); }
  .treat__copy { position: relative; inset: auto; width: auto; flex: none; gap: 12px; justify-content: flex-start; }
  .treat__items { min-height: 270px; }
  .treat__texts { min-height: 124px; }
}
@media (max-width: 900px) and (max-height: 700px) {
  .treat__pin { padding-top: 66px; }
  .treat__stage { min-height: 110px; }
  .treat__copy { gap: 8px; }
  .treat__cat { margin-bottom: 8px; }
  .treat__title { font-size: 26px; margin-bottom: 6px; }
  .treat__items { min-height: 206px; }
  .treat__texts { min-height: 100px; margin-bottom: 6px; }
}
