/* Landing Prestigio — NexArms Classic. Solo font di sistema e asset locali. */

:root {
  --bg: #06080b;
  --ink: #eef1f5;
  --dim: #8f99a6;
  --line: rgba(255, 255, 255, .1);
  --gold: #d9b45f;
  --gold-hi: #f6dc97;
  --mint: #4fd6c4;
  --band: #c9a557;       /* colore della fascia corrente, da JS */
  --focus: #ffd65a;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --display: "Bahnschrift", "DIN Alternate", "DIN Condensed", "Roboto Condensed", "Arial Narrow", system-ui, sans-serif;
  --body: system-ui, "Segoe UI", Roboto, Arial, sans-serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 1rem/1.55 var(--body); overflow-x: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

:focus { outline: none; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; box-shadow: 0 0 0 7px rgba(0, 0, 0, .8); }

.skip { position: fixed; left: 12px; top: -80px; z-index: 60; background: var(--focus); color: #111; padding: 10px 16px; font-weight: 700; text-decoration: none; }
.skip:focus { top: 12px; }

/* ---------- Bottone ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 30px;
  background: var(--gold); color: #15110a; text-decoration: none;
  font-family: var(--display); font-weight: 700; font-size: 1rem; letter-spacing: .12em; text-transform: uppercase;
  clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
  transition: background-color .2s, transform .2s var(--ease);
}
.btn:hover { background: var(--gold-hi); transform: translateY(-2px); }
.btn:focus-visible { clip-path: none; }

/* ---------- Barra superiore ---------- */
.top {
  position: fixed; inset: 0 0 auto; z-index: 40;
  display: flex; align-items: center; gap: 12px;
  height: 60px; padding: 0 clamp(14px, 3vw, 32px);
  background: linear-gradient(rgba(6, 8, 11, .85), rgba(6, 8, 11, 0));
}
.brand { font-family: var(--display); text-transform: uppercase; letter-spacing: .14em; font-size: .95rem; text-decoration: none; margin-right: auto; }
.brand b { color: var(--gold); }
.lang { display: flex; }
.lang button {
  background: none; border: 0; cursor: pointer; min-width: 40px; min-height: 40px;
  font-family: var(--display); font-size: .82rem; letter-spacing: .1em; color: var(--dim);
  border-bottom: 2px solid transparent;
}
.lang button[aria-pressed="true"] { color: var(--ink); border-bottom-color: var(--gold); }
.top-cta {
  font-family: var(--display); text-transform: uppercase; letter-spacing: .1em; font-size: .8rem;
  text-decoration: none; padding: 8px 14px; border: 1px solid var(--gold); color: var(--gold-hi); white-space: nowrap;
}
.top-cta:hover { background: var(--gold); color: #15110a; }

/* ---------- Apertura ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden; overflow: clip;
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  padding: 90px 16px 60px;
}
.hero::before {
  content: ""; position: absolute; inset: -20%; z-index: -1;
  background: var(--band); opacity: .3;
  -webkit-mask-image: radial-gradient(closest-side, #000, transparent);
  mask-image: radial-gradient(closest-side, #000, transparent);
  transition: background-color .4s;
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(255, 255, 255, .025) 0 1px, transparent 1px 4px);
}
.hero-emblem { width: clamp(120px, 24vh, 210px); aspect-ratio: 1; }
.hero-emblem img { width: 100%; height: 100%; filter: drop-shadow(0 18px 40px rgba(0, 0, 0, .8)); }
.hero-emblem.pop img { animation: pop .6s var(--ease); }
@keyframes pop { 0% { transform: scale(.85); } 60% { transform: scale(1.08); } 100% { transform: scale(1); } }
.hero-count {
  font-family: var(--display); font-weight: 700; font-variant-numeric: tabular-nums;
  font-size: clamp(1.2rem, 3vw, 1.6rem); letter-spacing: .3em; color: var(--band);
  margin-top: 6px; transition: color .4s;
}
.hero-count::before { content: "LV "; color: var(--dim); }
.hero-title {
  font-family: var(--display); font-weight: 700; text-transform: uppercase;
  font-size: clamp(3.2rem, 13vw, 10rem); line-height: .9; letter-spacing: .04em;
  margin-top: 10px;
}
.hero-sub { margin-top: 18px; font-size: clamp(1.05rem, 2.2vw, 1.35rem); color: #c8d0da; max-width: 30em; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px 28px; margin-top: 34px; }
.down { font-family: var(--display); text-transform: uppercase; letter-spacing: .14em; font-size: .85rem; color: var(--dim); text-decoration: none; padding: 10px 4px; }
.down:hover { color: var(--ink); }
.down [aria-hidden] { display: inline-block; animation: bob 1.8s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(4px); } }

/* ---------- Regole ---------- */
.rules {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.rule { padding: clamp(32px, 5vw, 64px) clamp(18px, 3vw, 44px); }
.rule + .rule { border-left: 1px solid var(--line); }
.rule-big {
  font-family: var(--display); font-weight: 700; font-variant-numeric: tabular-nums;
  font-size: clamp(2.8rem, 6vw, 5rem); line-height: 1; white-space: nowrap;
}
.rule-big small { font-size: .38em; color: var(--dim); letter-spacing: .1em; }
.rule-big .arrow { color: var(--dim); font-size: .5em; margin: 0 .25em; vertical-align: middle; }
.rule-big .hot { color: var(--mint); }
.rule h2 { font-family: var(--display); text-transform: uppercase; letter-spacing: .1em; font-size: 1.05rem; margin-top: 18px; color: var(--gold-hi); }
.rule p:not(.rule-big) { margin-top: 8px; color: #c3cbd5; max-width: 30em; }
.rule .fine { font-size: .86rem; color: var(--dim) !important; }
.xp-bar { height: 4px; background: rgba(255, 255, 255, .1); margin-top: 16px; }
.xp-bar i { display: block; height: 100%; width: 45%; background: var(--mint); transition: width 1.2s var(--ease); }

/* Ingresso delle regole (solo con movimento attivo) */
.motion .rule { opacity: 0; transform: translateY(28px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.motion .rule:nth-child(2) { transition-delay: .1s; }
.motion .rule:nth-child(3) { transition-delay: .2s; }
.motion .rules.is-in .rule { opacity: 1; transform: none; }
.motion .rules:not(.is-in) .xp-bar i { width: 100%; }

/* ---------- Percorso 56 → 100 ---------- */
.journey { position: relative; height: 1550vh; } /* altezza ricalcolata da JS */
.pin {
  position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; overflow: clip; isolation: isolate;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: clamp(10px, 2.2vh, 22px);
  padding: 64px 16px 96px; text-align: center;
}
.pin-bg {
  position: absolute; inset: -10%; z-index: -2;
  background: var(--band); opacity: .28;
  -webkit-mask-image: radial-gradient(50% 45% at 50% 40%, #000, transparent);
  mask-image: radial-gradient(50% 45% at 50% 40%, #000, transparent);
  transition: background-color .6s, opacity .6s;
}
.pin-rays {
  position: absolute; left: 50%; top: 38%; width: 180vmax; height: 180vmax; margin: -90vmax 0 0 -90vmax; z-index: -1;
  background: repeating-conic-gradient(rgba(246, 220, 151, .08) 0 4deg, transparent 4deg 14deg);
  -webkit-mask-image: radial-gradient(circle, #000, transparent 45%);
  mask-image: radial-gradient(circle, #000, transparent 45%);
  opacity: 0; transition: opacity .8s; animation: spin 80s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.bignum {
  position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-58%); z-index: -1;
  font-family: var(--display); font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums;
  font-size: min(58vh, 50vw); letter-spacing: -.02em;
  color: transparent; -webkit-text-stroke: 2px var(--band); opacity: .16; transition: -webkit-text-stroke-color .6s;
  user-select: none;
}

.track { position: relative; perspective: 900px; width: 100%; height: clamp(140px, 32vh, 290px); flex-shrink: 0; }
.track-item {
  position: absolute; left: 50%; top: 50%;
  --size: clamp(130px, 30vh, 270px);
  width: var(--size); height: var(--size); margin: calc(var(--size) / -2) 0 0 calc(var(--size) / -2);
  will-change: transform, opacity;
}
.track-item img { width: 100%; height: 100%; filter: drop-shadow(0 16px 30px rgba(0, 0, 0, .75)); }
.summit-emblem {
  position: absolute; left: 50%; top: 50%; width: auto; height: 100%; max-width: none;
  transform: translate(-50%, -50%) scale(.6); opacity: 0;
  filter: drop-shadow(0 30px 60px rgba(0, 0, 0, .8)) drop-shadow(0 0 50px rgba(79, 214, 196, .3));
  transition: opacity .7s var(--ease), transform .9s var(--ease);
  pointer-events: none;
}

.info-level { font-family: var(--display); text-transform: uppercase; letter-spacing: .24em; font-size: .82rem; color: var(--dim); }
.info-level b { color: var(--band); font-size: 1.1rem; letter-spacing: .08em; transition: color .6s; }
.info-name {
  font-family: var(--display); font-weight: 700; text-transform: uppercase;
  font-size: clamp(1.6rem, 4.6vw, 3.2rem); line-height: 1.02; margin-top: 4px;
}
.info-xp { font-family: var(--display); font-variant-numeric: tabular-nums; font-size: clamp(1.05rem, 2vw, 1.3rem); color: #c8d0da; margin-top: 6px; letter-spacing: .06em; }
.qa { display: inline-block; margin-top: 8px; font-size: .78rem; text-transform: uppercase; letter-spacing: .14em; color: var(--mint); border: 1px solid currentColor; padding: 3px 8px; }
.summit-note { display: none; margin-top: 6px; color: var(--gold-hi); font-size: .9rem; }
.info.swap { animation: swap .32s var(--ease); }
@keyframes swap { from { opacity: 0; transform: translateY(10px); } }

.reward {
  display: flex; align-items: center; gap: 14px; cursor: pointer; text-align: left;
  padding: 8px 16px 8px 8px; max-width: min(460px, 100%);
  background: rgba(255, 255, 255, .04); border: 1px solid var(--line);
  transition: border-color .2s, background-color .2s;
}
.reward:hover { border-color: var(--band); background: rgba(255, 255, 255, .07); }
.reward img { width: clamp(120px, 18vw, 170px); height: auto; aspect-ratio: 2 / 1; object-fit: contain; flex-shrink: 0; }
.reward-txt { display: flex; flex-direction: column; min-width: 0; }
.reward-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .16em; color: var(--band); transition: color .6s; }
.reward-name { font-family: var(--display); font-weight: 700; font-size: 1.2rem; }
.reward-plus { margin-left: auto; width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid var(--line); font-size: 1.1rem; color: var(--dim); flex-shrink: 0; }

.summit-cta { display: none; }

.scrub {
  position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%);
  width: min(760px, calc(100% - 32px)); display: flex; align-items: center; gap: 12px;
  font-family: var(--display); font-size: .78rem; color: var(--dim); letter-spacing: .1em;
}
.scrub input { flex: 1; -webkit-appearance: none; appearance: none; height: 32px; background: transparent; cursor: pointer; margin: 0; }
.scrub input::-webkit-slider-runnable-track { height: 3px; background: linear-gradient(90deg, var(--band) var(--fill, 0%), rgba(255, 255, 255, .14) var(--fill, 0%)); }
.scrub input::-moz-range-track { height: 3px; background: rgba(255, 255, 255, .14); }
.scrub input::-moz-range-progress { height: 3px; background: var(--band); }
.scrub input::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; margin-top: -7.5px; background: var(--ink); transform: rotate(45deg); border: 0; }
.scrub input::-moz-range-thumb { width: 16px; height: 16px; background: var(--ink); transform: rotate(45deg); border: 0; border-radius: 0; }

.hint {
  position: absolute; left: 0; right: 0; bottom: 64px; font-size: .76rem; text-transform: uppercase; letter-spacing: .2em; color: var(--dim);
  transition: opacity .4s;
}
.hint.off { opacity: 0; }

/* Stato vertice: grado 100 */
.journey.is-summit { --band: #4fd6c4; }
.journey.is-summit .pin-bg { opacity: .38; }
.journey.is-summit .pin-rays { opacity: 1; }
.journey.is-summit .track-item { opacity: 0 !important; }
.journey.is-summit .track { height: clamp(190px, 40vh, 400px); }
.journey.is-summit .summit-emblem { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.journey.is-summit .bignum { -webkit-text-stroke-color: var(--gold); opacity: .12; }
.journey.is-summit .info-name { color: var(--gold-hi); }
.journey.is-summit .summit-note { display: block; }
.journey.is-summit .summit-cta { display: inline-flex; }
.journey.is-summit .reward { border-color: rgba(217, 180, 95, .5); }
.journey.is-summit .info-level b { color: var(--gold-hi); }

.noscript { padding: 40px 16px; text-align: center; color: var(--dim); }

/* ---------- Piede ---------- */
.foot { display: flex; justify-content: space-between; gap: 16px; padding: 22px clamp(14px, 3vw, 32px); border-top: 1px solid var(--line); color: var(--dim); font-size: .85rem; font-family: var(--display); letter-spacing: .1em; text-transform: uppercase; }
.foot a { color: var(--gold-hi); text-decoration: none; }

/* ---------- Scheda premio ---------- */
.sheet {
  width: min(440px, calc(100% - 24px)); padding: 28px 24px 22px; border: 1px solid var(--band);
  background: #0e131a; color: var(--ink);
}
.sheet::backdrop { background: rgba(2, 4, 6, .8); }
.sheet[open] { animation: swap .25s var(--ease); }
.sheet-x { position: absolute; top: 8px; right: 8px; width: 44px; height: 44px; background: none; border: 0; font-size: 1.7rem; cursor: pointer; color: var(--dim); }
.sheet img { width: 100%; max-width: 256px; margin: 0 auto; aspect-ratio: 2 / 1; object-fit: contain; } /* icone native 256×128: mai ingrandite */
.sheet h2 { font-family: var(--display); font-size: 1.7rem; margin-top: 12px; }
.sheet dl { display: grid; grid-template-columns: repeat(3, auto); gap: 12px 20px; margin: 16px 0; }
.sheet dt { font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; color: var(--dim); }
.sheet dd { margin: 2px 0 0; font-weight: 600; }
.sheet-note { color: #c3cbd5; font-size: .92rem; border-top: 1px solid var(--line); padding-top: 14px; }

/* ---------- Mobile ---------- */
@media (max-width: 760px) {
  .rules { grid-template-columns: 1fr; }
  .rule + .rule { border-left: 0; border-top: 1px solid var(--line); }
  .top-cta { display: none; }
  .lang button { min-width: 36px; }
  .pin { padding: 60px 14px 92px; gap: 10px; }
  .track { height: clamp(120px, 26vh, 220px); }
  .track-item { --size: clamp(110px, 24vh, 200px); }
  .journey.is-summit .track { height: clamp(160px, 32vh, 300px); }
  .reward { padding: 6px 12px 6px 6px; }
  .reward-name { font-size: 1.05rem; }
  .sheet dl { grid-template-columns: 1fr 1fr; }
  .bignum { font-size: min(44vh, 70vw); }
}
@media (max-height: 620px) {
  .hint { display: none; }
  .track { height: 24vh; }
  .track-item { --size: 22vh; }
}

/* ---------- Movimento ridotto (sistema, o ?motion=reduced per il collaudo) ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
.still *, .still *::before, .still *::after { animation: none !important; transition: none !important; }
