@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700;800;900&display=swap');

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: #0a0a0a;
  color: #fff;
  font-family: 'Poppins', sans-serif;
  min-height: 100%;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  max-width: 480px;
  margin: 0 auto;
  padding: calc(20px + env(safe-area-inset-top, 0px)) 20px calc(130px + env(safe-area-inset-bottom, 0px));
  position: relative;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

/* decorazione: linee geometriche sottili dorate, angolo alto-destra */
.geo-lines {
  position: absolute;
  top: 0;
  right: 0;
  width: 160px;
  height: 160px;
  z-index: 0;
  opacity: 0.5;
  pointer-events: none;
}

.page {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* topbar con back button, usata in tutte le sotto-pagine */
.topbar {
  display: flex;
  align-items: center;
  gap: 10px;
}
.topbar .back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  margin: -4px 0;
  border: 1.5px solid #FFC72C;
  border-radius: 50%;
  flex-shrink: 0;
}
.topbar .back svg { display: block; }
.topbar .title {
  font-weight: 800;
  font-size: 0.8rem;
  letter-spacing: 1px;
  color: #999;
}

/* header con scudo/brand, usato solo in home */
.header { display: flex; flex-direction: column; align-items: center; text-align: center; }
.header .est { font-size: 0.6rem; letter-spacing: 4px; color: #FFC72C; font-weight: 700; margin-bottom: 8px; }
.header .shield { width: 64px; height: auto; display: block; }
.header .brand { font-weight: 800; letter-spacing: 3px; font-size: 0.78rem; color: #FFC72C; margin-top: 10px; }

.headline {
  margin-top: 20px;
  font-size: 1.6rem;
  font-weight: 900;
  line-height: 1.08;
}
.headline.center { text-align: center; }
.headline .accent { color: #FFC72C; }

.sub {
  font-size: 0.78rem;
  color: #bbb;
  margin-top: 8px;
  font-weight: 500;
}
.sub.center { text-align: center; }

.divider { width: 50px; height: 3px; background: #FFC72C; margin: 18px 0; border-radius: 2px; }
.divider.center { margin: 18px auto; }

/* lista voci menu (home) */
.icons-list { display: flex; flex-direction: column; gap: 12px; margin-top: 6px; }
.icon-row {
  display: flex; align-items: center; gap: 14px;
  background: #141414; border-radius: 16px; padding: 14px 16px;
  border: 1px solid #232323;
}
.icon-row .badge {
  width: 42px; height: 42px; border-radius: 10px;
  background: #FFC72C; color: #0a0a0a;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem; flex-shrink: 0;
}
.icon-row .label { font-weight: 700; font-size: 0.9rem; }
.icon-row .desc { font-size: 0.7rem; color: #999; margin-top: 2px; }
.icon-row .arrow { margin-left: auto; color: #FFC72C; font-weight: 900; font-size: 1.1rem; }

/* box scelta grande (bivio iscrizione) */
.choice-list { display: flex; flex-direction: column; gap: 16px; margin-top: 8px; }
.choice-btn {
  background: #141414; border: 1.5px solid #FFC72C; border-radius: 18px;
  padding: 22px 18px; display: flex; align-items: center; gap: 16px;
}
.choice-btn .badge {
  width: 46px; height: 46px; border-radius: 12px;
  background: #FFC72C; color: #0a0a0a;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; flex-shrink: 0; font-weight: 900;
}
.choice-btn .label { font-weight: 900; font-size: 1rem; }
.choice-btn .desc { font-size: 0.72rem; color: #999; margin-top: 3px; }
.choice-btn .arrow { margin-left: auto; color: #FFC72C; font-size: 1.3rem; font-weight: 900; }

/* box "DA SAPERE" con check verde */
.clarity-box {
  background: #141414; border: 1.5px solid #FFC72C; border-radius: 14px;
  padding: 14px 16px; margin-bottom: 16px;
}
.clarity-box .kicker { font-size: 0.62rem; font-weight: 900; color: #FFC72C; letter-spacing: 1px; margin-bottom: 8px; }
.clarity-box .line { display: flex; gap: 8px; font-size: 0.76rem; color: #ddd; line-height: 1.45; margin-bottom: 8px; }
.clarity-box .line:last-child { margin-bottom: 0; }
.clarity-box .line b { color: #fff; }
.clarity-box .line::before { content: '✓'; color: #FFC72C; font-weight: 900; flex-shrink: 0; }

/* step numerati */
.step { display: flex; gap: 12px; margin-bottom: 14px; }
.step .num {
  width: 28px; height: 28px; border-radius: 50%;
  background: #FFC72C; color: #0a0a0a;
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 0.78rem; flex-shrink: 0;
}
.step .txt .t { font-weight: 800; font-size: 0.85rem; }
.step .txt .d { font-size: 0.72rem; color: #999; margin-top: 3px; line-height: 1.4; }

.fields-box {
  background: #141414; border: 1px solid #232323; border-radius: 12px;
  padding: 10px 14px; margin: 4px 0 14px 40px;
}
.fields-box .f { font-size: 0.72rem; color: #ddd; padding: 6px 0; border-bottom: 1px solid #202020; }
.fields-box .f:last-child { border-bottom: none; }
.fields-box .f b { color: #FFC72C; }

/* bottoni call-to-action */
.cta-btn {
  display: block; text-align: center;
  background: #FFC72C; color: #0a0a0a;
  font-weight: 900; font-size: 0.85rem; letter-spacing: 0.5px;
  padding: 15px; border-radius: 30px;
  margin-top: 18px; border: none; cursor: pointer;
}
.cta-btn.ghost {
  background: transparent; color: #FFC72C;
  border: 1.5px solid #FFC72C;
}

/* riquadro anteprima PDF (pagina modulo.html) -- immagine statica, mai il PDF
   incorporato: su iOS un iframe con un PDF apre il visualizzatore a schermo
   intero del sistema, che scavalca la pagina e il pulsante indietro */
.pdf-preview {
  margin-top: 4px; padding: 10px;
  background: #141414; border: 1px solid #232323; border-radius: 14px;
  display: flex; justify-content: center;
}
.pdf-preview img {
  width: 100%; max-width: 100%; min-width: 0; height: auto;
  display: block; border-radius: 6px;
}

/* sezioni/etichette */
.section-label { font-size: 0.65rem; font-weight: 900; color: #FFC72C; letter-spacing: 1px; margin: 18px 0 8px; }
.section-label.with-total { display: flex; justify-content: space-between; align-items: baseline; }
.section-label.with-total .total { color: #fff; font-size: 0.7rem; }

/* tabella prezzi */
.table { background: #141414; border: 1px solid #232323; border-radius: 12px; overflow: hidden; }
.trow { display: flex; align-items: center; gap: 12px; padding: 10px 14px; font-size: 0.78rem; border-bottom: 1px solid #202020; }
.trow:last-child { border-bottom: none; }
.trow .thumb { width: 38px; height: 38px; border-radius: 8px; object-fit: cover; background: #fff; flex-shrink: 0; }
.trow .cat { color: #ddd; font-weight: 600; flex: 1; }
.trow .val { color: #FFC72C; font-weight: 900; flex-shrink: 0; }

.rate-split { margin-top: 10px; background: #141414; border: 1px solid #232323; border-radius: 10px; padding: 10px 14px; }
.rate-row { display: flex; justify-content: space-between; font-size: 0.72rem; padding: 5px 0; }
.rate-row .rc { color: #999; }
.rate-row .rv { color: #FFC72C; font-weight: 800; }
.rate-note { font-size: 0.66rem; color: #777; margin-top: 8px; font-style: italic; }

.two-col { display: flex; gap: 10px; margin-top: 10px; }
.mini-box { flex: 1; background: #141414; border: 1px solid #232323; border-radius: 10px; padding: 10px 12px; }
.mini-box .k { font-size: 0.6rem; color: #999; font-weight: 700; letter-spacing: 0.5px; }
.mini-box .v { font-size: 0.8rem; font-weight: 900; color: #fff; margin-top: 3px; }

.included-box { margin-top: 4px; background: #0f1f10; border: 1px solid #1f3a20; border-radius: 12px; padding: 12px 14px; }
.included-box .item { display: flex; gap: 8px; font-size: 0.76rem; color: #cdeecf; margin-bottom: 6px; }
.included-box .item:last-child { margin-bottom: 0; }
.included-box .item::before { content: '✓'; color: #3ecf5c; font-weight: 900; }

/* dati bancari + copia IBAN */
.bank-box { background: #141414; border: 1px solid #232323; border-radius: 12px; padding: 16px; }
.bank-box .k { font-size: 0.62rem; color: #FFC72C; font-weight: 900; letter-spacing: 0.5px; }
.bank-box .v { font-size: 0.78rem; color: #eee; font-weight: 700; margin-top: 4px; margin-bottom: 12px; }
.iban-row { display: flex; align-items: center; gap: 10px; margin-bottom: 0; }
.iban-row .v.iban { font-family: monospace; letter-spacing: 0.5px; font-size: 0.82rem; margin: 0; user-select: all; -webkit-user-select: all; cursor: text; word-break: break-all; }
.copy-btn {
  background: #FFC72C; color: #0a0a0a; font-weight: 900; font-size: 0.62rem;
  padding: 7px 12px; border-radius: 8px; cursor: pointer; flex-shrink: 0; letter-spacing: 0.5px;
  border: none; transition: opacity 0.15s;
}
.copy-btn:active { opacity: 0.6; }

.causale-box { margin-top: 14px; background: #141414; border: 1.5px solid #FFC72C; border-radius: 12px; padding: 16px; }
.causale-box .k { font-size: 0.62rem; color: #FFC72C; font-weight: 900; letter-spacing: 0.5px; }
.causale-box .v { font-size: 0.8rem; color: #fff; font-weight: 800; margin-top: 6px; margin-bottom: 10px; }
.causale-example { background: #0a0a0a; border-radius: 8px; padding: 10px 12px; font-size: 0.72rem; color: #ccc; font-style: italic; }

/* box attenzione (giallo/oro scuro) */
.alert-box, .why-box {
  margin-top: 16px; background: #2b2306; border: 1px solid #4a3d0a; border-radius: 12px;
  padding: 14px 16px; display: flex; gap: 10px; align-items: flex-start;
}
.alert-box .tri, .why-box .tri { color: #FFC72C; font-size: 1rem; margin-top: 1px; }
.alert-box .txt, .why-box .txt { font-size: 0.76rem; color: #e0d3a0; line-height: 1.45; }
.alert-box .txt b, .why-box .txt b { color: #FFC72C; }

.note-box {
  margin-top: 16px; background: #141414; border: 1px dashed #444; border-radius: 12px;
  padding: 14px 16px; font-size: 0.74rem; color: #aaa; line-height: 1.45;
}
.note-box b { color: #FFC72C; }

/* accordion FAQ — due livelli: argomento (faq-group) e domanda (faq-item) */
.faq-groups { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.faq-group { background: #141414; border: 1px solid #232323; border-radius: 14px; overflow: hidden; }
.faq-group-title {
  padding: 15px 16px; font-size: 0.74rem; font-weight: 900; color: #FFC72C; letter-spacing: 0.5px;
  cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.faq-group-title::-webkit-details-marker { display: none; }
.faq-group-title::after { content: '+'; color: #FFC72C; font-weight: 900; font-size: 1.1rem; flex-shrink: 0; }
.faq-group[open] .faq-group-title::after { content: '−'; }
.faq-group[open] .faq-group-title { border-bottom: 1px solid #232323; }
.faq-group-body { padding: 10px; display: flex; flex-direction: column; gap: 8px; }

.faq-item { background: #0d0d0f; border: 1px solid #1c1c1c; border-radius: 10px; overflow: hidden; }
.faq-item summary {
  padding: 12px 14px; font-size: 0.78rem; font-weight: 700; cursor: pointer;
  list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 10px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; color: #FFC72C; font-weight: 900; font-size: 1.1rem; flex-shrink: 0; }
.faq-item[open] summary::after { content: '−'; }
.faq-item .answer { padding: 0 14px 14px; font-size: 0.74rem; color: #bbb; line-height: 1.55; }
.faq-item .answer.tbd { color: #e0d3a0; font-style: italic; }

/* lista moduli/materiale */
.doc-list { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.doc-row { background: #141414; border: 1px solid #232323; border-radius: 14px; padding: 14px 16px; display: flex; align-items: center; gap: 12px; }
.doc-row .doc-info { flex: 1; min-width: 0; }
.doc-row .label { font-weight: 700; font-size: 0.82rem; }
.doc-row .desc { font-size: 0.68rem; color: #999; margin-top: 3px; line-height: 1.4; }
.doc-row .dl-btn {
  background: transparent; color: #FFC72C; border: 1.5px solid #FFC72C; border-radius: 20px;
  padding: 8px 14px; font-size: 0.68rem; font-weight: 900; flex-shrink: 0;
  text-decoration: none; display: inline-block;
}
.doc-row .dl-btn:disabled {
  color: #777; border-color: #333; cursor: not-allowed;
}

.foot { text-align: center; font-size: 0.68rem; color: #666; padding-top: 20px; margin-top: auto; }
.foot b { color: #FFC72C; }
.foot a { color: #FFC72C; }

.install-banner {
  display: none;
  position: fixed; left: 16px; right: 16px; bottom: 106px; z-index: 20;
  max-width: 448px; margin: 0 auto;
  background: #141414; border: 1.5px solid #FFC72C; border-radius: 16px;
  padding: 14px 16px; align-items: center; gap: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
.install-banner.show { display: flex; }
.install-banner .txt { flex: 1; font-size: 0.72rem; color: #ddd; }
.install-banner .txt b { color: #FFC72C; display: block; font-size: 0.8rem; margin-bottom: 2px; }
.install-banner button {
  background: #FFC72C; color: #0a0a0a; border: none; border-radius: 20px;
  padding: 8px 14px; font-weight: 900; font-size: 0.68rem; flex-shrink: 0;
}
.install-banner .dismiss { background: transparent; color: #999; padding: 8px 6px; font-weight: 700; }

/* pagina dettaglio articolo (prodotto.html) */
.product-hero {
  width: 100%; aspect-ratio: 1/1; border-radius: 16px; overflow: hidden;
  background: #fff; margin-bottom: 16px; border: 1px solid #232323;
}
.product-hero img { width: 100%; height: 100%; display: block; object-fit: contain; }
.product-price-row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 4px; }
.product-price { color: #FFC72C; font-weight: 900; font-size: 1.4rem; }
.product-brand { font-size: 0.68rem; color: #888; }
.product-desc { font-size: 0.8rem; color: #ccc; line-height: 1.55; margin: 6px 0 16px; }
.product-material { font-size: 0.72rem; color: #999; font-style: italic; margin-bottom: 16px; }

.size-table { background: #141414; border: 1px solid #232323; border-radius: 12px; overflow: hidden; margin-bottom: 14px; }
.size-row { display: flex; padding: 9px 14px; font-size: 0.72rem; border-bottom: 1px solid #202020; }
.size-row:last-child { border-bottom: none; }
.size-row.head { color: #FFC72C; font-weight: 900; background: #1a1a1a; }
.size-row span { flex: 1; text-align: center; }
.size-row span:first-child { text-align: left; font-weight: 700; color: #fff; }
.size-row.head span:first-child { color: #FFC72C; }
.size-note { font-size: 0.62rem; color: #777; font-style: italic; margin: -6px 0 14px; }

/* riga cliccabile nelle liste articoli */
.trow.link { cursor: pointer; }
.trow .row-arrow { color: #FFC72C; font-weight: 900; flex-shrink: 0; margin-left: 2px; }

/* splash iniziale, solo sulla home (start_url della PWA) */
.splash {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: #0a0a0a;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.4s ease;
}
.splash.hide { opacity: 0; pointer-events: none; }
.splash-logo {
  width: 130px;
  height: auto;
  animation: heartbeat 1.1s ease-in-out infinite;
}
@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  20% { transform: scale(1.12); }
  35% { transform: scale(1); }
  50% { transform: scale(1.08); }
  65% { transform: scale(1); }
}

/* striscia sponsor, fissa in fondo, presente su tutte le pagine */
.sponsor-ticker {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 15;
  background: #0d0d0f;
  border-top: 1px solid #232323;
  padding: 17px 0;
  overflow: hidden;
}
.sponsor-ticker .track {
  display: flex;
  align-items: center;
  gap: 40px;
  width: max-content;
  animation: sponsor-scroll 34s linear infinite;
}
.sponsor-ticker img {
  height: 46px;
  width: auto;
  flex-shrink: 0;
  display: block;
}
@keyframes sponsor-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .sponsor-ticker .track { animation: none; overflow-x: auto; }
}
