/* ─────────────────────────────────────────────
   LND · Gara Amichevole — Brand Guidelines v1.0
   Colori: Reflex Blue #001489 · sfumature #000d55 / #0018a9 / #0020d4
   Accento: giallo #f8eb00 (con moderazione) · tricolore #00a80f / #ff0000
   Font: Redzone Classic (titoli) · Inter Tight (testi)
   ───────────────────────────────────────────── */

@font-face {
  font-family: 'VTF Redzone Classic';
  src: url('/static/fonts/VTFRedzone-Classic.woff2') format('woff2'),
       url('/static/fonts/VTFRedzone-Classic.woff') format('woff');
  font-weight: normal; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'VTF Redzone Classic Oblique';
  src: url('/static/fonts/VTFRedzone-ClassicOblique.woff2') format('woff2'),
       url('/static/fonts/VTFRedzone-ClassicOblique.woff') format('woff');
  font-weight: normal; font-style: italic; font-display: swap;
}
@font-face {
  font-family: 'Inter Tight';
  src: url('/static/fonts/InterTight-VariableFont_wght.ttf') format('truetype-variations');
  font-weight: 100 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Inter Tight';
  src: url('/static/fonts/InterTight-Italic-VariableFont_wght.ttf') format('truetype-variations');
  font-weight: 100 900; font-style: italic; font-display: swap;
}

:root {
  --blu: #001489;
  --blu-scuro: #000d55;
  --blu-medio: #0018a9;
  --blu-chiaro: #0020d4;
  --giallo: #f8eb00;
  --verde: #00a80f;
  --rosso: #ff0000;
  --grigio-scuro: #424242;
  --grigio-chiaro: #cbcbcb;
  --display: 'VTF Redzone Classic', 'Arial Black', sans-serif;
  --testo: 'Inter Tight', 'Segoe UI', Arial, sans-serif;
}

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

body {
  font-family: var(--testo);
  font-weight: 400;
  color: var(--grigio-scuro);
  background: linear-gradient(135deg, var(--blu-scuro) 0%, var(--blu-medio) 55%, var(--blu-chiaro) 100%) fixed;
  min-height: 100vh;
}

.hidden { display: none !important; }

/* ── Hero ── */
.hero { padding: 56px 20px 40px; color: #fff; }
.hero-inner {
  max-width: 860px; margin: 0 auto;
  display: flex; align-items: center; gap: 36px;
}
.scudetto { width: 148px; height: auto; flex-shrink: 0; filter: drop-shadow(0 10px 30px rgba(0,0,0,.35)); }
.eyebrow {
  font-size: 13px; font-weight: 500;
  letter-spacing: .35em; text-transform: uppercase;
  color: rgba(255,255,255,.85); margin-bottom: 10px;
  border-left: 3px solid var(--giallo); padding-left: 12px;
}
.hero h1 {
  font-family: var(--display);
  font-size: clamp(46px, 8vw, 84px);
  line-height: .92; letter-spacing: .01em;
  color: var(--giallo); text-transform: uppercase;
}
.hero .sub { margin-top: 16px; max-width: 52ch; font-weight: 300; line-height: 1.5; color: rgba(255,255,255,.92); }

/* ── Card ── */
main { max-width: 860px; margin: 0 auto; padding: 0 20px 70px; }
.card {
  position: relative; background: #fff;
  border-radius: 14px; overflow: hidden;
  box-shadow: 0 30px 60px rgba(0, 13, 85, .45);
  padding: 44px clamp(22px, 5vw, 56px) 52px;
}
.tricolore { position: absolute; top: 0; left: 0; right: 0; height: 6px; display: flex; }
.tricolore span { flex: 1; background: transparent; }
.tricolore .verde { background: var(--verde); }
.tricolore .rosso { background: var(--rosso); }

section + section { margin-top: 44px; border-top: 1px solid #e8e8ee; padding-top: 36px; }

h2 {
  font-family: var(--display);
  font-size: 30px; text-transform: uppercase;
  color: var(--blu); letter-spacing: .015em;
  margin-bottom: 22px;
}

/* ── Campi ── */
.field { margin-bottom: 20px; }
label, legend {
  display: block; font-size: 14px; font-weight: 600;
  color: var(--grigio-scuro); margin-bottom: 7px;
}
label b, legend b { color: var(--rosso); font-weight: 700; }

input[type="text"], input[type="email"], input[type="tel"],
input[type="date"], input[type="time"] {
  width: 100%; padding: 12px 14px;
  font: 400 15px var(--testo); color: var(--grigio-scuro);
  border: 1.5px solid var(--grigio-chiaro); border-radius: 8px;
  background: #fafafc; transition: border-color .15s, box-shadow .15s;
}
input:focus-visible {
  outline: none; border-color: var(--blu-chiaro);
  box-shadow: 0 0 0 3px rgba(0, 32, 212, .18);
}
input[type="file"] { font: 400 14px var(--testo); padding: 10px 0; width: 100%; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 16px; }

fieldset { border: 0; }

/* Radio a "pill" */
.pills { display: flex; flex-wrap: wrap; gap: 9px; }
.pills label { margin: 0; cursor: pointer; }
.pills input { position: absolute; opacity: 0; pointer-events: none; }
.pills span {
  display: inline-block; padding: 9px 16px;
  font-size: 14px; font-weight: 500; color: var(--blu);
  border: 1.5px solid var(--grigio-chiaro); border-radius: 999px;
  background: #fff; transition: all .12s ease;
}
.pills.small span { padding: 7px 13px; font-size: 13px; }
.pills label:hover span { border-color: var(--blu-medio); }
.pills input:checked + span {
  background: var(--blu); border-color: var(--blu); color: #fff;
}
.pills input:focus-visible + span { box-shadow: 0 0 0 3px rgba(0, 32, 212, .3); }
.pills label.option-disabled { cursor: not-allowed; }
.pills label.option-disabled span { opacity: .48; border-style: dashed; background: #f3f4f6; color: #6b7280; }
.pills label.option-disabled:hover span { border-color: var(--grigio-chiaro); }

/* Blocco "Direzione di gara" */
.highlight {
  background: #f2f4ff; border: 1.5px solid #d6dcff;
  border-left: 5px solid var(--giallo);
  border-radius: 10px; padding: 18px 18px 14px;
}
.subchoice { margin-top: 16px; padding-top: 14px; border-top: 1px dashed #b9c2f5; }
.sublegend { font-size: 13.5px; }

/* Termini + messaggi */
.terms .check { display: flex; gap: 12px; align-items: flex-start; font-weight: 400; cursor: pointer; }
.terms input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--blu); flex-shrink: 0; }
.terms span { font-size: 13.5px; line-height: 1.55; color: #555; }

.msg {
  background: #fff2f2; border: 1.5px solid var(--rosso);
  color: #b00000; border-radius: 8px;
  padding: 12px 16px; font-size: 14px; margin-bottom: 18px;
}

button {
  font-family: var(--display); font-size: 22px;
  text-transform: uppercase; letter-spacing: .04em;
  color: #fff; background: var(--blu);
  border: 0; border-radius: 10px; cursor: pointer;
  padding: 15px 40px; width: 100%;
  transition: background .15s, transform .1s;
}
button:hover { background: var(--blu-chiaro); }
button:active { transform: scale(.99); }
button:disabled { background: var(--grigio-chiaro); cursor: wait; }
button:focus-visible { outline: 3px solid var(--giallo); outline-offset: 2px; }

/* Conferma invio */
.success { text-align: center; padding-top: 60px; padding-bottom: 60px; }
.success h2 { font-size: 42px; }
.success p { margin: 14px auto 30px; max-width: 48ch; line-height: 1.6; }
.success strong { color: var(--blu); }
.success button { width: auto; }

footer { text-align: center; padding: 0 20px 46px; color: rgba(255,255,255,.75); font-size: 13px; font-weight: 300; }

@media (max-width: 640px) {
  .hero { padding-top: 40px; }
  .hero-inner { flex-direction: column; text-align: left; align-items: flex-start; gap: 20px; }
  .scudetto { width: 104px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* ── Autocomplete Società ── */
.combo { position: relative; }
.combo .hint { font-size: 12px; color: #888; margin-top: 6px; }
.combo-list {
  position: absolute; z-index: 20; left: 0; right: 0;
  margin-top: 4px; max-height: 320px; overflow-y: auto;
  list-style: none; background: #fff;
  border: 1.5px solid var(--blu-chiaro); border-radius: 10px;
  box-shadow: 0 18px 40px rgba(0, 13, 85, .28);
}
.combo-list li { padding: 10px 14px; cursor: pointer; border-bottom: 1px solid #f0f0f5; }
.combo-list li:last-child { border-bottom: 0; }
.combo-list li strong { display: block; font-size: 14px; font-weight: 600; color: var(--blu); }
.combo-list li small { display: block; font-size: 12px; color: #777; margin-top: 2px; }
.combo-list li:hover, .combo-list li.active { background: #eef1ff; }

.check.inline { display: flex; gap: 9px; align-items: center; margin-top: 10px; cursor: pointer; }
.check.inline input { width: 16px; height: 16px; accent-color: var(--blu); }
.check.inline span { font-size: 13px; font-weight: 500; color: var(--blu); }

.footer-admin { margin-top: 10px; }
.footer-admin a {
  color: rgba(255,255,255,.6); font-size: 12px; text-decoration: none;
  border: 1px solid rgba(255,255,255,.3); border-radius: 999px; padding: 6px 16px;
  transition: all .15s;
}
.footer-admin a:hover { color: #fff; border-color: rgba(255,255,255,.7); background: rgba(255,255,255,.08); }


/* Avviso dinamico sulle tempistiche della gara */
.timing-alert {
  margin: 12px 0 20px;
  padding: 14px 16px;
  border: 1px solid rgba(10, 70, 130, .22);
  border-left-width: 5px;
  border-radius: 12px;
  background: #f5f9ff;
  line-height: 1.45;
  font-size: .96rem;
}
.timing-alert.hidden { display: none; }
.timing-alert.info { border-left-color: #1f67ad; background: #f5f9ff; }
.timing-alert.ok { border-left-color: #16834a; background: #f2fbf6; }
.timing-alert.no-limit { border-left-color: #16834a; background: #f2fbf6; }
.timing-alert.warning { border-left-color: #b42318; background: #fff4f2; }
.timing-alert strong { font-weight: 800; }
