/* ──────────────────────────────────────────────────────────────────────
   home.css — la home (templates/index.html, standalone: niente style.css).
   Racconta community e sito: apertura con lo sciame che diventa il logo e
   le locuste che gli volano intorno, le aree del sito una sotto l'altra
   (entrano di lato), prossimi match, come si farmano i Locoin, le carte dei
   team, lo spirito, come si entra. Comportamento in js/home.js.
   Colore di marca della home: verde leggermente neon (Art 5/11, al posto
   dell'oro). L'oro resta solo dove è oro davvero (moneta, statuette, team).
   ────────────────────────────────────────────────────────────────────── */

:root {
  --bg: #070707;
  --bg-2: #0d0d0d;
  --card: #111;
  --line: rgba(255,255,255,.08);
  --white: #fff;
  --gray-light: #ccc;
  --gray-mid: #888;
  --brand: #85F04F;
  --brand-light: #B6FF8C;
  --brand-deep: #3E9E2A;
  --brand-rgb: 133, 240, 79;
  --gold: #C9A860;
  --gold-light: #E0C07A;
  --green-dark: #2D7A2D;
  --green-bright: #4DB84D;
  --cyan: #00C8FF;
  /* stessi accenti dei team di style.css (i team nuovi scelgono da qui) */
  --crimson: #f87171; --fuchsia: #e879f9; --indigo: #818cf8; --sky: #38bdf8; --teal: #2dd4bf;
  --emerald: #34d399; --lime: #a3e635; --amber: #fbbf24; --rust: #c2703d; --stone: #a8a29e;
  --slate: #94a3b8; --cobalt: #3b82f6;
  --font-title: 'Rajdhani', sans-serif;
  --font-body: 'Inter', sans-serif;
  --mono: 'JetBrains Mono', 'Courier New', monospace;
  --pixel: 'Silkscreen', 'Rajdhani', monospace;     /* etichette piccole, come lo shop */
  --ease: cubic-bezier(.2, .8, .2, 1);
  --gut: clamp(16px, 5vw, 72px);
  --nav-h: 68px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: clip; scroll-padding-top: var(--nav-h); }
body {
  background: var(--bg);
  color: var(--gray-light);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}
html[lang="it"] .lang-en { display: none; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: var(--brand); color: #000; }
.h-sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.h-wrap { width: min(1240px, 100%); margin: 0 auto; padding: 0 var(--gut); }

.h-kicker {
  display: inline-block;
  font-family: var(--pixel);
  font-size: .72rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--brand);
}
.h-h2 {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: clamp(2.4rem, 5.6vw, 4.6rem);
  line-height: .92;
  letter-spacing: -.005em;
  text-transform: uppercase;
  color: var(--white);
  margin-top: 12px;
}
.h-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border: 1px solid var(--brand);
  border-radius: 8px;
  background: var(--brand);
  color: #061006;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  transition: transform .3s var(--ease), box-shadow .3s, background .3s, color .3s;
}
.h-btn:hover { transform: translateY(-2px); box-shadow: 0 14px 38px -12px rgba(var(--brand-rgb), .8); }
.h-btn--ghost { background: transparent; color: var(--brand); }
.h-btn--ghost:hover { background: rgba(var(--brand-rgb), .1); color: var(--brand-light); }
.h-btn--lg { padding: 19px 44px; font-size: 1.22rem; border-radius: 10px; }
.h-link {
  display: inline-block;
  font-family: var(--pixel);
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--brand);
  border-bottom: 1px solid rgba(var(--brand-rgb), .35);
  padding-bottom: 4px;
  transition: color .2s, border-color .2s;
}
.h-link:hover { color: var(--brand-light); border-color: var(--brand-light); }
.h-dot { width: 8px; height: 8px; border-radius: 50%; background: #555; display: inline-block; flex: 0 0 auto; }
[data-live].is-live .h-dot { background: #ef4444; box-shadow: 0 0 10px #ef4444; animation: hPulse 1.4s ease-in-out infinite; }
[data-live] .h-live-on, [data-live].is-live .h-live-off { display: none; }
[data-live].is-live .h-live-on { display: inline; }
@keyframes hPulse { 50% { opacity: .35; } }

/* logo dei team "normalizzato": scala e spostamento calcolati in core/home.py */
.h-fit { transform: scale(var(--fs, 1)) translate(var(--fx, 0%), var(--fy, 0%)); }

/* ═══ NAVBAR ══════════════════════════════════════════════════════════ */
.h-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 0 var(--gut);
  border-bottom: 1px solid transparent;
  transition: background .4s, border-color .4s, backdrop-filter .4s, transform .45s var(--ease);
}
.h-nav.is-solid {
  background: rgba(8,8,8,.72);
  backdrop-filter: blur(14px) saturate(1.2);
  border-bottom-color: rgba(var(--brand-rgb), .16);
}
.h-nav.is-hidden { transform: translateY(-100%); }
.h-nav__brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-title); font-weight: 700; font-size: 1.15rem; letter-spacing: .12em; text-transform: uppercase; color: var(--white); }
.h-nav__brand b { color: var(--brand); font-weight: 700; }
.h-nav__brand img { width: 34px; height: 34px; }
.h-nav__links { display: flex; gap: 4px; margin: 0 auto; }
.h-nav__links a {
  position: relative;
  padding: 8px 12px;
  font-family: var(--font-title);
  font-weight: 600;
  font-size: .95rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--gray-light);
  transition: color .2s;
}
.h-nav__links a::after {
  content: '';
  position: absolute;
  left: 12px; right: 12px; bottom: 3px;
  height: 1px;
  background: var(--brand);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .35s var(--ease);
}
.h-nav__links a:hover { color: var(--white); }
.h-nav__links a:hover::after { transform: scaleX(1); }
.h-nav__side { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.h-nav__links + .h-nav__side { margin-left: 0; }
.h-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gray-mid);
  transition: border-color .2s, color .2s;
}
.h-live-pill i { width: 7px; height: 7px; border-radius: 50%; background: #555; }
.h-live-pill.is-live { border-color: rgba(239,68,68,.5); color: #fecaca; }
.h-live-pill.is-live i { background: #ef4444; box-shadow: 0 0 10px #ef4444; animation: hPulse 1.4s ease-in-out infinite; }
.h-nav__login {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 8px;
  background: #5865F2;
  color: #fff;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: .9rem;
  letter-spacing: .06em;
  transition: filter .2s;
}
.h-nav__login:hover { filter: brightness(1.1); }
.h-nav__user { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border: 1px solid rgba(var(--brand-rgb), .3); border-radius: 999px; }
.h-nav__user img, .h-nav__initials { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.h-nav__initials { display: grid; place-items: center; background: rgba(var(--brand-rgb), .15); color: var(--brand); font-family: var(--font-title); font-weight: 700; font-size: .8rem; }
.h-nav__lc { font-family: var(--mono); font-size: .72rem; font-weight: 700; color: var(--brand); }
.h-nav__lang { display: flex; gap: 2px; }
.l-lang__btn {
  padding: 5px 7px;
  border-radius: 4px;
  font-family: var(--mono);
  font-size: .64rem;
  font-weight: 700;
  letter-spacing: .12em;
  color: rgba(255,255,255,.35);
  transition: color .2s, background .2s;
}
.l-lang__btn.is-active { color: var(--brand); background: rgba(var(--brand-rgb), .12); }
.h-nav__burger { display: none; width: 40px; height: 40px; position: relative; }
.h-nav__burger i { position: absolute; left: 9px; right: 9px; height: 2px; background: var(--white); transition: transform .35s var(--ease), top .35s var(--ease); }
.h-nav__burger i:first-child { top: 15px; }
.h-nav__burger i:last-child { top: 23px; }
.h-nav__burger[aria-expanded="true"] i:first-child { top: 19px; transform: rotate(45deg); }
.h-nav__burger[aria-expanded="true"] i:last-child { top: 19px; transform: rotate(-45deg); }

/* menu a tutto schermo */
.h-menu {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(6,6,6,.96);
  backdrop-filter: blur(10px);
  display: grid;
  align-content: center;
  padding: calc(var(--nav-h) + 12px) var(--gut) 32px;
  opacity: 0;
  transition: opacity .35s;
}
.h-menu[hidden] { display: none; }
.h-menu.is-open { opacity: 1; }
.h-menu__links { display: grid; gap: 4px; }
.h-menu__links a {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-title);
  font-weight: 700;
  font-size: clamp(1.8rem, 8vw, 2.6rem);
  line-height: 1.05;
  text-transform: uppercase;
  color: var(--white);
  opacity: 0;
  transform: translateX(-18px);
  transition: opacity .45s calc(var(--k) * 40ms + 80ms), transform .55s var(--ease) calc(var(--k) * 40ms + 80ms), color .2s;
}
.h-menu.is-open .h-menu__links a { opacity: 1; transform: none; }
.h-menu__links a:active { color: var(--brand); }
.h-menu__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 28px; }
.h-menu__foot .h-nav__login span { display: inline !important; }

/* ═══ APERTURA ════════════════════════════════════════════════════════ */
.h-hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: calc(var(--nav-h) + 12px) var(--gut) 150px;
  overflow: hidden;
  isolation: isolate;
  text-align: center;
}
.h-hero__bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(46% 42% at 50% 36%, rgba(var(--brand-rgb), .13), transparent 70%),
    radial-gradient(30% 30% at 14% 84%, rgba(var(--brand-rgb), .07), transparent 70%),
    radial-gradient(28% 28% at 86% 16%, rgba(201,168,96,.06), transparent 70%),
    var(--bg);
}
.h-hero__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(0deg, rgba(255,255,255,.016) 0 1px, transparent 1px 4px);
}
.h-hero__swarm { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; display: block; }
.h-hero__inner { position: relative; display: flex; flex-direction: column; align-items: center; }
.h-hero__logo {
  /* il PNG ha margini vuoti (17% sopra, 28% sotto il disegno): margini negativi per non sprecare spazio */
  --lw: min(60vmin, 560px);
  width: var(--lw);
  height: auto;
  margin: calc(var(--lw) * -.12) 0 calc(var(--lw) * -.2);
  opacity: 0;                                        /* lo disegna lo sciame, poi si accende */
  filter: drop-shadow(0 0 46px rgba(var(--brand-rgb), .28));
}
.h-hero.is-logo .h-hero__logo { animation: hLogoOn 1.2s var(--ease) forwards; }
@keyframes hLogoOn {
  0%   { opacity: 0; filter: brightness(2.1) drop-shadow(0 0 70px rgba(var(--brand-rgb), .9)); transform: scale(.97); }
  100% { opacity: 1; filter: drop-shadow(0 0 46px rgba(var(--brand-rgb), .28)); transform: none; }
}
.h-hero__eyebrow, .h-hero__ctas, .h-now, .h-hero__scroll {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .8s ease, transform .9s var(--ease);
}
.h-hero__title {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: clamp(2.9rem, 7.6vw, 6.6rem);
  line-height: .86;
  letter-spacing: .01em;
  text-transform: uppercase;
  color: var(--white);
  margin: 12px 0 0;
}
.h-hero__title b { color: transparent; -webkit-text-stroke: 1.5px var(--brand); font-weight: 700; text-shadow: 0 0 50px rgba(var(--brand-rgb), .28); }
.h-rise { display: inline-block; overflow-y: clip; vertical-align: top; padding-bottom: .04em; }
.h-rise > span { display: inline-block; transform: translateY(110%); transition: transform 1s var(--ease); }
.h-rise + .h-rise > span { transition-delay: .1s; }
.h-hero__ctas { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 30px; }
.h-hero.is-ready .h-hero__eyebrow { opacity: 1; transform: none; }
.h-hero.is-ready .h-rise > span { transform: none; }
.h-hero.is-ready .h-hero__ctas { opacity: 1; transform: none; transition-delay: .3s; }
.h-hero.is-ready .h-now { opacity: 1; transform: none; transition-delay: .55s; }
.h-hero.is-ready .h-hero__scroll { opacity: 1; transform: none; transition-delay: .9s; }

/* striscia "adesso" in fondo all'apertura */
.h-now {
  position: absolute;
  left: var(--gut); right: var(--gut); bottom: 26px;
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}
.h-now__item {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 200px;
  padding: 13px 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(10,10,10,.55);
  backdrop-filter: blur(8px);
  text-align: left;
  overflow: hidden;
  transition: border-color .25s, transform .3s var(--ease);
}
.h-now__item:hover { border-color: rgba(var(--brand-rgb), .45); transform: translateY(-2px); }
.h-now__lbl { font-family: var(--pixel); font-size: .6rem; letter-spacing: .16em; text-transform: uppercase; color: var(--gray-mid); }
.h-now__val { display: flex; align-items: center; gap: 8px; font-family: var(--font-title); font-weight: 700; font-size: 1.16rem; color: var(--white); white-space: nowrap; }
.h-now__val em { font-style: normal; color: var(--brand); }
/* valori che scorrono: tutti nella stessa cella, la casella è larga quanto il più lungo */
.h-ticker { display: grid; }
.h-tick { grid-area: 1 / 1; opacity: 0; transform: translateY(70%); transition: opacity .45s ease, transform .55s var(--ease); }
.h-tick.is-on { opacity: 1; transform: none; }
.h-tick.is-out { opacity: 0; transform: translateY(-70%); }
.h-hero__scroll { position: absolute; right: var(--gut); bottom: 34px; width: 1px; height: 52px; background: rgba(255,255,255,.12); overflow: hidden; }
.h-hero__scroll i { position: absolute; left: 0; top: 0; width: 1px; height: 40%; background: var(--brand); animation: hScroll 2s var(--ease) infinite; }
@keyframes hScroll { from { transform: translateY(-100%); } to { transform: translateY(260%); } }

/* ═══ IL SITO: le aree una sotto l'altra, entrano di lato ═════════════ */
.h-rooms { padding: clamp(90px, 12vw, 150px) 0 clamp(40px, 6vw, 80px); }
.h-rooms__list { display: grid; gap: clamp(70px, 10vw, 130px); }
.h-room {
  --p: .5;                         /* 0 = entra dal basso, 1 = esce in alto (home.js) */
  --dir: 1;                        /* da che lato entra: le aree dispari da sinistra, le pari da destra */
  --e: 1;                          /* entrata legata allo scroll (home.js): 0 = fuori di lato, 1 = al suo posto */
  --slide: min(24vw, 340px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: clamp(28px, 5vw, 80px);
  align-items: center;
  /* scorrendo, l'area arriva dal suo lato (Art 5/11); la transizione ammorbidisce gli scatti della rotellina */
  transform: translate3d(calc(var(--dir) * (var(--e) - 1) * var(--slide)), 0, 0);
  opacity: calc(var(--e) * 1.3 - .3);
  transition: transform .6s var(--ease), opacity .6s ease;
}
.h-room:nth-child(even) { --dir: -1; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
.h-room:nth-child(even) .h-room__art { order: -1; }
.h-room__title {
  position: relative;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: clamp(2.3rem, 4.4vw, 3.8rem);
  line-height: .92;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 18px;
  padding-bottom: 16px;
}
.h-room__title::after {           /* filo nel colore dell'area che si allunga scorrendo */
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 120px;
  height: 2px;
  background: linear-gradient(90deg, var(--acc), transparent);
  transform: scaleX(calc(.25 + var(--p) * .75));
  transform-origin: left;
  box-shadow: 0 0 12px color-mix(in srgb, var(--acc) 60%, transparent);
}
.h-room__text p { color: var(--gray-light); line-height: 1.75; font-size: clamp(.98rem, 1.2vw, 1.08rem); max-width: 520px; }
.h-room__datum {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  padding: 6px 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--acc) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--acc) 35%, transparent);
  font-family: var(--mono);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--gray-light);
}
.h-room__datum b { color: var(--acc); font-size: .9rem; }
.h-room__links { display: flex; flex-wrap: wrap; gap: 8px 26px; margin-top: 24px; }
.h-room__go {
  display: block;
  width: max-content;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--acc);
  transition: transform .3s var(--ease), color .2s;
}
.h-room__go:hover { transform: translateX(6px); color: var(--white); }
.h-room__go--alt { color: var(--brand); }

/* il testo arriva dietro all'area, una riga alla volta (più indietro le ultime) */
.h-room__text > * { --lag: 0px; transform: translateX(calc(var(--dir) * (var(--e) - 1) * var(--lag))); transition: transform .75s var(--ease); }
.h-room__text > :nth-child(2) { --lag: 50px; }
.h-room__text > :nth-child(3) { --lag: 100px; }
.h-room__text > :nth-child(4) { --lag: 150px; }

/* la grafica si apre in orizzontale dal centro, poi scivola piano di lato scorrendo */
.h-room__art {
  position: relative;
  aspect-ratio: 16 / 11;
  border-radius: 20px;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(60% 65% at 50% 50%, color-mix(in srgb, var(--acc) 16%, transparent), transparent 75%),
    linear-gradient(160deg, #121212, #090909);
  border: 1px solid color-mix(in srgb, var(--acc) 22%, transparent);
  box-shadow: 0 40px 90px -55px color-mix(in srgb, var(--acc) 70%, transparent);
  color: var(--acc);
  clip-path: inset(0 calc((1 - var(--e)) * 46%) round 20px);    /* si apre in orizzontale mentre arriva */
  transition: clip-path .6s var(--ease);
}
.h-room__drift {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template: 100% / 100%;      /* una cella alta quanto il riquadro: le altezze in % dei figli valgono */
  place-items: center;
  transform: translateX(calc(var(--dir) * (var(--p) - .5) * -44px));
  opacity: calc(var(--e) * 2.2 - 1.2);                            /* la grafica compare nell'ultimo tratto */
  transition: opacity .5s ease;
}

/* Squadre: i loghi tutti grandi uguali */
.h-room__art--teams .h-room__drift { grid-template: repeat(2, minmax(0, 1fr)) / repeat(4, minmax(0, 1fr)); gap: 4% 6%; padding: 7% 8%; }
.h-float { display: block; width: 100%; max-width: 112px; animation: hFloat 6s ease-in-out infinite; animation-delay: calc(var(--j) * -.7s); }
.h-float img { width: 100%; aspect-ratio: 1; object-fit: contain; filter: drop-shadow(0 10px 18px rgba(0,0,0,.6)); }
@keyframes hFloat { 50% { transform: translateY(-8px) rotate(2deg); } }

/* Tornei: tabellone che si disegna, logo delle Locuste in trasparenza */
.h-room__watermark { position: absolute; left: 50%; top: 50%; width: 62%; transform: translate(-50%, -50%); opacity: .1; filter: grayscale(.2); z-index: -1; }
.h-room__art--bracket .h-room__drift { padding: 8% 9%; }
.h-room__art--bracket svg { width: 100%; height: auto; overflow: visible; }
.h-room__art--bracket path { stroke-dasharray: 1; stroke-dashoffset: calc(1 - var(--e)); filter: drop-shadow(0 0 6px currentColor); transition: stroke-dashoffset .6s var(--ease); }   /* si disegna scorrendo */

/* LocPound: la moneta che gira, Locoin su tutte e due le facce */
.h-room__art--coin .h-room__drift { perspective: 900px; }
.h-coin { position: relative; width: min(52%, 270px); aspect-ratio: 1; transform-style: preserve-3d; animation: hCoin 7s linear infinite; }
.h-coin::after {                                     /* ombra a terra */
  content: '';
  position: absolute;
  left: 15%; right: 15%; bottom: -16%;
  height: 10%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(224,192,122,.35), transparent);
  transform: rotateY(0) translateZ(-1px);
}
.h-coin i, .h-coin__face { position: absolute; inset: 0; border-radius: 50%; }
.h-coin i { background: linear-gradient(90deg, #5a4316, #b08d47 45%, #5a4316); transform: translateZ(calc(var(--z) * -1.6px + 4.8px)); }
.h-coin__face { width: 100%; height: 100%; transform: translateZ(5.6px); backface-visibility: hidden; }
.h-coin__face--back { transform: rotateY(180deg) translateZ(5.6px); }
@keyframes hCoin { to { transform: rotateY(360deg); } }

/* FantaLocuste */
.h-room__art--fanta .h-room__drift { padding: 6%; }
.h-room__art--fanta img { width: 78%; height: 100%; object-fit: contain; filter: drop-shadow(0 18px 30px rgba(0,0,0,.6)) drop-shadow(0 0 30px rgba(145,70,255,.28)); animation: hFloat 7s ease-in-out infinite; }

/* On Air: logo Twitch dietro, barre che pulsano davanti */
.h-room__twitch { position: absolute; left: 50%; top: 50%; width: 46%; transform: translate(-50%, -50%); opacity: .14; z-index: -1; }
.h-room__art--wave .h-room__drift { display: flex; align-items: center; justify-content: center; gap: 3.6%; padding: 0 13%; }
.h-room__art--wave i { flex: 1; height: 46%; border-radius: 4px; background: linear-gradient(var(--acc), color-mix(in srgb, var(--acc) 15%, transparent)); animation: hBar 1.1s ease-in-out infinite alternate; animation-delay: calc(var(--j) * -.13s); }
@keyframes hBar { from { transform: scaleY(.25); } to { transform: scaleY(1); } }

/* Statuette: una ogni 2 secondi */
.h-slides { display: grid; }
.h-slide { grid-area: 1 / 1; opacity: 0; transition: opacity .6s ease, transform .8s var(--ease); }
.h-slide.is-on { opacity: 1; }
.h-room__art--statue .h-slide { display: grid; grid-template: 100% / 100%; place-items: center; width: 100%; height: 100%; transform: translateX(40px) scale(.96); }
.h-room__art--statue .h-slide.is-on { transform: none; }
.h-room__art--statue .h-slide.is-out { transform: translateX(-40px) scale(.96); }
.h-room__art--statue img { width: 70%; height: 72%; object-fit: contain; filter: drop-shadow(0 20px 30px rgba(0,0,0,.6)) drop-shadow(0 0 30px color-mix(in srgb, var(--acc) 40%, transparent)); }
.h-room__art--statue figcaption { position: absolute; bottom: 16px; left: 0; right: 0; text-align: center; font-family: var(--pixel); font-size: .62rem; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-light); }

/* Locuste nel Mondo: il radar, con il raggio che gira */
.h-radar { position: relative; height: 92%; aspect-ratio: 1; }
.h-radar img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 0 24px rgba(var(--brand-rgb), .25)); }
.h-radar__sweep {                                     /* schermo del radar: centro e raggio misurati su radar.webp */
  position: absolute;
  left: 49.4%; top: 56.4%;
  width: 48%; aspect-ratio: 1;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: conic-gradient(from 0deg, transparent 0 300deg, rgba(190,255,150,.05) 320deg, rgba(190,255,150,.42) 360deg);
  mix-blend-mode: screen;
  animation: hSweep 3.6s linear infinite;
}
@keyframes hSweep { to { transform: translate(-50%, -50%) rotate(360deg); } }

/* Media: tre polaroid, le foto si alternano */
.h-frame {
  position: absolute;
  left: 50%; top: 50%;
  width: 44%;
  aspect-ratio: 4 / 3;
  border: 6px solid #f3efe6;
  border-bottom-width: 22px;
  border-radius: 3px;
  background: #222;
  box-shadow: 0 20px 40px rgba(0,0,0,.6);
  overflow: hidden;
}
.h-frame:nth-child(1) { transform: translate(-74%, -60%) rotate(-11deg); }
.h-frame:nth-child(2) { transform: translate(-26%, -40%) rotate(8deg); }
.h-frame:nth-child(3) { transform: translate(-50%, -50%) rotate(-2deg); }
.h-frame { grid-template: 100% / 100%; }
.h-frame .h-slide { width: 100%; height: 100%; object-fit: cover; }

/* Scrim */
.h-room__vs { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 4%; z-index: -1; font-family: var(--font-title); font-weight: 700; font-size: clamp(5rem, 12vw, 10rem); line-height: 1; color: rgba(255,255,255,.05); }
.h-room__vs b { font-size: .3em; color: color-mix(in srgb, var(--acc) 40%, transparent); text-transform: uppercase; letter-spacing: .2em; }
.h-room__art--vs .h-room__drift { padding: 5%; }
.h-room__art--vs img { height: 100%; width: auto; max-width: 100%; object-fit: contain; filter: drop-shadow(0 18px 30px rgba(0,0,0,.6)); animation: hFloat 6s ease-in-out infinite; }

/* ═══ SEZIONI NORMALI ═════════════════════════════════════════════════ */
.h-sec { padding: clamp(80px, 12vw, 150px) 0; position: relative; }
.h-sec__head { margin-bottom: clamp(30px, 4vw, 52px); }
.h-sec__sub { max-width: 620px; margin-top: 14px; color: var(--gray-light); line-height: 1.7; }
[data-rv] { opacity: 0; transform: translateY(26px); transition: opacity .8s ease, transform 1s var(--ease); }
[data-rv].is-in { opacity: 1; transform: none; }
.h-empty { color: var(--gray-mid); font-family: var(--mono); font-size: .85rem; letter-spacing: .06em; margin-bottom: 22px; }

/* prossimi match */
.h-matches { border-top: 1px solid var(--line); }
.h-matches__list { list-style: none; display: grid; gap: 10px; margin-bottom: 26px; }
.h-match a {
  display: grid;
  grid-template-columns: 96px 1fr auto 1fr 30px;
  align-items: center;
  gap: 18px;
  padding: 16px 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(90deg, rgba(255,255,255,.025), transparent);
  transition: border-color .25s, transform .35s var(--ease), background .25s;
}
.h-match a:hover { border-color: rgba(var(--brand-rgb), .4); transform: translateX(6px); background: linear-gradient(90deg, rgba(var(--brand-rgb), .07), transparent); }
.h-match__when { display: flex; flex-direction: column; font-family: var(--mono); font-weight: 700; }
.h-match__when b { font-size: 1.1rem; color: var(--white); letter-spacing: .04em; }
.h-match__when span { font-size: .74rem; color: var(--brand); letter-spacing: .12em; }
.h-match__side { display: flex; align-items: center; gap: 12px; min-width: 0; font-family: var(--font-title); font-weight: 700; font-size: clamp(1rem, 1.6vw, 1.25rem); text-transform: uppercase; color: var(--gray-light); }
.h-match__side span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.h-match__side img { width: 40px; height: 40px; object-fit: contain; flex: 0 0 auto; }
.h-match__side.is-ours { color: var(--white); }
.h-match__side.is-ours span { border-bottom: 2px solid var(--acc, var(--brand)); }
.h-match__side--b { justify-content: flex-end; text-align: right; }
.h-match__vs { display: flex; flex-direction: column; align-items: center; font-family: var(--font-title); font-weight: 700; color: var(--brand); text-transform: uppercase; letter-spacing: .2em; }
.h-match__vs small { font-family: var(--mono); font-size: .58rem; color: var(--gray-mid); letter-spacing: .14em; }
.h-match__go { color: var(--brand); font-size: 1.2rem; transition: transform .3s var(--ease); }
.h-match a:hover .h-match__go { transform: translateX(4px); }
.h-match { opacity: 0; transform: translateX(-26px); transition: opacity .6s calc(var(--k) * 80ms), transform .8s var(--ease) calc(var(--k) * 80ms); }
.h-matches.is-in .h-match { opacity: 1; transform: none; }

/* i Locoin: come si farmano, pannelli che si aprono */
.h-coins { background: radial-gradient(60% 50% at 80% 0%, rgba(var(--brand-rgb), .07), transparent 70%); }
.h-coins__star { font-size: .45em; vertical-align: super; color: var(--brand); margin-left: .08em; }
.h-coins__note { margin-top: 14px; font-size: .9rem; font-style: italic; color: var(--gray-mid); }
.h-coins__q { font-family: var(--font-title); font-weight: 700; font-size: clamp(1.5rem, 2.6vw, 2.1rem); text-transform: uppercase; color: var(--white); letter-spacing: .02em; }
.h-coins .h-sec__sub { margin-bottom: 30px; }
.h-panels { display: flex; gap: 10px; height: 320px; }
.h-panel {
  position: relative;
  flex: 1 1 0;
  min-width: 70px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 10px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(170deg, #141414, #0a0a0a);
  text-align: left;
  overflow: hidden;
  transition: flex-grow .7s var(--ease), border-color .3s, background .4s;
}
.h-panel::before {                                   /* bagliore che sale quando si apre */
  content: '';
  position: absolute;
  inset: auto -20% -60% -20%;
  height: 120%;
  background: radial-gradient(50% 50% at 50% 100%, rgba(var(--brand-rgb), .22), transparent 70%);
  opacity: 0;
  transition: opacity .6s;
}
.h-panel.is-open { flex-grow: 4.4; border-color: rgba(var(--brand-rgb), .45); }
.h-panel.is-open::before { opacity: 1; }
/* la grafica di ogni modo di farmare: piccola in alto da chiuso, grande e disegnata da aperto */
.h-panel__ico {
  position: absolute;
  top: 18px; right: 50%;
  width: 30px;
  color: var(--gray-mid);
  transform: translateX(50%);
  transition: width .7s var(--ease), top .7s var(--ease), right .7s var(--ease), transform .7s var(--ease), color .4s;
}
.h-panel__ico svg { display: block; width: 100%; height: auto; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
.h-panel__ico path { stroke-dasharray: 1; stroke-dashoffset: 0; }
.h-panel.is-open .h-panel__ico { top: 24px; right: 24px; width: 118px; transform: none; color: var(--brand); filter: drop-shadow(0 0 14px rgba(var(--brand-rgb), .45)); }
.h-panel.is-open .h-panel__ico path { animation: hDraw 1.3s var(--ease) both; stroke-width: 1.4; }
@keyframes hDraw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
.h-panel:hover:not(.is-open) .h-panel__ico { color: var(--brand); }
.h-panel__amt {
  position: relative;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: clamp(1.6rem, 3vw, 2.6rem);
  line-height: 1;
  color: var(--brand);
  white-space: nowrap;
  transition: transform .6s var(--ease), opacity .4s;
}
.h-panel__name {
  position: relative;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--white);
  white-space: nowrap;
}
.h-panel__txt {
  position: relative;
  max-width: 420px;
  font-size: .95rem;
  line-height: 1.6;
  color: var(--gray-light);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .4s, transform .6s var(--ease);
}
.h-panel.is-open .h-panel__txt { opacity: 1; transform: none; transition-delay: .25s; }
/* chiuso: nome e importo in verticale */
.h-panel:not(.is-open) .h-panel__name { writing-mode: vertical-rl; transform: rotate(180deg); align-self: flex-start; }
.h-panel:not(.is-open) .h-panel__amt { font-size: 1.1rem; writing-mode: vertical-rl; transform: rotate(180deg); align-self: flex-start; order: -1; margin: 44px 0 auto; }
.h-panel:not(.is-open) .h-panel__txt { position: absolute; pointer-events: none; }
.h-panel:hover:not(.is-open) { border-color: rgba(255,255,255,.18); }
.h-panel:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* E-Locuste: le carte dei team */
.h-teams { border-top: 1px solid var(--line); }
.h-teams__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: clamp(30px, 4vw, 48px); }
.h-tcards { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(12px, 1.6vw, 20px); }
.h-tcards__item {
  opacity: 0;
  transform: translateX(calc((var(--k) - 1.5) * 18px)) translateY(18px);
  transition: opacity .7s ease calc(var(--k) * 70ms), transform .9s var(--ease) calc(var(--k) * 70ms);
}
.h-teams.is-in .h-tcards__item { opacity: 1; transform: none; }
.h-tcard {
  --rx: 0deg; --ry: 0deg; --mx: 50%; --my: 30%;
  position: relative;
  display: grid;
  grid-template-rows: 1fr auto;
  aspect-ratio: 4 / 5;
  padding: 18px 18px 20px;
  border-radius: 18px;
  border: 1px solid color-mix(in srgb, var(--acc) 26%, transparent);
  background:
    radial-gradient(80% 60% at 50% 34%, color-mix(in srgb, var(--acc) 20%, transparent), transparent 72%),
    linear-gradient(170deg, #151515, #090909);
  overflow: hidden;
  isolation: isolate;
  transform: perspective(900px) rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform .5s var(--ease), border-color .3s, box-shadow .4s;
}
.h-tcard::before {                                   /* righe da "carta olografica", si vedono di più passando */
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: repeating-linear-gradient(115deg, transparent 0 10px, color-mix(in srgb, var(--acc) 7%, transparent) 10px 11px);
  opacity: .5;
  transition: opacity .4s;
}
.h-tcard__shine {                                    /* riflesso che segue il mouse */
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(40% 32% at var(--mx) var(--my), rgba(255,255,255,.16), transparent 70%);
  opacity: 0;
  transition: opacity .4s;
}
.h-tcard__logo { display: grid; place-items: center; padding: 8% 10% 4%; min-height: 0; }
.h-tcard__logo img { width: 100%; max-width: 210px; aspect-ratio: 1; object-fit: contain; filter: drop-shadow(0 16px 26px rgba(0,0,0,.65)); transition: filter .4s; }
.h-tcard__meta { display: flex; flex-direction: column; gap: 4px; }
.h-tcard__meta small { font-family: var(--pixel); font-size: .58rem; letter-spacing: .16em; text-transform: uppercase; color: var(--acc); }
.h-tcard__meta strong { font-family: var(--font-title); font-weight: 700; font-size: clamp(1.1rem, 1.5vw, 1.35rem); line-height: 1.05; text-transform: uppercase; color: var(--white); }
.h-tcard__go { position: absolute; right: 18px; bottom: 18px; color: var(--acc); font-size: 1.2rem; transform: translateX(-6px); opacity: 0; transition: transform .35s var(--ease), opacity .3s; }
.h-tcard:hover, .h-tcard:focus-visible {
  border-color: color-mix(in srgb, var(--acc) 70%, transparent);
  box-shadow: 0 30px 60px -30px color-mix(in srgb, var(--acc) 70%, transparent), inset 0 0 0 1px color-mix(in srgb, var(--acc) 25%, transparent);
}
.h-tcard:hover::before { opacity: 1; }
.h-tcard:hover .h-tcard__shine { opacity: 1; }
.h-tcard:hover .h-tcard__logo img { filter: drop-shadow(0 20px 30px rgba(0,0,0,.7)) drop-shadow(0 0 22px color-mix(in srgb, var(--acc) 55%, transparent)); }
.h-tcard:hover .h-tcard__go, .h-tcard:focus-visible .h-tcard__go { transform: none; opacity: 1; }
.h-tcard:focus-visible { outline: 2px solid var(--acc); outline-offset: 3px; }

/* lo spirito */
.h-spirit { padding: clamp(110px, 16vw, 210px) 0; text-align: center; position: relative; }
.h-spirit::before { content: ''; position: absolute; left: 50%; top: 0; width: 1px; height: 80px; background: linear-gradient(transparent, var(--brand)); }
.h-spirit__quote {
  margin: 26px auto 0;
  max-width: 1000px;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: clamp(2rem, 5.2vw, 4.4rem);
  line-height: 1.08;
  text-transform: uppercase;
  color: var(--white);
}
.h-spirit__quote .w { opacity: .13; transition: opacity .35s ease, color .35s; }
.h-spirit__quote .w.is-lit { opacity: 1; }
.h-spirit__quote .w.is-gold { color: var(--brand); }

/* come si entra */
.h-join { border-top: 1px solid var(--line); background: radial-gradient(50% 70% at 50% 100%, rgba(var(--brand-rgb), .08), transparent 70%); }
.h-steps { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; position: relative; margin-bottom: 44px; }
.h-steps::before {
  content: '';
  position: absolute;
  left: 0; right: 0; top: 19px;
  height: 1px;
  background: linear-gradient(90deg, var(--brand), rgba(var(--brand-rgb), .15));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1.6s var(--ease);
}
.h-join.is-in .h-steps::before { transform: scaleX(1); }
.h-steps li { position: relative; display: flex; flex-direction: column; gap: 8px; opacity: 0; transform: translateX(-22px); transition: opacity .6s calc(var(--k) * 180ms + 200ms), transform .8s var(--ease) calc(var(--k) * 180ms + 200ms); }
.h-join.is-in .h-steps li { opacity: 1; transform: none; }
.h-steps b {
  width: 40px; height: 40px;
  display: grid;
  place-items: center;
  margin-bottom: 10px;
  border: 1px solid var(--brand);
  border-radius: 50%;
  background: var(--bg);
  font-family: var(--mono);
  font-size: .76rem;
  color: var(--brand);
}
.h-steps strong { font-family: var(--font-title); font-weight: 700; font-size: 1.35rem; text-transform: uppercase; color: var(--white); line-height: 1.05; }
.h-steps span { color: var(--gray-light); font-size: .95rem; line-height: 1.6; }
.h-join__ctas { display: flex; flex-wrap: wrap; gap: 12px; }
.h-social { display: flex; gap: 22px; margin-top: 34px; }
.h-social a { font-family: var(--pixel); font-size: .66rem; letter-spacing: .16em; text-transform: uppercase; color: var(--gray-mid); transition: color .2s; }
.h-social a:hover { color: var(--brand); }

/* footer */
.h-foot { border-top: 1px solid var(--line); padding: 34px 0 calc(34px + env(safe-area-inset-bottom, 0px)); }
.h-foot__inner { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.h-foot__brand { display: flex; align-items: center; gap: 12px; font-family: var(--mono); font-size: .72rem; letter-spacing: .14em; color: var(--gray-mid); text-transform: uppercase; }
.h-foot__links { display: flex; gap: 18px; flex-wrap: wrap; }
.h-foot__links a { font-size: .86rem; color: var(--gray-mid); transition: color .2s; }
.h-foot__links a:hover { color: var(--white); }
.h-partner { display: inline-flex; align-items: center; gap: 10px; margin-left: auto; padding: 6px 14px 6px 6px; border: 1px solid var(--line); border-radius: 8px; transition: border-color .2s; }
.h-partner:hover { border-color: var(--green-dark); }
.h-partner img { opacity: .7; }
.h-partner span { display: flex; flex-direction: column; font-family: var(--font-title); font-weight: 700; color: var(--white); line-height: 1.2; }
.h-partner small { font-family: var(--font-body); font-weight: 400; font-size: .66rem; color: var(--gray-mid); }

/* ═══ RESPONSIVE ══════════════════════════════════════════════════════ */
@media (max-width: 1080px) {
  .h-nav__links { display: none; }
  .h-nav__burger { display: block; }
  .h-nav__lang { display: none; }
  .h-menu .h-nav__lang { display: flex; }
  .h-tcards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .h-room, .h-room:nth-child(even) { grid-template-columns: 1fr; gap: 26px; }
  .h-room .h-room__art, .h-room:nth-child(even) .h-room__art { order: -1; aspect-ratio: 16 / 11; }
  .h-room { --slide: 18vw; }
  .h-panels { height: 340px; }
  .h-panel { min-width: 50px; padding: 18px; }
  .h-tcards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .h-steps { grid-template-columns: 1fr 1fr; row-gap: 34px; }
  .h-steps::before { display: none; }
  .h-match a { grid-template-columns: 1fr auto 1fr; grid-template-areas: "when when when" "a vs b"; row-gap: 10px; padding: 14px 16px; }
  .h-match__when { grid-area: when; flex-direction: row; gap: 10px; align-items: baseline; }
  .h-match__go { display: none; }
  .h-match__side img { width: 30px; height: 30px; }
  .h-match__side span { white-space: normal; line-height: 1.05; font-size: .98rem; }
}
@media (max-width: 640px) {
  :root { --nav-h: 60px; }
  .h-nav { gap: 10px; }
  .h-nav__brand span { display: none; }
  .h-live-pill span { display: none; }
  .h-live-pill { padding: 8px; }
  .h-nav__login span { display: none; }
  .h-hero { padding-bottom: 36px; align-content: center; gap: 30px; }
  .h-hero__logo { --lw: min(84vw, 380px); }
  .h-hero__eyebrow { font-size: .56rem; letter-spacing: .12em; }
  .h-btn--lg { padding: 16px 26px; font-size: 1.05rem; }
  .h-hero__ctas { gap: 10px; }
  .h-now { position: relative; bottom: auto; left: auto; right: auto; justify-self: stretch; margin: 0 calc(-1 * var(--gut)); justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding: 0 var(--gut); }
  .h-now::-webkit-scrollbar { display: none; }
  .h-now__item { min-width: 165px; flex: 0 0 auto; }
  .h-hero__scroll { display: none; }
  .h-room__drift { transform: none; }
  .h-room__art--teams .h-room__drift { gap: 3% 5%; padding: 6%; }
  .h-panels { flex-direction: column; height: auto; }
  .h-panel { min-height: 62px; flex: 0 0 auto; padding: 16px 18px; justify-content: center; }
  .h-panel:not(.is-open) .h-panel__name, .h-panel:not(.is-open) .h-panel__amt { writing-mode: horizontal-tb; transform: none; order: 0; margin: 0; align-self: auto; }
  .h-panel:not(.is-open) { flex-direction: row; align-items: center; justify-content: space-between; }
  .h-panel:not(.is-open) .h-panel__amt { order: 2; font-size: 1.05rem; }
  .h-panel:not(.is-open) .h-panel__txt { display: none; }
  .h-panel:not(.is-open) .h-panel__ico { display: none; }
  .h-panel.is-open { padding-top: 22px; }
  .h-panel.is-open .h-panel__ico { width: 64px; top: 16px; right: 16px; }
  .h-panel.is-open .h-panel__txt { max-width: calc(100% - 70px); }
  .h-tcard { padding: 12px 12px 14px; border-radius: 14px; }
  .h-tcard__go { display: none; }
  .h-steps { grid-template-columns: 1fr; }
  .h-partner { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .h-hero__logo { opacity: 1; }
  .h-hero .h-hero__eyebrow, .h-hero .h-hero__ctas, .h-hero .h-now, .h-hero .h-hero__scroll { opacity: 1; transform: none; transition: none; }
  .h-rise > span { transform: none; transition: none; }
  .h-room, .h-room__text > *, .h-room__drift, .h-tcards__item { --e: 1; opacity: 1; transform: none; transition: none; }
  .h-room__art { clip-path: none; transition: none; }
  .h-room__art--bracket path { stroke-dashoffset: 0; transition: none; }
  .h-float, .h-coin, .h-radar__sweep, .h-room__art *, .h-panel__ico path { animation: none !important; }
  .h-tcard { transform: none; }
  [data-rv], .h-match, .h-steps li { opacity: 1; transform: none; transition: none; }
  .h-spirit__quote .w { opacity: 1; }
}
