/* Synecta Group — sistema di stile.
   Derivato dal modello qonto.com/it (griglia, ritmo, componenti), con la palette e il logo del cliente.
   Tutto ciò che cambia da un cliente all'altro sta nelle variabili qui sotto. */

:root {
  /* Colori ufficiali Synecta */
  --blue: #004080;
  --gold: #D6B312;
  --sky: #4274B1;
  /* Tinte derivate (non ufficiali), scelte per avere margine di contrasto */
  --navy: #00264d;          /* sezioni scure e testo su chiaro: 15,2:1 su bianco */
  --gold-hover: #e6c630;
  --ink: var(--navy);
  --ink-2: #2b4261;          /* testo secondario su chiaro: 9,9:1 su bianco */
  --on-dark-2: #cfd8e4;      /* testo secondario su scuro: 11:1 su navy */
  --surface: #f2f6fb;
  --line: #d5dde8;

  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Georgian", sans-serif;

  /* Scala tipografica fluida: formule ricavate dalle misure del modello a 390, 768, 1024 e 1440px */
  --fs-h1: clamp(2rem, min(1.2rem + 3.6vw, 10.5svh), 4.5rem); /* 33px a 390 · 71px a 1440, ma al massimo il 10,5% dell'altezza della finestra */
  --fs-h2: clamp(1.75rem, 1.2rem + 2.6vw, 3.5rem);      /* 29px a 390 · 57px a 1440 */
  --fs-h3: clamp(1.25rem, 1.1rem + .5vw, 1.5rem);
  --fs-body: clamp(1rem, .95rem + .2vw, 1.125rem);
  --fs-lead: clamp(1.125rem, 1rem + .5vw, 1.375rem);
  --fs-small: .9375rem;

  --section: clamp(3rem, 2rem + 4vw, 5rem);             /* 48px → 80px */
  --gutter: clamp(1rem, .5rem + 2vw, 3rem);             /* 16px → 48px */
  --radius: 24px;
  --radius-btn: 8px;
  --ease: cubic-bezier(.4, 0, .2, 1);
  --nav-h: 80px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--nav-h) + 16px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  font: 400 var(--fs-body)/1.55 var(--font-sans);
  color: var(--ink);
  background: #fff;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, p, ul, ol, dl, dd, address { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3 { font-weight: 700; line-height: 1.15; text-wrap: balance; }
h1 { font-size: var(--fs-h1); letter-spacing: -.01em; }
h2 { font-size: var(--fs-h2); letter-spacing: -.005em; }
h3 { font-size: var(--fs-h3); line-height: 1.3; }

:focus-visible { outline: 2px solid var(--focus, var(--navy)); outline-offset: 3px; }
.dark, .nav { --focus: #fff; }

.wrap { max-width: calc(1344px + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -100px; z-index: 100; padding: 12px 16px; background: var(--gold); color: var(--navy); font-weight: 600; border-radius: var(--radius-btn); }
.skip:focus { top: 16px; }

.dark { background: var(--navy); color: #fff; }
.lead { font-size: var(--fs-lead); line-height: 1.5; color: var(--on-dark-2); max-width: 42rem; }
.lead--chiaro { color: var(--ink-2); }
.link { display: inline-flex; align-items: center; min-height: 44px; color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.link:hover { color: var(--navy); }

/* ---------- Pulsanti ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 12px 20px;
  font-size: 1rem; font-weight: 600; line-height: 1.3; text-align: center;
  border: 1px solid transparent; border-radius: var(--radius-btn);
  transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.btn--sm { min-height: 44px; padding: 10px 16px; font-size: var(--fs-small); }
.btn--gold { background: var(--gold); color: var(--navy); }          /* navy su oro: 7,4:1 */
.btn--gold:hover { background: var(--gold-hover); }
.btn--blue { background: var(--blue); color: #fff; }                  /* bianco su blu: 10,3:1 */
.btn--blue:hover { background: var(--navy); }
.btn--outline-light { border-color: rgba(255, 255, 255, .75); color: #fff; }
.btn--outline-light:hover { background: #fff; color: var(--navy); border-color: #fff; }

/* ---------- Testata ---------- */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .96); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); color: var(--navy); box-shadow: 0 1px 0 rgba(0, 38, 77, .1); }
.nav__bar { display: flex; align-items: center; gap: 24px; min-height: var(--nav-h); }
.brand { display: flex; align-items: center; gap: 12px; min-height: 44px; min-width: 44px; font-weight: 600; font-size: 1.0625rem; white-space: nowrap; }
/* il disegno del logo occupa circa il 60% del quadrato dell'immagine: lo si ingrandisce con margini negativi, così la barra non cresce */
.brand img { width: 90px; height: 90px; margin: -11px; }
.nav__menu ul { display: flex; gap: 8px; }
.nav__menu a { display: flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: var(--radius-btn); }
.nav__menu a:hover { background: rgba(0, 64, 128, .08); }
.nav__actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.solo-sm { display: none; }
.burger { display: none; width: 44px; height: 44px; flex-direction: column; justify-content: center; align-items: center; gap: 6px; }
.burger span { display: block; width: 24px; height: 2px; background: currentColor; }
.nav__panel { border-top: 1px solid rgba(0, 38, 77, .12); background: #fff; }
.nav__panel[hidden] { display: none; }
.nav__panel ul { padding: 8px var(--gutter) 24px; }
.nav__panel a { display: flex; align-items: center; min-height: 52px; font-size: 1.125rem; border-bottom: 1px solid rgba(0, 38, 77, .1); }
@media (max-width: 899.98px) {
  .nav__menu { display: none; }
  .burger { display: flex; }
}
@media (min-width: 900px) { .nav__panel { display: none !important; } }
@media (max-width: 639.98px) {
  :root { --nav-h: 68px; }
  .brand img { width: 68px; height: 68px; margin: -8px; }
  .brand { gap: 8px; font-size: 1rem; }
  .solo-lg { display: none; }
  .solo-sm { display: inline; }
  .nav__bar { gap: 8px; }
}
@media (max-width: 479.98px) { .brand__name { display: none; } } /* con il pulsante di ricerca il nome non entra più sotto i 480px: resta il logo */

/* ---------- Ricerca nel sito ---------- */
/* Il pulsante compare solo se lo script è attivo (nasce con l'attributo hidden). Il pannello si apre sotto la barra, senza spostare la pagina. */
.searchbtn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 44px; height: 44px; padding: 0 10px; border-radius: var(--radius-btn); color: var(--navy); }
.searchbtn[hidden] { display: none; }
.searchbtn:hover, .searchbtn[aria-expanded="true"] { background: rgba(0, 64, 128, .08); }
.searchbtn__t { display: none; font-size: var(--fs-small); font-weight: 600; }
@media (min-width: 1200px) { .searchbtn__t { display: inline; } }
/* tra 900 e 1100px la barra è piena: il pulsante di prenotazione usa la forma corta */
@media (min-width: 900px) and (max-width: 1099.98px) { .nav__cta .solo-lg { display: none; } .nav__cta .solo-sm { display: inline; } }
.search { position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-top: 1px solid rgba(0, 38, 77, .1); box-shadow: 0 28px 40px -20px rgba(0, 20, 50, .3); }
.search[hidden] { display: none; }
.search__box { margin-left: auto; width: min(560px, 100%); padding-block: 16px 20px; }
.search__input { width: 100%; min-height: 48px; padding: 10px 14px; font: inherit; font-size: 1rem; color: var(--navy); background: #fff; border: 1.5px solid rgba(0, 64, 128, .3); border-radius: var(--radius-btn); }
.search__input:focus-visible { border-color: var(--blue); }
.search__input::placeholder { color: #5b6f89; opacity: 1; }
.search__list { margin: 8px 0 0; padding: 0; list-style: none; max-height: min(55vh, 420px); overflow-y: auto; }
.search__list a { display: block; min-height: 44px; padding: 10px 12px; border-radius: var(--radius-btn); color: var(--navy); }
.search__list a:hover { background: var(--surface); }
.search__list a:focus-visible { background: var(--surface); outline-offset: -2px; }
.search__t { display: block; font-weight: 600; }
.search__s { display: block; margin-top: 2px; font-size: var(--fs-small); color: var(--ink-2); }
.search__empty { margin: 12px 0 0; padding: 0 4px; color: var(--ink-2); }
.search__empty[hidden] { display: none; }

/* ---------- Hero ---------- */
/* Foto a destra che si scioglie nel blu a sinistra, dove sta il testo; velatura blu su tutta la foto. */
.hero { position: relative; overflow: hidden; display: flex; align-items: center; min-height: calc(100svh - var(--nav-h)); background: linear-gradient(135deg, var(--navy) 0%, #003060 55%, var(--blue) 100%); }
.hero__photo { position: absolute; top: 0; right: 0; bottom: 0; width: 78%; -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 38%); mask-image: linear-gradient(90deg, transparent 0, #000 38%); }
.hero__photo img, .hero__video { width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; }
.hero__video { position: absolute; inset: 0; opacity: 0; transition: opacity .8s ease; }
.hero__video.is-on { opacity: 1; }
.hero__pause { position: absolute; z-index: 2; right: var(--gutter); bottom: 16px; width: 44px; height: 44px; display: grid; place-items: center; padding: 0; color: #fff; background: rgba(0, 38, 77, .7); border: 1.5px solid rgba(255, 255, 255, .7); border-radius: 50%; cursor: pointer; }
.hero__pause:hover { background: rgba(0, 38, 77, .95); border-color: #fff; }
.hero__pause[hidden] { display: none; }
.hero__pause .i-play, .hero__pause[aria-pressed="true"] .i-pausa { display: none; }
.hero__pause[aria-pressed="true"] .i-play { display: block; }
.hero__photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0, 38, 77, .9) 0%, rgba(0, 38, 77, .62) 45%, rgba(0, 38, 77, .48) 100%); }
.hero__inner { position: relative; width: 100%; padding-block: clamp(1.5rem, 7svh, 7rem); }
.hero h1 { margin: 0 0 clamp(14px, 2.6svh, 24px); max-width: 11em; }
.hero .lead { max-width: min(36rem, 44vw); } /* sulle larghezze medie il testo resta sul blu e non arriva alla parte chiara della foto */
.hero__cta { display: flex; flex-wrap: wrap; gap: 16px; margin-top: clamp(20px, 3.5svh, 32px); }
@media (max-width: 899.98px) {
  /* su telefono e tablet la foto è una fascia in cima che sfuma nel blu; il testo sta sul blu pieno */
  .hero { flex-direction: column; align-items: stretch; min-height: 0; }
  .hero__photo { position: relative; width: 100%; height: clamp(120px, min(58vw, 22svh), 400px); -webkit-mask-image: linear-gradient(180deg, #000 45%, transparent 100%); mask-image: linear-gradient(180deg, #000 45%, transparent 100%); }
  .hero__photo::after { background: linear-gradient(180deg, rgba(0, 38, 77, .35) 0%, rgba(0, 38, 77, .8) 100%); }
  .hero__inner { padding-block: 0 clamp(2rem, 2rem + 3vw, 4.5rem); margin-top: -16px; }
  .hero .lead { max-width: 36rem; }
}
/* telefono girato di lato: la finestra è troppo bassa per foto e testo insieme, si tiene il testo */
@media (max-width: 899.98px) and (max-height: 520px) {
  .hero__photo { display: none; }
  .hero__inner { margin-top: 0; padding-top: 24px; }
}

/* ---------- Sezioni ---------- */
.section { padding-block: var(--section); }
.section__head { margin-bottom: clamp(2rem, 1rem + 3vw, 3.5rem); max-width: 48rem; }
.section__head .lead { margin-top: 16px; }

/* piccolo riquadro con il disegno animato, sulla foto */
.badge { position: absolute; top: 14px; right: 14px; width: clamp(104px, 34%, 150px); padding: 8px 10px; border-radius: 14px; background: rgba(255, 255, 255, .86); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: 0 10px 30px -8px rgba(0, 38, 77, .45); }
.help { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; margin-top: 24px; padding: clamp(24px, 1rem + 2vw, 40px); border-radius: var(--radius); background: var(--surface); }
.help p { color: var(--ink-2); margin-top: 4px; }
@media (max-width: 479.98px) { .badge { width: 96px; padding: 6px 8px; top: 10px; right: 10px; } }

/* movimento: le schede salgono al loro posto (la colonna di destra un attimo dopo), i disegni si tracciano, i documenti si spuntano;
   senza JavaScript o con "riduci animazioni" resta lo stato finale */
@media (prefers-reduced-motion: no-preference) {
  @keyframes draw { to { stroke-dashoffset: 0; } }
  @keyframes grow { to { transform: scaleY(1); } }
  @keyframes fade { to { opacity: 1; } }
  @keyframes pop { to { opacity: 1; transform: none; } }

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

}

/* come lavoriamo */
/* come lavoriamo: percorso in tre tappe */
#metodo { position: relative; overflow: hidden; background: radial-gradient(60% 50% at 85% 0%, rgba(66, 116, 177, .35), transparent 70%), radial-gradient(50% 40% at 0% 100%, rgba(214, 179, 18, .12), transparent 70%), var(--navy); }
.steps { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 2.4vw, 32px); counter-reset: passo; padding-top: 28px; }
.step { position: relative; padding: clamp(20px, 1rem + 1vw, 28px); border: 1px solid rgba(255, 255, 255, .12); border-radius: 24px; background: linear-gradient(160deg, rgba(255, 255, 255, .09), rgba(255, 255, 255, .02)); box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .5); }
.step__node { position: absolute; z-index: 1; top: -28px; left: calc(50% - 8px); width: 16px; height: 16px; margin-top: -8px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 6px rgba(214, 179, 18, .2); }
.steps::before, .steps::after { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px; margin-top: -1px; }
.steps::before { background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .3) 0 6px, transparent 6px 12px); }
.steps::after { background: var(--gold); transform-origin: left; }
.step__art { display: block; width: 100%; height: auto; max-height: 150px; margin-bottom: 8px; }
.step__n { position: absolute; top: 14px; right: 20px; font-size: 3.25rem; font-weight: 800; line-height: 1; letter-spacing: -.04em; color: transparent; -webkit-text-stroke: 1.5px rgba(255, 255, 255, .22); }
.step h3 { margin-top: 8px; }
.step p { margin-top: 10px; color: var(--on-dark-2); }
.step .soft { fill: rgba(255, 255, 255, .08); stroke: rgba(255, 255, 255, .5); stroke-width: 1.5; stroke-linejoin: round; }
.step .soft-line { stroke: rgba(255, 255, 255, .35); stroke-width: 1.5; stroke-linecap: round; }
.step .paper { fill: #fff; }
.step .gold-fill { fill: var(--gold); }
.step .ink-line { stroke: var(--navy); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; fill: none; }
.step .p1-d { fill: #fff; }
.step .track { fill: rgba(0, 38, 77, .6); stroke: rgba(255, 255, 255, .25); stroke-width: 3; }
.step .ring { fill: none; stroke: var(--gold); stroke-width: 3; stroke-linecap: round; }
.step text { fill: #fff; font: 700 11px var(--font-sans); }
.step .p2-tick { fill: none; stroke: var(--gold); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.step .stamp-in { fill: none; stroke: var(--navy); stroke-width: 1.5; stroke-dasharray: 2 3; }
.step .p3-path { fill: none; stroke: var(--gold); stroke-width: 3; stroke-linecap: round; }
.step .p3-base { fill: none; stroke: rgba(255, 255, 255, .35); stroke-width: 2; stroke-dasharray: 3 6; stroke-linecap: round; }
.step .p3-n { fill: var(--navy); stroke: #fff; stroke-width: 2; }
.step .p3-trav { fill: #fff; offset-path: path("M16 96 C62 96 70 44 112 56 S172 92 204 34"); offset-distance: 100%; opacity: 0; }
.step .p3-pulse { fill: none; stroke: var(--gold); stroke-width: 2; transform-box: fill-box; transform-origin: center; opacity: 0; }
@media (max-width: 899.98px) {
  .steps { grid-template-columns: 1fr; gap: 28px; padding: 0 0 0 36px; }
  .step__node { top: 50%; left: -36px; margin-top: -8px; }
  .steps::before, .steps::after { top: 0; bottom: 0; left: 7px; right: auto; width: 2px; height: auto; margin: 0; }
  .steps::before { background: repeating-linear-gradient(180deg, rgba(255, 255, 255, .3) 0 6px, transparent 6px 12px); }
  .steps::after { transform-origin: top; }
  .step__art { max-width: 280px; }
}

/* movimento: il percorso si accende tappa dopo tappa, e dentro ogni scheda parte il suo disegno */
@media (prefers-reduced-motion: no-preference) {
  .js .step { --t: calc(var(--i) * 1.4s); opacity: 0; transform: translateY(32px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: var(--t); }
  .js .step.is-in { opacity: 1; transform: none; }
  .js .step__node { transform: scale(0); }
  .js .steps::after { transform: scaleX(0); }
  /* una sola barra dall'inizio della prima scheda alla fine dell'ultima; i pallini si accendono quando la barra passa al centro di ogni scheda */
  .step.is-in .step__node { animation: node-on .5s var(--ease) calc(.7s + var(--i) * 1.4s) forwards; }
  .steps.is-in::after { animation: line-on 4.2s linear .1s forwards; }
  @keyframes node-on { to { transform: scale(1); } }
  @keyframes line-on { to { transform: scaleX(1); } }
  @media (max-width: 899.98px) {
    .js .step { --t: 0s; }
    .steps.is-in::after { animation-name: line-on-y; }
    .js .steps::after { transform: scaleY(0); }
    .step.is-in .step__node { animation-delay: 0s; }
    @keyframes line-on-y { to { transform: scaleY(1); } }
  }

  /* 1 - incontro */
  .js .p1-b1, .js .p1-b2 { opacity: 0; transform: translateY(10px); }
  .js .p1-clock { opacity: 0; }
  .js .ring { stroke-dasharray: 100; stroke-dashoffset: 100; }
  .step.is-in .p1-b1 { animation: b-in .6s var(--ease) calc(var(--t) + .5s) forwards; }
  .step.is-in .p1-b2 { animation: b-in .6s var(--ease) calc(var(--t) + 1.5s) forwards; }
  .step.is-in .p1-clock { animation: fade .5s ease calc(var(--t) + 2.2s) forwards; }
  .step.is-in .ring { animation: draw 1.8s var(--ease) calc(var(--t) + 2.3s) forwards; }
  .step.is-live .p1-d { animation: dot 1.2s ease-in-out calc(var(--k) * .15s) infinite; }
  @keyframes b-in { to { opacity: 1; transform: none; } }
  @keyframes dot { 0%, 100% { opacity: .3; } 40% { opacity: 1; } }

  /* 2 - pratica */
  .js .p2-s { opacity: 0; transform: translateX(40px); }
  .js .p2-tick { stroke-dasharray: 100; stroke-dashoffset: 100; }
  .js .p2-stamp { opacity: 0; transform-box: fill-box; transform-origin: center; scale: 2; rotate: -20deg; }
  .step.is-in .p2-s { animation: b-in .7s var(--ease) calc(var(--t) + .4s + var(--k) * .3s) forwards; }
  .step.is-in .p2-tick { animation: draw .6s ease calc(var(--t) + 1.6s) forwards; }
  .step.is-in .p2-stamp { animation: stamp .5s cubic-bezier(.3, 1.5, .5, 1) calc(var(--t) + 2.2s) forwards; }
  @keyframes stamp { to { opacity: 1; scale: 1; rotate: 0deg; } }

  /* 3 - esito */
  .js .p3-path { stroke-dasharray: 100; stroke-dashoffset: 100; }
  .js .p3-n, .js .p3-end { opacity: 0; }
  .js .p3-trav { offset-distance: 0%; opacity: 0; }
  .step.is-in .p3-n { animation: fade .4s ease calc(var(--t) + .4s + var(--k) * .6s) forwards; }
  .step.is-in .p3-path { animation: draw 2s ease-in-out calc(var(--t) + .5s) forwards; }
  .step.is-in .p3-trav { animation: go 2s ease-in-out calc(var(--t) + .5s) forwards; }
  .step.is-in .p3-end { animation: fade .4s ease calc(var(--t) + 2.3s) forwards; }
  .step.is-live .p3-pulse { animation: ring 2.2s ease-out calc(var(--t) + 2.6s) infinite; }
  @keyframes go { 0% { offset-distance: 0%; opacity: 1; } 95% { opacity: 1; } 100% { offset-distance: 100%; opacity: 0; } }
  @keyframes fade { to { opacity: 1; } }
  @keyframes ring { 0% { transform: scale(1); opacity: .7; } 100% { transform: scale(1.9); opacity: 0; } }
}

/* contatti */
.contact { background: radial-gradient(70% 40% at 50% 0%, #e4eefa, transparent 70%), var(--surface); }
.btn--lg { min-height: 52px; padding-inline: 28px; font-size: 1.0625rem; }
.cta-panel { position: relative; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(28px, 2rem + 2vw, 64px); align-items: center; overflow: hidden;
  padding: clamp(28px, 1.5rem + 3vw, 64px); border-radius: 32px; color: #fff;
  background: radial-gradient(55% 65% at 100% 0%, rgba(214, 179, 18, .26), transparent 60%), radial-gradient(50% 60% at 0% 100%, rgba(66, 116, 177, .5), transparent 65%), linear-gradient(135deg, #00264d 0%, #004080 100%);
  box-shadow: 0 2px 4px rgba(0, 38, 77, .1), 0 30px 60px -20px rgba(0, 38, 77, .55), 0 70px 120px -50px rgba(0, 64, 128, .6); }
.cta-panel::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255, 255, 255, .12) 1px, transparent 1.5px); background-size: 22px 22px; -webkit-mask-image: linear-gradient(120deg, transparent 30%, #000); mask-image: linear-gradient(120deg, transparent 30%, #000); pointer-events: none; }
.cta-panel > * { position: relative; }
.cta-panel .lead { margin-top: 16px; }
.contact__cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
.contact__nota { margin-top: 20px; color: var(--on-dark-2); font-size: var(--fs-small); max-width: 34rem; }

/* anteprima animata della prenotazione (decorativa) */
.cal { width: min(100%, 340px); margin-inline: auto; padding: 18px; border-radius: 22px; background: #fff; color: var(--navy); rotate: 2deg;
  box-shadow: 0 2px 4px rgba(0, 38, 77, .1), 0 30px 60px -16px rgba(0, 20, 50, .6); }
.cal__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; font-size: 1rem; }
.cal__dots { display: flex; gap: 4px; } .cal__dots i { width: 8px; height: 8px; border-radius: 50%; background: #d5dde8; }
.cal__week, .cal__days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.cal__week span { font-size: .75rem; font-weight: 700; color: var(--ink-2); padding-bottom: 6px; }
.cal__days i { font-style: normal; display: grid; place-items: center; aspect-ratio: 1; border-radius: 50%; font-size: .875rem; }
.cal__days i.sel { background: var(--gold); font-weight: 700; }
.cal__slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.cal__slots b { padding: 8px 0; border: 1px solid var(--line); border-radius: 999px; text-align: center; font-size: .875rem; font-weight: 600; }
.cal__slots b.sel { background: var(--navy); border-color: var(--navy); color: #fff; }
.cal__ok { display: flex; align-items: center; gap: 8px; width: fit-content; margin: 14px 0 0 auto; padding: 8px 14px 8px 10px; border-radius: 999px; background: var(--surface); font-size: .875rem; font-weight: 600; box-shadow: 0 8px 20px -8px rgba(0, 38, 77, .4); }

/* riquadri di contatto: mappa con scheda del luogo, telefono in oro, email in blu */
.tiles { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); grid-template-rows: 1fr 1fr; gap: clamp(16px, 2vw, 24px); margin-top: clamp(16px, 2vw, 24px); font-style: normal; }
.tile { position: relative; overflow: hidden; border-radius: 28px; box-shadow: 0 1px 2px rgba(0, 38, 77, .08), 0 18px 36px -16px rgba(0, 38, 77, .35), 0 50px 80px -44px rgba(0, 38, 77, .45); transition: transform .4s var(--ease), box-shadow .4s var(--ease); }
.tile:hover { transform: translateY(-4px); box-shadow: 0 2px 4px rgba(0, 38, 77, .1), 0 26px 46px -16px rgba(0, 38, 77, .4), 0 60px 90px -44px rgba(0, 38, 77, .5); }
.tile--map { grid-row: span 2; min-height: 360px; background: #00264d; isolation: isolate; }
.tile--map .map { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; display: block; }
/* la luce che segue il puntatore e, ogni tanto, un riflesso che attraversa il riquadro */
.tile--map::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: radial-gradient(240px circle at var(--mx, -999px) var(--my, -999px), rgba(214, 179, 18, .26), transparent 70%); }
.tile--map::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(115deg, transparent 38%, rgba(255, 255, 255, .12) 50%, transparent 62%); transform: translateX(-130%); }
.map-card { position: absolute; z-index: 2; left: 16px; bottom: 16px; width: min(calc(100% - 32px), 300px); padding: 18px 18px 16px; border-radius: 20px; background: #fff; box-shadow: 0 2px 4px rgba(0, 38, 77, .1), 0 24px 48px -12px rgba(0, 38, 77, .5); }
.map-card strong { display: block; font-size: 1.0625rem; color: var(--navy); }
.map-card p { margin: 4px 0 14px; color: var(--ink-2); line-height: 1.4; }
.tile--contact { grid-row: span 2; display: flex; flex-direction: column; justify-content: center; isolation: isolate; background: linear-gradient(155deg, #00264d 0%, #003466 55%, #004680 100%); border: 1px solid rgba(255, 255, 255, .12); box-shadow: 0 1px 2px rgba(0, 38, 77, .2), 0 22px 44px -18px rgba(0, 38, 77, .6), 0 50px 80px -44px rgba(0, 38, 77, .55); }
/* aurora: grandi macchie di luce oro e azzurra che si spostano piano dietro i contatti, più una trama di puntini e la luce del puntatore */
.tile--contact::before { content: ""; position: absolute; inset: -40%; z-index: 0; pointer-events: none; filter: blur(10px); mix-blend-mode: screen;
  background: radial-gradient(34% 34% at 72% 30%, rgba(255, 190, 30, .6), transparent 70%), radial-gradient(40% 40% at 22% 76%, rgba(66, 116, 177, .85), transparent 70%), radial-gradient(28% 28% at 84% 80%, rgba(125, 180, 255, .4), transparent 70%); }
.tile--contact::after { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(280px circle at var(--mx, 78%) var(--my, 18%), rgba(255, 255, 255, .18), transparent 70%), radial-gradient(rgba(255, 255, 255, .17) 1px, transparent 1.5px) 0 0 / 22px 22px; }
.crow { position: relative; z-index: 1; display: flex; align-items: center; gap: 16px; padding: clamp(18px, 1rem + .8vw, 28px) clamp(20px, 1rem + 1vw, 32px); transition: background .3s var(--ease); }
.crow + .crow { border-top: 1px solid var(--line); }
.crow:hover { background: var(--surface); }
.crow__icon { flex: none; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--surface); color: var(--blue); }
.crow:hover .crow__icon { background: var(--gold); color: var(--navy); }
.crow__txt { min-width: 0; flex: 1; }
.tile--contact .tile__label { color: #e6edf7; font-weight: 600; opacity: 1; margin-bottom: 2px; }
.tile--contact .tile__link { color: #fff; }
.tile--contact .crow + .crow { border-top-color: rgba(255, 255, 255, .16); }
/* i testi poggiano su una fascia scura e semitrasparente: la luce dell'aurora si vede ai lati, ma il contrasto del testo resta alto in ogni momento dell'animazione */
.tile--contact .crow { background: rgba(0, 24, 56, .5); box-shadow: 0 0 46px 18px rgba(0, 24, 56, .5); } /* l'ombra sfuma i bordi della fascia */
.tile--contact .crow:hover { background: rgba(0, 24, 56, .3); box-shadow: 0 0 46px 18px rgba(0, 24, 56, .3); }
.tile--contact .crow__icon { background: rgba(255, 255, 255, .1); color: var(--gold); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18); }
.tile--contact .crow:hover .crow__icon { background: var(--gold); color: var(--navy); box-shadow: 0 0 0 6px rgba(214, 179, 18, .22); }
.tile--contact .tile__go { border-color: rgba(255, 255, 255, .35); color: #fff; }
.tile--contact .crow:hover .tile__go { background: var(--gold); border-color: var(--gold); color: var(--navy); }
.tile--contact .crow:has(.tile__link:focus-visible) { outline-color: #fff; }
.tile__link { display: block; color: inherit; text-decoration: none; font-weight: 700; letter-spacing: -.01em; overflow-wrap: anywhere; }
.tile__link::after { content: ""; position: absolute; inset: 0; }
.tile__big { font-size: clamp(1.5rem, 1.1rem + 1vw, 2.125rem); }
.tile__mail { font-size: clamp(1.0625rem, .9rem + .5vw, 1.375rem); }
.tile__go { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); color: var(--blue); transition: transform .3s var(--ease), background .3s var(--ease), color .3s var(--ease); }
.crow:hover .tile__go { transform: rotate(45deg); background: var(--navy); color: #fff; border-color: var(--navy); }
.tile__link:focus-visible { outline: none; }
.crow:has(.tile__link:focus-visible) { outline: 3px solid var(--blue); outline-offset: -3px; border-radius: 20px; }
.map-bg { fill: #00264d; } .map-block rect { fill: rgba(125, 175, 240, .08); stroke: rgba(150, 195, 245, .2); stroke-width: 1; } .map-block .park { fill: rgba(70, 200, 150, .16); stroke: rgba(110, 225, 175, .3); }
.map-road { fill: none; stroke: rgba(255, 255, 255, .05); stroke-width: 12; }
.map-main { fill: none; stroke: rgba(255, 255, 255, .1); stroke-width: 24; stroke-linecap: round; }
.map-main-luce { fill: none; stroke: #7db4ff; stroke-width: 8; stroke-linecap: round; opacity: .6; }
.map-name { font: 700 12px var(--font-sans); letter-spacing: .18em; fill: rgba(235, 244, 255, .92); dominant-baseline: central; }
.map-route-base { fill: none; stroke: var(--gold); stroke-width: 4; stroke-linecap: round; stroke-dasharray: 1 10; opacity: .6; }
.map-route { fill: none; stroke: #f3d54a; stroke-width: 4.5; stroke-linecap: round; }
.map-route-luce { fill: none; stroke: var(--gold); stroke-width: 12; stroke-linecap: round; opacity: .7; }
.map-me { fill: #7db4ff; stroke: #fff; stroke-width: 3; }
.map-pin path { fill: var(--gold); stroke: #fff; stroke-width: 2.5; } .map-pin circle { fill: var(--navy); }
.map-alone { mix-blend-mode: screen; } /* l'oro sul blu, mescolato in modo normale, diventa verdastro: così resta caldo e luminoso */
.map-ring { fill: none; stroke: var(--gold); stroke-width: 2; opacity: 0; transform-box: fill-box; transform-origin: center; }
.map-car { fill: #fff; opacity: 0; filter: drop-shadow(0 0 6px #f3d54a); }
.map-pulse { fill: rgba(214, 179, 18, .5); transform-box: fill-box; transform-origin: center; }
@media (max-width: 899.98px) {
  .cta-panel { grid-template-columns: 1fr; }
  .cal { rotate: 0deg; }
  .tiles { grid-template-columns: 1fr; grid-template-rows: none; }
  .tile--map { grid-row: auto; min-height: 380px; }
}

/* movimento: la prenotazione si compone da sola (giorno, orario, conferma) */
@media (prefers-reduced-motion: no-preference) {
  .js .cta-panel { opacity: 0; transform: translateY(32px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
  .js .cta-panel.is-in { opacity: 1; transform: none; }
  .js .tile { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease), box-shadow .4s var(--ease); }
  .js .map-route, .js .map-route-luce { stroke-dasharray: 100; stroke-dashoffset: 100; } .js .map-pin { opacity: 0; translate: 0 -40px; } .js .map-me { opacity: 0; } .js .map-card { opacity: 0; translate: 0 16px; }
  .js .tiles.is-in .tile { opacity: 1; transform: none; }
  .js .tiles.is-in .tile:nth-child(2) { transition-delay: .12s; }
  .js .tiles.is-in .tile:hover { transform: translateY(-4px); transition-delay: 0s; }
  .js .cal__days i, .js .cal__slots b { opacity: 0; transform: translateY(6px); }
  .js .cal__days i.sel { background: transparent; }
  .js .cal__slots b.sel { background: #fff; color: var(--navy); border-color: var(--line); }
  .js .cal__ok { opacity: 0; transform: translateY(10px) scale(.9); }
  .cta-panel.is-in .cal__days i { animation: pop .4s var(--ease) calc(.5s + var(--k) * .04s) forwards; }
  .cta-panel.is-in .cal__days i.sel { animation: pop .4s var(--ease) calc(.5s + var(--k) * .04s) forwards, pick-day .5s var(--ease) 1.5s forwards; }
  .cta-panel.is-in .cal__slots b { animation: pop .4s var(--ease) calc(1.9s + var(--k) * .12s) forwards; }
  .cta-panel.is-in .cal__slots b.sel { animation: pop .4s var(--ease) calc(1.9s + var(--k) * .12s) forwards, pick-slot .4s ease 2.8s forwards; }
  .cta-panel.is-in .cal__ok { animation: ok-in .6s cubic-bezier(.3, 1.4, .5, 1) 3.3s forwards; }
  .cta-panel.is-live .cal { animation: bob 6s ease-in-out 3.5s infinite; }
  .tiles.is-in .map-me { animation: fade .4s ease .5s forwards; }
  .tiles.is-in .map-route, .tiles.is-in .map-route-luce { animation: draw 2s ease-in-out .8s forwards; }
  .tiles.is-in .map-pin { animation: drop .7s cubic-bezier(.3, 1.5, .5, 1) 2.7s forwards; }
  .tiles.is-in .map-card { animation: rise-c .7s var(--ease) 1s forwards; }
  .tiles.is-in .crow:first-child .crow__icon { animation: ringing 1.2s ease 1.2s 1; }
  .tiles.is-live .map-pulse { animation: ring 2.4s ease-out 3.2s infinite; }
  /* onde che si allargano dal segnaposto, come un radar */
  .tiles.is-live .map-ring { animation: onda 3.6s cubic-bezier(.2, .6, .3, 1) 3.2s infinite; }
  .tiles.is-live .map-ring:nth-of-type(2) { animation-delay: 4.4s; }
  .tiles.is-live .map-ring:nth-of-type(3) { animation-delay: 5.6s; }
  .tiles.is-live .tile--map::after { animation: lucida 8s ease-in-out 4s infinite; }
  .tiles.is-live .tile--contact::before { animation: aurora 16s ease-in-out infinite alternate; }
  @keyframes onda { 0% { transform: scale(.25); opacity: .8; } 100% { transform: scale(7); opacity: 0; } }
  @keyframes lucida { 0%, 55% { transform: translateX(-130%); } 100% { transform: translateX(130%); } }
  @keyframes aurora { 0% { transform: translate3d(-5%, -4%, 0) rotate(0deg) scale(1); } 100% { transform: translate3d(6%, 5%, 0) rotate(16deg) scale(1.14); } }
  @keyframes drop { to { opacity: 1; translate: 0 0; } }
  @keyframes rise-c { to { opacity: 1; translate: 0 0; } }
  @keyframes ringing { 0%, 100% { rotate: 0deg; } 15% { rotate: -14deg; } 30% { rotate: 12deg; } 45% { rotate: -10deg; } 60% { rotate: 8deg; } 75% { rotate: -4deg; } }
  @keyframes pick-day { 0% { background: transparent; scale: 1; } 60% { scale: 1.25; } 100% { background: var(--gold); scale: 1; } }
  @keyframes pick-slot { to { background: var(--navy); color: #fff; border-color: var(--navy); } }
  @keyframes ok-in { to { opacity: 1; transform: none; } }
}

/* ---------- Footer ---------- */
.footer { padding-block: clamp(2.5rem, 2rem + 3vw, 4.5rem) 0; }
.footer__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(32px, 1rem + 3vw, 64px); }
.footer__brand img { width: 120px; height: 120px; margin-bottom: 16px; }
.footer__brand p { color: var(--on-dark-2); max-width: 22rem; }
.footer__titolo { font-size: var(--fs-small); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--gold); margin-bottom: 12px; }
.footer li { color: var(--on-dark-2); font-size: var(--fs-small); }
.footer li a { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; }
.footer li a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.footer__legale { margin-top: 48px; padding-block: 24px 32px; border-top: 1px solid rgba(255, 255, 255, .18); color: var(--on-dark-2); font-size: .875rem; }
@media (max-width: 899.98px) { .footer__grid { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

@media (max-width: 479.98px) {
  .tile__go { display: none; }
  .crow { gap: 12px; }
  .crow__icon { width: 42px; height: 42px; }
  .tile__mail { font-size: .9375rem; letter-spacing: -.02em; overflow-wrap: normal; }
}
.tile__label { margin-bottom: 4px; font-size: .8125rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }

/* ===== Servizi: una scheda per ogni attività, a mosaico sfalsato ===== */
.svcs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(20px, 2.4vw, 32px); align-items: stretch; }
.svc {
  --m-line: var(--sky); --m-fill: #dbe7f6; --m-bar: #c3d5ec; --m-ink: var(--navy);
  --shadow: 0 1px 2px rgba(0, 38, 77, .06), 0 14px 30px -12px rgba(0, 38, 77, .2), 0 44px 80px -36px rgba(0, 38, 77, .35);
  position: relative; display: flex; flex-direction: column; overflow: hidden; border: 1px solid rgba(0, 64, 128, .1); border-radius: 28px; background: #fff; box-shadow: var(--shadow);
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}
.svc--azzurro { background: radial-gradient(90% 40% at 100% 0%, rgba(214, 179, 18, .18), transparent 60%), linear-gradient(180deg, #e6f0fc 0%, #fff 60%); }
.svc--bianco { background: radial-gradient(90% 45% at 0% 0%, rgba(66, 116, 177, .2), transparent 60%), linear-gradient(180deg, #f3f7fc, #fff 50%); }
.svc--oro { background: radial-gradient(80% 40% at 0% 0%, rgba(214, 179, 18, .28), transparent 60%), linear-gradient(180deg, #fdf5cf 0%, #fffdf4 50%, #fff); border-color: rgba(214, 179, 18, .35); }
.svc--blu { --m-line: rgba(255, 255, 255, .75); --m-fill: rgba(255, 255, 255, .12); --m-bar: rgba(255, 255, 255, .3); --m-ink: #fff; color: #fff; border-color: rgba(255, 255, 255, .1);
  background: radial-gradient(90% 45% at 100% 0%, rgba(214, 179, 18, .28), transparent 58%), linear-gradient(155deg, #00264d 0%, #004080 100%);
  --shadow: 0 1px 2px rgba(0, 38, 77, .1), 0 18px 40px -12px rgba(0, 38, 77, .45), 0 50px 90px -30px rgba(0, 64, 128, .6); }
.svc__art { position: relative; margin: 10px 10px 0; border-radius: 20px; }
.svc__art--disegno { display: grid; place-items: center; min-height: 190px; padding: 18px; background: rgba(255, 255, 255, .55); border: 1px solid rgba(0, 64, 128, .08); }
.svc--blu .svc__art--disegno { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .12); }
.svc__photo { position: relative; overflow: hidden; border-radius: 20px; aspect-ratio: 16 / 10; background: var(--surface); }
.svc__photo img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 1.2s var(--ease); }
.svc__photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 38, 77, .05) 40%, rgba(0, 38, 77, .4)); }
.svc .badge--m { position: absolute; top: 12px; right: 12px; width: clamp(96px, 38%, 140px); padding: 6px 8px; border-radius: 14px; background: rgba(255, 255, 255, .88); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: 0 10px 30px -8px rgba(0, 38, 77, .45); --m-line: var(--sky); --m-fill: #dbe7f6; --m-ink: var(--navy); }
.motif { display: block; width: 100%; height: auto; }
.svc__art--disegno .motif { max-width: 340px; }
.svc__body { position: relative; display: flex; flex-direction: column; flex: 1; padding: clamp(20px, 1rem + 1vw, 30px); }
.svc__n { position: absolute; top: 14px; right: 22px; font-size: 2.75rem; font-weight: 800; line-height: 1; letter-spacing: -.04em; color: transparent; -webkit-text-stroke: 1.5px rgba(0, 64, 128, .2); }
.svc--blu .svc__n { -webkit-text-stroke-color: rgba(255, 255, 255, .25); }
.svc h3 { max-width: 85%; }
.svc__intro { margin-top: 10px; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.svc--blu .svc__intro { color: var(--on-dark-2); }
.svc__more { display: inline-flex; align-items: center; align-self: flex-start; gap: 10px; min-height: 44px; margin-top: auto; padding: 10px 16px; font: inherit; font-size: .9375rem; font-weight: 700; color: var(--blue); background: rgba(255, 255, 255, .7); border: 1.5px solid currentColor; border-radius: 999px; cursor: pointer; transition: background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease); }
.svc__body .svc__intro + .svc__more { margin-top: 20px; }
.svc__more svg { flex: none; transition: transform .3s var(--ease); }
.svc__more:hover { background: var(--blue); color: #fff; border-color: var(--blue); }
.svc__more:hover svg { transform: rotate(90deg); }
.svc--blu .svc__more { color: var(--gold); background: rgba(255, 255, 255, .06); }
.svc--blu .svc__more:hover { background: var(--gold); color: var(--navy); border-color: var(--gold); }

/* finestra con i dettagli */
.svc__dlg { width: min(720px, calc(100vw - 32px)); max-height: min(86vh, 820px); padding: clamp(24px, 1rem + 3vw, 44px); border: 0; border-radius: 28px; background: #fff; color: var(--navy); box-shadow: 0 40px 100px -20px rgba(0, 20, 50, .6); overflow: auto; --focus: var(--blue); }
.svc__dlg::backdrop { background: rgba(0, 38, 77, .6); -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); }
.svc__dlg h3 { max-width: calc(100% - 56px); font-size: var(--fs-h2); line-height: 1.1; }
.svc__dlg > p { margin-top: 14px; color: var(--ink-2); }
.svc__dlg h4 { margin: 24px 0 8px; font-size: var(--fs-small); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--blue); }
.svc__dlg ul { display: grid; gap: 8px; }
.svc__dlg li { position: relative; padding-left: 20px; color: var(--ink-2); }
.svc__dlg li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); }
.svc__nota { margin-top: 20px; padding: 14px 16px; border-radius: 14px; background: var(--surface); color: var(--ink-2); }
.svc__cta { margin-top: 28px; }
.svc__close { position: absolute; top: 16px; right: 16px; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: var(--surface); color: var(--navy); cursor: pointer; }
.svc__close:hover { background: var(--gold); }
html.modal-open { overflow: hidden; }

/* disegni */
.motif .ml { fill: none; stroke: var(--m-line); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.motif .mf { fill: var(--m-fill); stroke: var(--m-line); stroke-width: 1.5; }
.motif .ma { fill: var(--gold); }
.motif .mk { fill: none; stroke: var(--navy); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.motif .mt { fill: var(--navy); font: 800 14px var(--font-sans); } .motif .mt2 { font-size: 11px; fill: var(--m-ink); }
.motif .mb { fill: var(--m-bar); transform-box: fill-box; transform-origin: bottom; }
.motif .mbase { stroke: var(--m-line); stroke-width: 2; opacity: .4; stroke-linecap: round; }
.motif .mtrack { fill: none; stroke: var(--m-line); stroke-width: 6; opacity: .3; }
.motif .mring { fill: none; stroke: var(--gold); stroke-width: 6; stroke-linecap: round; }
.motif .mfl { fill: var(--gold); }
.motif .mp, .motif .mfly, .motif .mslide, .motif .mkey, .motif .mstar, .motif .mpulse2 { transform-box: fill-box; transform-origin: center; }
.motif .mring[style*="--vo"] { stroke-dasharray: 100; stroke-dashoffset: var(--vo); }
.motif .mpins { stroke: var(--m-line); opacity: .8; }

/* mosaico allineato (da 1100px): tre blocchi con bordi e spazi uguali.
   Blocco 1: una scheda alta a sinistra + una larga e due strette a destra. Blocco 2: lo stesso, a specchio.
   Blocco 3: tre schede in fila e, sotto, una fascia a tutta larghezza. Le schede della stessa riga hanno la stessa altezza. */
@media (min-width: 1100px) {
  .svcs { grid-template-columns: repeat(12, minmax(0, 1fr)); align-items: stretch; }
  .svc:nth-child(1) { grid-column: 1 / 5; grid-row: 1 / 3; }
  .svc:nth-child(2) { grid-column: 5 / 13; grid-row: 1; }
  .svc:nth-child(3) { grid-column: 5 / 9; grid-row: 2; }
  .svc:nth-child(4) { grid-column: 9 / 13; grid-row: 2; }
  .svc:nth-child(5) { grid-column: 1 / 9; grid-row: 3; }
  .svc:nth-child(6) { grid-column: 9 / 13; grid-row: 3 / 5; }
  .svc:nth-child(7) { grid-column: 1 / 5; grid-row: 4; }
  .svc:nth-child(8) { grid-column: 5 / 9; grid-row: 4; }
  .svc:nth-child(9) { grid-column: 1 / 5; grid-row: 5; }
  .svc:nth-child(10) { grid-column: 5 / 9; grid-row: 5; }
  .svc:nth-child(11) { grid-column: 9 / 13; grid-row: 5; }
  .svc:nth-child(12) { grid-column: 1 / 13; grid-row: 6; }
  /* schede orizzontali: disegno da un lato, testo dall'altro */
  .svc:is(:nth-child(2), :nth-child(5), :nth-child(12)) { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); }
  .svc:is(:nth-child(2), :nth-child(12)) .svc__art { order: 2; margin: 10px 10px 10px 0; }
  .svc:nth-child(5) .svc__art { margin: 10px 0 10px 10px; }
  .svc:is(:nth-child(2), :nth-child(5), :nth-child(12)) .svc__photo { height: 100%; aspect-ratio: auto; min-height: 240px; }
  .svc:is(:nth-child(2), :nth-child(5), :nth-child(12)) .svc__art--disegno { height: calc(100% - 0px); }
  .svc:nth-child(12) { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .svc:nth-child(12) .svc__body { justify-content: center; }
  .svc:nth-child(12) .svc__more { margin-top: 20px; }
  .svc:is(:nth-child(2), :nth-child(5), :nth-child(12)) .svc__dlg { grid-column: 1 / -1; }
  /* schede alte: la foto riempie lo spazio che resta sopra il testo */
  .svc:is(:nth-child(1), :nth-child(6)) .svc__art { flex: 1 1 auto; display: flex; }
  .svc:is(:nth-child(1), :nth-child(6)) .svc__photo { flex: 1; aspect-ratio: auto; min-height: 280px; }
  .svc:is(:nth-child(1), :nth-child(6)) .svc__body { flex: 0 0 auto; }
  .svc__n { font-size: 2.25rem; }
}
@media (max-width: 699.98px) { .svcs { grid-template-columns: 1fr; gap: 20px; } }

/* filtro per gruppi: i pulsanti sopra le schede (nascosti finché lo script non parte) */
.filtri { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-bottom: clamp(24px, 3vw, 40px); }
.filtri[hidden] { display: none; }
.filtro { min-height: 44px; padding: 10px 22px; font: inherit; font-size: 1rem; font-weight: 600; line-height: 1.3; color: var(--navy); background: #fff; border: 1px solid rgba(0, 64, 128, .12); border-radius: 999px; box-shadow: 0 1px 2px rgba(0, 38, 77, .06), 0 10px 22px -12px rgba(0, 38, 77, .3); cursor: pointer; transition: background-color .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease), transform .25s var(--ease); }
.filtro:hover { transform: translateY(-2px); border-color: rgba(0, 64, 128, .3); }
.filtro[aria-pressed="true"] { color: #fff; background: var(--navy); border-color: var(--navy); }
.svcs .svc.is-off { display: none !important; }
/* con un gruppo scelto il mosaico a posizioni fisse lascerebbe dei vuoti: le schede si dispongono in una griglia semplice, tutte con la stessa forma */
@media (min-width: 1100px) {
  .svcs.is-filtered { grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); }
  .svcs.is-filtered .svc { grid-column: auto; grid-row: auto; display: flex; }
  .svcs.is-filtered .svc .svc__art { order: 0; flex: none; display: block; margin: 10px 10px 0; }
  .svcs.is-filtered .svc .svc__photo { flex: none; height: auto; min-height: 0; aspect-ratio: 16 / 10; }
  .svcs.is-filtered .svc .svc__art--disegno { display: grid; height: auto; }
  .svcs.is-filtered .svc .svc__body { flex: 1 1 auto; justify-content: flex-start; }
}
/* mentre le schede volano via e rientrano (il movimento lo fa lo script): niente transizioni CSS che lo disturbino
   e niente scroll orizzontale se una scheda esce lateralmente dallo schermo */
html.is-filtering { overflow-x: hidden; }
html.is-filtering body { overflow-x: clip; }
html.is-filtering .svcs .svc { transition: none !important; }

/* movimento: ogni scheda sale al suo posto e il suo disegno prende vita; riparte a ogni rientro */
@media (prefers-reduced-motion: no-preference) {
  .js .svc { opacity: 0; transform: translateY(40px); transition: opacity .9s var(--ease), transform .9s var(--ease), box-shadow .5s var(--ease); }
  .js .svc:nth-child(even) { transition-delay: .12s, .12s, 0s; }
  .js .svc.is-in { opacity: 1; transform: none; }
  .js .svc.is-in:hover { transform: translateY(-8px); transition-delay: 0s; box-shadow: 0 2px 4px rgba(0, 38, 77, .08), 0 24px 44px -12px rgba(0, 38, 77, .3), 0 60px 100px -36px rgba(0, 38, 77, .45); }
  .svc:hover .svc__photo img { transform: scale(1.05); }
  .js .motif .md { stroke-dasharray: 100; stroke-dashoffset: 100; }
  .js .motif .mb { transform: scaleY(0); }
  .js .motif .mp { opacity: 0; scale: .5; }
  .js .motif .mfly { opacity: 0; translate: -50px 0; }
  .js .motif .mslide { opacity: 0; translate: -40px 0; }
  .js .motif .mdot { opacity: 0; }
  .svc.is-in .motif .md { animation: draw 1.5s var(--ease) .4s forwards; }
  .svc.is-in .motif .mring[style*="--vo"] { animation: draw-to 1.6s var(--ease) .6s forwards; }
  .svc.is-in .motif .mb { animation: grow .8s var(--ease) calc(.4s + var(--i) * .12s) forwards; }
  .svc.is-in .motif .mp { animation: pop-s .6s cubic-bezier(.3, 1.5, .5, 1) calc(.6s + var(--k, 0) * .25s) forwards; }
  .svc.is-in .motif .mfly { animation: land .8s var(--ease) .5s forwards; }
  .svc.is-in .motif .mslide { animation: land .8s var(--ease) .4s forwards; }
  .svc.is-in .motif .mdot { animation: fade .4s ease 1.8s forwards; }
  .svc.is-live .motif .mswing { transform-origin: 120px 52px; animation: balance 4s ease-in-out infinite; }
  .svc.is-live .motif .mkey { animation: key 3s ease-in-out infinite; }
  .svc.is-live .motif .mstar { animation: twinkle 2.4s ease-in-out infinite; }
  .svc.is-live .motif .mstar2 { animation-delay: 1.1s; }
  .svc.is-live .motif .mpulse2 { animation: beat 1.6s ease-in-out infinite; }
  .svc__dlg[open] { animation: dlg-in .35s var(--ease); }
  @keyframes pop-s { to { opacity: 1; scale: 1; } }
  @keyframes land { to { opacity: 1; translate: 0 0; } }
  @keyframes draw-to { to { stroke-dashoffset: var(--vo); } }
  @keyframes balance { 0%, 100% { transform: rotate(-5deg); } 50% { transform: rotate(5deg); } }
  @keyframes key { 0%, 100% { rotate: -8deg; } 50% { rotate: 8deg; } }
  @keyframes twinkle { 0%, 100% { opacity: .35; scale: .7; } 50% { opacity: 1; scale: 1.1; } }
  @keyframes beat { 0%, 100% { scale: 1; opacity: 1; } 50% { scale: 1.8; opacity: .5; } }
  @keyframes dlg-in { from { opacity: 0; transform: translateY(20px) scale(.97); } }
}

@media (prefers-reduced-motion: reduce) { .map-car { display: none; } }

/* contatti: pannello blu a 2/3 e modulo a 1/3 sulla stessa riga */
.contact-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(16px, 2vw, 24px); }
@media (min-width: 1100px) { .contact-row { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); } .contact-row .cal { width: min(100%, 300px); } }
.form-card { display: flex; flex-direction: column; gap: 16px; padding: clamp(24px, 1.2rem + 1.5vw, 36px); border-radius: 32px; background: #fff; color: var(--navy);
  box-shadow: 0 2px 4px rgba(0, 38, 77, .1), 0 30px 60px -20px rgba(0, 38, 77, .35); border: 1px solid rgba(0, 64, 128, .12); }
.form-card h3 { font-size: var(--fs-h3); }
.form-card__intro { margin-top: -8px; color: var(--ink-2); font-size: var(--fs-small); }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: var(--fs-small); font-weight: 600; }
.field__opt { font-weight: 400; color: var(--ink-2); }
.field input:not([type=checkbox]), .field textarea { width: 100%; min-height: 48px; padding: 10px 14px; font: inherit; font-size: 1rem; color: var(--navy); background: #fff; border: 1.5px solid rgba(0, 64, 128, .35); border-radius: var(--radius-btn); }
.field textarea { min-height: 112px; resize: vertical; }
.field input:not([type=checkbox]):focus-visible, .field textarea:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; border-color: var(--navy); }
.field--check { flex-direction: row; align-items: flex-start; gap: 12px; }
.field--check input { flex: none; width: 24px; height: 24px; margin: 2px 0 0; accent-color: var(--blue, #004080); }
.field--check label { font-weight: 400; line-height: 1.4; }
.field--err input:not([type=checkbox]), .field--err textarea { border-color: #b3261e; }
.field__msg { color: #b3261e; font-size: var(--fs-small); font-weight: 600; }
.form-card__btn { width: 100%; }
.form-card__btn[disabled] { opacity: .7; cursor: progress; }
.form-card__stato { min-height: 1.4em; font-size: var(--fs-small); font-weight: 600; }
.form-card__stato.is-ok { color: #0a6b3a; } .form-card__stato.is-err { color: #b3261e; }

/* versione compatta della riga contatti */
.form-card { gap: 10px; padding: clamp(20px, 1rem + 1vw, 28px); border-radius: 28px; }
.form-card__intro { display: none; }
.form-card .field { gap: 4px; }
.form-card .field label { font-size: .875rem; }
.form-card .field input:not([type=checkbox]), .form-card .field textarea { min-height: 44px; padding: 8px 12px; }
.form-card .field textarea { min-height: 72px; }
.form-card .field--check { gap: 10px; margin-top: 2px; }
.form-card .field--check label { font-size: .875rem; }
.form-card__btn { min-height: 48px; }
.form-card__stato { min-height: 0; }
.form-card__stato:empty { display: none; }
@media (min-width: 1100px) {
  .contact-row .cta-panel { padding: clamp(24px, 1rem + 1.5vw, 40px); gap: 20px; }
  .contact-row .cta-panel h2 { font-size: clamp(1.75rem, 1rem + 1.6vw, 2.5rem); }
  .contact-row .cta-panel .lead { margin-top: 10px; font-size: 1.0625rem; }
  .contact-row .contact__cta { margin-top: 20px; gap: 10px; }
  .contact-row .contact__nota { margin-top: 14px; }
  .contact-row .cal { width: min(100%, 260px); padding: 14px; }
}
.form-card .field textarea { height: 76px; }
