/* ==========================================================================
   Mindly — sito one page
   Palette e font presi dai materiali grafici di Mindly.
   Per cambiare colori: modifica solo le variabili qui sotto.
   ========================================================================== */

/* Font Outfit ospitato sul sito (licenza OFL in assets/font/): niente
   richieste a Google Fonts, quindi l'IP dei visitatori non va a Google. */
@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("assets/font/outfit.woff2") format("woff2");
}

:root {
  --viola: #6c3ff2;          /* colore principale (logo "Mindly") */
  --viola-chiaro: #8f6bff;
  --magenta: #e2329c;        /* frasi evidenziate */
  --notte: #14123b;          /* titoli */
  --testo: #3b3960;          /* testo corrente */
  --testo-soft: #6b6890;
  --lavanda: #ece8ff;
  --rosa: #fde6f4;
  --azzurro: #dfe5ff;
  --pesca: #fff1e6;
  --stella: #ffd257;
  --bianco: #ffffff;
  --bordo: rgba(108, 63, 242, 0.14);

  --raggio: 28px;
  --raggio-s: 16px;
  --ombra: 0 20px 60px -20px rgba(76, 46, 180, 0.28);
  --ombra-s: 0 8px 24px -10px rgba(76, 46, 180, 0.25);
  --max: 1160px;
  --font: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--testo);
  font-size: 18px;
  line-height: 1.6;
  background: #faf8ff;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: var(--viola); }

h1, h2, h3 {
  color: var(--notte);
  line-height: 1.1;
  margin: 0 0 0.5em;
  letter-spacing: -0.02em;
}
h1 { font-size: clamp(2.5rem, 6vw, 4.4rem); font-weight: 800; }
h2 { font-size: clamp(2rem, 4.2vw, 3.1rem); font-weight: 800; }
h3 { font-size: 1.3rem; font-weight: 700; }
p { margin: 0 0 1em; }

.evidenzia { color: var(--magenta); }
.viola { color: var(--viola); }
.punto { color: var(--magenta); }

.wrap { width: min(var(--max), 100% - 32px); margin-inline: auto; }

.sezione { padding: clamp(72px, 10vw, 120px) 0; position: relative; }
.sezione-head { text-align: center; max-width: 720px; margin: 0 auto 56px; }
.sezione-head p { color: var(--testo-soft); font-size: 1.15rem; }

.etichetta {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--viola);
  background: var(--lavanda);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
}

/* ---------- Bottoni ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font: inherit;
  font-weight: 700;
  font-size: 1.05rem;
  border: 0;
  border-radius: 999px;
  padding: 16px 30px;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn-primario {
  color: var(--bianco);
  background: linear-gradient(135deg, var(--viola) 0%, var(--viola-chiaro) 100%);
  box-shadow: 0 12px 30px -10px rgba(108, 63, 242, 0.65);
}
.btn-primario:hover { transform: translateY(-2px); box-shadow: 0 16px 36px -10px rgba(108, 63, 242, 0.75); }
.btn-secondario {
  color: var(--viola);
  background: var(--bianco);
  box-shadow: var(--ombra-s);
}
.btn-secondario:hover { transform: translateY(-2px); }
.btn:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible { outline: 3px solid var(--magenta); outline-offset: 3px; }

/* ---------- Header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 248, 255, 0.75);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}
.header.scrolled { border-bottom-color: var(--bordo); }
.header .wrap { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo img { width: 52px; height: auto; }
.logo span { font-size: 1.7rem; font-weight: 800; color: var(--viola); letter-spacing: -0.03em; }
.nav { display: flex; align-items: center; gap: 30px; }
.nav a:not(.btn) { color: var(--notte); text-decoration: none; font-weight: 500; font-size: 1rem; }
.nav a:not(.btn):hover { color: var(--viola); }
.nav .btn { padding: 11px 22px; font-size: 0.95rem; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: clamp(48px, 8vw, 96px) 0 clamp(120px, 14vw, 180px);
  /* sfondo "cielo" come nella grafica di Mindly: assets/cielo.svg */
  background: #f3dff2 url("assets/cielo.svg") center bottom / cover no-repeat;
  overflow: hidden;
}
.hero .wrap { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; position: relative; z-index: 2; }
.hero-testo p.lead { font-size: 1.3rem; color: var(--testo); max-width: 540px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin: 32px 0 20px; }
.hero-note { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 0.95rem; color: var(--testo-soft); list-style: none; padding: 0; margin: 0; }
.hero-note li::before { content: "✓"; color: var(--viola); font-weight: 800; margin-right: 6px; }

.hero-visual { position: relative; display: flex; justify-content: center; }

/* Mockup telefono: dentro c'è la schermata vera della home (assets/app/home.jpg) */
.telefono {
  width: 310px;
  border-radius: 48px;
  padding: 11px;
  background: var(--notte); /* stesso colore del titolo "Il tuo piccolo spazio" */
  box-shadow: var(--ombra), 0 0 0 2px rgba(255,255,255,0.12) inset;
  transform: rotate(-5deg);
  position: relative;
  z-index: 2;
}
.schermo {
  border-radius: 38px;
  background: #cbc8fc; /* stesso colore della parte alta della schermata */
  padding-top: 24px; /* spazio per il notch, così non copre il saluto */
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
/* notch: attaccato alla cornice (non allo schermo), così non resta nessuna linea chiara */
.telefono::after {
  content: "";
  position: absolute;
  top: 8px; left: 50%;
  width: 150px; height: 29px;
  transform: translateX(-50%);
  background: var(--notte);
  border-radius: 0 0 18px 18px;
  z-index: 3;
}
.schermata-app { display: block; width: 100%; height: auto; }
.contenuto-app {
  padding: 44px 16px 14px;
  flex: 1;
  background: linear-gradient(180deg, #ece4ff 0%, #f6e6f7 45%, #fde8ef 100%);
}
.saluto { font-size: 0.95rem; font-weight: 500; color: var(--notte); margin: 0 0 6px; }
.luna { font-size: 0.9rem; }
.domanda { font-size: 1.45rem; font-weight: 800; color: #1d1b55; text-align: center; line-height: 1.15; margin: 0 0 16px; letter-spacing: -0.01em; }
.umori { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-bottom: 16px; }
.umore { text-align: center; font-size: 0.72rem; font-weight: 600; color: #2a2860; }
.faccina {
  width: 52px; height: 52px; margin: 0 auto 6px;
  border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: 0 6px 14px -6px rgba(76, 46, 180, 0.35);
}
.card-app {
  background: rgba(255,255,255,0.78);
  border-radius: 20px;
  padding: 12px 10px;
  display: flex; gap: 8px; align-items: center;
  box-shadow: 0 8px 22px -12px rgba(76, 46, 180, 0.35);
  margin-bottom: 14px;
}
.card-app .icona-app { width: 58px; flex: none; }
.card-app strong { display: block; color: #1d1b55; font-size: 0.98rem; font-weight: 700; margin-bottom: 2px; }
.card-app small { font-size: 0.7rem; color: #4a4870; line-height: 1.3; display: block; }
.card-app .freccia {
  margin-left: auto; flex: none;
  width: 34px; height: 34px; border-radius: 50%;
  background: #9b7ff5; color: #fff;
  display: grid; place-items: center;
}
.icona-app { mix-blend-mode: multiply; }
.strumenti-mini { font-weight: 800; color: #1d1b55; font-size: 1rem; margin: 2px 0 8px; }
.riga-strumento {
  display: flex; align-items: center; gap: 12px;
  background: rgba(255,255,255,0.78);
  border-radius: 16px;
  padding: 6px 14px 6px 10px;
  font-size: 0.88rem;
  font-weight: 600;
  color: #1d1b55;
  margin-bottom: 7px;
}
.riga-strumento .icona-app { width: 40px; height: 32px; object-fit: contain; }
.riga-strumento .chevron { margin-left: auto; color: #7b5cf0; font-size: 1.3rem; font-weight: 700; line-height: 1; }
.tab-app {
  display: flex; justify-content: space-around; align-items: center;
  background: #1f2652;
  padding: 10px 8px 16px;
}
.tab { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 0.72rem; font-weight: 600; color: #c9cbe6; }
.tab svg { width: 22px; height: 22px; }
.tab.attiva { color: #33d6d0; }

.mascotte {
  position: absolute;
  width: 170px;
  left: -40px;
  bottom: -20px;
  z-index: 3;
  filter: drop-shadow(0 18px 30px rgba(108, 63, 242, 0.3));
  animation: galleggia 6s ease-in-out infinite;
}
.stella { position: absolute; color: var(--stella); z-index: 3; animation: brilla 3s ease-in-out infinite; }
.stella svg { width: 100%; height: 100%; display: block; }
.s1 { width: 42px; height: 42px; top: 4%; left: 6%; }
.s2 { width: 26px; height: 26px; top: 18%; right: 4%; animation-delay: 1s; }
.s3 { width: 32px; height: 32px; bottom: 10%; right: 0; animation-delay: 2s; }

@keyframes galleggia { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
@keyframes brilla { 0%,100% { transform: scale(1); opacity: 1; } 50% { transform: scale(0.75); opacity: 0.6; } }

/* Nuvole decorative in fondo alle sezioni */
.nuvole {
  position: absolute; left: 0; right: 0; bottom: -2px; height: 120px; z-index: 1;
  background:
    radial-gradient(120px 90px at 5% 100%, #fff 98%, transparent 100%),
    radial-gradient(160px 110px at 22% 105%, #fff 98%, transparent 100%),
    radial-gradient(140px 90px at 40% 100%, #fff 98%, transparent 100%),
    radial-gradient(180px 120px at 60% 110%, #fff 98%, transparent 100%),
    radial-gradient(140px 95px at 80% 100%, #fff 98%, transparent 100%),
    radial-gradient(150px 110px at 97% 105%, #fff 98%, transparent 100%);
  opacity: 0.95;
  pointer-events: none;
}

/* ---------- Problema ---------- */
.problema { background: var(--bianco); }
.problema .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.bolle { position: relative; min-height: 360px; }
.bolla {
  position: absolute;
  background: var(--bianco);
  border: 1px solid var(--bordo);
  border-radius: 999px;
  padding: 14px 24px;
  font-weight: 500;
  color: var(--notte);
  box-shadow: var(--ombra-s);
  white-space: nowrap;
  animation: galleggia 7s ease-in-out infinite;
}
.b1 { top: 4%; left: 4%; }
.b2 { top: 26%; right: 2%; animation-delay: 1.2s; }
.b3 { top: 52%; left: 12%; animation-delay: 2.4s; }
.b4 { bottom: 6%; right: 10%; animation-delay: 3.6s; }
.groviglio {
  position: absolute; inset: 0; margin: auto;
  width: 130px; height: 130px;
  opacity: 0.55;
}

/* ---------- Come funziona ---------- */
.come { background: linear-gradient(180deg, #fff 0%, #f4f0ff 100%); }
.passi { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; counter-reset: passo; }
.passo {
  background: var(--bianco);
  border-radius: var(--raggio);
  padding: 36px 30px;
  box-shadow: var(--ombra);
  position: relative;
}
.passo-num {
  width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center;
  font-weight: 800; font-size: 1.2rem;
  color: #fff;
  background: linear-gradient(135deg, var(--viola), var(--magenta));
  margin-bottom: 20px;
}
.passo p { color: var(--testo-soft); margin: 0; }

/* ---------- Strumenti ---------- */
.strumenti { background: #f4f0ff; }
.griglia-strumenti { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; }
.strumento {
  background: var(--bianco);
  border-radius: var(--raggio-s);
  padding: 28px 20px;
  text-align: center;
  box-shadow: var(--ombra-s);
  transition: transform 0.25s ease;
}
.strumento:hover { transform: translateY(-4px); }
.strumento .icona { font-size: 2.2rem; margin-bottom: 10px; }
.strumento h3 { font-size: 1.1rem; margin-bottom: 6px; }
.strumento p { font-size: 0.92rem; color: var(--testo-soft); margin: 0; }

/* ---------- Aziende ---------- */
.aziende {
  background:
    radial-gradient(50% 60% at 0% 0%, rgba(143,107,255,0.35) 0%, transparent 70%),
    radial-gradient(50% 60% at 100% 100%, rgba(226,50,156,0.25) 0%, transparent 70%),
    var(--notte);
  color: #d9d6f5;
}
.aziende h2, .aziende h3 { color: #fff; }
.aziende .etichetta { background: rgba(255,255,255,0.1); color: #cbbcff; }
.aziende .sezione-head p { color: #b9b5e0; }
.aziende .evidenzia { color: #ff7ac6; }
.vantaggi { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.vantaggio {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--raggio);
  padding: 30px;
  display: flex; gap: 18px;
}
.vantaggio .icona {
  flex: none;
  width: 52px; height: 52px; border-radius: 16px;
  display: grid; place-items: center; font-size: 1.5rem;
  background: rgba(143,107,255,0.25);
}
.vantaggio p { margin: 0; color: #b9b5e0; font-size: 1rem; }
.aziende-cta { text-align: center; margin-top: 48px; }

/* ---------- Privacy (promesse) ---------- */
.promesse { background: var(--bianco); }
.lista-promesse { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.promessa { border-radius: var(--raggio); padding: 32px; background: linear-gradient(160deg, var(--lavanda), var(--rosa)); }
.promessa .icona { font-size: 2rem; margin-bottom: 12px; }
.promessa p { margin: 0; color: var(--testo); font-size: 1rem; }

/* ---------- Form demo ---------- */
.demo {
  background:
    radial-gradient(60% 60% at 15% 30%, var(--azzurro) 0%, transparent 70%),
    radial-gradient(50% 60% at 90% 70%, var(--rosa) 0%, transparent 70%),
    #f6f3ff;
  overflow: hidden;
}
.demo .wrap { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 56px; align-items: center; position: relative; z-index: 2; }
.flusso { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 16px; }
.flusso li { display: flex; gap: 14px; align-items: flex-start; }
.flusso .n {
  flex: none; width: 34px; height: 34px; border-radius: 50%;
  background: var(--bianco); color: var(--viola); font-weight: 800;
  display: grid; place-items: center; box-shadow: var(--ombra-s);
}
.flusso strong { color: var(--notte); display: block; }
.flusso span { color: var(--testo-soft); font-size: 0.98rem; }

.form-card {
  background: var(--bianco);
  border-radius: 32px;
  padding: clamp(28px, 4vw, 44px);
  box-shadow: var(--ombra);
  position: relative;
}
.form-card h3 { font-size: 1.6rem; }
.form-card > p { color: var(--testo-soft); font-size: 1rem; }
.campo { margin-bottom: 18px; }
.campo label { display: block; font-weight: 600; color: var(--notte); font-size: 0.95rem; margin-bottom: 6px; }
.campo label small { font-weight: 400; color: var(--testo-soft); }
.campo input,
.campo select {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  color: var(--notte);
  background: #f7f5ff;
  border: 1.5px solid transparent;
  border-radius: 14px;
  padding: 14px 16px;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.campo input:focus,
.campo select:focus { outline: none; border-color: var(--viola-chiaro); background: #fff; }
.campo input[aria-invalid="true"] { border-color: var(--magenta); }
.errore { color: var(--magenta); font-size: 0.85rem; margin-top: 6px; display: none; }
.errore.visibile { display: block; }

.consenso { display: flex; gap: 12px; align-items: flex-start; font-size: 0.88rem; line-height: 1.45; color: var(--testo); margin-bottom: 14px; cursor: pointer; }
.consenso input { margin-top: 3px; width: 20px; height: 20px; accent-color: var(--viola); flex: none; cursor: pointer; }
.form-card .btn { width: 100%; margin-top: 8px; }
.form-card .btn[disabled] { opacity: 0.6; cursor: wait; transform: none; }
.nota-form { font-size: 0.8rem; color: var(--testo-soft); margin: 14px 0 0; text-align: center; }
.trappola { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.successo { display: none; text-align: center; padding: 20px 0; }
.successo img { width: 120px; margin: 0 auto 18px; animation: galleggia 5s ease-in-out infinite; }
.successo p { color: var(--testo-soft); }
.form-card.inviato form { display: none; }
.form-card.inviato .successo { display: block; }
.form-card.inviato > h3,
.form-card.inviato > p { display: none; }

/* ---------- FAQ ---------- */
.faq { background: var(--bianco); }
.lista-faq { max-width: 820px; margin: 0 auto; }
.lista-faq details {
  border-bottom: 1px solid var(--bordo);
  padding: 6px 0;
}
.lista-faq summary {
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  font-size: 1.12rem;
  color: var(--notte);
  padding: 18px 40px 18px 0;
  position: relative;
}
.lista-faq summary::-webkit-details-marker { display: none; }
.lista-faq summary::after {
  content: "+";
  position: absolute; right: 4px; top: 50%;
  transform: translateY(-50%);
  font-size: 1.6rem; font-weight: 400; color: var(--viola);
  transition: transform 0.2s ease;
}
.lista-faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.lista-faq details p { color: var(--testo-soft); padding-right: 40px; }

/* ---------- Banner finale ---------- */
.finale { padding-bottom: 0; background: var(--bianco); }
.finale-box {
  text-align: center;
  border-radius: 40px;
  padding: clamp(48px, 7vw, 80px) 24px;
  background:
    radial-gradient(60% 80% at 20% 0%, #c9b8ff 0%, transparent 70%),
    radial-gradient(60% 80% at 90% 100%, #ffc2e5 0%, transparent 70%),
    var(--lavanda);
  position: relative;
  overflow: hidden;
}
.finale-box img { width: 110px; margin: 0 auto 20px; animation: galleggia 6s ease-in-out infinite; }
.finale-box p { max-width: 520px; margin: 0 auto 28px; font-size: 1.15rem; }

/* ---------- Footer ---------- */
.footer { padding: 72px 0 40px; background: var(--bianco); font-size: 0.92rem; color: var(--testo-soft); }
.sos {
  background: #fff5fa;
  border: 1px solid #ffd0ea;
  border-radius: var(--raggio-s);
  padding: 18px 22px;
  margin-bottom: 40px;
  color: var(--testo);
}
.sos strong { color: var(--magenta); }
.footer-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; align-items: center; }
.footer-link { display: flex; flex-wrap: wrap; gap: 22px; }
.footer-link a { color: var(--testo-soft); text-decoration: none; }
.footer-link a:hover { color: var(--viola); }

/* ---------- Schermata di benvenuto (blocco con email) ---------- */
.gate { display: none; }
.con-gate body { overflow: hidden; }
.con-gate .gate {
  display: flex;
  position: fixed;
  inset: 0;
  z-index: 100;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  overflow-y: auto;
  background: #f3dff2 url("assets/cielo.svg") center bottom / cover no-repeat;
}
.gate.uscita { animation: svanisce 0.6s ease forwards; }
@keyframes svanisce { to { opacity: 0; transform: scale(1.03); visibility: hidden; } }

.gate-box { width: min(560px, 100%); text-align: center; margin: auto; position: relative; z-index: 2; }
.gate-logo { width: 150px; height: auto; margin: 0 auto 6px; filter: drop-shadow(0 18px 30px rgba(108, 63, 242, 0.3)); animation: galleggia 6s ease-in-out infinite; }
.gate-marchio { font-size: 1.6rem; font-weight: 800; color: var(--viola); letter-spacing: -0.03em; margin: 0 0 18px; }
.gate h1 { font-size: clamp(2rem, 6vw, 3rem); }
.gate-sotto { font-size: 1.12rem; margin-bottom: 28px; }

.gate-riga {
  display: flex;
  gap: 8px;
  background: var(--bianco);
  border-radius: 999px;
  padding: 7px;
  box-shadow: var(--ombra);
}
.gate-riga input {
  flex: 1;
  min-width: 0;
  font: inherit;
  font-size: 1.05rem;
  color: var(--notte);
  border: 0;
  background: transparent;
  padding: 0 18px;
}
.gate-riga input:focus { outline: none; }
.gate-riga:focus-within { box-shadow: var(--ombra), 0 0 0 3px var(--viola-chiaro); }
.gate-riga .btn { padding: 15px 30px; }
.gate-riga .btn[disabled] { opacity: 0.6; cursor: wait; }
#form-gate .errore { text-align: left; padding-left: 20px; }
#form-gate .consenso { text-align: left; margin-top: 16px; margin-bottom: 0; }

.gate .stella { position: absolute; z-index: 1; }
.g1 { width: 46px; height: 46px; top: 12%; left: 12%; }
.g2 { width: 30px; height: 30px; top: 22%; right: 14%; animation-delay: 1s; }
.g3 { width: 36px; height: 36px; bottom: 14%; right: 20%; animation-delay: 2s; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Avviso dopo lo sblocco */
.avviso {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 90;
  width: min(520px, calc(100% - 32px));
  transform: translate(-50%, calc(100% + 40px));
  visibility: hidden;
  background: var(--notte);
  color: #fff;
  border-radius: 20px;
  padding: 16px 20px;
  font-size: 0.98rem;
  box-shadow: var(--ombra);
  transition: transform 0.5s cubic-bezier(.2,.9,.3,1.2), visibility 0s linear 0.5s;
}
.avviso.visibile { transform: translate(-50%, 0); visibility: visible; transition: transform 0.5s cubic-bezier(.2,.9,.3,1.2); }
.avviso strong { color: #ffb3dd; }

@media (max-width: 600px) {
  .gate-riga { flex-direction: column; border-radius: 24px; }
  .gate-riga input { padding: 14px 16px; }
  .gate-riga .btn { width: 100%; }
  .gate-logo { width: 120px; height: 120px; }
  .g3 { display: none; }
}

/* ==========================================================================
   SFONDO "IMMERSIVO" — un unico cielo fisso dietro tutto il sito,
   con nuvole e stelline sempre in movimento. Si attiva con
   sfondo: "immersivo" nelle impostazioni (index.html, dentro <head>).
   ========================================================================== */
.cielo { display: none; }

.immersivo body { background: transparent; }
.immersivo .cielo {
  display: block;
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background: linear-gradient(180deg,
    #cbc8fc 0%, #d8d0fd 16%, #ecd9f8 32%, #fadfeb 48%,
    #fde6e3 60%, #f6e1ee 74%, #dfd8fc 88%, #c9d0fd 100%);
}
.cielo-luce {
  position: absolute;
  inset: 0;
  background: radial-gradient(45% 38% at 50% 56%, rgba(255, 244, 227, 0.9) 0%, rgba(255, 238, 230, 0.4) 45%, transparent 75%);
  animation: respira 14s ease-in-out infinite;
}
@keyframes respira { 0%,100% { opacity: 1; } 50% { opacity: 0.65; } }

#stelle { position: absolute; inset: 0; }

.nuvola-viaggio {
  --scala: 1;
  position: absolute;
  left: 0;
  top: var(--y);
  width: calc(var(--w) * var(--scala));
  max-width: none;
  opacity: var(--o);
  animation: viaggio var(--d) linear infinite;
  animation-delay: var(--r);
  will-change: transform;
}
@keyframes viaggio {
  from { transform: translateX(-105%); }
  to   { transform: translateX(105vw); }
}

.banco {
  position: absolute;
  left: 0;
  bottom: -2px;
  display: flex;
  animation: banco 160s linear infinite;
  will-change: transform;
}
.banco img { width: max(100vw, 1300px); max-width: none; height: 100%; flex: none; }
.banco-dietro { height: 24vh; min-height: 150px; bottom: 3vh; opacity: 0.75; animation-duration: 220s; animation-direction: reverse; }
.banco-davanti { height: 20vh; min-height: 120px; opacity: 0.9; }
@keyframes banco { to { transform: translateX(-50%); } }

/* Le sezioni diventano trasparenti: nessuna divisione */
.immersivo .hero,
.immersivo .problema,
.immersivo .come,
.immersivo .strumenti,
.immersivo .aziende,
.immersivo .promesse,
.immersivo .demo,
.immersivo .faq,
.immersivo .finale,
.immersivo .footer { background: transparent; }
.immersivo .nuvole { display: none; }
.immersivo .hero { overflow: visible; }

.immersivo .header { background: rgba(255, 255, 255, 0.28); }
.immersivo .header.scrolled { background: rgba(255, 255, 255, 0.55); border-bottom-color: rgba(255, 255, 255, 0.6); }
.immersivo .etichetta { background: rgba(255, 255, 255, 0.6); }

/* Card "di vetro": lasciano intravedere il cielo */
.immersivo .passo,
.immersivo .strumento,
.immersivo .form-card,
.immersivo .vantaggio,
.immersivo .promessa,
.immersivo .lista-faq,
.immersivo .finale-box {
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.immersivo .form-card { background: rgba(255, 255, 255, 0.82); }
.immersivo .lista-faq { border-radius: var(--raggio); padding: 8px 32px; box-shadow: var(--ombra-s); }
.immersivo .lista-faq details:last-child { border-bottom: 0; }
.immersivo .finale { padding-bottom: 40px; }

/* La sezione aziende (prima scura) diventa chiara come il resto */
.immersivo .aziende { color: var(--testo); }
.immersivo .aziende h2,
.immersivo .aziende h3 { color: var(--notte); }
.immersivo .aziende .etichetta { background: rgba(255, 255, 255, 0.6); color: var(--viola); }
.immersivo .aziende .sezione-head p,
.immersivo .vantaggio p { color: var(--testo-soft); }
.immersivo .aziende .evidenzia { color: var(--magenta); }
.immersivo .vantaggio .icona { background: var(--lavanda); }

/* Schermata email: trasparente, sotto si vede lo stesso cielo animato */
.immersivo.con-gate .gate { background: transparent; }
.immersivo.con-gate .header,
.immersivo.con-gate main,
.immersivo.con-gate .footer { visibility: hidden; }

@media (max-width: 600px) {
  .nuvola-viaggio { --scala: 0.6; }
  .banco-dietro { height: 16vh; min-height: 110px; }
  .banco-davanti { height: 13vh; min-height: 90px; }
}

/* ---------- Animazione in ingresso ---------- */
.appare { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
.appare.visibile { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .appare { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
  .nuvola-viaggio { display: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .griglia-strumenti { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
  .nav a:not(.btn) { display: none; }
  .hero .wrap,
  .problema .wrap,
  .demo .wrap { grid-template-columns: 1fr; }
  .hero-testo { text-align: center; }
  .hero-testo p.lead { margin-inline: auto; }
  .hero-cta, .hero-note { justify-content: center; }
  .hero-visual { margin-top: 24px; }
  .passi, .lista-promesse { grid-template-columns: 1fr; }
  .vantaggi { grid-template-columns: 1fr; }
  .bolle { min-height: 300px; }
}
@media (max-width: 600px) {
  body { font-size: 17px; }
  .griglia-strumenti { grid-template-columns: repeat(2, 1fr); }
  .telefono { width: 260px; }
  .schermo { min-height: 500px; }
  .mascotte { width: 120px; left: -10px; }
  .bolla { font-size: 0.9rem; padding: 10px 16px; }
  .vantaggio { flex-direction: column; }
  .nav .btn { padding: 10px 16px; font-size: 0.88rem; }
  .logo span { font-size: 1.45rem; }
}
