/* Dental Comm — home v2. Mondo visivo: il bancone accogliente del laboratorio.
   Carta avorio calda, inchiostro bruno, i sei colori della molecola del marchio come voci amichevoli. */

@import url("fonts/warm.css");

:root {
  --paper: #fbf7f0;
  --paper-deep: #f4ecdf;
  --card: #fffdf9;
  --ink: #2a2420;
  --ink-2: #5a504a;
  --ink-3: #6b605a;
  --line: #e6dccd;

  /* dal marchio */
  --giallo: #f9d800;
  --arancio: #f58a00;
  --arancio-deep: #d97400;
  --arancio-ink: #a85500;
  --rosso: #e8300a;
  --verde: #26c800;
  --verde-deep: #0a6e00;
  --verde-ink: #0f5c05;
  --azzurro: #3cbcf2;
  --blu: #1a6fe8;
  --blu-ink: #1558b8;

  --giallo-tint: #fff5c7;
  --arancio-tint: #ffe9d2;
  --verde-tint: #e6f6e0;
  --azzurro-tint: #e3f3fc;

  --font-display: "Bricolage Grotesque", "Figtree", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Figtree", "Helvetica Neue", Arial, sans-serif;
  --measure: 62ch;
  --gutter: 24px;
  --max: 1200px;
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 22px;
  --shadow: 0 18px 40px -18px rgba(74, 52, 30, 0.28), 0 4px 12px -6px rgba(74, 52, 30, 0.18);
  --shadow-soft: 0 10px 24px -14px rgba(74, 52, 30, 0.22);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  font-family: var(--font-body);
  font-size: 100%;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scrollbar-color: var(--arancio-deep) var(--paper-deep);
}
body {
  margin: 0;
  background: var(--paper);
  font-variant-numeric: tabular-nums lining-nums;
  text-underline-offset: 0.16em;
  text-decoration-thickness: 1.5px;
}
::selection { background: var(--giallo); color: var(--ink); }
:focus-visible { outline: 3px solid var(--blu); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3, h4, p, ul, ol, figure, table { margin: 0; }
img, svg { display: block; max-width: 100%; }
a { color: var(--blu-ink); }
button, input, select, textarea { font: inherit; color: inherit; }

.wrap { max-width: var(--max); margin-inline: auto; }

/* Tipografia */
.display {
  font-family: var(--font-display);
  font-weight: 600;
  font-variation-settings: "opsz" 96;
  letter-spacing: -0.022em;
  line-height: 1.04;
  text-wrap: balance;
  color: var(--ink);
}
h1.display { font-size: clamp(2.5rem, 5.6vw, 4.4rem); font-weight: 650; line-height: 1.0; }
h2.display { font-size: clamp(1.9rem, 3.6vw, 2.9rem); }
h3.display, .display--h3 { font-size: clamp(1.25rem, 1.9vw, 1.5rem); line-height: 1.2; letter-spacing: -0.01em; }
.lede { font-size: clamp(1.12rem, 1.5vw, 1.3rem); line-height: 1.5; max-width: 36ch; color: var(--ink-2); text-wrap: pretty; }
.prose { max-width: var(--measure); text-wrap: pretty; }
.prose p + p { margin-top: 1em; }
.muted { color: var(--ink-3); }
.small { font-size: 0.9rem; }
.caption { font-size: 0.86rem; color: var(--ink-3); }

/* Sei punti del marchio come firma */
.dots { display: inline-flex; gap: 0.45rem; align-items: center; }
.dots i { width: 0.6rem; height: 0.6rem; border-radius: 50%; display: block; }
.dots i:nth-child(1) { background: var(--giallo); }
.dots i:nth-child(2) { background: var(--arancio); }
.dots i:nth-child(3) { background: var(--rosso); }
.dots i:nth-child(4) { background: var(--verde); }
.dots i:nth-child(5) { background: var(--verde-deep); }
.dots i:nth-child(6) { background: var(--azzurro); }


/* Pulsanti */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6em;
  min-height: 3.2rem; padding: 0.8rem 1.6rem;
  border: 0; border-radius: 999px;
  background: var(--arancio); color: var(--ink);
  text-decoration: none; font-weight: 700; font-size: 1.02rem;
  cursor: pointer;
  box-shadow: 0 6px 16px -8px rgba(217, 116, 0, 0.6);
  transition: transform 180ms var(--ease-out), background-color 180ms var(--ease-out), box-shadow 180ms var(--ease-out);
}
.btn:hover { background: #ffa22e; transform: translateY(-1px); box-shadow: 0 10px 22px -10px rgba(217, 116, 0, 0.7); }
.btn:active { transform: translateY(0); }
.btn--quiet { background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn--quiet:hover { background: var(--paper-deep); box-shadow: inset 0 0 0 1.5px var(--line); }
.link { font-weight: 600; color: var(--blu-ink); }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 20;
  padding-inline: var(--gutter);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav .wrap { display: flex; align-items: center; gap: 1.5rem; min-height: 4.5rem; }
.brand { display: inline-flex; align-items: center; gap: 0.75rem; text-decoration: none; color: #6f6f6f; }
.brand svg { width: 34px; height: 37px; }
.brand span { font-family: var(--font-body); font-weight: 400; letter-spacing: 0.26em; font-size: 0.92rem; text-transform: uppercase; }
.nav__links { display: flex; gap: 1.5rem; margin-left: auto; list-style: none; padding: 0; }
.nav__links a { text-decoration: none; color: var(--ink); font-weight: 500; }
.nav__links a:hover { color: var(--arancio-ink); }
.nav__cta { min-height: 2.7rem; padding: 0.55rem 1.15rem; font-size: 0.95rem; }
.nav__menu { display: none; margin-left: auto; }
.nav__menu summary { list-style: none; cursor: pointer; font-weight: 600; padding: 0.5rem 0; }
.nav__menu summary::-webkit-details-marker { display: none; }
.nav__menu ul { list-style: none; padding: 0.5rem 0 1rem; margin: 0; display: grid; gap: 0.6rem; }
.nav__menu a { text-decoration: none; color: var(--ink); font-weight: 500; }

/* Hero */
.hero { padding: 4.5rem var(--gutter) 3.5rem; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 2.5rem; align-items: center; }
.hero__copy { grid-column: 1 / 6; padding-right: 1rem; }
.hero__copy .dots { margin-bottom: 1.4rem; }
.hero__h1 { margin-bottom: 1.2rem; }
.hero__actions { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; margin-top: 1.8rem; }
.hero__shot { grid-column: 6 / 13; position: relative; margin-right: -4%; }

/* Cornice per le schermate vere */
.shot {
  position: relative;
  background: var(--card);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.shot__bar {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.6rem 0.9rem;
  background: var(--paper-deep);
  font-size: 0.78rem; color: var(--ink-3);
}
.shot__bar i { width: 0.6rem; height: 0.6rem; border-radius: 50%; background: var(--line); display: block; }
.shot__bar span { margin-left: 0.4rem; }
.shot img { width: 100%; height: auto; display: block; }
.shot--tilt { transform: rotate(-0.6deg); }
.shot--tilt img { transform: rotate(0.6deg) scale(1.02); transform-origin: center; }
.shot--phone {
  width: min(100%, 16rem);
  border-radius: 2rem;
  padding: 0.35rem;
  background: var(--ink-2);
  box-shadow: var(--shadow);
}
.shot--phone img { border-radius: var(--r-lg); }
.shot__caption { margin-top: 0.8rem; font-size: 0.86rem; color: var(--ink-3); }

/* Notifica animata sull'hero */
.toast {
  position: absolute; right: -0.8rem; bottom: -1.4rem;
  max-width: 19rem;
  padding: 0.8rem 1rem 0.85rem;
  background: var(--card);
  border-radius: var(--r-md);
  box-shadow: var(--shadow);
  font-size: 0.9rem; line-height: 1.4;
  display: grid; grid-template-columns: auto 1fr; gap: 0.7rem; align-items: start;
  opacity: 0; transform: translateY(14px);
  transition: opacity 600ms var(--ease-out), transform 700ms var(--ease-out);
}
.toast.is-on { opacity: 1; transform: none; }
.toast__dot { width: 0.9rem; height: 0.9rem; border-radius: 50%; background: var(--verde); margin-top: 0.25rem; box-shadow: 0 0 0 4px var(--verde-tint); }
.toast strong { display: block; font-weight: 700; }
.toast small { color: var(--ink-3); }

/* Sezioni */
.section { padding: 5.5rem var(--gutter) 4.5rem; }
.section--card { background: var(--card); }
.section--giallo { background: var(--giallo-tint); }
.section--verde { background: var(--verde-tint); }
.section--azzurro { background: var(--azzurro-tint); }
.section--ink { background: var(--ink); color: var(--paper); }
.section--ink .display, .section--ink .lede { color: var(--paper); }
.section--ink .muted, .section--ink .caption { color: #c9bdb3; }
.section__head { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 1.5rem; align-items: end; margin-bottom: 2.75rem; }
.section__head h2 { grid-column: 1 / 8; }
.section__head .prose { grid-column: 8 / 13; }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 2.5rem 2rem; align-items: center; }
.col-5 { grid-column: span 5; } .col-6 { grid-column: span 6; } .col-7 { grid-column: span 7; } .col-4 { grid-column: span 4; } .col-8 { grid-column: span 8; } .col-12 { grid-column: 1 / -1; }
.grid--top { align-items: start; }

/* Problemi (campo scuro) */
.problems { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 3rem; }
.problems li {
  padding: 1.2rem 0 1.3rem;
  border-top: 1px solid #4a3f38;
  display: grid; grid-template-columns: auto 1fr; gap: 0.9rem; align-items: start;
  font-size: 1.05rem; line-height: 1.5;
}
.problems li::before { content: ""; width: 0.75rem; height: 0.75rem; border-radius: 50%; margin-top: 0.4rem; }
.problems li:nth-child(1)::before { background: var(--giallo); }
.problems li:nth-child(2)::before { background: var(--arancio); }
.problems li:nth-child(3)::before { background: var(--rosso); }
.problems li:nth-child(4)::before { background: var(--azzurro); }
.problems strong { display: block; font-weight: 700; margin-bottom: 0.2rem; color: #fff; }
.problems span { color: #e9dfd6; }

/* Passi del caso */
.step { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 2.5rem 2rem; align-items: center; padding: 3rem 0; }
.step + .step { border-top: 1px solid var(--line); }
.step__text { grid-column: 1 / 6; }
.step__shot { grid-column: 6 / 13; }
.step--flip .step__text { grid-column: 8 / 13; order: 2; }
.step--flip .step__shot { grid-column: 1 / 8; order: 1; }
.step__num {
  display: inline-grid; place-items: center;
  width: 2.6rem; height: 2.6rem; border-radius: 50%;
  font-family: var(--font-display); font-weight: 700; font-size: 1.15rem;
  color: var(--ink); margin-bottom: 1rem;
}
.step__num--giallo { background: var(--giallo); }
.step__num--arancio { background: var(--arancio); }
.step__num--verde { background: var(--verde); }
.step__num--azzurro { background: var(--azzurro); }
.step h3 { margin-bottom: 0.7rem; }
.step .prose { max-width: 44ch; }

/* Strumenti del laboratorio */
.tools { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 3rem; }
.tools li { padding: 1.4rem 0 1.5rem; border-top: 1px solid rgba(42, 36, 32, 0.14); }
.tools h3 { margin-bottom: 0.5rem; display: flex; align-items: center; gap: 0.6rem; }
.tools h3::before { content: ""; width: 0.7rem; height: 0.7rem; border-radius: 50%; flex: none; }
.tools li:nth-child(1) h3::before { background: var(--giallo); }
.tools li:nth-child(2) h3::before { background: var(--arancio); }
.tools li:nth-child(3) h3::before { background: var(--verde); }
.tools li:nth-child(4) h3::before { background: var(--azzurro); }
.tools p { color: var(--ink-2); text-wrap: pretty; }

/* Portali col nome proprio */
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 1rem;
  padding: 1.2rem 1.5rem; background: var(--card); border-radius: var(--r-md); box-shadow: var(--shadow-soft);
}


/* Cosa comprende */
.incl { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.8rem; }
.incl li { display: grid; grid-template-columns: 1.5rem 1fr; gap: 0.8rem; align-items: start; padding: 0.9rem 1.1rem; background: var(--card); border-radius: var(--r-sm); }
.incl li::before { content: ""; width: 1.1rem; height: 1.1rem; border-radius: 50%; margin-top: 0.15rem; background: var(--verde); box-shadow: inset 0 0 0 3px var(--verde-tint); }
.incl li.incl--lead { padding: 1.2rem 1.3rem 1.3rem; font-size: 1.08rem; line-height: 1.5; box-shadow: var(--shadow-soft); }
.incl li.incl--lead::before { background: var(--arancio); box-shadow: inset 0 0 0 3px var(--arancio-tint); margin-top: 0.3rem; }
.incl li.incl--lead strong { display: block; margin-bottom: 0.25rem; font-family: var(--font-display); font-weight: 650; font-size: 1.2rem; letter-spacing: -0.01em; }

/* Contatti */
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem 1.4rem; }
.form label { display: grid; gap: 0.35rem; font-size: 0.88rem; font-weight: 600; color: var(--ink-2); }
.form .full { grid-column: 1 / -1; }
.form input, .form select, .form textarea {
  border: 1.5px solid var(--line); border-radius: var(--r-sm);
  padding: 0.75rem 0.9rem; background: var(--card); font-weight: 400; width: 100%; color: var(--ink);
  caret-color: var(--arancio-deep);
  transition: border-color 160ms var(--ease-out);
}
.form input:hover, .form select:hover, .form textarea:hover { border-color: #d3c4ad; }
.form input::placeholder, .form textarea::placeholder { color: var(--ink-3); }
.form textarea { min-height: 8rem; resize: vertical; }
.form select {
  appearance: none; -webkit-appearance: none; padding-right: 2.4rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' fill='none' stroke='%232a2420' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 0.9rem center;
}
.form__actions { grid-column: 1 / -1; display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.form__note { font-size: 0.86rem; color: var(--ink-3); }
.form__done { grid-column: 1 / -1; padding: 0.9rem 1.1rem; background: var(--verde-tint); color: var(--verde-ink); border-radius: var(--r-sm); font-weight: 500; display: none; }
.form__done.is-on { display: block; }
.contact-alt ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.9rem; }
.contact-alt li { padding: 1rem 1.2rem; background: var(--card); border-radius: var(--r-sm); display: grid; gap: 0.2rem; }
.contact-alt .k { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); }

/* Footer */
.footer { padding: 3rem var(--gutter) 3.5rem; border-top: 1px solid var(--line); background: var(--paper-deep); }
.footer .wrap { display: grid; grid-template-columns: 1fr auto; gap: 1.5rem 3rem; align-items: start; }
.footer__links { list-style: none; padding: 0; margin: 0.9rem 0 0; display: flex; gap: 1.2rem; flex-wrap: wrap; }
.footer__links a { color: var(--ink-2); }
.footer__meta { color: var(--ink-3); text-align: right; max-width: 34ch; font-size: 0.92rem; }

/* Responsive */
@media (max-width: 1080px) {
  .section__head { grid-template-columns: 1fr; }
  .section__head h2, .section__head .prose { grid-column: auto; }
  .col-5, .col-6, .col-7, .col-4, .col-8 { grid-column: 1 / -1; }
  .hero__copy { grid-column: 1 / 7; }
  .hero__shot { grid-column: 7 / 13; }
}
@media (max-width: 860px) {
  .nav__links, .nav__cta { display: none; }
  .nav__menu { display: block; }
  .hero { padding-top: 3rem; }
  .hero .wrap { grid-template-columns: 1fr; gap: 2.5rem; }
  .hero__copy, .hero__shot { grid-column: 1 / -1; }
  .shot--tilt { transform: none; }
  .toast { right: auto; left: 0; bottom: auto; position: relative; margin-top: 1rem; max-width: none; }
  .step { grid-template-columns: 1fr; gap: 1.5rem; padding: 2.5rem 0; }
  .step__text, .step__shot, .step--flip .step__text, .step--flip .step__shot { grid-column: 1 / -1; order: initial; }
  .problems, .tools { grid-template-columns: 1fr; }
  .form { grid-template-columns: 1fr; }
  .footer .wrap { grid-template-columns: 1fr; }
  .footer__meta { text-align: left; }
  .section { padding: 4rem var(--gutter) 3.5rem; }
}
@media (max-width: 480px) {
  :root { --gutter: 16px; }
  .hero__actions .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .toast, .btn { transition: none; }
}

.step__shot--center { display: flex; justify-content: center; }

.tools li:nth-child(-n+2) { border-top: 0; }
.problems li:nth-child(-n+2) { border-top: 0; }
@media (max-width: 860px) { .problems li:nth-child(2), .tools li:nth-child(2) { border-top: 1px solid #4a3f38; } .tools li:nth-child(2) { border-top-color: rgba(42, 36, 32, 0.14); } }

.section--giallo .tools p { color: var(--ink); }

/* ---------- Movimento ---------- */
/* Entrate al primo scroll: ogni blocco arriva da poco sotto, una volta sola. */
.rv { opacity: 0; transform: translateY(18px); transition: opacity 700ms var(--ease-out), transform 800ms var(--ease-out); will-change: opacity, transform; }
.rv--left { transform: translateX(-22px); }
.rv--right { transform: translateX(22px); }
.rv--pop { transform: scale(0.92); }
.rv.is-in { opacity: 1; transform: none; }
.rv-d1 { transition-delay: 90ms; } .rv-d2 { transition-delay: 180ms; } .rv-d3 { transition-delay: 270ms; } .rv-d4 { transition-delay: 360ms; } .rv-d5 { transition-delay: 450ms; }

/* Hero: i sei punti arrivano uno alla volta, poi titolo, testo e pulsanti; la schermata si appoggia. */
.hero .dots i { opacity: 0; transform: translateY(8px) scale(0.6); animation: dot-in 520ms var(--ease-out) forwards; }
.hero .dots i:nth-child(1) { animation-delay: 80ms; } .hero .dots i:nth-child(2) { animation-delay: 160ms; } .hero .dots i:nth-child(3) { animation-delay: 240ms; }
.hero .dots i:nth-child(4) { animation-delay: 320ms; } .hero .dots i:nth-child(5) { animation-delay: 400ms; } .hero .dots i:nth-child(6) { animation-delay: 480ms; }
@keyframes dot-in { to { opacity: 1; transform: none; } }
.hero__h1, .hero .lede, .hero__actions { opacity: 0; transform: translateY(16px); animation: rise 800ms var(--ease-out) forwards; }
.hero__h1 { animation-delay: 240ms; } .hero .lede { animation-delay: 400ms; } .hero__actions { animation-delay: 540ms; }
@keyframes rise { to { opacity: 1; transform: none; } }
.hero__shot .shot { opacity: 0; transform: translateY(28px) rotate(0.8deg); animation: settle 1100ms var(--ease-out) 500ms forwards; }
@keyframes settle { to { opacity: 1; transform: none; } }

/* Schermate: si sollevano appena al passaggio del mouse. */
.shot { transition: transform 500ms var(--ease-out), box-shadow 500ms var(--ease-out); }
.step__shot.shot:hover, .hero__shot .shot:hover { transform: translateY(-4px); box-shadow: 0 26px 48px -20px rgba(74, 52, 30, 0.34), 0 6px 14px -6px rgba(74, 52, 30, 0.18); }

/* Numeri dei passi: entrano con un piccolo rimbalzo morbido. */
.step__num { transform: scale(0.6); opacity: 0; transition: transform 700ms cubic-bezier(0.34, 1.4, 0.64, 1), opacity 400ms; }
.step.is-in .step__num { transform: none; opacity: 1; }

/* Punti colorati degli elenchi: si accendono in sequenza. */
.problems li::before, .tools h3::before, .incl li::before { transform: scale(0.4); opacity: 0; transition: transform 600ms cubic-bezier(0.34, 1.4, 0.64, 1), opacity 300ms; }
.is-in .problems li::before, .is-in .tools h3::before, .is-in .incl li::before { transform: none; opacity: 1; }
.is-in li:nth-child(2)::before, .is-in li:nth-child(2) h3::before { transition-delay: 120ms; }
.is-in li:nth-child(3)::before, .is-in li:nth-child(3) h3::before { transition-delay: 240ms; }
.is-in li:nth-child(4)::before, .is-in li:nth-child(4) h3::before { transition-delay: 360ms; }
.is-in li:nth-child(5)::before { transition-delay: 480ms; } .is-in li:nth-child(6)::before { transition-delay: 600ms; }

/* Pulsante arancio: una leggera onda al passaggio, niente di più. */
.btn { position: relative; overflow: hidden; }
.btn::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(255,255,255,0.45), transparent 60%); opacity: 0; transition: opacity 300ms; pointer-events: none; }
.btn:hover::after { opacity: 1; }

/* Nav: si assottiglia scendendo. */
.nav { transition: box-shadow 300ms, background-color 300ms; }
.nav.is-scrolled { box-shadow: 0 8px 24px -18px rgba(74, 52, 30, 0.35); }

@media (prefers-reduced-motion: reduce) {
  .rv, .rv--left, .rv--right, .rv--pop { opacity: 1; transform: none; transition: none; }
  .hero .dots i, .hero__h1, .hero .lede, .hero__actions, .hero__shot .shot { animation: none; opacity: 1; transform: none; }
  .step__num, .problems li::before, .tools h3::before, .incl li::before { transform: none; opacity: 1; transition: none; }
  .shot, .btn::after, .nav { transition: none; }
}

.form__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form .cf-turnstile { min-height: 65px; }
