/* Landing page — Fanta Predictor */
@font-face { font-family: "Titillium"; src: url("../fonts/TitilliumWeb-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Titillium"; src: url("../fonts/TitilliumWeb-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Titillium"; src: url("../fonts/TitilliumWeb-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Titillium"; src: url("../fonts/TitilliumWeb-Black.ttf") format("truetype"); font-weight: 900; font-display: swap; }

:root {
  --bg: #0b0d12;
  --bg-alt: #11141b;
  --surface: #161a23;
  --surface-2: #1d2230;
  --border: rgba(255, 255, 255, 0.08);
  --text: #f1f3f7;
  --muted: #9aa3b5;
  --primary: #e10600;
  --primary-hover: #ff1e17;
  --f1: #e10600;
  --mgp: #ff6b00;
  --wec: #1e7bff;
  --gold: #f5c542;
  --radius: 16px;
  --gutter: 16px;
  --nav-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 8px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Titillium", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { line-height: 1.1; margin: 0; }
p { margin: 0; }

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 var(--gutter); }
@media (min-width: 768px) { :root { --gutter: 32px; } }

.skip-link { position: absolute; left: -999px; top: 0; }
.skip-link:focus { left: 1rem; top: 1rem; z-index: 999; background: #fff; color: #000; padding: .5rem .75rem; border-radius: 6px; }
:focus-visible { outline: 3px solid var(--wec); outline-offset: 3px; border-radius: 6px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: .7em 1.3em; border-radius: 999px; border: 1px solid transparent;
  font-family: inherit; font-weight: 700; font-size: 1rem; cursor: pointer; white-space: nowrap;
  transition: background .2s, transform .15s, border-color .2s;
}
.btn:active { transform: scale(.97); }
.btn-sm { padding: .45em 1em; font-size: .9rem; }
.btn-lg { padding: .85em 1.6em; font-size: 1.05rem; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-ghost { border-color: var(--border); background: rgba(255,255,255,.04); }
.btn-ghost:hover { border-color: rgba(255,255,255,.3); }
.btn-f1  { background: var(--f1);  color: #fff; }
.btn-mgp { background: var(--mgp); color: #fff; }
.btn-wec { background: var(--wec); color: #fff; }

.pill { display: inline-block; padding: .15em .7em; border-radius: 999px; font-size: .75rem; font-weight: 700; letter-spacing: .05em; color: #fff; }
.pill-f1 { background: var(--f1); }
.pill-mgp { background: var(--mgp); }
.pill-wec { background: var(--wec); }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50; height: var(--nav-h);
  background: rgba(11, 13, 18, .8);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: flex; align-items: center; gap: .6rem; font-size: 1.2rem; letter-spacing: .01em; }
.brand img { border-radius: 8px; }
.brand strong { color: var(--primary); font-weight: 900; }

.nav-toggle { display: none; background: none; border: 0; padding: 10px; cursor: pointer; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--text); margin: 5px 0; transition: transform .25s, opacity .25s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-menu { display: flex; align-items: center; gap: 1.5rem; }
.nav-menu > a:not(.btn) { color: var(--muted); font-weight: 600; transition: color .2s; }
.nav-menu > a:not(.btn):hover { color: var(--text); }
.nav-menu .btn + .btn { margin-left: -.75rem; }

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav-menu {
    position: fixed; top: var(--nav-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: .5rem var(--gutter) 1.25rem;
    background: var(--bg-alt); border-bottom: 1px solid var(--border);
    transform: translateY(-110%); opacity: 0; visibility: hidden;
    transition: transform .3s ease, opacity .3s ease, visibility .3s;
  }
  .nav-menu.open { transform: none; opacity: 1; visibility: visible; }
  .nav-menu > a:not(.btn) { padding: .85rem 0; border-bottom: 1px solid var(--border); font-size: 1.05rem; }
  .nav-menu .btn { margin-top: .75rem; padding: .75em; font-size: 1rem; }
  .nav-menu .btn + .btn { margin-left: 0; }
}

/* ---------- Hero ---------- */
.hero { position: relative; padding: 3.5rem 0 2.5rem; overflow: hidden; }
.hero-bg {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(60% 50% at 85% 10%, rgba(225, 6, 0, .28), transparent 70%),
    radial-gradient(50% 45% at 5% 90%, rgba(30, 123, 255, .18), transparent 70%),
    linear-gradient(180deg, rgba(11,13,18,.55), var(--bg)),
    url("../immagini/pexels-jonathanborba-29276539.jpg") center / cover no-repeat;
}
.hero-inner { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 960px) {
  .hero { padding: 6rem 0 3.5rem; }
  .hero-inner { grid-template-columns: 1.25fr 1fr; gap: 4rem; }
}

.tag {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .3rem .85rem; border-radius: 999px; font-size: .85rem; font-weight: 600;
  background: rgba(255,255,255,.06); border: 1px solid var(--border); color: var(--muted);
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: #2ecc71; box-shadow: 0 0 0 0 rgba(46,204,113,.6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(46,204,113,0); } 100% { box-shadow: 0 0 0 0 rgba(46,204,113,0); } }

.hero h1 { font-size: clamp(2.2rem, 7vw, 4.2rem); font-weight: 900; letter-spacing: -.01em; margin: 1.1rem 0 1rem; text-transform: uppercase; font-style: italic; }
.accent { background: linear-gradient(90deg, var(--f1), var(--mgp)); -webkit-background-clip: text; background-clip: text; color: transparent; padding-right: .1em; }
.lead { font-size: clamp(1.02rem, 2.4vw, 1.2rem); color: var(--muted); max-width: 38rem; }
.lead strong { color: var(--text); }

.hero-cta { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }
@media (max-width: 480px) { .hero-cta .btn { flex: 1 1 100%; } }

.hero-series { list-style: none; padding: 0; margin: 2rem 0 0; display: flex; align-items: center; gap: 1.5rem; }
.hero-series img { height: 28px; width: auto; opacity: .85; filter: grayscale(.2); }

/* mock card */
.hero-card {
  background: linear-gradient(160deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border); border-radius: 20px; padding: 1.25rem;
  box-shadow: 0 30px 60px rgba(0,0,0,.5);
  max-width: 420px; width: 100%; justify-self: center;
  transform: rotate(-2deg);
}
.mock-head { display: flex; align-items: center; gap: .75rem; font-weight: 600; color: var(--muted); font-size: .9rem; margin-bottom: 1rem; }
.mock-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.mock-list li {
  display: flex; align-items: center; gap: .75rem;
  background: rgba(255,255,255,.04); border-radius: 10px; padding: .6rem .8rem; font-weight: 600;
}
.mock-list .pos { width: 1.6rem; text-align: center; font-weight: 900; color: var(--muted); }
.mock-list li:nth-child(-n+3) .pos { color: var(--gold); }
.mock-list .bar { width: 4px; height: 1.4rem; border-radius: 2px; }
.bar.t1 { background: #ff8000; } .bar.t2 { background: #ff8000; } .bar.t3 { background: #3671c6; }
.bar.t4 { background: #e8002d; } .bar.t5 { background: #27f4d2; }
.mock-list b { margin-left: auto; color: #2ecc71; }
.mock-list li:last-child b { color: var(--muted); }
.mock-foot { display: flex; justify-content: space-between; margin-top: 1rem; padding-top: 1rem; border-top: 1px dashed var(--border); color: var(--muted); font-size: .9rem; }
.mock-foot strong { color: #c56cf0; }
@media (max-width: 959px) { .hero-card { transform: none; } }

/* stats */
.stats {
  margin: 3rem 0 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px;
  background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
}
.stats > div { background: rgba(17,20,27,.9); padding: 1.1rem 1rem; text-align: center; }
.stats dt { color: var(--muted); font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; }
.stats dd { margin: .2rem 0 0; font-size: clamp(1.6rem, 5vw, 2.2rem); font-weight: 900; }
@media (min-width: 768px) { .stats { grid-template-columns: repeat(4, 1fr); } }

/* ---------- Sections ---------- */
.section { padding: 4rem 0; }
.section-alt { background: var(--bg-alt); border-block: 1px solid var(--border); }
@media (min-width: 960px) { .section { padding: 6rem 0; } }
.section-head { max-width: 42rem; margin-bottom: 2.5rem; }
.eyebrow { color: var(--primary); font-weight: 700; text-transform: uppercase; letter-spacing: .12em; font-size: .85rem; }
.section-head h2 { font-size: clamp(1.7rem, 4.5vw, 2.6rem); font-weight: 900; margin: .4rem 0 .6rem; }
.section-head p { color: var(--muted); font-size: 1.05rem; }

.grid { display: grid; gap: 1rem; }
@media (min-width: 640px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .grid-3 { grid-template-columns: repeat(3, 1fr); gap: 1.25rem; } }

/* serie cards */
.serie-card {
  --c: var(--f1);
  position: relative; display: flex; flex-direction: column; gap: 1rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.5rem; overflow: hidden;
  transition: transform .2s, border-color .2s;
}
.serie-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--c); }
.serie-card:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--c) 50%, transparent); }
.serie-mgp { --c: var(--mgp); }
.serie-wec { --c: var(--wec); }
.serie-top { display: flex; align-items: center; justify-content: space-between; }
.serie-logo { height: 34px; width: auto; }
.serie-desc { color: var(--muted); }
.next { margin-top: auto; background: rgba(255,255,255,.03); border: 1px solid var(--border); border-radius: 12px; padding: 1rem; }
.next-head { display: flex; justify-content: space-between; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.next-round { color: var(--c); font-weight: 700; }
.next-name { display: flex; align-items: center; gap: .55rem; font-size: 1.15rem; font-weight: 700; margin-top: .4rem; }
.flag { width: 26px; height: 18px; object-fit: cover; border-radius: 3px; }
.next-date { display: block; color: var(--muted); font-size: .9rem; margin-top: .15rem; }
.next-date::first-letter { text-transform: uppercase; }
.countdown { display: grid; grid-template-columns: repeat(4, 1fr); gap: .4rem; margin-top: .85rem; text-align: center; }
.countdown div { background: var(--surface-2); border-radius: 8px; padding: .45rem 0; }
.countdown b { display: block; font-size: 1.35rem; font-weight: 900; font-variant-numeric: tabular-nums; }
.countdown span { font-size: .7rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.next-empty { color: var(--muted); }

/* steps */
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; counter-reset: step; }
@media (min-width: 640px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.steps li {
  counter-increment: step; position: relative;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem;
}
.steps li::after {
  content: counter(step, decimal-leading-zero);
  position: absolute; top: 1rem; right: 1.25rem;
  font-size: 2.6rem; font-weight: 900; font-style: italic; color: rgba(255,255,255,.06);
}
.steps i { font-size: 1.5rem; color: var(--primary); }
.steps h3 { font-size: 1.2rem; margin: .9rem 0 .4rem; }
.steps p { color: var(--muted); }

/* features */
.feature { padding: 1.5rem; border-radius: var(--radius); border: 1px solid var(--border); background: linear-gradient(180deg, var(--surface), transparent); }
.feature i {
  width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px;
  background: rgba(225,6,0,.12); color: var(--primary); font-size: 1.15rem;
}
.feature h3 { font-size: 1.15rem; margin: 1rem 0 .4rem; }
.feature p { color: var(--muted); }

/* leagues */
.leagues { list-style: none; padding: 0; margin: 0; display: grid; gap: .75rem; }
@media (min-width: 860px) { .leagues { grid-template-columns: repeat(2, 1fr); } }
.league {
  display: flex; align-items: center; gap: 1rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: .9rem 1rem;
}
.league-logo { width: 56px; height: 28px; object-fit: contain; flex-shrink: 0; }
.league-info { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.league-info strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.league-info span { color: var(--muted); font-size: .9rem; }

/* CTA finale */
.cta-box {
  text-align: center; padding-block: 3rem;
  background: radial-gradient(70% 120% at 50% 0%, rgba(225,6,0,.25), transparent 70%), var(--surface);
  border: 1px solid var(--border); border-radius: 24px;
  max-width: calc(1180px - 2 * var(--gutter));
  width: calc(100% - 2 * var(--gutter));
}
.cta-box h2 { font-size: clamp(1.7rem, 5vw, 2.8rem); font-weight: 900; font-style: italic; text-transform: uppercase; }
.cta-box p { color: var(--muted); margin-top: .75rem; }
.cta-box .hero-cta { justify-content: center; }

/* footer */
.footer { border-top: 1px solid var(--border); padding: 2.5rem 0 calc(2.5rem + env(safe-area-inset-bottom)); }
.footer-inner { display: grid; gap: 1.25rem; justify-items: center; text-align: center; }
.footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem 1.5rem; color: var(--muted); }
.footer nav a:hover { color: var(--text); }
.disclaimer { color: var(--muted); font-size: .8rem; max-width: 36rem; opacity: .7; }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* loghi serie monocromatici: i PNG originali sono scuri e sparirebbero sul fondo nero */
.hero-series img, .serie-logo, .league-logo { filter: brightness(0) invert(1); }
.hero-series img { opacity: .75; }
