/* ==========================================================================
   Christmas Shopping Night 2026 — Aeroporti di Roma
   Stili condivisi da index.html (landing) e iscrizione.html (form).
   Token dal design system "ADR.it | Design System" (file Figma ADR Phygital).
   Breakpoint mobile: max-width 599px (come il design system).
   EventAccess: usato da tutte le pagine pubbliche (landing, iscrizione, informativa, assistenza).
   ========================================================================== */

/* ---------- Font (self-hosted: la CSP ammette solo 'self') ---------- */
@font-face { font-family: "Gabarito"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("../fonts/gabarito-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Gabarito"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("../fonts/gabarito-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Gantari"; font-style: italic; font-weight: 500; font-display: swap;
  src: url("../fonts/gantari-italic-latin.woff2") format("woff2"); }

/* ---------- Token ---------- */
:root {
  /* Colori ADR */
  --pri-blu: #004996;            /* Pri_Blu — azioni primarie, link */
  --sec-darkblue: #052a5d;       /* Sec_DarkBlue — titoli, fondi scuri */
  --sec-lightblue: #e6edf5;      /* Sec_Backgroud_LightBlue — sezione "Come partecipare" */
  --icone: #007ef6;              /* Icone — barra e icona dei messaggi, focus */
  --feedback-error: #e0073b;
  --feedback-success: #00882e;

  /* Scala di grigi */
  --grey-01-black: #15161c;      /* testo corrente */
  --grey-03-darkgrey: #415264;   /* testo secondario, bordi campi */
  --grey-04-grey: #8ea0b4;       /* progress indicator inattivo */
  --grey-06-lightergrey: #dee7f1;/* divisori, bordi card */
  --grey-07-greywhite: #f2f6fa;  /* fondi chiari (vantaggi, FAQ, form) */
  --white: #ffffff;

  /* Tipografia */
  --font-sans: "Gabarito", system-ui, sans-serif;
  --font-italic: "Gantari", system-ui, sans-serif;

  /* Forme e ombre */
  --radius-4: 4px;
  --radius-8: 8px;
  --radius-32: 32px;
  --radius-56: 56px;
  --high-shadow: 0 8px 12px 0 #15161c40;
  --raised-shadow: 0 -6px 12px 0 #15161c14;  /* ombra verso l'alto delle sezioni "in rialzo" */

  --container: 1200px;
  --container-narrow: 880px;
  --container-form: 760px;
  --gutter: 24px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--grey-01-black);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--pri-blu); }
a:hover { color: var(--sec-darkblue); }
:focus-visible { outline: 3px solid var(--icone); outline-offset: 2px; }
h1, h2, h3, p, ol, ul, dl, dd { margin: 0; }
[hidden] { display: none !important; }

.container { max-width: var(--container); margin: 0 auto; }
.stack { display: flex; flex-direction: column; gap: 24px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.italic { font-family: var(--font-italic); font-style: italic; font-weight: 500; }
.section-title { font-size: 36px; line-height: 42px; font-weight: 700; color: var(--sec-darkblue); } /* desktop-H3 */
.center { text-align: center; }

/* ---------- Bottoni (PrimaryButton / SecondaryButton del DS) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 var(--gutter);
  border: 1px solid transparent; border-radius: var(--radius-4);
  font-family: var(--font-sans); font-size: 18px; line-height: 19px; font-weight: 500;
  text-decoration: none; cursor: pointer;
  transition: background-color .15s ease;
}
.btn--primary { background: var(--pri-blu); color: var(--white); }
.btn--primary:hover { background: var(--sec-darkblue); color: var(--white); }
.btn--secondary { background: rgba(242, 246, 250, .7); color: var(--pri-blu); border-color: var(--pri-blu); }
.btn--secondary:hover { background: var(--sec-lightblue); color: var(--pri-blu); }

/* ---------- Tag (variante bordo su fondo scuro) ---------- */
.tag-outline {
  display: inline-flex; align-items: center; height: 28px; padding: 0 8px;
  border: 1px solid var(--white); border-radius: var(--radius-4);
  font-size: 12px; font-weight: 600; color: var(--white);
}

/* ---------- Barra superiore con logo ADR (Header DS, versione bianca) ---------- */
.site-top { background: var(--white); border-bottom: 1px solid var(--grey-06-lightergrey); padding: 12px var(--gutter); }
.site-top__inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.logo { height: 38px; width: auto; }
/* Unico link dell'header della landing: porta alla sezione FAQ, che termina con il link all'assistenza */
.top-link { display: inline-flex; align-items: center; min-height: 44px; font-size: 16px; line-height: 20px; font-weight: 500;
            color: var(--pri-blu); text-decoration: underline; text-underline-offset: 3px; }  /* come .link-tertiary */
.top-link:hover { color: var(--sec-darkblue); }
.back-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: 16px; font-weight: 500; text-decoration: none; }

/* ---------- Messaggio informativo (stile messaggi adr.it) ---------- */
.msg {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--grey-07-greywhite);
  border-left: 4px solid var(--icone);
  border-radius: 0 var(--radius-4) var(--radius-4) 0;
  padding: 16px 20px; color: var(--grey-01-black);
}
.msg__icon { flex: none; color: var(--icone); margin-top: 1px; }
.msg__body { display: flex; flex-direction: column; gap: 8px; font-size: 16px; line-height: 22px; min-width: 0; }
.msg__title { font-size: 18px; line-height: 24px; font-weight: 700; color: var(--sec-darkblue); }

/* ---------- Footer ---------- */
.site-footer { background: var(--sec-darkblue); color: var(--white); padding: 32px var(--gutter); }
.site-footer a { color: var(--white); }
.site-footer a:hover { color: var(--grey-06-lightergrey); }
/* Footer essenziale: logo bianco a sinistra, due link a destra (Assistenza, Informativa privacy) */
.site-footer__inner { display: flex; justify-content: space-between; align-items: center; gap: 16px 24px; flex-wrap: wrap; }
.site-footer__nav { display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 14px; line-height: 18px; }
@media (max-width: 599px) {
  /* su mobile i 4 link vanno su una griglia 2 × 2 sotto il logo */
  .site-footer__nav { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 24px; width: 100%; }
}

/* ==========================================================================
   LANDING — index.html
   ========================================================================== */

/* ---------- Hero ----------
   Sfondo: banner dell'agenzia. Desktop hero-desktop.jpg (soggetto a destra, SENZA label),
   mobile hero-mobile.jpg (soggetto in basso, testo in alto, SENZA label: tolta il 10/11/2026 perché illeggibile).
   La label "AI GENERATED" è testo HTML (.hero__ai) a tutte le larghezze: non rimuoverla (compliance). */
.hero {
  position: relative;
  color: var(--white);
  background-color: var(--sec-darkblue);
  background-image: url("../img/hero-desktop.jpg");
  background-size: cover;
  background-position: right center;
}
.hero__overlay {
  min-height: 400px; padding: 40px var(--gutter) 56px; display: flex;
  /* velo grigio uniforme, come gli hero di adr.it (Grey_01 #15161c).
     Su desktop al 25%: il banner ha già una vignettatura scura ai lati. */
  background: rgba(21,22,28,.25);
}
.hero__box { flex: 1; max-width: var(--container); margin: 0 auto; display: flex; flex-direction: column; justify-content: flex-end; }
.hero__text { display: flex; flex-direction: column; gap: 16px; max-width: 720px; }  /* titolo su una riga */
.hero__date { font-size: 24px; line-height: 30px; font-weight: 600; color: var(--white); }   /* sopra il titolo */
.hero__title { font-size: 54px; line-height: 60px; font-weight: 700; }   /* desktop-H1 */
.hero__sub { font-size: 20px; line-height: 26px; }   /* su desktop sta su una riga */   /* desktop-B1-reg */

/* Label "AI GENERATED" (obbligatoria per compliance): testo HTML verticale sul bordo destro,
   sempre visibile a qualsiasi larghezza desktop perché non dipende dal ritaglio dell'immagine. */
.hero__ai {
  position: absolute; right: 20px; top: 50%;
  transform: translateY(-50%) rotate(180deg); writing-mode: vertical-rl;
  font-size: 11px; line-height: 1; font-weight: 500; letter-spacing: .06em; text-transform: uppercase;
  color: rgba(255,255,255,.9); pointer-events: none;
}

/* Smartphone con "sito desktop": la pagina è larga ~980px ma lo schermo è da telefono (device-width < 600), quindi
   tutto viene rimpicciolito al ~40%. La label (compliance) va ingrandita per restare leggibile (~10px reali). */
@media (min-width: 600px) and (max-device-width: 599px) {
  .hero__ai { font-size: 24px; right: 24px; }
}

/* Laptop e tablet (600–1599px): stesso layout del desktop, hero alto 400px (non reintrodurre un layout diverso).
   L'immagine è alta quanto l'hero e viene spostata in modo che l'albero resti intorno al 78% della larghezza,
   lontano dal testo a sinistra; il clamp evita bordi scoperti ai lati. */
@media (min-width: 600px) and (max-width: 1599px) {
  .hero { background-size: auto 100%;
          background-position: clamp(calc(100vw - 1600px), calc(78vw - 1072px), 0px) center; }
  .hero__overlay { background: linear-gradient(90deg, rgba(21,22,28,.55) 0%, rgba(21,22,28,.25) 65%); }
}
@media (min-width: 600px) and (max-width: 1023px) {
  .hero__date { font-size: 20px; line-height: 26px; }
  .hero__title { font-size: 42px; line-height: 48px; }
  .hero__sub { font-size: 18px; line-height: 24px; max-width: 420px; }
}

/* ---------- Come partecipare (fondo azzurro) ---------- */
.how { background: var(--sec-lightblue); padding: 56px var(--gutter) 112px; }
.how__inner { display: flex; flex-direction: column; gap: 32px; }
.steps {
  list-style: none; padding: 0; margin: 0 auto; width: 100%; max-width: 1040px;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px;
}
.step { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 16px; padding: 0 8px; }
.step__num {
  width: 72px; height: 72px; border-radius: var(--radius-56); background: var(--white);
  display: flex; align-items: center; justify-content: center;
  color: var(--sec-darkblue); font-size: 30px; line-height: 1; font-weight: 700;
}
.step__title { font-size: 22px; line-height: 28px; font-weight: 600; color: var(--grey-01-black); }
.step__text { font-size: 16px; line-height: 22px; margin-top: 6px; }
/* Pallini di posizione del carosello step: visibili solo su mobile */
.steps-dots { display: none; justify-content: center; gap: 8px; margin-top: -8px; }
.steps-dots span { width: 8px; height: 8px; border-radius: var(--radius-56); background: var(--grey-04-grey); transition: width .2s ease; }
.steps-dots span.is-active { width: 24px; background: var(--sec-darkblue); }

/* ---------- Sezioni "in rialzo" con angoli arrotondati ---------- */
.raised {
  position: relative; z-index: 1;
  margin-top: -56px;
  border-radius: var(--radius-56) var(--radius-56) 0 0;
  box-shadow: var(--raised-shadow);
}

/* ---------- Info utili (fondo bianco) ---------- */
.info { background: var(--white); padding: 64px var(--gutter) 72px; }
.info__inner { display: flex; flex-direction: column; gap: 40px; }
.info-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.info-card {
  background: var(--white); border: 1px solid var(--grey-06-lightergrey); border-radius: var(--radius-8);
  padding: 32px 24px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 16px;
}
.info-card__icon { width: 64px; height: 64px; }
.info-card__title { font-size: 20px; line-height: 26px; font-weight: 700; color: var(--sec-darkblue); }
.info-card__list { list-style: none; padding: 0; margin-top: 8px; display: flex; flex-direction: column; gap: 4px; font-size: 16px; line-height: 22px; }

/* ---------- Vantaggi esclusivi ---------- */
.perks { background: var(--grey-07-greywhite); padding: 64px var(--gutter); }
.perks__inner { display: flex; flex-direction: column; gap: 32px; }
.perks__intro { display: flex; flex-direction: column; gap: 12px; align-items: center; text-align: center; }
.perks__lead { font-size: 18px; line-height: 26px; }
.perks__list { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.perk { background: var(--white); border: 1px solid var(--grey-06-lightergrey); border-radius: var(--radius-8); padding: 32px 24px;
        display: flex; flex-direction: column; gap: 12px; align-items: center; text-align: center; }  /* come le card info */
.perk__icon { flex: none; width: 64px; height: 64px; display: flex; align-items: center; justify-content: center; }  /* niente sfondo */
.perk__icon img { display: block; width: 64px; height: 64px; }
.perk__title { font-size: 20px; line-height: 26px; font-weight: 700; color: var(--sec-darkblue); }
.perk__text { font-size: 16px; line-height: 22px; }
.perks__note { font-size: 14px; line-height: 18px; color: var(--grey-03-darkgrey); text-align: center; }

/* ---------- Carosello loghi ---------- */
.logos { background: var(--white); padding: 56px 0 112px; }  /* spazio sotto per la stondatura di "Come partecipare" */
.logos__head { max-width: var(--container); margin: 0 auto 24px; padding: 0 var(--gutter); text-align: center; }
.marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
/* La traccia contiene i loghi due volte: lo scorrimento di -50% rende il giro continuo */
.marquee__track { display: flex; align-items: center; width: max-content; animation: marquee 110s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.logo-slot { flex: none; display: flex; align-items: center; justify-content: center; height: 72px; padding: 0 32px; }
.logo-slot img { max-width: none; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .marquee__track { animation: none; }
  .marquee { overflow-x: auto; }
}
/* Variante opzionale: loghi in grigio, a colori al passaggio del mouse (aggiungere .logos--mono alla sezione) */
.logos--mono .logo-slot img { filter: grayscale(1); opacity: .7; transition: filter .2s, opacity .2s; }
.logos--mono .logo-slot:hover img { filter: none; opacity: 1; }

/* ---------- FAQ (accordion nativo) ---------- */
.faq { background: var(--grey-07-greywhite); padding: 80px var(--gutter); scroll-margin-top: 16px; }
.faq__inner { max-width: var(--container-narrow); margin: 0 auto; display: flex; flex-direction: column; gap: 40px; }
.faq__intro { display: flex; flex-direction: column; gap: 12px; align-items: center; text-align: center; }
.faq__lead { font-size: 18px; line-height: 26px; }
/* FAQ divise in 3 macrocategorie, ognuna con il suo accordion */
.faq__group { display: flex; flex-direction: column; gap: 16px; }
.faq__cat { font-size: 22px; line-height: 28px; font-weight: 700; color: var(--sec-darkblue); }
.faq__help { text-align: center; font-size: 18px; line-height: 26px; }
/* Link terziario: testo blu sottolineato, senza bordo né sfondo */
.link-tertiary { color: var(--pri-blu); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }
.link-tertiary:hover { color: var(--sec-darkblue); }
.faq__list { background: var(--white); border-radius: var(--radius-8); overflow: hidden; }
.faq__item { border-bottom: 1px solid var(--grey-06-lightergrey); }
.faq__item:last-child { border-bottom: 0; }
.faq__q {
  list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 22px 24px; cursor: pointer; font-size: 20px; line-height: 26px; font-weight: 500;
}
.faq__q::-webkit-details-marker { display: none; }
.faq__q:hover { background: var(--grey-07-greywhite); }
.faq__chevron { flex: none; transition: transform .2s ease; }
.faq__item[open] .faq__chevron { transform: rotate(180deg); }
.faq__a { padding: 0 24px 24px; font-size: 18px; line-height: 26px; display: flex; flex-direction: column; gap: 12px; }

/* ---------- CTA sticky ----------
   Visibile da subito (desktop e mobile), agganciata al fondo dello schermo.
   Deve stare tra </main> e <footer>, non dentro una sezione. */
.sticky-cta {
  /* --cookie-h: altezza dell'informativa cookie (cookie-banner.js), così la CTA resta visibile sopra */
  position: sticky; bottom: var(--cookie-h, 0px); z-index: 5;
  display: flex; justify-content: center;
  padding: 12px var(--gutter);
  background: rgba(255, 255, 255, .96);
  border-top: 1px solid var(--grey-06-lightergrey);
}
.sticky-cta .btn { min-width: 280px; }
/* Schermi bassi (portatili con zoom 150%, smartphone in orizzontale): la barra coprirebbe l'intestazione.
   Lì il bottone sta anche nell'hero e la barra si nasconde finché quel bottone è a vista (landing.js). */
.hero__cta { display: none; }
/* 540px = barra in alto (68) + hero (400) + barra CTA (72): sotto questa altezza la barra coprirebbe titolo e label AI
   (es. smartphone in orizzontale con "sito desktop", 980×453) */
@media (max-height: 540px) {
  .hero__cta { display: inline-flex; align-self: flex-start; }
  /* testo in alto: con l'hero desktop (testo in basso) il bottone finirebbe sotto la piega e sotto la barra */
  .hero__box { justify-content: flex-start; }
  .hero__overlay { padding-top: 20px; }
  .hero__text { gap: 12px; }
  .sticky-cta.is-off { visibility: hidden; }
}

/* ---------- Informativa cookie ----------
   Fissa in basso finché non si preme "Ho capito"; la CTA sticky sale sopra di lei (--cookie-h);
   cookie-banner.js mette la classe cookie-ok su <html> prima del rendering, così non lampeggia. */
.cookie-banner {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  background: var(--white); color: var(--grey-01-black);
  border-top: 1px solid var(--grey-06-lightergrey);
  box-shadow: 0 -4px 16px rgba(21, 22, 28, .12);
  padding: 16px var(--gutter);
}
.cookie-ok .cookie-banner { display: none; }
.cookie-banner__inner { max-width: var(--container); margin: 0 auto; display: flex; align-items: center; gap: 16px 24px; }
.cookie-banner__text { margin: 0; font-size: 14px; line-height: 20px; flex: 1; }
/* the notice sits inside the footer: override its white links */
.site-footer .cookie-banner a { color: var(--pri-blu); text-decoration: underline; }
.site-footer .cookie-banner a:hover { color: var(--sec-darkblue); }
.cookie-banner__btn { flex: none; min-width: 160px; }
@media (max-width: 599px) {
  .cookie-banner__inner { flex-direction: column; align-items: stretch; }
  .cookie-banner__btn { width: 100%; }
}

/* ==========================================================================
   FORM — iscrizione.html
   ========================================================================== */
.page-form { background: var(--grey-07-greywhite); }

.form-hero { background: var(--sec-darkblue); color: var(--white); padding: 48px var(--gutter); }
.form-hero__inner { max-width: var(--container-form); margin: 0 auto; display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.form-hero__title { font-size: 42px; line-height: 48px; font-weight: 700; } /* desktop-H2 */

.form-main { padding: 40px var(--gutter) 80px; }
.form-main__inner { max-width: var(--container-form); margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }

/* Progress indicator (step bar ADR) */
.progress { list-style: none; padding: 0; margin-bottom: 8px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.progress__step { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.progress__step + .progress__step::before {
  content: ""; position: absolute; top: 16px;
  right: calc(50% + 26px); width: calc(100% - 52px);
  border-top: 1px dashed var(--grey-04-grey);
}
.progress__box {
  width: 32px; height: 32px; border-radius: var(--radius-4);
  border: 1px solid var(--grey-04-grey); background: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 500; color: var(--grey-03-darkgrey);
}
.progress__check { display: none; }
.progress__label { font-size: 12px; line-height: 16px; font-weight: 500; text-transform: uppercase; color: var(--grey-03-darkgrey); }
.progress__step.is-current .progress__box { border: 2px solid var(--sec-darkblue); color: var(--sec-darkblue); font-weight: 700; }
.progress__step.is-current .progress__label { font-weight: 700; color: var(--grey-01-black); }
.progress__step.is-done .progress__box { border-color: var(--sec-lightblue); background: var(--sec-lightblue); }
.progress__step.is-done .progress__num { display: none; }
.progress__step.is-done .progress__check { display: block; }

/* Card bianca (form, riepilogo, conferma) */
.panel { background: var(--white); border-radius: var(--radius-8); padding: 32px; display: flex; flex-direction: column; gap: 36px; }
.panel--tight { gap: 24px; }
.panel__title { font-size: 30px; line-height: 34px; font-weight: 700; color: var(--sec-darkblue); } /* desktop-H4 */
.panel__intro { display: flex; flex-direction: column; gap: 8px; font-size: 16px; line-height: 22px; }

/* Campi */
.fieldset { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.fieldset__legend { padding: 0; margin-bottom: 8px; font-size: 24px; line-height: 30px; font-weight: 700; color: var(--sec-darkblue); } /* desktop-H5 */
.help { font-size: 16px; line-height: 22px; color: var(--grey-03-darkgrey); }
.help--small { font-size: 14px; line-height: 18px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field__label { font-size: 16px; font-weight: 500; }
.input {
  width: 100%; height: 48px; padding: 0 14px;
  border: 1px solid var(--grey-03-darkgrey); border-radius: var(--radius-4);
  background: var(--white); color: var(--grey-01-black);
  font-family: var(--font-sans); font-size: 16px;
}
.input::placeholder { color: var(--grey-03-darkgrey); }
.input:focus { outline: 2px solid var(--pri-blu); outline-offset: 0; border-color: var(--pri-blu); }
.input[aria-invalid="true"] { border-color: var(--feedback-error); }
.error { font-size: 14px; line-height: 18px; font-weight: 500; color: var(--feedback-error); }

.choice-group { display: flex; flex-direction: column; gap: 4px; border: 0; margin: 0; padding: 0; min-width: 0; }
.choice-group__label { font-size: 16px; font-weight: 500; margin-bottom: 6px; padding: 0; }
.choice { display: flex; align-items: center; gap: 12px; min-height: 44px; font-size: 16px; cursor: pointer; }
.choice--top { align-items: flex-start; line-height: 22px; min-height: 0; }
.choice input { accent-color: var(--pri-blu); width: 20px; height: 20px; margin: 0; flex: none; }
.choice--top input { margin-top: 1px; }

/* Chips (Chi stai iscrivendo?) */
.chips { display: flex; flex-wrap: wrap; gap: 12px; }
.chip {
  display: inline-flex; align-items: center; min-height: 44px; padding: 8px 16px;
  border-radius: var(--radius-32); border: 1px solid transparent;
  background: rgba(230, 237, 245, .6); color: var(--grey-01-black);
  font-family: var(--font-sans); font-size: 16px; line-height: 20px; cursor: pointer;
}
.chip:hover { background: var(--sec-lightblue); }
.chip[aria-pressed="true"] { background: var(--sec-lightblue); border-color: var(--sec-darkblue); color: var(--sec-darkblue); font-weight: 600; }

.form-footer { display: flex; flex-direction: column; gap: 20px; border-top: 1px solid var(--grey-06-lightergrey); padding-top: 28px; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.form-actions--end { justify-content: flex-end; }
.required-note { font-size: 14px; color: var(--grey-03-darkgrey); }

/* Riepilogo */
.summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; }
.summary__row--wide { grid-column: 1 / -1; }
@media (max-width: 599px) { .summary { grid-template-columns: minmax(0, 1fr); } }
.summary__row { padding: 14px 0; border-bottom: 1px solid var(--grey-06-lightergrey); display: flex; flex-direction: column; gap: 4px; }
.summary__label { font-size: 14px; line-height: 18px; color: var(--grey-03-darkgrey); }
.summary__value { font-size: 18px; line-height: 24px; font-weight: 500; overflow-wrap: anywhere; }

/* Conferma */
.success-head { display: flex; gap: 16px; align-items: flex-start; }
.success-head__icon { width: 48px; height: 48px; flex: none; border-radius: var(--radius-56); background: var(--feedback-success); display: flex; align-items: center; justify-content: center; }
.success-head__text { display: flex; flex-direction: column; gap: 6px; font-size: 18px; line-height: 26px; }
.next-steps { display: flex; flex-direction: column; gap: 14px; }
.next-steps h3 { font-size: 20px; line-height: 26px; font-weight: 700; }
.next-steps ol { padding-left: 22px; display: flex; flex-direction: column; gap: 10px; font-size: 16px; line-height: 22px; }
.another { border-top: 1px solid var(--grey-06-lightergrey); padding-top: 24px; display: flex; flex-direction: column; gap: 16px; }
.another__text { display: flex; flex-direction: column; gap: 6px; font-size: 16px; line-height: 22px; }
.another__title { font-size: 20px; line-height: 26px; font-weight: 700; color: var(--sec-darkblue); }
.another__btns { display: flex; flex-wrap: wrap; gap: 16px; }

/* ---------- EventAccess: aggiunte per le pagine server-side ---------- */
.skip { position: absolute; left: -9999px; top: 8px; z-index: 10; background: var(--white); padding: 8px 12px; }
.skip:focus { left: 8px; }
/* Chips con radio nativo (funzionano senza JS) */
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.chip:has(input:checked) { background: var(--sec-lightblue); border-color: var(--sec-darkblue); color: var(--sec-darkblue); font-weight: 600; }
.chip:has(input:focus-visible) { outline: 3px solid var(--icone); outline-offset: 2px; }
.msg--error { border-left-color: var(--feedback-error); }
.msg--error .msg__icon { color: var(--feedback-error); }
textarea.input { height: auto; min-height: 140px; padding: 12px 14px; line-height: 22px; resize: vertical; }
select.input { appearance: auto; }
.prose { font-size: 16px; line-height: 24px; white-space: pre-line; }
.hero__note { font-size: 16px; line-height: 22px; color: var(--grey-06-lightergrey); }
/* Fix handoff: gli .sr-only (position: absolute) degli step fuori vista sfuggivano al ritaglio del carosello mobile,
   la pagina si allargava (748px su 390) e la CTA sticky finiva fuori schermo. */
.steps { position: relative; }
/* Calendario dei campi data (datepicker.js): icona dentro il campo, popup sotto; il campo non cambia misure */
.datefield { position: relative; }
.datefield .input { padding-right: 48px; }
.datefield__btn { position: absolute; top: 0; right: 0; width: 48px; height: 48px; display: flex; align-items: center; justify-content: center;
                  border: 0; background: none; color: var(--pri-blu); cursor: pointer; border-radius: var(--radius-4); }
.datefield__btn:focus-visible { outline: 2px solid var(--pri-blu); outline-offset: -4px; }
.datepop { position: absolute; z-index: 20; top: calc(100% + 4px); left: 0; width: 320px; max-width: calc(100vw - 2 * var(--gutter));
           background: var(--white); border: 1px solid var(--grey-06-lightergrey); border-radius: var(--radius-8);
           box-shadow: var(--high-shadow); padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.datepop__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.datepop__nav, .datepop__title { min-width: 44px; min-height: 44px; border: 0; background: none; border-radius: var(--radius-4);
                                 font: inherit; font-weight: 600; color: var(--sec-darkblue); cursor: pointer; }
.datepop__nav { font-size: 24px; }
.datepop__title:disabled { cursor: default; }
.datepop__nav:hover, .datepop__title:not(:disabled):hover, .datepop__cell:not(:disabled):hover { background: var(--sec-lightblue); }
.datepop__grid { display: grid; gap: 4px; }
.datepop__grid--days { grid-template-columns: repeat(7, 1fr); }
.datepop__grid--months, .datepop__grid--years { grid-template-columns: repeat(3, 1fr); }
.datepop__dow { text-align: center; font-size: 12px; color: var(--grey-03-darkgrey); padding: 4px 0; }
.datepop__cell { min-height: 40px; border: 0; background: none; border-radius: var(--radius-4); font: inherit; color: var(--grey-01-black); cursor: pointer; }
.datepop__grid--months .datepop__cell, .datepop__grid--years .datepop__cell { min-height: 48px; }
.datepop__cell.is-today { box-shadow: inset 0 0 0 1px var(--pri-blu); }
.datepop__cell.is-outside { color: var(--grey-03-darkgrey); }
.datepop__cell.is-selected { background: var(--pri-blu); color: var(--white); font-weight: 600; }
.datepop__cell:disabled { color: var(--grey-04-grey); cursor: not-allowed; }
.datepop__cell:focus-visible, .datepop__nav:focus-visible, .datepop__title:focus-visible { outline: 2px solid var(--pri-blu); outline-offset: 1px; }
.datepop__foot { display: flex; align-items: center; gap: 8px; border-top: 1px solid var(--grey-06-lightergrey); padding-top: 8px; }
.datepop__value { flex: 1; font-size: 14px; color: var(--grey-03-darkgrey); }
.datepop__foot .btn { min-width: 0; padding: 0 14px; }
@media (max-width: 599px) {
  /* smartphone: popup a tutta larghezza in basso, sopra la CTA */
  .datepop { position: fixed; top: auto; left: 0; right: 0; bottom: 0; width: auto; max-width: none; z-index: 30;
             border-radius: var(--radius-8) var(--radius-8) 0 0; padding: 16px var(--gutter) calc(16px + env(safe-area-inset-bottom)); }
}

/* ==========================================================================
   MOBILE (≤ 599px)
   ========================================================================== */
@media (max-width: 599px) {
  :root { --gutter: 16px; }

  .site-top { padding: 10px var(--gutter); }
  .logo--top { height: 27px; }                 /* misura SiteHeader mobile */
  .top-link { font-size: 14px; }
  .section-title { font-size: 32px; line-height: 38px; }

  /* mobile: label HTML anche qui (tolta da hero-mobile.jpg, dove era troppo piccola): in basso a destra, sul banner, lontano dal testo */
  .hero__ai { top: auto; bottom: 24px; right: 12px; transform: rotate(180deg); text-shadow: 0 0 4px rgba(0,0,0,.6); }
  .hero {
    /* se il testo allunga l'hero, sopra il banner c'è il colore della sua prima riga (#141f3c),
       sfumato sui primi 80px dell'immagine per non vedere lo stacco */
    background-color: #141f3c;
    background-image:
      linear-gradient(to bottom, #141f3c calc(100% - 100vw * 1260 / 1170), rgba(20,31,60,0) calc(100% - 100vw * 1260 / 1170 + 80px)),
      url("../img/hero-mobile.jpg");
    background-size: 100% 100%, 100% auto; background-repeat: no-repeat;
    background-position: center bottom;
  }
  .hero__overlay {
    /* almeno alto quanto il banner mobile (1170 × 1260), testo in alto. Il 60% inferiore del banner
       (64.6% della larghezza: albero e label .hero__ai) resta libero dal testo,
       e se il testo è più lungo l'hero cresce verso l'alto invece di coprirli. */
    min-height: calc(100vw * 1260 / 1170); padding: 24px var(--gutter) 64.6%;
    background: rgba(21,22,28,.4);
  }
  .hero__box { justify-content: flex-start; }
  .hero__text { gap: 10px; align-items: center; text-align: center; margin: 0 auto; }  /* mobile: testi centrati */
  .hero__date { font-size: 18px; line-height: 24px; }
  .hero__sep { display: none; }                /* mobile: orario su una riga a sé */
  .hero__time { display: block; }
  .hero__title { font-size: 32px; line-height: 38px; }   /* mobile-H2 */
  .hero__sub { font-size: 18px; line-height: 24px; }

  .how { padding: 40px var(--gutter) 88px; }
  /* Come partecipare diventa un carosello orizzontale (swipe + avanzamento automatico, vedi landing.js) */
  .steps {
    display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory;
    margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter) 4px; width: auto; max-width: none;
    scrollbar-width: none;
  }
  .steps::-webkit-scrollbar { display: none; }
  .step { flex: 0 0 84%; scroll-snap-align: center; padding: 0 8px; }
  .step__num { width: 64px; height: 64px; font-size: 26px; }
  .steps-dots { display: flex; }

  .raised { margin-top: -48px; border-radius: var(--radius-32) var(--radius-32) 0 0; }

  .info { padding: 40px var(--gutter) 48px; }
  .info__inner { gap: 36px; }
  .info-cards { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .info-card { padding: 24px 16px; }
  .info-card__icon { width: 56px; height: 56px; }

  .perks { padding: 40px var(--gutter); }
  /* Vantaggi diventano un carosello orizzontale come gli step (vedi landing.js) */
  .perks__list {
    display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory;
    margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter) 4px;
    scrollbar-width: none;
  }
  .perks__list::-webkit-scrollbar { display: none; }
  .perk { flex: 0 0 84%; scroll-snap-align: center; padding: 24px 16px; }
  .perks .steps-dots { margin-top: -16px; }
  .perk__icon, .perk__icon img { width: 56px; height: 56px; }

  .logos { padding: 40px 0 92px; }
  .logos__head { padding: 0 var(--gutter); }
  .logo-slot { height: 64px; padding: 0 20px; }

  .faq { padding: 56px var(--gutter); }
  .faq__cat { font-size: 20px; line-height: 26px; }
  .faq__lead { font-size: 16px; line-height: 22px; }
  .faq__help { font-size: 16px; line-height: 22px; }
  .faq__q { padding: 18px 16px; font-size: 18px; line-height: 24px; }
  .faq__a { padding: 0 16px 20px; font-size: 16px; line-height: 22px; }

  .sticky-cta .btn { flex: 1 1 auto; min-width: 0; }

  .form-hero { padding: 32px var(--gutter); }
  .form-hero__title { font-size: 32px; line-height: 38px; }
  .form-main { padding: 24px var(--gutter) 56px; }
  .panel { padding: 24px 16px; gap: 28px; }
  .panel__title { font-size: 22px; line-height: 26px; }
  .fieldset__legend { font-size: 20px; line-height: 26px; }
  .form-actions .btn, .another__btns .btn { width: 100%; }
}

/* Unsubscribe form (ADR / Easy Parking): shorter blue band, tighter spacing, large tap targets */
.page-pref { min-height: 100vh; display: flex; flex-direction: column; } /* footer stays at the bottom on short pages */
.page-pref main { flex: 1 0 auto; }
.form-hero--compact { padding: 28px var(--gutter); }
.form-hero--compact .form-hero__inner { gap: 12px; }
.form-hero--compact .form-hero__title { font-size: 32px; line-height: 38px; }
.pref-logo { display: block; height: 40px; width: auto; }
.form-main--compact { padding: 32px var(--gutter) 48px; }
.pref-fieldset { gap: 12px; }
.pref-choice { padding: 10px 0; min-height: 44px; }
.pref-choice input { width: 22px; height: 22px; }
@media (max-width: 599px) {
  .form-hero--compact { padding: 20px var(--gutter); }
  .form-hero--compact .form-hero__title { font-size: 26px; line-height: 32px; }
  .pref-logo { height: 32px; }
  .form-main--compact { padding: 20px var(--gutter) 32px; }
}
