/* ---------------------------------------------------------------------------
   Mondi Radio — foglio di stile del sito.

   Due temi, gli stessi nomi del programma:
     · Chiaro — quello di partenza: bianco con gli accenti viola e corallo
                dell'icona. È quello che si vede all'arrivo e anche senza JavaScript.
     · Cosmo  — i colori dell'icona: la notte indaco, il viola e il magenta
                della sfera, il corallo che entra dall'angolo. Col pulsante in alto.

   I colori stanno tutti e soli nelle due liste qui sotto. Il resto del foglio
   non nomina mai un colore: usa le variabili.

   Il carattere è Inter, servito da qui (assets/fonts, quattro pesi, sottoinsieme
   latino): nessuna richiesta a server di terzi. Le lingue che Inter non copre
   (giapponese, coreano, cinese) usano il carattere del sistema.
--------------------------------------------------------------------------- */

@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/inter-400.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/inter-500.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/inter-600.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/inter-700.woff2") format("woff2"); }

/* --- Chiaro: quello di partenza ------------------------------------------
   Sta su :root (e non dentro una media query) proprio perché deve valere
   sempre, anche senza JavaScript e anche se il computer è impostato in scuro. */
:root {
  color-scheme: light;

  --bg:        #f7f5ff;
  --bg-2:      #ffffff;
  --sky-tint:  rgba(170, 140, 255, .32);
  --aurora-a:  rgba(124, 77, 255, .22);
  --aurora-b:  rgba(255, 122, 89, .22);
  --aurora-c:  rgba(217, 70, 239, .12);
  --grid:      rgba(60, 30, 140, .06);
  --grain-op:  .8;

  --glass:     rgba(255, 255, 255, .66);
  --glass-2:   rgba(255, 255, 255, .92);
  --glass-3:   rgba(255, 255, 255, .55);
  --soft:      rgba(60, 30, 140, .035);
  --stroke:    rgba(50, 25, 130, .12);
  --stroke-2:  rgba(50, 25, 130, .22);

  --text:      #150c36;
  --dim:       rgba(21, 12, 54, .76);
  --dimmer:    rgba(21, 12, 54, .62);
  --faint:     rgba(21, 12, 54, .44);

  --a1:        #6b3df0;
  --a1-2:      #5b2fd6;
  --a1-rgb:    107, 61, 240;
  --a2:        #ff6a45;
  --a2-ink:    #d9421f;
  --a2-rgb:    255, 106, 69;
  --ok:        #17a86a;

  --ink:       #ffffff;
  --fill:      linear-gradient(120deg, #6d3cf2 0%, #a933dc 55%, #ff6d4c 100%);
  --fill-hi:   linear-gradient(120deg, #7b4dff 0%, #b845ea 52%, #ff7f60 100%);
  --fill-rgb:  110, 60, 240;

  --grad-text: linear-gradient(95deg, #2a1470 0%, #6b3df0 45%, #e8552c 100%);
  --grad-num:  linear-gradient(180deg, #24136a, #6b3df0);
  --wire:      linear-gradient(135deg, rgba(107,61,240,.7), rgba(255,106,69,.55) 60%, transparent 90%);

  --topbar-bg: rgba(255, 255, 255, .78);
  --sheet-bg:  rgba(255, 255, 255, .96);
  --nav-hover: rgba(60, 30, 140, .07);
  --nav-on:    rgba(60, 30, 140, .12);
  --chip:      rgba(60, 30, 140, .05);
  --opt-bg:    #ffffff;

  --panel:     rgba(255, 255, 255, .85);
  --panel-bar: rgba(60, 30, 140, .05);
  --dot:       rgba(60, 30, 140, .16);
  --pre-bg:    rgba(60, 30, 140, .055);
  --icon-glow: rgba(124, 77, 255, .38);

  --shadow:    0 30px 62px -34px rgba(40, 16, 110, .40);
  --shadow-2:  0 16px 40px -28px rgba(40, 16, 110, .5);
  --glow:      0 0 90px -55px rgba(107, 61, 240, .6);
  --lift:      0 6px 18px -12px rgba(40, 16, 110, .45);
}

/* --- Cosmo: i colori dell'icona, col pulsante in alto ---------------------- */
html[data-theme="cosmo"] {
  color-scheme: dark;

  --bg:        #07041a;
  --bg-2:      #0d0730;
  --sky-tint:  rgba(112, 62, 245, .38);    /* l'alone in cima */
  --aurora-a:  rgba(124, 77, 255, .60);    /* viola, a sinistra */
  --aurora-b:  rgba(255, 122, 89, .46);    /* corallo, a destra */
  --aurora-c:  rgba(217, 70, 239, .34);    /* magenta, in mezzo */
  --grid:      rgba(255, 255, 255, .035);
  --grain-op:  .55;

  --glass:     rgba(255, 255, 255, .05);
  --glass-2:   rgba(255, 255, 255, .085);
  --glass-3:   rgba(255, 255, 255, .022);
  --soft:      rgba(255, 255, 255, .02);
  --stroke:    rgba(255, 255, 255, .10);
  --stroke-2:  rgba(255, 255, 255, .19);

  --text:      #f6f3ff;
  --dim:       rgba(246, 243, 255, .72);
  --dimmer:    rgba(246, 243, 255, .50);
  --faint:     rgba(246, 243, 255, .32);

  --a1:        #b8a3ff;                    /* i collegamenti e i simboli */
  --a1-2:      #8f6bff;
  --a1-rgb:    143, 107, 255;
  --a2:        #ff8a66;                    /* il corallo, secondo colore */
  --a2-ink:    #ffb69c;
  --a2-rgb:    255, 138, 102;
  --ok:        #5ee6a8;                    /* il segno di spunta */

  --ink:       #ffffff;                    /* il testo sopra i pulsanti pieni */
  --fill:      linear-gradient(120deg, #7c4dff 0%, #b13cf0 55%, #ff7a59 100%);
  --fill-hi:   linear-gradient(120deg, #8f66ff 0%, #c44cf5 52%, #ff8d6a 100%);
  --fill-rgb:  150, 80, 255;

  --grad-text: linear-gradient(95deg, #ffffff 0%, #dccdff 38%, #ff9f80 100%);
  --grad-num:  linear-gradient(180deg, #ffffff, rgba(255, 255, 255, .62));
  --wire:      linear-gradient(135deg, rgba(184, 163, 255, .95), rgba(255, 138, 102, .8) 60%, transparent 92%);

  --topbar-bg: rgba(11, 7, 34, .64);
  --sheet-bg:  rgba(15, 10, 42, .97);
  --nav-hover: rgba(255, 255, 255, .07);
  --nav-on:    rgba(255, 255, 255, .11);
  --chip:      rgba(255, 255, 255, .055);
  --opt-bg:    #130c3a;

  --panel:     rgba(13, 8, 38, .78);
  --panel-bar: rgba(255, 255, 255, .05);
  --dot:       rgba(255, 255, 255, .18);
  --pre-bg:    rgba(0, 0, 0, .36);
  --icon-glow: rgba(150, 80, 255, .75);

  --shadow:    0 40px 90px -40px rgba(0, 0, 0, .92);
  --shadow-2:  0 18px 44px -28px rgba(0, 0, 0, .85);
  --glow:      0 0 120px -46px rgba(150, 80, 255, .95);
  --lift:      none;
}

/* --- Quello che non cambia fra i due temi -------------------------------- */
:root {
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI Variable Text", "Segoe UI",
          Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", "Cascadia Mono", Menlo, Consolas,
          "Liberation Mono", monospace;

  --wrap: 1140px;
  --pad:  28px;
  --r-sm: 12px;
  --r:    20px;
  --r-lg: 28px;
}

* { box-sizing: border-box; }
/* L'attributo hidden vince sempre, anche sugli elementi che hanno un display loro. */
[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.7;
  font-feature-settings: "cv05" 1, "ss01" 1, "calt" 1;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: rgba(var(--a1-rgb), .45); color: var(--ink); }

/* Il passaggio da un tema all'altro, ammorbidito (la classe la mette theme.js). */
html.theming, html.theming *, html.theming *::before, html.theming *::after {
  transition: background-color .3s ease, background-image .3s ease, color .3s ease,
              border-color .3s ease, box-shadow .3s ease, fill .3s ease !important;
}

/* Il fondale: tre aurore lente, una griglia appena accennata e un velo di grana. */
.sky {
  position: fixed; inset: 0; z-index: -2;
  pointer-events: none; overflow: hidden;
  background:
    radial-gradient(90% 60% at 50% -10%, var(--sky-tint) 0%, transparent 62%),
    linear-gradient(180deg, var(--bg-2), var(--bg) 60%);
}
.sky::before, .sky::after, .sky i {
  content: ""; position: absolute; border-radius: 50%;
  filter: blur(80px); will-change: transform;
}
.sky::before {
  width: 66vw; height: 66vw; min-width: 560px; min-height: 560px;
  top: -30vw; left: -18vw;
  background: radial-gradient(circle, var(--aurora-a), transparent 66%);
  animation: drift-a 28s ease-in-out infinite alternate;
}
.sky::after {
  width: 50vw; height: 50vw; min-width: 460px; min-height: 460px;
  top: -14vw; right: -14vw;
  background: radial-gradient(circle, var(--aurora-b), transparent 66%);
  animation: drift-b 34s ease-in-out infinite alternate;
}
.sky i {
  width: 40vw; height: 40vw; min-width: 380px; min-height: 380px;
  top: 10vw; left: 32vw;
  background: radial-gradient(circle, var(--aurora-c), transparent 66%);
  animation: drift-c 40s ease-in-out infinite alternate;
}
@keyframes drift-a { from { transform: translate3d(0,0,0) scale(1); }    to { transform: translate3d(7vw, 6vh, 0) scale(1.14); } }
@keyframes drift-b { from { transform: translate3d(0,0,0) scale(1.06); } to { transform: translate3d(-6vw, 8vh, 0) scale(.92); } }
@keyframes drift-c { from { transform: translate3d(0,0,0) scale(.9); }   to { transform: translate3d(-9vw, -4vh, 0) scale(1.1); } }

.grain {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  opacity: var(--grain-op);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 76px 76px, 76px 76px;
  -webkit-mask-image: radial-gradient(110% 70% at 50% 0%, #000 10%, transparent 72%);
          mask-image: radial-gradient(110% 70% at 50% 0%, #000 10%, transparent 72%);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .sky::before, .sky::after, .sky i { animation: none; }
  html.theming, html.theming *, html.theming *::before, html.theming *::after { transition: none !important; }
}

/* Impalcatura ---------------------------------------------------------------- */
.wrap, .wide {
  width: 100%; margin: 0 auto;
  padding-left:  max(var(--pad), env(safe-area-inset-left));
  padding-right: max(var(--pad), env(safe-area-inset-right));
}
.wrap { max-width: var(--wrap); }
.wide { max-width: 1360px; }
.wide .cap { max-width: calc(var(--wrap) - var(--pad) * 2); margin-left: auto; margin-right: auto; }

section { padding: 96px 0; position: relative; }
section + section::before {
  content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: min(100%, 1360px); height: 1px;
  background: linear-gradient(90deg, transparent, var(--stroke) 18%, var(--stroke) 82%, transparent);
}
section.flush::before { display: none; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: .72rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase;
  color: var(--a2-ink); margin: 0 0 16px;
}
.eyebrow::before { content: ""; width: 22px; height: 2px; border-radius: 2px; background: var(--fill); }

h1, h2, h3 { font-weight: 700; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.7rem, 6.6vw, 5.2rem); line-height: .98; letter-spacing: -.045em; margin-bottom: 24px; }
h2 { font-size: clamp(1.9rem, 4vw, 3rem); line-height: 1.05; letter-spacing: -.035em; margin-bottom: 18px; }
h3 { font-size: 1.06rem; line-height: 1.35; letter-spacing: -.012em; margin-bottom: 7px; }

p { margin: 0 0 16px; }
.lead { font-size: 1.16rem; line-height: 1.62; color: var(--dim); max-width: 58ch; letter-spacing: -.008em; }
.dim { color: var(--dim); }
.small { font-size: .9rem; color: var(--dimmer); }

.grad {
  background: var(--grad-text);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

a { color: var(--a1); text-decoration-color: rgba(var(--a1-rgb), .4); text-underline-offset: 3px; }
a:hover { color: var(--a2-ink); text-decoration-color: rgba(var(--a2-rgb), .6); }

code, kbd, .mono { font-family: var(--mono); font-size: .86em; }
code {
  background: rgba(var(--a1-rgb), .14); border: 1px solid var(--stroke);
  padding: 2px 7px; border-radius: 7px; color: var(--a2-ink); white-space: nowrap;
}
@media (max-width: 620px) { code { white-space: normal; overflow-wrap: break-word; } }
kbd {
  display: inline-block; background: var(--glass-2); border: 1px solid var(--stroke-2);
  border-bottom-width: 2px; border-radius: 7px; padding: 2px 8px;
  font-size: .8em; line-height: 1.5; color: var(--text); white-space: nowrap;
}

/* Barra in alto: una pillola di vetro che galleggia ------------------------- */
.topbar { position: sticky; top: 0; z-index: 60; padding: 14px 0; }
.topbar .wrap {
  display: flex; align-items: center; gap: 14px;
  height: 62px; padding: 0 10px 0 14px;
  max-width: calc(var(--wrap) - 20px);
  background: var(--topbar-bg);
  border: 1px solid var(--stroke);
  border-radius: 999px;
  backdrop-filter: saturate(170%) blur(20px);
  -webkit-backdrop-filter: saturate(170%) blur(20px);
  box-shadow: var(--shadow-2);
}
.brand { display: flex; align-items: center; gap: 11px; min-width: 0; text-decoration: none; color: var(--text); flex: 0 0 auto; }
.brand img { width: 34px; height: 34px; border-radius: 9px; flex: 0 0 auto; box-shadow: 0 6px 16px -8px rgba(var(--fill-rgb), .9); }
.brand b { font-size: 1.04rem; font-weight: 700; letter-spacing: -.02em; white-space: nowrap; }
.brand b span { color: var(--a2-ink); }

/* I collegamenti, nel mezzo. */
.topbar .links { display: flex; align-items: center; gap: 2px; margin: 0 auto; }
.topbar .links a {
  color: var(--dim); text-decoration: none; font-size: .93rem; font-weight: 500; white-space: nowrap;
  padding: 9px 15px; border-radius: 999px;
  transition: background .18s ease, color .18s ease;
}
.topbar .links a:hover { color: var(--text); background: var(--nav-hover); }
.topbar .links a[aria-current] { color: var(--text); background: var(--nav-on); }

/* I comandi, a destra: lingua, tema, Scarica, e sul telefono il menù. */
.topbar .tools { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; margin-left: auto; }
.topbar .cta {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--ink); font-weight: 600; font-size: .92rem; text-decoration: none; white-space: nowrap;
  padding: 10px 18px; border-radius: 999px;
  background: var(--fill);
  box-shadow: 0 8px 22px -10px rgba(var(--fill-rgb), .9);
  transition: filter .18s ease, transform .18s ease;
}
.topbar .cta:hover { color: var(--ink); filter: brightness(1.08); transform: translateY(-1px); }
.topbar .cta svg { width: 16px; height: 16px; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  flex: 0 0 auto; width: 40px; height: 40px; padding: 0;
  border-radius: 999px; border: 1px solid var(--stroke);
  background: var(--chip); color: var(--dim); cursor: pointer;
  -webkit-appearance: none; appearance: none; touch-action: manipulation;
  transition: color .18s ease, background .18s ease, border-color .18s ease;
}
.icon-btn:hover { color: var(--text); border-color: var(--stroke-2); background: var(--nav-hover); }
.icon-btn:focus-visible { outline: 2px solid var(--a1); outline-offset: 3px; }
.icon-btn svg { display: block; width: 18px; height: 18px; }

/* Si vede il simbolo del tema in cui si sta per entrare: la luna dal chiaro, il sole da Cosmo. */
.theme-btn .i-cosmo  { display: block; }
.theme-btn .i-chiaro { display: none; }
html[data-theme="cosmo"] .theme-btn .i-cosmo  { display: none; }
html[data-theme="cosmo"] .theme-btn .i-chiaro { display: block; }

/* La tendina delle lingue (la costruisce i18n.js). */
.lang { display: none; }
.js .lang {
  display: flex; align-items: center; gap: 6px; flex: 0 0 auto;
  height: 40px; padding: 0 4px 0 11px; border-radius: 999px;
  border: 1px solid var(--stroke); background: var(--chip); color: var(--dimmer);
}
.lang:hover { color: var(--dim); border-color: var(--stroke-2); }
.lang:focus-within { color: var(--text); border-color: var(--a1); box-shadow: 0 0 0 3px rgba(var(--a1-rgb), .22); }
.lang svg { flex: 0 0 auto; }
.lang select {
  appearance: none; -webkit-appearance: none;
  background: transparent; border: 0; outline: 0; color: var(--dim);
  font: inherit; font-size: .9rem; max-width: 11ch; text-overflow: ellipsis;
  padding: 8px 26px 8px 2px; margin: 0; cursor: pointer;
  background-image:
    linear-gradient(45deg, transparent 50%, currentColor 50%),
    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: right 12px top 52%, right 7px top 52%;
  background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
}
.lang select option { background: var(--opt-bg); color: var(--text); }

/* Il menù del telefono: un <details>, così si apre e si chiude da solo. */
.menu { display: none; position: relative; }
.menu > summary { list-style: none; width: 40px; height: 40px; }
.menu > summary::-webkit-details-marker { display: none; }
.menu > summary::marker { content: ""; }
.menu[open] > summary { color: var(--text); background: var(--nav-on); border-color: var(--stroke-2); }
.menu .sheet {
  position: absolute; top: calc(100% + 14px); right: -8px;
  min-width: 200px; display: flex; flex-direction: column; gap: 2px; padding: 8px;
  border: 1px solid var(--stroke); border-radius: var(--r);
  background: var(--sheet-bg);
  backdrop-filter: saturate(160%) blur(18px); -webkit-backdrop-filter: saturate(160%) blur(18px);
  box-shadow: var(--shadow);
  animation: sheet-in .18s cubic-bezier(.22, 1, .36, 1);
}
.menu .sheet a {
  display: block; padding: 11px 14px; border-radius: 12px;
  color: var(--dim); text-decoration: none; font-size: .97rem; font-weight: 500; white-space: nowrap;
}
.menu .sheet a:hover { color: var(--text); background: var(--nav-hover); }
.menu .sheet a[aria-current] { color: var(--text); background: var(--nav-on); }
@keyframes sheet-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .menu .sheet { animation: none; } }

html[data-i18n-state="loading"] body { visibility: hidden; }

/* Apertura ------------------------------------------------------------------ */
.hero { padding: 70px 0 70px; overflow-x: clip; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 56px; align-items: center; }

.badge {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: .8rem; font-weight: 500; color: var(--dim);
  background: var(--glass); border: 1px solid var(--stroke);
  border-radius: 999px; padding: 6px 16px 6px 7px; margin: 0 0 26px;
  backdrop-filter: blur(10px);
}
.badge b {
  font-size: .68rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink); background: var(--fill); border-radius: 999px; padding: 4px 10px;
}

.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 32px 0 0; }
.btn {
  display: inline-flex; align-items: center; gap: 11px;
  padding: 15px 26px; border-radius: 16px;
  font-size: .98rem; font-weight: 600; letter-spacing: -.01em; text-decoration: none;
  border: 1px solid transparent; touch-action: manipulation;
  transition: transform .18s cubic-bezier(.22,1,.36,1), box-shadow .18s ease, background .18s ease, filter .18s ease;
}
.btn svg { flex: 0 0 auto; }
.btn-primary { color: var(--ink); background: var(--fill-hi); box-shadow: 0 18px 40px -16px rgba(var(--fill-rgb), .85); }
.btn-primary:hover { color: var(--ink); transform: translateY(-2px); filter: brightness(1.06); box-shadow: 0 24px 48px -16px rgba(var(--fill-rgb), .95); }
.btn-ghost { color: var(--text); background: var(--glass); border-color: var(--stroke-2); box-shadow: var(--lift); backdrop-filter: blur(10px); }
.btn-ghost:hover { color: var(--text); transform: translateY(-2px); background: var(--glass-2); }
.cta-note { margin: 16px 0 0; font-size: .88rem; color: var(--dimmer); }

/* L'icona, con l'anello che gira e l'alone dietro. */
.hero-icon { position: relative; justify-self: center; width: 320px; height: 320px; display: grid; place-items: center; }
.hero-icon img {
  width: 260px; height: 260px; display: block; position: relative; z-index: 2;
  filter: drop-shadow(0 30px 40px rgba(0, 0, 0, .45));
  animation: float 7s ease-in-out infinite alternate;
}
.hero-icon::before {
  content: ""; position: absolute; inset: -22%; z-index: 0;
  background: radial-gradient(closest-side, var(--icon-glow), transparent 72%);
  filter: blur(40px);
}
.hero-icon .ring {
  position: absolute; inset: 0; z-index: 1; border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0 22%, rgba(var(--a2-rgb), .9) 40%, rgba(var(--a1-rgb), .95) 60%, transparent 78% 100%);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 1px));
          mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 1px));
  animation: spin 14s linear infinite;
  opacity: .9;
}
.hero-icon .ring.r2 { inset: 8%; animation-duration: 22s; animation-direction: reverse; opacity: .45; }
.hero-icon .dot {
  position: absolute; width: 10px; height: 10px; border-radius: 50%; z-index: 1;
  background: var(--fill); box-shadow: 0 0 18px 2px rgba(var(--a2-rgb), .7);
  top: 50%; left: 50%; margin: -5px 0 0 -5px;
  animation: orbit 14s linear infinite;
}
@keyframes float { from { transform: translateY(-8px); } to { transform: translateY(10px); } }
@keyframes spin  { to { transform: rotate(360deg); } }
@keyframes orbit { from { transform: rotate(0deg) translateX(160px) rotate(0deg); } to { transform: rotate(360deg) translateX(160px) rotate(-360deg); } }
@media (prefers-reduced-motion: reduce) { .hero-icon img, .hero-icon .ring, .hero-icon .dot { animation: none; } }

.facts {
  display: flex; flex-wrap: wrap; margin: 42px 0 0; padding: 22px 0 0; list-style: none;
  border-top: 1px solid var(--stroke); gap: 0 44px;
}
.facts li { display: flex; flex-direction: column; }
.facts b {
  font-size: 1.8rem; font-weight: 700; letter-spacing: -.04em; line-height: 1.1;
  background: var(--grad-num);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent;
}
.facts span { font-size: .82rem; color: var(--dimmer); letter-spacing: .01em; }

/* Schede di vetro ----------------------------------------------------------- */
.card {
  position: relative;
  background: linear-gradient(170deg, var(--glass-2), var(--glass-3));
  border: 1px solid var(--stroke); border-radius: var(--r-lg);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.card::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px;
  background: var(--wire);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity .28s ease; pointer-events: none;
}
.card:hover::after { opacity: 1; }

/* Scarica ------------------------------------------------------------------- */
.dl-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
.dl {
  display: flex; align-items: center; gap: 18px; padding: 26px 28px;
  text-decoration: none; color: var(--text);
  transition: transform .2s cubic-bezier(.22,1,.36,1), background .2s ease;
}
.dl:hover { transform: translateY(-3px); color: var(--text); }
.dl .glyph {
  flex: 0 0 auto; display: grid; place-items: center;
  width: clamp(46px, 3.8vw, 56px); aspect-ratio: 1;
  color: var(--ink); background: var(--fill); border-radius: 16px;
  box-shadow: 0 12px 26px -12px rgba(var(--fill-rgb), .9);
  transition: transform .2s ease;
}
.dl .glyph svg { display: block; width: 52%; height: 52%; }
.dl:hover .glyph { transform: scale(1.06) rotate(-3deg); }
.dl .t { font-size: 1.14rem; font-weight: 650; letter-spacing: -.02em; line-height: 1.3; }
.dl .s { font-size: .86rem; color: var(--dimmer); margin-top: 3px; }
.dl .arrow { margin-left: auto; color: var(--faint); flex: 0 0 auto; transition: color .2s ease, transform .2s ease; }
.dl:hover .arrow { color: var(--a2); transform: translateY(3px); }
/* "Consigliato per il tuo computer": lo mette download.js quando riconosce il sistema. */
.dl .rec {
  position: absolute; top: -11px; left: 26px;
  font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink); background: var(--fill); border-radius: 999px; padding: 4px 11px;
  box-shadow: 0 8px 18px -8px rgba(var(--fill-rgb), .9);
}
.dl.is-rec { border-color: rgba(var(--a1-rgb), .55); }

.dl-soon-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-top: 12px; }
.dl-soon {
  display: flex; align-items: center; gap: 13px;
  background: var(--soft); border: 1px dashed var(--stroke-2);
  border-radius: var(--r); padding: 16px 18px; color: var(--dimmer);
}
.dl-soon .glyph { flex: 0 0 auto; display: grid; place-items: center; width: 26px; height: 26px; color: var(--faint); }
.dl-soon .glyph svg { display: block; width: 100%; height: 100%; }
.dl-soon .t { font-size: .96rem; font-weight: 600; color: var(--dim); letter-spacing: -.012em; }
.dl-soon .s { font-size: .78rem; }

.dl-more { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--stroke); font-size: .92rem; color: var(--dimmer); line-height: 1.75; }

/* Schermate ----------------------------------------------------------------- */
.frame {
  border-radius: var(--r); overflow: hidden;
  border: 1px solid var(--stroke-2); background: var(--panel);
  box-shadow: var(--shadow), var(--glow);
}
.frame .bar { display: flex; align-items: center; gap: 7px; height: 34px; padding: 0 15px; background: var(--panel-bar); border-bottom: 1px solid var(--stroke); }
.frame .bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--dot); }
.frame .bar i:first-child { background: rgba(var(--a2-rgb), .7); }
.frame .bar i:nth-child(2) { background: rgba(var(--a1-rgb), .6); }
.frame img, .shot { display: block; width: 100%; height: auto; }
.shot.plain { border: 1px solid var(--stroke-2); border-radius: var(--r); box-shadow: var(--shadow); }

/* La schermata grande della prima pagina: leggermente inclinata, si raddrizza scorrendo. */
.stage { perspective: 1600px; }
.stage .frame {
  transform: rotateX(7deg) scale(.985); transform-origin: 50% 0;
  transition: transform .9s cubic-bezier(.22, 1, .36, 1);
}
.stage.in .frame, .stage:hover .frame { transform: none; }
@media (prefers-reduced-motion: reduce) { .stage .frame { transform: none; } }

figure { margin: 0; }
figcaption { margin-top: 14px; font-size: .89rem; color: var(--dimmer); line-height: 1.65; }
.strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; margin-top: 38px; }
.strip figcaption { margin-top: 12px; font-size: .85rem; }

/* Bento --------------------------------------------------------------------- */
.bento { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; }
.bento .cell { grid-column: span 2; padding: 26px 26px 28px; border-radius: var(--r); transition: transform .2s cubic-bezier(.22,1,.36,1); }
.bento .cell:hover { transform: translateY(-3px); }
.bento .span3 { grid-column: span 3; }
.bento .ico {
  display: grid; place-items: center; width: clamp(40px, 3vw, 46px); aspect-ratio: 1;
  color: var(--a1); background: rgba(var(--a1-rgb), .14); border: 1px solid var(--stroke);
  border-radius: 14px; margin-bottom: 18px; transition: color .2s ease, background .2s ease, transform .2s ease;
}
.bento .ico svg { display: block; width: 50%; height: 50%; }
.bento .cell:hover .ico { color: var(--ink); background: var(--fill); border-color: transparent; transform: rotate(-4deg); }
.bento h3 { font-size: 1.05rem; font-weight: 650; }
.bento p { margin: 0; color: var(--dim); font-size: .93rem; line-height: 1.62; }

/* Elenco puntato con il segno colorato --------------------------------------- */
.marks { list-style: none; margin: 0; padding: 0; }
.marks li { position: relative; padding: 12px 0 12px 30px; border-top: 1px solid var(--stroke); color: var(--dim); font-size: .97rem; }
.marks li:first-child { border-top: 0; }
.marks li::before { content: ""; position: absolute; left: 4px; top: 21px; width: 8px; height: 8px; border-radius: 50%; background: var(--fill); box-shadow: 0 0 10px rgba(var(--a2-rgb), .6); }

/* Grazie (la pagina dopo il clic su Scarica) -------------------------------- */
.thanks { padding: 60px 0 40px; }
.thanks .check {
  width: 74px; height: 74px; border-radius: 50%; display: grid; place-items: center;
  margin-bottom: 26px; color: var(--ink); background: var(--fill);
  box-shadow: 0 20px 44px -16px rgba(var(--fill-rgb), .9);
  animation: pop .6s cubic-bezier(.22, 1, .36, 1);
}
.thanks .check svg { width: 36px; height: 36px; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .thanks .check { animation: none; } }
.thanks h1 { font-size: clamp(2.2rem, 5.2vw, 3.6rem); }
.file {
  display: inline-flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin: 8px 0 0; padding: 14px 20px 14px 14px; border-radius: var(--r);
  background: var(--glass); border: 1px solid var(--stroke);
}
.file .glyph { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: var(--ink); background: var(--fill); flex: 0 0 auto; }
.file .glyph svg { width: 20px; height: 20px; }
.file b { font-weight: 600; letter-spacing: -.01em; }
.file .s { color: var(--dimmer); font-size: .88rem; }
.file .again { margin-left: auto; font-weight: 600; }
.next { display: none; }
.next.on { display: block; }
.next .card { padding: 28px 30px 30px; }
.next .step:last-child { margin-bottom: 0; }
.alt { margin-top: 26px; font-size: .92rem; color: var(--dimmer); }
.alt a { margin-right: 14px; white-space: nowrap; }

/* Guida --------------------------------------------------------------------- */
.toc { columns: 2; column-gap: 44px; margin: 0; padding: 26px 30px; list-style: none; border-radius: var(--r-lg); }
.toc li { break-inside: avoid; margin: 6px 0; }
.toc a { text-decoration: none; color: var(--dim); font-size: .96rem; }
.toc a:hover { color: var(--a2-ink); }
.toc .n { font-family: var(--mono); font-size: .8em; color: var(--faint); margin-right: 10px; }

.step { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 0 18px; margin-bottom: 24px; }
.step .num {
  width: 32px; height: 32px; border-radius: 11px; display: grid; place-items: center;
  font-size: .92rem; font-weight: 700; color: var(--ink); background: var(--fill);
  box-shadow: 0 8px 20px -10px rgba(var(--fill-rgb), .9);
}
.step .body p { margin: 0 0 9px; color: var(--dim); }
.step .body p:last-child { margin-bottom: 0; }
.step .body strong { color: var(--text); }

pre {
  background: var(--pre-bg); border: 1px solid var(--stroke); border-radius: var(--r-sm);
  padding: 16px 19px; overflow-x: auto; margin: 0 0 16px;
  font-family: var(--mono); font-size: .86rem; line-height: 1.65; color: var(--a2-ink);
  -webkit-overflow-scrolling: touch;
}
pre .c { color: var(--dimmer); }

.keys { width: 100%; border-collapse: collapse; margin: 8px 0 0; }
.keys td { padding: 11px 0; border-top: 1px solid var(--stroke); vertical-align: top; font-size: .95rem; }
.keys td:first-child { width: 260px; white-space: nowrap; padding-right: 22px; font-weight: 600; letter-spacing: -.01em; }
.keys tr:first-child td { border-top: 0; }
.keys .what { color: var(--dim); }

.callout {
  border: 1px solid var(--stroke); border-left: 3px solid var(--a2);
  border-radius: 6px var(--r) var(--r) 6px; padding: 18px 22px;
  background: linear-gradient(100deg, rgba(var(--a2-rgb), .09), rgba(var(--a1-rgb), .07));
  margin: 0 0 20px;
}
.callout p { margin: 0; color: var(--dim); font-size: .95rem; }
.callout p + p { margin-top: 9px; }
.callout b { color: var(--text); }

.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 46px; align-items: start; }
.three { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 46px; align-items: start; }
.cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 52px; }
.cols > div { padding: 20px 0; border-top: 1px solid var(--stroke); }
.cols h3 { font-size: 1rem; font-weight: 650; margin-bottom: 6px; }
.cols p { color: var(--dim); font-size: .95rem; margin: 0; }
.sub { font-size: 1.02rem; font-weight: 650; letter-spacing: -.015em; margin: 0 0 16px; }

/* Prosa lunga (privacy) ----------------------------------------------------- */
.prose { max-width: 74ch; }
.prose h2 { font-size: 1.42rem; letter-spacing: -.025em; margin: 44px 0 14px; }
.prose h2:first-of-type { margin-top: 0; }
.prose ul { padding-left: 4px; margin: 0 0 18px; list-style: none; }
.prose li { position: relative; margin: 8px 0; padding-left: 22px; color: var(--dim); }
.prose li::before { content: ""; position: absolute; left: 2px; top: 12px; width: 6px; height: 6px; border-radius: 50%; background: var(--a1-2); }
.prose p { color: var(--dim); }
.prose strong { color: var(--text); }

.pill {
  display: inline-block; font-size: .84rem; color: var(--a2-ink);
  border: 1px solid var(--stroke-2);
  background: linear-gradient(120deg, rgba(var(--a2-rgb), .16), rgba(var(--a1-rgb), .12));
  border-radius: 999px; padding: 7px 18px; margin: 6px 0 24px;
}
.updated { font-family: var(--mono); font-size: .8rem; color: var(--dimmer); letter-spacing: .02em; }

/* Chiusura ------------------------------------------------------------------ */
footer.site { border-top: 1px solid var(--stroke); padding: 52px 0 60px; padding-bottom: max(60px, env(safe-area-inset-bottom)); color: var(--dimmer); font-size: .91rem; }
footer.site .wrap { display: flex; flex-wrap: wrap; gap: 16px 36px; align-items: center; }
footer.site .brand b { font-size: .98rem; }
footer.site nav { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }
footer.site nav a { color: var(--dim); text-decoration: none; padding: 6px 12px; border-radius: 9px; }
footer.site nav a:hover { color: var(--a2-ink); background: var(--nav-hover); }
footer.site .fine { margin-top: 18px; }

/* Comparsa allo scorrimento (la classe la mette lo script: senza JS si vede tutto) */
.rv { opacity: 0; transform: translateY(18px); }
.rv.in { opacity: 1; transform: none; transition: opacity .7s ease, transform .7s cubic-bezier(.22, 1, .36, 1); }

/* Schermi medi (tablet) ------------------------------------------------------ */
@media (max-width: 1000px) {
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bento .cell, .bento .span3 { grid-column: span 1; }
  .hero-grid { grid-template-columns: minmax(0, 1fr) 280px; gap: 36px; }
  .hero-icon { width: 260px; height: 260px; }
  .hero-icon img { width: 210px; height: 210px; }
  @keyframes orbit { from { transform: rotate(0deg) translateX(130px) rotate(0deg); } to { transform: rotate(360deg) translateX(130px) rotate(-360deg); } }
}

@media (max-width: 900px) {
  body { font-size: 16px; }
  section { padding: 66px 0; }
  .hero { padding: 40px 0 56px; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 30px; }
  .hero-icon { justify-self: start; order: -1; width: 180px; height: 180px; }
  .hero-icon img { width: 150px; height: 150px; }
  .hero-icon .dot { display: none; }
  .dl-grid, .two, .three, .strip, .cols { grid-template-columns: minmax(0, 1fr); }
  .cols { gap: 0; }
  .dl-soon-row { grid-template-columns: minmax(0, 1fr); }
  .toc { columns: 1; }
  .facts { gap: 18px 30px; }
  .keys td { display: block; }
  .keys td:first-child { width: auto; border-top: 1px solid var(--stroke); padding-bottom: 2px; }
  .keys td.what { border-top: 0; padding-top: 0; padding-bottom: 12px; }
  .topbar { padding: 10px 0; }
  .topbar .wrap { height: 58px; gap: 10px; padding: 0 8px 0 12px; }
  .topbar .links a { padding: 8px 12px; font-size: .9rem; }
  .stage .frame { transform: none; }
  .file .again { margin-left: 0; }
}

/* Telefono ------------------------------------------------------------------
   Sotto i 760 px i collegamenti passano nel menù rotondo: restano in vista
   l'icona, la lingua, il tema e "Scarica". Senza JavaScript il menù non c'è e
   i collegamenti restano dov'erano, a capo se serve. */
@media (max-width: 760px) {
  :root { --pad: 20px; }
  html { scroll-padding-top: 84px; }
  .nav-compact .topbar .links { display: none; }
  .nav-compact .menu { display: block; }
  .js .lang { width: 40px; padding: 0; justify-content: center; position: relative; }
  .lang select { position: absolute; inset: -1px; width: auto; height: auto; max-width: none; padding: 0; opacity: 0; background-image: none; }
  .topbar .tools { gap: 6px; }
  .topbar .cta { padding: 10px 15px; font-size: .88rem; }
  .topbar .cta svg { display: none; }
}

@media (max-width: 560px) {
  :root { --pad: 18px; }
  section { padding: 54px 0; }
  .hero { padding: 30px 0 48px; }
  .brand b { display: none; }
  .topbar .wrap { gap: 8px; height: 56px; padding: 0 7px 0 10px; }
  h1 { font-size: clamp(2.15rem, 9.6vw, 3rem); margin-bottom: 18px; }
  h2 { font-size: clamp(1.65rem, 7.4vw, 2.2rem); }
  .lead { font-size: 1.06rem; }
  .btn { width: 100%; justify-content: center; padding: 15px 20px; }
  .cta-row { margin-top: 26px; }
  .facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 14px; }
  .facts b { font-size: 1.5rem; }
  .dl { padding: 20px; gap: 14px; }
  .dl .t { font-size: 1.04rem; }
  .dl .rec { left: 18px; }
  .bento { grid-template-columns: minmax(0, 1fr); }
  .bento .cell { padding: 22px 20px 24px; }
  .toc { padding: 20px 22px; }
  .step { grid-template-columns: 36px minmax(0, 1fr); gap: 0 12px; }
  .callout { padding: 16px 18px; }
  .prose h2 { font-size: 1.28rem; margin-top: 36px; }
  .next .card { padding: 22px 20px; }
  footer.site { padding-top: 40px; }
  footer.site .wrap { gap: 14px; }
  footer.site nav { margin-left: 0; }
}

@media (max-width: 350px) {
  :root { --pad: 15px; }
  .topbar .wrap { gap: 5px; padding: 0 6px 0 9px; }
  .topbar .tools { gap: 4px; }
  .icon-btn, .js .lang, .menu > summary { width: 38px; height: 38px; }
  .topbar .cta { padding: 9px 12px; font-size: .84rem; }
  .brand img { width: 30px; height: 30px; }
}

/* Schermi che si toccano: niente effetti "al passaggio del mouse" appiccicati. */
@media (hover: none) {
  .card:hover::after { opacity: 0; }
  .dl:hover, .bento .cell:hover, .btn:hover { transform: none; }
  .stage .frame { transform: none; }
}
