/*
 * Calcio 98 — foglio di stile
 * Tema scuro sportivo, nostalgia PC anni '90. Mobile-first.
 */

:root {
  --bg: #0a0f1c; /* navy scuro */
  --bg-alt: #0d1526;
  --panel: #121c33;
  --panel-2: #16223c;
  --line: #26375a;
  --text: #e9eef8;
  --muted: #9fb0cd;
  --accent: #2f6fe0; /* blu primario */
  --accent-hover: #4a8bff; /* blu chiaro (hover) */
  --accent-2: #f2b53d; /* oro per evidenziare il testo */
  --accent-ink: #ffffff; /* testo su pulsante blu */
  --ink-dark: #0a0f1c; /* testo scuro su fondo oro */
  --focus: #f2b53d;
  --maxw: 1100px;
  --radius: 12px;
  --font: "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  --mono: "Consolas", "SFMono-Regular", "Menlo", monospace;
}

* {
  box-sizing: border-box;
}

/* L'attributo hidden deve sempre prevalere sui display espliciti (es. .lightbox) */
[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body.no-scroll {
  overflow: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--accent);
}

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}

.container.narrow {
  max-width: 780px;
}

/* Accessibilità: focus visibile */
a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent-2);
  color: var(--ink-dark);
  padding: 10px 16px;
  font-weight: 700;
  z-index: 200;
  border-radius: 0 0 8px 0;
}
.skip-link:focus {
  left: 0;
}

/* ---------- Banner promozionale ---------- */
.promo-banner {
  background: linear-gradient(90deg, #0e1b38 0%, #16264a 100%);
  border-bottom: 1px solid var(--line);
  color: var(--text);
}

.promo-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  min-height: 48px;
  padding-top: 8px;
  padding-bottom: 8px;
  flex-wrap: wrap;
}

.promo-text {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 0.92rem;
}

.promo-text span:last-child {
  color: var(--text);
}

.promo-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 0 4px rgba(242, 181, 61, 0.18);
  flex: none;
}

.promo-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.promo-btn,
.promo-fb {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.86rem;
  padding: 7px 14px;
  border-radius: 8px;
  border: 1px solid transparent;
  white-space: nowrap;
}

.promo-btn {
  background: var(--accent-2);
  color: var(--ink-dark);
}

.promo-btn:hover {
  filter: brightness(1.08);
}

.promo-fb {
  color: var(--text);
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.promo-fb:hover {
  border-color: var(--accent);
  color: #fff;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 20, 16, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 800;
  letter-spacing: 0.5px;
}

.brand-mark {
  font-family: var(--mono);
  background: var(--accent);
  color: var(--accent-ink);
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 800;
}

.brand-name {
  font-size: 1.05rem;
}

.primary-nav {
  display: flex;
  gap: 16px;
  margin-left: auto;
}

.primary-nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
  white-space: nowrap;
}

.primary-nav a:hover,
.primary-nav a[aria-current="page"] {
  color: var(--text);
  border-color: var(--accent);
}

/* Selettore lingua */
.lang-switch {
  position: relative;
}

.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 12px;
  font-weight: 700;
  cursor: pointer;
  font-size: 0.9rem;
}

.lang-toggle:hover {
  border-color: var(--accent);
}

.lang-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 150px;
  list-style: none;
  margin: 0;
  padding: 6px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
  z-index: 120;
}

.lang-menu li {
  margin: 0;
}

.lang-menu button {
  width: 100%;
  text-align: left;
  background: transparent;
  color: var(--text);
  border: 0;
  padding: 9px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.92rem;
}

.lang-menu button:hover {
  background: var(--panel);
}

.lang-menu button.is-active {
  color: var(--accent-ink);
  background: var(--accent);
  font-weight: 700;
}

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  margin-left: auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  width: 20px;
  margin: 0 auto;
  background: var(--text);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(1200px 500px at 20% -10%, rgba(47, 111, 224, 0.22), transparent 60%),
    radial-gradient(900px 500px at 100% 0%, rgba(242, 181, 61, 0.1), transparent 55%),
    repeating-linear-gradient(0deg, transparent 0 38px, rgba(255, 255, 255, 0.02) 38px 39px);
  z-index: 0;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 40px;
  align-items: center;
  padding: 72px 20px;
}

.badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-2);
  border: 1px solid var(--line);
  background: rgba(242, 181, 61, 0.08);
  padding: 6px 12px;
  border-radius: 999px;
  margin: 0 0 18px;
}

.hero-title {
  font-size: clamp(2.6rem, 7vw, 4.4rem);
  line-height: 1;
  margin: 0 0 14px;
  letter-spacing: -1px;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.35);
}

.tagline {
  font-size: clamp(1.05rem, 2.4vw, 1.35rem);
  margin: 0 0 16px;
  color: var(--text);
}

.tagline strong {
  color: var(--accent-2);
}

.lead {
  color: var(--muted);
  max-width: 46ch;
  margin: 0 0 26px;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 18px;
}

.btn {
  display: inline-block;
  text-decoration: none;
  font-weight: 700;
  padding: 13px 22px;
  border-radius: 10px;
  border: 1px solid transparent;
  transition: transform 0.12s, background 0.15s, border-color 0.15s;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 8px 24px rgba(47, 111, 224, 0.3);
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line);
}

.btn-ghost:hover {
  border-color: var(--accent);
}

.hero-langs {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0;
}

.hero-art img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

/* ---------- Sezioni ---------- */
.section {
  padding: 64px 0;
}

.section-alt {
  background: var(--bg-alt);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section h2 {
  font-size: clamp(1.6rem, 3.4vw, 2.2rem);
  margin: 0 0 24px;
  position: relative;
  padding-bottom: 12px;
}

.section h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 56px;
  height: 3px;
  background: var(--accent);
  border-radius: 3px;
}

.section-lead {
  color: var(--muted);
  max-width: 62ch;
  margin: -8px 0 28px;
}

.prose p {
  margin: 0 0 16px;
  color: var(--text);
}

.prose.legal p,
.prose.legal li {
  color: #d3e2d8;
}

/* ---------- Features ---------- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.feature {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  transition: transform 0.15s, border-color 0.15s;
}

.feature:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
}

.feature h3 {
  margin: 0 0 8px;
  font-size: 1.1rem;
  color: var(--accent-2);
}

.feature p {
  margin: 0;
  color: var(--muted);
  font-size: 0.96rem;
}

/* ---------- Media ---------- */
.media-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.shot {
  padding: 0;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 16 / 9;
}

.shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s;
}

.shot:hover img {
  transform: scale(1.05);
}

.source-note {
  margin-top: 16px;
  color: var(--muted);
  font-size: 0.85rem;
}

/* ---------- Roadmap ---------- */
.roadmap-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.roadmap-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 22px 22px;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  position: relative;
  overflow: hidden;
}

.roadmap-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--line);
}

.roadmap-card.is-now::before {
  background: var(--accent);
}

.roadmap-card.is-next::before {
  background: var(--accent-2);
}

.roadmap-card.is-later::before {
  background: #5a6d92;
}

.roadmap-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.roadmap-ver {
  font-family: var(--mono);
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--accent-2);
  margin: 0;
  letter-spacing: 0.02em;
}

.roadmap-status {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
}

.roadmap-status.status-now {
  background: rgba(47, 111, 224, 0.18);
  color: var(--accent-hover);
  border-color: rgba(47, 111, 224, 0.35);
}

.roadmap-status.status-next {
  background: rgba(242, 181, 61, 0.12);
  color: var(--accent-2);
  border-color: rgba(242, 181, 61, 0.35);
}

.roadmap-status.status-later {
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
}

.roadmap-card h3 {
  margin: 0 0 8px;
  font-size: 1.12rem;
}

.roadmap-card > p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 0.96rem;
}

.roadmap-tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: auto 0 0;
  padding: 0;
}

.roadmap-tags li {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text);
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 10px;
}

.roadmap-link {
  display: inline-block;
  margin-top: 16px;
  font-weight: 700;
  font-size: 0.92rem;
  text-decoration: none;
  color: var(--accent-2);
}

.roadmap-link:hover {
  color: #fff;
}

/* ---------- Leaderboard page ---------- */
.lb-hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.lb-hero-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(1000px 420px at 15% -20%, rgba(47, 111, 224, 0.28), transparent 60%),
    radial-gradient(800px 400px at 90% 10%, rgba(242, 181, 61, 0.12), transparent 55%);
  z-index: 0;
}

.lb-hero-inner {
  position: relative;
  z-index: 1;
  padding: 56px 20px 48px;
}

.lb-hero .lead {
  max-width: 58ch;
}

.lb-board {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px 22px 0;
  overflow: hidden;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.35);
}

.lb-board h2 {
  margin: 0;
  padding: 0;
  font-size: 1.28rem;
  position: static;
}

.lb-board h2::after {
  display: none;
}

.lb-board-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.lb-kicker {
  margin: 0 0 4px;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-2);
}

.lb-season {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  font-family: var(--mono);
}

.lb-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.lb-tab {
  font-weight: 700;
  font-size: 0.82rem;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  cursor: default;
  pointer-events: none;
}

.lb-tab.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

.lb-podium {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr;
  gap: 12px;
  align-items: end;
  margin-bottom: 22px;
}

.lb-place {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 14px 14px;
  text-align: center;
}

.lb-place.is-1 {
  padding-top: 22px;
  border-color: rgba(242, 181, 61, 0.55);
  box-shadow: 0 0 0 1px rgba(242, 181, 61, 0.12), 0 10px 24px rgba(0, 0, 0, 0.2);
}

.lb-medal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-weight: 800;
  font-family: var(--mono);
  margin-bottom: 8px;
}

.lb-place.is-1 .lb-medal {
  background: var(--accent-2);
  color: var(--ink-dark);
}

.lb-place.is-2 .lb-medal {
  background: #8ea0bf;
  color: var(--ink-dark);
}

.lb-place.is-3 .lb-medal {
  background: #b07a4a;
  color: #fff;
}

.lb-place .lb-obf {
  display: block;
  font-weight: 700;
  margin-bottom: 2px;
}

.lb-place .lb-club {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  margin-bottom: 8px;
}

.lb-place .lb-pts {
  font-family: var(--mono);
  font-weight: 800;
  color: var(--accent-2);
}

.lb-table-wrap {
  position: relative;
  margin: 0 -22px;
}

.lb-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.lb-table th,
.lb-table td {
  padding: 11px 16px;
  text-align: left;
  border-top: 1px solid var(--line);
  white-space: nowrap;
}

.lb-table th {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}

.lb-table td:nth-child(1),
.lb-table th:nth-child(1),
.lb-table td:nth-child(4),
.lb-table th:nth-child(4),
.lb-table td:nth-child(5),
.lb-table th:nth-child(5),
.lb-table td:nth-child(6),
.lb-table th:nth-child(6) {
  text-align: center;
  font-family: var(--mono);
}

.lb-table tbody tr.is-you {
  background: rgba(47, 111, 224, 0.14);
}

.lb-you {
  display: inline-block;
  margin-left: 6px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-2);
  vertical-align: middle;
}

.lb-obf {
  filter: blur(5px);
  user-select: none;
  pointer-events: none;
  letter-spacing: 0.04em;
}

.lb-form {
  display: inline-flex;
  gap: 4px;
}

.lb-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  font-size: 0;
  color: transparent;
}

.lb-dot.W {
  background: #2ea56e;
}

.lb-dot.D {
  background: var(--accent-2);
}

.lb-dot.L {
  background: #d45454;
}

.lb-lock {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 72px 20px 28px;
  background: linear-gradient(180deg, rgba(18, 28, 51, 0) 0%, rgba(10, 15, 28, 0.88) 42%, rgba(10, 15, 28, 0.96) 100%);
  text-align: center;
  pointer-events: none;
}

.lb-lock-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--accent-2);
  margin-bottom: 10px;
}

.lb-lock-title {
  margin: 0 0 4px;
  font-size: 1.15rem;
  font-weight: 800;
}

.lb-lock-sub {
  margin: 0;
  color: var(--accent-2);
  font-weight: 700;
}

/* ---------- Privacy ---------- */
.privacy-updated {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0 0 20px;
  font-family: var(--mono);
}

.prose.legal h3 {
  margin: 28px 0 10px;
  font-size: 1.12rem;
  color: var(--text);
}

.prose.legal ul {
  margin: 0 0 16px;
  padding-left: 20px;
}

.prose.legal li {
  margin-bottom: 6px;
}

dl.controller {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 6px 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px 20px;
  margin: 4px 0 8px;
}

dl.controller dt {
  color: var(--muted);
  font-weight: 700;
}

dl.controller dd {
  margin: 0;
  color: var(--text);
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 34px 0;
  background: var(--bg-alt);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
}

.copyright {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.footer-links {
  display: flex;
  gap: 18px;
  margin-left: auto;
}

.footer-links a {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
}

.footer-links a:hover,
.footer-links a[aria-current="page"] {
  color: var(--accent);
}

.disclaimer {
  flex-basis: 100%;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.5;
  border-top: 1px dashed var(--line);
  padding-top: 14px;
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(3, 8, 5, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.lightbox img {
  max-width: 96vw;
  max-height: 88vh;
  border-radius: 10px;
  border: 1px solid var(--line);
}

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 20px;
  width: 46px;
  height: 46px;
  font-size: 1.8rem;
  line-height: 1;
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 50%;
  cursor: pointer;
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .nav-toggle {
    display: flex;
  }
  .primary-nav {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--panel-2);
    border-bottom: 1px solid var(--line);
    padding: 8px 20px 16px;
    display: none;
  }
  .primary-nav.is-open {
    display: flex;
  }
  .primary-nav a {
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
    white-space: normal;
  }
  .header-inner {
    flex-wrap: wrap;
  }
}

@media (max-width: 860px) {
  .hero-inner {
    grid-template-columns: 1fr;
    padding: 48px 20px;
  }
  .hero-art {
    order: -1;
    max-width: 420px;
  }
  .features-grid,
  .roadmap-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .media-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .lb-podium {
    grid-template-columns: 1fr;
  }
  .lb-place.is-1 {
    order: -1;
  }
  .lb-table-wrap {
    overflow-x: auto;
  }
}

@media (max-width: 680px) {
  .features-grid,
  .media-grid,
  .roadmap-grid {
    grid-template-columns: 1fr;
  }
  .footer-links {
    margin-left: 0;
  }
  dl.controller {
    grid-template-columns: 1fr;
    gap: 2px;
  }
  dl.controller dd {
    margin-bottom: 10px;
  }
}

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