/* Lega Commander Precon — Brand Guide V2.0
   Indaco #292D5A · Zafferano #F2C14E · Bianco #FFFFFF
   Sora (testi) · IBM Plex Mono (dati) */

:root { --i: #292D5A; --z: #F2C14E; --w: #FFFFFF; --pad: clamp(16px, 4vw, 56px); --mono: 'IBM Plex Mono', ui-monospace, monospace; }
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--w); color: var(--i); font-family: Sora, Helvetica, Arial, sans-serif; -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; }
a { color: var(--i); }
a:hover { color: var(--i); }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { list-style: none; padding: 0; }
:focus-visible { outline: 3px solid var(--i); outline-offset: 3px; }
.dark :focus-visible { outline-color: var(--z); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -60px; z-index: 100; background: var(--i); color: var(--z); padding: 12px 16px; font-weight: 600; }
.skip:focus { top: 8px; color: var(--z); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

.wrap { max-width: 1200px; margin: 0 auto; }
.section { padding: clamp(64px, 9vw, 128px) var(--pad); }
.bt { border-top: 1px solid var(--i); }
.dark { background: var(--i); color: var(--w); }
.stack { display: flex; flex-direction: column; }

/* Elementi grafici */
.diamond { width: 12px; height: 12px; background: var(--i); transform: rotate(45deg); margin-left: 2px; flex: none; }
.dark .diamond { background: var(--z); }
.rule-mark { display: flex; align-items: center; gap: 14px; }
.rule-mark .line { width: 56px; height: 2px; background: var(--z); }
.badge { display: block; height: 64px; width: auto; max-width: 100%; align-self: flex-start; }
.badge svg, .badge img { height: 100%; width: auto; }
@media (min-width: 768px) { .badge { height: 80px; } }
@media (min-width: 1024px) { .badge { height: 96px; } }

.h2 { font-size: clamp(34px, 4.6vw, 56px); line-height: 1.05; font-weight: 800; letter-spacing: -.01em; text-wrap: balance; }
.dark .h2 { color: var(--z); }
.body { font-size: 17px; line-height: 1.6; text-wrap: pretty; }
.note { font-size: 15px; line-height: 1.6; max-width: 72ch; text-wrap: pretty; }
.note.ruled { padding-top: 20px; border-top: 1px solid var(--i); }
.boxed { padding: 20px 24px; border: 1px solid var(--i); font-size: 16px; line-height: 1.6; text-wrap: pretty; }
.mono-label { font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; }

.intro { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(24px, 4vw, 64px); align-items: center; }
.intro-head { display: flex; flex-direction: column; gap: 20px; }
.intro-text { display: flex; flex-direction: column; gap: 12px; }
@media (min-width: 1024px) { .intro { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); } }

/* Pulsanti */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 52px; padding: 0 26px; border: 2px solid var(--i); font-size: 14px; font-weight: 600; letter-spacing: .1em; text-decoration: none; text-transform: uppercase; text-align: center; transition: background .15s, color .15s, border-color .15s; }
.btn-primary { background: var(--i); color: var(--z); }
.btn-primary:hover { background: var(--z); color: var(--i); }
.btn-outline { background: var(--w); color: var(--i); }
.btn-outline:hover { background: var(--i); color: var(--z); }
.dark .btn-z { background: var(--z); color: var(--i); border-color: var(--z); }
.dark .btn-z:hover { background: var(--i); color: var(--z); }
.btn .arrow { font-family: var(--mono); }

/* Navbar */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--w); border-bottom: 1px solid var(--i); }
.nav { max-width: 1312px; margin: 0 auto; padding: 12px var(--pad); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.nav-logo { display: block; width: 240px; flex: none; aspect-ratio: 960 / 215; line-height: 0; }
.nav-logo svg, .nav-logo img { width: 100%; height: 100%; }
.nav-links { display: none; gap: 28px; align-items: center; }
.nav-links a { font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; text-decoration: none; padding: 8px 0; border-bottom: 2px solid transparent; transition: border-color .15s; }
.nav-links a:hover { border-bottom-color: var(--z); }
.menu-btn { flex: none; width: 48px; height: 48px; border: 1px solid var(--i); background: var(--w); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; cursor: pointer; padding: 0; }
.menu-btn span { display: block; width: 22px; height: 2px; background: var(--i); transition: transform .2s, opacity .2s; }
.menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
.mobile-menu { position: absolute; left: 0; right: 0; top: 100%; max-height: calc(100vh - 72px); overflow-y: auto; background: var(--i); border-top: 3px solid var(--z); }
.mobile-menu[hidden] { display: none; }
.mobile-menu ul { padding: 8px var(--pad) 24px; display: flex; flex-direction: column; }
.mobile-menu li + li { border-top: 1px solid var(--z); }
.mobile-menu a { display: flex; align-items: center; min-height: 56px; color: var(--z); font-size: 17px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; text-decoration: none; }
.mobile-menu a:focus-visible { outline-color: var(--z); }
@media (min-width: 420px) { .nav-logo { width: 280px; } }
@media (min-width: 1200px) { .nav-links { display: flex; } .menu-btn, .mobile-menu { display: none !important; } }

/* Hero */
.hero { padding: clamp(24px, 3.5vw, 48px) var(--pad) clamp(32px, 4vw, 56px); }
.hero-inner { display: flex; flex-direction: column; align-items: center; gap: clamp(24px, 4vw, 64px); text-align: center; }
.hero-logo { width: 100%; max-width: 240px; margin: 0 auto; }
.hero-logo .logo-box { display: block; width: 100%; aspect-ratio: 660 / 564; line-height: 0; }
.hero-logo svg, .hero-logo img { width: 100%; height: 100%; }
.hero-text { width: 100%; display: flex; flex-direction: column; gap: 18px; align-items: center; }
.hero-claim { width: 100%; max-width: 698px; font-size: clamp(34px, 5.2vw, 64px); line-height: 1.08; font-weight: 800; letter-spacing: -.015em; text-wrap: balance; text-align: center; }
.hero-mark .d { width: 10px; height: 10px; background: var(--z); outline: 1px solid var(--i); transform: rotate(45deg); flex: none; }
.hero-sub { font-size: clamp(18px, 1.7vw, 21px); line-height: 1.5; max-width: 34ch; text-wrap: pretty; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
@media (min-width: 768px) { .hero-logo { max-width: 340px; } }
@media (min-width: 1024px) {
  .hero-inner { max-width: 1200px; margin: 0 auto; flex-direction: row-reverse; justify-content: space-between; text-align: left; }
  .hero-logo { flex: 0 1 516px; max-width: 516px; margin: 0; }
  .hero-text { flex: 1 1 440px; min-width: 0; width: auto; align-items: flex-start; }
  .hero-ctas { justify-content: flex-start; }
}

/* Cos'è */
.about { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(32px, 5vw, 80px); align-items: start; }
.about-lead { font-size: clamp(19px, 1.8vw, 23px); line-height: 1.5; font-weight: 600; text-wrap: pretty; }
.about-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: clamp(24px, 3vw, 40px); }
.about-cols p { border-top: 2px solid var(--i); padding-top: 20px; font-size: 17px; line-height: 1.65; text-wrap: pretty; }
@media (min-width: 1024px) { .about { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); } }

/* Come funziona */
.how { position: relative; overflow: hidden; }
.how-watermark { position: absolute; right: -6%; top: -40px; width: min(640px, 70vw); aspect-ratio: 150 / 101; opacity: .12; pointer-events: none; }
.how-watermark img { width: 100%; height: 100%; }
.how .wrap { position: relative; }
.how-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.card { border: 1px solid var(--z); padding: 28px 24px; display: flex; flex-direction: column; gap: 14px; }
.card-num { font-family: var(--mono); font-weight: 500; font-size: 40px; line-height: 1; color: var(--z); }
.card-icon { display: flex; gap: 8px; margin: 13px 0 13px 3px; }
.card-icon .f, .card-icon .o { width: 14px; height: 14px; transform: rotate(45deg); }
.card-icon .f { background: var(--z); }
.card-icon .o { border: 2px solid var(--z); }
.card h3 { color: var(--z); font-size: 19px; line-height: 1.3; font-weight: 600; }
.card p { font-size: 16px; line-height: 1.6; }
.card-points { background: var(--z); color: var(--i); padding: 28px 24px; display: flex; flex-direction: column; gap: 20px; }
.card-points h3 { font-size: 19px; line-height: 1.3; font-weight: 600; }
.points-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: 24px; }
.points-table { display: flex; flex-direction: column; gap: 10px; }
.points-table .mono-label { font-size: 12px; }
.points-table dl { font-family: var(--mono); font-size: 17px; display: grid; grid-template-columns: auto 1fr; border-top: 1px solid var(--i); }
.points-table dt, .points-table dd { padding: 9px 0; border-bottom: 1px solid var(--i); }
.points-table dt { font-weight: 500; }
.points-table dd { text-align: right; }
@media (min-width: 640px) { .how-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .card-points { grid-column: span 2; } }
@media (min-width: 1024px) { .how-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* Stati giornata */
.chip { display: inline-flex; align-items: center; align-self: flex-start; padding: 6px 10px; border: 1px solid var(--i); background: var(--w); color: var(--i); font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; white-space: nowrap; }
.is-completata .chip { background: var(--i); color: var(--z); }
.is-prossima .chip { background: var(--z); color: var(--i); border-color: var(--z); }

/* Calendario — mobile: timeline */
.cal-list { display: flex; flex-direction: column; }
.cal-list li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; }
.cal-list .rail { position: relative; display: flex; justify-content: center; }
.cal-list .rail::before { content: ""; position: absolute; top: 0; bottom: 0; left: 13px; width: 2px; background: var(--i); }
.cal-list .node { position: relative; margin-top: 28px; width: 12px; height: 12px; transform: rotate(45deg); background: var(--w); border: 2px solid var(--i); }
.cal-list .is-completata .node { background: var(--i); }
.cal-list .is-prossima .node { background: var(--z); }
.cal-list .item { margin: 6px 0; padding: 14px 16px; border: 1px solid var(--i); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; }
.cal-list .is-prossima .item { background: var(--i); color: var(--w); }
.cal-g { font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.is-prossima .cal-g { color: var(--z); }
.cal-list .when { font-size: 16px; font-weight: 600; }
.cal-list .when .d { font-family: var(--mono); font-weight: 500; }
.cal-grid { display: none; }
/* Calendario — tablet/desktop: griglia */
@media (min-width: 640px) {
  .cal-list { display: none; }
  .cal-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .cal-grid li { border: 1px solid var(--i); padding: 20px; display: flex; flex-direction: column; gap: 16px; min-height: 200px; }
  .cal-grid li.is-prossima { background: var(--i); color: var(--w); }
  .cal-grid .date { display: flex; flex-direction: column; gap: 4px; }
  .cal-grid .day { font-size: 15px; }
  .cal-grid .num { font-family: var(--mono); font-weight: 500; font-size: 40px; line-height: 1.05; }
  .cal-grid .is-prossima .num { color: var(--z); }
  .cal-grid .month { font-family: var(--mono); font-size: 14px; letter-spacing: .04em; }
  .cal-grid .chip { margin-top: auto; }
}
@media (min-width: 1024px) { .cal-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }

/* Stato pre-stagione */
.empty { border: 1px solid var(--i); padding: clamp(28px, 5vw, 56px) clamp(20px, 4vw, 48px); display: flex; flex-direction: column; gap: 16px; }
.empty-title { font-size: clamp(22px, 2.4vw, 30px); line-height: 1.2; font-weight: 800; text-wrap: balance; }
.empty-text { font-size: 17px; line-height: 1.6; max-width: 56ch; text-wrap: pretty; }
.empty-next { margin-top: 8px; padding-top: 16px; border-top: 1px solid var(--i); display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: baseline; }
.empty-next .v { font-family: var(--mono); font-size: 15px; font-weight: 500; }
.dark .empty { border-color: var(--z); }
.dark .empty-title { color: var(--z); }
.dark .empty-next { border-top-color: var(--z); }
.dark .empty-next .mono-label { color: var(--z); }

/* Classifica */
.standings-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.standings-meta .upd { font-family: var(--mono); font-size: 13px; font-weight: 500; letter-spacing: .08em; }
.legend { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.legend::before { content: ""; width: 14px; height: 14px; background: var(--i); flex: none; }
.pos { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border: 1px solid var(--i); background: var(--w); color: var(--i); font-family: var(--mono); font-weight: 500; font-size: 15px; }
.top8 .pos { background: var(--i); color: var(--z); }
.table { display: none; width: 100%; border-collapse: collapse; font-size: 16px; }
.table th { padding: 12px 16px; text-align: left; font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; border-bottom: 2px solid var(--i); }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--i); }
.table th:first-child, .table td:first-child { padding-left: 0; width: 80px; }
.table th:last-child, .table td:last-child { padding-right: 0; }
.table .r { text-align: right; }
.table .name { font-weight: 600; }
.table .n { font-family: var(--mono); }
.table .pts { font-family: var(--mono); font-weight: 500; font-size: 20px; }
.table tr.cut td, .rows li.cut { border-bottom-width: 2px; }
.rows { border-top: 2px solid var(--i); }
.rows li { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--i); }
.rows .name { font-weight: 600; font-size: 16px; overflow-wrap: anywhere; }
.rows .sub { font-family: var(--mono); font-size: 12px; letter-spacing: .04em; }
.rows .pts { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.rows .pts b { font-family: var(--mono); font-weight: 500; font-size: 22px; line-height: 1; }
.rows .pts span { font-family: var(--mono); font-size: 10px; letter-spacing: .16em; }
@media (min-width: 768px) { .table { display: table; } .rows { display: none; } }

/* Statistiche */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 16px; }
.kpi { border: 1px solid var(--z); padding: 24px; display: flex; flex-direction: column-reverse; gap: 10px; }
.kpi dt { font-size: 13px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.kpi dd { font-family: var(--mono); font-weight: 500; font-size: clamp(48px, 6vw, 72px); line-height: 1; color: var(--z); }
.rankings { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(32px, 4vw, 48px); }
.ranking h3 { padding-bottom: 12px; border-bottom: 2px solid var(--z); color: var(--z); font-size: 18px; font-weight: 600; margin-bottom: 16px; }
.ranking ol { display: flex; flex-direction: column; gap: 16px; }
.ranking li { display: flex; flex-direction: column; gap: 8px; }
.ranking .row { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; }
.ranking .lbl { display: flex; gap: 10px; min-width: 0; }
.ranking .rk, .ranking .val { font-family: var(--mono); color: var(--z); }
.ranking .val { font-weight: 500; }
.ranking .bar { height: 8px; border: 1px solid var(--z); }
.ranking .bar span { display: block; height: 100%; background: var(--z); }
.ranking .none { font-size: 15px; }
@media (min-width: 1024px) { .rankings { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Regolamento */
.rules { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(40px, 6vw, 96px); align-items: start; }
.rules-lead { font-size: clamp(18px, 1.6vw, 20px); line-height: 1.55; font-weight: 600; text-wrap: pretty; }
.rules .btn { align-self: flex-start; }
.rules-list { border-top: 2px solid var(--i); }
.rules-list li { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 14px; padding: 18px 0; border-bottom: 1px solid var(--i); font-size: 17px; line-height: 1.6; }
.rules-list li::before { content: ""; width: 9px; height: 9px; margin-top: 9px; background: var(--i); transform: rotate(45deg); }
@media (min-width: 1024px) { .rules { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); } }

/* Dove si gioca */
.venue { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(32px, 5vw, 80px); align-items: stretch; }
.venue-card { padding: clamp(28px, 4vw, 48px); display: flex; flex-direction: column; gap: 28px; justify-content: space-between; }
.venue-card .mono-label { color: var(--z); }
.venue-card h3 { color: var(--z); font-size: clamp(28px, 3vw, 36px); line-height: 1.1; font-weight: 800; }
.venue-card address { font-style: normal; font-size: 17px; line-height: 1.6; }
.venue-card .ig { font-family: var(--mono); font-size: 15px; }
.venue-card .ig a { color: var(--z); text-underline-offset: 4px; }
@media (min-width: 1024px) { .venue { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); } }

/* Footer */
.site-footer { border-top: 3px solid var(--z); padding: clamp(56px, 7vw, 96px) var(--pad) 32px; }
.foot-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; }
.foot-brand .sym { width: 96px; aspect-ratio: 150 / 101; }
.foot-brand .sym img { width: 100%; height: 100%; }
.foot-name { color: var(--z); font-size: 22px; font-weight: 800; line-height: 1.2; }
.foot-claim { font-size: 15px; line-height: 1.55; max-width: 32ch; }
.foot-col h2 { font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--z); }
.foot-col ul { display: flex; flex-direction: column; gap: 4px; }
.foot-col a { display: inline-block; padding: 6px 0; color: var(--w); font-size: 15px; text-decoration: none; }
.foot-col a:hover { color: var(--z); }
.foot-col a.accent { color: var(--z); font-weight: 600; text-decoration: underline; text-underline-offset: 4px; }
.foot-col p { font-size: 15px; line-height: 1.55; }
.foot-legal { border-top: 1px solid var(--z); padding-top: 28px; display: flex; flex-direction: column; gap: 14px; font-size: 13px; line-height: 1.6; max-width: 90ch; }
.foot-legal .copy { margin-top: 8px; font-family: var(--mono); font-size: 12px; letter-spacing: .08em; color: var(--z); }
@media (min-width: 640px) { .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .foot-brand { grid-column: span 2; } }
@media (min-width: 1024px) { .foot-grid { grid-template-columns: minmax(0, 6fr) minmax(0, 3fr) minmax(0, 3fr); } .foot-brand { grid-column: auto; } }
