/* =========================================================
   BANZAI — adattamenti trasversali: mobile, touch, movimento ridotto,
   senza WebGL, senza JS, stampa. Caricato per ultimo.
   ========================================================= */

/* ---------- mobile ---------- */
@media (max-width: 800px) {
  :root { --header-h: 64px; }
  body::after { animation: none; opacity: .24; }
  body::before { background: radial-gradient(130% 100% at 50% 42%, transparent 62%, rgba(0, 0, 0, .42) 100%); }
  .logo { font-size: 1.4rem; }
  .logo__mark { width: 2.5rem; height: 2.5rem; }
  .eyebrow { gap: .7rem; letter-spacing: .2em; }
  .eyebrow__line { width: 2rem; }
  .lead { font-size: clamp(1.05rem, 4.2vw, 1.25rem); }
  .btn:not(.btn--sm):not(.btn--prenota) { padding: 1em 1.5em; }
}
/* telefono stretto (Galaxy A55 ~ 411 px, iPhone SE 375, ...): l'header in una riga (logo, EN, Prenota, menu) richiede ~423 px e il
   pulsante del menu usciva dallo schermo. Qui logo, gap e pulsanti si stringono; sotto i 350 px il "Prenota" dell'header sparisce
   (resta quello grande dell'hero e quello in fondo al menu). La vecchia regola che lo nascondeva sotto i 560 px non funzionava:
   la regola .btn, scritta dopo, rimetteva display:inline-flex. */
@media (max-width: 560px) {
  .site-header { gap: .6rem; }
  .site-header__actions { gap: .5rem; }
  .logo { font-size: 1.2rem; gap: .55rem; }
  .logo__mark { width: 2.3rem; height: 2.3rem; }
  .nav-toggle { width: 44px; height: 44px; }
  .site-header__cta.btn { padding: .72em .95em; font-size: .66rem; letter-spacing: .1em; }
  .site-header__cta.btn::after { display: none; }
}
@media (max-width: 349px) {
  .site-header__actions .site-header__cta { display: none; }
}
.panel__toggle { display: none; }   /* solo su telefono, vedi sotto */
/* aree di tocco comode (44px) su touch */
@media (pointer: coarse) {
  .btn, .btn--sm, .chip-link { min-height: 44px; }
  /* link del footer (menu, contatti): da 22px a ~44px di altezza cliccabile; i link dentro i paragrafi (crediti) restano in riga */
  .site-footer :not(p) > a { display: inline-block; padding-block: .75rem; }
}
/* telefono: nessuna scritta sotto i 12px e respiro fra titolo e frase dell'hero */
@media (max-width: 800px) {
  .nav__idx, .foto__cap, .legend__title, .menu-card__n, .phone__cap, .btn--sm { font-size: .75rem; }
  .hero__stage { padding-bottom: 1rem; }
  .hero__foot { padding-top: .6rem; }

  /* pagina piu corta: niente blocchi alti quanto lo schermo, meno spazio fra le sezioni */
  .locale__intro, .step, .formula__intro, .formula-card, .takeaway__main { min-height: 0; }
  .locale__intro { padding-bottom: 2rem; }
  .step { padding-top: 2.5rem; padding-bottom: 2.5rem; }
  .formula-card { padding-top: 2.2rem; padding-bottom: 2.2rem; }
  .formula__intro { padding-top: 1.5rem; padding-bottom: 1.5rem; }
  .takeaway__main { padding-top: 1.5rem; padding-bottom: 2rem; }
  .formula, .cocktail, .takeaway, .galleria, .contact { padding-top: 3.5rem; }
  .galleria, .contact { padding-bottom: 3.5rem; }
  .cocktail__head, .cocktail__collage { margin-bottom: 2rem; }
  .piatti { padding-top: 2.5rem; padding-bottom: 2rem; }
  .takeaway__media { padding-top: 2.5rem; padding-bottom: 2.5rem; }

  /* foto verticali: proporzioni che le tagliano meno (prima 16:9 e 3:1 ne mostravano un terzo) */
  .step__foto { --ar: 3 / 4; width: min(64%, 15rem); }
  .media__photos .foto { --ar: 4 / 5 !important; }

  /* categorie del menu richiudibili (js/menu.js): chiuse = titolo, descrizione e pulsante */
  .menu--acc .panel--cat:not(.is-open) .panel__grid,
  .menu--acc .panel--cat:not(.is-open) .panel__photo { display: none; }
  .menu--acc .panel__toggle {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    gap: .7rem;
    min-height: 44px;
    padding: .55em 1.1em;
    border: 1px solid rgba(245, 239, 227, .35);
    border-radius: 999px;
    background: transparent;
    color: var(--rice);
    font: inherit;
    font-size: .8rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
    cursor: pointer;
  }
  .panel__toggle-ico {
    width: .55em; height: .55em;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    rotate: 45deg;
    translate: 0 -.12em;
  }
  .menu--acc .panel.is-open .panel__toggle-ico { rotate: 225deg; translate: 0 .12em; }
  .gallery--chiusa .gallery__item:nth-child(n + 9) { display: none; }
  .gallery__piu { display: flex; margin: 1.6rem auto 0; }

  /* menu: piatti come righe compatte invece di card alte */
  .menu.is-native .menu-card { padding: .65rem .9rem .75rem; }
  .menu.is-native .menu-card__name { font-size: 1.05rem; }
  .menu.is-native .menu-card__desc { font-size: .84rem; line-height: 1.4; }
  .menu.is-native .panel__grid { gap: .55rem; }
  .menu.is-native .panel--cat { gap: 1.1rem; }
}
@media (max-width: 480px) {
  .btn { letter-spacing: .12em; }
  .tag { letter-spacing: .16em; }
}

/* ---------- touch: niente cursore custom, niente riflessi da hover ---------- */
@media (hover: none), (pointer: coarse) {
  [data-tilt]::after { display: none; }
  [data-tilt] { transform: none; }
}

/* ---------- senza WebGL (o senza JS): il nigiri SVG (hero) e la foto (Anatomia) prendono il posto del 3D ---------- */
html.no-webgl #scene, html:not(.js) #scene { display: none; }
html.no-webgl .hero__fallback, html:not(.js) .hero__fallback { display: block; }
/* Anatomia senza WebGL: lo slot vuoto sparisce e compare la foto ([hidden] e !important, quindi serve !important anche qui) */
html.no-webgl .step__slot, html:not(.js) .step__slot { display: none; }
html.no-webgl .anatomia__fallback, html:not(.js) .anatomia__fallback { display: block !important; }
/* la descrizione dell'apertura 3D ha senso solo se la scena c'e */
html.no-webgl .step--anatomia .sr-only, html:not(.js) .step--anatomia .sr-only { display: none; }

/* ---------- senza JS: contenuto sempre leggibile, dati vuoti nascosti ---------- */
html:not(.js) #cursor { display: none; }
html:not(.js) [data-site-wrap] { display: none; }
/* i link con [data-site-href] (telefono, WhatsApp, Glovo, mappa, social) prendono l'indirizzo da js/content.js: senza JS sono
   segnaposto (href="#" o "tel:" vuoto) e si nascondono tutti. "Prenota" non c'entra: e un link normale a prenota/, resta visibile. */
html:not(.js) [data-site-href] { display: none; }
html:not(.js) .hero__title { visibility: visible; }
html:not(.js) .marquee, html.reduce-motion .marquee { justify-content: center; }
html:not(.js) .marquee__inner, html.reduce-motion .marquee__inner { flex-wrap: wrap; justify-content: center; width: 100%; }
/* il gruppo puo restringersi e andare a capo (in base e flex:none: sborderebbe e verrebbe tagliato ai lati);
   i cloni del JS spariscono: le parole si leggono una volta sola */
html:not(.js) .marquee__group, html.reduce-motion .marquee__group { flex: 0 1 auto; max-width: 100%; flex-wrap: wrap; justify-content: center; row-gap: .2em; }
html:not(.js) .marquee__group[data-clone], html.reduce-motion .marquee__group[data-clone] { display: none; }

/* ---------- senza JS: header e navigazione restano usabili anche sotto 1180px ---------- */
html:not(.js) .nav-toggle, html:not(.js) .nav__foot, html:not(.js) .nav__idx { display: none; }
@media (max-width: 1180px) {
  html:not(.js) .site-header { position: absolute; height: auto; min-height: var(--header-h); flex-wrap: wrap; row-gap: .2rem; padding-block: .5rem; }
  html:not(.js) .nav {
    position: static;
    order: 3;
    width: 100%;
    height: auto;
    margin: 0;
    padding: 0;
    overflow: visible;
    background: none;
    clip-path: none;
    visibility: visible;
    transition: none;
  }
  html:not(.js) .nav__list { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 0 1.2rem; }
  html:not(.js) .nav__list li { opacity: 1; transform: none; }
  html:not(.js) .nav__link {
    width: auto;
    padding: .45rem 0;
    border: 0;
    font-family: var(--f-body);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--rice-70);
  }
  html:not(.js) .nav__link::after { display: block; }
  html:not(.js) .site-header__actions { margin-left: auto; }
  html:not(.js) .hero { padding-top: calc(var(--header-h) + 3.4rem); }
}

/* ---------- movimento ridotto (classe messa dal JS) ---------- */
html.reduce-motion *, html.reduce-motion *::before, html.reduce-motion *::after {
  animation-duration: .001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: .001ms !important;
  transition-delay: 0s !important;
  scroll-behavior: auto !important;
}
html.reduce-motion [data-reveal], html.reduce-motion [data-reveal] > * {
  opacity: 1 !important;
  transform: none !important;
  clip-path: none !important;
  scale: none !important;
}
html.reduce-motion .split-inner { transform: none !important; }
html.reduce-motion .hero__title { visibility: visible !important; }
html.reduce-motion .hero__enter { opacity: 1 !important; }
html.reduce-motion .hero__band { rotate: 0deg; scale: 1; }
html.reduce-motion .scooter { animation: none; translate: 42vw 0; }
html.reduce-motion .inf path { stroke-dashoffset: 0 !important; }
html.reduce-motion .footer__word .split-inner { background-size: 100% 100%; }
html.reduce-motion .bubbles, html.reduce-motion body::after { display: none; }
html.reduce-motion .bgword--outline, html.reduce-motion .bgword--ink { animation: none; }
/* niente cursore che insegue il puntatore: resta quello nativo */
html.reduce-motion #cursor { display: none; }
html.reduce-motion .hero__emblem-ring { display: none; }

/* ---------- movimento ridotto (preferenza di sistema, anche senza JS) ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    transition-delay: 0s !important;
    scroll-behavior: auto !important;
  }
  [data-reveal], [data-reveal] > * {
    opacity: 1 !important;
    transform: none !important;
    clip-path: none !important;
    scale: none !important;
  }
  .split-inner { transform: none !important; }
  .hero__title { visibility: visible !important; }
  .hero__enter { opacity: 1 !important; }
  .hero__band { rotate: 0deg; scale: 1; }
  .scooter { animation: none; translate: 42vw 0; }
  .inf path { stroke-dashoffset: 0 !important; }
  .footer__word .split-inner { background-size: 100% 100%; }
  .bubbles, body::after { display: none; }
  .bgword--outline, .bgword--ink { animation: none; }
  #cursor { display: none; }
  .hero__emblem-ring { display: none; }
  .marquee { justify-content: center; }
  .marquee__inner { flex-wrap: wrap; justify-content: center; width: 100%; }
  .marquee__group { flex: 0 1 auto; max-width: 100%; flex-wrap: wrap; justify-content: center; row-gap: .2em; }
  .marquee__group[data-clone] { display: none; }
}

/* ---------- stampa ---------- */
@media print {
  #preloader, #cursor, #progress, #scene, #lightbox, .site-header, .hero__band, .cocktail__band, .takeaway__road, .bubbles, .phone, .gallery-filters,
  body::before, body::after { display: none !important; }
  html, body { background: #fff !important; color: #000 !important; }
  .menu { height: auto !important; background: none !important; }
  .hscroll__sticky { position: static !important; height: auto !important; overflow: visible !important; }
  .hscroll__track { width: auto !important; flex-wrap: wrap; transform: none !important; translate: none !important; }
  [data-reveal], .split-inner { opacity: 1 !important; transform: none !important; clip-path: none !important; }
}

/* sezioni lontane dallo schermo: le animazioni infinite si fermano (le gestisce main.js, avviaPausaFuoriVista) */
.anim-ferme, .anim-ferme *, .anim-ferme *::before, .anim-ferme *::after { animation-play-state: paused !important; }
