/* Campanella — sito di presentazione.
   Fraunces: istanza "soft" (SOFT 100, WONK 0 fissati nel file, restano gli assi opsz e wght).
   Identità "Pergamena & Campana": le due palette sono quelle dell'app
   (app/src/theme.ts, LIGHT e DARK), qui chiamate Giorno e Notte.
   Tutti i colori passano da custom property definite con light-dark():
   cambiare tema = cambiare `color-scheme` sull'elemento <html>. */

@font-face {
  font-family: "Fraunces";
  src: url("../assets/fonts/fraunces-soft.woff2") format("woff2");
  font-weight: 300 800; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Nunito";
  src: url("../assets/fonts/nunito-latin.woff2") format("woff2");
  font-weight: 300 900; font-style: normal; font-display: swap;
}

@property --island { syntax: "<color>"; inherits: true; initial-value: #0a0e16; }
@property --island-deep { syntax: "<color>"; inherits: true; initial-value: #070a10; }

:root {
  color-scheme: light dark;

  /* Superfici e testo */
  --bg:        light-dark(#faf4e8, #0a0e16);
  --bg-alt:    light-dark(#f4ebd6, #121722);
  --surface:   light-dark(#fffdf8, #1b2231);
  --surface-2: light-dark(#f1e7cf, #141a27);
  --ink:       light-dark(#3a3016, #f6f1e4);
  --text:      light-dark(#4e4326, #ddd6c3);
  --muted:     light-dark(#6f6248, #a49c86);

  /* Linee: --line è solo decorativa, --line-strong delimita i controlli (>= 3:1) */
  --line:        light-dark(#e1d2b0, #2a3346);
  --line-strong: light-dark(#8c7c55, #6b7690);

  /* Oro: --gold per grafica, --gold-ink per testo (>= 4.5:1 sul proprio sfondo) */
  --gold:      light-dark(#b0872f, #e6bb66);
  --gold-ink:  light-dark(#76571a, #e6bb66);
  --gold-soft: light-dark(#f3e7c8, #241d10);

  /* Azione e link: verde bosco di giorno (come nell'app), oro di notte */
  --action:       light-dark(#2f6537, #e6bb66);
  --action-hover: light-dark(#255029, #f2cd82);
  --on-action:    light-dark(#ffffff, #0a0e16);
  --link:         light-dark(#2f6537, #8fe0a0);
  --good:         light-dark(#2d6f46, #67d98a);
  --focus:        light-dark(#2f6537, #e6bb66);

  /* Isole scure (Video, Sicurezza, Contatti, Footer) */
  --island:     light-dark(#0a0e16, #161b26);
  --island-deep: light-dark(#070a10, #0a0e16);

  --shadow-sm: light-dark(0 1px 2px rgba(74,58,24,.10), 0 1px 2px rgba(0,0,0,.4));
  --shadow-md: light-dark(0 10px 30px -8px rgba(74,58,24,.22), 0 10px 30px -8px rgba(0,0,0,.55));
  --shadow-lg: light-dark(0 30px 70px -20px rgba(74,58,24,.35), 0 30px 70px -20px rgba(0,0,0,.7));
  --shadow-btn: light-dark(0 8px 22px -6px rgba(47,101,55,.55), 0 8px 26px -8px rgba(230,187,102,.45));

  /* Scala tipografica fluida */
  --step--1: clamp(.875rem, .85rem + .12vw, .95rem);
  --step-0:  clamp(1.0625rem, 1rem + .3vw, 1.1875rem);
  --step-1:  clamp(1.25rem, 1.12rem + .55vw, 1.55rem);
  --step-2:  clamp(1.55rem, 1.25rem + 1.3vw, 2.25rem);
  --step-3:  clamp(2rem, 1.4rem + 2.6vw, 3.4rem);
  --step-5:  clamp(2.55rem, .9rem + 4.9vw, 5.25rem);

  --space-section: clamp(72px, 9vw, 128px);
  --maxw: 1280px;
  --radius: 18px;
  --radius-lg: 28px;
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"]  { color-scheme: dark; }

/* Browser senza light-dark(): resta il tema Giorno, mai una pagina senza colori. */
@supports not (color: light-dark(#000, #fff)) {
  :root {
    --bg:#faf4e8; --bg-alt:#f4ebd6; --surface:#fffdf8; --surface-2:#f1e7cf; --ink:#3a3016; --text:#4e4326; --muted:#6f6248;
    --line:#e1d2b0; --line-strong:#8c7c55; --gold:#b0872f; --gold-ink:#76571a; --gold-soft:#f3e7c8;
    --action:#2f6537; --action-hover:#255029; --on-action:#fff; --link:#2f6537; --good:#2d6f46; --focus:#2f6537;
    --island:#0a0e16; --island-deep:#070a10;
    --shadow-sm:0 1px 2px rgba(74,58,24,.1); --shadow-md:0 10px 30px -8px rgba(74,58,24,.22);
    --shadow-lg:0 30px 70px -20px rgba(74,58,24,.35); --shadow-btn:0 8px 22px -6px rgba(47,101,55,.55);
  }
}

/* Le isole scure ridefiniscono i token: ogni componente al loro interno resta identico. */
.island {
  color-scheme: dark;
  --bg: var(--island);
  --bg-alt: #121722;
  --surface: rgba(255,255,255,.05);
  --surface-2: rgba(255,255,255,.08);
  --ink: #f6f1e4;
  --text: #ddd6c3;
  --muted: #b3ab94;
  --line: rgba(246,241,228,.14);
  --line-strong: rgba(246,241,228,.5);
  --gold: #e6bb66;
  --gold-ink: #e6bb66;
  --action: #e6bb66;
  --action-hover: #f2cd82;
  --on-action: #0a0e16;
  --link: #8fe0a0;
  --focus: #e6bb66;
  background: var(--island);
  color: var(--text);
}

/* ── Base ─────────────────────────────────────────────────────────────── */
* { box-sizing: border-box; }
html {
  scroll-behavior: smooth; scroll-padding-top: 88px;
  -webkit-text-size-adjust: 100%; text-size-adjust: 100%;
}
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: var(--step-0); line-height: 1.65;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 {
  font-family: "Fraunces", "Iowan Old Style", Georgia, serif;
  font-weight: 560;
  color: var(--ink); letter-spacing: -.015em; line-height: 1.1;
  margin: 0; text-wrap: balance;
}
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); line-height: 1.2; }
p { margin: 0 0 1em; text-wrap: pretty; }
a { color: var(--link); text-underline-offset: .2em; text-decoration-thickness: .08em; }
a:hover { text-decoration-thickness: .15em; }
img, svg, video { max-width: 100%; display: block; }
svg.i { fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
ul { margin: 0; padding: 0; list-style: none; }
.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: clamp(20px, 4vw, 40px); }
.section { padding-block: var(--space-section); }
.alt { background: var(--bg-alt); }
.tabular { font-variant-numeric: tabular-nums; }
.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;
}
.lede { font-size: var(--step-1); line-height: 1.5; color: var(--text); max-width: 46ch; }
.section-head { max-width: 46rem; margin-bottom: clamp(36px, 5vw, 64px); }
.section-head p { color: var(--muted); font-size: var(--step-0); max-width: 54ch; margin: 18px 0 0; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center p { margin-inline: auto; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.skip {
  position: absolute; left: 16px; top: -64px; z-index: 100; padding: 12px 18px; border-radius: 12px;
  background: var(--ink); color: var(--bg); font-weight: 800; text-decoration: none; transition: top .2s;
}
.skip:focus { top: 12px; }

/* Rivelazione allo scroll: attiva solo con JavaScript, mai nasconde contenuti senza. */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); }
.js .reveal.in, .reveal-fallback .reveal { opacity: 1; transform: none; }

/* Transizione di tema: il nuovo aspetto si apre come un cerchio dal pulsante premuto. */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-old(root) { z-index: 1; }
::view-transition-new(root) { z-index: 2; }

/* ── Header ───────────────────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in oklab, var(--bg) 84%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .3s, box-shadow .3s;
}
.site-header.scrolled { border-bottom-color: var(--line); box-shadow: var(--shadow-sm); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: 76px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand img { width: 40px; height: 40px; border-radius: 12px; box-shadow: var(--shadow-sm); transform-origin: 50% 12%; }
.brand span { font-family: "Fraunces", Georgia, serif; font-weight: 640; font-size: 1.4rem; letter-spacing: -.01em; }
.brand.ring img { animation: bell-swing .9s ease-in-out 1; }
@keyframes bell-swing {
  0%, 100% { transform: rotate(0); } 18% { transform: rotate(16deg); } 36% { transform: rotate(-13deg); }
  54% { transform: rotate(8deg); } 72% { transform: rotate(-4deg); }
}
.main-nav { display: flex; align-items: center; gap: clamp(18px, 2.4vw, 34px); }
.main-nav a {
  position: relative; color: var(--text); text-decoration: none; font-weight: 700; font-size: .95rem; padding-block: 8px;
}
.main-nav a::after {
  content: ""; position: absolute; inset: auto 0 2px 0; height: 2px; background: var(--gold);
  transform: scaleX(0); transform-origin: left; transition: transform .25s ease;
}
.main-nav a:hover { color: var(--ink); }
.main-nav a:hover::after, .main-nav a[aria-current="true"]::after { transform: scaleX(1); }
.main-nav a[aria-current="true"] { color: var(--ink); }
.header-actions { display: flex; align-items: center; gap: 12px; }

.theme-switch {
  display: inline-flex; padding: 3px; gap: 2px; border: 1.5px solid var(--line-strong);
  border-radius: 999px; background: var(--surface);
}
.theme-switch button {
  display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 0 13px; border: 0; border-radius: 999px;
  background: transparent; color: var(--text); font: 800 .875rem/1 "Nunito", sans-serif; cursor: pointer;
  transition: background-color .2s, color .2s;
}
.theme-switch button:hover { background: color-mix(in oklab, var(--ink) 9%, transparent); }
.theme-switch button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.theme-switch svg { width: 17px; height: 17px; flex: none; }
.nojs-hide { display: none; }
.js .nojs-hide { display: inline-flex; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  min-height: 46px; padding: .65em 1.45em; border-radius: 999px; border: 1.5px solid transparent;
  font: 800 1rem/1.15 "Nunito", sans-serif; text-decoration: none; cursor: pointer; text-align: center;
  transition: background-color .2s, color .2s, border-color .2s, transform .2s, box-shadow .2s;
}
.btn svg { width: 1.15em; height: 1.15em; flex: none; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: none; }
.btn-solid { background: var(--action); color: var(--on-action); box-shadow: var(--shadow-btn); }
.btn-solid:hover { background: var(--action-hover); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { background: color-mix(in oklab, var(--ink) 9%, transparent); }
.btn-lg { min-height: 58px; padding-inline: 2em; font-size: 1.0625rem; }

.nav-toggle {
  display: none; width: 46px; height: 46px; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  padding: 0; border-radius: 14px; border: 1.5px solid var(--line-strong); background: var(--surface); cursor: pointer; flex: none;
}
.nav-toggle span { width: 20px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .25s, opacity .2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.mobile-nav {
  display: none; flex-direction: column; padding: 8px clamp(20px, 4vw, 40px) 24px;
  border-top: 1px solid var(--line); background: var(--bg);
}
.mobile-nav.open { display: flex; }
.mobile-nav a:not(.btn) {
  padding: 15px 2px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 1.125rem;
  border-bottom: 1px solid var(--line);
}
.mobile-nav .btn { margin-top: 18px; }

/* ── Telefoni con schermate reali ─────────────────────────────────────── */
.phone {
  --pw: 300px; position: relative; width: var(--pw); margin: 0;
  padding: calc(var(--pw) * .03); border-radius: calc(var(--pw) * .135);
  background: linear-gradient(150deg, #3b4254, #161b26 52%, #0b0e15);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.18), inset 0 1px 0 rgba(255,255,255,.14), var(--shadow-lg);
}
.phone img, .phone video {
  width: 100%; height: auto; aspect-ratio: 1080 / 2094; object-fit: cover;
  border-radius: calc(var(--pw) * .105); background: #10141d;
}

/* ── Hero ─────────────────────────────────────────────────────────────── */
.hero { position: relative; overflow: clip; padding-block: clamp(32px, 4.5vw, 64px) clamp(56px, 7vw, 104px); isolation: isolate; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background:
    radial-gradient(52% 46% at 82% 38%, light-dark(rgba(176,135,47,.26), rgba(230,187,102,.14)), transparent 72%),
    radial-gradient(40% 36% at 6% 92%, light-dark(rgba(47,101,55,.10), rgba(95,216,115,.06)), transparent 70%);
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .5; pointer-events: none;
  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='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .3 0 0 0 0 .22 0 0 0 0 .08 0 0 0 .06 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}
:root[data-theme="dark"] .hero::after { opacity: 0; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr); gap: clamp(32px, 4.5vw, 72px); align-items: center; }
.hero-kicker { font-weight: 800; font-size: var(--step--1); color: var(--gold-ink); margin: 0 0 22px; display: flex; align-items: center; gap: 12px; }
.hero-kicker::before { content: ""; width: 34px; height: 2px; background: var(--gold); border-radius: 2px; }
.hero h1 { font-size: clamp(2.5rem, .9rem + 4.7vw, 4.9rem); font-weight: 580; line-height: 1.02; letter-spacing: -.028em; margin-bottom: clamp(22px, 3vw, 34px); max-width: 13ch; }
.hero h1 .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .14em; margin-bottom: -.14em; }
.hero h1 .w > span { display: inline-block; }
.hero .lede { font-size: clamp(1.125rem, 1.02rem + .5vw, 1.375rem); max-width: 44ch; margin-bottom: 32px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 30px; }
.hero-proof { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 28px; max-width: 34rem; font-size: var(--step--1); font-weight: 700; color: var(--text); }
.hero-proof li { display: flex; gap: 10px; align-items: flex-start; line-height: 1.4; }
.hero-proof svg { width: 18px; height: 18px; color: var(--good); flex: none; margin-top: 1px; }

.hero-visual { width: 100%; max-width: 620px; margin-inline: auto; }
.hero-stage { position: relative; container-type: inline-size; aspect-ratio: 1 / 1.12; width: 100%; }
.hero-stage .phone { position: absolute; }
.hero-stage .phone-front { --pw: 52cqw; right: 0; top: 0; z-index: 2; }
.hero-stage .phone-back { --pw: 45cqw; left: 0; top: 19%; z-index: 1; }
.hero-caption {
  display: flex; align-items: center; justify-content: center; gap: 10px 16px; flex-wrap: wrap; margin-top: 8px;
  text-align: center; font-size: var(--step--1); font-weight: 700; color: var(--muted);
}

/* Entrata del hero: una sola sequenza, poi quiete. */
.hero h1 .w:nth-child(1) { --i: 0; }
.hero h1 .w:nth-child(2) { --i: 1; }
.hero h1 .w:nth-child(3) { --i: 2; }
.hero h1 .w:nth-child(4) { --i: 3; }
.hero h1 .w:nth-child(5) { --i: 4; }
.hero h1 .w:nth-child(6) { --i: 5; }
.hero h1 .w:nth-child(7) { --i: 6; }
.hero h1 .w:nth-child(8) { --i: 7; }
.hero h1 .w:nth-child(9) { --i: 8; }
.js .hero h1 .w > span { transform: translateY(105%); }
.js .hero-kicker, .js .hero .lede, .js .hero-actions, .js .hero-proof { opacity: 0; transform: translateY(14px); }
.js .hero-stage .phone { opacity: 0; transform: translateY(46px) scale(.97); }
.js .hero-caption { opacity: 0; }
.is-loaded .hero h1 .w > span { transform: none; transition: transform .85s cubic-bezier(.2,.8,.2,1); transition-delay: calc(var(--i) * 55ms + 40ms); }
.is-loaded .hero-kicker, .is-loaded .hero .lede, .is-loaded .hero-actions, .is-loaded .hero-proof {
  opacity: 1; transform: none; transition: opacity .8s ease, transform .8s cubic-bezier(.2,.8,.2,1);
}
.is-loaded .hero-kicker { transition-delay: 0s; }
.is-loaded .hero .lede { transition-delay: .5s; }
.is-loaded .hero-actions { transition-delay: .6s; }
.is-loaded .hero-proof { transition-delay: .7s; }
.is-loaded .hero-stage .phone { opacity: 1; transform: none; transition: opacity 1s ease, transform 1.1s cubic-bezier(.2,.8,.2,1); }
.is-loaded .hero-stage .phone-back { transition-delay: .25s; }
.is-loaded .hero-stage .phone-front { transition-delay: .4s; }
.is-loaded .hero-caption { opacity: 1; transition: opacity .8s ease 1s; }
@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) {
    .hero-stage .phone-front { animation: drift-up linear both; animation-timeline: scroll(root); animation-range: 0 60vh; }
    .hero-stage .phone-back { animation: drift-down linear both; animation-timeline: scroll(root); animation-range: 0 60vh; }
  }
}
@keyframes drift-up { to { translate: 0 -26px; } }
@keyframes drift-down { to { translate: 0 22px; } }

/* ── Video (isola scura) ──────────────────────────────────────────────── */
.video { position: relative; overflow: clip; isolation: isolate; }
.video::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(46% 62% at 22% 50%, rgba(230,187,102,.17), transparent 70%);
}
.video-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(36px, 6vw, 96px); align-items: center; }
.video-stage { order: -1; display: flex; justify-content: center; }
.video-frame { --pw: min(340px, 78vw); }
.video-frame video { aspect-ratio: 9 / 16; background: #0a0e16; cursor: pointer; }
.video-play {
  position: absolute; left: 0; right: 0; bottom: 12%; margin-inline: auto; width: 76px; height: 76px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--action); color: var(--on-action); display: grid; place-items: center;
  box-shadow: 0 14px 40px -8px rgba(0,0,0,.6); transition: transform .25s ease, background-color .2s;
}
.video-play::before, .video-play::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--gold); opacity: 0; pointer-events: none;
}
.video-play svg { width: 30px; height: 30px; margin-left: 4px; }
.video-play:hover { transform: scale(1.07); background: var(--action-hover); }
.video-play.is-hidden { display: none; }
.video-play:not(.is-hidden)::before { animation: ring-out 2.8s ease-out infinite; }
.video-play:not(.is-hidden)::after { animation: ring-out 2.8s ease-out 1.4s infinite; }
@keyframes ring-out { 0% { transform: scale(1); opacity: .65; } 100% { transform: scale(1.9); opacity: 0; } }
.video-copy h2 { margin-bottom: 20px; }
.video-copy .lede { color: var(--text); margin-bottom: 26px; }
.video-list { display: grid; gap: 10px; margin: 0 0 34px; max-width: 34rem; }
.video-list li { display: flex; gap: 12px; align-items: baseline; font-weight: 700; color: var(--ink); }
.video-list li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); flex: none; transform: translateY(-1px); }
.video-note { font-size: var(--step--1); color: var(--muted); margin: 18px 0 0; }

/* ── Problema ─────────────────────────────────────────────────────────── */
.problem-grid { display: grid; grid-template-columns: 1fr 1fr; column-gap: clamp(32px, 6vw, 96px); row-gap: clamp(32px, 4vw, 52px); }
.problem-item { border-top: 1.5px solid var(--line-strong); padding-top: 24px; }
.problem-item svg { width: 30px; height: 30px; color: var(--gold-ink); margin-bottom: 18px; stroke-width: 1.7; }
.problem-item h3 { margin-bottom: 10px; }
.problem-item p { color: var(--muted); margin: 0; max-width: 40ch; }

/* ── Tour delle funzioni ──────────────────────────────────────────────── */
.tour-tabs { display: none; gap: 8px; overflow-x: auto; padding: 4px 4px 14px; margin: 0 -4px 14px; scrollbar-width: thin; }
.js .tour-tabs { display: flex; }
.tour-tabs button {
  flex: none; min-height: 46px; padding: 0 20px; border-radius: 999px; border: 1.5px solid var(--line-strong);
  background: transparent; color: var(--text); font: 800 .975rem/1 "Nunito", sans-serif; cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s;
}
.tour-tabs button:hover { background: color-mix(in oklab, var(--ink) 8%, transparent); }
.tour-tabs button[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.tour-stage {
  position: relative; overflow: clip; border-radius: var(--radius-lg); background: var(--surface);
  border: 1px solid var(--line); box-shadow: var(--shadow-md); isolation: isolate;
}
.tour-stage::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(44% 70% at 78% 40%, light-dark(rgba(176,135,47,.20), rgba(230,187,102,.10)), transparent 72%);
}
.tour-panel { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 72px); align-items: center; padding: clamp(28px, 5vw, 64px); }
.js .tour-panel:not(.is-active) { display: none; }
.js .tour-panel.is-active { animation: panel-in .55s cubic-bezier(.2,.8,.2,1) both; }
@keyframes panel-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.tour-copy h3 { font-size: var(--step-2); margin-bottom: 18px; }
.tour-copy > p { color: var(--text); max-width: 44ch; margin-bottom: 24px; }
.ticks { display: grid; gap: 12px; }
.ticks li { display: flex; gap: 12px; align-items: flex-start; font-size: 1rem; line-height: 1.5; max-width: 46ch; }
.ticks svg { width: 20px; height: 20px; color: var(--good); flex: none; margin-top: 2px; }
.tour-shot { display: flex; justify-content: center; align-items: flex-end; gap: 0; min-height: 0; }
.tour-shot .phone { --pw: min(300px, 62vw); }
.tour-shot.duo .phone:first-child { --pw: min(264px, 48vw); margin-right: calc(-1 * min(44px, 6vw)); margin-bottom: 0; z-index: 1; }
.tour-shot.duo .phone:last-child { --pw: min(264px, 48vw); margin-bottom: 38px; }
.phone img.only-light, .phone img.only-dark { display: none; }
:root[data-theme="light"] .phone img.only-light, :root:not([data-theme]) .phone img.only-light { display: block; }
:root[data-theme="dark"] .phone img.only-dark { display: block; }
.tour-note { margin: 22px 0 0; font-size: var(--step--1); color: var(--muted); text-align: center; }
.tour-panel + .tour-panel { border-top: 1px solid var(--line); }
.js .tour-panel + .tour-panel { border-top: 0; }

.day { margin-top: clamp(56px, 7vw, 96px); }
.day h3 { font-size: var(--step-2); margin-bottom: 30px; max-width: 24ch; }
.day-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-top: 1.5px solid var(--line-strong); }
.day-item { padding: 26px 26px 6px 0; }
.day-item + .day-item { padding-left: 26px; border-left: 1px solid var(--line); }
.day-item svg { width: 28px; height: 28px; color: var(--gold-ink); margin-bottom: 14px; }
.day-item h4 { font-size: 1.25rem; margin-bottom: 8px; }
.day-item p { color: var(--muted); font-size: 1rem; margin: 0; }

/* ── Sicurezza (isola scura) ──────────────────────────────────────────── */
.trust { position: relative; overflow: clip; isolation: isolate; }
.trust::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(40% 50% at 100% 0%, rgba(230,187,102,.12), transparent 70%); }
.trust-grid { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.trust-head { position: sticky; top: 112px; }
.trust-head p { margin-top: 20px; color: var(--muted); max-width: 36ch; }
.trust-list { display: grid; grid-template-columns: 1fr 1fr; column-gap: 40px; }
.trust-list li { padding: 26px 0 30px; border-top: 1px solid var(--line); }
.trust-list h3 { font-size: 1.3rem; margin-bottom: 10px; color: var(--ink); }
.trust-list p { margin: 0; color: var(--muted); font-size: 1rem; }

/* ── Confronto ────────────────────────────────────────────────────────── */
.compare { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 1rem; line-height: 1.55; }
.compare th, .compare td { text-align: left; vertical-align: top; padding: 26px 28px; }
.compare thead th { font-family: "Fraunces", Georgia, serif; font-weight: 580; font-size: var(--step-1); color: var(--ink); padding-bottom: 20px; }
.compare thead th.us { color: var(--ink); }
.compare tbody th { font-weight: 800; color: var(--ink); width: 17%; border-top: 1px solid var(--line); }
.compare td { border-top: 1px solid var(--line); color: var(--muted); width: 33%; }
.compare td.us { color: var(--ink); background: var(--gold-soft); border-top-color: color-mix(in oklab, var(--gold) 40%, transparent); }
.compare thead th.us { background: var(--gold-soft); border-radius: var(--radius) var(--radius) 0 0; }
.compare tbody tr:last-child td.us { border-radius: 0 0 var(--radius) var(--radius); }
.compare td.us b { font-weight: 800; }
.honest { margin-top: clamp(36px, 5vw, 56px); display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: start; max-width: 62rem; padding-left: 4px; }
.honest svg { width: 30px; height: 30px; color: var(--gold-ink); margin-top: 4px; }
.honest p { margin: 0; font-size: 1.0625rem; color: var(--text); }
.honest strong { color: var(--ink); }

/* ── Progetto vivo e pilota ───────────────────────────────────────────── */
.grow-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.grow-list { display: grid; gap: 0; margin-top: 8px; }
.grow-list li { padding: 22px 0; border-top: 1px solid var(--line); }
.grow-list li:last-child { border-bottom: 1px solid var(--line); }
.grow-list h3 { font-size: 1.25rem; margin-bottom: 6px; }
.grow-list p { margin: 0; color: var(--muted); }
.pilot {
  margin-top: 32px; padding: clamp(24px, 3vw, 36px); border-radius: var(--radius-lg);
  background: var(--gold-soft); border: 1.5px solid color-mix(in oklab, var(--gold) 55%, transparent);
}
.pilot h3 { font-size: var(--step-2); margin-bottom: 12px; }
.pilot p { color: var(--text); margin-bottom: 22px; max-width: 46ch; }

/* ── Prezzi ───────────────────────────────────────────────────────────── */
.pricing-note { max-width: 46rem; margin: 0 0 clamp(32px, 4vw, 48px); color: var(--muted); font-size: 1.0625rem; }
.pricing-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; align-items: stretch; }
.plan {
  position: relative; display: flex; flex-direction: column; padding: 30px 26px 28px; border-radius: var(--radius-lg);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
}
.plan h3 { font-size: 1.5rem; margin-bottom: 4px; }
.plan .plan-for { color: var(--muted); font-size: .975rem; margin: 0 0 22px; min-height: 3em; }
.plan .price { display: flex; align-items: baseline; white-space: nowrap; font-family: "Fraunces", Georgia, serif; font-weight: 560; font-size: clamp(2rem, 1.7rem + .8vw, 2.5rem); line-height: 1; color: var(--ink); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.plan .price .from { font-family: "Nunito", sans-serif; font-weight: 700; font-size: 1rem; color: var(--muted); letter-spacing: 0; margin-right: 6px; }
.plan .price small { font-family: "Nunito", sans-serif; font-weight: 700; font-size: 1rem; color: var(--muted); letter-spacing: 0; margin-left: 4px; }
.plan .price-setup { font-size: .875rem; color: var(--muted); margin: 10px 0 0; font-style: italic; line-height: 1.45; }
.plan ul { display: grid; align-content: start; gap: 11px; margin: 24px 0 28px; flex: 1; }
.plan li { display: flex; gap: 10px; align-items: flex-start; font-size: .975rem; line-height: 1.45; }
.plan li svg { width: 18px; height: 18px; color: var(--good); flex: none; margin-top: 2px; }
.plan .btn { width: 100%; }
.plan-more { display: block; text-align: center; font-weight: 800; font-size: .925rem; margin-top: 16px; }
.plan.featured { color-scheme: dark; background: var(--island); border-color: var(--gold); box-shadow: var(--shadow-lg); --ink: #f6f1e4; --text: #ddd6c3; --muted: #b3ab94; --good: #67d98a; --action: #e6bb66; --action-hover: #f2cd82; --on-action: #0a0e16; --line-strong: rgba(246,241,228,.5); --focus: #e6bb66; color: #ddd6c3; }
.plan.featured::before {
  content: "Consigliato"; position: absolute; top: -14px; left: 26px; padding: 4px 14px; border-radius: 999px;
  background: #e6bb66; color: #0a0e16; font-weight: 800; font-size: .8125rem;
}
.alt-models { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(32px, 6vw, 96px); margin-top: clamp(40px, 5vw, 64px); border-top: 1.5px solid var(--line-strong); }
.alt-models > div { padding: 26px 0; }
.alt-models h3 { font-size: 1.25rem; margin-bottom: 8px; }
.alt-models p { margin: 0; color: var(--muted); max-width: 48ch; }

/* ── Domande frequenti ────────────────────────────────────────────────── */
.faq-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.faq-head { position: sticky; top: 112px; }
.faq-head p { margin-top: 18px; color: var(--muted); max-width: 32ch; }
.faq-list details { border-top: 1px solid var(--line-strong); }
.faq-list details:last-child { border-bottom: 1px solid var(--line-strong); }
.faq-list summary {
  display: flex; align-items: center; justify-content: space-between; gap: 20px; cursor: pointer; list-style: none;
  padding: 22px 4px; font-family: "Fraunces", Georgia, serif; font-weight: 560; font-size: var(--step-1);
  line-height: 1.25; color: var(--ink);
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: ""; flex: none; width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--line-strong);
  background:
    linear-gradient(var(--ink), var(--ink)) center / 11px 1.8px no-repeat,
    linear-gradient(var(--ink), var(--ink)) center / 1.8px 11px no-repeat;
  transition: transform .3s ease, background-color .2s;
}
.faq-list details[open] summary::after { transform: rotate(135deg); }
.faq-list summary:hover::after { background-color: color-mix(in oklab, var(--ink) 9%, transparent); }
.faq-body { padding: 0 4px 26px; color: var(--text); max-width: 60ch; }
.faq-body p:last-child { margin-bottom: 0; }
.js .faq-list details[open] .faq-body { animation: panel-in .4s ease both; }

/* ── Contatti (isola scura) ───────────────────────────────────────────── */
.cta { position: relative; overflow: clip; isolation: isolate; text-align: center; }
.cta::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(46% 60% at 50% 18%, rgba(230,187,102,.22), transparent 70%);
}
.cta-bell { position: relative; width: 132px; height: 132px; margin: 0 auto 28px; display: grid; place-items: center; }
.cta-bell img { position: relative; width: 112px; height: 112px; transform-origin: 50% 12%; z-index: 1; }
.cta-bell .arc { position: absolute; inset: 0; border-radius: 50%; border: 1.5px solid var(--gold); opacity: 0; }
.cta-bell.ringing img { animation: bell-swing 1.4s ease-in-out 2; }
.cta-bell.ringing .arc { animation: ring-out 2.4s ease-out 2; }
.cta-bell.ringing .arc:nth-child(2) { animation-delay: .35s; }
.cta-bell.ringing .arc:nth-child(3) { animation-delay: .7s; }
.cta h2 { font-size: var(--step-3); max-width: 18ch; margin: 0 auto 20px; }
.cta .lede { margin: 0 auto 36px; color: var(--text); }
.cta-actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-bottom: 30px; }
.cta-mail { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; justify-content: center; color: var(--muted); font-weight: 700; }
.cta-mail a { color: var(--ink); font-size: 1.125rem; }
.copy-btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px; border-radius: 999px;
  border: 1.5px solid var(--line-strong); background: transparent; color: var(--ink); font: 800 .875rem/1 "Nunito", sans-serif; cursor: pointer;
  transition: background-color .2s;
}
.copy-btn:hover { background: color-mix(in oklab, var(--ink) 10%, transparent); }
.copy-btn svg { width: 16px; height: 16px; }

/* ── Footer ───────────────────────────────────────────────────────────── */
.site-footer { background: var(--island-deep); color: #b3ab94; padding-block: 44px; color-scheme: dark; }
.site-footer .wrap { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px 32px; }
.site-footer .brand { color: #f6f1e4; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.site-footer a { color: #e6bb66; font-weight: 700; }
.site-footer .legal-line { flex-basis: 100%; margin: 0; font-size: .875rem; }

/* ── Pagine legali ────────────────────────────────────────────────────── */
.legal-hero { padding-block: clamp(44px, 6vw, 80px) clamp(28px, 4vw, 48px); border-bottom: 1px solid var(--line); background: linear-gradient(180deg, var(--bg-alt), var(--bg) 85%); }
.legal-hero .wrap { max-width: 800px; }
.legal-hero .eyebrow { display: block; font-weight: 800; font-size: var(--step--1); color: var(--gold-ink); margin-bottom: 12px; }
.legal-hero h1 { font-size: var(--step-3); margin-bottom: 16px; }
.legal-hero .lede { max-width: 62ch; font-size: 1.1875rem; }
.legal-updated { display: inline-block; margin-top: 18px; font-size: .875rem; font-weight: 700; color: var(--muted); }
.legal-body { padding-block: clamp(40px, 5vw, 72px) clamp(64px, 8vw, 112px); }
.legal-body .wrap { max-width: 800px; display: flex; flex-direction: column; gap: 32px; }
.legal-intro { font-size: 1.125rem; color: var(--text); }
.legal-section h2 { font-size: 1.45rem; margin-bottom: 10px; }
.legal-section p, .legal-section li { font-size: 1.0625rem; color: var(--text); line-height: 1.7; }
.legal-section ul { margin: 8px 0 0; padding-left: 22px; list-style: disc; }
.legal-section li { margin-bottom: 6px; }
.legal-note { background: var(--gold-soft); border: 1px solid color-mix(in oklab, var(--gold) 50%, transparent); border-radius: var(--radius); padding: 22px 24px; font-size: 1rem; color: var(--text); line-height: 1.65; }
.legal-note ul { padding-left: 22px; list-style: disc; margin: 8px 0 0; }
.legal-note strong { color: var(--ink); }
.legal-disclaimer { background: var(--surface-2); border: 1px dashed var(--line-strong); border-radius: var(--radius); padding: 22px 24px; font-size: .975rem; color: var(--muted); line-height: 1.65; }
.legal-body table { width: 100%; border-collapse: collapse; font-size: .975rem; }
.legal-body th, .legal-body td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }

/* ── Responsivo ───────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .pricing-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .day-grid { grid-template-columns: repeat(2, 1fr); }
  .day-item:nth-child(3) { padding-left: 0; border-left: 0; }
  .day-item:nth-child(n+3) { border-top: 1px solid var(--line); margin-top: 20px; }
}
@media (max-width: 1120px) {
  .main-nav { display: none; }
  .nav-toggle { display: flex; }
}
@media (max-width: 940px) {
  .hero-grid, .video-grid, .trust-grid, .grow-grid, .faq-grid { grid-template-columns: 1fr; }
  .hero h1 { max-width: 15ch; }
  .hero-visual { margin-top: 12px; }
  .video-stage { order: 0; }
  .trust-head, .faq-head { position: static; }
  .tour-panel { grid-template-columns: 1fr; }
  .tour-shot { order: -1; }
  .problem-grid { grid-template-columns: 1fr; }
  .compare thead { display: none; }
  .compare, .compare tbody, .compare tr, .compare th, .compare td { display: block; width: 100% !important; }
  .compare tbody tr { padding: 24px 0 8px; border-top: 1.5px solid var(--line-strong); }
  .compare tbody th { border: 0; padding: 0 0 12px; font-size: 1.125rem; font-family: "Fraunces", Georgia, serif; font-weight: 580; }
  .compare td { border: 0 !important; padding: 12px 18px; border-radius: 14px !important; margin-bottom: 10px; background: var(--surface); }
  .compare td.us { background: var(--gold-soft); }
  .compare td::before { content: attr(data-label); display: block; font-weight: 800; font-size: .8125rem; color: var(--gold-ink); margin-bottom: 4px; }
  .alt-models { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .header-actions .btn-solid { display: none; }
}
@media (max-width: 640px) {
  .hero-stage { aspect-ratio: 1 / 1.14; }
  .hero-stage .phone-front { --pw: 56cqw; }
  .hero-stage .phone-back { --pw: 48cqw; top: 16%; }
  .site-header .wrap { height: 68px; }
  .brand span { font-size: 1.25rem; }
  .theme-switch button .lbl { display: none; }
  .theme-switch button { padding: 0 11px; }
  .hero-actions .btn { width: 100%; }
  .hero-proof { grid-template-columns: 1fr; }
  .pricing-grid, .trust-list, .day-grid { grid-template-columns: 1fr; }
  .day-item, .day-item + .day-item { padding: 22px 0 4px; border-left: 0; }
  .day-item + .day-item { border-top: 1px solid var(--line); margin-top: 8px; }
  .tour-shot.duo .phone:first-child { margin-right: -8vw; }
  .cta-actions .btn { width: 100%; }
}

/* ── Movimento ridotto e alto contrasto ───────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; transition-duration: .001ms !important; transition-delay: 0s !important; }
  .js .reveal, .js .hero h1 .w > span, .js .hero-kicker, .js .hero .lede, .js .hero-actions, .js .hero-proof,
  .js .hero-stage .phone, .js .hero-caption { opacity: 1; transform: none; }
}
@media (forced-colors: active) {
  .btn-solid, .theme-switch button[aria-pressed="true"], .tour-tabs button[aria-selected="true"] { border-color: CanvasText; forced-color-adjust: none; background: Highlight; color: HighlightText; }
}

/* Utilità minime */
.sprite { position: absolute; }
.lede-muted { margin-top: 20px; color: var(--muted); }
.mt-s { margin-top: 10px; }
