/* ==========================================================================
   IDMA - Italian Dance Music Academy
   Foglio di stile unico. Identita' "neon nightlife": tema scuro dichiarato,
   nessuna variante chiara (e' il brand). Font ospitati in locale in
   assets/fonts/ (vedi assets/fonts/README.txt).
   ========================================================================== */

@font-face {
  font-family: "Montserrat";
  src: url("../fonts/montserrat-700.woff2") format("woff2");
  font-weight: 700; font-display: swap;
}
@font-face {
  font-family: "Montserrat";
  src: url("../fonts/montserrat-800.woff2") format("woff2");
  font-weight: 800; font-display: swap;
}
@font-face {
  font-family: "Montserrat";
  src: url("../fonts/montserrat-900.woff2") format("woff2");
  font-weight: 900; font-display: swap;
}
@font-face {
  font-family: "Barlow";
  src: url("../fonts/barlow-400.woff2") format("woff2");
  font-weight: 400; font-display: swap;
}
@font-face {
  font-family: "Barlow";
  src: url("../fonts/barlow-500.woff2") format("woff2");
  font-weight: 500; font-display: swap;
}
@font-face {
  font-family: "Barlow";
  src: url("../fonts/barlow-600.woff2") format("woff2");
  font-weight: 600; font-display: swap;
}

:root {
  --bg-dark:      #070214;
  --bg-card:      #0f0826;
  --bg-card-2:    #150c30;
  --bg-input:     #0b0620;
  --neon-fuchsia: #ff0055;
  --neon-purple:  #7900ff;
  --text-light:   #ffffff;
  --text-muted:   #8e8a9f;
  --hairline:     rgba(255,255,255,.08);
  --ok:           #2fd27a;
  --warn:         #ffb020;
  --err:          #ff5470;
  --font-display: "Montserrat", "Arial Black", sans-serif;
  --font-body:    "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
  --shadow-card:  0 20px 40px rgba(121,0,255,.18);
  --maxw:         1200px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }
body {
  background-color: var(--bg-dark);
  color: var(--text-light);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--neon-fuchsia); text-decoration: none; }
a:hover { color: #ff4d8a; }

:focus-visible { outline: 2px solid var(--neon-fuchsia); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto; }
}

/* --- Tipografia ------------------------------------------------------- */
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 800; line-height: 1.1; letter-spacing: -.01em; text-wrap: balance; }
h1 { font-size: clamp(30px, 5vw, 52px); font-weight: 900; text-transform: uppercase; }
h2 { font-size: clamp(24px, 3.4vw, 38px); font-weight: 900; text-transform: uppercase; }
h3 { font-size: 20px; text-transform: uppercase; }
p { margin: 0 0 16px; max-width: 68ch; }
.eyebrow {
  color: var(--neon-purple);
  text-transform: uppercase;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: .18em;
  font-size: 13px;
}
.bar { width: 60px; height: 4px; background: var(--neon-fuchsia); margin: 20px 0 0; }
.section-header { text-align: center; margin-bottom: 64px; }
.section-header .bar { margin: 22px auto 0; }

/* --- Layout --------------------------------------------------------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 8%; }
.section { padding: 110px 0; }
.section--alt { background-color: #05010f; }
main { min-height: 60vh; }

/* --- Navbar --------------------------------------------------------- */
.navbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 20px 8%;
  background-color: rgba(7,2,20,.95);
  position: sticky; top: 0; z-index: 1000;
  border-bottom: 1px solid rgba(255,0,85,.15);
  backdrop-filter: blur(10px);
}
.navbar .logo { font-family: var(--font-display); font-size: 24px; font-weight: 900; letter-spacing: .14em; color: #fff; }
.navbar .logo span { color: var(--neon-fuchsia); text-shadow: 0 0 10px rgba(255,0,85,.5); }
.nav-links { display: flex; align-items: center; gap: 32px; list-style: none; }
.nav-links a {
  color: var(--text-light); font-weight: 600; font-size: 13px;
  text-transform: uppercase; letter-spacing: .05em; transition: color .25s ease;
}
.nav-links a:hover, .nav-links a.is-active { color: var(--neon-fuchsia); }
.nav-toggle { display: none; background: none; border: 0; color: #fff; cursor: pointer; }

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: #0b0620; border-bottom: 1px solid var(--hairline);
  }
  .nav-links[hidden] { display: none; }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; padding: 16px 8%; border-top: 1px solid var(--hairline); }
}

/* --- Hero ---------------------------------------------------------- */
.hero {
  display: flex; align-items: center;
  padding: 96px 8% 104px;
  background: radial-gradient(circle at 80% 20%, rgba(121,0,255,.16) 0%, rgba(7,2,20,1) 70%);
  border-bottom: 1px solid rgba(255,255,255,.05);
}
.hero--sm { padding: 92px 8% 52px; }
.hero--sm h1 { font-size: clamp(28px, 4vw, 40px); }

/* --- Documento (Manifesto / Criteri): articoli --------------------- */
.doc { max-width: 780px; margin: 0 auto; }
.doc > p { font-size: 17px; }
.doc .lead { font-size: 19px; color: var(--text-light); }
.article-block { padding: 28px 0; border-top: 1px solid var(--hairline); }
.article-block:first-of-type { border-top: 0; }
.article-n {
  display: block; font-family: var(--font-display); font-weight: 700;
  color: var(--neon-fuchsia); font-size: 12px; letter-spacing: .12em;
  text-transform: uppercase; margin-bottom: 8px;
}
.article-block h3 { margin-bottom: 10px; }
.article-block p { color: var(--text-muted); margin: 0; }
.doc .coda { margin-top: 44px; color: var(--text-muted); font-style: italic; }
.doc .how { margin-top: 8px; }
.doc .how li { margin: 12px 0; color: var(--text-muted); }
.doc .how li strong { color: var(--text-light); }

/* --- Profilo giurato --------------------------------------------- */
.profilo-head { display: grid; grid-template-columns: 260px 1fr; gap: 40px; align-items: start; }
.profilo-foto { aspect-ratio: 3 / 4; background: #0b0620; border-bottom: 3px solid var(--neon-purple); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.profilo-foto img { width: 100%; height: 100%; object-fit: cover; }
.profilo-foto span { font-family: var(--font-display); font-weight: 900; font-size: 64px; color: rgba(255,255,255,.16); }
.profilo-blocco { margin-top: 40px; }
.profilo-blocco h2 { font-size: 20px; margin-bottom: 14px; }
.profilo-blocco p { color: var(--text-muted); white-space: pre-line; }
@media (max-width: 640px) {
  .profilo-head { grid-template-columns: 1fr; gap: 24px; }
  .profilo-foto { max-width: 240px; }
}
.hero .hero-content { max-width: 720px; }
.hero h1 { margin: 14px 0 20px; }
.hero .subtitle {
  color: var(--neon-fuchsia); text-transform: uppercase; font-weight: 700;
  letter-spacing: .28em; font-size: 13px; display: block;
}
.hero p { color: var(--text-muted); font-size: 18px; margin-bottom: 32px; }

/* --- Bottoni ------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 14px 32px;
  font-family: var(--font-display); font-weight: 700; font-size: 13px;
  text-transform: uppercase; letter-spacing: .06em;
  border: 0; border-radius: 0; cursor: pointer;
  background: linear-gradient(90deg, var(--neon-fuchsia), var(--neon-purple));
  color: #fff; transition: transform .25s ease, box-shadow .25s ease;
}
.btn:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 10px 30px rgba(255,0,53,.45); }
.btn--ghost {
  background: transparent; border: 2px solid var(--neon-fuchsia); color: #fff;
  box-shadow: 0 0 15px rgba(255,0,85,.25);
}
.btn--ghost:hover { background: var(--neon-fuchsia); box-shadow: 0 0 25px rgba(255,0,85,.6); }
.btn--sm { padding: 9px 18px; font-size: 12px; }
.btn--danger { background: transparent; border: 2px solid var(--err); color: var(--err); box-shadow: none; }
.btn--danger:hover { background: var(--err); color: #fff; box-shadow: 0 10px 30px rgba(255,84,112,.4); }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }

/* --- Zona pericolosa -------------------------------------------------- */
.danger-zone { border: 1px solid var(--err); border-left: 3px solid var(--err); background: var(--bg-card); padding: 22px 24px; margin: 12px 0 0; }
.danger-zone h3 { color: var(--err); margin: 0 0 10px; }

/* --- Modale scheda (popup profilo) ---------------------------------- */
.js-scheda { background: none; border: 0; padding: 0; margin: 0; cursor: pointer;
  color: var(--neon-fuchsia); font: inherit; text-align: left; text-decoration: underline;
  text-underline-offset: 2px; }
.js-scheda:hover { color: #fff; }
.modal { position: fixed; inset: 0; z-index: 2000; display: none;
  background: rgba(4,2,12,.72); padding: 5vh 16px; overflow-y: auto; }
.modal.is-open { display: block; }
.modal-box { max-width: 640px; margin: 0 auto; background: var(--bg-card);
  border: 1px solid var(--hairline); box-shadow: 0 24px 80px rgba(0,0,0,.6); }
.modal-bar { display: flex; justify-content: flex-end; padding: 8px; border-bottom: 1px solid var(--hairline); }
.modal-close { background: none; border: 0; color: var(--text-muted); cursor: pointer;
  font-size: 22px; line-height: 1; padding: 4px 10px; }
.modal-close:hover { color: var(--neon-fuchsia); }
.modal iframe { display: block; width: 100%; height: 62vh; border: 0; background: var(--bg-card); }

/* --- Card --------------------------------------------------------- */
.card {
  background-color: var(--bg-card);
  border: 1px solid rgba(255,255,255,.04);
  border-bottom: 3px solid var(--neon-purple);
  padding: 28px;
}
.card--pad-lg { padding: 40px; }
.grid { display: grid; gap: 32px; }
.grid--auto { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid--cards { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

/* --- Griglia giurati (dagli esempi) ------------------------------- */
.speaker-card {
  background-color: var(--bg-card); position: relative;
  border: 1px solid rgba(255,255,255,.03);
  border-bottom: 3px solid var(--neon-purple);
  transition: transform .4s cubic-bezier(.25,1,.5,1), border-color .4s ease, box-shadow .4s ease;
}
.speaker-card:hover { transform: translateY(-12px); border-bottom-color: var(--neon-fuchsia); box-shadow: var(--shadow-card); }
.speaker-img { position: relative; width: 100%; aspect-ratio: 3 / 4; overflow: hidden; background: #0b0620; display: flex; }
.speaker-img img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(20%); transition: transform .5s ease, filter .5s ease; }
.speaker-card:hover .speaker-img img { transform: scale(1.06); filter: grayscale(0%); }
.speaker-img--empty {
  align-items: center; justify-content: center;
  background: radial-gradient(circle at 30% 25%, rgba(121,0,255,.35), #0b0620 70%);
}
.speaker-img--empty span {
  font-family: var(--font-display); font-weight: 900; font-size: 52px;
  color: rgba(255,255,255,.16); letter-spacing: .04em;
}
a.speaker-card { color: inherit; display: block; }
a.speaker-card:hover { color: inherit; }
.speaker-info { padding: 26px 20px; text-align: center; }
.speaker-info h3 { font-size: 22px; margin-bottom: 6px; }
.speaker-info .role { color: var(--neon-fuchsia); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; padding-left: .12em; max-width: none; }
.speaker-social { display: flex; gap: 12px; justify-content: center; margin-top: 14px; }
.speaker-social a {
  width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); color: #fff;
  transition: background .25s ease, border-color .25s ease;
}
.speaker-social a:hover { background: var(--neon-fuchsia); border-color: var(--neon-fuchsia); }

/* --- Griglia di card (era usata da default.asp/giuria.asp ma mai definita) */
.speakers-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 28px; }

/* --- Presidente di categoria: intestazione con nome categoria + edizione,
   sopra la foto (ordine scheda: categoria, edizione, foto, nome, social) -- */
.pres-card-cat {
  font-family: var(--font-display); font-weight: 900; font-size: 22px;
  text-transform: uppercase; letter-spacing: -.01em; line-height: 1.05;
  margin: 0 0 4px;
}
.pres-card-ed {
  color: var(--text-muted); font-size: 12px; text-transform: uppercase;
  letter-spacing: .1em; padding-left: .1em; margin: 0; max-width: none;
}

/* --- Presidente di categoria: elenco pieghevole degli altri membri ------ */
.pres-summary {
  cursor: pointer; list-style: none; margin-top: 16px; text-align: center;
  color: var(--neon-fuchsia); font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .1em;
}
.pres-summary::-webkit-details-marker { display: none; }
.pres-summary:hover { color: #fff; }
.roster-list { list-style: none; margin: 14px 0 0; padding: 0; text-align: left; }
.roster-list li { border-top: 1px solid var(--hairline); }
.roster-list li:first-child { border-top: 0; }
.roster-list a { display: flex; align-items: center; gap: 12px; padding: 9px 2px; color: inherit; }
.roster-list a:hover { color: var(--neon-fuchsia); }
.roster-avatar {
  width: 36px; height: 36px; flex: none; border-radius: 50%; overflow: hidden;
  background: #0b0620; display: flex; align-items: center; justify-content: center;
}
.roster-avatar img { width: 100%; height: 100%; object-fit: cover; }
.roster-avatar span { font-family: var(--font-display); font-weight: 900; font-size: 13px; color: rgba(255,255,255,.35); }

/* --- Criteri (numerati: il numero e' informativo) ---------------- */
.criterio { background-color: var(--bg-card); padding: 36px 28px; border-left: 3px solid var(--neon-purple); transition: border-color .3s ease, transform .3s ease; }
.criterio:hover { border-left-color: var(--neon-fuchsia); transform: translateX(4px); }
.criterio .num { font-family: var(--font-display); font-size: 30px; font-weight: 900; color: rgba(255,255,255,.08); }
.criterio:hover .num { color: var(--neon-fuchsia); }
.criterio h3 { margin: 6px 0 12px; }
.criterio p { color: var(--text-muted); font-size: 14px; margin: 0; }

/* --- Form ------------------------------------------------------- */
.form { display: grid; gap: 18px; max-width: 480px; }
.form--wide { max-width: 720px; }
.field { display: grid; gap: 6px; }
.field label { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px;
  background: var(--bg-input); color: #fff;
  border: 1px solid var(--hairline); border-radius: 0;
  font-family: var(--font-body); font-size: 15px;
}
.field textarea { min-height: 130px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--neon-fuchsia); outline: none; }
.field .hint { font-size: 12px; color: var(--text-muted); text-transform: none; letter-spacing: 0; }

/* --- Alert ---------------------------------------------------- */
.alert { padding: 14px 18px; border-left: 3px solid var(--neon-purple); background: var(--bg-card); font-size: 14px; }
.alert--ok  { border-left-color: var(--ok);  }
.alert--err { border-left-color: var(--err); }
.alert--warn{ border-left-color: var(--warn);}

/* --- Tabella --------------------------------------------------- */
.table-scroll { overflow-x: auto; border: 1px solid var(--hairline); }
table.data { border-collapse: collapse; width: 100%; font-size: 14px; }
table.data th, table.data td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--hairline); }
table.data th {
  font-family: var(--font-display); font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted);
  background: var(--bg-card-2); white-space: nowrap;
}
table.data tr:last-child td { border-bottom: 0; }
.num-col { font-variant-numeric: tabular-nums; text-align: right; }

/* --- Pill / stato -------------------------------------------- */
.pill {
  display: inline-block; padding: 3px 10px; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em;
  border: 1px solid currentColor;
}
.pill--attesa   { color: var(--warn); }
.pill--aderito  { color: var(--ok); }
.pill--rifiutato{ color: var(--err); }

/* --- Area riservata: shell -------------------------------------- */
.area-shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.area-nav { background: #05010f; border-right: 1px solid var(--hairline); padding: 28px 0; }
.area-nav .brand { padding: 0 24px 24px; font-family: var(--font-display); font-weight: 900; letter-spacing: .14em; }
.area-nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 24px; color: var(--text-muted); font-weight: 500; font-size: 14px;
}
.area-nav a:hover, .area-nav a.is-active { color: #fff; background: rgba(255,0,85,.08); border-right: 2px solid var(--neon-fuchsia); }
.area-main { padding: 40px clamp(20px, 5vw, 56px); }
.area-main h1 { font-size: 30px; margin-bottom: 8px; }
.area-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 12px; margin-bottom: 32px; padding-bottom: 20px; border-bottom: 1px solid var(--hairline); }

@media (max-width: 780px) {
  .area-shell { grid-template-columns: 1fr; }
  .area-nav { display: flex; overflow-x: auto; padding: 12px; }
  .area-nav .brand { display: none; }
  .area-nav a { white-space: nowrap; padding: 10px 14px; }
}

/* --- Pagine di autenticazione ------------------------------ */
.auth { max-width: 420px; margin: 0 auto; }
.auth h1 { font-size: clamp(26px, 4vw, 34px); margin-bottom: 10px; }
.auth .sub { color: var(--text-muted); margin-bottom: 28px; }
.auth .form { max-width: none; }
.auth .altlink { margin-top: 22px; font-size: 14px; }
.auth .altlink a { color: var(--text-muted); }
.auth .altlink a:hover { color: var(--neon-fuchsia); }

/* --- Voto pubblico ----------------------------------------- */
.vote-cat { border: 1px solid var(--hairline); border-left: 3px solid var(--neon-purple); background: var(--bg-card); padding: 24px 26px; margin: 0 0 20px; }
.vote-cat > legend, .vote-cat > .legend {
  font-family: var(--font-display); font-weight: 800; font-size: 14px;
  text-transform: uppercase; letter-spacing: .08em; color: var(--neon-fuchsia);
  padding: 0; margin-bottom: 14px;
}
.vote-opt { display: flex; align-items: baseline; gap: 12px; padding: 9px 0; border-top: 1px solid var(--hairline); }
.vote-opt:first-of-type { border-top: 0; }
.vote-opt input { margin: 0; accent-color: var(--neon-fuchsia); }
.vote-opt .name { flex: 1; }
.vote-opt .sms-code {
  flex: none; min-width: 3ch; text-align: center;
  font-family: ui-monospace, "SFMono-Regular", "Consolas", monospace;
  font-size: 13px; font-weight: 700; letter-spacing: .04em;
  color: var(--neon-fuchsia);
  border: 1px solid var(--hairline); border-radius: 6px;
  padding: 2px 7px; white-space: nowrap;
}
.vote-sms { background: var(--bg-card); border: 1px solid var(--hairline); padding: 22px 26px; margin: 0 0 36px; }
.vote-sms .big { font-family: var(--font-display); font-weight: 900; font-size: 22px; letter-spacing: .04em; }

/* --- Banda CTA (fine home) ---------------------------------- */
.cta-band {
  padding: 72px 8%;
  text-align: center;
  background: linear-gradient(90deg, rgba(255,0,85,.12), rgba(121,0,255,.12));
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}
.cta-band p { max-width: 46ch; margin: 0 auto 22px; font-size: 20px; font-family: var(--font-display); font-weight: 700; }

/* --- Blocco "in breve" ------------------------------------- */
.lede { max-width: 62ch; margin: 0 auto; text-align: center; }
.lede p { margin: 0 auto 20px; color: var(--text-muted); font-size: 17px; }

/* --- Footer -------------------------------------------------- */
.footer { text-align: center; padding: 48px 20px; background-color: #04010a; color: var(--text-muted); font-size: 13px; border-top: 1px solid rgba(255,255,255,.04); }
.footer a { color: var(--text-muted); }
.footer a:hover { color: var(--neon-fuchsia); }

/* --- Utility ------------------------------------------------- */
.stack > * + * { margin-top: 16px; }
.center { text-align: center; }
.mt-0 { margin-top: 0; }
.muted { color: var(--text-muted); }
.sponsor-row { display: flex; flex-wrap: wrap; gap: 32px; align-items: center; justify-content: center; }
.sponsor-row img { max-height: 54px; width: auto; filter: grayscale(100%) brightness(1.6); opacity: .7; transition: opacity .25s ease, filter .25s ease; }
.sponsor-row a:hover img { filter: none; opacity: 1; }
