:root {
  --notte: #0b0820;
  --notte-2: #150f33;
  --pannello: rgba(21, 15, 51, .82);
  --bordo: #3a2a7a;
  --rosa: #ff3d9a;
  --arancio: #ff9a3d;
  --viola: #8a3dff;
  --ciano: #3de8ff;
  --testo: #efeaff;
  --tenue: #b3a9d9;
  --tramonto: linear-gradient(90deg, #ff3d9a, #ff9a3d);
  --display: "Anton", Impact, "Arial Narrow", sans-serif;
  --corpo: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --r: 14px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; overflow-x: hidden;
  font: 400 17px/1.6 var(--corpo); color: var(--testo);
  background:
    linear-gradient(180deg, rgba(11, 8, 32, .55), var(--notte) 70vh),
    url("/img/sfondo.webp") center top / cover no-repeat fixed,
    var(--notte);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--ciano); }
a:hover { color: #fff; }
h1, h2, h3 { line-height: 1.1; margin: 0; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.salta { position: absolute; left: -999px; top: 8px; z-index: 50; background: #fff; color: #000; padding: 8px 12px; border-radius: 8px; }
.salta:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--ciano); outline-offset: 2px; }

/* ---------- Testata ---------- */
.testata { position: sticky; top: 0; z-index: 20; background: rgba(11, 8, 32, .88); backdrop-filter: blur(10px); border-bottom: 1px solid var(--bordo); }
.testata__in { max-width: 1440px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 20px; }
.logo { font: 400 26px/1 var(--display); text-decoration: none; letter-spacing: .02em; white-space: nowrap; }
.logo__a { color: #fff; margin-right: 6px; }
.logo__b { background: var(--tramonto); -webkit-background-clip: text; background-clip: text; color: transparent; }
.testata nav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; margin-left: auto; }
.testata nav a { color: var(--tenue); text-decoration: none; font-weight: 600; font-size: 14px; padding: 8px 12px; border-radius: 99px; white-space: nowrap; }
.testata nav a:hover { color: #fff; background: rgba(255, 61, 154, .15); }

/* ---------- Layout: 50% contenuto, 50% pubblicità su desktop ---------- */
.layout { max-width: 1440px; margin: 0 auto; padding: 0 16px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
.binario { display: none; }
main { min-width: 0; }
@media (min-width: 1200px) {
  .layout { grid-template-columns: 1fr 2fr 1fr; }
  .binario { display: flex; flex-direction: column; gap: 24px; padding-top: 24px; }
  .ad--sticky { position: sticky; top: 84px; }
}

/* ---------- Spazi pubblicitari (dimensioni riservate: nessun salto di layout) ---------- */
.ad { position: relative; margin: 24px auto; width: 100%; display: flex; align-items: center; justify-content: center;
  border: 1px dashed rgba(179, 169, 217, .35); border-radius: 10px; background: rgba(255, 255, 255, .03); overflow: hidden; }
.ad__label { position: absolute; top: 4px; left: 8px; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--tenue); opacity: .7; }
.ad__ph { text-align: center; color: var(--tenue); font-size: 13px; font-weight: 600; opacity: .8; }
.ad__ph small { font-weight: 400; opacity: .8; }
.ad ins { width: 100%; }
.ad--leader { max-width: 728px; min-height: 100px; }
.ad--box { max-width: 336px; min-height: 280px; }
.ad--alto { min-height: 600px; margin: 0; }
.binario .ad--box { margin: 0; }
.ad--ancora { position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; margin: 0; max-width: none; height: 60px; border-radius: 0;
  border: 0; border-top: 1px solid var(--bordo); background: rgba(11, 8, 32, .96); }
body { padding-bottom: 60px; }
@media (min-width: 768px) { .ad--leader { min-height: 90px; } .ad--ancora { display: none; } body { padding-bottom: 0; } }

/* ---------- Eroe ---------- */
.briciole { font-size: 13px; color: var(--tenue); margin: 18px 0 0; }
.briciole a { color: var(--tenue); }
.eroe { position: relative; display: grid; gap: 24px; margin-top: 14px; padding: 28px 20px 32px; border-radius: 22px; overflow: hidden; isolation: isolate;
  background: linear-gradient(180deg, #2a0f4d 0%, #6b1a6e 45%, #c4366e 75%, #ff8a4c 100%); }
.eroe::before { /* sole al tramonto */
  content: ""; position: absolute; z-index: -1; width: 420px; height: 420px; left: 50%; top: 52%; transform: translateX(-50%); border-radius: 50%;
  background: repeating-linear-gradient(180deg, #ffd36b 0 22px, transparent 22px 30px), radial-gradient(circle, #ffe08a, #ff5b8a);
  -webkit-mask: linear-gradient(#000 0 0); mask: linear-gradient(#000 0 0); opacity: .35; filter: blur(1px); }
.eroe::after { /* griglia retrò */
  content: ""; position: absolute; z-index: -1; left: -20%; right: -20%; bottom: 0; height: 40%;
  background:
    repeating-linear-gradient(90deg, rgba(61, 232, 255, .45) 0 2px, transparent 2px 60px),
    repeating-linear-gradient(0deg, rgba(61, 232, 255, .45) 0 2px, transparent 2px 36px),
    linear-gradient(180deg, transparent, rgba(11, 8, 32, .9));
  transform: perspective(300px) rotateX(55deg); transform-origin: bottom; }
.eroe__occhiello { margin: 0 0 10px; font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #ffe1f0; }
.eroe h1 { font: 400 clamp(48px, 9vw, 92px)/.95 var(--display); letter-spacing: .01em; color: #fff; text-shadow: 0 4px 0 rgba(0, 0, 0, .25); }
.eroe h1 small { display: block; margin-top: 10px; font: 800 clamp(17px, 2.2vw, 22px)/1.25 var(--corpo); letter-spacing: 0; color: #fff; text-shadow: none; }
.neon { color: var(--ciano); text-shadow: 0 0 8px rgba(61, 232, 255, .9), 0 0 24px rgba(61, 232, 255, .6), 0 0 48px rgba(138, 61, 255, .7); }
.eroe__intro { margin: 16px 0 0; max-width: 46ch; font-size: 17px; color: #fff4fa; }
.eroe__img { margin: 0; justify-self: center; width: 100%; max-width: 520px; }
.eroe__img picture { display: block; border-radius: 16px; overflow: hidden; border: 2px solid rgba(61, 232, 255, .8);
  box-shadow: 0 0 0 6px rgba(255, 61, 154, .25), 0 0 40px rgba(61, 232, 255, .45), 0 30px 60px rgba(0, 0, 0, .5); }
.eroe__img img { width: 100%; aspect-ratio: 848 / 1264; }
.eroe__img figcaption { margin-top: 10px; font-size: 13px; color: #ffe1f0; text-align: center; }
@media (min-width: 900px) {
  .eroe { grid-template-columns: 1fr 1fr; align-items: center; padding: 40px 36px; }
}
@media (min-width: 1200px) {
  .eroe { grid-template-columns: 1fr; }
  .eroe__img { max-width: 560px; }
}

/* ---------- Sezioni ---------- */
section h2 { font: 400 clamp(28px, 4vw, 38px)/1.05 var(--display); letter-spacing: .01em; color: #fff; margin-bottom: 14px; }
.come, .faq, .cat { margin-top: 28px; }
.come { background: var(--pannello); border: 1px solid var(--bordo); border-radius: var(--r); padding: 22px 22px 16px; }
.come ol { margin: 0; padding-left: 22px; }
.come li { margin: 8px 0; }
.nota { color: var(--tenue); font-size: 15px; }
.tasto { display: inline-block; font: 700 13px/1 var(--corpo); padding: 5px 7px; border-radius: 6px; background: #241a52; border: 1px solid #5a47b0; color: #fff; }

/* ---------- Ricerca ---------- */
.cerca { margin-top: 28px; }
.cerca label { display: block; font-weight: 800; margin-bottom: 6px; }
.cerca input { width: 100%; font: inherit; color: #fff; background: var(--notte-2); border: 2px solid var(--bordo); border-radius: 12px; padding: 12px 14px; }
.cerca input:focus { border-color: var(--rosa); outline: none; box-shadow: 0 0 0 4px rgba(255, 61, 154, .2); }
.cerca__esito { min-height: 1.6em; margin: 6px 0 0; font-size: 14px; color: var(--tenue); }

/* ---------- Tabelle ---------- */
.cat h2 { display: flex; align-items: center; gap: 10px; }
.cat__ico { font-size: .8em; width: 1.4em; height: 1.4em; display: inline-grid; place-items: center; border-radius: 10px; background: rgba(61, 232, 255, .12); border: 1px solid rgba(61, 232, 255, .5); }
.cat__n { margin-left: auto; font: 800 14px/1 var(--corpo); padding: 6px 10px; border-radius: 99px; background: var(--tramonto); color: #1a0a20; }
.tab-wrap { border: 1px solid var(--bordo); border-radius: var(--r); background: var(--pannello); overflow: hidden;
  box-shadow: 0 0 0 1px rgba(138, 61, 255, .25), 0 0 30px rgba(138, 61, 255, .18); }
table { width: 100%; border-collapse: collapse; }
thead th { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--ciano); text-align: left; padding: 12px 14px; background: rgba(61, 232, 255, .06); border-bottom: 1px solid var(--bordo); }
tbody tr + tr { border-top: 1px solid rgba(58, 42, 122, .7); }
tbody tr:hover { background: rgba(255, 61, 154, .07); }
tbody tr:target { background: rgba(61, 232, 255, .12); }
tbody th, tbody td { padding: 12px 14px; text-align: left; vertical-align: middle; }
tbody th { font-weight: 800; }
.sblocco { color: var(--tenue); font-size: 14px; }
.tasti { display: flex; flex-wrap: wrap; gap: 4px; }
.k { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 7px; color: #fff; background: #1d1545; border: 1.5px solid; vertical-align: middle; }
.k svg { width: 16px; height: 16px; }
.k--U { border-color: #3de8ff; } .k--D { border-color: #ff3d9a; } .k--L { border-color: #8affc1; } .k--R { border-color: #ffd23d; }
.k--D svg { transform: rotate(180deg); } .k--L svg { transform: rotate(-90deg); } .k--R svg { transform: rotate(90deg); }
@media (min-width: 641px) {
  .tasti { flex-wrap: nowrap; gap: 3px; }
  .k { width: 24px; height: 24px; border-radius: 6px; }
  .k svg { width: 14px; height: 14px; }
  thead th:nth-child(2), .codice { white-space: nowrap; }
}

/* Su telefono la tabella diventa a schede, senza scroll orizzontale */
@media (max-width: 640px) {
  thead { display: none; }
  table, tbody, tr, tbody th, tbody td { display: block; }
  tbody tr { padding: 12px 14px; }
  tbody th, tbody td { padding: 0; }
  .codice { margin: 8px 0 6px; }
  .sblocco::before { content: "Sblocco: "; font-weight: 600; color: var(--testo); }
}

/* ---------- FAQ ---------- */
.faq__item { background: var(--pannello); border: 1px solid var(--bordo); border-radius: 12px; margin: 10px 0; }
.faq__item summary { cursor: pointer; padding: 14px 16px; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after { content: "+"; font: 800 22px/1 var(--corpo); color: var(--rosa); }
.faq__item[open] summary::after { content: "–"; }
.faq__item h3 { font: 800 17px/1.35 var(--corpo); }
.faq__item p { margin: 0; padding: 0 16px 16px; color: var(--tenue); }

/* ---------- Piede ---------- */
.piede { max-width: 900px; margin: 40px auto 0; padding: 24px 16px 40px; text-align: center; font-size: 14px; color: var(--tenue); border-top: 1px solid var(--bordo); }
.piede__legale { font-size: 12px; opacity: .8; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
