:root {
  --bg: #ECEFF3;
  --card: #FFFFFF;
  --ink: #16263D;
  --muted: #4C5D74;
  --soft-text: #5E7290;
  --line: #D3DCE6;
  --blue: #1F6FB8;
  --blue-dark: #15528A;
  --blue-soft: #DCEBFA;
  --gold: #C9A24A;
  --gold-text: #9C7A2E;
  --gold-ink: #7A5E1F;
  --gold-deep: #5A4718;
  --gold-soft: #F6EDD6;
  --gold-paper: #FBF6EA;
  --danger: #B3261E;
  --shadow: 0 1px 4px rgba(22, 38, 61, 0.06);
  --shadow-lg: 0 2px 10px rgba(22, 38, 61, 0.07);
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.5; }
a { color: var(--blue); }
a:hover { color: var(--blue-dark); }
img { max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 16px; }

/* ---------- Header ---------- */
.top { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 0; }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); }
.brand img { width: 36px; height: auto; display: block; }
.brand-name { font-family: var(--serif); font-size: 25px; font-weight: 700; line-height: 1; }
.brand-name span { color: var(--gold-text); }
.langs { display: flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--card); box-shadow: 0 1px 3px rgba(22, 38, 61, 0.12); }
.langs a { min-width: 40px; min-height: 40px; display: flex; align-items: center; justify-content: center; border-radius: 999px; font-size: 13px; font-weight: 700; text-decoration: none; color: var(--muted); }
.langs a[aria-current="true"] { background: var(--blue); color: #fff; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; margin: 8px 0 20px; padding: 28px 22px; border-radius: 24px; background: var(--card); box-shadow: var(--shadow-lg); }
.hero-fly { position: absolute; right: -34px; top: -14px; width: 140px; height: auto; transform: rotate(10deg); pointer-events: none; }
.kicker { position: relative; max-width: 200px; margin: 0 0 12px; font-size: 12px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--gold-text); }
.hero h1 { position: relative; max-width: 250px; margin: 0 0 14px; font-family: var(--serif); font-size: 40px; line-height: 1.05; font-weight: 700; }
.hero p { position: relative; margin: 0; max-width: 560px; font-size: 15px; line-height: 1.55; color: var(--muted); }
@media (min-width: 720px) {
  .hero { padding: 48px 44px; }
  .hero-fly { width: 260px; right: 20px; top: 10px; }
  .hero h1 { max-width: 560px; font-size: 54px; }
  .kicker { max-width: none; letter-spacing: 3px; }
}

/* ---------- News ---------- */
.news { display: flex; gap: 12px; align-items: center; margin: 0 0 32px; padding: 14px 16px; border-radius: 14px; background: var(--blue); color: #fff; text-decoration: none; }
a.news:hover { color: #fff; background: var(--blue-dark); }
.news-tag { flex: none; font-size: 11px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; background: var(--gold); color: var(--ink); padding: 4px 8px; border-radius: 6px; }
.news-text { font-size: 14px; line-height: 1.4; }

/* ---------- Sections ---------- */
.section { margin: 0 0 36px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 0 0 12px; }
.section-title { margin: 0; font-size: 13px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--blue); }
.grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }

.project { display: flex; gap: 14px; align-items: flex-start; padding: 18px; border-radius: 18px; background: var(--card); box-shadow: var(--shadow); text-decoration: none; color: var(--ink); transition: box-shadow .15s, transform .15s; }
.project:hover { color: var(--ink); box-shadow: 0 4px 16px rgba(22, 38, 61, 0.12); transform: translateY(-1px); }
.icon-box { flex: none; width: 46px; height: 46px; border-radius: 14px; background: var(--blue-soft); color: var(--blue); display: flex; align-items: center; justify-content: center; }
.icon-box.gold { background: var(--gold-soft); color: var(--gold-text); }
.project-body { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 0; }
.project h3 { margin: 0; font-size: 18px; font-weight: 700; line-height: 1.25; }
.project p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--muted); }
.project .tag { font-size: 12px; font-weight: 700; color: var(--blue); }
.project .tag.gold { color: var(--gold-ink); }

.event { display: flex; flex-direction: column; border-radius: 20px; background: var(--card); box-shadow: var(--shadow); overflow: hidden; }
.event-img { height: 180px; background: var(--blue-soft); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.event-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.event-img .ph { width: 110px; height: auto; opacity: .9; }
.event-body { padding: 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { font-size: 12px; padding: 4px 8px; border-radius: 6px; background: var(--blue-soft); color: var(--blue-dark); }
.chip.date { font-weight: 700; background: var(--gold); color: var(--ink); }
.event h3 { margin: 0; font-family: var(--serif); font-size: 26px; font-weight: 700; line-height: 1.1; }
.event p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--muted); }
.event-actions { display: flex; gap: 10px; margin-top: auto; padding-top: 6px; }
.btn { flex: 1; min-height: 46px; padding: 0 16px; display: flex; align-items: center; justify-content: center; text-align: center; border-radius: 999px; font-size: 14px; font-weight: 700; text-decoration: none; border: none; cursor: pointer; }
.btn-blue { background: var(--blue); color: #fff; }
.btn-blue:hover { background: var(--blue-dark); color: #fff; }
.btn-gold { background: transparent; border: 1.5px solid var(--gold); color: var(--gold-ink); }
.btn-gold:hover { background: var(--gold-paper); color: var(--gold-deep); }

.past { border-radius: 18px; background: var(--card); box-shadow: var(--shadow); }
.past summary { min-height: 52px; padding: 0 18px; display: flex; align-items: center; justify-content: space-between; cursor: pointer; font-weight: 700; list-style: none; }
.past summary::-webkit-details-marker { display: none; }
.past summary::after { content: '+'; font-size: 22px; color: var(--blue); }
.past[open] summary::after { content: '–'; }
.past ul { margin: 0; padding: 0 18px 14px; list-style: none; }
.past li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid #EDF1F5; font-size: 14px; }
.past li span:last-child { color: var(--soft-text); white-space: nowrap; }

.about { padding: 24px; border-radius: 20px; background: var(--card); box-shadow: var(--shadow); }
.about h2 { margin: 0 0 10px; font-family: var(--serif); font-size: 28px; font-weight: 700; }
.about p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--muted); white-space: pre-line; max-width: 720px; }

.foot { margin-top: 12px; padding: 28px 0 40px; background: var(--card); border-top: 2px solid var(--gold); }
.foot .brand-name { font-size: 21px; }
.foot p { margin: 8px 0 0; font-size: 12px; line-height: 1.5; color: var(--soft-text); max-width: 560px; }
.foot-admin { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; margin-top: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }

.empty { padding: 18px; border-radius: 16px; border: 1.5px dashed var(--line); color: var(--soft-text); font-size: 14px; text-align: center; }
.skeleton { height: 92px; border-radius: 18px; background: linear-gradient(90deg, #E3E8EE, #F2F5F8, #E3E8EE); background-size: 200% 100%; animation: sk 1.2s infinite linear; }
@keyframes sk { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .skeleton { animation: none; } .project { transition: none; } }

/* Disegni di sfondo */
#guide, body.has-decor { position: relative; isolation: isolate; overflow-x: clip; }
.g-decor { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.g-dec { position: absolute; width: clamp(220px, 27vw, 430px); height: auto; opacity: .6; transform: rotate(var(--rot, 0deg)); filter: brightness(1.18) contrast(.78) saturate(.9); }
.g-dec.r { right: max(-90px, calc((100vw - 1080px) / 2 - 330px)); }
.g-dec.l { left: max(-90px, calc((100vw - 1080px) / 2 - 330px)); }
.g-dec.d-cavalluccio { width: clamp(170px, 18vw, 300px); }
.g-dec.d-mongolfiera { width: clamp(200px, 22vw, 360px); }
@media (max-width: 719px) {
  .g-dec { width: 62vw; opacity: .4; }
  .g-dec.d-cavalluccio { width: 42vw; } .g-dec.d-mongolfiera { width: 50vw; }
  .g-dec.r { right: -24vw; } .g-dec.l { left: -24vw; }
}
