:root {
  --bg: #fdeedd;
  --card: #fff8f0;
  --orange: #d95f0e;      /* solo titoli molto grandi (h1) */
  --orange-ink: #a64604;  /* arancio per testo e superfici colorate: ≥4.5:1 ovunque */
  --purple: #6a1fa8;
  --purple-dark: #4f1580;
  --blue: #07679e;
  --wa: #0b6e38;
  --sage: #c9dccf;
  --pink: #fbd9d6;
  --lilac: #ecdff7;
  --yellow: #fde7a6;
  --text: #222;
  --muted: #555;
  --r-s: 12px;
  --r-m: 20px;
  --r-l: 28px;
  --blob: 58% 42% 55% 45% / 50% 55% 45% 50%;
  /* motivi della locandina */
  --pennellata: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 160 14'%3E%3Cpath d='M3 8.5C30 4.5 70 3.5 157 6.5' fill='none' stroke='%23d95f0e' stroke-width='5' stroke-linecap='round' opacity='.75'/%3E%3Cpath d='M12 11.5C60 9 105 9 150 10.5' fill='none' stroke='%23d95f0e' stroke-width='2.5' stroke-linecap='round' opacity='.45'/%3E%3C/svg%3E");
  --raggi: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cg fill='none' stroke='%23d95f0e' stroke-width='4' stroke-linecap='round'%3E%3Cpath d='M6 14 13 4'/%3E%3Cpath d='M12 22 30 17'/%3E%3Cpath d='M10 31 24 36'/%3E%3C/g%3E%3C/svg%3E");
  --rametto: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 120'%3E%3Cg fill='%2399bfa5' stroke='none'%3E%3Cpath d='M38 112C40 80 46 50 62 14' fill='none' stroke='%2399bfa5' stroke-width='3' stroke-linecap='round'/%3E%3Cellipse cx='30' cy='86' rx='13' ry='6' transform='rotate(-35 30 86)'/%3E%3Cellipse cx='55' cy='76' rx='13' ry='6' transform='rotate(-60 55 76)'/%3E%3Cellipse cx='36' cy='58' rx='13' ry='6' transform='rotate(-40 36 58)'/%3E%3Cellipse cx='62' cy='46' rx='12' ry='5.5' transform='rotate(-70 62 46)'/%3E%3Cellipse cx='48' cy='32' rx='11' ry='5' transform='rotate(-50 48 32)'/%3E%3C/g%3E%3C/svg%3E");
}
* { box-sizing: border-box; }
html { scroll-padding-top: 16px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 1.05rem/1.6 "Nunito", system-ui, sans-serif;
}
::selection { background: var(--purple); color: #fff; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--purple); text-underline-offset: .18em; }
a:hover { color: var(--purple-dark); }
:focus-visible { outline: 3px solid var(--purple); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: "Fredoka", "Nunito", sans-serif; line-height: 1.15; margin: 0; text-wrap: balance; }
h1 { color: var(--orange); font-size: clamp(2.4rem, 9vw, 4.5rem); }
h2 { color: var(--blue); font-size: 1.9rem; text-transform: uppercase; margin: 56px 0 16px; }
h2::after { content: ""; display: block; width: 160px; height: 14px; margin-top: 2px; background: var(--pennellata) no-repeat left center / contain; }
h3 { color: var(--purple); font-size: 1.3rem; margin-bottom: 6px; }
p { margin: 0 0 12px; }
main p, main li { max-width: 70ch; }
.ico { width: 1em; height: 1em; flex: none; vertical-align: -0.15em; }

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -100px; z-index: 20; background: var(--purple); color: #fff; padding: 10px 16px; border-radius: var(--r-s); font-weight: 700; }
.skip:focus { top: 12px; }
.skip:hover, .skip:focus { color: #fff; }

/* header + nav */
.site-header { background: var(--card); border-bottom: 3px solid var(--sage); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 24px; padding-top: 6px; padding-bottom: 6px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: "Fredoka", sans-serif; font-weight: 700; font-size: 1.5rem; color: var(--orange-ink); text-decoration: none; padding: 6px 0; }
.brand img { height: 52px; width: auto; }
.site-header nav { display: flex; flex-wrap: wrap; column-gap: 18px; }
.site-header nav a { color: var(--text); font-weight: 700; text-decoration: none; padding: 10px 0; min-height: 44px; display: inline-flex; align-items: center; border-bottom: 3px solid transparent; }
.site-header nav a:hover, .site-header nav a[aria-current] { color: var(--purple); border-color: var(--orange); }

.wrap { max-width: 900px; margin: 0 auto; padding-left: 16px; padding-right: 16px; }
main { padding-bottom: 56px; }

/* hero */
.hero { text-align: center; padding-top: 56px; position: relative; }
.hero::before { content: ""; position: absolute; z-index: -1; width: 340px; height: 300px; right: calc(-1 * clamp(0px, (100vw - 100%) / 2 - 12px, 170px)); top: -40px; background: var(--sage); opacity: .55; border-radius: var(--blob); }
.hero::after { content: ""; position: absolute; z-index: -1; width: 80px; height: 120px; left: -10px; top: 150px; background: var(--rametto) no-repeat center / contain; transform: rotate(-18deg); }
.hero h1 { display: inline-block; position: relative; padding-right: .6em; }
.hero h1::after { content: ""; position: absolute; right: -.15em; top: .05em; width: .62em; height: .62em; background: var(--raggi) no-repeat center / contain; }
.lead { color: var(--purple); font-weight: 700; font-size: 1.25rem; margin: 12px auto 8px; }
.intro { font-weight: 700; max-width: 62ch; margin: 0 auto 28px; }
.intro p { margin-inline: auto; }
.page-title { padding-top: 48px; }
.page-title .azioni { justify-content: flex-start; }
.page-title > p { font-size: 1.15rem; color: var(--purple); font-weight: 700; }

/* azioni di contatto */
.azioni { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin: 8px 0 4px; }
.btn { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; background: var(--purple); color: #fff; font-weight: 700; padding: 12px 22px; border-radius: 999px; text-decoration: none; line-height: 1.2; }
.btn:hover { background: var(--purple-dark); color: #fff; }
.btn .ico { width: 1.3em; height: 1.3em; }
.btn small { font-weight: 400; }
.btn-wa { background: var(--wa); }
.btn-wa:hover { background: #08552b; }
.btn-chiaro { background: var(--card); color: var(--purple); box-shadow: inset 0 0 0 2px var(--purple); }
.btn-chiaro:hover { background: var(--lilac); color: var(--purple-dark); }

.rassicura { margin: 10px auto 0; font-weight: 700; color: var(--purple); }
.page-title .rassicura { margin-left: 0; }

/* barra contatti fissa su mobile */
.barra-aiuto { display: none; }
@media (max-width: 720px) {
  .site-footer { padding-bottom: 108px; }
  .barra-aiuto { display: flex; gap: 8px; position: fixed; z-index: 10; left: 0; right: 0; bottom: 0; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: var(--card); box-shadow: 0 -6px 20px rgb(60 30 0 / .14); }
  .barra-aiuto .btn { flex: 1; justify-content: center; padding: 10px 12px; }
  .barra-aiuto.nascosta { transform: translateY(110%); visibility: hidden; }
}

/* photos */
figure { margin: 32px 0; }
figure img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--r-l); }
figcaption { font-size: .85rem; color: var(--muted); margin-top: 6px; }
figcaption a { color: inherit; }

/* servizio con icona */
.item { display: flex; gap: 20px; align-items: flex-start; }
.icon { flex: 0 0 76px; height: 72px; border-radius: var(--blob); background: var(--sage); color: var(--purple); display: grid; place-items: center; }
.icon .ico { width: 36px; height: 36px; stroke-width: 1.75; }
.icon-pink { background: var(--pink); }
.icon-lilac { background: var(--lilac); }
.icon-yellow { background: var(--yellow); }
.pill { display: inline-flex; align-items: center; gap: 8px; margin: 4px 0 0; padding: 8px 16px; border-radius: var(--r-s); background: var(--pink); color: var(--purple); font-weight: 700; }
.box { margin-top: 12px; padding: 14px 18px; border-radius: var(--r-m); background: var(--lilac); }
.box strong:first-child { color: var(--purple); display: block; font-family: "Fredoka", sans-serif; font-size: 1.1rem; }
.box p:last-child { margin-bottom: 0; }

/* etichette */
.etichette-titolo { font-size: 1.3rem; margin-top: 28px; }
.principles { list-style: none; padding: 0; margin: 12px 0; display: flex; flex-wrap: wrap; gap: 8px; }
.principles li { background: var(--sage); border-radius: 999px; padding: 6px 14px; font-weight: 700; }

/* schede */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.card { background: var(--card); border-radius: var(--r-m); padding: 20px; position: relative; }
.card:has(.card-link):hover { box-shadow: 0 0 0 3px var(--orange); }
.card h3 { display: flex; align-items: center; gap: 10px; }
.card h3 .ico { width: 1.4em; height: 1.4em; color: var(--orange-ink); }
.card-link { color: inherit; text-decoration: none; }
.card-link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.card-link:focus-visible { outline: none; }
.card:has(.card-link:focus-visible) { outline: 3px solid var(--purple); outline-offset: 3px; }
.card .more { color: var(--purple); font-weight: 700; }
.card p:last-of-type { margin-bottom: 8px; }
.nota { margin-top: 16px; }

/* eventi */
.evento img { border-radius: var(--r-s); margin-bottom: 14px; width: 100%; } /* spesso sono locandine: mai ritagliarle */
.evento .pill { margin: 0 0 10px; }
.evento .luogo { display: flex; align-items: center; gap: 6px; font-weight: 700; }
.evento .luogo .ico { color: var(--orange-ink); }
.evento .more { margin: 0; }
.sezione-eventi:has(.passati[hidden]) { display: none; }
.passati .pill { background: var(--sage); color: var(--text); }
.passati .pill .ico { color: var(--purple); }

/* passi: percorso tratteggiato come nella locandina */
.steps { list-style: none; padding: 0; margin: 0; counter-reset: s; }
.steps li { counter-increment: s; position: relative; padding: 0 0 26px 60px; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 42px; height: 42px; border-radius: var(--blob); background: var(--orange-ink); color: #fff; font: 700 1.2rem "Fredoka", sans-serif; display: grid; place-items: center; }
.steps li:not(:last-child)::after { content: ""; position: absolute; left: 20px; top: 50px; bottom: 6px; border-left: 3px dotted var(--blue); opacity: .55; }

.band { border-radius: var(--r-l); padding: 24px; margin: 48px 0; }
.band h2 { margin-top: 0; }
.band > :last-child { margin-bottom: 0; }
.yellow { background: var(--yellow); }
.yellow h2 { color: var(--purple); }
.lilac { background: var(--lilac); }
.lilac h2 { color: var(--purple); font-size: 1.5rem; }
.crema { background: var(--card); }
.center { text-align: center; }
.center h2::after { margin-inline: auto; background-position: center; }
.center p { margin-inline: auto; }
.help h2 { color: var(--orange-ink); }

/* contacts / footer */
.contact-list { list-style: none; padding: 0; margin: 0; }
.contact-list a { display: flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; font-size: 1.1rem; font-weight: 700; margin: 10px 0; overflow-wrap: anywhere; }
.contact-list a:hover { color: var(--purple); }
.contact-list small { display: block; font-size: .85rem; font-weight: 400; color: var(--muted); }
.dot { flex: 0 0 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--blue); }
.dot .ico { width: 22px; height: 22px; }
.dot.wa { background: var(--wa); }
.dot.tel { background: var(--purple); }
.site-footer { background: var(--card); border-top: 3px solid var(--sage); padding: 32px 0; }
.site-footer .wrap { display: grid; grid-template-columns: 2fr 1fr; gap: 24px 32px; }
@media (max-width: 720px) { .site-footer .wrap { grid-template-columns: 1fr 1fr; } .site-footer .wrap > :first-child { grid-column: 1 / -1; } }
.footer-title { font-size: 1rem; color: var(--purple); text-transform: none; margin: 0 0 4px; }
.footer-title::after { display: none; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: 2px 0; }
.site-footer .pagine a { display: inline-block; padding: 6px 0; }
.promotore { display: inline-block; margin-top: 8px; }
.promotore img { width: 96px; }
.loghi { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 24px 56px; align-items: flex-start; padding-top: 24px; border-top: 2px solid var(--sage); }
.finanziatore { width: 170px; margin-top: 12px; }
.nota-legale { font-size: .8rem; color: var(--muted); margin: 8px 0 0; }

@media (max-width: 560px) {
  .item { flex-direction: column; gap: 10px; }
  h2 { font-size: 1.7rem; }
  .hero::after { display: none; }
  .hero::before { width: 200px; height: 180px; top: 0; }
}
@media (prefers-reduced-motion: no-preference) {
  .btn, .card { transition: background-color .2s ease-out, box-shadow .2s ease-out; }
  .barra-aiuto { transition: transform .3s cubic-bezier(.16, 1, .3, 1), visibility .3s; }
}
