@font-face {
  font-family: "One Piece";
  src: url("assets/fonts/one-piece.ttf") format("truetype");
  font-display: swap;
}

:root {
  --blue-deep: #0b2a5b;
  --blue: #14529b;
  --gold: #f2b600;
  --gold-soft: #ffd45e;
  --red: #c01f1f;
  --parchment: #f3e2bd;
  --parchment-dark: #e3cd9c;
  --ink: #2c1a06;
  --sea: #0e3a6b;
  --shadow: rgba(8, 20, 40, 0.45);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Spectral", Georgia, serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 20% 10%, #1b4f8f 0%, transparent 45%),
    radial-gradient(circle at 85% 20%, #123e74 0%, transparent 40%),
    linear-gradient(180deg, #0b2a5b 0%, #0e3a6b 55%, #0a2347 100%);
  background-attachment: fixed;
  min-height: 100vh;
  overflow-x: hidden;
}

.bg-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 26px 26px;
  opacity: 0.5;
}

main, .hero, .footer, .sponsors { position: relative; z-index: 1; }

/* ===== HERO ===== */
.hero {
  position: relative;
  text-align: center;
  padding: 3.5rem 1rem 5rem;
  background:
    radial-gradient(circle at 50% 35%, rgba(242, 182, 0, 0.18), transparent 60%);
}

.hero-inner { max-width: 760px; margin: 0 auto; }

.hero-logo {
  width: min(330px, 70vw);
  height: auto;
  filter: drop-shadow(0 12px 26px rgba(0, 0, 0, 0.6));
  animation: float 5s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

.hero-title {
  font-family: "One Piece", "Pirata One", cursive;
  font-size: clamp(3.2rem, 12vw, 7rem);
  margin: 0;
  line-height: 0.9;
  color: var(--gold-soft);
  text-shadow:
    0 2px 0 #8a6a00,
    0 5px 18px rgba(0, 0, 0, 0.6);
  letter-spacing: 2px;
}

.hero-year {
  font-family: "One Piece", "Pirata One", cursive;
  font-size: clamp(1.6rem, 5vw, 2.6rem);
  color: var(--red);
  margin: 0.2rem 0 0.6rem;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.hero-tagline {
  color: #eaf2ff;
  font-size: clamp(1rem, 3vw, 1.3rem);
  letter-spacing: 1px;
  margin: 0 0 1.8rem;
  opacity: 0.92;
  text-transform: uppercase;
}

/* ===== BOTTONE "SIGILLO" ===== */
.btn {
  --b-edge: #7a5a00;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: "Cinzel", serif;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-decoration: none;
  color: var(--ink);
  padding: 0.8rem 1.6rem 0.85rem;
  position: relative;
  cursor: pointer;
  background:
    repeating-linear-gradient(135deg, rgba(255,255,255,.10) 0 6px, transparent 6px 12px),
    linear-gradient(180deg, var(--gold-soft), var(--gold) 60%, #d99e00);
  border: 2px solid var(--b-edge);
  /* angoli tagliati: forma "targa" non generica */
  clip-path: polygon(10px 0, calc(100% - 10px) 0, 100% 10px, 100% calc(100% - 10px), calc(100% - 10px) 100%, 10px 100%, 0 calc(100% - 10px), 0 10px);
  box-shadow:
    inset 0 2px 0 rgba(255,255,255,.55),
    inset 0 -3px 6px rgba(122,90,0,.5),
    0 8px 0 -2px var(--b-edge),
    0 14px 22px rgba(0,0,0,.4);
  transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
}
.btn:hover { transform: translateY(-2px); filter: saturate(1.08); }
.btn:active {
  transform: translateY(4px);
  box-shadow:
    inset 0 2px 0 rgba(255,255,255,.4),
    inset 0 -2px 5px rgba(122,90,0,.5),
    0 3px 0 -2px var(--b-edge),
    0 6px 12px rgba(0,0,0,.4);
}
.btn .btn-ico { width: 22px; height: 22px; color: var(--blue-deep); }
/* rivetti agli angoli, come una targa inchiodata */
.btn::before, .btn::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff6cf, #8a6a00);
  transform: translateY(-50%);
}
.btn::before { left: 8px; }
.btn::after { right: 8px; }

.hero-wave {
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 70px;
  background:
    radial-gradient(circle at 10px -8px, var(--parchment) 14px, transparent 15px) repeat-x;
  background-size: 40px 40px;
  filter: drop-shadow(0 -4px 8px rgba(0,0,0,0.3));
}

/* ===== SECTION TITLES ===== */
.section-title {
  font-family: "One Piece", "Pirata One", cursive;
  color: var(--blue-deep);
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  margin: 0 0 1rem;
}
.section-title--center { text-align: center; color: var(--gold-soft); text-shadow: 0 2px 10px rgba(0,0,0,0.5); margin-bottom: 1.6rem; }

/* ===== PARCHMENT CARD ===== */
.parchment {
  background:
    radial-gradient(circle at 0 0, rgba(0,0,0,0.06), transparent 30%),
    radial-gradient(circle at 100% 100%, rgba(0,0,0,0.08), transparent 35%),
    linear-gradient(160deg, var(--parchment), var(--parchment-dark));
  border: 2px solid #b89a5e;
  border-radius: 12px;
  box-shadow: inset 0 0 30px rgba(120, 80, 20, 0.25), 0 14px 30px var(--shadow);
}

/* ===== INTRO ===== */
.intro { padding: 1.5rem 1rem 0; max-width: 820px; margin: 0 auto; }
.intro-card { padding: 1.8rem 1.8rem 1.6rem; position: relative; }
.intro-card p { font-size: 1.12rem; line-height: 1.6; margin: 0; }
.intro-mark {
  width: 46px; height: 46px;
  color: var(--blue);
  position: absolute;
  top: -23px; left: 50%;
  transform: translateX(-50%);
  background: var(--parchment);
  border: 2px solid #b89a5e;
  border-radius: 50%;
  padding: 5px;
  box-shadow: 0 6px 14px var(--shadow);
}
.intro-card .section-title { text-align: center; margin-top: 0.6rem; }

/* ===== CALENDAR ===== */
.calendar { max-width: 920px; margin: 0 auto; padding: 2.5rem 1rem 1rem; }

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 1.8rem;
}
/* chip a forma di "tag bagaglio" col foro della corda */
.chip {
  font-family: "Cinzel", serif;
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.3px;
  cursor: pointer;
  color: var(--ink);
  padding: 0.42rem 0.95rem 0.42rem 1.5rem;
  position: relative;
  background: linear-gradient(180deg, #efdcb0, #d8bf8c);
  border: 2px solid #9c7e44;
  /* angolo tagliato in alto a sinistra → forma etichetta */
  clip-path: polygon(14px 0, 100% 0, 100% 100%, 0 100%, 0 14px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 4px 10px rgba(0,0,0,.3);
  transition: transform .12s ease, filter .12s ease;
}
/* foro per la corda */
.chip::before {
  content: "";
  position: absolute;
  left: 7px; top: 7px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--blue-deep);
  box-shadow: inset 0 1px 1px rgba(0,0,0,.6);
}
.chip:hover { transform: translateY(-2px); filter: brightness(1.04); }
.chip.is-active {
  background: linear-gradient(180deg, var(--blue), var(--blue-deep));
  color: var(--gold-soft);
  border-color: var(--gold);
}
.chip.is-active::before { background: var(--gold); }

/* timeline */
.timeline { position: relative; }
.timeline::before {
  content: "";
  position: absolute;
  left: 26px; top: 8px; bottom: 8px;
  width: 4px;
  background: repeating-linear-gradient(180deg, var(--gold) 0 10px, transparent 10px 20px);
  border-radius: 4px;
}

.event {
  position: relative;
  margin: 0 0 1.1rem 0;
  padding-left: 64px;
}
/* logo Giochi VLE sulla timeline */
.event-dot {
  position: absolute;
  left: -4px; top: 8px;
  width: 68px; height: 68px;
  display: grid;
  place-items: center;
}
.event-dot img {
  width: 100%; height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 2px 3px rgba(0,0,0,.45));
}

.event-card {
  padding: 1rem 1.2rem;
  cursor: default;
}
.event-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.6rem;
  margin-bottom: 0.4rem;
}
.event-date {
  font-family: "Cinzel", serif;
  font-weight: 900;
  font-size: 1.15rem;
  color: var(--red);
}
.event-day {
  font-style: italic;
  color: #5a4a2a;
  text-transform: capitalize;
}
.event-place {
  margin-left: auto;
  font-size: 0.8rem;
  font-family: "Cinzel", serif;
  font-weight: 700;
  background: var(--blue);
  color: #fff;
  padding: 0.25rem 0.7rem;
  border-radius: 20px;
  white-space: nowrap;
}
.event-games {
  list-style: none;
  margin: 0.4rem 0 0;
  padding: 0;
}
.event-games li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.36rem 0;
  font-size: 1.05rem;
  border-top: 1px dashed rgba(120, 80, 20, 0.3);
}
.event-games li:first-child { border-top: none; }
.event-games .bullet {
  flex: 0 0 auto;
  width: 18px; height: 18px;
  color: var(--blue);
}
.event-time {
  flex: 0 0 auto;
  font-family: "Cinzel", serif;
  font-weight: 700;
  font-size: 0.78rem;
  color: #fff;
  background: var(--red);
  padding: 0.12rem 0.5rem;
  border-radius: 14px;
  min-width: 48px;
  text-align: center;
}

/* ===== MAP ===== */
.map-section { max-width: 1000px; margin: 0 auto; padding: 2.5rem 1rem 1rem; text-align: center; }
.map-caption { color: #cfe0f7; margin-top: -0.6rem; margin-bottom: 1.4rem; }
.map-frame {
  display: block;
  border: 6px solid var(--gold);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 18px 40px var(--shadow);
  transition: transform 0.2s ease;
}
.map-frame:hover { transform: scale(1.01); }
.map-frame img { display: block; width: 100%; height: auto; }

/* ===== SPONSOR ===== */
.sponsors {
  max-width: 1000px;
  margin: 0 auto;
  padding: 3rem 1rem 1rem;
  text-align: center;
}

.sponsor-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 2.2rem;
}
.sponsor-label {
  font-family: "Cinzel", serif;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-size: 0.85rem;
  color: var(--gold-soft);
  padding: 0.3rem 1.1rem;
  border: 1px solid rgba(242, 182, 0, 0.5);
  border-radius: 20px;
  background: rgba(242, 182, 0, 0.08);
}

.sponsor-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  text-decoration: none;
  background: linear-gradient(160deg, var(--parchment), var(--parchment-dark));
  border: 2px solid #b89a5e;
  border-radius: 12px;
  box-shadow: inset 0 0 18px rgba(120, 80, 20, 0.18), 0 8px 20px var(--shadow);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.sponsor-card:hover { transform: translateY(-4px); box-shadow: inset 0 0 18px rgba(120,80,20,.18), 0 14px 28px var(--shadow); }
.sponsor-card img { display: block; width: 100%; height: auto; object-fit: contain; }

.sponsor-name {
  font-family: "Cinzel", serif;
  font-weight: 700;
  font-size: 0.78rem;
  line-height: 1.15;
  letter-spacing: 0.3px;
  color: var(--blue-deep);
  text-align: center;
}
.sponsor-name--big { font-size: 1.1rem; }
.sponsor-card--text { justify-content: center; }

.sponsor-card--main {
  width: min(300px, 78vw);
  padding: 1.2rem 1.6rem;
  border-color: var(--gold);
  border-width: 3px;
  box-shadow: inset 0 0 20px rgba(120,80,20,.2), 0 0 0 4px rgba(242,182,0,.18), 0 12px 30px var(--shadow);
}
.sponsor-card--main img { max-height: 70px; width: auto; max-width: 100%; }

.sponsor-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.1rem;
}
.sponsor-grid .sponsor-card {
  width: 160px;
  min-height: 130px;
  padding: 0.9rem 1rem 0.8rem;
}
.sponsor-grid .sponsor-card img { max-height: 66px; width: auto; max-width: 100%; }

@media (max-width: 520px) {
  .sponsor-grid .sponsor-card { width: 140px; min-height: 120px; }
}

/* ===== FOOTER ===== */
.footer {
  text-align: center;
  padding: 3rem 1rem 2.5rem;
  margin-top: 2rem;
  color: #dbe7fa;
}
.footer-logo { width: 150px; height: auto; margin-bottom: 0.6rem; filter: drop-shadow(0 8px 16px rgba(0,0,0,.5)); }
.footer p { margin: 0.2rem 0; font-family: "Cinzel", serif; letter-spacing: 1px; }
.footer-motto { display: inline-flex; align-items: center; gap: 0.6rem; }
.footer-ico { width: 20px; height: 20px; color: var(--gold-soft); }
.footer-small { font-size: 0.85rem; opacity: 0.7; font-style: italic; }

/* social */
.socials { display: inline-flex; gap: 1rem; margin: 0.4rem 0 1rem; }
.social {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%;
  color: #0c1a33; background: var(--gold-soft, #e9c46a);
  box-shadow: 0 6px 14px rgba(0,0,0,.4);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.social:hover { transform: translateY(-3px); box-shadow: 0 10px 20px rgba(0,0,0,.5); }
.social svg { width: 20px; height: 20px; }

/* patrocinio */
.patronage {
  display: flex; flex-direction: column; align-items: center; gap: 0.4rem;
  margin-top: 2.2rem; padding-top: 1.6rem;
  border-top: 1px solid rgba(233,196,106,.3);
}
.patronage-label { font-family: "Cinzel", serif; letter-spacing: 1px; font-size: 0.8rem; opacity: 0.8; }
.patronage-logo { width: 64px; height: auto; filter: drop-shadow(0 6px 12px rgba(0,0,0,.45)); }
.patronage-name { font-family: "Cinzel", serif; letter-spacing: 1px; font-size: 0.9rem; }

/* ===== REVEAL ANIMATION ===== */
.event { opacity: 0; transform: translateX(-18px); transition: opacity 0.5s ease, transform 0.5s ease; }
.event.is-visible { opacity: 1; transform: translateX(0); }

@media (max-width: 520px) {
  .event-place { margin-left: 0; }
}
