/* =====================================================================
   SOAVE — stile
   Layout: pagina scura "a notte", una sola sezione rumorosa (l'hero con
   i fasci di luce), il resto quieto su griglia a 12 colonne.
   Per cambiare i colori basta modificare le variabili qui sotto.
   ===================================================================== */
:root {
  /* Colori */
  --ink:      #04060D;   /* sfondo pagina */
  --night:    #0A1022;   /* superfici / sezioni alternate */
  --panel:    #0F1730;   /* card */
  --line:     rgba(130, 160, 255, 0.14);
  --brand:    #0052E4;   /* il blu del logo */
  --brand-hi: #3D7BFF;   /* blu acceso per hover, luci */
  --text:     #EDF1FF;
  --muted:    #8E99BD;

  /* Tipografia */
  --f-display: "Archivo", "Arial Black", "Helvetica Neue", Arial, sans-serif;
  --f-body:    "Hanken Grotesk", "Helvetica Neue", Arial, sans-serif;
  --f-mono:    "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  /* Misure */
  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 14px;
  --header-h: 68px;

  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--brand-hi); outline-offset: 3px; border-radius: 4px; }
section[id] { scroll-margin-top: calc(var(--header-h) + 12px); }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--brand); color: #fff; padding: 10px 14px; border-radius: 8px; }
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

/* ---------- Tipografia di base ---------- */
.kicker, .eyebrow {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand-hi);
  margin-bottom: 14px;
}
.h2 {
  font-family: var(--f-display);
  font-variation-settings: "wdth" 112;
  font-weight: 800;
  font-size: clamp(30px, 4.4vw, 52px);
  line-height: 1.02;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}
.section-note { color: var(--muted); max-width: 42ch; }
.section-note strong { color: var(--text); font-weight: 600; }

/* ---------- Bottoni ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px;
  border-radius: 999px;
  font-family: var(--f-display); font-variation-settings: "wdth" 110;
  font-weight: 700; font-size: 14px; letter-spacing: 0.06em; text-transform: uppercase;
  text-decoration: none; cursor: pointer; border: 1px solid transparent;
  transition: background .2s, border-color .2s, transform .2s, box-shadow .2s;
}
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 0 0 0 rgba(61,123,255,0); }
.btn-primary:hover { background: var(--brand-hi); box-shadow: 0 8px 30px -8px rgba(61,123,255,.7); transform: translateY(-1px); }
.btn-ghost { border-color: var(--line); color: var(--text); background: rgba(255,255,255,0.02); }
.btn-ghost:hover { border-color: var(--brand-hi); }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  background: rgba(4, 6, 13, 0.72);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-row { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark { width: 44px; height: 30px; color: var(--brand-hi); }
.brand-word {
  font-family: var(--f-display); font-variation-settings: "wdth" 125;
  font-weight: 900; font-size: 20px; letter-spacing: 0.08em;
}
.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav a {
  text-decoration: none; font-size: 14px; font-weight: 500; color: var(--muted);
  transition: color .2s;
}
.site-nav a:hover { color: var(--text); }
.site-nav .nav-ig { color: var(--text); border: 1px solid var(--line); padding: 8px 14px; border-radius: 999px; }
.site-nav .nav-ig:hover { border-color: var(--brand-hi); }

.menu-toggle { display: none; width: 44px; height: 44px; background: none; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; position: relative; }
.menu-toggle .bars, .menu-toggle .bars::before, .menu-toggle .bars::after {
  position: absolute; left: 12px; width: 18px; height: 2px; background: var(--text); border-radius: 2px; transition: transform .25s, opacity .2s;
}
.menu-toggle .bars { top: 21px; }
.menu-toggle .bars::before { content: ""; left: 0; top: -6px; }
.menu-toggle .bars::after { content: ""; left: 0; top: 6px; }
.menu-toggle[aria-expanded="true"] .bars { background: transparent; }
.menu-toggle[aria-expanded="true"] .bars::before { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .bars::after { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding-top: clamp(48px, 9vw, 110px); isolation: isolate; }
.hero-beams {
  position: absolute; inset: -40% -20% 0 -20%; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60% 45% at 72% 38%, rgba(0, 82, 228, 0.55), transparent 70%),
    radial-gradient(40% 30% at 15% 20%, rgba(61, 123, 255, 0.18), transparent 70%);
}
.hero-beams::before, .hero-beams::after {
  content: ""; position: absolute; left: 50%; top: 42%; width: 140vmax; height: 140vmax;
  translate: -50% -50%;
  background: conic-gradient(from 0deg,
    transparent 0 8deg, rgba(61,123,255,.16) 10deg, transparent 13deg,
    transparent 40deg, rgba(61,123,255,.10) 43deg, transparent 47deg,
    transparent 95deg, rgba(61,123,255,.14) 98deg, transparent 101deg,
    transparent 180deg, rgba(61,123,255,.12) 183deg, transparent 187deg,
    transparent 250deg, rgba(61,123,255,.10) 252deg, transparent 256deg,
    transparent 360deg);
  mask-image: radial-gradient(circle at center, #000 0 25%, transparent 60%);
  -webkit-mask-image: radial-gradient(circle at center, #000 0 25%, transparent 60%);
  animation: sweep 38s linear infinite;
}
.hero-beams::after { animation-duration: 57s; animation-direction: reverse; opacity: .7; }
@keyframes sweep { to { rotate: 360deg; } }

.hero-title { margin: 4px 0 clamp(28px, 4vw, 52px); line-height: .8; white-space: nowrap; }
.hero-word {
  display: inline-block;
  font-family: var(--f-display); font-variation-settings: "wdth" 125;
  font-weight: 900;
  font-size: clamp(56px, 15vw, 280px);   /* valore di partenza: main.js lo adatta alla larghezza */
  letter-spacing: -0.015em;
  padding-bottom: .04em;
  background: linear-gradient(180deg, #fff 35%, #9DB8FF 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 440px); gap: clamp(32px, 6vw, 96px); align-items: start; }
.hero-copy { min-width: 0; padding-top: 6px; }
.hero-lead { font-size: clamp(17px, 1.6vw, 20px); color: #C9D2EE; max-width: 46ch; margin-bottom: 32px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Biglietto "prossimo evento" */
.ticket {
  position: relative; min-width: 0;
  background: linear-gradient(160deg, rgba(20, 34, 80, .92), rgba(10, 16, 34, .95));
  border: 1px solid rgba(130,160,255,.25);
  border-radius: var(--radius);
  padding: 26px 26px 24px;
  box-shadow: 0 30px 80px -30px rgba(0, 82, 228, .6);
  display: grid; gap: 18px;
}
.ticket-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-family: var(--f-mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--brand-hi); }
.ticket-date { font-family: var(--f-display); font-variation-settings: "wdth" 125; font-weight: 900; font-size: clamp(36px, 4.4vw, 52px); line-height: 1; font-variant-numeric: tabular-nums; }
.ticket-day { display: block; font-family: var(--f-mono); font-weight: 400; font-size: 13px; letter-spacing: .12em; color: var(--muted); margin-top: 8px; text-transform: uppercase; }
.ticket-cut { position: relative; border-top: 1px dashed rgba(130,160,255,.3); margin: 0 -26px; }
.ticket-cut::before, .ticket-cut::after {  /* fori della perforazione */
  content: ""; position: absolute; top: -12px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--ink); border: 1px solid rgba(130,160,255,.25);
}
.ticket-cut::before { left: -12px; clip-path: inset(0 0 0 50%); }
.ticket-cut::after { right: -12px; clip-path: inset(0 50% 0 0); }
.ticket-title { font-family: var(--f-display); font-variation-settings: "wdth" 110; font-weight: 800; font-size: 22px; text-transform: uppercase; }
.ticket-meta { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-size: 15px; }
.ticket-meta dt { font-family: var(--f-mono); font-size: 12px; letter-spacing: .1em; color: var(--muted); text-transform: uppercase; padding-top: 3px; }
.ticket-meta dd { margin: 0; }
.ticket .btn { width: 100%; }
.ticket-empty { color: var(--muted); }

/* Nastro scorrevole */
.ticker { margin-top: clamp(56px, 8vw, 96px); border-block: 1px solid var(--line); overflow: hidden; background: rgba(4,6,13,.6); }
.ticker-track { display: flex; width: max-content; gap: 28px; padding: 16px 0; animation: ticker 40s linear infinite; }
.ticker span { font-family: var(--f-display); font-variation-settings: "wdth" 125; font-weight: 800; text-transform: uppercase; font-size: 15px; letter-spacing: .1em; white-space: nowrap; }
.ticker i { font-style: normal; color: var(--brand-hi); }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ---------- Sezioni ---------- */
.section { padding-block: clamp(72px, 10vw, 128px); }
.section-alt { background: var(--night); border-block: 1px solid var(--line); }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 20px 40px; margin-bottom: clamp(32px, 5vw, 56px); }

/* Mission */
.mission-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 40px 24px; }
.mission-grid > div:first-child { grid-column: 1 / span 7; }
.mission-body { grid-column: 8 / -1; display: grid; gap: 16px; color: #C9D2EE; align-self: end; }
.pillars { grid-column: 1 / -1; list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); margin-top: 16px; }
.pillars li { padding: 28px 28px 0 0; min-width: 0; }
.pillars li + li { padding-left: 28px; border-left: 1px solid var(--line); }
.pillars h3 { font-family: var(--f-display); font-variation-settings: "wdth" 120; font-weight: 800; text-transform: uppercase; font-size: 20px; margin-bottom: 10px; color: var(--brand-hi); }
.pillars p { color: var(--muted); font-size: 16px; }

/* Eventi */
.events { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.event { display: flex; flex-direction: column; min-width: 0; }
.event-cover {
  position: relative; aspect-ratio: 4 / 5; max-width: 100%; border-radius: var(--radius); overflow: hidden;
  background: var(--panel); border: 1px solid var(--line);
}
.event-cover img { width: 100%; height: 100%; object-fit: cover; }
.event-cover .gen { position: absolute; inset: 0; }
.event-cover .vol {
  position: absolute; left: 16px; bottom: 12px;
  font-family: var(--f-display); font-variation-settings: "wdth" 125; font-weight: 900;
  font-size: clamp(44px, 5vw, 64px); line-height: .9; color: #fff; mix-blend-mode: normal;
  text-shadow: 0 4px 30px rgba(0,0,0,.35);
}
.event-cover .vol small { display: block; font-family: var(--f-mono); font-weight: 400; font-size: 11px; letter-spacing: .16em; margin-bottom: 6px; opacity: .8; }
.event-cover .mini-s { position: absolute; top: 14px; right: 14px; width: 40px; height: 28px; color: rgba(255,255,255,.9); }
.event-body { padding: 16px 2px 0; display: grid; gap: 6px; }
.event-date { font-family: var(--f-mono); font-size: 12px; letter-spacing: .1em; color: var(--muted); font-variant-numeric: tabular-nums; }
.event-title { font-family: var(--f-display); font-variation-settings: "wdth" 110; font-weight: 800; font-size: 20px; text-transform: uppercase; line-height: 1.1; }
.event-place { color: #C9D2EE; font-size: 15px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; list-style: none; }
.chips li { font-size: 12px; padding: 3px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); }
.event-link { margin-top: 10px; font-size: 14px; font-weight: 600; color: var(--brand-hi); text-decoration: none; }
.event-link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Foto / gallerie */
.foto-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 40px 64px; align-items: start; }
.foto-grid .section-note { margin-top: 18px; }
.galleries { list-style: none; border-top: 1px solid var(--line); }
.gallery-row {
  display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 16px; align-items: center;
  padding: 18px 4px; border-bottom: 1px solid var(--line);
}
.gallery-num { font-family: var(--f-mono); color: var(--brand-hi); font-size: 14px; font-variant-numeric: tabular-nums; }
.gallery-name { font-family: var(--f-display); font-variation-settings: "wdth" 110; font-weight: 700; text-transform: uppercase; font-size: 17px; line-height: 1.2; }
.gallery-name span { display: block; font-family: var(--f-mono); font-weight: 400; font-size: 12px; letter-spacing: .08em; color: var(--muted); margin-top: 4px; text-transform: none; }
.gallery-btn { min-height: 40px; padding: 0 16px; font-size: 12px; }
.pill-soon { font-family: var(--f-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); border: 1px dashed var(--line); padding: 8px 12px; border-radius: 999px; white-space: nowrap; }

/* Merch */
.merch { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.merch-item { min-width: 0; }
.merch-visual {
  aspect-ratio: 1; max-width: 100%; border-radius: var(--radius); border: 1px solid var(--line); overflow: hidden;
  background: radial-gradient(80% 70% at 50% 35%, #16265A, var(--panel) 70%);
  display: grid; place-items: center; transition: border-color .25s;
}
.merch-item:hover .merch-visual { border-color: rgba(61,123,255,.5); }
.merch-visual img { width: 100%; height: 100%; object-fit: cover; }
.merch-visual svg { width: 72%; height: 72%; transition: transform .4s cubic-bezier(.2,.8,.2,1); }
.merch-item:hover .merch-visual svg { transform: translateY(-4px) scale(1.03); }
.merch-name { margin-top: 14px; font-family: var(--f-display); font-variation-settings: "wdth" 110; font-weight: 800; text-transform: uppercase; font-size: 17px; }
.merch-detail { color: var(--muted); font-size: 14px; }

/* Ruota */
.wheel-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px 72px; align-items: center; }
.wheel-copy > p { color: #C9D2EE; margin-top: 18px; max-width: 46ch; }
.rules { list-style: none; margin-top: 28px; display: grid; gap: 0; border-top: 1px solid var(--line); }
.rules li { padding: 14px 0 14px 28px; border-bottom: 1px solid var(--line); position: relative; font-size: 15px; color: var(--muted); }
.rules li::before { content: "✦"; position: absolute; left: 2px; color: var(--brand-hi); }
.rules strong { color: var(--text); font-weight: 600; }
.wheel-box { display: grid; justify-items: center; gap: 24px; min-width: 0; }
.wheel-stage { position: relative; width: min(100%, 440px); aspect-ratio: 1; }
.wheel-stage canvas { width: 100%; height: 100%; display: block; border-radius: 50%; box-shadow: 0 0 0 10px var(--night), 0 0 0 11px var(--line), 0 30px 90px -20px rgba(0,82,228,.55); }
.wheel-pointer {
  position: absolute; top: -18px; left: 50%; translate: -50% 0; width: 30px; height: 38px;
  background: var(--text); clip-path: polygon(0 0, 100% 0, 50% 100%);
  filter: drop-shadow(0 4px 8px rgba(0,0,0,.5));
}
.wheel-hub {
  position: absolute; inset: 50% auto auto 50%; translate: -50% -50%;
  width: 22%; aspect-ratio: 1; border-radius: 50%; background: var(--ink); border: 1px solid rgba(130,160,255,.35);
  display: grid; place-items: center;
}
.wheel-hub svg { width: 64%; height: 64%; color: var(--brand-hi); }
.btn-spin { min-width: 220px; }
.wheel-result {
  width: min(100%, 440px); text-align: center; padding: 18px 20px; border-radius: var(--radius);
  border: 1px solid rgba(130,160,255,.3); background: var(--panel);
}
.wheel-result .res-label { font-family: var(--f-display); font-variation-settings: "wdth" 120; font-weight: 900; font-size: 26px; text-transform: uppercase; }
.wheel-result .res-code { display: inline-block; margin: 10px 0 6px; font-family: var(--f-mono); font-size: 18px; letter-spacing: .12em; padding: 6px 14px; border-radius: 8px; background: var(--brand); color: #fff; }
.wheel-result p { color: var(--muted); font-size: 14px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding-block: 64px 28px; background: var(--ink); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr); gap: 40px; }
.footer-mark { width: 120px; height: 82px; color: var(--brand); margin-bottom: 18px; }
.footer-brand p { color: var(--muted); }
.footer-links { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.footer-links a { text-decoration: none; color: var(--text); }
.footer-links a:hover { color: var(--brand-hi); }
.footer-mail { color: var(--muted); user-select: all; }
.footer-bottom { position: relative; display: flex; justify-content: space-between; gap: 16px; margin-top: 56px; padding-top: 20px; font-family: var(--f-mono); font-size: 12px; color: var(--muted); letter-spacing: .06em; }
.footer-bottom::before { content: ""; position: absolute; top: 0; left: var(--gutter); right: var(--gutter); border-top: 1px solid var(--line); }
.footer-bottom a { text-decoration: none; }
.footer-bottom a:hover { color: var(--text); }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .events, .merch { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .ticket { max-width: 480px; }
  .foto-grid, .wheel-grid { grid-template-columns: minmax(0, 1fr); }
  .mission-grid > div:first-child, .mission-body { grid-column: 1 / -1; }
}
@media (max-width: 820px) {
  .menu-toggle { display: block; }
  .site-nav {
    position: absolute; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: rgba(4, 6, 13, 0.97); border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter) 20px;
    display: none;
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 14px 0; font-size: 17px; border-bottom: 1px solid var(--line); color: var(--text); }
  .site-nav .nav-ig { border: 0; border-radius: 0; padding: 14px 0; color: var(--brand-hi); }
  .pillars { grid-template-columns: minmax(0, 1fr); }
  .pillars li, .pillars li + li { padding: 22px 0; border-left: 0; border-bottom: 1px solid var(--line); }
  .footer-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  body { font-size: 16px; }
  .events { grid-template-columns: minmax(0, 1fr); }
  .event-cover { aspect-ratio: 16 / 11; }
  .merch { gap: 14px; }
  .hero-actions .btn { flex: 1 1 100%; }
  .gallery-row { grid-template-columns: 36px minmax(0, 1fr); }
  .gallery-row > :last-child { grid-column: 2; justify-self: start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-beams::before, .hero-beams::after, .ticker-track { animation: none; }
}

/* Avviso se i contenuti non si caricano */
.load-error { position: relative; z-index: 60; background: #3A1020; color: #FFD9E2; border-bottom: 1px solid rgba(255,120,150,.4); padding: 12px var(--gutter); font-size: 14px; text-align: center; }
