/* ==========================================================================
   Jilpy · nuova home (IT)
   - Colori: token su :root, ridefiniti per il tema scuro (prefers-color-scheme).
   - Font di sistema: nessuna richiesta a terzi.
   - Animazioni solo con transform e opacity. Gli stati nascosti valgono solo con
     le classi .js (messa nell'head) e .js-ready (messa da js/main.js):
     senza JavaScript, o con «riduci movimento», tutto è visibile subito.
   ========================================================================== */

:root {
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --bg: #ffffff;
  --bg-alt: #faf8fc;
  --surface: #ffffff;
  --surface-2: #f7f3fd;
  --border: #ece7f5;
  --border-strong: #dccff5;
  --ghost-border: #9580cc;   /* bordo del bottone ghost e pallini: almeno 3:1 sullo sfondo */
  --text: #1b1033;
  --text-2: #5b5570;
  --text-3: #6e6685;
  --accent: #6d28d9;
  --accent-ink: #4c2a8c;
  --link: #6d28d9;
  --chip-bg: #f1eafa;
  --star: #c2298c;
  --star-empty: #e6dcf3;
  --focus: #6d28d9;

  --grad: linear-gradient(135deg, #6d28d9 0%, #c2298c 100%);
  --grad-text: linear-gradient(100deg, #6d28d9 0%, #a21caf 55%, #c2298c 100%);
  --grad-band: linear-gradient(135deg, #2d1b69 0%, #6d28d9 38%, #a21caf 72%, #c2298c 100%);

  --phone: #150c2e;
  --phone-ring: rgba(255, 255, 255, .06);
  --night: #0e0920;
  --footer-bg: #150c2e;

  --header-bg: rgba(255, 255, 255, .78);
  --header-border: rgba(27, 16, 51, .08);
  --menu-shadow: 0 28px 40px -28px rgba(27, 16, 51, .35);

  --hero-bg:
    radial-gradient(55% 45% at 88% 16%, rgba(194, 41, 140, .11), transparent 70%),
    radial-gradient(50% 45% at 6% 4%, rgba(109, 40, 217, .12), transparent 70%),
    linear-gradient(180deg, #fbf7ff 0%, #ffffff 74%);

  --shadow-card: 0 1px 2px rgba(45, 27, 105, .04), 0 16px 34px -22px rgba(45, 27, 105, .3);
  --shadow-phone: 0 50px 90px -42px rgba(45, 27, 105, .6), 0 22px 40px -26px rgba(45, 27, 105, .38);
  --shadow-btn: 0 12px 26px -12px rgba(109, 40, 217, .6);

  --ph-bg: linear-gradient(165deg, #f5efff 0%, #fdf0f7 100%);
  --ph-line: rgba(109, 40, 217, .12);
  --stage-glow: radial-gradient(closest-side, rgba(150, 70, 230, .18), transparent);

  --header-h: 60px;
  --gutter: 16px;
  --radius-card: 24px;
  --ease-out: cubic-bezier(.2, .7, .2, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e0920;
    --bg-alt: #130c2a;
    --surface: #1a1236;
    --surface-2: #211845;
    --border: #2d2352;
    --border-strong: #4a3d80;
    --ghost-border: #806fbf;
    --text: #f4f0fc;
    --text-2: #c3bbd8;
    --text-3: #a39ab9;
    --accent: #b794f6;
    --accent-ink: #dccbff;
    --link: #c4a7ff;
    --chip-bg: #261b4d;
    --star: #f07bc4;
    --star-empty: #3d3266;
    --focus: #c4a7ff;

    --grad-text: linear-gradient(100deg, #c4a7ff 0%, #e48ad8 55%, #ff8fc8 100%);

    --phone: #05030c;
    --phone-ring: rgba(255, 255, 255, .14);
    --night: #07040f;
    --footer-bg: #07040f;

    --header-bg: rgba(14, 9, 32, .74);
    --header-border: rgba(255, 255, 255, .08);
    --menu-shadow: 0 28px 40px -28px rgba(0, 0, 0, .8);

    --hero-bg:
      radial-gradient(55% 45% at 88% 16%, rgba(194, 41, 140, .2), transparent 70%),
      radial-gradient(50% 45% at 6% 4%, rgba(109, 40, 217, .3), transparent 70%),
      linear-gradient(180deg, #150b30 0%, #0e0920 74%);

    --shadow-card: 0 1px 2px rgba(0, 0, 0, .3), 0 18px 40px -24px rgba(0, 0, 0, .75);
    --shadow-phone: 0 50px 90px -40px rgba(0, 0, 0, .9), 0 22px 44px -26px rgba(109, 40, 217, .4);
    --shadow-btn: 0 12px 28px -12px rgba(160, 60, 220, .7);

    --ph-bg: linear-gradient(165deg, #22184a 0%, #2a1638 100%);
    --ph-line: rgba(255, 255, 255, .1);
    --stage-glow: radial-gradient(closest-side, rgba(150, 70, 230, .28), transparent);
  }
}

@media (min-width: 600px) { :root { --gutter: 24px; } }
@media (min-width: 900px) { :root { --header-h: 64px; } }
@media (min-width: 1100px) { :root { --gutter: 40px; } }

/* ---------- Base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, p, ul, ol, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: var(--link); text-underline-offset: 3px; }
button { font: inherit; color: inherit; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 8px; }
main:focus { outline: none; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.icon { width: 1em; height: 1em; flex: none; }
.nowrap { white-space: nowrap; }

.container {
  width: 100%;
  max-width: calc(1200px + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  top: 10px; left: var(--gutter);
  z-index: 100;
  padding: 12px 18px;
  border-radius: 12px;
  background: var(--text);
  color: var(--bg);
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-180%);
  transition: transform .2s ease;
}
.skip-link:focus, .skip-link:focus-visible { transform: none; }

/* ---------- Testo ---------- */

.eyebrow,
.grad-text,
.w--accent {
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.eyebrow {
  display: inline-block;
  margin-bottom: 14px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .005em;
  line-height: 1.35;
  text-wrap: balance;
}
.eyebrow--on-dark { background-image: linear-gradient(100deg, #c9b0ff 0%, #f3a0d8 100%); }

.h2 {
  font-size: clamp(34px, 2.6vw + 22px, 60px);
  line-height: 1.06;
  font-weight: 800;
  letter-spacing: -.032em;
  text-wrap: balance;
}
.lead {
  margin-top: 18px;
  font-size: clamp(18px, .45vw + 15.5px, 22px);
  line-height: 1.55;
  color: var(--text-2);
  text-wrap: pretty;
}

.section { padding-block: clamp(88px, 9vw, 150px); }
.section--alt { background: var(--bg-alt); }
.section-head {
  max-width: 780px;
  margin: 0 auto clamp(48px, 6vw, 88px);
  text-align: center;
}

/* ---------- Bottoni ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform .25s var(--ease-out), opacity .2s ease;
}
.btn .icon { width: 18px; height: 18px; transition: transform .25s var(--ease-out); }
.btn:hover .icon { transform: translateX(3px); }
.btn--primary { color: #fff; background: var(--grad); box-shadow: var(--shadow-btn); }
.btn--primary:hover { transform: translateY(-1px); }
.btn--primary:active { transform: scale(.98); }
.btn--ghost { color: var(--accent-ink); background: transparent; box-shadow: inset 0 0 0 2px var(--ghost-border); }
.btn--ghost:hover { box-shadow: inset 0 0 0 2px var(--accent); }
.btn--sm { min-height: 40px; padding: 0 18px; font-size: 14px; }
.btn--lg { min-height: 56px; padding: 0 30px; font-size: 17px; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
}
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  backdrop-filter: saturate(180%) blur(18px);
  box-shadow: inset 0 -1px 0 var(--header-border);
  transition: opacity .35s ease;
}
.js .site-header { position: fixed; top: 0; left: 0; right: 0; }
.js .site-header:not(.is-scrolled):not(.is-open)::before { opacity: 0; }

.header__inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  border-radius: 10px;
}
.brand__icon { width: 34px; height: 34px; border-radius: 9px; }
.brand__word { width: auto; height: 22px; }

.nav__list { display: flex; flex-wrap: wrap; gap: 0 22px; }
.nav__list a {
  display: inline-block;
  padding: 8px 2px;
  color: var(--text-2);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}
.nav__list a:hover { color: var(--text); }

.header__actions { display: flex; align-items: center; gap: 6px; }

.nav-toggle {
  display: none;
  position: relative;
  width: 44px;
  height: 44px;
  margin-right: -8px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.nav-toggle__bar {
  position: absolute;
  left: 12px; right: 12px; top: 21px;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
  transition: transform .3s var(--ease-out);
}
.nav-toggle__bar:first-child { transform: translate3d(0, -4px, 0); }
.nav-toggle__bar:last-child { transform: translate3d(0, 4px, 0); }
.is-open .nav-toggle__bar:first-child { transform: rotate(45deg); }
.is-open .nav-toggle__bar:last-child { transform: rotate(-45deg); }

@media (max-width: 899px) {
  /* Senza JavaScript: i link stanno in una seconda riga, sempre visibili */
  .header__inner { flex-wrap: wrap; padding-block: 8px; }
  .nav { order: 3; width: 100%; }
  .nav__list { gap: 0 18px; }
  .nav__list a { font-size: 14px; padding: 6px 0; }

  /* Con JavaScript: menu a scomparsa */
  .js .header__inner { flex-wrap: nowrap; padding-block: 0; }
  .js .nav-toggle { display: inline-flex; }
  .js .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: auto;
    padding: 4px var(--gutter) 18px;
    background: var(--bg);
    box-shadow: inset 0 1px 0 var(--border), var(--menu-shadow);
    opacity: 0;
    visibility: hidden;
    transform: translate3d(0, -8px, 0);
    transition: opacity .25s ease, transform .3s var(--ease-out), visibility 0s linear .3s;
  }
  .js .site-header.is-open .nav {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity .25s ease, transform .3s var(--ease-out), visibility 0s;
  }
  .js .nav__list { flex-direction: column; gap: 0; }
  .js .nav__list a {
    display: block;
    padding: 14px 4px;
    font-size: 19px;
    font-weight: 700;
    color: var(--text);
    box-shadow: inset 0 -1px 0 var(--border);
  }
  .js .nav__list li:last-child a { box-shadow: none; }
}

@media (min-width: 900px) {
  /* Nell'HTML il menu viene dopo i pulsanti (ordine del focus): qui si rimette al centro */
  .header__inner { display: grid; grid-template-columns: 1fr auto 1fr; }
  .brand { grid-column: 1; grid-row: 1; justify-self: start; }
  .nav { grid-column: 2; grid-row: 1; }
  .header__actions { grid-column: 3; grid-row: 1; justify-self: end; }
}

/* ---------- Telefoni ---------- */

/* La larghezza la decide il contenitore: .phone occupa sempre il 100% del genitore */
.phone {
  position: relative;
  width: 100%;
  padding: 3.3%;
  border-radius: 15% / 7.2%;
  background: var(--phone);
  box-shadow: inset 0 0 0 1px var(--phone-ring), var(--shadow-phone);
}
.phone__screen {
  position: relative;
  overflow: hidden;
  aspect-ratio: 420 / 912;
  border-radius: 12.5% / 5.8%;
  background: var(--bg-alt);
}
.phone__screen > img { width: 100%; height: 100%; object-fit: cover; }

.phone--tilt-l  { transform: rotate(-2deg); }
.phone--tilt-r  { transform: rotate(2deg); }
.phone--tilt-l2 { transform: rotate(-8deg); }
.phone--tilt-r2 { transform: rotate(7deg); }

/* Schermata non ancora disponibile (solo nel telefono fisso dello scrollytelling) */
.screen-ph {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 24px;
  background: var(--ph-bg);
  text-align: center;
}
.screen-ph__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 84px;
  height: 84px;
  border-radius: 24px;
  background: var(--grad);
  color: #fff;
  box-shadow: 0 18px 36px -16px rgba(109, 40, 217, .6);
}
.screen-ph__icon .icon { width: 40px; height: 40px; }
.screen-ph__label { font-size: 17px; font-weight: 800; letter-spacing: -.01em; color: var(--text); }
.screen-ph__lines { display: grid; gap: 8px; width: 62%; }
.screen-ph__lines i { display: block; height: 8px; border-radius: 99px; background: var(--ph-line); }
.screen-ph__lines i:nth-child(2) { width: 82%; margin-inline: auto; }
.screen-ph__lines i:nth-child(3) { width: 60%; margin-inline: auto; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  padding-top: 40px;
  background: var(--hero-bg);
}
.js .hero { padding-top: calc(var(--header-h) + 36px); }

.hero__grid { display: grid; gap: 36px; align-items: center; }

.hero__copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 660px;
  margin-inline: auto;
  text-align: center;
}
.hero__eyebrow { margin-bottom: 16px; }
.hero__title {
  font-size: clamp(34px, 2.6vw + 26px, 66px);
  line-height: 1.04;
  font-weight: 800;
  letter-spacing: -.038em;
  text-wrap: balance;
  overflow-wrap: break-word;
}
.hero__lead {
  margin-top: 22px;
  max-width: 580px;
  font-size: clamp(18px, .5vw + 15px, 21px);
  line-height: 1.55;
  color: var(--text-2);
  text-wrap: pretty;
}
.hero__ctas {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 32px;
}
.hero__note { margin-top: 16px; font-size: 14px; color: var(--text-3); }

.stores {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 22px;
}
.store { display: block; border-radius: 10px; transition: transform .25s var(--ease-out); }
.store:hover { transform: translateY(-2px); }
.store img { width: auto; height: 46px; }

.rating-badge {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  margin-top: 24px;
  padding: 10px 18px;
  border-radius: 18px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--border);
}
.rating-badge__row { display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 10px; }
.rating-badge__text { font-size: 14px; font-weight: 700; color: var(--text); }
.rating-badge__note { font-size: 12.5px; color: var(--text-3); text-align: center; }

.stars { position: relative; display: inline-flex; font-size: 16px; line-height: 1; }
.stars__row { display: flex; gap: 2px; color: var(--star-empty); }
.stars__row svg { width: 1em; height: 1em; flex: none; }
.stars__row--fill {
  position: absolute;
  top: 0; left: 0;
  width: var(--fill, 100%);
  overflow: hidden;
  color: var(--star);
}
.stars--sm .stars__row { color: var(--star); }
.stars--lg { font-size: 22px; }

.hero__visual {
  --cw: 220px;  /* telefono centrale */
  --sw: 152px;  /* telefoni laterali */
  --ov: 78px;   /* sovrapposizione */
  position: relative;
  height: 490px;
}
.hero-phone { position: absolute; will-change: transform; }
.hero-phone--center { z-index: 3; top: 0; left: calc(50% - var(--cw) / 2); width: var(--cw); }
.hero-phone--left   { z-index: 1; top: 22%; left: calc(50% - var(--cw) / 2 - var(--sw) + var(--ov)); width: var(--sw); }
.hero-phone--right  { z-index: 2; top: 28%; left: calc(50% + var(--cw) / 2 - var(--ov)); width: var(--sw); }

@media (max-width: 479px) {
  .hero__ctas { flex-direction: column; width: 100%; }
  .hero__ctas .btn { width: 100%; }
}
@media (min-width: 600px) {
  .store img { height: 50px; }
  .hero__visual { --cw: 270px; --sw: 190px; --ov: 70px; height: 610px; }
}
@media (min-width: 1100px) {
  .hero { padding-bottom: 40px; }
  .hero__grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
    gap: 40px;
    min-height: min(860px, calc(100vh - var(--header-h) - 76px));
  }
  .hero__copy { align-items: flex-start; margin: 0; text-align: left; }
  .hero__ctas, .stores { justify-content: flex-start; }
  .rating-badge { align-items: flex-start; }
  .rating-badge__row { justify-content: flex-start; }
  .rating-badge__note { text-align: left; }
  .hero__visual { --cw: 260px; --sw: 184px; --ov: 84px; height: 600px; }
  .hero-phone--center { top: 3%; }
}
@media (min-width: 1280px) {
  .hero__visual { --cw: 300px; --sw: 212px; --ov: 92px; height: 690px; }
}

/* ---------- Jilpy traccia, non decide ---------- */

.statement {
  position: relative;
  z-index: 1;
  background: var(--night);
  color: #fff;
}
.statement__pin {
  display: flex;
  align-items: center;
  padding-block: clamp(96px, 12vw, 160px);
  background: radial-gradient(60% 55% at 50% 42%, rgba(109, 40, 217, .3), transparent 72%);
}
.statement__inner { text-align: center; }
.statement__title {
  /* min(14vw, 15vh): sui portatili con finestra bassa il titolo si riduce e la fascia resta dentro lo schermo */
  font-size: clamp(44px, min(14vw, 15vh), 136px);
  line-height: .98;
  font-weight: 800;
  letter-spacing: -.045em;
  transform-origin: 50% 60%;
}
.statement__line { display: block; }
.w--accent { background-image: linear-gradient(100deg, #c9a7ff 0%, #f08ad2 55%, #ff9f9a 100%); }

.statement__body {
  display: grid;
  gap: 16px;
  max-width: 700px;
  margin: clamp(36px, 4vw, 56px) auto 0;
  font-size: clamp(17px, .5vw + 14.5px, 21px);
  line-height: 1.6;
  color: rgba(255, 255, 255, .8);
}
.callout {
  display: inline-flex;
  align-items: flex-start;
  justify-self: center;
  gap: 12px;
  margin-top: 8px;
  padding: 16px 22px;
  border-radius: 20px;
  background: rgba(255, 255, 255, .07);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16);
  color: #fff;
  font-weight: 650;
  text-align: left;
}
.callout .icon { width: 22px; height: 22px; margin-top: 3px; color: #f3a0d8; }
.statement :focus-visible { outline-color: #c4a7ff; }

/* Effetto «si illumina» allo scroll: solo con JavaScript, movimento permesso e finestra alta */
@media (prefers-reduced-motion: no-preference) and (min-height: 600px) {
  .js-ready .statement__track { height: 250vh; }
  .js-ready .statement__pin {
    position: sticky;
    top: 0;
    height: 100vh;
    height: 100svh;
    padding-block: var(--header-h) 0;
    align-items: safe center;   /* se il contenuto non ci sta, parte dall'alto invece di uscire sopra */
  }
  .js-ready .statement .w { opacity: var(--o, .16); }
  .js-ready .statement__title { transform: scale(var(--s, .9)); will-change: transform; }
  .js-ready .statement__body {
    opacity: var(--b, 0);
    transform: translate3d(0, calc((1 - var(--b, 0)) * 28px), 0);
  }
}
@media (prefers-reduced-motion: no-preference) and (min-height: 600px) and (max-width: 699px) {
  .js-ready .statement__track { height: 210vh; }
}

/* ---------- Funzionalità ---------- */

.step { position: relative; padding-block: 40px; }
.step__inner { max-width: 540px; }
.step__kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  font-size: 15px;
  font-weight: 700;
  color: var(--accent);
}
.step__kicker .icon {
  width: 36px;
  height: 36px;
  padding: 8px;
  border-radius: 11px;
  background: var(--chip-bg);
}
.step__title {
  font-size: clamp(28px, 1.4vw + 22px, 44px);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -.028em;
  text-wrap: balance;
}
.step__body {
  margin-top: 16px;
  font-size: clamp(17px, .3vw + 15.5px, 19px);
  line-height: 1.62;
  color: var(--text-2);
  text-wrap: pretty;
}
.premium {
  margin-top: 20px;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--border);
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--text-2);
}
.premium__tag {
  display: inline-block;
  margin-right: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--grad);
  color: #fff;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: .06em;
  line-height: 1.5;
  text-transform: uppercase;
  vertical-align: 1px;
}

.step__media { width: min(270px, 70vw); margin: 36px auto 0; }
.step__media--empty { display: none; }

.scrolly__stage { display: none; }

@media (min-width: 900px) {
  .step {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 80px;
    align-items: center;
    padding-block: 56px;
  }
  .step:nth-child(even) .step__text { order: 2; }
  .step__media { width: 290px; margin: 0 auto; }
  .step:has(> .step__media--empty) { grid-template-columns: minmax(0, 1fr); }
}

/* Scrollytelling: telefono fisso a destra, testi che scorrono a sinistra */
@media (min-width: 900px) and (prefers-reduced-motion: no-preference) {
  .js-ready .scrolly {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 64px;
  }
  .js-ready .step {
    display: flex;
    align-items: center;
    min-height: 82vh;
    padding-block: 48px;
  }
  .js-ready .step__text { transition: opacity .5s ease; }
  .js-ready .step:not(.is-active) .step__text { opacity: .45; }
  .js-ready .step__media:not(.step__media--empty) {
    /* resta per i lettori di schermo, la vede chi guarda il telefono fisso */
    position: absolute;
    width: 1px; height: 1px;
    margin: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .js-ready .scrolly__stage {
    --stage-h: min(660px, calc(100vh - var(--header-h) - 96px));
    display: flex;
    align-items: center;
    justify-content: center;
    position: sticky;
    top: calc(var(--header-h) + (100vh - var(--header-h) - var(--stage-h)) / 2);
    height: var(--stage-h);
  }
}

.scrolly__stage::before {
  content: "";
  position: absolute;
  inset: -10% -5%;
  background: var(--stage-glow);
  z-index: -1;
}
.phone--stage {
  width: calc((var(--stage-h) - 22px) * .4605 + 22px);
  padding: 11px;
  border-radius: 54px;
}
.phone--stage .phone__screen { border-radius: 44px; }
.stage__screen {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(.94);
  transition: opacity .55s ease, transform .8s var(--ease-out);
}
.stage__screen.is-active { opacity: 1; transform: none; }
.stage__screen > img { width: 100%; height: 100%; object-fit: cover; }

.stage__dots {
  position: absolute;
  top: 50%;
  right: 0;
  display: grid;
  gap: 14px;
  transform: translateY(-50%);
}
.stage__dots li {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ghost-border);
  transition: transform .4s var(--ease-out), opacity .4s ease;
}
.stage__dots li.is-active { background: var(--grad); opacity: 1; transform: scale(1.5); }

.reminder {
  display: grid;
  gap: 18px;
  margin-top: clamp(56px, 7vw, 96px);
  padding: clamp(24px, 3vw, 40px);
  border-radius: 28px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--border), var(--shadow-card);
}
.reminder__icon {
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border-radius: 18px;
  background: var(--grad);
  color: #fff;
}
.reminder__icon .icon { width: 28px; height: 28px; }
.reminder__title { font-size: clamp(22px, .8vw + 18px, 28px); line-height: 1.2; font-weight: 800; letter-spacing: -.02em; }
.reminder__body { margin-top: 8px; font-size: 17px; color: var(--text-2); }
@media (min-width: 700px) {
  .reminder { grid-template-columns: auto 1fr; align-items: center; gap: 28px; }
}

/* ---------- Community ---------- */

.community__grid { display: grid; gap: 56px; align-items: center; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--chip-bg);
  color: var(--accent-ink);
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.3;
}
.chip .icon { width: 18px; height: 18px; }
.community__anon { margin-top: 24px; font-size: 17px; color: var(--text-2); }
.notes {
  display: grid;
  gap: 14px;
  margin-top: 28px;
  padding: 20px 22px;
  border-radius: 20px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--border);
}
.notes li { display: flex; gap: 12px; font-size: 15px; line-height: 1.55; color: var(--text-2); }
.notes .icon { width: 20px; height: 20px; margin-top: 2px; color: var(--accent); }
.community__visual { display: flex; justify-content: center; }
.community__phone { width: min(300px, 70vw); will-change: transform; }

@media (min-width: 900px) {
  .community__grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 80px; }
}

/* ---------- Recensioni ---------- */

.reviews__rating {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 12px;
  margin-top: 22px;
  font-size: 18px;
  font-weight: 700;
}
.reviews__note { max-width: 640px; margin: 14px auto 0; font-size: 14px; color: var(--text-3); }

.reviews__grid { display: grid; gap: 20px; }
.review {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 30px 28px 26px;
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--border), var(--shadow-card);
}
.review__text { flex: 1; font-size: 18px; line-height: 1.55; font-weight: 500; color: var(--text); }
.review__by { display: flex; align-items: center; gap: 12px; }
.review__avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--grad);
  color: #fff;
  font-weight: 800;
}
.review__name { display: block; font-size: 15px; font-weight: 700; }
.review__meta { display: block; font-size: 13.5px; color: var(--text-3); }
.reviews__more { margin-top: 36px; text-align: center; }
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 17px;
  font-weight: 700;
  color: var(--link);
  text-decoration: none;
}
.link-arrow:hover { text-decoration: underline; }
.link-arrow .icon { width: 18px; height: 18px; transition: transform .25s var(--ease-out); }
.link-arrow:hover .icon { transform: translateX(3px); }

@media (min-width: 900px) {
  .reviews__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
}

/* ---------- Privacy ---------- */

.guarantees { display: grid; gap: 16px; }
.guarantee {
  padding: 28px 26px;
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--border), var(--shadow-card);
}
.guarantee__icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 18px;
  border-radius: 14px;
  background: var(--chip-bg);
  color: var(--accent);
}
.guarantee__icon .icon { width: 24px; height: 24px; }
.guarantee__title { font-size: 19px; line-height: 1.25; font-weight: 800; letter-spacing: -.015em; }
.guarantee p { margin-top: 10px; font-size: 15.5px; line-height: 1.6; color: var(--text-2); }

.health-note {
  position: relative;
  display: grid;
  gap: 20px;
  align-items: center;
  margin-top: 28px;
  padding: 26px 26px 26px 30px;
  overflow: hidden;
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--border);
}
.health-note::before {
  content: "";
  position: absolute;
  top: 0; bottom: 0; left: 0;
  width: 5px;
  background: var(--grad);
}
.health-note p { font-size: 16.5px; line-height: 1.6; color: var(--text); }
.health-note .btn { justify-self: start; }

@media (min-width: 640px) {
  .guarantees { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
}
@media (min-width: 900px) {
  .health-note { grid-template-columns: minmax(0, 1fr) auto; gap: 40px; padding: 30px 36px 30px 40px; }
}
@media (min-width: 1100px) {
  .guarantees { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ---------- Download ---------- */

.download {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-block: clamp(96px, 11vw, 160px);
  background: var(--grad-band);
  color: #fff;
  text-align: center;
}
.download__glow {
  position: absolute;
  inset: -30% 10% 40%;
  z-index: -1;
  background: radial-gradient(closest-side, rgba(255, 255, 255, .12), transparent);
  pointer-events: none;
}
.download__inner { display: flex; flex-direction: column; align-items: center; }
.download__icon {
  width: 96px;
  height: 96px;
  margin-bottom: 28px;
  border-radius: 24px;
  box-shadow: 0 24px 50px -18px rgba(20, 8, 50, .65);
}
.download__title { max-width: 820px; color: #fff; }
.download__lead {
  max-width: 640px;
  margin-top: 18px;
  font-size: clamp(18px, .5vw + 15px, 21px);
  color: rgba(255, 255, 255, .92);
}
.stores--center { justify-content: center; margin-top: 36px; }
.download__note { margin-top: 20px; font-size: 14px; color: rgba(255, 255, 255, .9); }
.download :focus-visible { outline-color: #fff; }

/* ---------- Footer ---------- */

.site-footer {
  padding: 64px 0 32px;
  background: var(--footer-bg);
  color: rgba(255, 255, 255, .72);
  font-size: 15px;
}
.site-footer a { color: rgba(255, 255, 255, .88); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer :focus-visible { outline-color: #c4a7ff; }

.footer__top {
  display: grid;
  gap: 32px;
  padding-bottom: 36px;
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, .12);
}
.brand--footer .brand__icon { width: 36px; height: 36px; }
.footer__motto { max-width: 300px; margin-top: 14px; }
.footer__col ul { display: grid; gap: 10px; }
.footer__contact p + p { margin-top: 10px; }

.footer__bottom { display: grid; gap: 20px; padding-top: 28px; }
.footer__disclaimer { max-width: 720px; font-size: 13.5px; line-height: 1.6; color: rgba(255, 255, 255, .68); }
.footer__meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.footer__copy { font-size: 13.5px; color: rgba(255, 255, 255, .68); }

.lang-bar { display: flex; flex-wrap: wrap; gap: 4px; }
.site-footer .lang-bar a {
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, .74);
}
.site-footer .lang-bar a:hover { background: rgba(255, 255, 255, .08); color: #fff; text-decoration: none; }
.site-footer .lang-bar a.active { background: rgba(255, 255, 255, .12); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22); }

@media (min-width: 700px) {
  .footer__top { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer__brand { grid-column: 1 / -1; }
}
@media (min-width: 1000px) {
  .footer__top { grid-template-columns: 1.6fr 1fr 1fr 1.3fr; }
  .footer__brand { grid-column: auto; }
}

/* ---------- Animazioni (solo transform e opacity) ---------- */

@keyframes rise {
  from { opacity: 0; transform: translate3d(0, 26px, 0); }
  to   { opacity: 1; transform: none; }
}
@keyframes phone-in {
  from { opacity: 0; transform: translate3d(0, 80px, 0) scale(.94); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: no-preference) {
  /* Ingresso dell'hero al caricamento (classe .js messa nell'head) */
  .js .hero__copy > * { animation: rise 1s var(--ease-out) both; }
  .js .hero__copy > :nth-child(2) { animation-delay: .08s; }
  .js .hero__copy > :nth-child(3) { animation-delay: .2s; }
  .js .hero__copy > :nth-child(4) { animation-delay: .3s; }
  .js .hero__copy > :nth-child(5) { animation-delay: .38s; }
  .js .hero__copy > :nth-child(6) { animation-delay: .44s; }
  .js .hero__copy > :nth-child(7) { animation-delay: .5s; }
  .js .phone-enter { animation: phone-in 1.3s var(--ease-out) both; }
  .js .hero-phone--center .phone-enter { animation-delay: .18s; }
  .js .hero-phone--left .phone-enter { animation-delay: .4s; }
  .js .hero-phone--right .phone-enter { animation-delay: .5s; }

  /* Comparsa allo scroll (classe .js-ready messa da js/main.js) */
  .js-ready .reveal {
    opacity: 0;
    transform: translate3d(0, 32px, 0);
    transition:
      opacity .9s var(--ease-out) var(--d, 0ms),
      transform 1s var(--ease-out) var(--d, 0ms);
  }
  .js-ready .reveal.is-visible { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .hero-phone, .community__phone { transform: none !important; }
}

/* Testo a gradiente: ripiego dove non è supportato e in modalità a contrasto elevato */
@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
  .eyebrow, .grad-text { background: none; color: var(--accent); }
  .w--accent { background: none; color: #d9b8ff; }
}
@media (forced-colors: active) {
  .eyebrow, .grad-text, .w--accent { background: none; color: CanvasText; }
  .btn { border: 2px solid ButtonText; }
}

/* Stampa e «Salva come PDF»: tutto visibile, niente parti fisse né telefono dello scrollytelling */
@media print {
  .js .site-header { position: static; }
  .js-ready .reveal,
  .js-ready .step__text,
  .js-ready .statement__title,
  .js-ready .statement__body,
  .js-ready .statement .w { opacity: 1 !important; transform: none !important; }
  .js-ready .statement__track { height: auto; }
  .js-ready .statement__pin { position: static; height: auto; padding-block: 48px; }
  .js-ready .scrolly { display: block; }
  .scrolly__stage { display: none !important; }
}

/* ==========================================================================
   Pagine legali: privacy.html, terms.html, en/privacy.html, en/terms.html
   Tutti i selettori usano classi che esistono solo in queste pagine: .legal-page (sul <body>),
   .legal (l'<article>) e .legal__*. La home non le ha e non cambia.
   - Colonna di lettura da 720 px, tipografia e token della home (tema chiaro e scuro).
   - La tabella scorre da sola in orizzontale sui telefoni, la pagina no.
   - Nessuna animazione.
   ========================================================================== */

.legal__col { max-width: calc(720px + var(--gutter) * 2); }

.legal__head {
  padding-block: 40px 0;
  background: var(--hero-bg);
}
/* Con JavaScript l'header è fisso (position: fixed): il titolo parte sotto */
.js .legal__head { padding-top: calc(var(--header-h) + 48px); }

.legal__title {
  font-size: clamp(36px, 2.2vw + 26px, 56px);
  line-height: 1.06;
  font-weight: 800;
  letter-spacing: -.035em;
  text-wrap: balance;
  overflow-wrap: break-word;
}
.legal__meta {
  margin-top: 14px;
  padding-bottom: clamp(28px, 4vw, 40px);
  border-bottom: 1px solid var(--border);
  font-size: 15px;
  color: var(--text-3);
}

.legal__body {
  padding-block: clamp(32px, 4vw, 44px) clamp(80px, 9vw, 128px);
  line-height: 1.65;
  overflow-wrap: break-word;
}
.legal__body h2 {
  margin-top: 56px;
  font-size: clamp(24px, .7vw + 19px, 30px);
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -.022em;
  text-wrap: balance;
}
.legal__body h3 {
  margin-top: 36px;
  font-size: clamp(19px, .3vw + 17px, 21px);
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: -.012em;
}
.legal__body p { margin-top: 14px; }
.legal__body p,
.legal__body li { color: var(--text-2); text-wrap: pretty; }
.legal__body strong { font-weight: 700; color: var(--text); }
.legal__body ul { margin-top: 12px; padding-left: 1.3em; list-style: disc; }
.legal__body li + li { margin-top: 8px; }
.legal__body li > ul { margin-top: 8px; list-style: circle; }
.legal__body li::marker { color: var(--accent); }
.legal__body a { color: var(--link); text-decoration-thickness: 1px; overflow-wrap: anywhere; }
.legal__body a:hover { text-decoration-thickness: 2px; }
.legal__body hr { margin: 56px 0 0; border: 0; border-top: 1px solid var(--border); }
.legal__body hr + p { margin-top: 24px; }
/* Dopo le regole dei titoli, così vince sul margine del primo h2 */
.legal__body > :first-child { margin-top: 0; }

/* Ancore (#elimina-account) e titoli: l'html ha già scroll-padding-top (altezza dell'header + 16 px);
   questo margine si somma, così il titolo raggiunto da un link non finisce sotto l'intestazione fissa. */
.legal h2,
.legal h3,
.legal [id] { scroll-margin-top: 12px; }
/* L'ancora (#elimina-account, link di Google Play) si raggiunge subito, senza animazione: con lo
   scroll-behavior: smooth della home la pagina scorrerebbe dall'inizio (e in una scheda in secondo
   piano resta in cima). I browser senza :has() restano come prima. La home non cambia. */
html:has(> body.legal-page) { scroll-behavior: auto; }

/* Tabella: scorre in orizzontale dentro il suo riquadro (tabindex="0" la rende scorrevole anche da tastiera) */
.legal__table {
  margin-top: 18px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
}
.legal__table table {
  width: 100%;
  min-width: 28em;
  border-collapse: collapse;
  font-size: 15px;
  line-height: 1.5;
}
.legal__table th,
.legal__table td { padding: 12px 16px; text-align: left; vertical-align: top; }
.legal__table th { background: var(--surface-2); color: var(--text); font-weight: 700; }
.legal__table td { color: var(--text-2); border-top: 1px solid var(--border); }
.legal__table th + th,
.legal__table td + td { border-left: 1px solid var(--border); }

/* Stampa e «Salva come PDF»: testo nero su bianco anche col tema scuro, senza menu, bottone e piè di pagina */
@media print {
  body.legal-page {
    --text: #000;
    --text-2: #1a1a1a;
    --text-3: #444;
    --link: #000;
    --accent: #000;
    --border: #bbb;
    --surface: #fff;
    --surface-2: #eee;
    background: #fff;
    color: #000;
    font-size: 12pt;
  }
  .legal-page .site-header::before,
  .legal-page .header__actions,
  .legal-page .nav,
  .legal-page .skip-link,
  .legal-page .site-footer { display: none !important; }
  .legal__head,
  .js .legal__head { padding-top: 16px; background: none; }
  .legal__body { padding-bottom: 0; }
  .legal__body h2,
  .legal__body h3 { break-after: avoid; }
  .legal__body li,
  .legal__table tr { break-inside: avoid; }
  .legal__table { overflow: visible; }
  .legal__table table { min-width: 0; }
}
