/* Font arrotondato. TODO produzione: ospitare il font in locale (privacy GDPR). */
@import url("https://fonts.googleapis.com/css2?family=Fredoka:wght@400;500;600;700&display=swap");

:root {
  --notte: #1b2a5c;
  --notte-2: #24357a;
  --stella: #ffd23f;
  --corallo: #ff6b6b;
  --cielo: #3a86ff;
  --menta: #2ec4b6;
  --lilla: #9b5de5;
  --arancio: #ff9f1c;
  --crema: #fff8e7;
  --bianco: #ffffff;
  --ink: #1b2a5c;
  --muted: #5d6a8f;
  --line: #e7e1d3;
  --ok: #1f9d6b;
  --radius: 22px;
  /* compatibilità con le pagine esistenti */
  --brand: var(--corallo);
  --brand-2: var(--stella);
  --accent: var(--cielo);
  --card: var(--bianco);
  --bg: var(--crema);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Fredoka", ui-rounded, "Nunito", system-ui, -apple-system, sans-serif;
  font-size: 18px;
  color: var(--ink);
  background: var(--crema);
  line-height: 1.5;
}
img { max-width: 100%; display: block; }
a { color: var(--cielo); }
h1, h2, h3 { line-height: 1.1; letter-spacing: -0.01em; font-weight: 700; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 22px; }
.narrow { max-width: 780px; }

/* ---------- Barra in alto ---------- */
.topbar { background: var(--notte); color: #fff; position: sticky; top: 0; z-index: 20; box-shadow: 0 2px 0 rgba(0,0,0,.08); }
.topbar .wrap { display: flex; align-items: center; gap: 24px; height: 74px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; font-weight: 700; font-size: 1.55rem; }
.logo img { width: 40px; height: 44px; }
.logo span { color: var(--stella); }
.menu { display: flex; gap: 22px; margin-left: auto; }
.menu a { color: #fff; text-decoration: none; font-weight: 600; font-size: 1rem; opacity: .9; }
.menu a:hover { opacity: 1; color: var(--stella); }
.topbar .btn { padding: 10px 20px; font-size: 1rem; }
@media (max-width: 820px) { .menu { display: none; } .topbar .btn { margin-left: auto; } }

/* ---------- Pulsanti ---------- */
button, .btn {
  font: inherit; font-weight: 700; border: 0; border-radius: 999px; padding: 14px 28px; cursor: pointer;
  background: var(--notte); color: #fff; text-decoration: none; display: inline-block; text-align: center;
  transition: transform .15s, box-shadow .15s;
}
button:hover:not(:disabled), .btn:hover { transform: translateY(-2px); }
button.primary, .btn.primary { background: var(--corallo); box-shadow: 0 5px 0 #d94f4f; }
.btn.giallo { background: var(--stella); color: var(--notte); box-shadow: 0 5px 0 #e0b21f; }
.btn.blu { background: var(--cielo); box-shadow: 0 5px 0 #2a6bd1; }
button.ghost { background: #fff; color: var(--ink); border: 2px solid var(--line); box-shadow: none; }
button:disabled { opacity: .5; cursor: wait; }

/* ---------- Hero notturno ---------- */
.hero {
  position: relative; color: #fff; text-align: center; overflow: hidden;
  background: var(--notte) url("/img/scena.svg") center bottom / cover no-repeat;
  min-height: 600px; padding: 70px 0 230px;
}
.hero h1 { font-size: clamp(2.3rem, 5.5vw, 4rem); margin: 0 0 14px; text-shadow: 0 3px 0 rgba(0,0,0,.2); }
.hero h1 em { font-style: normal; color: var(--stella); }
.hero p.lead { font-size: 1.3rem; max-width: 600px; margin: 0 auto 28px; opacity: .95; }
.hero .mascotte { position: absolute; width: 140px; left: 27%; bottom: 60px; animation: salta 2.6s ease-in-out infinite; }
.hero .nota { position: absolute; color: var(--stella); font-size: 2.2rem; animation: fluttua 6s ease-in-out infinite; opacity: .9; }
@keyframes salta { 0%,100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-16px) rotate(3deg); } }
@keyframes fluttua { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-20px); } }
@media (max-width: 700px) { .hero .mascotte { width: 90px; left: 4%; bottom: 40px; } }
.badge-asilo { display: inline-block; background: var(--stella); color: var(--notte); border-radius: 999px; padding: 6px 16px; font-weight: 700; font-size: .95rem; margin-bottom: 16px; }
.mini-note { margin-top: 14px; font-size: 1rem; opacity: .85; }

/* ---------- Riquadri icone (occasioni) ---------- */
.occasioni { background: #fff; padding: 46px 0 56px; }
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; text-align: center; }
@media (max-width: 760px) { .tiles { grid-template-columns: repeat(2, 1fr); } }
.tile { text-decoration: none; color: var(--ink); }
.tile img { width: 120px; height: 120px; margin: 0 auto 12px; transition: transform .2s; }
.tile:hover img { transform: scale(1.08) rotate(-4deg); }
.tile b { font-size: 1.25rem; text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 5px; }
.tile:nth-child(1) b { color: var(--corallo); }
.tile:nth-child(2) b { color: var(--cielo); }
.tile:nth-child(3) b { color: var(--lilla); }
.tile:nth-child(4) b { color: #e0537a; }
.tile p { margin: 6px 0 0; color: var(--muted); font-size: 1rem; }

/* ---------- Sezioni con onde ---------- */
.band { position: relative; padding: 80px 0; }
.band::before, .band::after { content: ""; position: absolute; left: 0; right: 0; height: 40px; background-repeat: repeat-x; background-size: 160px 40px; }
.band::before { top: -39px; }
.band::after { bottom: -39px; transform: rotate(180deg); }
.band.giallo { background: var(--stella); }
.band.giallo::before, .band.giallo::after { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 160 40'%3E%3Cpath d='M0 40Q40 0 80 20T160 20V40Z' fill='%23ffd23f'/%3E%3C/svg%3E"); }
.band.notte { background: var(--notte); color: #fff; }
.band.notte::before, .band.notte::after { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 160 40'%3E%3Cpath d='M0 40Q40 0 80 20T160 20V40Z' fill='%231b2a5c'/%3E%3C/svg%3E"); }
.band.menta { background: var(--menta); color: #fff; }
.band.menta::before, .band.menta::after { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 160 40'%3E%3Cpath d='M0 40Q40 0 80 20T160 20V40Z' fill='%232ec4b6'/%3E%3C/svg%3E"); }
.band.notte .stelline { position: absolute; inset: 0; pointer-events: none; background-image: radial-gradient(2px 2px at 10% 20%, #fff 50%, transparent), radial-gradient(2px 2px at 30% 70%, #fff 50%, transparent), radial-gradient(2px 2px at 55% 15%, #fff 50%, transparent), radial-gradient(2px 2px at 75% 60%, #fff 50%, transparent), radial-gradient(2px 2px at 90% 30%, #fff 50%, transparent), radial-gradient(2px 2px at 45% 90%, #fff 50%, transparent); opacity: .6; }
.titolo-sezione { text-align: center; font-size: clamp(2rem, 4vw, 2.8rem); margin: 0 0 10px; }
.sottotitolo { text-align: center; font-size: 1.2rem; margin: 0 auto 40px; max-width: 620px; opacity: .85; }

/* Come funziona */
.passi { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
@media (max-width: 820px) { .passi { grid-template-columns: 1fr; } }
.passo { background: #fff; border-radius: var(--radius); padding: 24px; text-align: center; box-shadow: 0 8px 0 rgba(27,42,92,.12); }
.passo img { height: 140px; margin: 0 auto 10px; }
.passo .num { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--notte); color: var(--stella); font-weight: 700; margin-bottom: 8px; }
.passo h3 { margin: 4px 0 6px; font-size: 1.4rem; }
.passo p { margin: 0; color: var(--muted); }

/* Stili musicali */
.stili-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; position: relative; }
@media (max-width: 820px) { .stili-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .stili-grid { grid-template-columns: 1fr; } }
.stile-card { background: #fff; color: var(--ink); border-radius: var(--radius); overflow: hidden; border: 5px solid #fff; box-shadow: 0 8px 0 rgba(0,0,0,.18); transition: transform .2s; }
.stile-card:hover { transform: translateY(-6px) rotate(-1deg); }
.stile-card img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 16px; }
.stile-card div { padding: 12px 10px 8px; }
.stile-card h3 { margin: 0 0 2px; font-size: 1.35rem; }
.stile-card p { margin: 0; color: var(--muted); font-size: 1rem; }

/* Perché piace */
.vantaggi { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px 34px; max-width: 900px; margin: 0 auto; }
@media (max-width: 700px) { .vantaggi { grid-template-columns: 1fr; } }
.vantaggio { display: flex; gap: 14px; align-items: flex-start; }
.vantaggio i { font-style: normal; font-size: 2rem; flex: none; width: 58px; height: 58px; display: grid; place-items: center; background: #fff; border-radius: 18px; box-shadow: 0 5px 0 var(--line); }
.vantaggio b { display: block; font-size: 1.2rem; }
.vantaggio span { color: var(--muted); }

/* Partner */
.partner-box { display: grid; grid-template-columns: 1.3fr 1fr; gap: 30px; align-items: center; }
@media (max-width: 820px) { .partner-box { grid-template-columns: 1fr; } }
.partner-box h2 { font-size: clamp(2rem, 4vw, 2.6rem); margin: 0 0 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 26px; }
.chips span { background: rgba(255,255,255,.2); border: 2px solid rgba(255,255,255,.5); border-radius: 999px; padding: 6px 14px; font-weight: 600; }
.partner-box img { width: 230px; margin: 0 auto; transform: rotate(8deg); }

/* FAQ */
.faq { max-width: 820px; margin: 0 auto; }
.faq details { background: #fff; border-radius: 18px; padding: 18px 22px; margin-bottom: 12px; box-shadow: 0 5px 0 var(--line); }
.faq summary { font-weight: 700; font-size: 1.15rem; cursor: pointer; }
.faq p { margin: 10px 0 0; color: var(--muted); }

/* ---------- Modulo ---------- */
.crea { padding: 90px 0 70px; }
.card { background: #fff; border-radius: var(--radius); padding: 30px; box-shadow: 0 10px 0 rgba(27,42,92,.1); border: 3px solid var(--notte); margin-bottom: 40px; position: relative; }
.card .sbircia { position: absolute; width: 96px; right: 26px; top: -84px; }
.progress { height: 12px; background: #eef0f8; border-radius: 99px; overflow: hidden; margin-bottom: 26px; }
.progress > div { height: 100%; background: repeating-linear-gradient(45deg, var(--corallo) 0 14px, #ff8a8a 14px 28px); transition: width .3s; border-radius: 99px; }
.step h2 { margin: 0 0 4px; font-size: 1.8rem; }
.step .hint, .hint { color: var(--muted); margin: 0 0 18px; }
label { display: block; font-weight: 600; margin: 16px 0 6px; }
label small { font-weight: 400; color: var(--muted); }
input:not([type]), input[type="text"], input[type="email"], input[type="number"], input[type="tel"], textarea, select {
  width: 100%; padding: 13px 16px; border: 2.5px solid var(--line); border-radius: 14px; font: inherit; font-size: 1.05rem; color: inherit; background: #fffdf7;
}
textarea { min-height: 96px; resize: vertical; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--cielo); box-shadow: 0 0 0 4px rgba(58,134,255,.15); }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .row { grid-template-columns: 1fr; } }
.choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.choices label { margin: 0; }
.choices input { position: absolute; opacity: 0; pointer-events: none; }
.choices span { display: block; text-align: center; padding: 12px 10px 14px; border: 2.5px solid var(--line); border-radius: 18px; cursor: pointer; font-weight: 600; background: #fffdf7; transition: transform .15s; }
.choices span:hover { transform: translateY(-2px); }
.choices span i { display: block; font-style: normal; font-size: 1.8rem; }
.choices span img { width: 100%; aspect-ratio: 16/10; object-fit: cover; border-radius: 12px; margin-bottom: 8px; }
.choices input:checked + span { border-color: var(--cielo); background: #eaf2ff; box-shadow: 0 5px 0 var(--cielo); }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.check input { margin-top: 6px; width: 20px; height: 20px; }
.nav { display: flex; justify-content: space-between; margin-top: 26px; gap: 12px; }
.error { color: #c0392b; font-weight: 600; margin-top: 12px; }

/* ---------- Pagina canzone ---------- */
.pagina-canzone { background: var(--notte) url("/img/scena.svg") center bottom / cover no-repeat fixed; min-height: calc(100vh - 74px); padding: 50px 0 120px; }
.center { text-align: center; }
.spinner { width: 120px; margin: 10px auto; animation: salta 1.4s ease-in-out infinite; }
.versions { display: grid; gap: 14px; margin: 18px 0; }
.version { border: 2.5px solid var(--line); border-radius: 18px; padding: 16px; display: grid; gap: 10px; }
.version.selected { border-color: var(--cielo); background: #eaf2ff; }
.version header { display: flex; justify-content: space-between; align-items: center; font-weight: 700; }
.version header small { font-weight: 400; color: var(--muted); }
audio { width: 100%; }
.pricebox { text-align: center; margin-top: 10px; }
.pricebox .price { font-size: 2.4rem; font-weight: 700; color: var(--corallo); }
.demo-note { font-size: .9rem; color: var(--muted); }
.lyrics { white-space: pre-wrap; background: #fffdf7; border: 2px dashed var(--line); border-radius: 16px; padding: 18px; color: var(--muted); max-height: 340px; overflow: auto; }
.lyrics .sec { font-weight: 700; color: var(--lilla); }
.karaoke { font-size: 1.3rem; line-height: 1.7; max-height: 380px; overflow: auto; padding: 20px; background: var(--notte); color: #8f9bc8; border-radius: 18px; }
.karaoke .line { margin: 2px 0; }
.karaoke .line.now { color: #fff; }
.karaoke .w.on { color: var(--stella); }
.karaoke .sec { color: #6d7fc0; font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; margin-top: 12px; }
.paid-ok { color: var(--ok); font-weight: 700; }
.gift { display: flex; align-items: center; gap: 14px; background: #fff8e7; border: 2px dashed var(--stella); border-radius: 18px; padding: 12px 16px; margin-bottom: 12px; }
.gift img { max-width: 120px; max-height: 64px; object-fit: contain; }
.gift p { margin: 0; font-size: 1.15rem; }
.gift b { color: var(--corallo); }

/* ---------- Varie ---------- */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px; border-bottom: 1px solid var(--line); }
footer.piede { background: var(--notte); color: #c9d1ef; padding: 40px 0; text-align: center; font-size: .95rem; }
footer.piede .logo { justify-content: center; margin-bottom: 8px; }
footer { color: var(--muted); font-size: .9rem; text-align: center; padding: 20px 0 40px; }

/* Logo disegnato (bimba + scritta) */
.logo .logo-img { width: auto; height: 54px; }
footer.piede .logo .logo-img { height: 64px; margin: 0 auto; }
@media (max-width: 520px) { .logo .logo-img { height: 42px; } }

/* Conferma dentro la pagina (al posto di confirm()) */
.chiedi { background: #fff7d6; border: 2px solid var(--stella); border-radius: 14px; padding: 10px 14px; margin-top: 8px; }
.chiedi p { margin: 0 0 8px; font-weight: 600; }
.chiedi .actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Pagina canzone su telefono: intestazione delle versioni su due righe */
.version header { flex-wrap: wrap; gap: 2px 12px; }
.version header > :first-child { white-space: nowrap; }

/* Lettore dell'anteprima (45 s), senza menu di download */
.anteprima { display: flex; align-items: center; gap: 12px; background: #eef0f8; border-radius: 999px; padding: 8px 14px 8px 8px; }
.anteprima audio { display: none; }
.ant-play { flex: none; width: 44px; height: 44px; border-radius: 50%; padding: 0; background: var(--corallo); box-shadow: 0 4px 0 #d94f4f; font-size: 1rem; line-height: 44px; }
.ant-barra { flex: 1; min-width: 0; height: 8px; background: #d7dbea; border-radius: 99px; overflow: hidden; }
.ant-barra > div { height: 100%; width: 0; background: var(--corallo); border-radius: 99px; }
.ant-tempo { flex: none; font-size: .9rem; color: var(--muted); font-variant-numeric: tabular-nums; }
