@font-face { font-family: "Gochi Hand"; src: url("/assets/fonts/gochi-hand-latin-400-normal.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Figtree"; src: url("/assets/fonts/figtree-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("/assets/fonts/figtree-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("/assets/fonts/figtree-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }

:root {
  --ink: #1f2a36;
  --gold: #a8834e;
  --gold-soft: #efe4d3;
  --gold-text: #7d5f34;
  --bg: #f4f4f1;
  --muted: #59626c;
  --line: #e2e2dc;
  --pill: #e8e8e3;
  --ease: cubic-bezier(.16, 1, .3, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.0625rem/1.55 "Figtree", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  scrollbar-color: #c9c9c2 var(--bg);
}
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image: radial-gradient(#d6d6cf 1.1px, transparent 1.2px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 35%, #000 30%, transparent 85%);
          mask-image: radial-gradient(ellipse 70% 60% at 50% 35%, #000 30%, transparent 85%);
}
::selection { background: var(--gold-soft); color: var(--ink); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; border-radius: 8px; }
a { color: inherit; }

.hand { font-family: "Gochi Hand", "Comic Sans MS", cursive; font-weight: 400; }

.top { display: flex; justify-content: center; padding: 28px 20px 0; }
.logo img { display: block; height: 34px; width: auto; }

/* hero */
.hero { max-width: 1040px; margin: 0 auto; padding: clamp(56px, 10vh, 110px) 20px 40px; text-align: center; }
.hero h1 {
  margin: 0 auto;
  font-size: clamp(2.3rem, 5.2vw, 3.6rem);
  line-height: 1.08;
  letter-spacing: .01em;
  color: #3a434d;
  transform: rotate(-3deg);
}

.tiles {
  list-style: none; margin: clamp(64px, 11vh, 110px) auto 0; padding: 0;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 40px 24px; max-width: 1000px;
}
.tile { flex: 0 0 168px; }
.tile a { display: flex; flex-direction: column; align-items: center; gap: 22px; text-decoration: none; position: relative; }
.icon {
  display: block; width: 116px; height: 116px; border-radius: 30px; overflow: hidden;
  background: #fff; border: 4px solid #fff;
  box-shadow: 0 1px 2px rgba(31,42,54,.08), 0 10px 24px -8px rgba(31,42,54,.28);
  transform: rotate(var(--tilt));
  animation: galleggia 6s ease-in-out var(--d) infinite;
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}
.icon img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: var(--o, 50% 50%); transform: scale(var(--z, 1)); transform-origin: var(--o, 50% 50%); border-radius: 25px; }
.pill {
  display: inline-block; padding: 7px 16px; border-radius: 999px;
  background: var(--pill); font-weight: 500; font-size: .95rem; color: var(--ink);
  transition: background .3s, color .3s;
}
.note {
  position: absolute; top: -40px; left: 50%; white-space: nowrap;
  font-size: 1.2rem; color: var(--gold-text);
  opacity: 0; transform: translate(-50%, 6px) rotate(-4deg);
  transition: opacity .35s var(--ease), transform .45s var(--ease);
  pointer-events: none;
}
.tile a:hover .icon, .tile a:focus-visible .icon {
  animation-play-state: paused;
  transform: rotate(0deg) translateY(-8px) scale(1.07);
  box-shadow: 0 2px 4px rgba(31,42,54,.08), 0 22px 36px -12px rgba(31,42,54,.35);
}
.tile a:hover .pill, .tile a:focus-visible .pill { background: var(--ink); color: #fff; }
.tile a:hover .note, .tile a:focus-visible .note { opacity: 1; transform: translate(-50%, 0) rotate(-4deg); }
.tile a:focus-visible { outline: none; }

@keyframes galleggia {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -5px; }
}

.intro { max-width: 34rem; margin: clamp(60px, 10vh, 96px) auto 0; color: var(--muted); font-size: 1.125rem; text-wrap: pretty; }

.icon svg { display: block; width: 100%; height: 100%; border-radius: 25px; }
.wordmark { font-size: 1.9rem; text-decoration: none; color: #3a434d; transform: rotate(-2deg); display: inline-block; }
.wordmark span { color: var(--gold-text); }

/* sponsor */
.sponsor { max-width: 640px; margin: clamp(64px, 10vh, 100px) auto 0; padding: 0 20px; text-align: center; }
.sponsor-card {
  display: flex; align-items: center; gap: 18px; text-align: left; text-decoration: none;
  background: #fff; border-radius: 26px; padding: 16px 22px 16px 16px;
  box-shadow: 0 1px 2px rgba(31,42,54,.06), 0 12px 28px -14px rgba(31,42,54,.25);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
.sponsor-card:hover { transform: translateY(-3px) rotate(-.5deg); box-shadow: 0 2px 4px rgba(31,42,54,.08), 0 20px 34px -14px rgba(31,42,54,.32); }
.sponsor-card img { width: 68px; height: 68px; border-radius: 18px; object-fit: cover; object-position: 30% 50%; flex: none; }
.sponsor-card small { display: block; font-size: 1.15rem; color: var(--gold-text); line-height: 1.1; }
.sponsor-card strong { display: block; font-size: 1.15rem; font-weight: 600; }
.sponsor-card em { display: block; font-style: normal; color: var(--muted); font-size: .95rem; }
.sponsor-card .vai { margin-left: auto; flex: none; padding: 9px 16px; border-radius: 999px; background: var(--ink); color: #fff; font-weight: 500; font-size: .9rem; }

/* pagine interne */
.pagina { max-width: 860px; margin: 0 auto; padding: 0 20px; }
.indietro { display: inline-block; margin-top: 8px; color: var(--muted); text-decoration: none; font-weight: 500; }
.indietro:hover { color: var(--ink); }
.testa { text-align: center; padding: clamp(36px, 7vh, 72px) 0 8px; }
.testa h1 { margin: 0; font-size: clamp(2.3rem, 5.2vw, 3.4rem); line-height: 1.08; color: #3a434d; transform: rotate(-3deg); }
.testa p { margin: 26px auto 0; max-width: 34rem; color: var(--muted); text-wrap: pretty; }
.agg { display: inline-block; margin-top: 14px; padding: 5px 14px; border-radius: 999px; background: var(--pill); font-size: .85rem; color: var(--muted); }

.blocco { margin-top: clamp(48px, 8vh, 80px); }
.blocco > h2 { margin: 0 0 20px; font-size: clamp(1.7rem, 3.4vw, 2.1rem); line-height: 1.1; color: #3a434d; transform: rotate(-2deg); text-align: center; }
.blocco > p { color: var(--muted); max-width: 40rem; margin: 0 auto 14px; text-wrap: pretty; }
.carta { background: #fff; border-radius: 24px; box-shadow: 0 1px 2px rgba(31,42,54,.06), 0 12px 28px -16px rgba(31,42,54,.22); }

.numeri { list-style: none; margin: 34px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.numeri li { padding: 18px 12px 16px; text-align: center; }
.numeri b { display: block; font-size: 2rem; font-weight: 600; line-height: 1.1; font-variant-numeric: tabular-nums; }
.numeri span { font-size: .9rem; color: var(--muted); }
.numeri li:nth-child(odd) { transform: rotate(-1deg); }
.numeri li:nth-child(even) { transform: rotate(1deg); }

.tabella { overflow-x: auto; padding: 8px 10px; }
.tabella table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: .95rem; }
.tabella th, .tabella td { padding: 9px 8px; text-align: center; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tabella th { font-weight: 500; color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }
.tabella td:nth-child(2), .tabella th:nth-child(2) { text-align: left; white-space: normal; }
.tabella tr:last-child td { border-bottom: 0; }
.tabella td.pt { font-weight: 600; }
.tabella tr.noi td { background: var(--gold-soft); }
.tabella tr.noi td:first-child { border-radius: 12px 0 0 12px; }
.tabella tr.noi td:last-child { border-radius: 0 12px 12px 0; }
.tabella tr.noi td:nth-child(2) { font-weight: 600; }
.nota { font-size: .85rem; color: var(--muted); text-align: center; margin-top: 12px; }
.nota a { color: var(--gold-text); }

.marcatori { list-style: none; margin: 0 auto; padding: 8px 22px; max-width: 420px; }
.marcatori li { display: flex; justify-content: space-between; padding: 11px 0; border-bottom: 1px solid var(--line); }
.marcatori li:last-child { border-bottom: 0; }
.marcatori b { font-weight: 600; }

.letture { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.letture a { display: block; padding: 16px 20px; text-decoration: none; transition: transform .35s var(--ease); }
.letture a:hover { transform: translateX(4px); }
.letture small { display: block; color: var(--gold-text); font-size: 1.05rem; }
.letture strong { font-weight: 500; }

/* cibo */
.filtri { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 34px 0 0; }
.filtri button {
  font: inherit; font-weight: 500; font-size: .92rem; border: 0; cursor: pointer;
  padding: 8px 16px; border-radius: 999px; background: var(--pill); color: var(--ink);
  transition: background .25s, color .25s, transform .2s var(--ease);
}
.filtri button:hover { background: #dcdcd5; }
.filtri button:active { transform: scale(.96); }
.filtri button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.posti { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.posto { padding: 18px 20px 16px; display: flex; flex-direction: column; gap: 6px; }
.posto[hidden] { display: none; }
.posto h3 { margin: 0; font-size: 1.1rem; font-weight: 600; line-height: 1.25; }
.posto p { margin: 0; color: var(--muted); font-size: .97rem; text-wrap: pretty; }
.posto .dove { align-self: flex-start; font-size: .8rem; font-weight: 500; padding: 3px 11px; border-radius: 999px; background: var(--gold-soft); color: var(--gold-text); }
.posto a { margin-top: auto; padding-top: 6px; font-size: .9rem; font-weight: 500; color: var(--ink); text-decoration-color: var(--gold); text-underline-offset: 4px; }
.vuoto { text-align: center; color: var(--muted); }

.piede { text-align: center; padding: 64px 20px 36px; font-size: .85rem; color: var(--muted); }
.piede p { margin: 0; }
.piede a { color: inherit; }

@media (max-width: 720px) {
  .tiles { row-gap: 56px; column-gap: 8px; max-width: 360px; }
  .tile { flex-basis: 150px; }
  .icon { width: 104px; height: 104px; border-radius: 27px; }
  .icon img, .icon svg { border-radius: 22px; }
  .intro { margin-top: 56px; }
  .numeri { grid-template-columns: repeat(2, 1fr); }
  .posti { grid-template-columns: 1fr; }
  .sponsor-card { flex-wrap: wrap; }
  .sponsor-card .vai { margin-left: 86px; }
  .tabella { padding: 4px; }
  .tabella th, .tabella td { padding: 8px 5px; font-size: .85rem; }
  .tabella .opz { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .icon { animation: none; }
  * { transition-duration: .01ms !important; }
}
