/* PulciNellaMente — foglio di stile comune a tutte le pagine */
:root {
  --bg: #FBFAF7;
  --surface: #FFFFFF;
  --ink: #1F2547;
  --muted: #5A5F78;
  --line: #E6E3DC;
  --accent: #C9561A;        /* arancio scuro: pulsanti e link (contrasto AA su bianco) */
  --accent-soft: #E8772E;   /* arancio della locandina XXVII */
  --sun: #F6C343;           /* giallo della locandina XXVII */
  --radius: 18px;
  --shadow: 0 1px 2px rgba(31,37,71,.06), 0 8px 24px rgba(31,37,71,.06);
  --head: 'League Spartan', 'Helvetica Neue', Arial, sans-serif;
  --body: 'Inter', 'Helvetica Neue', Arial, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
}

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

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

h1, h2, h3, h4 {
  font-family: var(--head);
  line-height: 1.05;
  margin: 0;
  color: var(--ink);
}

.wrap { width: min(1120px, 100% - 40px); margin-inline: auto; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 10px;
}
.logo img { height: 56px; width: auto; }

.nav {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav::-webkit-scrollbar { display: none; }
.nav a {
  flex: none;
  padding: 10px 14px;
  border-radius: 999px;
  font-family: var(--head);
  font-weight: 600;
  font-size: 17px;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.nav a:hover { background: #F3F1EC; }
.nav a[aria-current="page"] { background: var(--ink); color: #fff; }

/* ---------- Sezioni generiche ---------- */
main { padding-bottom: 64px; }
.section { padding-block: 48px; }
.kicker {
  font-family: var(--head);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 10px;
}
.page-title { font-size: clamp(38px, 7vw, 64px); font-weight: 800; letter-spacing: -.01em; }
.section-title { font-size: clamp(28px, 5vw, 40px); font-weight: 800; margin-bottom: 20px; }
.lead { font-size: 19px; color: var(--muted); }

/* ---------- Home: hero ---------- */
.hero { padding-block: 36px 24px; }
.hero-grid {
  display: grid;
  gap: 32px;
  align-items: start;
}
.hero h1 {
  font-size: clamp(34px, 10vw, 68px);
  font-weight: 900;
  letter-spacing: -.02em;
}
.hero h1 .num { color: var(--accent-soft); }
.hero h1 .pre { display: block; font-size: .45em; font-weight: 800; letter-spacing: 0; margin-bottom: .12em; }
.hero .sub { font-family: var(--head); font-size: clamp(22px, 4.5vw, 30px); font-weight: 600; margin: 8px 0 18px; }
.meta { display: flex; flex-wrap: wrap; gap: 8px 18px; font-weight: 600; color: var(--muted); margin-bottom: 20px; }

.badge {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  padding: 12px 20px 10px;
  border-radius: 14px;
  background: var(--ink);
  color: #fff;
  font-family: var(--head);
}
.badge strong { font-size: 24px; font-weight: 800; text-transform: uppercase; }
.badge span { font-size: 17px; font-weight: 500; }

.poster {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--surface);
}

/* ---------- Home: sezioni del bando ---------- */
.sections { display: grid; gap: 14px; margin-top: 28px; }
.sec {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: var(--ink);
  min-height: 44px;
  transition: transform .15s ease, border-color .15s ease;
}
.sec:hover { color: var(--ink); border-color: var(--ink); transform: translateY(-2px); }
.sec .letter {
  width: 56px; height: 56px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--head); font-weight: 900; font-size: 30px;
  padding-top: 4px;
}
.sec:nth-child(1) .letter { background: var(--accent-soft); color: #fff; }
.sec:nth-child(2) .letter { background: var(--sun); color: var(--ink); }
.sec:nth-child(3) .letter { background: var(--ink); color: #fff; }
.sec .name { font-family: var(--head); font-weight: 800; font-size: 22px; line-height: 1.1; }
.sec .desc { font-size: 15px; color: var(--muted); line-height: 1.35; margin-top: 2px; }
.sec .dl {
  font-family: var(--head); font-weight: 700; font-size: 14px;
  color: var(--accent); white-space: nowrap;
}

.howto {
  margin-top: 18px;
  padding: 16px 18px;
  border-radius: var(--radius);
  background: #FFF6E3;
  border: 1px solid #F3DFB0;
  font-size: 16px;
}

.prose p { margin: 0 0 1em; }
.prose { max-width: 68ch; font-size: 18px; }

/* ---------- Video sponsor ---------- */
.video-box {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #000;
  max-width: 900px;
  margin-inline: auto;
}
.video-box video { width: 100%; }

/* ---------- Card generiche ---------- */
.grid { display: grid; gap: 16px; }
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
}
.card h3 { font-size: 22px; font-weight: 800; margin-bottom: 8px; }
.card p { margin: 0; }

/* Contatti */
.contact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.contact-list a { font-weight: 600; word-break: break-word; }
.person { display: flex; gap: 16px; align-items: center; }
.person img { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; flex: none; }
.person .role { color: var(--muted); font-size: 15px; margin-bottom: 4px; }
.map img { border-radius: 12px; margin-top: 12px; }

/* Sponsor */
.sponsor-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.sponsor-grid .card {
  padding: 18px;
  display: grid; place-items: center;
  aspect-ratio: 4 / 3;
  background: #fff;
}
.sponsor-grid img { max-height: 100%; width: auto; object-fit: contain; }

/* Vincitori */
.award-group { margin-top: 44px; }
.award-grid { display: grid; gap: 16px; }
.award {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex; flex-direction: column;
}
.award img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; background: #fff; }
.award .body { padding: 16px 18px 20px; }
.award .title {
  font-family: var(--head); font-weight: 700; font-size: 14px;
  letter-spacing: .1em; text-transform: uppercase; color: var(--accent);
  margin-bottom: 6px;
}
.award .opera { font-family: var(--head); font-weight: 800; font-size: 21px; line-height: 1.15; }
.award .school { color: var(--muted); font-size: 15px; margin-top: 6px; line-height: 1.4; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: #D9DBE6;
  padding-block: 36px;
  font-size: 15px;
}
.site-footer a { color: #fff; }
.site-footer .wrap { display: grid; gap: 18px; }
.site-footer img { height: 48px; width: auto; background: #fff; border-radius: 10px; padding: 6px 10px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 20px; }

/* ---------- Tablet / desktop ---------- */
@media (min-width: 720px) {
  .logo img { height: 68px; }
  .sponsor-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .award-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .site-footer .wrap { grid-template-columns: auto 1fr auto; align-items: center; }
}

@media (min-width: 960px) {
  .hero { padding-block: 64px 32px; }
  .hero-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 56px; }
  .hero-grid .poster { position: sticky; top: 110px; }
  .award-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sponsor-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* Telefoni piccoli: header su due righe */
@media (max-width: 560px) {
  .site-header .wrap { flex-direction: column; align-items: stretch; gap: 6px; padding-block: 8px 6px; }
  .logo { align-self: center; }
  .logo img { height: 48px; }
  .nav { flex-wrap: wrap; justify-content: center; overflow: visible; gap: 2px; }
  .nav a { font-size: 16px; padding: 9px 12px; }
  .sec { grid-template-columns: 48px minmax(0, 1fr); }
  .sec .letter { width: 48px; height: 48px; font-size: 26px; }
  .sec .dl { grid-column: 2; }
}
