/* =========================================================
   BANZAI — fondazione: design system, reset, componenti globali
   Altri file: locale.css (hero, locale, menu), offerta.css (formula,
   cocktail, take away), finale.css (galleria, contatti, footer),
   adattivo.css (movimento ridotto, no-webgl, touch, stampa).
   ========================================================= */

@property --ang { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@property --fill { syntax: "<number>"; inherits: false; initial-value: 0; }

:root {
  /* palette */
  --ink: #0a0908;
  --ink-2: #141110;
  --nori: #0e1a14;
  --rice: #f5efe3;
  --salmon: #ff6a4d;
  --wasabi: #9bd94a;
  --ume: #e71129;
  --gold: #d9b26a;
  --line: rgba(245, 239, 227, .14);
  /* varianti ad alto contrasto per testo/sfondi */
  --ume-deep: #b80d20;
  --wasabi-deep: #3f6a0e;
  --rice-70: rgba(245, 239, 227, .74);
  --rice-55: rgba(245, 239, 227, .6);

  /* tema corrente (le sezioni chiare li ridefiniscono) */
  --bg: var(--ink);
  --fg: var(--rice);
  --fg-dim: var(--rice-70);
  --accent: var(--salmon);
  --accent-2: var(--wasabi);
  --rule: var(--line);
  --focus: var(--salmon);

  /* tipografia */
  --f-display: "Shippori Mincho B1", Georgia, "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", "Noto Serif JP", "Noto Serif CJK JP", "Times New Roman", serif;
  --f-body: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans JP", "Yu Gothic", sans-serif;
  --fs-body: clamp(1rem, .96rem + .22vw, 1.125rem);
  --fs-lead: clamp(1.1rem, 1rem + .6vw, 1.5rem);
  --fs-h2: clamp(2.7rem, 1.2rem + 6.6vw, 7.5rem);
  --fs-h3: clamp(1.6rem, 1.2rem + 1.6vw, 2.75rem);
  --fs-label: .75rem;

  /* spazi e movimento */
  --gutter: clamp(20px, 5vw, 80px);
  --header-h: 72px;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-io: cubic-bezier(.76, 0, .24, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);

  /* pattern in SVG inline (nessun file esterno) */
  /* shippo (sette tesori): solo linee, per le sezioni chiare */
  --pat-shippo: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 40 40'%3E%3Cg fill='none' stroke='%230a0908' stroke-opacity='.1' stroke-width='.7'%3E%3Ccircle cx='0' cy='0' r='28.28'/%3E%3Ccircle cx='40' cy='0' r='28.28'/%3E%3Ccircle cx='0' cy='40' r='28.28'/%3E%3Ccircle cx='40' cy='40' r='28.28'/%3E%3C/g%3E%3C/svg%3E");
  /* grana filmica: rumore grigio opaco, in overlay */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='.33 .33 .33 0 0 .33 .33 .33 0 0 .33 .33 .33 0 0 0 0 0 0 1'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)'/%3E%3C/svg%3E");
  --arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12h15M13 6l6 6-6 6'/%3E%3C/svg%3E");
}

/* ---------- onde seigaiha ----------
   Disegnate con soli gradienti CSS (stesso disegno di prima: 6 cerchi da 4 anelli per tile), NON piu con un'immagine SVG e con
   background-blend-mode: Internet Samsung ricolora le immagini di sfondo con la sua "modalita scura" forzata e il disegno usciva grigio.
   Ogni elemento che le usa imposta --pf (colore del fondo, uguale al suo background-color) e --pl (colore del filo: il vecchio
   grigio #262626 o #484848 gia fuso con il fondo, cioe screen(fondo, grigio)) e la dimensione della tile (background-size). */
.menu, .preloader__panel, .nav, .wave, .gallery__item--placeholder {
  --pat-seigaiha:
    radial-gradient(ellipse 50% 100% at 100% 150%, var(--pf) 0, var(--pf) 23.1%, var(--pl) 24%, var(--pl) 26%, var(--pf) 26.9%, var(--pf) 48.1%, var(--pl) 49%, var(--pl) 51%, var(--pf) 51.9%, var(--pf) 73.1%, var(--pl) 74%, var(--pl) 76%, var(--pf) 76.9%, var(--pf) 98.1%, var(--pl) 99%, var(--pl) 101%, transparent 101.9%),
    radial-gradient(ellipse 50% 100% at 0% 150%, var(--pf) 0, var(--pf) 23.1%, var(--pl) 24%, var(--pl) 26%, var(--pf) 26.9%, var(--pf) 48.1%, var(--pl) 49%, var(--pl) 51%, var(--pf) 51.9%, var(--pf) 73.1%, var(--pl) 74%, var(--pl) 76%, var(--pf) 76.9%, var(--pf) 98.1%, var(--pl) 99%, var(--pl) 101%, transparent 101.9%),
    radial-gradient(ellipse 50% 100% at 50% 100%, var(--pf) 0, var(--pf) 23.1%, var(--pl) 24%, var(--pl) 26%, var(--pf) 26.9%, var(--pf) 48.1%, var(--pl) 49%, var(--pl) 51%, var(--pf) 51.9%, var(--pf) 73.1%, var(--pl) 74%, var(--pl) 76%, var(--pf) 76.9%, var(--pf) 98.1%, var(--pl) 99%, var(--pl) 101%, transparent 101.9%),
    radial-gradient(ellipse 50% 100% at 100% 50%, var(--pf) 0, var(--pf) 23.1%, var(--pl) 24%, var(--pl) 26%, var(--pf) 26.9%, var(--pf) 48.1%, var(--pl) 49%, var(--pl) 51%, var(--pf) 51.9%, var(--pf) 73.1%, var(--pl) 74%, var(--pl) 76%, var(--pf) 76.9%, var(--pf) 98.1%, var(--pl) 99%, var(--pl) 101%, transparent 101.9%),
    radial-gradient(ellipse 50% 100% at 0% 50%, var(--pf) 0, var(--pf) 23.1%, var(--pl) 24%, var(--pl) 26%, var(--pf) 26.9%, var(--pf) 48.1%, var(--pl) 49%, var(--pl) 51%, var(--pf) 51.9%, var(--pf) 73.1%, var(--pl) 74%, var(--pl) 76%, var(--pf) 76.9%, var(--pf) 98.1%, var(--pl) 99%, var(--pl) 101%, transparent 101.9%),
    radial-gradient(ellipse 50% 100% at 50% 0%, var(--pf) 0, var(--pf) 23.1%, var(--pl) 24%, var(--pl) 26%, var(--pf) 26.9%, var(--pf) 48.1%, var(--pl) 49%, var(--pl) 51%, var(--pf) 51.9%, var(--pf) 73.1%, var(--pl) 74%, var(--pl) 76%, var(--pf) 76.9%, var(--pf) 98.1%, var(--pl) 99%, var(--pl) 101%, transparent 101.9%);
}

.theme-cream {
  --bg: var(--rice);
  --fg: var(--ink);
  --fg-dim: rgba(10, 9, 8, .72);
  --accent: var(--ume-deep);
  --accent-2: var(--wasabi-deep);
  --rule: rgba(10, 9, 8, .18);
  --focus: var(--ume-deep);
}

/* ---------- reset moderno ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: auto;          /* lo scroll fluido lo fa il JS */
  scrollbar-gutter: stable;
  overflow-x: hidden;
  overflow-x: clip;               /* mai scroll orizzontale, senza rompere lo sticky */
  background: var(--ink);
  color-scheme: dark;
  scrollbar-color: #3a332d var(--ink);
}
html.js.is-locked { overflow: hidden; }
/* Blocco dello scroll con menu mobile aperto: va su <html> (l'overflow del body non si propaga al viewport
   perche html ha overflow-x:clip). Due regole separate: un :has() non supportato non deve invalidare l'altra. */
html:has(body.nav-open) { overflow: hidden; }
@supports not selector(:has(*)) {
  body.nav-open { overflow: hidden; }
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: clip;
  background: var(--ink);
  color: var(--rice);
  font-family: var(--f-body);
  font-size: var(--fs-body);
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
h1, h2, h3, h4 {
  font-family: var(--f-display);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -.01em;
  text-wrap: balance;
}
p { text-wrap: pretty; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
img, svg, canvas, video { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
::selection { background: var(--salmon); color: var(--ink); }

[hidden] { display: none !important; }

:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 4px;
  border-radius: 4px;
}
main:focus { outline: none; }

/* ---------- utilita ---------- */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: fixed;
  top: 12px; left: 12px;
  z-index: 400;
  padding: .8em 1.2em;
  background: var(--rice);
  color: var(--ink);
  font-weight: 700;
  font-size: .875rem;
  border-radius: 999px;
  transform: translateY(-200%);
  transition: transform .3s var(--ease-out);
}
.skip-link:focus-visible { transform: none; outline-offset: 2px; }

.container { width: min(100% - 2 * var(--gutter), 1320px); margin-inline: auto; }

.eyebrow {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: clamp(1.2rem, 3vh, 2rem);
  font-size: var(--fs-label);
  font-weight: 700;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--accent);
}
.eyebrow__num { font-variant-numeric: tabular-nums; }
.eyebrow__line { flex: none; width: clamp(2rem, 6vw, 4.5rem); height: 1px; background: currentColor; opacity: .7; }
.eyebrow__txt { color: var(--fg); }

.display {
  font-size: var(--fs-h2);
  line-height: .96;
  letter-spacing: -.025em;
  font-weight: 700;
}
.lead {
  margin-top: clamp(1.2rem, 3vh, 2rem);
  max-width: 34em;
  font-size: var(--fs-lead);
  line-height: 1.5;
  color: var(--fg-dim);
}
/* avviso sobrio ("Menu indicativo", "Carta indicativa"): visibile ma discreto */
.note {
  display: flex;
  align-items: baseline;
  gap: .7em;
  margin-top: 1rem;
  max-width: 34em;
  font-size: .8125rem;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: .04em;
  color: var(--fg-dim);
}
.note::before {
  content: "";
  flex: none;
  width: .42em; height: .42em;
  background: var(--gold);
  rotate: 45deg;
  translate: 0 -.12em;
}
.tag {
  display: inline-block;
  margin-bottom: 1.1rem;
  padding: .45em 1.1em;
  border: 1px solid var(--rule);
  border-radius: 999px;
  font-size: var(--fs-label);
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--accent);
}
.tag--dark { border-color: rgba(10, 9, 8, .35); color: var(--ink); }

.chips { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.6rem; }
.chips li {
  padding: .5em 1.1em;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: .8125rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
}

/* parole giganti di sfondo (decorative, z-index 0: sotto il canvas) */
.bgword {
  position: absolute;
  z-index: 0;
  display: block;
  font-family: var(--f-display);
  font-weight: 800;
  line-height: .8;
  text-transform: uppercase;
  letter-spacing: -.03em;
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(245, 239, 227, .16);
}
.bgword--kanji { font-weight: 600; text-transform: none; -webkit-text-stroke: 0; color: rgba(245, 239, 227, .05); }
.bgword--ink { -webkit-text-stroke: 1.5px rgba(10, 9, 8, .16); }
.bgword--kanji-ink { font-weight: 600; text-transform: none; -webkit-text-stroke: 0; color: rgba(10, 9, 8, .05); }
/* il testo si riempie con lo scroll dove supportato (miglioramento progressivo) */
@supports (animation-timeline: view()) {
  .bgword--outline {
    background: linear-gradient(90deg, rgba(245, 239, 227, .13) calc(var(--fill) * 100%), transparent calc(var(--fill) * 100%));
    -webkit-background-clip: text;
    background-clip: text;
    animation: riempi linear both;
    animation-timeline: view();
    animation-range: entry 0% cover 60%;
  }
  .bgword--ink {
    background: linear-gradient(90deg, rgba(10, 9, 8, .11) calc(var(--fill) * 100%), transparent calc(var(--fill) * 100%));
    -webkit-background-clip: text;
    background-clip: text;
    animation: riempi linear both;
    animation-timeline: view();
    animation-range: entry 0% cover 60%;
  }
}
@keyframes riempi { from { --fill: 0; } to { --fill: 1; } }

/* punti di sosta della scena 3D (zero box, solo posizione) */
.scene-stop {
  position: absolute;
  top: 0; left: 0;
  width: 1px; height: 0;
  visibility: hidden;
  pointer-events: none;
}
.scene-stop--end { top: auto; bottom: 0; }

/* ---------- grana e vignettatura filmica ---------- */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 41;
  pointer-events: none;
  background: radial-gradient(125% 95% at 50% 42%, transparent 58%, rgba(0, 0, 0, .5) 100%);
}
body::after {
  content: "";
  position: fixed;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  z-index: 40;
  pointer-events: none;
  background-image: var(--grain);
  background-size: 240px 240px;
  mix-blend-mode: overlay;
  opacity: .32;
  animation: grana 1s steps(1) infinite;
}
@keyframes grana {
  0% { transform: translate(0, 0); }
  20% { transform: translate(-3%, 2%); }
  40% { transform: translate(2%, -3%); }
  60% { transform: translate(-2%, -1%); }
  80% { transform: translate(3%, 3%); }
}

/* ---------- barra di avanzamento ---------- */
#progress {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 3px;
  z-index: 60;
  pointer-events: none;
  background: linear-gradient(90deg, var(--salmon), var(--gold) 55%, var(--wasabi));
  transform-origin: 0 50%;
  transform: scaleX(var(--scroll, 0));
}

/* ---------- canvas 3D ---------- */
#scene {
  position: fixed;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  /* altezza a barre del browser nascoste: su iOS la barra degli indirizzi che compare/sparisce NON deve ridimensionare il canvas
     (buffer da ridisegnare e salto dei modelli). Ancorato in alto: gli slot sono misurati dal bordo alto della finestra. */
  height: 100lvh;
  pointer-events: none;
}

/* ---------- cursore custom (solo mouse) ---------- */
.cursor__dot, .cursor__ring, .cursor__label {
  position: fixed;
  top: 0; left: 0;
  z-index: 300;
  pointer-events: none;
  opacity: 0;
  transition: opacity .5s ease, scale .45s var(--ease-out), background-color .3s, border-color .3s;
}
html.has-cursor .cursor__dot, html.has-cursor .cursor__ring { opacity: 1; }
#cursor.is-out .cursor__dot, #cursor.is-out .cursor__ring, #cursor.is-out .cursor__label { opacity: 0 !important; }
.cursor__dot {
  width: 8px; height: 8px;
  margin: -4px 0 0 -4px;
  border-radius: 50%;
  background: #fff;
  mix-blend-mode: difference;
}
.cursor__ring {
  width: 40px; height: 40px;
  margin: -20px 0 0 -20px;
  border: 1.5px solid #fff;
  border-radius: 50%;
  mix-blend-mode: difference;
}
.cursor__label {
  width: 96px; height: 96px;
  margin: -48px 0 0 -48px;
  display: grid;
  place-items: center;
  padding: 0 8px;
  text-align: center;
  font-size: .625rem;
  font-weight: 800;
  letter-spacing: .12em;
  line-height: 1.2;
  text-transform: uppercase;
  color: var(--ink);
  scale: .6;
}
#cursor.is-hover .cursor__ring { scale: 1.7; }
#cursor.is-hover .cursor__dot { scale: 0; }
#cursor.is-label .cursor__ring {
  scale: 2.4;
  background: var(--salmon);
  border-color: var(--salmon);
  mix-blend-mode: normal;
}
#cursor.is-label .cursor__dot { scale: 0; }
#cursor.is-label .cursor__label { opacity: 1; scale: 1; }
#cursor.is-drag .cursor__ring { scale: 2.4; background: var(--gold); border-color: var(--gold); mix-blend-mode: normal; }
#cursor.is-drag .cursor__dot { scale: 0; }
#cursor.is-drag .cursor__label { opacity: 1; scale: 1; }
#cursor.is-down .cursor__ring { scale: .8; }
#cursor.is-down.is-label .cursor__ring, #cursor.is-down.is-drag .cursor__ring { scale: 2; }
/* il cursore nativo sparisce solo quando quello custom e attivo (classe messa dal JS) */
@media (hover: hover) and (pointer: fine) {
  html.has-cursor:not(.reduce-motion),
  html.has-cursor:not(.reduce-motion) * { cursor: none; }
}
@media (hover: none), (pointer: coarse) {
  #cursor { display: none; }
}
html.is-touch #cursor { display: none; }

/* ---------- preloader a sipario ---------- */
#preloader {
  --p: 0;
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--rice);
}
.preloader__panel {
  position: absolute;
  top: 0; bottom: 0;
  width: 50.3%;
  --pf: var(--ink);
  --pl: rgb(79, 78, 78);
  background-color: var(--ink);
  background-image: var(--pat-seigaiha);
  background-size: 96px 48px;
  transition: transform 1.1s var(--ease-io) .35s;
}
.preloader__panel--l { left: 0; box-shadow: inset -1px 0 0 rgba(217, 178, 106, .5), 40px 0 80px rgba(0, 0, 0, .6); }
.preloader__panel--r { right: 0; box-shadow: inset 1px 0 0 rgba(217, 178, 106, .5), -40px 0 80px rgba(0, 0, 0, .6); }
.preloader__inner {
  position: relative;
  display: grid;
  justify-items: center;
  gap: clamp(.7rem, 2.2vh, 1.3rem);
  padding: 0 var(--gutter);
  text-align: center;
  transition: opacity .5s ease, scale 1s var(--ease-io);
}
/* ATTESA A PROVA DI FERMO (30 nov 2026). Mentre il sito si prepara, la scheda grafica si blocca a tratti (luci d'ambiente,
   texture e shader della scena 3D: fermi di 0,1-0,4 s misurati sui fotogrammi presentati, anche al computer) e in quei momenti si
   ferma TUTTO, anche le animazioni che girano sul compositor. Prima qui c'erano un anello che girava in 1,5 s, un riflesso che
   scorreva sulla barra, un numero che saliva e il logo che si scopriva seguendo --p dal JavaScript: su movimenti veloci ogni fermo
   si vedeva come uno scatto. Ora ci sono solo movimenti lenti e ampi, tutti di sola trasformazione/opacità: il logo entra una volta,
   l'alone respira piano, la barra avanza con un'animazione sua. Un fermo di tre decimi su un movimento lento non si vede.
   (--p resta scritto da main.js, ma nessuna regola lo usa più: niente ricalcoli a ogni fotogramma.) */
.preloader__emblem {
  position: relative;
  display: grid;
  place-items: center;
  width: clamp(150px, 34vmin, 300px);
  aspect-ratio: 1;
  margin-bottom: clamp(.4rem, 1.6vh, 1rem);
  animation: pre-entra .9s cubic-bezier(.2, .7, .2, 1) both;
}
@keyframes pre-entra { from { opacity: 0; transform: scale(.92); } to { opacity: 1; transform: none; } }
.preloader__glow {
  position: absolute;
  inset: -40%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(231, 17, 41, .5), rgba(231, 17, 41, .14) 40%, transparent 68%);
  opacity: .5;
  will-change: opacity, transform;
  animation: pre-respiro 3.6s ease-in-out infinite alternate;
}
@keyframes pre-respiro { from { opacity: .42; transform: scale(.95); } to { opacity: .82; transform: scale(1.05); } }
.preloader__logo {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.preloader__ring {
  position: absolute;
  left: -8%; top: -8%;
  width: 116%; height: 116%;
  max-width: none;   /* la regola globale max-width:100% su svg lo schiacciava e lo decentrava */
  overflow: visible;
  fill: none;
  stroke-width: 1.1;
}
.preloader__ring-bg { stroke: rgba(245, 239, 227, .16); }
/* l'anello dorato attorno al logo è intero e fermo (prima si chiudeva seguendo --p, e a ogni fermo saltava) */
.preloader__ring-fill {
  stroke: var(--gold);
  stroke-linecap: round;
  opacity: .9;
}
@media (prefers-reduced-motion: reduce) { .preloader__emblem, .preloader__glow { animation: none; } }
html.reduce-motion .preloader__emblem, html.reduce-motion .preloader__glow { animation: none; }
/* il kanji fa da didascalia sotto l'emblema: pieno e fermo */
.preloader__kanji {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: clamp(3rem, 11vmin, 6rem);
  line-height: 1.1;
  letter-spacing: .08em;
  color: var(--salmon);
  -webkit-text-stroke: 1.2px rgba(245, 239, 227, .8);
}
.preloader__brand {
  font-size: var(--fs-label);
  font-weight: 700;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--rice-70);
}
.preloader__meter { display: grid; justify-items: center; gap: .8rem; }
.preloader__count {
  font-variant-numeric: tabular-nums;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: .16em;
  color: var(--gold);
}
.preloader__count::after { content: "%"; margin-left: .15em; }
/* il numero che saliva lo scriveva il JavaScript: quando il sito è impegnato restava fermo e poi saltava. Tolto: parla la barra. */
.preloader__count { display: none; }
.preloader__bar {
  position: relative;
  width: min(60vw, 240px);
  height: 2px;
  background: var(--line);
  overflow: hidden;
}
/* La barra avanza con un'animazione CSS di sola scala (compositor), non col valore scritto dal JavaScript: parte svelta e rallenta
   senza fermarsi mai, come la barra «finta» di prima, ma senza dipendere dal thread principale. */
.preloader__bar::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--salmon), var(--gold));
  transform-origin: 0 50%;
  transform: scaleX(0);
  will-change: transform;
  animation: pre-barra 9s linear both;
}
@keyframes pre-barra {
  0% { transform: scaleX(0); }
  12% { transform: scaleX(.5); }
  25% { transform: scaleX(.7); }
  45% { transform: scaleX(.82); }
  70% { transform: scaleX(.9); }
  100% { transform: scaleX(.95); }
}
/* Quando è tutto pronto main.js mette .is-pieno: una seconda barra, sopra, la riempie fino in fondo in tre decimi. */
.preloader__bar::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(90deg, var(--salmon), var(--gold));
  transform-origin: 0 50%;
  transform: scaleX(0);
  transition: transform .3s cubic-bezier(.2, .7, .2, 1);
}
#preloader.is-pieno .preloader__bar::before { transform: scaleX(1); }
@media (prefers-reduced-motion: reduce) { .preloader__bar::after { animation: none; transform: scaleX(.6); } }
html.reduce-motion .preloader__bar::after { animation: none; transform: scaleX(.6); }
/* Finche il sipario e chiuso la pagina dietro non si vede: le sue animazioni infinite (bordi che girano, bagliori, onde, ticker...) restano
   ferme, cosi non costano un ricalcolo di stile a ogni fotogramma proprio mentre il sito si prepara (erano 60-70 al secondo). Ripartono
   all'apertura. Non vale senza sipario (visite successive) ne senza JS. */
html.js:not(.is-loaded):not(.sipario-saltato) body > :not(#preloader) *,
html.js:not(.is-loaded):not(.sipario-saltato) body > :not(#preloader) *::before,
html.js:not(.is-loaded):not(.sipario-saltato) body > :not(#preloader) *::after { animation-play-state: paused !important; }
html.is-loaded #preloader { pointer-events: none; }
html.is-loaded .preloader__inner { opacity: 0; scale: 1.18; }
html.is-loaded .preloader__panel--l { transform: translateX(-101%); }
html.is-loaded .preloader__panel--r { transform: translateX(101%); }
html:not(.js) #preloader { display: none; }
/* visite successive nella stessa scheda (sessionStorage "banzai-visto"): niente sipario */
html.sipario-saltato #preloader { display: none; }
/* ...ma senza sipario header, pulsante lingua e ticker sarebbero gia dipinti in italiano mentre contenuto e traduzione EN sono
   ancora in arrivo (e poi si scambierebbero a vista): fino ad html.is-loaded si tiene nascosto tutto tranne la scena. Si usa
   l'opacita (non visibility) perche alcune regole, come il titolo con riduci movimento, rimettono visibility:visible sui figli.
   Il sito si apre comunque (apertura normale, tetto di sicurezza o uscita di emergenza), e senza JS (html.js-fallito) la regola non vale. */
html.js.sipario-saltato:not(.is-loaded) body > :not(#scene) { opacity: 0; pointer-events: none; }

/* ---------- header e navigazione ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-inline: var(--gutter);
  color: var(--rice);
  transition: transform .7s var(--ease-out);
}
.site-header::before, .site-header::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  transition: opacity .45s ease;
}
.site-header::before { background: linear-gradient(to bottom, rgba(10, 9, 8, .75), rgba(10, 9, 8, 0)); }
.site-header::after {
  opacity: 0;
  background: rgba(10, 9, 8, .74);
  border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  backdrop-filter: blur(16px) saturate(1.3);
}
.site-header.is-scrolled::before { opacity: 0; }
.site-header.is-scrolled::after { opacity: 1; }
.site-header.is-hidden { transform: translateY(-101%); }
body.nav-open .site-header { transform: none; }

.logo {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  font-family: var(--f-display);
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: .01em;
  line-height: 1;
}
/* emblema ufficiale (PNG con trasparenza): mai deformato, niente ritagli */
.logo__mark {
  display: block;
  flex: none;
  width: 2.75rem; height: 2.75rem;
  object-fit: contain;
  filter: drop-shadow(0 3px 12px rgba(231, 17, 41, .4));
  transition: rotate .6s var(--ease-spring);
}
.logo:hover .logo__mark { rotate: -10deg; }

.nav { position: relative; z-index: 2; margin-inline: auto; }
.nav__list { display: flex; gap: clamp(.8rem, 1.5vw, 2.2rem); }
.nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: .55rem 0;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--rice-70);
  transition: color .3s;
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--salmon);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .5s var(--ease-out);
}
.nav__link:hover, .nav__link:focus-visible, .nav__link.is-active, .nav__link[aria-current="true"] { color: var(--rice); }
.nav__link:hover::after, .nav__link:focus-visible::after, .nav__link.is-active::after, .nav__link[aria-current="true"]::after {
  transform: scaleX(1);
  transform-origin: left;
}
.nav__idx, .nav__foot { display: none; }

/* effetto "roll" sui link: il testo scorre verso l'alto e ne entra una copia */
.roll {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  height: 1.3em;
  line-height: 1.3;
  overflow: hidden;
}
.roll__a, .roll__b { display: block; transition: transform .55s var(--ease-out); }
.roll__b { color: var(--salmon); }
a:hover .roll__a, a:focus-visible .roll__a,
a:hover .roll__b, a:focus-visible .roll__b { transform: translateY(-100%); }

.site-header__actions { position: relative; z-index: 2; display: flex; align-items: center; gap: .8rem; }
.nav-toggle {
  display: none;
  position: relative;
  width: 46px; height: 46px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(10, 9, 8, .35);
  transition: border-color .3s, background-color .3s;
}
.nav-toggle:hover { border-color: var(--salmon); }
.nav-toggle__bar, .nav-toggle__bar::before {
  content: "";
  position: absolute;
  left: 50%;
  width: 18px; height: 2px;
  margin-left: -9px;
  border-radius: 2px;
  background: var(--rice);
  transition: transform .5s var(--ease-out), background-color .3s, top .3s;
}
.nav-toggle__bar { top: 50%; margin-top: 2.5px; }
.nav-toggle__bar::before { top: -6px; left: 0; margin-left: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar, body.nav-open .nav-toggle__bar { transform: rotate(-45deg); margin-top: -1px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar::before, body.nav-open .nav-toggle__bar::before { top: 0; transform: rotate(90deg); }

/* il menu a scomparsa scatta a 1180px: sotto, 8 link + logo + pulsante non stanno in una riga */
@media (max-width: 1180px) {
  .nav-toggle { display: grid; }
  .nav {
    position: absolute;
    top: 0; left: 0; right: 0;
    z-index: 1;
    height: 100vh;
    height: 100dvh;
    margin: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2rem;
    padding: calc(var(--header-h) + 1rem) var(--gutter) 2rem;
    overflow-y: auto;
    overscroll-behavior: contain;
    --pf: var(--ink);
    --pl: rgb(47, 46, 45);
    background-color: var(--ink);
    background-image: var(--pat-seigaiha);
    background-size: 96px 48px;
    clip-path: circle(0px at calc(100% - var(--gutter) - 23px) calc(var(--header-h) / 2));
    visibility: hidden;
    transition: clip-path .9s var(--ease-io), visibility 0s linear .9s;
  }
  body.nav-open .nav {
    clip-path: circle(150vmax at calc(100% - var(--gutter) - 23px) calc(var(--header-h) / 2));
    visibility: visible;
    transition: clip-path .9s var(--ease-io), visibility 0s;
  }
  .nav__list { flex-direction: column; gap: 0; }
  .nav__list li {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity .5s ease, transform .5s var(--ease-out);
  }
  body.nav-open .nav__list li {
    opacity: 1;
    transform: none;
    transition: opacity .7s ease, transform 1s var(--ease-out);
    transition-delay: calc(.35s + var(--n, 0) * 55ms);
  }
  .nav__link {
    display: flex;
    width: 100%;
    align-items: baseline;
    gap: 1.1rem;
    padding: .28em 0;
    border-bottom: 1px solid var(--line);
    font-family: var(--f-display);
    font-size: clamp(1.6rem, min(7.5vw, 6vh), 3.4rem);
    font-weight: 700;
    letter-spacing: -.01em;
    text-transform: none;
    color: var(--rice);
  }
  .nav__link::after { display: none; }
  .nav__link.is-active, .nav__link[aria-current="true"] { color: var(--salmon); }
  .nav__idx { display: inline; font-family: var(--f-body); font-size: .7rem; font-weight: 800; letter-spacing: .2em; color: var(--salmon); }
  .nav__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; }
  .nav__tag { font-size: var(--fs-label); letter-spacing: .2em; text-transform: uppercase; color: var(--rice-55); }
}
@media (max-width: 560px) {
  .site-header__cta { display: none; }
}

/* ---------- bottoni ---------- */
.btn {
  --btn-fg: var(--rice);
  --btn-fill: var(--rice);
  --btn-fill-fg: var(--ink);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .75em;
  padding: 1.05em 1.7em;
  font-family: var(--f-body);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .16em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--btn-fg);
  border-radius: 999px;
  cursor: pointer;
  background-image: linear-gradient(var(--btn-fill), var(--btn-fill));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 100% 0%;
  transition: background-size .55s var(--ease-out), color .35s;
}
/* bordo con luce che gira (conic-gradient animato, dove @property e supportato) */
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1.5px;
  border-radius: inherit;
  background: conic-gradient(from var(--ang), var(--salmon), var(--gold), rgba(245, 239, 227, .18) 30%, rgba(245, 239, 227, .18) 70%, var(--salmon));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  animation: ang 5s linear infinite;
  pointer-events: none;
}
.btn::after {
  content: "";
  flex: none;
  width: 1.15em; height: 1.15em;
  background: currentColor;
  -webkit-mask: var(--arrow) center / contain no-repeat;
  mask: var(--arrow) center / contain no-repeat;
  transition: transform .45s var(--ease-out);
}
.btn:hover, .btn:focus-visible { background-size: 100% 100%; color: var(--btn-fill-fg); }
.btn:hover::after, .btn:focus-visible::after { transform: translateX(4px); }
@keyframes ang { to { --ang: 360deg; } }

.btn--solid { background-color: var(--ume-deep); }
.btn--dark {
  --btn-fill: var(--ume-deep);
  --btn-fill-fg: var(--rice);
  background-color: var(--ink);
}
.btn--sm { padding: .85em 1.3em; font-size: .7rem; }

/* pulsante "Banzai!": timbro rosso che pulsa; il pop usa scale/rotate (indipendenti dal transform del magnetico) */
.btn--banzai {
  --btn-fill: var(--gold);
  --btn-fill-fg: var(--ink);
  padding: 1.25em 2.2em;
  font-size: .95rem;
  background-color: var(--ume-deep);
  box-shadow: 0 0 0 0 rgba(231, 17, 41, .55);
  animation: ping 2.8s var(--ease-out) infinite;
}
.btn--banzai::after {
  width: auto; height: auto;
  background: none;
  -webkit-mask: none;
  mask: none;
  content: "万歳";
  content: "万歳" / "";           /* decorativo: fuori dal nome accessibile del pulsante */
  font-family: var(--f-display);
  font-size: 1.15em;
  font-weight: 700;
  letter-spacing: .04em;
}
.btn--banzai.is-pop { animation: pop .75s var(--ease-out); }
@keyframes ping {
  0% { box-shadow: 0 0 0 0 rgba(231, 17, 41, .55); }
  70%, 100% { box-shadow: 0 0 0 22px rgba(231, 17, 41, 0); }
}
@keyframes pop {
  0% { scale: 1; rotate: 0deg; }
  25% { scale: .86; rotate: -4deg; }
  55% { scale: 1.14; rotate: 3deg; }
  80% { scale: .98; rotate: -1deg; }
  100% { scale: 1; rotate: 0deg; }
}

.chip-link {
  display: inline-flex;
  align-items: center;
  padding: .75em 1.3em;
  border: 1px solid var(--rule);
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  transition: background-color .3s, color .3s, border-color .3s;
}
.chip-link:hover, .chip-link:focus-visible { background: var(--rice); color: var(--ink); border-color: var(--rice); }

/* ---------- rivelazioni ---------- */
/* il ritardo (data-delay) lo applica il JS al momento dell'ingresso */
html.js [data-reveal] {
  transition: opacity 1s var(--ease-out), transform 1.15s var(--ease-out), clip-path 1.3s var(--ease-out);
}
html.js [data-reveal]:not(.is-in) { opacity: 0; }
html.js [data-reveal="up"]:not(.is-in) { transform: translate3d(0, 56px, 0); }
html.js [data-reveal="left"]:not(.is-in) { transform: translate3d(-72px, 0, 0); }
html.js [data-reveal="right"]:not(.is-in) { transform: translate3d(72px, 0, 0); }
html.js [data-reveal="scale"]:not(.is-in) { transform: scale(.86); }
html.js [data-reveal="clip"]:not(.is-in) { opacity: 1; clip-path: inset(100% 0 0 0); }
html.js [data-reveal="clip"].is-in { clip-path: inset(0 0 0 0); }
html.js [data-reveal="clip"] > * { transition: scale 1.8s var(--ease-out); }
html.js [data-reveal="clip"]:not(.is-in) > * { scale: 1.25; }

/* ---------- testo spezzato ---------- */
.split-unit {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding-block: .06em .14em;
  margin-block: -.06em -.14em;
}
.split-inner { display: inline-block; transform-origin: 0 100%; }
html.js .split-inner {
  transition: transform 1.05s var(--ease-out);
  transition-delay: calc(var(--i, 0) * 40ms);
}
html.js [data-split]:not(.is-in) .split-inner { transform: translate3d(0, 112%, 0) rotate(5deg); }

/* ---------- tilt (parallax e magnetico li muove il JS con la proprieta "translate") ---------- */
[data-tilt] {
  --rx: 0deg; --ry: 0deg; --gx: 50%; --gy: 50%;
  position: relative;
  transform: perspective(900px) rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform .14s ease-out;
}
[data-tilt]::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle at var(--gx) var(--gy), rgba(255, 255, 255, .17), transparent 55%);
  transition: opacity .35s;
}
[data-tilt]:hover::after { opacity: 1; }

/* ---------- marquee ---------- */
.marquee {
  --mq-gap: clamp(1.4rem, 4vw, 3.6rem);
  display: flex;
  overflow: hidden;
  user-select: none;
}
.marquee__inner { display: flex; flex: none; }
.marquee__group {
  display: flex;
  flex: none;
  align-items: center;
  gap: var(--mq-gap);
  padding-right: var(--mq-gap);
}
.marquee__group > span { white-space: nowrap; }
.marquee__sep {
  flex: none;
  width: .38em; height: .38em;
  background: currentColor;
  rotate: 45deg;
  opacity: .9;
}

/* ---------- onde seigaiha che scorrono (divisori di sezione) ---------- */
.wave {
  position: relative;
  z-index: 2;
  height: clamp(56px, 8vw, 110px);
  margin-top: clamp(1rem, 4vh, 3rem);
  pointer-events: none;
  --pf: var(--nori);
  --pl: rgb(82, 91, 86);
  background-color: var(--nori);
  background-image: var(--pat-seigaiha);
  background-size: 96px 48px;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 75%);
  mask-image: linear-gradient(to bottom, transparent, #000 75%);
  animation: onde-scorrono 34s linear infinite;
}
.wave--ink { --pf: var(--ink); --pl: rgb(79, 78, 78); background-color: var(--ink); margin-top: 0; }
.wave--rev { animation-direction: reverse; }
@keyframes onde-scorrono { to { background-position: 96px 0; } }

/* ---------- riepilogo stati del contratto JS (stilati sopra) ----------
   html.js · html.is-loaded · html.is-locked · html.reduce-motion · html.no-webgl · html.is-touch
   body.nav-open · .is-in · .is-active · .site-header.is-scrolled/.is-hidden · #menu.is-native
   #cursor.is-hover/.is-label · .btn--banzai.is-pop · variabili --scroll --vel --mx --my --hp
   ------------------------------------------------------------------ */
