/* Bookflow · landing per studenti e famiglie
   Layout: colonna centrale 1120px; hero a due colonne (testo a sinistra, mockup a destra).
   Linguaggio visivo: vetro smerigliato su fondi azzurri sfumati (aurora), una fascia nel blu Bookflow (i numeri)
   e un riquadro sfumato di chiusura. Animazioni sobrie: numeri che contano, mockup che fluttua, card che entrano. */

@font-face {
  font-family: "Inter";
  src: url("../assets/fonts/inter-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("../assets/fonts/instrument-serif-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

:root {
  color-scheme: light;
  /* colore */
  --ink: #0e1a2b;
  --ink-soft: #46566b;
  --ink-faint: #6a7a8f;
  --ink-body: #2f3e52;      /* testo lungo delle pagine legali */
  --paper: #ffffff;
  --mist: #f3f8ff;
  --mist-2: #e8f2ff;
  --line: #dbe6f4;
  --brand: #289cff;
  --brand-deep: #007ae3;
  --brand-ink: #0058b0;     /* blu Bookflow scuro per fondi con testo bianco */
  --brand-light: #63b7ff;
  --link: #0068c4;
  --navy: #0b2a5b;          /* solo per i pin della mappa */
  /* mappa: fasce di colore delle regioni, bordi, pin (cambiano col tema) */
  --map-0: #e8edf4; --map-1: #d4e8fc; --map-2: #a8d2f8; --map-3: #5da9ef; --map-4: #1a78dd; --map-line: #ffffff;
  --pin: #0b2a5b; --pin-ring: #ffffff; --pin-text: #ffffff;
  --ok: #128a52;
  --gold: #f5a623;
  --gradient: linear-gradient(135deg, #007ae3 11%, #289cff 49%, #63b7ff 87%);
  --gradient-deep: linear-gradient(135deg, #0058b0 0%, #007ae3 45%, #2b95f2 100%);
  /* vetro */
  --glass-bg: rgba(255, 255, 255, .58);
  --glass-border: rgba(255, 255, 255, .85);
  --glass-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 1px 2px rgba(11, 42, 91, .04), 0 12px 32px rgba(11, 42, 91, .09);
  --glass-blur: blur(18px) saturate(1.7);
  /* tipografia */
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Instrument Serif", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --fs-body: 1.125rem;
  --fs-small: 0.9375rem;
  --fs-h1: clamp(2.5rem, 1.6rem + 3.6vw, 4.25rem);
  --fs-h2: clamp(2rem, 1.4rem + 2.2vw, 3rem);
  /* forma */
  --radius: 20px;
  --radius-lg: 28px;
  --shadow: 0 1px 2px rgba(14, 26, 43, .04), 0 8px 28px rgba(11, 42, 91, .08);
  --shadow-lift: 0 2px 4px rgba(14, 26, 43, .05), 0 18px 48px rgba(11, 42, 91, .14);
  --ease: cubic-bezier(.22, .61, .36, 1);
  --spring: cubic-bezier(.34, 1.36, .64, 1);
  --wrap: 1120px;
  --gutter-l: max(20px, env(safe-area-inset-left, 0px));
  --gutter-r: max(20px, env(safe-area-inset-right, 0px));
  --header-h: 68px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--sans); font-size: var(--fs-body); line-height: 1.6;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
@supports (overflow: clip) { body { overflow-x: clip; } }
img, video { max-width: 100%; display: block; }
a { color: var(--link); text-underline-offset: 3px; }
a:hover { color: var(--brand-deep); }
button { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; text-wrap: balance; letter-spacing: -0.025em; line-height: 1.12; font-weight: 700; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.serif { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 1.12em; letter-spacing: -0.01em; color: var(--brand-deep); }
.wrap { position: relative; width: 100%; max-width: calc(var(--wrap) + 40px); margin-inline: auto; padding-left: var(--gutter-l); padding-right: var(--gutter-r); }
.section { position: relative; padding-block: clamp(72px, 9vw, 120px); }
.section--mist { --sec-bg: var(--mist); }
.section-head { display: grid; gap: 14px; max-width: 680px; justify-items: start; }
.section-head h2 { font-size: var(--fs-h2); }
.section-head > p { color: var(--ink-soft); font-size: 1.1875rem; }

.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; }
.skip:focus { top: 12px; color: #fff; }

/* ---------- vetro e sfondi ---------- */
.glass {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-shadow);
}
.glass-dark {
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .28);
  -webkit-backdrop-filter: blur(16px) saturate(1.4); backdrop-filter: blur(16px) saturate(1.4);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 16px 40px rgba(0, 40, 100, .18);
}
/* macchie di colore sfocate dietro al vetro */
.aurora { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.aurora span { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .7; animation: float-blob 18s ease-in-out infinite; }
.aurora span:nth-child(1) { width: 46vw; max-width: 620px; aspect-ratio: 1; right: -10%; top: -18%; background: radial-gradient(circle, #9fd2ff 0%, rgba(159, 210, 255, 0) 70%); }
.aurora span:nth-child(2) { width: 38vw; max-width: 520px; aspect-ratio: 1; left: -12%; bottom: -20%; background: radial-gradient(circle, #c4e2ff 0%, rgba(196, 226, 255, 0) 70%); animation-delay: -6s; }
.aurora span:nth-child(3) { width: 30vw; max-width: 420px; aspect-ratio: 1; left: 38%; top: 30%; background: radial-gradient(circle, #d9ecff 0%, rgba(217, 236, 255, 0) 70%); animation-delay: -12s; }
.aurora--soft span { opacity: .5; }
@keyframes float-blob { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(3%, 4%) scale(1.05); } }
.section > .wrap, .hero > .wrap, .press > .wrap, .press > .marquee { z-index: 1; }

.chip { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px; font-size: 0.875rem; font-weight: 600; color: var(--link); }
.chip svg { width: 17px; height: 17px; }

/* ---------- pulsanti ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; padding: 0 30px; border-radius: 999px; border: 0;
  font-size: 1.0625rem; font-weight: 600; text-decoration: none; cursor: pointer;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background-color .2s var(--ease);
}
.btn--primary { background: var(--gradient); color: #fff; box-shadow: 0 10px 26px rgba(0, 122, 227, .28), inset 0 1px 0 rgba(255, 255, 255, .25); }
.btn--primary:hover { color: #fff; transform: translateY(-1px); box-shadow: 0 14px 32px rgba(0, 122, 227, .34); }
.btn--ghost { background: rgba(255, 255, 255, .7); color: var(--link); box-shadow: inset 0 0 0 1.5px var(--brand); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.btn--ghost:hover { background: var(--mist); }
.btn--small { min-height: 44px; padding: 0 20px; font-size: 0.9375rem; }
.btn svg { width: 18px; height: 18px; flex: none; }

/* ---------- header ---------- */
.header { position: fixed; inset: 0 0 auto; z-index: 50; padding-top: env(safe-area-inset-top, 0px); transition: background-color .3s var(--ease), box-shadow .3s var(--ease); }
.header.is-scrolled { background: rgba(255, 255, 255, .7); box-shadow: 0 1px 0 rgba(255, 255, 255, .8) inset, 0 1px 0 rgba(11, 42, 91, .06), 0 8px 24px rgba(11, 42, 91, .05); -webkit-backdrop-filter: saturate(1.8) blur(18px); backdrop-filter: saturate(1.8) blur(18px); }
.header__bar { display: flex; align-items: center; gap: 28px; height: var(--header-h); }
.header__logo { display: flex; align-items: center; flex: none; }
.header__logo img { height: 34px; width: auto; }
.header__nav { display: flex; gap: 26px; margin-left: auto; }
.header__nav a { color: var(--ink); text-decoration: none; font-size: 1rem; font-weight: 500; }
.header__nav a:hover { color: var(--link); }
.header__actions { display: flex; align-items: center; gap: 18px; }
.header__login { font-size: 1rem; font-weight: 500; color: var(--ink-soft); text-decoration: none; }
.header__cta { opacity: 0; transform: translateY(-4px); pointer-events: none; transition: opacity .25s var(--ease), transform .25s var(--ease); }
.header.show-cta .header__cta { opacity: 1; transform: none; pointer-events: auto; }
@media (max-width: 860px) {
  .header__nav, .header__login { display: none; }
  .header__actions { margin-left: auto; }
  .header__logo img { height: 30px; }
}

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; padding-top: calc(var(--header-h) + clamp(28px, 6vw, 64px)); padding-bottom: clamp(56px, 7vw, 96px); --sec-bg: linear-gradient(180deg, #eef6ff 0%, #f6faff 60%, var(--paper) 100%); --fade-top: 0px; }
.hero__dots { position: absolute; inset: 0; pointer-events: none; background-image: radial-gradient(rgba(0, 104, 196, .13) 1px, transparent 1.2px); background-size: 22px 22px; -webkit-mask-image: radial-gradient(ellipse 60% 60% at 75% 45%, #000 20%, transparent 75%); mask-image: radial-gradient(ellipse 60% 60% at 75% 45%, #000 20%, transparent 75%); }
.hero__grid { position: relative; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); align-items: center; gap: clamp(24px, 4vw, 56px); }
.hero__copy { display: grid; gap: 26px; justify-items: start; }
.hero h1 { font-size: var(--fs-h1); line-height: 1.04; letter-spacing: -0.035em; max-width: 14ch; }
.hero__lead { font-size: clamp(1.1875rem, 1.05rem + .5vw, 1.375rem); color: var(--ink-soft); max-width: 34ch; line-height: 1.55; }
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; }
.hero__note { font-size: var(--fs-small); color: var(--ink-soft); display: flex; align-items: center; gap: 8px; }
.hero__note svg { width: 18px; height: 18px; color: var(--ok); flex: none; }
.hero__school { display: inline-flex; align-items: center; gap: 8px; margin-top: -6px; font-size: 1rem; font-weight: 600; color: var(--link); text-decoration: none; padding: 6px 2px; }
.hero__school svg { width: 17px; height: 17px; transition: transform .3s var(--ease); }
.hero__school:hover { color: var(--brand-deep); text-decoration: underline; text-underline-offset: 4px; }
.hero__school:hover svg { transform: translateY(3px); }

.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; max-width: 560px; margin-top: 6px; padding: 18px 6px; border-radius: 24px; }
.stat { display: grid; gap: 4px; justify-items: start; padding: 2px 22px; }
.stat + .stat { border-left: 1px solid rgba(0, 104, 196, .14); }
.stat__num { font-size: clamp(1.75rem, 1.3rem + 1.4vw, 2.375rem); font-weight: 750; letter-spacing: -0.04em; line-height: 1.05; font-variant-numeric: tabular-nums; background: linear-gradient(135deg, #0058b0, #007ae3 55%, #289cff); -webkit-background-clip: text; background-clip: text; color: transparent; white-space: nowrap; }
.stat__num small { font-size: .5em; font-weight: 600; letter-spacing: 0; margin-left: 3px; }
.stat__label { display: inline-flex; align-items: center; gap: 5px; font-size: 0.875rem; color: var(--ink-soft); line-height: 1.35; }
.stat__star { width: 14px; height: 14px; color: var(--gold); flex: none; }

.hero__visual { position: relative; display: flex; justify-content: center; align-items: center; min-height: 0; }
.hero__glow { position: absolute; width: 78%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(40, 156, 255, .35) 0%, rgba(99, 183, 255, .15) 40%, transparent 70%); filter: blur(30px); }
.hero__mock { position: relative; width: min(128%, 640px); max-width: none; margin-right: -14%; height: auto; filter: drop-shadow(0 40px 50px rgba(11, 42, 91, .22)); animation: hover-float 7s ease-in-out infinite; transform-origin: 50% 60%; will-change: transform; }
@keyframes hover-float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-16px) rotate(-1.2deg); }
}
.js .hero__mock { opacity: 0; animation: mock-in 1s var(--ease) .15s forwards, hover-float 7s ease-in-out 1.15s infinite; }
@keyframes mock-in { from { opacity: 0; transform: translateY(30px) scale(.97); } to { opacity: 1; transform: none; } }

@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero h1 { max-width: 16ch; }
  .hero__mock { width: min(100%, 480px); margin-right: 0; }
}
@media (max-width: 480px) {
  .stats { padding: 14px 2px; border-radius: 20px; }
  .stat { padding: 2px 12px; }
  .stat__label { font-size: 0.8125rem; }
  .stat__star { display: none; }
}

/* ---------- rassegna ---------- */
.press { position: relative; overflow: hidden; padding-block: clamp(48px, 6vw, 72px) clamp(56px, 7vw, 88px); --sec-bg: linear-gradient(180deg, #e3f0ff 0%, #eef6ff 100%); }
.press__head { margin-bottom: clamp(28px, 4vw, 44px); }
.section-head--center { margin-inline: auto; text-align: center; justify-items: center; }
.press__head .section-head { max-width: 640px; }
.marquee { position: relative; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); }
.marquee__track { display: flex; gap: 16px; width: max-content; animation: marquee 50s linear infinite; padding-block: 14px 22px; }
.marquee:hover .marquee__track, .marquee:focus-within .marquee__track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(calc(-50% - 8px)); } }
.press-logo { display: grid; place-items: center; flex: none; width: 232px; height: 104px; padding: 16px 26px; border-radius: 22px; cursor: pointer; transition: transform .25s var(--ease), box-shadow .25s var(--ease), background-color .25s var(--ease); }
.press-logo img { max-width: 100%; max-height: var(--h, 30px); width: auto; height: auto; filter: grayscale(1) contrast(1.1); opacity: .75; transition: filter .25s var(--ease), opacity .25s var(--ease); }
.press-logo:hover, .press-logo:focus-visible { transform: translateY(-4px); background: rgba(255, 255, 255, .85); box-shadow: inset 0 1px 0 #fff, 0 18px 40px rgba(0, 122, 227, .18); }
.press-logo:hover img, .press-logo:focus-visible img { filter: none; opacity: 1; }
@media (max-width: 520px) { .press-logo { width: 200px; height: 92px; } .marquee__track { animation-duration: 30s; } }

/* dialog */
dialog.sheet { border: 0; padding: 0; width: min(560px, calc(100% - 32px)); border-radius: 24px; background: var(--paper); color: var(--ink); box-shadow: 0 30px 80px rgba(11, 42, 91, .3); }
dialog.sheet[open] { animation: pop .35s var(--spring); }
@keyframes pop { from { opacity: 0; transform: translateY(16px) scale(.97); } }
dialog.sheet::backdrop { background: rgba(11, 27, 46, .4); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.sheet__inner { position: relative; display: grid; gap: 14px; padding: 30px 28px 28px; border-top: 4px solid transparent; border-image: var(--gradient) 1; border-image-width: 4px 0 0 0; }
.sheet__outlet { font-family: var(--serif); font-style: italic; font-size: 1.625rem; color: var(--brand-deep); padding-right: 40px; line-height: 1.2; }
.sheet__title { font-size: 1.3125rem; line-height: 1.3; }
.sheet__text { color: var(--ink-soft); }
.sheet__close { position: absolute; top: 18px; right: 18px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--mist); display: grid; place-items: center; cursor: pointer; }
.sheet__close svg { width: 18px; height: 18px; }
.sheet .btn { justify-self: start; margin-top: 6px; }

/* ---------- numeri (blu Bookflow) ---------- */
.facts { overflow: hidden; --sec-bg: var(--gradient-deep); color: #fff; }
.facts__bg { position: absolute; inset: 0; pointer-events: none; overflow: hidden;
  background: radial-gradient(circle at 85% 20%, rgba(255, 255, 255, .18) 0, rgba(255, 255, 255, 0) 38%),
              radial-gradient(circle at 5% 100%, rgba(99, 183, 255, .5) 0, rgba(99, 183, 255, 0) 42%); }
.facts__mark { position: absolute; width: clamp(340px, 32vw, 480px); max-width: none; height: auto; right: 4%; top: 24%; opacity: .16; transform: rotate(-8deg); filter: drop-shadow(0 20px 40px rgba(0, 30, 80, .25)); }
.js .facts__mark { transition: transform 1.6s var(--ease), opacity 1.6s var(--ease); transform: rotate(-14deg) translateX(6%); opacity: 0; }
.js .facts.is-in .facts__mark { transform: rotate(-8deg); opacity: .16; }
@media (max-width: 700px) { .facts__mark { width: 300px; right: -18%; top: 9%; } }
.facts__rings::before { width: 520px; height: 520px; right: -160px; top: -200px; box-shadow: 0 0 0 70px rgba(255, 255, 255, .04), 0 0 0 140px rgba(255, 255, 255, .03); }
.facts__rings::after { width: 300px; height: 300px; left: -120px; bottom: -150px; }
.facts .section-head h2 { color: #fff; }
.facts .section-head > p { color: rgba(255, 255, 255, .88); }
.facts__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 48px; }
.fact { position: relative; overflow: hidden; display: grid; align-content: start; gap: 10px; padding: 26px 24px 24px; border-radius: 24px; transition: translate .35s var(--ease), background-color .35s var(--ease), border-color .35s var(--ease), box-shadow .35s var(--ease); }
.fact__num { font-size: clamp(2.5rem, 1.9rem + 2vw, 3.5rem); font-weight: 750; letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fact__num small { display: block; font-size: 1rem; font-weight: 600; letter-spacing: 0; margin-bottom: 6px; color: rgba(255, 255, 255, .85); }
.fact__text { color: #fff; font-size: 1.0625rem; line-height: 1.5; }
.fact__src { font-size: 0.8125rem; color: rgba(255, 255, 255, .78); margin-top: auto; }
.js .fact { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease) calc(var(--i) * 110ms), transform .7s var(--ease) calc(var(--i) * 110ms), translate .35s var(--ease), background-color .35s var(--ease), border-color .35s var(--ease), box-shadow .35s var(--ease); }
.js .facts.is-in .fact { opacity: 1; transform: none; }
@media (max-width: 960px) { .facts__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .facts__grid { grid-template-columns: 1fr; gap: 12px; } }

/* ---------- come funziona ---------- */
.how { overflow: hidden; --sec-bg: linear-gradient(180deg, var(--paper) 0%, var(--mist) 100%); }
.how__top { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 24px; }
.toggle { position: relative; display: grid; grid-template-columns: 1fr 1fr; padding: 6px; border-radius: 999px; }
.toggle__pill { position: absolute; top: 6px; bottom: 6px; left: 6px; width: calc(50% - 6px); border-radius: 999px; background: var(--gradient); box-shadow: 0 8px 22px rgba(0, 122, 227, .35), inset 0 1px 0 rgba(255, 255, 255, .35); transition: transform .5s var(--spring); }
.toggle[data-active="vendere"] .toggle__pill { transform: translateX(100%); }
.toggle button { position: relative; z-index: 1; min-height: 50px; padding: 0 26px; border: 0; border-radius: 999px; background: transparent; font-weight: 600; font-size: 1rem; color: var(--ink-soft); cursor: pointer; white-space: nowrap; transition: color .35s var(--ease); }
.toggle button[aria-pressed="true"] { color: #fff; }
.toggle button:not([aria-pressed="true"]):hover { color: var(--ink); }
.how__body { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(36px, 7vw, 96px); align-items: center; margin-top: 56px; }
.how__phone { position: relative; display: grid; justify-items: center; gap: 16px; padding-inline: 20px; transition: opacity .3s var(--ease), transform .3s var(--ease); }
.how__phone.is-switching { opacity: 0; transform: scale(.96) translateY(8px); }
.how__phone::before { content: ""; position: absolute; inset: 6% 0 12%; border-radius: 40%; background: radial-gradient(closest-side, rgba(40, 156, 255, .28), transparent); filter: blur(10px); z-index: -1; }
.phone { position: relative; width: var(--phone-w, 300px); aspect-ratio: 640 / 1309; flex: none; filter: drop-shadow(0 30px 50px rgba(11, 42, 91, .22)) drop-shadow(0 8px 14px rgba(11, 42, 91, .10)); }
.phone__screen { position: absolute; inset: 1.8% 5.4%; border-radius: 10% / 4.9%; overflow: hidden; background: #fbfbfb; }
.phone__screen img, .phone__screen video { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.phone__frame { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.how .phone { --phone-w: clamp(240px, 24vw, 300px); }
.video-ctl { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 18px; border-radius: 999px; cursor: pointer; font-size: 0.875rem; font-weight: 600; color: var(--link); }
.video-ctl svg { width: 15px; height: 15px; }
.how__caption { display: none; }
@media (max-width: 700px) {
  .how__body { margin-top: 28px; gap: 0; }
  .how .phone { --phone-w: min(58vw, 232px); }
  .how__phone { gap: 14px; padding-inline: 0; }
  .how .video-ctl, .how .steps { display: none; }
  .how__caption { display: grid; grid-template-columns: 36px minmax(0, 1fr) 40px; align-items: center; gap: 4px 12px; width: 100%; padding: 12px 10px 12px 12px; border-radius: 18px; }
  .how__caption-n { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 1rem; background: var(--gradient); color: #fff; box-shadow: 0 6px 14px rgba(0, 122, 227, .3); }
  .how__caption-t { font-size: 1.0625rem; font-weight: 650; line-height: 1.3; letter-spacing: -0.01em; transition: opacity .25s var(--ease), transform .25s var(--ease); }
  .how__caption-t.is-changing { opacity: 0; transform: translateY(6px); }
  .how__caption-ctl { width: 40px; height: 40px; border-radius: 50%; border: 0; display: grid; place-items: center; background: rgba(255, 255, 255, .8); color: var(--link); box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; }
  .how__caption-ctl svg { width: 14px; height: 14px; }
  .how__caption-bar { grid-column: 1 / -1; height: 4px; border-radius: 4px; background: rgba(0, 122, 227, .12); overflow: hidden; }
  .how__caption-bar i { display: block; height: 100%; width: calc(var(--p, 0) * 100%); background: var(--gradient); border-radius: 4px; }
}

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.step button {
  width: 100%; text-align: left; display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 4px 18px; align-items: start;
  padding: 22px 24px; border-radius: var(--radius); border: 1px solid transparent; background: transparent; cursor: pointer;
  transition: background-color .35s var(--ease), border-color .35s var(--ease), box-shadow .35s var(--ease), transform .35s var(--ease);
}
.step__n { grid-row: span 2; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 1.0625rem; background: rgba(255, 255, 255, .7); color: var(--link); box-shadow: inset 0 0 0 1px var(--line); transition: background .3s var(--ease), color .3s var(--ease); }
.step__t { font-size: 1.25rem; font-weight: 650; letter-spacing: -0.015em; line-height: 1.3; padding-top: 8px; }
.step__d { color: var(--ink-soft); font-size: 1.0625rem; line-height: 1.55; }
.step__bar { grid-column: 2; height: 4px; border-radius: 4px; background: rgba(0, 122, 227, .12); overflow: hidden; margin-top: 10px; opacity: 0; transition: opacity .3s var(--ease); }
.step__bar i { display: block; height: 100%; width: calc(var(--p, 0) * 100%); background: var(--gradient); border-radius: 4px; }
.step[aria-current="step"] button { background: var(--glass-bg); border-color: var(--glass-border); box-shadow: var(--glass-shadow); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); transform: translateX(4px); }
.step[aria-current="step"] .step__n { background: var(--gradient); color: #fff; box-shadow: 0 6px 16px rgba(0, 122, 227, .3); }
.step[aria-current="step"] .step__bar { opacity: 1; }
.step:not([aria-current="step"]) button:hover { background: rgba(255, 255, 255, .5); }

.feats { margin-top: 72px; }
.feats__title { font-size: 1.125rem; font-weight: 650; color: var(--ink-soft); letter-spacing: -0.01em; margin-bottom: 18px; }
.feats__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.feat { position: relative; display: grid; gap: 8px; align-content: start; padding: 24px 22px; border-radius: 24px; overflow: hidden; transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.feat::before { content: ""; position: absolute; width: 140px; height: 140px; right: -50px; top: -60px; border-radius: 50%; background: radial-gradient(circle, rgba(99, 183, 255, .3), transparent 70%); transition: transform .5s var(--ease); }
.feat:hover { transform: translateY(-6px); box-shadow: inset 0 1px 0 #fff, 0 22px 44px rgba(0, 122, 227, .16); }
.feat:hover::before { transform: scale(1.4); }
.feat__icon { position: relative; width: 48px; height: 48px; border-radius: 15px; display: grid; place-items: center; background: var(--gradient); color: #fff; margin-bottom: 8px; box-shadow: 0 10px 20px rgba(0, 122, 227, .28), inset 0 1px 0 rgba(255, 255, 255, .3); transition: transform .4s var(--spring); }
.feat:hover .feat__icon { transform: rotate(-8deg) scale(1.06); }
.feat__icon svg { width: 24px; height: 24px; }
.feat b { position: relative; font-size: 1.0625rem; font-weight: 650; line-height: 1.35; }
.feat p { position: relative; color: var(--ink-soft); font-size: 1rem; line-height: 1.5; }
/* entrata a cascata quando si cambia modalità */
.enter > * , .enter .feat { animation: enter .55s var(--ease) both; animation-delay: calc(var(--i, 0) * 80ms); }
@keyframes enter { from { opacity: 0; transform: translateY(16px); } }
@media (max-width: 960px) {
  .how__body { grid-template-columns: 1fr; margin-top: 36px; }
  .feats__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .toggle { width: 100%; }
  .toggle button { padding: 0 10px; font-size: 0.9375rem; }
  .step button { padding: 18px 16px; grid-template-columns: 38px minmax(0, 1fr); gap: 4px 14px; }
  .step[aria-current="step"] button { transform: none; }
  .step__n { width: 38px; height: 38px; font-size: 1rem; }
  .step__t { font-size: 1.125rem; padding-top: 6px; }
  .feats { margin-top: 52px; }
  .feats__grid { grid-template-columns: 1fr; gap: 12px; }
  .feat { grid-template-columns: 48px minmax(0, 1fr); column-gap: 16px; padding: 18px; }
  .feat__icon { grid-row: span 2; margin: 0; }
}

/* ---------- scuola ---------- */
.school__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: clamp(32px, 5vw, 64px); margin-top: 44px; align-items: start; }
.search { position: relative; }
.search label { display: block; font-weight: 600; font-size: 1rem; margin-bottom: 10px; }
.search__field { position: relative; }
.search__field svg { position: absolute; left: 20px; top: 50%; translate: 0 -50%; width: 22px; height: 22px; color: var(--ink-faint); pointer-events: none; }
.search input {
  width: 100%; min-height: 62px; padding: 0 22px 0 56px; border-radius: 18px; border: 1.5px solid var(--line); background: var(--mist);
  font: inherit; font-size: 1.125rem; color: var(--ink); box-shadow: inset 0 1px 2px rgba(11, 42, 91, .04);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease), background-color .2s var(--ease);
}
.search input::placeholder { color: #8090a4; }
.search input:focus { outline: none; background: var(--paper); border-color: var(--brand); box-shadow: 0 0 0 4px rgba(40, 156, 255, .18); }
.results { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 8px); margin: 0; padding: 6px; list-style: none; background: rgba(255, 255, 255, .9); border-radius: 18px; box-shadow: 0 18px 50px rgba(11, 42, 91, .2); max-height: 380px; overflow-y: auto; }
.results li { padding: 12px 14px; border-radius: 12px; cursor: pointer; display: grid; gap: 2px; }
.results li[aria-selected="true"], .results li:hover { background: var(--mist-2); }
.results .r-name { font-weight: 600; font-size: 1.0625rem; line-height: 1.35; }
.results .r-place { font-size: 0.9375rem; color: var(--ink-soft); }
.results .r-code { font-size: 0.8125rem; color: var(--ink-faint); margin-left: 6px; font-variant-numeric: tabular-nums; }
.results .r-empty { cursor: default; color: var(--ink-soft); }
.results .r-empty:hover { background: none; }
.search__help { margin-top: 12px; font-size: 0.9375rem; color: var(--ink-soft); }

.school-card { position: relative; overflow: hidden; margin-top: 24px; padding: 28px; border-radius: var(--radius-lg); background: linear-gradient(160deg, #f4f9ff, #ffffff 55%); box-shadow: var(--shadow-lift); border: 1px solid var(--line); display: grid; gap: 14px; animation: pop .5s var(--spring); }
.school-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: var(--gradient); }
.school-card__name { font-weight: 650; font-size: 1.0625rem; color: var(--link); line-height: 1.35; }
.school-card__place { font-size: 0.9375rem; color: var(--ink-soft); margin-top: -10px; }
.school-card h3 { font-size: 1.625rem; line-height: 1.25; }
.school-card p { color: var(--ink-soft); }
.books-pill { display: inline-flex; align-items: center; gap: 8px; width: fit-content; padding: 8px 14px; border-radius: 999px; background: var(--mist-2); color: var(--link); font-weight: 600; font-size: 0.9375rem; }
.books-pill svg { width: 18px; height: 18px; }
.school-card__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; }
.school-card__login { font-size: 0.9375rem; color: var(--ink-soft); }
.share-alt { display: flex; flex-wrap: wrap; gap: 10px; }

.school-placeholder { margin-top: 24px; padding: 24px; border-radius: var(--radius); background: var(--mist); border: 1.5px dashed #c6d9f0; color: var(--ink-soft); font-size: 1rem; display: grid; gap: 6px; }
.school-placeholder b { color: var(--ink); }

.map-box { display: grid; gap: 14px; }
.map-stats { display: flex; flex-wrap: wrap; gap: 8px 28px; }
.map-stats div { display: flex; align-items: baseline; gap: 8px; }
.map-stats strong { font-size: 1.5rem; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.map-stats span { font-size: 0.9375rem; color: var(--ink-soft); }
.map-frame { position: relative; height: clamp(400px, 44vw, 520px); border-radius: var(--radius-lg); overflow: hidden; background: #eef4fb; box-shadow: inset 0 0 0 1px var(--line); }
.map { position: absolute; inset: 0; background: transparent; font-family: var(--sans); }
.map-hint { position: absolute; left: 14px; bottom: 14px; z-index: 500; padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, .8); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); font-size: 0.8125rem; color: var(--ink-soft); box-shadow: 0 2px 8px rgba(0, 0, 0, .08); pointer-events: none; }
.map-msg { position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; text-align: center; color: var(--ink-soft); font-size: 1rem; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 0.875rem; color: var(--ink-soft); align-items: center; }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend i { width: 18px; height: 11px; border-radius: 3px; display: inline-block; }
.legend i.dot { width: 12px; height: 12px; border-radius: 50%; background: var(--pin); box-shadow: 0 0 0 2px var(--pin-ring), 0 1px 3px rgba(0,0,0,.3); }
.legend .lg-0 { background: var(--map-0); } .legend .lg-1 { background: var(--map-1); } .legend .lg-2 { background: var(--map-2); } .legend .lg-3 { background: var(--map-3); } .legend .lg-4 { background: var(--map-4); }
.map-note { font-size: 0.8125rem; color: var(--ink-faint); }
@media (max-width: 900px) { .school__grid { grid-template-columns: 1fr; } }

/* Leaflet: stile Bookflow */
.map.leaflet-container { background: transparent; font-family: var(--sans); }
.bf-pin { background: var(--pin); border: 2.5px solid var(--pin-ring); border-radius: 50%; box-shadow: 0 2px 6px rgba(11, 42, 91, .45); }
.leaflet-marker-icon.bf-cluster { background: var(--pin); color: var(--pin-text); border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 14px; border: 3px solid rgba(255, 255, 255, .9); box-shadow: 0 3px 10px rgba(11, 42, 91, .4); }
.bf-cluster span { line-height: 1; }
.bf-tip { background: var(--ink); color: var(--paper); border: 0; border-radius: 8px; padding: 6px 10px; font-size: 13px; box-shadow: 0 4px 14px rgba(0,0,0,.2); }
.bf-tip::before { display: none; }
.bf-popup .leaflet-popup-content-wrapper { border-radius: 16px; box-shadow: 0 12px 34px rgba(11, 42, 91, .22); }
.bf-popup .leaflet-popup-content { margin: 14px 16px; font-size: 14px; line-height: 1.45; color: var(--ink); }
.bf-pop-t { font-weight: 700; font-size: 15px; margin: 0; }
.bf-pop-s { color: var(--ink-soft); font-size: 12.5px; margin: 0 0 8px; }
.bf-pop ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; max-height: 210px; overflow-y: auto; }
.bf-pop-row { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.bf-chip { flex: none; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--mist-2); color: var(--link); white-space: nowrap; }
.bf-chip-dark { background: var(--pin); color: var(--pin-text); }
.leaflet-control-zoom a { width: 36px !important; height: 36px !important; line-height: 34px !important; color: var(--ink) !important; }
.leaflet-bar { border: 0 !important; box-shadow: 0 2px 10px rgba(11, 42, 91, .16) !important; border-radius: 12px !important; overflow: hidden; }

/* ---------- recensioni ---------- */
.reviews { overflow: hidden; --sec-bg: linear-gradient(160deg, #dcecff 0%, #eef6ff 50%, #e2f0ff 100%); }
.reviews .aurora span { opacity: .9; }
.rev { position: relative; z-index: 1; margin-top: 44px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); align-items: center; gap: clamp(28px, 5vw, 64px); padding: clamp(28px, 4vw, 48px); border-radius: 32px; overflow: hidden; }
.rev__score { position: relative; display: grid; gap: 14px; justify-items: start; }
.rev__num { display: flex; align-items: baseline; gap: 12px; font-size: clamp(4rem, 3rem + 4vw, 6.5rem); font-weight: 750; letter-spacing: -0.05em; line-height: .9; font-variant-numeric: tabular-nums; background: linear-gradient(135deg, #0058b0, #007ae3 50%, #289cff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.rev__num small { font-size: 1.125rem; font-weight: 600; letter-spacing: 0; color: var(--ink-soft); -webkit-text-fill-color: var(--ink-soft); }
.rev__stars { position: relative; display: inline-block; line-height: 0; }
.rev__stars-base, .rev__stars-fill { display: flex; gap: 6px; }
.rev__stars svg { width: 34px; height: 34px; flex: none; }
.rev__stars-base { color: rgba(14, 26, 43, .12); }
.rev__stars-fill { position: absolute; inset: 0; color: var(--gold); width: 90%; overflow: hidden; filter: drop-shadow(0 4px 8px rgba(245, 166, 35, .35)); }
.js .rev__stars-fill { width: 0; transition: width 1.6s var(--ease) .2s; }
.js .rev.is-in .rev__stars-fill { width: 90%; }
.rev__cap { font-size: 1rem; color: var(--ink-soft); font-weight: 500; }
.rev__facts { position: relative; display: grid; gap: 14px; }
.rev__fact { display: grid; gap: 6px; padding: 22px 24px; border-radius: 22px; background: rgba(255, 255, 255, .6); border: 1px solid rgba(255, 255, 255, .9); box-shadow: inset 0 1px 0 #fff; }
.rev__big { font-size: 2.25rem; font-weight: 750; letter-spacing: -0.035em; line-height: 1; font-variant-numeric: tabular-nums; color: var(--ink); }
.rev__fact > p:not(.rev__big) { color: var(--ink-soft); font-size: 1.0625rem; }
.rev__bar { height: 10px; border-radius: 10px; background: rgba(0, 122, 227, .12); overflow: hidden; margin-top: 8px; }
.rev__bar i { display: block; height: 100%; width: 90%; border-radius: 10px; background: var(--gradient); }
.js .rev__bar i { width: 0; transition: width 1.6s var(--ease) .4s; }
.js .rev.is-in .rev__bar i { width: 90%; }
.rev__tile { position: absolute; z-index: 0; width: clamp(200px, 22vw, 300px); height: auto; right: max(-20px, calc(50% - 640px)); top: -40px; pointer-events: none; animation: hover-float 8s ease-in-out infinite; }
@media (max-width: 860px) { .rev__tile { display: none; } }
@media (max-width: 860px) { .rev { grid-template-columns: 1fr; } .rev__stars svg { width: 30px; height: 30px; } }

/* ---------- domande ---------- */
.faq-sec { overflow: hidden; --sec-bg: linear-gradient(180deg, var(--paper) 0%, #f0f7ff 100%); }
.faq { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(32px, 6vw, 80px); align-items: start; }
.faq .section-head { position: sticky; top: calc(var(--header-h) + 28px); }
.faq__list { display: grid; gap: 12px; }
.qa { border-radius: 22px; overflow: hidden; transition: background-color .45s var(--ease), box-shadow .45s var(--ease), transform .45s var(--ease), border-color .45s var(--ease); }
.qa h3 { font-size: inherit; letter-spacing: normal; line-height: inherit; font-weight: inherit; }
.qa button { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 22px 22px 22px 26px; border: 0; background: transparent; text-align: left; cursor: pointer; font-size: 1.125rem; font-weight: 600; line-height: 1.4; color: inherit; }
.qa button:hover { color: var(--link); }
.qa .plus { flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--gradient); color: #fff; display: grid; place-items: center; box-shadow: 0 6px 14px rgba(0, 122, 227, .28); transition: transform .45s var(--spring), background .3s var(--ease), color .3s var(--ease); }
.qa .plus svg { width: 16px; height: 16px; }
.qa__panel { display: grid; grid-template-rows: 1fr; transition: grid-template-rows .45s var(--ease); }
.qa__panel > div { overflow: hidden; }
.qa__panel p { padding: 0 64px 24px 26px; font-size: 1.0625rem; line-height: 1.7; color: var(--ink-soft); }
.js .qa__panel { grid-template-rows: 0fr; }
.js .qa__panel p { opacity: 0; transform: translateY(-6px); transition: opacity .35s var(--ease), transform .35s var(--ease); }
/* aperta: diventa un riquadro nel blu Bookflow */
.qa.is-open { background: var(--gradient-deep); border-color: rgba(255, 255, 255, .3); color: #fff; box-shadow: 0 20px 44px rgba(0, 122, 227, .3); transform: scale(1.01); }
.qa.is-open button, .qa.is-open button:hover { color: #fff; }
.qa.is-open .plus { transform: rotate(135deg); background: rgba(255, 255, 255, .95); color: var(--brand-deep); }
.qa.is-open .qa__panel { grid-template-rows: 1fr; }
.qa.is-open .qa__panel p { color: rgba(255, 255, 255, .95); opacity: 1; transform: none; transition-delay: .12s; }
.qa.is-open a { color: #fff; }
@media (max-width: 900px) { .faq { grid-template-columns: 1fr; } .faq .section-head { position: static; } .qa__panel p { padding-right: 22px; } }

/* ---------- chiusura ---------- */
.closing { padding-block: clamp(72px, 9vw, 120px); }
.closing__card { position: relative; overflow: hidden; border-radius: 32px; padding: clamp(44px, 7vw, 88px) clamp(24px, 6vw, 80px); background: var(--gradient-deep); color: #fff; display: grid; gap: 26px; justify-items: start; }
.closing__card::after { content: ""; position: absolute; right: -80px; top: -80px; width: 360px; height: 360px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .28); box-shadow: 0 0 0 60px rgba(255, 255, 255, .05), 0 0 0 120px rgba(255, 255, 255, .04); pointer-events: none; }
.closing__num { white-space: nowrap; }
.closing h2 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.25rem); max-width: 17ch; color: #fff; position: relative; }
.closing .btn { background: #fff; color: var(--brand-deep); box-shadow: 0 12px 30px rgba(0, 54, 120, .25); position: relative; }
.closing .btn:hover { color: var(--brand-deep); }
.closing__note { color: rgba(255, 255, 255, .92); font-size: var(--fs-small); position: relative; }
.closing__book { position: absolute; z-index: 1; right: clamp(16px, 5vw, 72px); top: 50%; width: clamp(260px, 25vw, 350px); translate: 0 -38%; pointer-events: none; }
.closing__book::before { content: ""; position: absolute; inset: 10% -10% 0; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 255, 255, .38), rgba(255, 255, 255, 0)); }
.closing__book img { position: relative; width: 100%; height: auto; filter: drop-shadow(0 30px 40px rgba(0, 40, 100, .35)); animation: hover-float 7s ease-in-out infinite; }
@media (max-width: 860px) { .closing__book { display: none; } }
@media (min-width: 861px) { .closing__card { min-height: clamp(480px, 42vw, 580px); align-content: center; } }

/* ---------- team ---------- */
.team { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(32px, 5vw, 64px); align-items: center; }
.team__photo { border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 4 / 3; max-width: 100%; box-shadow: var(--shadow); }
.team__photo img { width: 100%; height: 100%; object-fit: cover; }
.team__copy { display: grid; gap: 18px; }
.team__copy h2 { font-size: var(--fs-h2); }
.team__copy > p { color: var(--ink-soft); }
.people { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; }
.person { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 2px 14px; align-items: center; }
.person img { grid-row: span 2; width: 56px; height: 56px; border-radius: 50%; object-fit: cover; background: var(--mist-2); }
.person b { font-size: 1rem; line-height: 1.3; }
.person span { font-size: 0.875rem; color: var(--ink-soft); line-height: 1.35; }
a.person { color: inherit; text-decoration: none; border-radius: 12px; }
a.person:hover b { color: var(--link); text-decoration: underline; }
@media (max-width: 900px) { .team { grid-template-columns: 1fr; } }
@media (max-width: 440px) { .people { grid-template-columns: 1fr; } }

/* ---------- partner ---------- */
.partners { padding-block: 0 clamp(56px, 7vw, 88px); --sec-bg: linear-gradient(180deg, var(--mist) 0%, #eaf3ff 100%); }
.partners__title { font-size: clamp(1.5rem, 1.2rem + 1vw, 1.875rem); text-align: center; }
.marquee--partners { margin-top: 28px; }
.marquee--partners .marquee__track { animation-duration: 45s; padding-block: 10px 20px; }
.partner { flex: none; width: 360px; display: grid; grid-template-columns: 120px minmax(0, 1fr); align-items: center; gap: 16px; padding: 16px 18px; border-radius: 18px; text-decoration: none; color: inherit; transition: transform .25s var(--ease), box-shadow .25s var(--ease), background-color .25s var(--ease); }
.partner__logo { display: flex; align-items: center; justify-content: center; height: 48px; }
.partner__logo img { max-width: 100%; max-height: var(--h, 32px); width: auto; height: auto; filter: grayscale(1); opacity: .8; transition: filter .25s var(--ease), opacity .25s var(--ease); }
.partner__text { font-size: 0.875rem; line-height: 1.45; color: var(--ink-soft); }
.partner:hover, .partner:focus-visible { transform: translateY(-3px); background: rgba(255, 255, 255, .85); box-shadow: inset 0 1px 0 #fff, 0 14px 32px rgba(0, 122, 227, .14); }
.partner:hover img, .partner:focus-visible img { filter: none; opacity: 1; }
@media (hover: none) { .partner__logo img { filter: none; opacity: 1; } }
@media (max-width: 600px) { .partner { width: 300px; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; padding: 12px 14px; } .marquee--partners .marquee__track { animation-duration: 30s; } }

/* ---------- footer ---------- */
.footer { background: var(--paper); border-top: 1px solid var(--line); padding-block: 56px calc(40px + env(safe-area-inset-bottom, 0px)); font-size: 0.9375rem; color: var(--ink-soft); }
.footer__grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px; }
.footer__brand { display: grid; gap: 10px; align-content: start; }
.footer__brand img { height: 30px; width: auto; }
.footer__brand p { font-family: var(--serif); font-style: italic; font-size: 1.375rem; color: var(--ink); }
.footer__cols { display: flex; flex-wrap: wrap; gap: 40px; }
.footer__col { display: grid; gap: 8px; align-content: start; }
.footer__col h3 { font-size: 0.875rem; font-weight: 600; color: var(--ink); letter-spacing: 0; margin-bottom: 2px; }
.footer__col a { color: var(--ink-soft); text-decoration: none; }
.footer__col a:hover { color: var(--link); text-decoration: underline; }
.footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; margin-top: 44px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 0.875rem; }

/* ---------- toast ---------- */
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); translate: -50% 20px; z-index: 90; padding: 12px 20px; border-radius: 999px; background: var(--ink); color: var(--paper); font-size: 0.9375rem; font-weight: 500; opacity: 0; pointer-events: none; transition: opacity .25s var(--ease), translate .25s var(--ease); }
.toast.is-on { opacity: 1; translate: -50% 0; }
.toast { width: max-content; max-width: min(720px, calc(100vw - 32px)); text-align: center; line-height: 1.4; }
@media (max-width: 600px) { .toast { border-radius: 18px; } }

/* ---------- comparsa leggera (solo se JS attivo) ---------- */
.js .reveal { opacity: 0; transform: translateY(20px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- pagine legali ---------- */
.legal { padding-top: calc(var(--header-h) + 40px); padding-bottom: 80px; --sec-bg: var(--mist); --fade-top: 0px; }
.legal__box { max-width: 760px; margin-inline: auto; background: var(--paper); border-radius: var(--radius-lg); padding: clamp(28px, 5vw, 56px); box-shadow: var(--shadow); }
.legal h1 { font-size: clamp(2rem, 1.6rem + 1.6vw, 2.75rem); margin-top: 16px; }
.legal h2 { font-size: 1.25rem; margin-top: 36px; letter-spacing: -0.01em; }
.legal p { margin-top: 12px; color: var(--ink-body); line-height: 1.75; font-size: 1.0625rem; }
.legal .updated { color: var(--ink-soft); font-size: var(--fs-small); margin-top: 8px; }
.legal .back { font-size: var(--fs-small); font-weight: 500; color: var(--ink-soft); text-decoration: none; }
.legal .back:hover { color: var(--ink); }
.legal ul { margin: 12px 0 0; padding-left: 1.3em; color: var(--ink-body); line-height: 1.7; font-size: 1.0625rem; display: grid; gap: 6px; }
.legal strong { color: var(--ink); }
.legal__table { margin-top: 16px; overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; }
.legal table { width: 100%; min-width: 520px; border-collapse: collapse; font-size: 0.9375rem; line-height: 1.55; color: var(--ink-body); }
.legal th { text-align: left; background: var(--mist); color: var(--ink); font-weight: 650; padding: 12px 16px; }
.legal td { padding: 12px 16px; border-top: 1px solid var(--line); vertical-align: top; }
.legal td:last-child { width: 38%; }
@media (max-width: 600px) {
  .legal__table { overflow: visible; border: 0; border-radius: 0; }
  .legal table, .legal tbody, .legal tr, .legal td { display: block; width: auto !important; min-width: 0; }
  .legal thead { display: none; }
  .legal tr { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin-top: 10px; }
  .legal td { padding: 0; border: 0; }
  .legal td:last-child { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line); font-weight: 600; color: var(--ink); }
  .legal td:last-child::before { content: "Base giuridica: "; font-weight: 500; color: var(--ink-soft); }
}
.legal__next { margin-top: 40px !important; padding-top: 20px; border-top: 1px solid var(--line); font-weight: 600; }
.legal .big-mail { display: inline-block; margin-top: 10px; font-size: clamp(1.375rem, 1.1rem + 1.2vw, 1.875rem); font-weight: 650; word-break: break-all; }
.header--solid { background: rgba(255, 255, 255, .85); box-shadow: 0 1px 0 rgba(11, 42, 91, .06); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.header--solid .lang { margin-left: auto; }
.legal [lang="en"] td:last-child::before { content: "Legal basis: "; }
.legal__notice { padding: 12px 16px; border-radius: 14px; background: var(--mist); font-size: 0.9375rem !important; color: var(--ink-soft) !important; }

/* ---------- selettore lingua ---------- */
.lang { position: relative; display: inline-grid; grid-template-columns: 1fr 1fr; flex: none; padding: 4px; border-radius: 999px; }
.lang__pill { position: absolute; top: 4px; left: 4px; width: 34px; height: 34px; border-radius: 50%; background: var(--gradient); box-shadow: 0 6px 16px rgba(0, 122, 227, .35); transition: transform .45s var(--spring); }
.lang[data-active="en"] .lang__pill { transform: translateX(100%); }
.lang button { position: relative; z-index: 1; display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%; background: transparent; cursor: pointer; }
.lang button:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
.flag { display: block; width: 24px; height: 24px; border-radius: 50%; background-size: cover; background-position: center; box-shadow: 0 0 0 1.5px #fff, 0 1px 3px rgba(11, 42, 91, .25); opacity: .55; filter: saturate(.6); transition: opacity .3s var(--ease), filter .3s var(--ease), transform .3s var(--ease); }
.lang button[aria-pressed="true"] .flag { opacity: 1; filter: none; }
.lang button:not([aria-pressed="true"]):hover .flag { opacity: .9; filter: none; transform: scale(1.06); }
.flag--it { background-image: linear-gradient(90deg, #009246 0 33.4%, #fff 33.4% 66.6%, #ce2b37 66.6%); }
.flag--en { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 30'%3E%3CclipPath id='t'%3E%3Cpath d='M30 15h30v15zv15H0zH0V0zV0h30z'/%3E%3C/clipPath%3E%3Cpath d='M0 0v30h60V0z' fill='%23012169'/%3E%3Cpath d='M0 0l60 30m0-30L0 30' stroke='%23fff' stroke-width='6'/%3E%3Cpath d='M0 0l60 30m0-30L0 30' clip-path='url(%23t)' stroke='%23C8102E' stroke-width='4'/%3E%3Cpath d='M30 0v30M0 15h60' stroke='%23fff' stroke-width='10'/%3E%3Cpath d='M30 0v30M0 15h60' stroke='%23C8102E' stroke-width='6'/%3E%3C/svg%3E"); background-size: auto 100%; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
@media (max-width: 860px) { .header__actions { gap: 10px; } .header__actions .lang { order: 3; } }
.header__cta { white-space: nowrap; }
@media (max-width: 480px) { .header__logo img { height: 26px; } .header__bar { gap: 12px; } .header__cta { padding-inline: 16px; } }

/* ---------- cambio lingua: dissolvenza morbida ---------- */
.lang-wait body { opacity: 0; }
main, .footer, .header__nav, .header__login { transition: opacity .3s var(--ease); }
.lang-out main, .lang-out .footer, .lang-out .header__nav, .lang-out .header__login { opacity: 0; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .55s; animation-timing-function: cubic-bezier(.4, 0, .2, 1); }
.lang-vt .lang { view-transition-name: lang-switch; }
::view-transition-old(lang-switch) { display: none; }
::view-transition-new(lang-switch) { animation: none; }

/* ---------- vetro dei numeri: si illumina al passaggio del cursore ---------- */
@media (hover: hover) {
  .fact:hover { translate: 0 -5px; background-color: rgba(255, 255, 255, .22); border-color: rgba(255, 255, 255, .75);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 22px 50px rgba(0, 30, 90, .3), 0 0 44px rgba(150, 210, 255, .35); }
}

/* ---------- luce che segue il cursore su tutte le card ----------
   Le coordinate (--mx, --my) le scrive js/main.js. Colore della luce: --glow (blu sulle card chiare, bianco sul blu). */
.fact, .feat, .step button, .rev__fact, .qa, .partner, .press-logo, .school-card { position: relative; overflow: hidden; --glow: rgba(40, 156, 255, .26); }
.fact, .qa.is-open { --glow: rgba(255, 255, 255, .5); }
[data-theme="dark"] .feat, [data-theme="dark"] .step button, [data-theme="dark"] .rev__fact, [data-theme="dark"] .qa,
[data-theme="dark"] .partner, [data-theme="dark"] .press-logo, [data-theme="dark"] .school-card { --glow: rgba(99, 183, 255, .24); }
[data-theme="dark"] .qa.is-open { --glow: rgba(255, 255, 255, .38); }
.fact::after, .feat::after, .step button::after, .rev__fact::after, .qa::after, .partner::after, .press-logo::after, .school-card::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .4s var(--ease);
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 0%), var(--glow), transparent 72%);
}
.fact::after { background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 0%), var(--glow), rgba(255, 255, 255, .14) 42%, rgba(255, 255, 255, 0) 72%); }
@media (hover: hover) {
  .fact:hover::after, .feat:hover::after, .step button:hover::after, .rev__fact:hover::after, .qa:hover::after,
  .partner:hover::after, .press-logo:hover::after, .school-card:hover::after { opacity: 1; }
  .rev__fact { transition: border-color .35s var(--ease), box-shadow .35s var(--ease); }
  .rev__fact:hover { border-color: rgba(40, 156, 255, .35); }
  .qa:not(.is-open):hover { border-color: rgba(40, 156, 255, .35); }
}

/* ---------- passaggi morbidi tra le sezioni (solo tema scuro) ----------
   Lo sfondo di ogni sezione (--sec-bg) è disegnato da ::before. Nel tema chiaro copre tutta la sezione (come prima);
   nel tema scuro sfuma in alto e in basso nel colore della pagina: niente righe nette. */
:root { --fade: clamp(40px, 6vw, 96px); }
.hero, .press, .facts, .how, .reviews, .faq-sec, .section--mist, .partners, .legal { position: relative; isolation: isolate; }
.hero::before, .press::before, .facts::before, .how::before, .reviews::before, .faq-sec::before, .section--mist::before, .partners::before, .legal::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: var(--sec-bg);
}
[data-theme="dark"] :is(.hero, .press, .facts, .how, .reviews, .faq-sec, .section--mist, .partners, .legal)::before {
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 var(--fade-top, var(--fade)), #000 calc(100% - var(--fade-bottom, var(--fade))), transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0, #000 var(--fade-top, var(--fade)), #000 calc(100% - var(--fade-bottom, var(--fade))), transparent 100%);
}
[data-theme="dark"] .aurora, [data-theme="dark"] .facts__bg {
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 var(--fade), #000 calc(100% - var(--fade)), transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0, #000 var(--fade), #000 calc(100% - var(--fade)), transparent 100%);
}
[data-theme="dark"] .footer { border-top-color: transparent; }
#chi-siamo { --fade-bottom: 0px; }   /* team e partner hanno lo stesso colore: restano uniti */
.partners { --fade-top: 0px; }
[data-theme="dark"] .hero .aurora { -webkit-mask-image: linear-gradient(180deg, #000 calc(100% - var(--fade)), transparent 100%); mask-image: linear-gradient(180deg, #000 calc(100% - var(--fade)), transparent 100%); }

/* ---------- pulsante tema (sole / luna) ---------- */
.theme-btn { position: relative; display: grid; place-items: center; flex: none; width: 38px; height: 38px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--ink-soft); cursor: pointer; transition: color .25s var(--ease), background-color .25s var(--ease); }
.theme-btn:hover { color: var(--ink); background: rgba(0, 104, 196, .08); }
.theme-btn svg { position: absolute; width: 20px; height: 20px; transition: transform .55s var(--spring), opacity .3s var(--ease); }
.theme-btn__sun { opacity: 0; transform: rotate(-90deg) scale(.4); }
[data-theme="dark"] .theme-btn__sun { opacity: 1; transform: none; }
[data-theme="dark"] .theme-btn__moon { opacity: 0; transform: rotate(90deg) scale(.4); }
.header--solid .theme-btn { margin-left: auto; }
.header--solid .theme-btn + .lang { margin-left: 0; }
.theme-vt .theme-btn { view-transition-name: theme-btn; }
::view-transition-old(theme-btn) { display: none; }
::view-transition-new(theme-btn) { animation: none; }
/* telefono: il pulsante del tema e "Prova Bookflow" si danno il cambio nello stesso posto */
@media (max-width: 860px) {
  .header__actions .header__cta { order: 1; }
  .header__actions .theme-btn { order: 2; }
  .header:not(.show-cta) .header__cta { display: none; }
  .header.show-cta .theme-btn { display: none; }
  .header.show-cta .header__cta { animation: cta-in .3s var(--ease); }
}
@keyframes cta-in { from { opacity: 0; transform: translateY(-4px); } }

/* logo: versione con testo chiaro per il tema scuro */
.only-dark { display: none !important; }
[data-theme="dark"] .only-light { display: none !important; }
[data-theme="dark"] .only-dark { display: block !important; }

/* ==========================================================================
   TEMA SCURO: blu notte con riflessi del blu Bookflow
   ========================================================================== */
[data-theme="dark"] {
  color-scheme: dark;
  --ink: #eaf2ff;
  --ink-soft: #a9bbd4;
  --ink-faint: #8094b0;
  --ink-body: #c9d7ea;
  --paper: #071226;
  --mist: #0b1a33;
  --mist-2: #12284d;
  --line: #1d3358;
  --link: #6dbdff;
  --brand-deep: #4aa9ff;
  --gradient-deep: linear-gradient(135deg, #002f66 0%, #0054ab 50%, #1672d2 100%);
  --glass-bg: rgba(18, 38, 74, .55);
  --glass-border: rgba(130, 180, 255, .16);
  --glass-shadow: inset 0 1px 0 rgba(255, 255, 255, .07), 0 1px 2px rgba(0, 0, 0, .3), 0 14px 36px rgba(0, 0, 0, .35);
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px rgba(0, 0, 0, .35);
  --shadow-lift: 0 2px 4px rgba(0, 0, 0, .3), 0 20px 50px rgba(0, 0, 0, .45);
  --map-0: #15253f; --map-1: #163a6a; --map-2: #1f5596; --map-3: #2f7ad0; --map-4: #5fb4ff; --map-line: #0a1730;
  --pin: #e6f2ff; --pin-ring: #0b2a5b; --pin-text: #0b2a5b;
}
[data-theme="dark"] .hero { --sec-bg: linear-gradient(180deg, #0b2047 0%, #08183a 55%, var(--paper) 100%); }
[data-theme="dark"] .hero__dots { background-image: radial-gradient(rgba(99, 183, 255, .16) 1px, transparent 1.2px); }
[data-theme="dark"] .aurora span { opacity: .5; }
[data-theme="dark"] .aurora span:nth-child(1) { background: radial-gradient(circle, rgba(0, 122, 227, .6) 0%, rgba(0, 122, 227, 0) 70%); }
[data-theme="dark"] .aurora span:nth-child(2) { background: radial-gradient(circle, rgba(40, 156, 255, .38) 0%, rgba(40, 156, 255, 0) 70%); }
[data-theme="dark"] .aurora span:nth-child(3) { background: radial-gradient(circle, rgba(99, 183, 255, .22) 0%, rgba(99, 183, 255, 0) 70%); }
[data-theme="dark"] .aurora--soft span { opacity: .38; }
[data-theme="dark"] .hero__glow { background: radial-gradient(circle, rgba(40, 156, 255, .4) 0%, rgba(0, 122, 227, .16) 40%, transparent 70%); }
[data-theme="dark"] .stat + .stat { border-left-color: rgba(130, 180, 255, .18); }
[data-theme="dark"] .stat__num, [data-theme="dark"] .rev__num { background-image: linear-gradient(135deg, #4aa9ff, #8fcbff 60%, #c6e5ff); }
[data-theme="dark"] .header.is-scrolled { background: rgba(7, 18, 38, .72); box-shadow: 0 1px 0 rgba(130, 180, 255, .1), 0 8px 24px rgba(0, 0, 0, .3); }
[data-theme="dark"] .header--solid { background: rgba(7, 18, 38, .85); box-shadow: 0 1px 0 rgba(130, 180, 255, .12); }
[data-theme="dark"] .theme-btn:hover { background: rgba(255, 255, 255, .08); }
[data-theme="dark"] .flag { box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .75), 0 1px 3px rgba(0, 0, 0, .4); }
[data-theme="dark"] .btn--ghost { background: rgba(255, 255, 255, .04); }
[data-theme="dark"] .btn--ghost:hover { background: rgba(255, 255, 255, .09); }
/* stampa e partner: loghi in bianco sul vetro scuro */
[data-theme="dark"] .press { --sec-bg: linear-gradient(180deg, #0a1d3e 0%, #091833 100%); }
[data-theme="dark"] .press-logo img, [data-theme="dark"] .partner__logo img { filter: grayscale(1) invert(1) brightness(1.15); opacity: .72; }
[data-theme="dark"] .press-logo:hover img, [data-theme="dark"] .press-logo:focus-visible img,
[data-theme="dark"] .partner:hover img, [data-theme="dark"] .partner:focus-visible img { filter: grayscale(1) invert(1) brightness(1.5); opacity: 1; }
[data-theme="dark"] .press-logo:hover, [data-theme="dark"] .press-logo:focus-visible,
[data-theme="dark"] .partner:hover, [data-theme="dark"] .partner:focus-visible { background: rgba(40, 80, 140, .45); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 18px 40px rgba(0, 0, 0, .4); }
@media (hover: none) { [data-theme="dark"] .partner__logo img { filter: grayscale(1) invert(1) brightness(1.4); opacity: .95; } }
[data-theme="dark"] .partners { --sec-bg: linear-gradient(180deg, var(--mist) 0%, #0a1830 100%); }
/* come funziona */
[data-theme="dark"] .step__n, [data-theme="dark"] .how__caption-ctl { background: rgba(255, 255, 255, .06); }
[data-theme="dark"] .step:not([aria-current="step"]) button:hover { background: rgba(255, 255, 255, .04); }
[data-theme="dark"] .step__bar, [data-theme="dark"] .how__caption-bar { background: rgba(99, 183, 255, .16); }
[data-theme="dark"] .feat:hover { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 22px 44px rgba(0, 0, 0, .45); }
/* scuola e mappa */
[data-theme="dark"] .results { background: rgba(12, 28, 56, .97); box-shadow: 0 18px 50px rgba(0, 0, 0, .5); }
[data-theme="dark"] .school-card { background: linear-gradient(160deg, #10264d, #0a1a36 60%); }
[data-theme="dark"] .school-placeholder { border-color: #24406a; }
[data-theme="dark"] .map-frame { background: #0a1730; }
[data-theme="dark"] .map-hint { background: rgba(12, 28, 56, .85); }
[data-theme="dark"] .bf-popup .leaflet-popup-content-wrapper, [data-theme="dark"] .bf-popup .leaflet-popup-tip { background: #0f2347; color: var(--ink); box-shadow: 0 12px 34px rgba(0, 0, 0, .5); }
[data-theme="dark"] .leaflet-container a.leaflet-popup-close-button { color: var(--ink-soft); }
[data-theme="dark"] .leaflet-control-zoom a { background: #0f2347 !important; border-color: #1d3358 !important; }
/* recensioni, domande, chiusura */
[data-theme="dark"] .reviews { --sec-bg: linear-gradient(160deg, #0b2047 0%, #091833 50%, #0c2350 100%); }
[data-theme="dark"] .reviews .aurora span { opacity: .55; }
[data-theme="dark"] .rev__stars-base { color: rgba(255, 255, 255, .14); }
[data-theme="dark"] .rev__fact { background: rgba(255, 255, 255, .05); border-color: rgba(130, 180, 255, .14); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06); }
[data-theme="dark"] .rev__bar { background: rgba(99, 183, 255, .16); }
[data-theme="dark"] .faq-sec { --sec-bg: linear-gradient(180deg, var(--paper) 0%, #0a1a35 100%); }
[data-theme="dark"] .qa.is-open .plus { color: #0068c4; }
[data-theme="dark"] .closing .btn, [data-theme="dark"] .closing .btn:hover { color: #0068c4; }
[data-theme="dark"] .closing__card { box-shadow: 0 30px 80px rgba(0, 70, 160, .3); }
[data-theme="dark"] dialog.sheet { box-shadow: 0 30px 80px rgba(0, 0, 0, .6); border: 1px solid var(--line); }

/* ---------- striscia di fiducia sotto il pulsante principale ---------- */
.trust { list-style: none; margin: -8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, max-content); gap: 10px 28px; }
.trust li { display: inline-flex; align-items: center; gap: 7px; font-size: var(--fs-small); font-weight: 500; color: var(--ink-soft); }
.trust svg { width: 18px; height: 18px; flex: none; color: var(--ok); }
[data-theme="dark"] .trust svg { color: #3ccf8e; }
@media (max-width: 480px) { .trust { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; width: 100%; } .trust li { align-items: flex-start; font-size: 0.875rem; line-height: 1.35; } .trust svg { margin-top: 1px; } }

/* ---------- recensioni scritte (vere, anonime) ---------- */
.quotes { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 20px; }
.quote { margin: 0; display: grid; align-content: start; gap: 12px; padding: 24px 24px 22px; border-radius: 24px; }
.quote__stars { display: flex; gap: 3px; color: var(--gold); }
.quote__stars svg { width: 17px; height: 17px; }
.quote blockquote { margin: 0; }
.quote blockquote p { font-family: var(--serif); font-style: italic; font-size: 1.375rem; line-height: 1.35; color: var(--ink); letter-spacing: -0.005em; }
.quote figcaption { font-size: 0.8125rem; color: var(--ink-faint); margin-top: auto; }
.js .quote { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease) calc(var(--i) * 110ms), transform .6s var(--ease) calc(var(--i) * 110ms); }
.js .quotes.is-in .quote { opacity: 1; transform: none; }
.quote { --glow: rgba(40, 156, 255, .22); }
[data-theme="dark"] .quote { --glow: rgba(99, 183, 255, .22); }
.quote { position: relative; overflow: hidden; }
.quote::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .4s var(--ease);
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 0%), var(--glow), transparent 72%); }
@media (hover: hover) { .quote:hover::after { opacity: 1; } }
@media (max-width: 860px) { .quotes { grid-template-columns: 1fr; gap: 12px; } .quote blockquote p { font-size: 1.25rem; } }

/* ---------- sorpresa: 5 tocchi sul logo, pioggia di libri ---------- */
.libri-pioggia { position: fixed; inset: 0; z-index: 95; pointer-events: none; overflow: hidden; }
.libri-pioggia i { position: absolute; top: -70px; display: block; width: var(--w, 28px); aspect-ratio: 24 / 30; left: var(--x);
  animation: libro-cade var(--d, 2.8s) cubic-bezier(.35, .1, .55, 1) var(--t, 0s) forwards; }
.libri-pioggia svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 6px 10px rgba(11, 42, 91, .25)); }
@keyframes libro-cade {
  0% { transform: translate3d(0, 0, 0) rotate(var(--r0, 0deg)); opacity: 0; }
  8% { opacity: 1; }
  100% { transform: translate3d(var(--dx, 0px), calc(100vh + 140px), 0) rotate(var(--r1, 360deg)); opacity: 1; }
}
.header__logo.is-wiggle img { animation: logo-wiggle .5s var(--spring); }
@keyframes logo-wiggle { 30% { transform: rotate(-6deg) scale(1.06); } 60% { transform: rotate(4deg) scale(1.04); } }

/* ---------- movimento ridotto ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; transition-delay: 0s !important; }
  .js .hero__mock { opacity: 1; }
  .marquee { -webkit-mask-image: none; mask-image: none; overflow-x: auto; }
  .marquee__track { animation: none; }
  .marquee__track [aria-hidden="true"] { display: none; }
  .js .reveal, .js .fact, .js .quote { opacity: 1; transform: none; }
}
