/* ==========================================================
   ARBE — Esercitazione online al test di cittadinanza sammarinese
   Palette: bianco e azzurro della Repubblica, blu notte, oro dell'alloro
   ========================================================== */

:root {
  --azzurro: #5eb6e4;
  --azzurro-chiaro: #d9eefa;
  --azzurro-profondo: #1f6fa8;
  --notte: #0b1f33;
  --notte-2: #12304d;
  --bianco: #ffffff;
  --pietra: #f6f3ec;
  --pietra-2: #ebe5d8;
  --oro: #c9a44c;
  --oro-chiaro: #f3e6c2;
  --testo: #14202c;
  --testo-2: #4a5a6a;
  --verde: #1f8a5b;
  --rosso: #c0392b;

  --font-display: "Cinzel", "Trajan Pro", Georgia, serif;
  --font-body: "Manrope", "Segoe UI", system-ui, -apple-system, sans-serif;

  --radius: 18px;
  --radius-s: 10px;
  --shadow: 0 10px 30px rgba(11, 31, 51, .10);
  --shadow-l: 0 24px 60px rgba(11, 31, 51, .18);
  --max: 1160px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--testo);
  background: var(--bianco);
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--azzurro-profondo); }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .6em; }
h1, h2 { font-family: var(--font-display); font-weight: 700; letter-spacing: .01em; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.5rem); }
h3 { font-size: 1.2rem; font-weight: 800; }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.section { padding: clamp(64px, 9vw, 120px) 0; }
.section--pietra { background: var(--pietra); }
.section--notte { background: var(--notte); color: #e8f1f8; }
.section--notte h2, .section--notte h3 { color: #fff; }
.eyebrow {
  display: inline-block;
  font-size: .78rem; font-weight: 800; letter-spacing: .18em; text-transform: uppercase;
  color: var(--azzurro-profondo);
  margin-bottom: 14px;
}
.section--notte .eyebrow { color: var(--azzurro); }
.lead { font-size: 1.15rem; color: var(--testo-2); max-width: 680px; }
.section--notte .lead { color: #b9cde0; }
.center { text-align: center; }
.center .lead { margin-left: auto; margin-right: auto; }

/* ---------- Bottoni ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 15px 26px;
  border-radius: 999px;
  font: 800 1rem/1 var(--font-body);
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn--primario { background: var(--azzurro); color: var(--notte); box-shadow: 0 8px 24px rgba(94,182,228,.45); }
.btn--primario:hover { background: #7cc6ec; }
.btn--scuro { background: var(--notte); color: #fff; }
.btn--fantasma { background: transparent; color: #fff; border-color: rgba(255,255,255,.45); }
.btn--fantasma:hover { border-color: #fff; }
.btn--linea { background: #fff; color: var(--notte); border-color: var(--pietra-2); }
.btn--linea:hover { border-color: var(--azzurro); }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; }

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 31, 51, .92);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.header .wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; color: #fff; }
.brand__img { height: 30px; width: auto; }
.brand__sub {
  display: block; font-family: var(--font-body); font-size: .62rem; line-height: 1.35;
  letter-spacing: .14em; text-transform: uppercase; color: var(--azzurro); font-weight: 700;
  padding-left: 14px; border-left: 1px solid rgba(255,255,255,.2); max-width: 190px;
}
.nav { display: flex; align-items: center; gap: 6px; }
.nav a {
  color: #d5e3ef; text-decoration: none; font-weight: 700; font-size: .95rem;
  padding: 10px 14px; border-radius: 999px;
}
.nav a:hover { color: #fff; background: rgba(255,255,255,.07); }
.nav a[aria-current="page"] { color: #fff; background: rgba(94,182,228,.18); }
.nav .nav__cta { background: var(--azzurro); color: var(--notte); margin-left: 6px; }
.nav .nav__cta:hover { background: #7cc6ec; color: var(--notte); }
.nav-toggle { display: none; background: none; border: 0; color: #fff; padding: 8px; cursor: pointer; }
.nav-toggle svg { width: 28px; height: 28px; }

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav {
    position: absolute; top: 72px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--notte); padding: 12px 16px 20px;
    border-bottom: 1px solid rgba(255,255,255,.1);
    display: none;
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 14px 16px; }
  .nav .nav__cta { margin: 8px 0 0; text-align: center; }
  .brand__sub { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(1200px 600px at 75% 10%, rgba(94,182,228,.35), transparent 60%),
    radial-gradient(800px 500px at 10% 90%, rgba(201,164,76,.12), transparent 60%),
    linear-gradient(180deg, #0b1f33 0%, #0f2a45 55%, #16416a 100%);
  color: #fff;
  padding: clamp(60px, 10vw, 120px) 0 0;
}
.hero__grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; position: relative; z-index: 2; }
.hero__kicker {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 7px 14px; border-radius: 999px;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14);
  font-size: .8rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #cfe6f6;
}
.hero__kicker .dot { width: 8px; height: 8px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 0 4px rgba(74,222,128,.2); }
.hero h1 {
  font-size: clamp(2.2rem, 4.6vw, 3.7rem);
  margin: 22px 0 18px;
  line-height: 1.02;
}
.hero h1 em { font-style: normal; color: var(--azzurro); }
.hero__sub { font-size: clamp(1.1rem, 2vw, 1.3rem); color: #c4d7e8; max-width: 560px; }
.hero__sub strong { color: #fff; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.hero__nota { margin-top: 18px; font-size: .9rem; color: #9fb8cf; }
.hero__visual { position: relative; }
.hero__titano { width: 100%; height: auto; filter: drop-shadow(0 30px 60px rgba(0,0,0,.35)); }
.hero__monte {
  position: relative; z-index: 1; margin-top: -2px;
  width: 100%; height: 90px;
  background: linear-gradient(180deg, transparent, rgba(255,255,255,.0));
}
.hero__onda { display: block; width: 100%; height: 70px; margin-top: 40px; }

@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__visual { max-width: 420px; margin: 0 auto; }
}

/* ---------- Strip numeri ---------- */
.numeri { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: -60px; position: relative; z-index: 3; }
.numero {
  background: #fff; border-radius: var(--radius); padding: 24px 22px;
  box-shadow: var(--shadow-l); text-align: center;
  border-top: 4px solid var(--azzurro);
}
.numero b { display: block; font-family: var(--font-display); font-size: 2.4rem; color: var(--notte); line-height: 1; }
.numero span { display: block; margin-top: 8px; color: var(--testo-2); font-weight: 600; font-size: .95rem; }
@media (max-width: 760px) { .numeri { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Blocco storia (Arbe) ---------- */
.arbe { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.arbe__mappa {
  background: var(--notte); border-radius: 24px; padding: 28px; color: #cfe2f2;
  box-shadow: var(--shadow-l); position: relative; overflow: hidden;
}
.arbe__mappa svg { width: 100%; height: auto; }
.arbe__mappa figcaption { font-size: .85rem; color: #8fb0cc; margin-top: 10px; text-align: center; }
.citazione {
  border-left: 4px solid var(--oro);
  padding: 6px 0 6px 20px; margin: 26px 0;
  font-family: var(--font-display); font-size: 1.3rem; color: var(--notte);
}
.citazione small { display: block; font-family: var(--font-body); font-size: .85rem; color: var(--testo-2); margin-top: 6px; letter-spacing: .02em; }
.timeline { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 14px; }
.timeline li { display: grid; grid-template-columns: 74px 1fr; gap: 14px; align-items: baseline; }
.timeline b { font-family: var(--font-display); color: var(--azzurro-profondo); font-size: 1.15rem; }
@media (max-width: 900px) { .arbe { grid-template-columns: 1fr; gap: 36px; } }

/* ---------- Card ---------- */
.griglia { display: grid; gap: 22px; }
.griglia--3 { grid-template-columns: repeat(3, 1fr); }
.griglia--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 960px) { .griglia--3, .griglia--4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .griglia--3, .griglia--4 { grid-template-columns: 1fr; } }
.card {
  background: #fff; border-radius: var(--radius); padding: 28px;
  box-shadow: var(--shadow); border: 1px solid rgba(11,31,51,.06);
}
.card__num {
  width: 46px; height: 46px; border-radius: 14px;
  display: grid; place-items: center;
  background: var(--azzurro-chiaro); color: var(--azzurro-profondo);
  font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; margin-bottom: 16px;
}
.card p:last-child { margin-bottom: 0; }
.card--tema { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: inherit; transition: transform .15s, box-shadow .15s; }
.card--tema:hover { transform: translateY(-4px); box-shadow: var(--shadow-l); }
.card--tema .icona { font-size: 1.6rem; }
.card--tema small { color: var(--testo-2); }

/* ---------- Box autore (marchetta elegante) ---------- */
.autore {
  display: grid; grid-template-columns: 220px 1fr; gap: 44px; align-items: center;
  background: linear-gradient(135deg, #fff 0%, var(--azzurro-chiaro) 100%);
  border-radius: 28px; padding: clamp(28px, 4vw, 48px);
  box-shadow: var(--shadow); border: 1px solid rgba(94,182,228,.35);
}
.autore__foto {
  width: 220px; height: 220px; border-radius: 50%;
  object-fit: cover;
  border: 6px solid #fff; box-shadow: var(--shadow-l);
  background: var(--notte-2);
}
.autore__foto--placeholder {
  display: grid; place-items: center; color: var(--azzurro);
  font-family: var(--font-display); font-size: 3.4rem; letter-spacing: .05em;
}
.autore blockquote { margin: 0; font-size: 1.2rem; color: var(--notte); }
.autore .firma { margin-top: 18px; font-family: var(--font-display); font-size: 1.25rem; color: var(--notte); }
.autore .firma small { display: block; font-family: var(--font-body); font-size: .9rem; color: var(--testo-2); }
.gratis-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--oro-chiaro); color: #6b5310; font-weight: 800; font-size: .82rem;
  letter-spacing: .1em; text-transform: uppercase;
  padding: 7px 14px; border-radius: 999px; margin-bottom: 16px;
}
@media (max-width: 760px) {
  .autore { grid-template-columns: 1fr; text-align: center; }
  .autore__foto { margin: 0 auto; width: 170px; height: 170px; }
}

/* ---------- Disclaimer ---------- */
.disclaimer {
  display: flex; gap: 16px; align-items: flex-start;
  background: #fff; border: 2px dashed var(--pietra-2);
  border-radius: var(--radius); padding: 22px 24px;
  font-size: .95rem; color: var(--testo-2);
}
.disclaimer strong { color: var(--testo); }
.disclaimer svg { flex: 0 0 28px; width: 28px; height: 28px; color: var(--azzurro-profondo); margin-top: 2px; }
.disclaimer p { margin: 0; }
.disclaimer p + p { margin-top: 6px; }

/* ---------- CTA finale ---------- */
.cta-finale {
  background:
    radial-gradient(700px 300px at 80% 0%, rgba(94,182,228,.35), transparent 60%),
    var(--notte);
  border-radius: 28px; padding: clamp(36px, 6vw, 72px);
  color: #fff; text-align: center;
}
.cta-finale h2 { color: #fff; }
.cta-finale p { color: #b9cde0; max-width: 560px; margin: 0 auto 26px; }

/* ---------- Footer ---------- */
.footer { background: var(--notte); color: #9fb8cf; padding: 56px 0 30px; font-size: .92rem; }
.footer a { color: #cfe2f2; text-decoration: none; }
.footer a:hover { color: #fff; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 36px; }
.footer h4 { color: #fff; font-size: .8rem; letter-spacing: .16em; text-transform: uppercase; margin-bottom: 14px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer__fondo { border-top: 1px solid rgba(255,255,255,.1); margin-top: 40px; padding-top: 22px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.bandierina { display: inline-flex; width: 26px; height: 18px; border-radius: 3px; overflow: hidden; flex-direction: column; vertical-align: middle; margin-right: 8px; box-shadow: 0 0 0 1px rgba(255,255,255,.2); }
.bandierina i { flex: 1; background: #fff; }
.bandierina i + i { background: var(--azzurro); }
@media (max-width: 760px) { .footer__grid { grid-template-columns: 1fr; } }

/* ---------- Pagina interna: testata ---------- */
.testata {
  background:
    radial-gradient(900px 400px at 80% 0%, rgba(94,182,228,.3), transparent 60%),
    linear-gradient(180deg, #0b1f33, #12304d);
  color: #fff; padding: clamp(56px, 8vw, 96px) 0 clamp(48px, 7vw, 80px);
}
.testata .eyebrow { color: var(--azzurro); }
.testata h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
.testata p { color: #c4d7e8; max-width: 680px; font-size: 1.12rem; }

/* ---------- Dispense ---------- */
.dispense { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
@media (max-width: 800px) { .dispense { grid-template-columns: 1fr; } }
.dispensa {
  display: grid; grid-template-columns: 56px 1fr; gap: 18px;
  background: #fff; border-radius: var(--radius); padding: 24px;
  box-shadow: var(--shadow); border: 1px solid rgba(11,31,51,.06);
}
.dispensa__n {
  width: 56px; height: 56px; border-radius: 16px;
  background: var(--notte); color: var(--azzurro);
  display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 700; font-size: 1.3rem;
}
.dispensa h3 { margin-bottom: 6px; }
.dispensa p { color: var(--testo-2); font-size: .97rem; margin-bottom: 14px; }
.dispensa__azioni { display: flex; flex-wrap: wrap; gap: 10px; }
.dispensa__azioni a { font-weight: 800; font-size: .9rem; text-decoration: none; padding: 9px 14px; border-radius: 999px; }
.dispensa__azioni .pdf { background: var(--azzurro-chiaro); color: var(--azzurro-profondo); }
.dispensa__azioni .allena { background: var(--pietra); color: var(--notte); }
.gruppo-titolo { display: flex; align-items: center; gap: 14px; margin: 50px 0 20px; }
.gruppo-titolo:first-child { margin-top: 0; }
.gruppo-titolo h2 { margin: 0; font-size: 1.6rem; }
.gruppo-titolo::after { content: ""; flex: 1; height: 2px; background: var(--pietra-2); }

/* ==========================================================
   PRATICA (quiz)
   ========================================================== */
.quiz-shell { max-width: 820px; margin: 0 auto; }
.modi { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
@media (max-width: 760px) { .modi { grid-template-columns: 1fr; } }
.modo {
  background: #fff; border-radius: 22px; padding: 30px;
  box-shadow: var(--shadow); border: 2px solid transparent;
  display: flex; flex-direction: column;
}
.modo--esame { border-color: var(--azzurro); position: relative; }
.modo--esame::before {
  content: "Consigliato"; position: absolute; top: -13px; left: 24px;
  background: var(--azzurro); color: var(--notte);
  font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  padding: 5px 12px; border-radius: 999px;
}
.modo ul { padding-left: 20px; color: var(--testo-2); margin: 0 0 22px; }
.modo .btn { margin-top: auto; }
.opzioni-riga { display: flex; align-items: center; gap: 10px; margin: 0 0 18px; font-weight: 600; font-size: .95rem; }
.opzioni-riga input { width: 20px; height: 20px; accent-color: var(--azzurro-profondo); }
select.tema-select {
  width: 100%; padding: 13px 14px; border-radius: 12px; border: 2px solid var(--pietra-2);
  font: 600 1rem var(--font-body); margin-bottom: 18px; background: #fff; color: var(--testo);
}
.statistiche { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 26px; color: var(--testo-2); font-size: .92rem; }
.statistiche span { background: #fff; border-radius: 999px; padding: 8px 14px; box-shadow: var(--shadow); }

/* barra superiore del quiz */
.quiz-top {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin-bottom: 18px; font-weight: 700; color: var(--testo-2);
}
.timer { font-variant-numeric: tabular-nums; background: var(--notte); color: #fff; border-radius: 999px; padding: 8px 14px; font-size: .95rem; }
.timer.is-basso { background: var(--rosso); }
.pallini { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 26px; }
.pallino {
  width: 34px; height: 34px; border-radius: 50%;
  border: 2px solid var(--pietra-2); background: #fff;
  font: 800 .82rem var(--font-body); color: var(--testo-2); cursor: pointer;
}
.pallino.is-risposto { background: var(--azzurro-chiaro); border-color: var(--azzurro); color: var(--azzurro-profondo); }
.pallino.is-attuale { border-color: var(--notte); background: var(--notte); color: #fff; }
.pallino.is-giusto { background: #dcf3e7; border-color: var(--verde); color: var(--verde); }
.pallino.is-sbagliato { background: #f9e0dd; border-color: var(--rosso); color: var(--rosso); }

.domanda-card {
  background: #fff; border-radius: 24px; padding: clamp(24px, 4vw, 40px);
  box-shadow: var(--shadow-l);
}
.domanda-tema { font-size: .78rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--azzurro-profondo); }
.domanda-testo { font-family: var(--font-body); letter-spacing: 0; font-size: clamp(1.25rem, 2.6vw, 1.55rem); font-weight: 800; margin: 10px 0 24px; line-height: 1.35; }
.risposte { display: grid; gap: 12px; }
.risposta {
  display: grid; grid-template-columns: 38px 1fr; gap: 14px; align-items: center;
  text-align: left; width: 100%;
  padding: 16px 18px; border-radius: 14px;
  border: 2px solid var(--pietra-2); background: #fff;
  font: 600 1.02rem/1.45 var(--font-body); color: var(--testo);
  cursor: pointer; transition: border-color .12s, background .12s, transform .12s;
}
.risposta:hover:not([disabled]) { border-color: var(--azzurro); transform: translateX(2px); }
.risposta .lettera {
  width: 38px; height: 38px; border-radius: 10px;
  display: grid; place-items: center;
  background: var(--pietra); font-weight: 800; color: var(--notte);
}
.risposta.is-scelta { border-color: var(--azzurro-profondo); background: var(--azzurro-chiaro); }
.risposta.is-scelta .lettera { background: var(--azzurro-profondo); color: #fff; }
.risposta.is-giusta { border-color: var(--verde); background: #e3f6ec; }
.risposta.is-giusta .lettera { background: var(--verde); color: #fff; }
.risposta.is-errata { border-color: var(--rosso); background: #fbe7e4; }
.risposta.is-errata .lettera { background: var(--rosso); color: #fff; }
.risposta[disabled] { cursor: default; }

.spiegazione {
  margin-top: 20px; padding: 18px 20px; border-radius: 14px;
  background: var(--pietra); font-size: .98rem;
}
.spiegazione a { font-weight: 700; }
.quiz-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 24px; flex-wrap: wrap; }

/* risultato */
.esito {
  text-align: center; border-radius: 28px; padding: clamp(32px, 5vw, 56px);
  color: #fff; box-shadow: var(--shadow-l);
  background: radial-gradient(600px 300px at 50% 0%, rgba(94,182,228,.45), transparent 70%), var(--notte);
}
.esito--ko { background: radial-gradient(600px 300px at 50% 0%, rgba(201,164,76,.35), transparent 70%), var(--notte); }
.esito__punteggio { font-family: var(--font-display); font-size: clamp(4rem, 12vw, 7rem); line-height: 1; margin: 10px 0; }
.esito__punteggio small { font-size: .4em; color: #9fb8cf; }
.esito h2 { color: #fff; }
.esito .eyebrow { color: var(--azzurro); }
.esito p { color: #c4d7e8; max-width: 520px; margin: 0 auto 24px; }
.esito__azioni { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.revisione { margin-top: 40px; display: grid; gap: 16px; }
.revisione-item { background: #fff; border-radius: 16px; padding: 20px 22px; box-shadow: var(--shadow); border-left: 5px solid var(--verde); }
.revisione-item.is-errata { border-left-color: var(--rosso); }
.revisione-item h4 { font-size: 1.02rem; margin-bottom: 8px; }
.revisione-item p { margin: 4px 0; font-size: .95rem; }
.revisione-item .tua { color: var(--rosso); }
.revisione-item .giusta { color: var(--verde); font-weight: 700; }
.revisione-item .spieg { color: var(--testo-2); }
.grazie {
  margin-top: 36px; text-align: center; background: var(--oro-chiaro); color: #5a4510;
  border-radius: 18px; padding: 22px; font-size: .98rem;
}
.grazie a { color: #5a4510; font-weight: 800; }

/* ---------- Chi sono ---------- */
.bio { display: grid; grid-template-columns: 340px 1fr; gap: 60px; align-items: start; }
.bio__foto { position: sticky; top: 100px; }
.bio__foto .autore__foto { width: 100%; height: auto; aspect-ratio: 1; }
.bio__testo p { font-size: 1.12rem; }
.bio__testo p.grande { font-size: 1.4rem; font-family: var(--font-display); color: var(--notte); line-height: 1.4; }
.valori { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 30px 0; }
.valori div { background: var(--pietra); border-radius: 16px; padding: 20px; }
.valori b { display: block; font-family: var(--font-display); color: var(--azzurro-profondo); font-size: 1.1rem; margin-bottom: 4px; }
@media (max-width: 900px) {
  .bio { grid-template-columns: 1fr; gap: 30px; }
  .bio__foto { position: static; max-width: 260px; margin: 0 auto; }
  .valori { grid-template-columns: 1fr; }
}

/* ---------- Utility ---------- */
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 14px; } .mt-2 { margin-top: 28px; } .mt-3 { margin-top: 48px; }
.nascosto { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* animazione d'ingresso */
.appare { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.appare.is-visibile { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .appare { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ==========================================================
   EFFETTI E COMPONENTI v2
   ========================================================== */

/* Barra di avanzamento della lettura */
.progresso {
  position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 100;
  background: linear-gradient(90deg, #fff, var(--azzurro), var(--oro));
  transform-origin: 0 50%; transform: scaleX(0);
}

/* Hero v2 */
.hero__stelle { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.hero h1 .parola { display: inline-block; opacity: 0; transform: translateY(.5em) rotate(2deg); animation: sale .8s cubic-bezier(.2,.7,.2,1) forwards; }
@keyframes sale { to { opacity: 1; transform: none; } }
.hero__visual { min-height: 0; }
.hero__titano { position: absolute; inset: -30px 0 auto 0; opacity: .95; transition: transform .2s ease-out; }
.hero__anello { transform-origin: 260px 150px; animation: gira 60s linear infinite; }
@keyframes gira { to { transform: rotate(360deg); } }
.hero__stellina { animation: brilla 3s ease-in-out infinite; }
.hero__stellina:nth-child(2n) { animation-delay: 1.2s; }
.hero__stellina:nth-child(3n) { animation-delay: 2.1s; }
@keyframes brilla { 50% { opacity: .15; } }

/* Domanda dimostrativa nell'hero */
.demo {
  position: relative; z-index: 2; margin: 0 0 0 auto; max-width: 460px;
  background: rgba(11, 31, 51, .6);
  backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid rgba(255,255,255,.18); border-radius: 22px;
  padding: 22px; box-shadow: 0 30px 80px rgba(0,0,0,.4);
  animation: fluttua 7s ease-in-out infinite;
}
@keyframes fluttua { 50% { transform: translateY(-8px); } }
.demo__testa { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.demo__tag { font-size: .7rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--azzurro); }
.demo__altra { background: none; border: 0; color: #9fb8cf; font: 700 .8rem var(--font-body); cursor: pointer; padding: 4px; }
.demo__altra:hover { color: #fff; }
.demo__q { font-weight: 800; font-size: 1.05rem; line-height: 1.4; margin: 0 0 14px; color: #fff; }
.demo__opz { display: grid; gap: 8px; }
.demo__opz button {
  text-align: left; padding: 10px 14px; border-radius: 12px;
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14);
  color: #e8f1f8; font: 600 .92rem/1.4 var(--font-body); cursor: pointer;
  transition: background .15s, border-color .15s, transform .15s;
}
.demo__opz button:hover:not([disabled]) { background: rgba(94,182,228,.18); border-color: var(--azzurro); transform: translateX(3px); }
.demo__opz button.ok { background: rgba(31,138,91,.35); border-color: #4ade80; color: #fff; }
.demo__opz button.ko { background: rgba(192,57,43,.35); border-color: #f87171; color: #fff; }
.demo__opz button[disabled] { cursor: default; }
.demo__esito { margin-top: 12px; font-size: .88rem; color: #c4d7e8; min-height: 1em; }
.demo__esito a { color: var(--azzurro); font-weight: 800; }
@media (max-width: 900px) {
  .hero__visual { min-height: 0; }
  .hero__titano { display: none; }
  .demo { margin: 10px auto 0; max-width: none; }
}

/* Nastro scorrevole */
.nastro { background: var(--notte); color: #cfe2f2; overflow: hidden; padding: 18px 0; }
.nastro__traccia { display: flex; width: max-content; animation: scorri 50s linear infinite; }
.nastro:hover .nastro__traccia { animation-play-state: paused; }
.nastro span { white-space: nowrap; padding: 0 26px; font-family: var(--font-display); letter-spacing: .12em; font-size: .95rem; }
.nastro span b { color: var(--azzurro); margin-right: 8px; }
.nastro span::after { content: "\2726"; color: var(--oro); margin-left: 52px; }
@keyframes scorri { to { transform: translateX(-50%); } }

/* Linea del tempo animata */
.linea { position: relative; list-style: none; margin: 0; padding: 0 0 0 38px; }
.linea::before, .linea::after { content: ""; position: absolute; left: 9px; top: 8px; bottom: 30px; width: 2px; border-radius: 2px; }
.linea::before { background: var(--pietra-2); }
.linea::after { background: linear-gradient(var(--azzurro), var(--azzurro-profondo)); transform-origin: top; transform: scaleY(var(--avanzamento, 0)); }
.linea li { position: relative; padding: 0 0 28px; }
.linea li::before {
  content: ""; position: absolute; left: -35px; top: 8px; width: 14px; height: 14px; border-radius: 50%;
  background: #fff; border: 3px solid var(--azzurro); box-shadow: 0 0 0 5px rgba(94,182,228,.18);
}
.linea b { display: block; font-family: var(--font-display); font-size: 1.7rem; color: var(--notte); line-height: 1.1; }
.linea span { color: var(--testo-2); }

/* Riflettore che segue il mouse */
.spot { position: relative; overflow: hidden; isolation: isolate; }
.spot::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .3s;
  background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 50%), rgba(94,182,228,.22), transparent 45%);
}
.spot:hover::before { opacity: 1; }
[data-tilt] { transition: transform .25s ease, box-shadow .25s ease; will-change: transform; }

/* Nota bene */
.notabene {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--oro-chiaro); color: #5a4510; border-radius: var(--radius); padding: 18px 22px; font-size: .95rem;
}
.notabene b { color: #3d2f08; }
.notabene p { margin: 0; }
.notabene--piccolo { font-size: .82rem; padding: 12px 16px; border-radius: 12px; }

/* Foto */
img.autore__foto { object-fit: cover; }

/* Chi sono: social e progetti */
.social-btn {
  display: inline-flex; align-items: center; gap: 10px;
  background: #1877f2; color: #fff; text-decoration: none; font-weight: 800;
  padding: 13px 22px; border-radius: 999px; transition: transform .15s, box-shadow .15s;
}
.social-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(24,119,242,.35); }
.social-btn svg { width: 20px; height: 20px; }
.social-btn--ig { background: linear-gradient(45deg, #f9ce34, #ee2a7b 50%, #6228d7); }
.social-btn--ig:hover { box-shadow: 0 10px 24px rgba(238,42,123,.35); }
.progetti { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 22px 0; }
@media (max-width: 700px) { .progetti { grid-template-columns: 1fr; } }
.progetto {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px;
  background: #fff; border: 1px solid rgba(11,31,51,.08); border-radius: 22px; padding: 26px 22px;
  text-decoration: none; color: var(--testo); box-shadow: var(--shadow);
}
.progetto img { width: 150px; height: 150px; object-fit: contain; }
.progetto h3 { margin: 4px 0 0; }
.progetto p { margin: 0; color: var(--testo-2); font-size: .95rem; }
.progetto .vai { margin-top: 6px; font-weight: 800; color: var(--azzurro-profondo); font-size: .9rem; }
.consiglio {
  display: grid; grid-template-columns: 190px 1fr; gap: 26px; align-items: center;
  background: var(--notte); color: #cfe2f2; border-radius: 22px; padding: 26px 28px; text-decoration: none;
}
.consiglio img { width: 190px; height: auto; }
.consiglio p { margin: 0; }
.consiglio strong { color: #fff; }
.consiglio .vai { color: var(--azzurro); font-weight: 800; display: inline-block; margin-top: 8px; }
@media (max-width: 700px) { .consiglio { grid-template-columns: 1fr; text-align: center; } .consiglio img { margin: 0 auto; } }

/* Firma agenzia nel footer */
.firma-agenzia {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  margin-top: 26px; padding: 16px 18px; border-radius: 16px;
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08);
  text-decoration: none; color: #cfe2f2; font-size: .92rem; text-align: left;
  transition: background .2s, border-color .2s, transform .2s;
}
.firma-agenzia:hover { background: rgba(255,214,0,.08); border-color: rgba(255,214,0,.45); transform: translateY(-2px); color: #fff; }
.firma-agenzia img { width: 54px; height: 54px; border-radius: 12px; transition: transform .3s; }
.firma-agenzia:hover img { transform: rotate(-6deg) scale(1.08); }
.firma-agenzia strong { color: #ffd600; }

/* Coriandoli per la prova superata */
.coriandoli { position: fixed; inset: 0; pointer-events: none; z-index: 200; }

@media (prefers-reduced-motion: reduce) {
  .hero h1 .parola { opacity: 1; transform: none; animation: none; }
  .demo, .hero__anello, .hero__stellina, .nastro__traccia { animation: none; }
}

/* ==========================================================
   LETTURA DEL MATERIALE DI STUDIO
   ========================================================== */
.testata--lettura h1 { max-width: 900px; }
.briciole { display: inline-block; color: #9fb8cf; text-decoration: none; font-weight: 700; font-size: .9rem; margin-bottom: 18px; }
.briciole:hover { color: #fff; }
.lettura-meta { color: #9fb8cf !important; font-size: .95rem !important; margin: 0 0 22px; }
.lettura-azioni { display: flex; flex-wrap: wrap; gap: 12px; }
.lettura-sezione { padding-top: 56px; }

.lettura { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 56px; align-items: start; }
.lettura__indice { position: sticky; top: 96px; max-height: calc(100vh - 120px); overflow: auto; padding-right: 8px; }
.lettura__indice-titolo { font-size: .74rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--azzurro-profondo); margin-bottom: 10px; }
.lettura__indice ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--pietra-2); }
.lettura__indice a {
  display: block; padding: 7px 0 7px 14px; margin-left: -2px; border-left: 2px solid transparent;
  color: var(--testo-2); text-decoration: none; font-size: .88rem; line-height: 1.4; transition: color .15s, border-color .15s;
}
.lettura__indice a:hover { color: var(--notte); }
.lettura__indice a.is-attiva { color: var(--azzurro-profondo); border-left-color: var(--azzurro); font-weight: 700; }
@media (max-width: 960px) {
  .lettura { grid-template-columns: 1fr; gap: 24px; }
  .lettura__indice { position: static; max-height: none; background: var(--pietra); border-radius: 16px; padding: 18px 20px; }
  .lettura__indice--vuoto { display: none; }
}

.testo { max-width: 740px; font-size: 1.08rem; line-height: 1.85; color: #1d2b38; }
.testo p { margin: 0 0 1.15em; }
.testo h2 { font-size: clamp(1.35rem, 2.6vw, 1.75rem); margin: 2.2em 0 .7em; padding-top: .4em; color: var(--notte); scroll-margin-top: 100px; }
.testo h2:first-child { margin-top: 0; }
.testo h3 { font-size: 1.18rem; margin: 1.8em 0 .6em; color: var(--azzurro-profondo); scroll-margin-top: 100px; }
.testo h4 { font-size: 1.02rem; margin: 1.5em 0 .5em; text-transform: uppercase; letter-spacing: .08em; color: var(--testo-2); scroll-margin-top: 100px; }
.testo ul { padding-left: 1.3em; margin: 0 0 1.2em; }
.testo li { margin-bottom: .45em; }
.testo li::marker { color: var(--azzurro); }
.testo hr { border: 0; height: 1px; background: var(--pietra-2); margin: 2em 0; }
.testo .evidenza { font-weight: 700; font-size: 1.02rem; color: var(--azzurro-profondo); border-left: 3px solid var(--azzurro); padding-left: 16px; line-height: 1.5; }
.testo .firma-testo { font-weight: 700; color: var(--testo-2); font-size: .98rem; }
.testo blockquote {
  margin: 1.5em 0; padding: 18px 24px; border-radius: 0 14px 14px 0;
  background: var(--pietra); border-left: 4px solid var(--oro); font-style: italic; color: #3a4754;
}
.testo blockquote p:last-child { margin-bottom: 0; }
.testo figure { margin: 2em 0; }
.testo figure img { border-radius: 12px; box-shadow: var(--shadow); max-height: 560px; width: auto; margin: 0 auto; background: var(--pietra); }
.testo figure.doppia { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.testo figure.doppia figcaption { grid-column: 1 / -1; }
.testo figcaption { font-size: .86rem; color: var(--testo-2); text-align: center; margin-top: 10px; line-height: 1.5; }
.testo a { word-break: break-word; }
.nota-rif a { text-decoration: none; font-weight: 800; color: var(--azzurro-profondo); font-size: .75em; padding: 0 2px; }
.testo .note { margin-top: 3em; padding-top: 1.5em; border-top: 2px solid var(--pietra-2); font-size: .9rem; line-height: 1.65; color: var(--testo-2); }
.testo .note h2 { font-size: 1.1rem; margin-top: 0; }
.testo .note ol { padding-left: 1.4em; }
.testo .note li { margin-bottom: 1em; scroll-margin-top: 100px; }
.testo .note li p { margin: 0 0 .5em; }
.testo .note .torna { text-decoration: none; }
.testo :target { animation: evidenzia 2s ease; }
@keyframes evidenzia { 0%, 40% { background: var(--oro-chiaro); } 100% { background: transparent; } }

.lettura-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 36px; }
.lettura-nav a {
  display: block; padding: 18px 20px; border-radius: 16px; background: #fff; border: 1px solid rgba(11,31,51,.08);
  box-shadow: var(--shadow); text-decoration: none; color: var(--notte); font-weight: 800; line-height: 1.35; transition: transform .15s;
}
.lettura-nav a:hover { transform: translateY(-3px); }
.lettura-nav small { display: block; color: var(--azzurro-profondo); font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 4px; }
.lettura-nav .succ { text-align: right; }
@media (max-width: 600px) { .lettura-nav { grid-template-columns: 1fr; } .lettura-nav .succ { text-align: left; } }

/* Pulsante "Leggi" nelle card delle dispense */
.dispensa__azioni .leggi { background: var(--notte); color: #fff; }
.dispensa__azioni .leggi:hover { background: var(--azzurro-profondo); }

.lettura--senza-indice { grid-template-columns: 1fr; }
.lettura--senza-indice .testo { margin: 0 auto; }

.footer__affiliazione { max-width: 560px; text-align: right; }
@media (max-width: 760px) { .footer__affiliazione { text-align: left; } }

/* Box sponsorizzazioni */
.sponsor {
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  background: #fff; border-radius: 22px; padding: 26px 30px;
  border: 1px solid rgba(201,164,76,.45); box-shadow: var(--shadow);
}
.sponsor h3 { margin: 0 0 6px; font-size: 1.2rem; }
.sponsor p { margin: 0; color: var(--testo-2); }
.sponsor .eyebrow { color: #8a6d1f; margin-bottom: 8px; }
.social-btn--email { background: var(--notte); }
.social-btn--email:hover { box-shadow: 0 10px 24px rgba(11,31,51,.3); }

.btn--icona svg { width: 22px; height: 22px; flex: 0 0 22px; }
.footer__affiliazione { font-size: .8rem; line-height: 1.5; }

.hero__nota strong { color: #fff; }
