/* Milano Easter Trophy — stile "wow" */
:root {
  --notte: #10305e;
  --blu: #0b2545;
  --blu-medio: #13315c;
  --ghiaccio: #eef6fb;
  --azzurro: #6fb3d8;
  --azzurro-chiaro: #9fd4f5;
  --accento: #e5537a;
  --testo: #22303e;
  --bianco: #ffffff;
  --font-display: 'Bebas Neue', 'Arial Narrow', sans-serif;
  --font-testo: 'Montserrat', 'Segoe UI', Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-testo);
  color: var(--testo);
  background: var(--bianco);
  line-height: 1.7;
}

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

a { color: var(--blu-medio); }

/* ===== Header ===== */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(16, 48, 94, .92);
  backdrop-filter: blur(8px);
  color: var(--bianco);
  box-shadow: 0 2px 20px rgba(0, 0, 0, .35);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--bianco); }

.brand img { height: 52px; width: auto; border-radius: 10px; }

.brand span {
  font-family: var(--font-display);
  font-size: 1.7rem;
  letter-spacing: 2px;
  line-height: 1;
}

nav { display: flex; gap: 4px; flex-wrap: wrap; }

nav a {
  color: var(--ghiaccio);
  text-decoration: none;
  font-weight: 600;
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 9px 15px;
  border-radius: 999px;
  transition: all .25s;
}

nav a:hover, nav a.attiva { background: var(--accento); color: var(--bianco); }

/* ===== Hero con slideshow ===== */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--bianco);
  overflow: hidden;
  background: var(--notte);
}

.hero .slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.08);
  transition: opacity 2s ease, transform 7s linear;
}

.hero .slide.on { opacity: .38; transform: scale(1); }

.hero .slide.fissa { opacity: .38; transform: none; transition: none; }

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 30%, rgba(7,23,48,.85) 100%),
              linear-gradient(180deg, rgba(7,23,48,.4), rgba(7,23,48,.15) 40%, rgba(7,23,48,.9));
}

.hero-testo { position: relative; z-index: 2; padding: 40px 20px; max-width: 1000px; }

.eyebrow {
  display: inline-block;
  font-size: .85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 5px;
  color: var(--azzurro-chiaro);
  border: 1px solid rgba(159, 212, 245, .5);
  border-radius: 999px;
  padding: 8px 22px;
  margin-bottom: 26px;
  animation: fadeUp 1s ease both;
}

.hero-testo h1 {
  font-family: var(--font-display);
  font-size: clamp(3.4rem, 11vw, 8rem);
  line-height: .95;
  letter-spacing: 3px;
  text-shadow: 0 8px 40px rgba(0, 0, 0, .6);
  animation: fadeUp 1s .15s ease both;
}

.hero-testo h1 .grad {
  background: linear-gradient(90deg, var(--azzurro-chiaro), var(--accento));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-testo .sotto {
  font-size: clamp(1rem, 2.4vw, 1.3rem);
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-top: 18px;
  color: var(--ghiaccio);
  animation: fadeUp 1s .3s ease both;
}

.hero-testo .motto {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3.5vw, 2.4rem);
  letter-spacing: 4px;
  margin-top: 14px;
  color: var(--azzurro-chiaro);
  animation: fadeUp 1s .45s ease both;
}

.hero-cta { margin-top: 34px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; animation: fadeUp 1s .6s ease both; }

/* Countdown */
.countdown {
  display: flex;
  gap: 14px;
  justify-content: center;
  margin-top: 40px;
  flex-wrap: wrap;
  animation: fadeUp 1s .75s ease both;
}

.cd-box {
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .18);
  backdrop-filter: blur(6px);
  border-radius: 14px;
  padding: 14px 10px;
  min-width: 92px;
}

.cd-box b {
  display: block;
  font-family: var(--font-display);
  font-size: 2.6rem;
  line-height: 1;
  color: var(--bianco);
}

.cd-box span {
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--azzurro-chiaro);
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== Bottoni ===== */
.bottone {
  display: inline-block;
  background: var(--accento);
  color: var(--bianco);
  text-decoration: none;
  font-weight: 700;
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  padding: 15px 34px;
  border-radius: 999px;
  transition: all .25s;
  box-shadow: 0 8px 24px rgba(229, 83, 122, .35);
}

.bottone:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(229, 83, 122, .5); }

.bottone.ghost { background: transparent; border: 2px solid rgba(255,255,255,.6); box-shadow: none; }

.bottone.ghost:hover { background: rgba(255,255,255,.12); }

/* ===== Sezioni ===== */
main { overflow-x: hidden; }

section { padding: 90px 20px; }

.contenuto { max-width: 1150px; margin: 0 auto; }

.etichetta {
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 4px;
  color: var(--accento);
  margin-bottom: 8px;
}

h2 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  letter-spacing: 2px;
  line-height: 1;
  color: var(--blu);
  margin-bottom: 26px;
}

.scura { background: var(--notte); color: var(--ghiaccio); }

.scura h2 { color: var(--bianco); }

.intro { font-size: 1.15rem; max-width: 820px; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity .8s ease, transform .8s ease; }

.reveal.vista { opacity: 1; transform: translateY(0); }

/* ===== Barra numeri ===== */
.numeri {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
  text-align: center;
  margin-top: 50px;
}

.numeri b {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(3rem, 7vw, 4.6rem);
  line-height: 1;
  background: linear-gradient(90deg, var(--azzurro-chiaro), var(--accento));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.numeri span { font-size: .8rem; text-transform: uppercase; letter-spacing: 3px; }

/* ===== Card gare ===== */
.gare { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 26px; margin-top: 20px; }

.gara-card {
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  color: var(--bianco);
  background: var(--notte);
  box-shadow: 0 15px 40px rgba(7, 23, 48, .25);
  transition: transform .35s ease, box-shadow .35s ease;
}

.gara-card:hover { transform: translateY(-10px); box-shadow: 0 25px 55px rgba(7, 23, 48, .4); }

.gara-card img {
  width: 100%;
  height: auto;
  object-fit: contain;
  background: var(--blu);
}

.gara-card .velo { display: none; }

.gara-card .gc-testo { padding: 26px 28px 30px; }

.gara-card .num {
  font-family: var(--font-display);
  font-size: 3rem;
  line-height: 1;
  color: var(--accento);
}

.gara-card h3 {
  font-family: var(--font-display);
  font-size: 1.9rem;
  letter-spacing: 2px;
  margin: 6px 0 10px;
}

.gara-card p { font-size: .9rem; line-height: 1.6; color: #d9e6f2; }

/* ===== Marquee immagini che scorrono ===== */
.nastro { padding: 0; background: var(--notte); overflow: hidden; }

.nastro-track { display: flex; gap: 12px; width: max-content; animation: scorri 22s linear infinite; padding: 12px 0 6px; }

.nastro-track.inverso { animation-direction: reverse; animation-duration: 26s; padding: 6px 0 12px; }

.nastro-track img {
  height: 200px;
  width: auto;
  border-radius: 14px;
  object-fit: cover;
  box-shadow: 0 10px 25px rgba(0,0,0,.4);
}

.nastro:hover .nastro-track { animation-play-state: paused; }

@keyframes scorri { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ===== Venue / Sponsor ===== */
.venue { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: center; }

.venue-img img { border-radius: 20px; box-shadow: 0 18px 45px rgba(7,23,48,.3); }

.venue-info h3 { font-family: var(--font-display); font-size: 2.4rem; letter-spacing: 2px; color: var(--blu); }

.scura .venue-info h3 { color: var(--bianco); }

.venue-info p { margin: 12px 0 8px; }

/* ===== Pagine interne ===== */
.pagina-banner { border-radius: 20px; overflow: hidden; margin: 40px auto 30px; max-width: 1150px; box-shadow: 0 15px 40px rgba(7,23,48,.25); }

.pagina-banner img { width: 100%; height: auto; }

.pagina-corpo { max-width: 1150px; margin: 0 auto 80px; padding: 0 20px; }

.avviso {
  background: var(--ghiaccio);
  border-left: 5px solid var(--accento);
  padding: 28px 32px;
  border-radius: 0 16px 16px 0;
  font-size: 1.1rem;
  max-width: 780px;
}

/* ===== Footer ===== */
footer { background: var(--notte); color: var(--ghiaccio); padding: 60px 20px 40px; }

.footer-inner {
  max-width: 1150px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 30px;
}

footer h4 {
  font-family: var(--font-display);
  letter-spacing: 2px;
  color: var(--bianco);
  margin-bottom: 10px;
  font-size: 1.3rem;
}

footer a { color: var(--azzurro-chiaro); text-decoration: none; }

footer a:hover { color: var(--accento); }

.social { display: flex; gap: 18px; }

.copy { text-align: center; margin-top: 40px; font-size: .8rem; opacity: .6; width: 100%; letter-spacing: 1px; }

@media (max-width: 760px) {
  .venue { grid-template-columns: 1fr; }
  .hero { min-height: 78vh; }
  section { padding: 60px 16px; }
  .nastro-track img { height: 160px; }
}


/* ===== Scintillio elegante ===== */
.scura, footer, .hero { position: relative; }

.scura .contenuto, .footer-inner, .hero-testo { position: relative; z-index: 2; }

.hero::before, .scura::before, footer::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background-image:
    radial-gradient(1.4px 1.4px at 18% 28%, rgba(255,255,255,.85), transparent 55%),
    radial-gradient(1px 1px at 62% 14%, rgba(200,228,255,.8), transparent 55%),
    radial-gradient(1.6px 1.6px at 84% 46%, rgba(255,255,255,.7), transparent 55%),
    radial-gradient(1px 1px at 38% 68%, rgba(230,200,255,.7), transparent 55%),
    radial-gradient(1.2px 1.2px at 8% 82%, rgba(255,255,255,.75), transparent 55%),
    radial-gradient(1px 1px at 73% 79%, rgba(200,228,255,.8), transparent 55%),
    radial-gradient(1.5px 1.5px at 47% 39%, rgba(255,255,255,.6), transparent 55%),
    radial-gradient(1px 1px at 92% 12%, rgba(255,220,235,.7), transparent 55%);
  background-size: 300px 300px;
  animation: brillio 5s ease-in-out infinite;
}

.scura::before { animation-delay: 1.2s; }

footer::before { animation-delay: 2.4s; }

@keyframes brillio {
  0%, 100% { opacity: .25; }
  50% { opacity: .75; }
}

/* riflesso delicato sul titolo */
.hero-testo h1 .grad {
  background: linear-gradient(90deg, var(--azzurro-chiaro), #ffffff, var(--accento), var(--azzurro-chiaro));
  background-size: 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: riflesso 6s linear infinite;
}

@keyframes riflesso {
  from { background-position: 0% 0; }
  to { background-position: 250% 0; }
}


/* ===== Bandierine nazioni ===== */
.bandiere { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }

.bandiera {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--ghiaccio);
  border: 1px solid #d5e4ef;
  border-radius: 999px;
  padding: 7px 16px 7px 10px;
  font-size: .85rem;
  font-weight: 600;
  color: var(--blu);
}

.bandiera .bf { font-size: 1.25rem; line-height: 1; }


/* ===== Giostra 3D di foto ===== */
.giostra {
  perspective: 1400px;
  height: 380px;
  overflow: hidden;
  margin-top: 10px;
}

.giostra-anello {
  position: relative;
  width: 230px;
  height: 310px;
  margin: 30px auto 0;
  transform-style: preserve-3d;
  animation: ruota 45s linear infinite;
}

.giostra:hover .giostra-anello { animation-play-state: paused; }

.giostra-anello img {
  position: absolute;
  inset: 0;
  width: 230px;
  height: 310px;
  object-fit: cover;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,.5);
  transform: rotateY(var(--a)) translateZ(640px);
  backface-visibility: hidden;
}

@keyframes ruota {
  from { transform: rotateY(0deg); }
  to { transform: rotateY(360deg); }
}

/* ===== Nastro bandiere (piccolo) ===== */
.nastro.bandiere-nastro .nastro-track {
  animation-duration: 40s;
  padding: 14px 0;
  gap: 18px;
}

.nastro.bandiere-nastro .nastro-track img {
  height: 54px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,.35);
}

@media (max-width: 760px) {
  .giostra { height: 300px; perspective: 900px; }
  .giostra-anello, .giostra-anello img { width: 160px; height: 220px; }
  .giostra-anello img { transform: rotateY(var(--a)) translateZ(440px); }
  .nastro.bandiere-nastro .nastro-track img { height: 40px; }
}


/* ===== Giostra bandiere (compatta) ===== */
.giostra-bandiere { height: 280px; perspective: 2400px; overflow: hidden; }

.giostra-bandiere .giostra-anello {
  width: 150px;
  height: 92px;
  margin: 80px auto 0;
  animation-duration: 60s;
}

.giostra-bandiere .giostra-anello img {
  width: 150px;
  height: 92px;
  transform: rotateY(var(--a)) translateZ(640px);
  border-radius: 8px;
}

@media (max-width: 760px) {
  .giostra-bandiere { height: 200px; perspective: 1600px; }
  .giostra-bandiere .giostra-anello, .giostra-bandiere .giostra-anello img { width: 100px; height: 62px; }
  .giostra-bandiere .giostra-anello { margin-top: 60px; }
  .giostra-bandiere .giostra-anello img { transform: rotateY(var(--a)) translateZ(430px); }
}


/* ===== Selettore lingua ===== */
nav a.lingua {
  border: 1.5px solid currentColor;
  border-radius: 8px;
  padding: 3px 10px;
  font-weight: 800;
  letter-spacing: 1px;
}


/* ===== Sezione novita olimpica ===== */
.olimpico { background: linear-gradient(135deg, var(--notte) 0%, #3d1f4d 55%, #7a2b52 100%); }

.badge-olimpico {
  display: inline-block;
  background: var(--accento);
  color: var(--bianco);
  font-size: .75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 3px;
  padding: 7px 18px;
  border-radius: 999px;
  margin-bottom: 16px;
  box-shadow: 0 0 22px rgba(229,83,122,.55);
  animation: pulsa 2.2s ease-in-out infinite;
}

@keyframes pulsa {
  0%, 100% { transform: scale(1); box-shadow: 0 0 22px rgba(229,83,122,.55); }
  50% { transform: scale(1.07); box-shadow: 0 0 34px rgba(229,83,122,.85); }
}


/* ===== Esplosione di cerchi Synchro 9 ===== */
.s9-boom {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,.25);
}

.s9-boom strong { color: var(--azzurro-chiaro); }

.cerchi { display: inline-flex; gap: 7px; }

.cerchi i {
  width: 15px;
  height: 15px;
  border: 3px solid;
  border-radius: 50%;
  transform: scale(0);
  opacity: 0;
}

.vista .cerchi i {
  animation: boom 3s cubic-bezier(.2,1.6,.4,1) infinite;
}

.cerchi i:nth-child(1) { border-color: #4aa8ff; animation-delay: .05s; }
.cerchi i:nth-child(2) { border-color: #ffd23f; animation-delay: .2s; }
.cerchi i:nth-child(3) { border-color: #ffffff; animation-delay: .35s; }
.cerchi i:nth-child(4) { border-color: #4ade80; animation-delay: .5s; }
.cerchi i:nth-child(5) { border-color: #ff5a76; animation-delay: .65s; }

@keyframes boom {
  0% { transform: scale(0); opacity: 0; }
  15% { transform: scale(1.5); opacity: 1; }
  25% { transform: scale(1); }
  80% { transform: scale(1); opacity: 1; }
  100% { transform: scale(0); opacity: 0; }
}


.cerchi-grandi { display: flex; gap: 12px; }

.cerchi-grandi i {
  width: 30px;
  height: 30px;
  border-width: 5px;
}


/* ===== Correzioni per telefono ===== */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body { overflow-x: hidden; }

.giostra-bandiere { max-width: 100%; }

@media (max-width: 760px) {
  .hero h1 { font-size: clamp(2.6rem, 13vw, 3.4rem); }
  h2 { font-size: clamp(1.9rem, 8vw, 2.6rem); }
  .countdown { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
  .cd-box { min-width: 70px; }
  .giostra-bandiere { height: 150px; perspective: 1100px; }
  .giostra-bandiere .giostra-anello, .giostra-bandiere .giostra-anello img { width: 72px; height: 44px; }
  .giostra-bandiere .giostra-anello { margin-top: 48px; animation-duration: 45s; }
  .giostra-bandiere .giostra-anello img { transform: rotateY(var(--a)) translateZ(310px); border-radius: 5px; }
  .cerchi-grandi i { width: 22px; height: 22px; border-width: 4px; }
}
