/* =====================================================================
   La Boutique del Sorriso — design system condiviso
   Palette blueprint: crema #F7F6F2 · carta #FDFCFA · inchiostro #10283A
   · azzurro brand #009EE3. Font: Plus Jakarta Sans + Instrument Serif.
   ===================================================================== */

:root {
  --cream: #F7F6F2;
  --cream-2: #EFECE6;
  --paper: #FDFCFA;
  --ink: #10283A;
  --ink-2: #0B1D2A;
  --muted: #5B6B78;
  --blue: #009EE3;
  --blue-2: #0077B6;
  --blue-soft: rgba(0, 158, 227, 0.12);
  --line: rgba(16, 40, 58, 0.12);
  --pain: #FF5A4E;

  --sans: 'Plus Jakarta Sans', system-ui, sans-serif;
  --serif: 'Instrument Serif', Georgia, serif;

  --gutter: clamp(16px, 4vw, 56px);
  --radius: 28px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

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

html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
::selection { background: var(--blue); color: #fff; }

img, video, canvas, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }

.serif { font-family: var(--serif); font-weight: 400; font-style: italic; letter-spacing: -0.01em; }
.blue { color: var(--blue); }
.muted { color: var(--muted); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 4px var(--blue-soft);
}

.display {
  font-size: clamp(44px, 8.4vw, 148px);
  line-height: 0.92;
  letter-spacing: -0.045em;
  font-weight: 500;
  margin: 0;
}
.h2 {
  font-size: clamp(34px, 5.2vw, 84px);
  line-height: 0.98;
  letter-spacing: -0.035em;
  font-weight: 500;
  margin: 0;
}
.h3 {
  font-size: clamp(24px, 2.6vw, 38px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  font-weight: 500;
  margin: 0;
}
.lead {
  font-size: clamp(18px, 1.6vw, 22px);
  line-height: 1.5;
  color: var(--muted);
  max-width: 38em;
}

.wrap { width: 100%; max-width: 1480px; margin: 0 auto; padding: 0 var(--gutter); }

/* ---------------------------------------------------------------------
   Grana pellicola (sopra a tutto, non intercetta il mouse)
--------------------------------------------------------------------- */
.grain {
  position: fixed;
  inset: -50%;
  z-index: 90;
  pointer-events: none;
  opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1.2s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); }
  20% { transform: translate(-3%, 2%); }
  40% { transform: translate(2%, -4%); }
  60% { transform: translate(-4%, -2%); }
  80% { transform: translate(3%, 3%); }
  100% { transform: translate(0, 0); }
}

/* ---------------------------------------------------------------------
   Navigazione: un'unica barra fluttuante
--------------------------------------------------------------------- */
.nav {
  position: fixed;
  top: 14px;
  left: 0;
  right: 0;
  z-index: 60;
  display: flex;
  justify-content: center;
  padding: 0 var(--gutter);
  pointer-events: none;
  transition: transform 700ms var(--ease);
}
.nav.is-hidden { transform: translateY(-140%); }
.nav__bar {
  pointer-events: auto;
  width: 100%;
  max-width: 1180px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 7px;
  border-radius: 999px;
  background: rgba(253, 252, 250, 0.78);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border: 1px solid rgba(16, 40, 58, 0.08);
  box-shadow: 0 10px 40px rgba(16, 40, 58, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.7);
  transition: background 500ms var(--ease), box-shadow 500ms var(--ease);
}
.nav.is-scrolled .nav__bar { background: rgba(253, 252, 250, 0.9); box-shadow: 0 16px 50px rgba(16, 40, 58, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.7); }
.nav__left, .nav__right { display: flex; align-items: center; gap: 6px; }
.nav__right { justify-content: flex-end; }
.nav__logo { display: block; padding: 0 8px; }
.nav__logo img { height: 30px; width: auto; }

.nav__status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  color: var(--muted);
}
.nav__status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #1EC97A;
  box-shadow: 0 0 0 0 rgba(30, 201, 122, 0.6);
  animation: live 2s infinite;
}
.nav__status.is-closed i { background: #C7CDD3; animation: none; }
@keyframes live {
  0% { box-shadow: 0 0 0 0 rgba(30, 201, 122, 0.55); }
  70% { box-shadow: 0 0 0 9px rgba(30, 201, 122, 0); }
  100% { box-shadow: 0 0 0 0 rgba(30, 201, 122, 0); }
}

.nav__back, .nav__icon {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(16, 40, 58, 0.05);
  text-decoration: none;
  transition: background 300ms var(--ease), color 300ms;
}
.nav__back:hover, .nav__icon:hover { background: var(--ink); color: #fff; }
.nav__back svg, .nav__icon svg { width: 17px; height: 17px; }
.nav__wa {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 18px 0 14px;
  border-radius: 999px;
  background: #25D366;
  color: var(--ink-2); /* testo scuro sul verde: contrasto 8,6:1 (il bianco era 2:1) */
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: background 300ms var(--ease), transform 400ms var(--ease);
}
.nav__wa:hover { background: #1DA851; }
.nav__wa svg { width: 18px; height: 18px; }
.nav__menu {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  border: 0;
  background: var(--ink);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 300ms var(--ease);
}
.nav__menu:hover { background: var(--blue); }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(253, 252, 250, 0.72);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  transition: background 300ms var(--ease), color 300ms var(--ease), border-color 300ms var(--ease);
}
.pill:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.pill__burger { display: grid; gap: 4px; }
.pill__burger span { display: block; width: 16px; height: 1.5px; background: currentColor; transition: transform 400ms var(--ease); }

@media (max-width: 900px) {
  .nav__status span { display: none; }
  .nav__status { padding: 0 10px; }
}
@media (max-width: 640px) {
  .nav { top: 10px; padding: 0 10px; }
  .nav__bar { padding: 5px; gap: 6px; }
  .nav__logo { padding: 0 2px; }
  .nav__logo img { height: 22px; }
  .nav__status, .nav__icon { display: none; }
  .nav__wa { padding: 0; width: 38px; justify-content: center; }
  .nav__wa span, .nav__menu span:first-child { display: none; }
  .nav__wa, .nav__menu, .nav__back { height: 38px; }
  .nav__back { width: 38px; }
  .nav__menu { padding: 0 13px; }
  /* senza freccia "indietro" a sinistra non resta nulla: la barra si stringe
     attorno a logo e pulsanti e si centra */
  .nav__bar:not(:has(.nav__back)) { width: auto; grid-template-columns: auto auto; gap: 14px; padding-left: 16px; }
  .nav__bar:not(:has(.nav__back)) .nav__left { display: none; }
}

/* ---------------------------------------------------------------------
   Menu a tutto schermo
--------------------------------------------------------------------- */
.menu {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: var(--ink-2);
  color: var(--paper);
  clip-path: circle(0% at calc(100% - 70px) 40px);
  transition: clip-path 900ms var(--ease-in-out);
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: 20px var(--gutter) 28px;
  overflow: hidden;
  visibility: hidden;
}
.menu.is-open { clip-path: circle(150% at calc(100% - 70px) 40px); visibility: visible; }
.menu__top { display: flex; justify-content: space-between; align-items: center; }
.menu__top img { height: 30px; filter: brightness(0) invert(1); }
.menu__close { background: transparent; border-color: rgba(255, 255, 255, 0.2); color: #fff; }
.menu__close:hover { background: #fff; color: var(--ink); }
.menu__links {
  align-self: center;
  display: flex;
  flex-direction: column;
  gap: 0;
  counter-reset: m;
}
.menu__links a {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 18px;
  font-size: clamp(40px, 7.4vw, 112px);
  line-height: 1.02;
  letter-spacing: -0.04em;
  font-weight: 500;
  text-decoration: none;
  width: fit-content;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 600ms var(--ease), transform 800ms var(--ease), color 300ms;
}
.menu__links a::before {
  counter-increment: m;
  content: '0' counter(m);
  font-size: 13px;
  letter-spacing: 0.1em;
  color: var(--blue);
  font-weight: 600;
  transform: translateY(-2.2em);
}
.menu__links a:hover { color: var(--blue); }
.menu__links a:hover span { font-family: var(--serif); font-style: italic; letter-spacing: -0.01em; }
.menu.is-open .menu__links a { opacity: 1; transform: none; }
.menu.is-open .menu__links a:nth-child(1) { transition-delay: 250ms; }
.menu.is-open .menu__links a:nth-child(2) { transition-delay: 310ms; }
.menu.is-open .menu__links a:nth-child(3) { transition-delay: 370ms; }
.menu.is-open .menu__links a:nth-child(4) { transition-delay: 430ms; }
.menu.is-open .menu__links a:nth-child(5) { transition-delay: 490ms; }
.menu.is-open .menu__links a:nth-child(6) { transition-delay: 550ms; }
.menu__foot {
  display: flex;
  flex-wrap: wrap;
  gap: 24px 48px;
  justify-content: space-between;
  font-size: 14px;
  color: rgba(253, 252, 250, 0.6);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 20px;
}
.menu__foot a { color: #fff; text-decoration: none; font-weight: 600; }

/* ---------------------------------------------------------------------
   Cursore personalizzato (solo dispositivi con mouse)
--------------------------------------------------------------------- */
.cursor { display: none; }
@media (hover: hover) and (pointer: fine) {
  .cursor {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    pointer-events: none;
  }
  .cursor__dot, .cursor__ring {
    position: fixed;
    top: 0;
    left: 0;
    border-radius: 50%;
    transform: translate(-50%, -50%);
  }
  .cursor__dot { width: 6px; height: 6px; background: var(--blue); }
  .cursor__ring {
    width: 38px;
    height: 38px;
    border: 1.5px solid rgba(0, 158, 227, 0.55);
    display: grid;
    place-items: center;
    transition: width 400ms var(--ease), height 400ms var(--ease), background 400ms var(--ease), border-color 400ms;
  }
  .cursor__label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #fff;
    opacity: 0;
    transition: opacity 250ms;
    white-space: nowrap;
  }
  .cursor.is-hover .cursor__ring { width: 64px; height: 64px; background: rgba(0, 158, 227, 0.1); }
  .cursor.has-label .cursor__ring { width: 92px; height: 92px; background: var(--blue); border-color: var(--blue); }
  .cursor.has-label .cursor__label { opacity: 1; }
  .cursor.has-label .cursor__dot { opacity: 0; }
  .cursor.is-drag .cursor__ring { width: 84px; height: 84px; border-style: dashed; }
  .cursor.is-off { opacity: 0; }
}

/* ---------------------------------------------------------------------
   Transizione tra pagine: tenda azzurra con il logo
--------------------------------------------------------------------- */
.curtain {
  position: fixed;
  inset: 0;
  z-index: 95;
  pointer-events: none;
  display: grid;
  place-items: center;
}
.curtain__panel {
  position: absolute;
  inset: 0;
  background: var(--blue);
  transform: translateY(0);
}
.curtain__panel--2 { background: var(--ink-2); }
.curtain__mark { position: relative; width: 64px; height: 64px; color: #fff; opacity: 0; }
html.is-ready .curtain__panel { transform: translateY(-101%); transition: transform 1000ms var(--ease-in-out); }
html.is-ready .curtain__panel--2 { transition-delay: 90ms; }
html.is-leaving .curtain__panel { transform: translateY(0); transition: transform 700ms var(--ease-in-out); }
html.is-leaving .curtain__panel--2 { transition-delay: 0ms; }
html.is-leaving .curtain__panel:first-child { transition-delay: 90ms; }
html.no-curtain .curtain { display: none; }

/* ---------------------------------------------------------------------
   Bottoni
--------------------------------------------------------------------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  height: 64px;
  padding: 0 10px 0 30px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  overflow: hidden;
  isolation: isolate;
  border: 0;
  cursor: pointer;
}
.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--blue);
  border-radius: inherit;
  transform: translateY(101%);
  transition: transform 600ms var(--ease);
}
.btn:hover::before { transform: none; }
.btn__icon {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--blue);
  display: grid;
  place-items: center;
  transition: background 500ms var(--ease), transform 600ms var(--ease);
}
.btn:hover .btn__icon { background: #fff; color: var(--blue); transform: rotate(-45deg); }
.btn__icon svg { width: 18px; height: 18px; }
.btn__lead { display: inline-grid; place-items: center; margin-left: -8px; }
.btn__lead svg { width: 20px; height: 20px; }
.btn--wa { background: #25D366; color: var(--ink-2); transition: color 400ms var(--ease); }
.btn--wa:hover { color: #fff; }
.btn--wa .btn__icon { background: rgba(11, 29, 42, 0.12); }
.btn--wa::before { background: var(--ink); }
.btn--light { background: #fff; color: var(--ink); }
.btn--light:hover { color: #fff; }
.btn--ghost { background: transparent; color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35); }
.btn--ghost .btn__icon { background: rgba(255, 255, 255, 0.14); }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  border-bottom: 1.5px solid currentColor;
  padding-bottom: 4px;
}
.link-arrow svg { width: 16px; height: 16px; transition: transform 400ms var(--ease); }
.link-arrow:hover svg { transform: translateX(6px); }

/* ---------------------------------------------------------------------
   Reveal di testo (gestiti da site.js)
--------------------------------------------------------------------- */
.split-line { display: block; overflow: hidden; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.split-line > span { display: inline-block; will-change: transform; }
.split-word { display: inline-block; white-space: nowrap; }
[data-reveal="fade"] { opacity: 0; transform: translateY(30px); }
/* parte da 0.52: testo grande sempre leggibile (contrasto ≥ 3:1), poi si accende */
[data-scrub-words] .w { opacity: 0.52; transition: none; }

/* ---------------------------------------------------------------------
   Marquee
--------------------------------------------------------------------- */
.marquee {
  display: flex;
  overflow: hidden;
  white-space: nowrap;
  user-select: none;
}
.marquee__track {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 0.5em;
  padding-right: 0.5em;
  animation: marquee var(--marquee-speed, 38s) linear infinite;
}
.marquee__track > * { flex-shrink: 0; }
@keyframes marquee { to { transform: translateX(-100%); } }

/* ---------------------------------------------------------------------
   Footer
--------------------------------------------------------------------- */
.footer {
  position: relative;
  background: var(--ink-2);
  color: rgba(253, 252, 250, 0.62);
  padding: clamp(64px, 10vw, 140px) 0 28px;
  overflow: hidden;
}
.footer__big {
  font-size: clamp(56px, 13vw, 230px);
  line-height: 0.85;
  letter-spacing: -0.05em;
  color: var(--paper);
  font-weight: 500;
  margin: 0 0 clamp(40px, 6vw, 90px);
}
.footer__big .serif { color: var(--blue); }
.footer__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 32px;
  font-size: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 32px;
}
.footer__grid .footer__h {
  margin: 0 0 14px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue);
  font-weight: 700;
}
.footer__grid a { display: block; color: var(--paper); text-decoration: none; margin-bottom: 6px; overflow-wrap: anywhere; }
.footer__grid a:hover { color: var(--blue); }
.footer__legal {
  margin-top: 56px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12px;
  line-height: 1.6;
  color: rgba(253, 252, 250, 0.62);
}
.footer__legal a { color: rgba(253, 252, 250, 0.75); }
.footer__links { margin-top: 6px; }
@media (max-width: 860px) {
  .footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .footer__grid { grid-template-columns: 1fr; gap: 24px; }
  .footer__legal { flex-direction: column; }
}
.menu__foot a { overflow-wrap: anywhere; }

/* ---------------------------------------------------------------------
   Barra CTA fissa (compare dopo l'hero)
--------------------------------------------------------------------- */
.sticky-cta {
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 55;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border-radius: 999px;
  background: rgba(11, 29, 42, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: #fff;
  transform: translate(-50%, 140%);
  transition: transform 700ms var(--ease);
  box-shadow: 0 20px 50px rgba(11, 29, 42, 0.3);
}
.sticky-cta.is-visible { transform: translate(-50%, 0); }
.sticky-cta__text { padding: 0 14px 0 16px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.sticky-cta a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.sticky-cta .is-primary { background: #25D366; color: var(--ink-2); }
.sticky-cta .is-secondary { background: rgba(255, 255, 255, 0.1); }
@media (max-width: 560px) {
  .sticky-cta__text { display: none; }
}

/* ---------------------------------------------------------------------
   Movimento ridotto: niente animazioni decorative
--------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .grain, .marquee__track { animation: none; }
  [data-reveal="fade"] { opacity: 1; transform: none; }
  [data-scrub-words] .w { opacity: 1; }
}

/* Link interni nei testi */
.text-link { color: inherit; text-decoration: underline; text-decoration-color: var(--blue); text-decoration-thickness: 1.5px; text-underline-offset: 3px; transition: color .2s; }
.text-link:hover { color: var(--blue-2); }

/* Avviso cookie (assets/js/consent.js): Accetta e Rifiuta con lo stesso peso */
.consent {
  position: fixed; z-index: 9000; left: 16px; bottom: 16px; max-width: 420px;
  padding: 20px 20px 16px; border-radius: 20px; background: var(--ink); color: #fff;
  box-shadow: 0 20px 50px rgba(11, 29, 42, 0.3); font-size: 14px; line-height: 1.5;
}
.consent__t { margin: 0; color: rgba(255, 255, 255, 0.85); }
.consent__t strong { color: #fff; }
.consent__t a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.consent__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.consent__btn {
  height: 44px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.35);
  background: transparent; color: #fff; font: inherit; font-weight: 700; cursor: pointer;
}
.consent__btn:hover { background: rgba(255, 255, 255, 0.1); }
.consent__btn[data-c="granted"] { background: #fff; color: var(--ink); border-color: #fff; }
@media (max-width: 560px) { .consent { left: 12px; right: 12px; bottom: 12px; max-width: none; } }
.footer__links button { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: inherit; cursor: pointer; }
