@font-face {
  font-family: 'Papyrus';
  src: url('fonts/Papyrus-Regular.woff2') format('woff2'),
       url('fonts/Papyrus-Regular.woff') format('woff'),
       url('fonts/Papyrus-Regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  --verde: #1f4d2e;
  --verde-scuro: #0f3a1f;
  --verde-chiaro: #2f6b42;
  --verde-pale: #e8f0ea;
  --oro: #c9a14a;
  --crema: #f7f7f1;
  --testo: #1b1f24;
  --muted: #5b6470;
  --bordo: #e5e7eb;
  --bianco: #ffffff;
  --ombra-sm: 0 2px 8px rgba(0,0,0,0.06);
  --ombra-md: 0 6px 24px rgba(0,0,0,0.10);
  --ombra-lg: 0 12px 40px rgba(0,0,0,0.14);
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 20px;
  --max: 1200px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  color: var(--testo);
  background: var(--crema);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, video { display: block; max-width: 100%; height: auto; }

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

.papyrus { font-family: 'Papyrus', 'Papyrus Std', fantasy; }
.center { text-align: center; }
.muted { color: var(--muted); }

/* NAV */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(15, 58, 31, 0.96);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  color: white;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 14px 20px;
  display: flex; align-items: center; gap: 24px;
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  color: white; text-decoration: none;
  font-family: 'Papyrus', fantasy;
  font-size: 1.25rem;
  margin-right: auto;
  letter-spacing: 0.3px;
}
.nav-logo img { height: 34px; width: auto; }
.nav-logo small {
  display: block;
  font-family: -apple-system, sans-serif;
  font-size: 0.7rem;
  color: var(--oro);
  letter-spacing: 1px;
  font-weight: 600;
  margin-top: 2px;
}
.nav-links { display: flex; gap: 6px; flex-wrap: wrap; }
.nav-links a {
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: var(--r-sm);
  transition: background-color .15s, color .15s;
}
.nav-links a:hover { background: rgba(255,255,255,0.1); color: white; }
.nav-cta {
  background: var(--oro);
  color: var(--verde-scuro) !important;
  font-weight: 700 !important;
}
.nav-cta:hover { background: #d6b25c; }

.nav-toggle {
  display: none;
  background: transparent; border: 1px solid rgba(255,255,255,0.3);
  color: white; padding: 8px 12px;
  border-radius: var(--r-sm);
  cursor: pointer;
  font-size: 1.1rem;
}

@media (max-width: 920px) {
  .nav-toggle { display: inline-block; }
  .nav-links {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column;
    background: var(--verde-scuro);
    padding: 12px 20px 20px;
    gap: 2px;
    border-top: 1px solid rgba(255,255,255,0.1);
    box-shadow: var(--ombra-md);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px; font-size: 1rem; }
}

/* HERO */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex; align-items: center;
  padding: 60px 24px 80px;
  color: white;
  overflow: hidden;
  isolation: isolate;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 20% 80%, rgba(201,161,74,0.18) 0%, transparent 55%),
    linear-gradient(135deg, #0a2b16 0%, #1f4d2e 55%, #2f6b42 100%);
  z-index: -2;
}
.hero::after {
  content: '';
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='600' height='600'><defs><pattern id='dots' x='0' y='0' width='40' height='40' patternUnits='userSpaceOnUse'><circle cx='2' cy='2' r='1' fill='%23ffffff' opacity='0.06'/></pattern></defs><rect width='600' height='600' fill='url(%23dots)'/></svg>");
  z-index: -1;
  pointer-events: none;
}
.hero-grid {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 60px;
  align-items: center;
  width: 100%;
}
.hero-text { max-width: 600px; }
.hero-badge {
  display: inline-block;
  background: var(--oro);
  color: var(--verde-scuro);
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 2.5px;
  padding: 7px 16px;
  border-radius: 100px;
  margin-bottom: 22px;
  text-transform: uppercase;
}
.hero h1 {
  font-family: 'Papyrus', fantasy;
  font-size: clamp(2.8rem, 7.5vw, 5.6rem);
  margin: 0 0 24px;
  line-height: 1;
  font-weight: 400;
  letter-spacing: -1px;
}
.hero h1 .accent {
  color: var(--oro);
  display: block;
  font-style: italic;
}
.hero-meta {
  display: flex;
  gap: 36px;
  margin: 30px 0 24px;
  padding: 20px 0;
  border-top: 1px solid rgba(255,255,255,0.18);
  border-bottom: 1px solid rgba(255,255,255,0.18);
  flex-wrap: wrap;
}
.hero-meta-item { display: flex; flex-direction: column; gap: 4px; }
.hero-meta-item .label {
  font-size: 0.72rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--oro);
  font-weight: 700;
}
.hero-meta-item .value {
  font-size: 1.1rem;
  font-weight: 600;
}
.hero .tagline {
  font-style: italic;
  font-family: 'Papyrus', fantasy;
  font-size: clamp(1.1rem, 2.2vw, 1.35rem);
  opacity: 0.92;
  margin: 0 0 32px;
  line-height: 1.4;
  border-left: 3px solid var(--oro);
  padding-left: 18px;
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.hero-locandina {
  display: flex; justify-content: center;
}
.hero-locandina a {
  display: block;
  max-width: 360px;
  width: 100%;
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.1);
  transform: rotate(-2deg);
  transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s;
}
.hero-locandina a:hover {
  transform: rotate(0deg) scale(1.03);
  box-shadow: 0 40px 100px rgba(0,0,0,0.55);
}
.hero-locandina img {
  width: 100%;
  display: block;
}
.hero-scroll {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-size: 1.4rem;
  width: 44px; height: 44px;
  border: 1.5px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  animation: bob 2.4s ease-in-out infinite;
  z-index: 1;
}
.hero-scroll:hover { color: white; border-color: var(--oro); }
@keyframes bob {
  0%,100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

@media (max-width: 880px) {
  .hero { min-height: auto; padding-top: 40px; padding-bottom: 60px; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; text-align: center; }
  .hero-text { max-width: none; margin: 0 auto; }
  .hero-meta { justify-content: center; gap: 24px; }
  .hero .tagline { border-left: none; border-top: 2px solid var(--oro); padding-left: 0; padding-top: 14px; text-align: center; }
  .hero-cta { justify-content: center; }
  .hero-locandina a { max-width: 280px; transform: rotate(0); }
  .hero-scroll { display: none; }
}

/* HIGHLIGHTS */
.highlights {
  max-width: var(--max);
  margin: -50px auto 0;
  padding: 0 20px;
  position: relative;
  z-index: 5;
}
.highlights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}
.highlight {
  background: white;
  border-radius: var(--r-md);
  padding: 28px 24px;
  box-shadow: var(--ombra-md);
  text-align: center;
  border-bottom: 3px solid var(--oro);
  transition: transform .2s, box-shadow .2s;
}
.highlight:hover { transform: translateY(-4px); box-shadow: var(--ombra-lg); }
.highlight .icon {
  font-size: 2rem;
  margin-bottom: 10px;
  display: block;
}
.highlight h3 {
  font-family: 'Papyrus', fantasy;
  font-weight: 400;
  font-size: 1.2rem;
  color: var(--verde-scuro);
  margin: 0 0 8px;
}
.highlight p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.55;
}

/* MATERIALI */
.materiali-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 20px;
}
@media (max-width: 700px) { .materiali-grid { grid-template-columns: 1fr; } }
.materiale {
  display: block;
  position: relative;
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: var(--ombra-md);
  background: white;
  transition: transform .25s, box-shadow .25s;
  text-decoration: none;
  color: white;
  aspect-ratio: 1.414 / 1;
}
.materiale:hover { transform: translateY(-4px); box-shadow: var(--ombra-lg); }
.materiale img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s;
}
.materiale:hover img { transform: scale(1.04); }
.materiale span {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 30px 20px 20px;
  background: linear-gradient(180deg, transparent 0%, rgba(15,58,31,0.92) 100%);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.5px;
}
.btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 100px;
  font-weight: 700;
  text-decoration: none;
  font-size: 1rem;
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s;
  border: 2px solid transparent;
  cursor: pointer;
  font-family: inherit;
}
.btn-primary {
  background: var(--oro);
  color: var(--verde-scuro);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--ombra-md); }
.btn-outline {
  background: transparent;
  color: white;
  border-color: rgba(255,255,255,0.6);
}
.btn-outline:hover { background: white; color: var(--verde-scuro); }
.btn-verde {
  background: var(--verde);
  color: white;
}
.btn-verde:hover { background: var(--verde-scuro); transform: translateY(-2px); }

/* SECTIONS */
section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 90px 20px 40px;
}
section.alt {
  max-width: none;
  background: var(--verde-pale);
  padding-left: 0; padding-right: 0;
}
section.alt > .inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 20px;
}
section h2 {
  font-family: 'Papyrus', fantasy;
  font-size: clamp(2rem, 5vw, 3rem);
  color: var(--verde-scuro);
  margin: 0 0 8px;
  text-align: center;
  font-weight: 400;
  line-height: 1.1;
}
section h2::after {
  content: '';
  display: block;
  width: 60px; height: 3px;
  background: var(--oro);
  margin: 16px auto 0;
  border-radius: 2px;
}
section .lead {
  text-align: center;
  max-width: 720px;
  margin: 20px auto 40px;
  font-size: 1.1rem;
  color: var(--muted);
}

/* TORNEI CARDS */
.tornei {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 32px;
}
.torneo {
  background: white;
  border-radius: var(--r-md);
  padding: 32px 28px;
  box-shadow: var(--ombra-sm);
  border-top: 4px solid var(--verde);
  display: flex; flex-direction: column;
  transition: transform .2s, box-shadow .2s;
}
.torneo:hover { transform: translateY(-4px); box-shadow: var(--ombra-md); }
.torneo .when {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--oro);
  text-transform: uppercase;
  margin-bottom: 8px;
}
.torneo h3 {
  font-family: 'Papyrus', fantasy;
  font-weight: 400;
  font-size: 1.6rem;
  color: var(--verde-scuro);
  margin: 0 0 16px;
  line-height: 1.2;
}
.torneo ul {
  list-style: none;
  padding: 0;
  margin: 0 0 18px;
}
.torneo li {
  padding: 6px 0;
  font-size: 0.95rem;
  border-bottom: 1px dashed var(--bordo);
}
.torneo li:last-child { border-bottom: none; }
.torneo li strong { color: var(--verde-scuro); }
.torneo .price {
  margin-top: auto;
  padding-top: 18px;
  border-top: 2px solid var(--verde-pale);
  font-weight: 700;
  color: var(--verde-scuro);
  font-size: 1.05rem;
}
.torneo .price small { display: block; font-weight: 400; color: var(--muted); font-size: 0.85rem; margin-top: 4px; }

/* SEDE / HOTEL */
.sede-hotel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: stretch;
  margin-top: 30px;
}
@media (max-width: 800px) { .sede-hotel { grid-template-columns: 1fr; } }
.sede-hotel .box {
  background: white;
  border-radius: var(--r-md);
  padding: 28px;
  box-shadow: var(--ombra-sm);
}
.sede-hotel .box h3 {
  font-family: 'Papyrus', fantasy;
  font-weight: 400;
  font-size: 1.5rem;
  color: var(--verde-scuro);
  margin: 0 0 8px;
}
.sede-hotel address {
  font-style: normal;
  font-size: 1.05rem;
  line-height: 1.7;
  margin: 12px 0;
}
.sede-hotel .map-link {
  display: inline-block;
  margin-top: 8px;
  font-size: 0.95rem;
  color: var(--verde);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px dashed var(--verde);
}
.sede-hotel .map-link:hover { color: var(--verde-scuro); }
.prezzi-hotel {
  list-style: none;
  padding: 0;
  margin: 14px 0 0;
}
.prezzi-hotel li {
  display: flex; justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px dashed var(--bordo);
  font-size: 0.97rem;
}
.prezzi-hotel li:last-child { border-bottom: none; }
.prezzi-hotel li strong { color: var(--verde-scuro); }

/* MONTEPREMI */
.montepremi {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin-top: 30px;
}
.girone {
  background: white;
  border-radius: var(--r-md);
  padding: 24px 22px;
  box-shadow: var(--ombra-sm);
  text-align: center;
}
.girone h4 {
  margin: 0 0 12px;
  font-family: 'Papyrus', fantasy;
  font-weight: 400;
  font-size: 1.4rem;
  color: var(--verde-scuro);
}
.girone ol {
  list-style: none; padding: 0; margin: 0;
  font-size: 0.95rem;
}
.girone ol li {
  display: flex; justify-content: space-between;
  padding: 6px 8px;
  border-bottom: 1px dashed var(--bordo);
}
.girone ol li:last-child { border-bottom: none; }
.girone .pos { color: var(--muted); font-weight: 600; }
.girone .euro { color: var(--verde-scuro); font-weight: 700; }
.girone .pos.gold { color: var(--oro); }
.montepremi-nota {
  margin-top: 24px;
  font-size: 0.9rem;
  color: var(--muted);
  text-align: center;
  max-width: 700px;
  margin-left: auto; margin-right: auto;
}

/* ISCRIZIONI / CONTATTI */
.contatti-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-top: 30px;
  max-width: 900px;
  margin-left: auto; margin-right: auto;
}
.contatto {
  background: white;
  border-radius: var(--r-md);
  padding: 24px;
  text-align: center;
  box-shadow: var(--ombra-sm);
  transition: transform .2s, box-shadow .2s;
}
.contatto:hover { transform: translateY(-3px); box-shadow: var(--ombra-md); }
.contatto .name {
  font-family: 'Papyrus', fantasy;
  font-size: 1.4rem;
  color: var(--verde-scuro);
  margin: 0 0 6px;
}
.contatto .role { color: var(--muted); font-size: 0.85rem; margin-bottom: 14px; }
.contatto a {
  display: inline-block;
  text-decoration: none;
  background: var(--verde);
  color: white;
  padding: 10px 18px;
  border-radius: 100px;
  font-weight: 700;
  font-size: 0.95rem;
  transition: background-color .15s;
}
.contatto a:hover { background: var(--verde-scuro); }

/* DIREZIONE GARA */
.direzione {
  background: white;
  border-radius: var(--r-md);
  padding: 24px;
  box-shadow: var(--ombra-sm);
  text-align: center;
  margin-top: 30px;
}
.direzione h3 {
  margin: 0 0 14px;
  font-family: 'Papyrus', fantasy;
  font-weight: 400;
  font-size: 1.4rem;
  color: var(--verde-scuro);
}
.direzione .names {
  display: flex; flex-wrap: wrap; gap: 12px 30px; justify-content: center;
  font-size: 1.05rem;
}
.direzione .names span { font-weight: 600; color: var(--verde-scuro); }

/* GALLERY */
.grid-foto {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}
.grid-foto a {
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--r-sm);
  background: var(--verde-pale);
}
.grid-foto img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.grid-foto a:hover img { transform: scale(1.08); }

/* LIGHTBOX */
dialog.lightbox {
  border: none;
  background: transparent;
  padding: 0;
  max-width: 96vw;
  max-height: 96vh;
}
dialog.lightbox::backdrop { background: rgba(0,0,0,0.9); }
dialog.lightbox img {
  max-width: 96vw;
  max-height: 92vh;
  border-radius: var(--r-sm);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
dialog.lightbox button.close {
  position: fixed; top: 18px; right: 22px;
  background: rgba(0,0,0,0.5); color: white;
  border: 1px solid rgba(255,255,255,0.4);
  width: 44px; height: 44px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.4rem;
  display: flex; align-items: center; justify-content: center;
}

/* PARTNERS / ENTI */
.enti {
  display: flex; gap: 30px; align-items: center; justify-content: center; flex-wrap: wrap;
  margin: 40px auto 0;
  padding: 30px 20px;
  background: var(--bianco);
  border-radius: var(--r-md);
  box-shadow: var(--ombra-sm);
  max-width: 800px;
}
.enti span {
  font-family: 'Papyrus', fantasy;
  color: var(--verde-scuro);
  font-size: 1.05rem;
  letter-spacing: 0.5px;
}
.enti a {
  font-weight: 700;
  text-decoration: none;
  color: var(--verde);
  padding: 6px 14px;
  border: 1.5px solid var(--verde);
  border-radius: 100px;
  font-size: 0.92rem;
  transition: background-color .15s, color .15s;
}
.enti a:hover { background: var(--verde); color: white; }
.ente-text {
  font-family: -apple-system, sans-serif !important;
  color: var(--muted) !important;
  font-size: 0.95rem;
  font-style: italic;
}

/* FOOTER */
footer {
  background: var(--verde-scuro);
  color: rgba(255,255,255,0.85);
  padding: 50px 20px 30px;
  margin-top: 80px;
}
footer .inner {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
}
@media (max-width: 760px) { footer .inner { grid-template-columns: 1fr; gap: 28px; } }
footer h4 {
  font-family: 'Papyrus', fantasy;
  font-weight: 400;
  font-size: 1.2rem;
  color: var(--oro);
  margin: 0 0 14px;
}
footer a { color: rgba(255,255,255,0.85); text-decoration: none; transition: color .15s; }
footer a:hover { color: var(--oro); }
footer ul { list-style: none; padding: 0; margin: 0; }
footer ul li { padding: 4px 0; font-size: 0.95rem; }
footer .copyright {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
  text-align: center;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.55);
}

/* Small util */
.tag {
  display: inline-block;
  background: var(--verde-pale);
  color: var(--verde-scuro);
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}
