/* =========================================================
   Ciao Pais – mockup "moderno" con modalità 1931
   Le due epoche condividono il markup: cambiano solo le variabili.
   ========================================================= */

:root {
  --hd: 72px;
  --pad: clamp(16px, 3vw, 40px);
  --logo-red: #AC202C;            /* il rosso del logo (2026) */
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- Oggi ---------- */
html[data-era="oggi"] {
  --bg: #FFFFFF;
  --ink: #13201A;
  --muted: #5F6B65;
  --line: #E1E6E3;
  --soft: #F0F3F1;
  --accent: var(--logo-red);
  --on-accent: #FFFFFF;
  --dark: #13201A;
  --on-dark: #F4F6F5;

  --f-display: "Archivo", system-ui, sans-serif;
  --display-stretch: 125%;
  --display-weight: 800;
  --display-track: -0.025em;
  --f-body: "Archivo", system-ui, sans-serif;
  --body-weight: 400;
  --f-label: "Archivo", system-ui, sans-serif;
  --label-stretch: 87.5%;

  --radius: 18px;
  --photo-filter: none;
  --grain: 0;
}

/* Stagioni (solo nella vista di oggi): cambiano le tinte di contorno, il rosso del logo resta */
html[data-season="inverno"] { --season-accent: #2F5E7E; --season-on-accent: #FFFFFF; }
html[data-season="estate"]  { --season-accent: #E3A72F; --season-on-accent: #1B2414; }
html[data-era="oggi"][data-season="inverno"] { --soft: #EEF3F6; --line: #DCE4E9; }
html[data-era="oggi"][data-season="estate"]  { --soft: #F3F1E4; --line: #E4E0CC; --dark: #1B2A17; --muted: #5E6650; }

/* ---------- 1931 ---------- */
html[data-era="1931"] {
  --bg: #E8E0CC;
  --ink: #2A2219;
  --muted: #6A5B46;
  --line: #C9BB98;
  --soft: #DED3B8;
  --accent: #7A2B20;
  --on-accent: #F3EBD8;
  --dark: #2A2219;
  --on-dark: #EDE4CF;

  --f-display: "Bodoni Moda", "Didot", Georgia, serif;
  --display-stretch: 100%;
  --display-weight: 600;
  --display-track: 0;
  --f-body: "Bodoni Moda", Georgia, serif;
  --body-weight: 400;
  --f-label: "Courier Prime", "Courier New", monospace;
  --label-stretch: 100%;

  --radius: 2px;
  --photo-filter: grayscale(1) sepia(.42) contrast(1.06) brightness(.96);
  --grain: .22;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--hd) + 8px); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  font-weight: var(--body-weight);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color .7s var(--ease), color .7s var(--ease);
}
html[data-era="1931"] body { font-size: 1.1rem; line-height: 1.65; }

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
p { margin: 0 0 1em; }
h1, h2, h3 {
  margin: 0;
  font-family: var(--f-display);
  font-stretch: var(--display-stretch);
  font-weight: var(--display-weight);
  letter-spacing: var(--display-track);
  line-height: 1;
  text-wrap: balance;
}

.photo { filter: var(--photo-filter); transition: filter .9s var(--ease), opacity .4s; }
.photo.foto-cambio { opacity: 0; } /* cambio vista: la foto della vista precedente non si vede mentre arriva la nuova */

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 200; background: var(--ink); color: var(--bg); padding: 10px 16px; }
.skip:focus { top: 12px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.hero-brand :focus-visible, .card :focus-visible, .prenota :focus-visible, .ft :focus-visible { outline-color: #fff; }

/* Grana e vignettatura della pellicola: visibili solo nel 1931 */
body::before, body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 150;
  opacity: var(--grain); transition: opacity .9s var(--ease);
}
body::before {
  background: radial-gradient(ellipse at center, transparent 55%, rgba(40, 26, 10, .55) 100%);
}
body::after {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .2  0 0 0 0 .15  0 0 0 0 .08  0 0 0 .9 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  mix-blend-mode: multiply;
}
@media (prefers-reduced-motion: no-preference) {
  html[data-era="1931"] body::after { animation: grain 1s steps(6) infinite; }
}
@keyframes grain {
  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%); } 100% { transform: translate(0, 0); }
}

/* Lampo di passaggio tra le epoche */
.era-flash {
  position: fixed; inset: 0; z-index: 180; pointer-events: none;
  display: grid; place-items: center;
  background: #1C150D; opacity: 0; visibility: hidden;
}
.era-flash-year {
  font-family: "Bodoni Moda", serif; font-weight: 500; font-style: italic;
  font-size: clamp(5rem, 18vw, 16rem); color: #EDE4CF; letter-spacing: -0.02em;
}
.era-flash.is-on { visibility: visible; animation: flash .95s var(--ease) both; }
.era-flash.to-oggi { background: #FFFFFF; }
.era-flash.to-estate { background: linear-gradient(180deg, #F6C453 0%, #F9E2A2 100%); }
.era-flash.to-inverno { background: linear-gradient(180deg, #DCE9F2 0%, #FFFFFF 100%); }
.era-flash.to-estate .era-flash-year, .era-flash.to-inverno .era-flash-year {
  font-family: "Archivo", sans-serif; font-style: normal; font-stretch: 125%; font-weight: 800;
}
.era-flash.to-estate .era-flash-year { color: #1B2414; }
.era-flash.to-inverno .era-flash-year { color: #1F4560; }
.era-flash.to-oggi .era-flash-year { font-family: "Archivo", sans-serif; font-style: normal; font-stretch: 125%; font-weight: 800; color: var(--logo-red); }
@keyframes flash {
  0% { opacity: 0; } 18% { opacity: 1; } 26% { opacity: .82; } 32% { opacity: 1; } 68% { opacity: 1; } 100% { opacity: 0; }
}
/* Con "riduci animazioni" (Windows, iPhone, Mac) niente lampeggio: solo una dissolvenza */
@media (prefers-reduced-motion: reduce) {
  .era-flash.is-on { animation: flash-soft .9s ease both; }
  .photo, body { transition: none; }
}
@keyframes flash-soft { 0% { opacity: 0; } 25% { opacity: 1; } 70% { opacity: 1; } 100% { opacity: 0; } }

/* ---------- Bottoni ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--f-label); font-stretch: var(--label-stretch); font-weight: 600; font-size: 1rem;
  padding: 12px 20px; border-radius: 999px; border: 2px solid transparent;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .2s, color .2s, border-color .2s;
}
html[data-era="1931"] .btn { border-radius: 0; font-weight: 700; letter-spacing: .02em; }
.btn-accent { background: var(--accent); color: var(--on-accent); }
.btn-accent:hover { filter: brightness(.9); }
.btn-light { background: #fff; color: var(--logo-red); }
.btn-light:hover { background: #F4E9E8; }
.btn-line-light { color: #fff; border-color: rgba(255, 255, 255, .7); }
.btn-line-light:hover { background: rgba(255, 255, 255, .12); }

/* ---------- Header ---------- */
.hd {
  position: sticky; top: 0; z-index: 100;
  height: auto; min-height: 72px; /* l'altezza vera finisce in --hd (moderno.js) */
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px;
  padding: 0 var(--pad);
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  transition: background-color .7s var(--ease), border-color .7s;
}
.hd-left { justify-self: start; display: flex; align-items: center; gap: 14px; }
.hd-logo { display: block; }
.hd-logo img { height: 58px; width: auto; filter: var(--photo-filter); transition: filter .9s; }
.hd-logo .hd-logo-mark { display: none; }
.hd-right { justify-self: end; display: flex; align-items: center; gap: 24px; }
.hd-nav { display: flex; gap: 20px; }
.hd-nav a {
  font-family: var(--f-label); font-stretch: var(--label-stretch); font-weight: 500; font-size: 1rem;
  text-decoration: none; padding: 6px 0; border-bottom: 2px solid transparent; white-space: nowrap;
}
.hd-nav a:hover, .hd-nav a[aria-current="true"] { border-bottom-color: var(--accent); }

.nav-avanti { display: none; }

/* Selettore delle viste: 1931 | Oggi | prossima stagione */
.vista {
  display: inline-flex; padding: 3px; border-radius: 999px;
  background: var(--soft); border: 1px solid var(--line);
}
.vista-opt {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 16px; border: 0; border-radius: 999px; background: transparent; cursor: pointer;
  font-family: var(--f-label); font-stretch: var(--label-stretch); font-weight: 600; font-size: .98rem;
  color: var(--muted); transition: background-color .3s, color .3s;
}
.vista-opt:hover { color: var(--ink); }
.vista-opt[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.vista-opt svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.vista-opt .ico-estate circle { fill: currentColor; stroke: none; }
html[data-season="inverno"]:not([data-vista="prossima"]) .ico-inverno,
html[data-season="estate"]:not([data-vista="prossima"]) .ico-estate,
html[data-vista="prossima"][data-season="estate"] .ico-inverno,
html[data-vista="prossima"][data-season="inverno"] .ico-estate { display: none; }
html[data-vista="prossima"] .vista-opt-next[aria-pressed="true"] { background: var(--season-accent); color: var(--season-on-accent); }
html[data-era="1931"] .vista, html[data-era="1931"] .vista-opt { border-radius: 0; }

/* ---------- Hero ---------- */
.hero {
  display: grid; grid-template-columns: minmax(340px, 5fr) 7fr;
  height: calc(100svh - var(--hd)); min-height: 600px; max-height: 1000px;
}
.hero-brand {
  background: var(--logo-red); color: #fff;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: clamp(28px, 4vw, 56px) var(--pad) clamp(28px, 4vw, 56px);
  filter: var(--photo-filter); transition: filter .9s var(--ease);
}
.hero-logo { height: clamp(220px, 36vh, 400px); width: auto; }
.hero-text h1 { font-size: calc(clamp(calc(2rem / var(--st, 1)), 3.6vw, calc(3.5rem / var(--st, 1))) * var(--sh, 1)); line-height: 1.02; margin-bottom: .45em; max-width: 10.8em; }  /* em, non ch: non si restringe con un carattere stretto */
html[data-era="1931"] .hero-text h1 { font-style: italic; font-weight: 500; line-height: 1.08; }
.hero-text p { color: rgba(255, 255, 255, .88); max-width: 36ch; font-size: 1.1rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }

.hero-photo { margin: 0; position: relative; overflow: hidden; background: var(--dark); }
.hero-photo .photo { width: 100%; height: 100%; object-fit: cover; }
.hero-cap {
  position: absolute; right: var(--pad); bottom: 20px;
  font-family: var(--f-label); font-stretch: var(--label-stretch); font-size: .9rem;
  color: #fff; background: rgba(0, 0, 0, .45); padding: 6px 12px; border-radius: 999px;
}
html[data-era="1931"] .hero-cap { border-radius: 0; background: rgba(30, 20, 10, .7); }

/* ---------- Manifesto ---------- */
.manifesto { padding: clamp(80px, 14vh, 170px) var(--pad); }
.manifesto-text {
  font-family: var(--f-display); font-stretch: var(--display-stretch);
  font-weight: calc(var(--display-weight) - 200);
  font-size: calc(clamp(calc(1.7rem / var(--st, 1)), 4.1vw, calc(4rem / var(--st, 1))) * var(--sh, 1)); line-height: 1.12; letter-spacing: var(--display-track);
  /* larghezza fissa e non in ch: con un carattere più stretto scelto dal pannello (es. Cormorant) 24ch diventava una colonna strettissima */
  max-width: min(100%, 76vw, 1200px); margin: 0;
  text-wrap: balance;
}
html[data-era="1931"] .manifesto-text { font-style: italic; max-width: 28ch; }

/* ---------- Carte impilate ---------- */
.stack { padding: 0 clamp(8px, 1.2vw, 16px); }
.card {
  position: sticky; top: calc(var(--hd) + 12px);
  height: calc(100svh - var(--hd) - 24px); min-height: 520px;
  /* pausa: la carta resta intera (testo e link in basso compresi) per un tratto di scorrimento
     prima che arrivi la successiva a coprirla */
  margin-bottom: max(14px, 40svh);
  border-radius: var(--radius); overflow: hidden;
  background: var(--dark);
  isolation: isolate;
  box-shadow: 0 -18px 40px -24px rgba(0, 0, 0, .45);
}
.card .photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.card::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(0deg, rgba(8, 12, 10, .78) 0%, rgba(8, 12, 10, .2) 50%, rgba(8, 12, 10, 0) 70%);
}
.card-body {
  position: absolute; left: clamp(20px, 4vw, 64px); right: clamp(20px, 4vw, 64px); bottom: clamp(24px, 5vw, 64px);
  color: #fff;
  display: grid; grid-template-columns: 1fr minmax(0, 34ch); gap: 12px 48px; align-items: end;
}
.card h2 { font-size: calc(clamp(calc(3.2rem / var(--st, 1)), 10vw, calc(9rem / var(--st, 1))) * var(--sh, 1)); line-height: .9; grid-row: span 2; }
html[data-era="1931"] .card h2 { font-weight: 500; font-style: italic; }
.card p { margin: 0; color: rgba(255, 255, 255, .9); }
.card-links { display: flex; flex-wrap: wrap; gap: 6px 24px; }
.card-link {
  font-family: var(--f-label); font-stretch: var(--label-stretch); font-weight: 600;
  text-underline-offset: 5px; text-decoration-thickness: 2px;
}

/* ---------- Archivio ---------- */
.archivio { padding: clamp(90px, 14vh, 160px) 0 clamp(80px, 12vh, 140px); background: var(--soft); transition: background-color .7s; }
.arch-head {
  display: grid; grid-template-columns: 1fr minmax(0, 40ch) auto; gap: 24px 48px; align-items: end;
  padding: 0 var(--pad); margin-bottom: clamp(40px, 6vw, 72px);
}
.arch-head h2 { font-size: calc(clamp(calc(3rem / var(--st, 1)), 8vw, calc(7.5rem / var(--st, 1))) * var(--sh, 1)); line-height: .92; }
html[data-era="1931"] .arch-head h2 { font-style: italic; font-weight: 500; }
.arch-head p { margin: 0; color: var(--muted); }

.reel {
  list-style: none; margin: 0; padding: 0 var(--pad) 20px;
  display: grid; grid-auto-flow: column; grid-auto-columns: clamp(260px, 30vw, 420px); gap: clamp(18px, 2.5vw, 36px);
  overflow-x: auto; scroll-snap-type: x proximity; scroll-padding-inline: var(--pad);
  scrollbar-color: var(--line) transparent;
}
.frame { scroll-snap-align: start; }
.frame .photo, .slot {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  border-radius: var(--radius);
}
html[data-era="1931"] .frame .photo {
  border: 10px solid #F3EDDF; box-shadow: 0 10px 22px -12px rgba(40, 26, 10, .55);
}
html[data-era="1931"] .frame:nth-child(odd) .photo { transform: rotate(-.6deg); }
html[data-era="1931"] .frame:nth-child(even) .photo { transform: rotate(.5deg); }
.slot {
  display: grid; place-items: center;
  border: 2px dashed var(--line); background: transparent;
  font-family: var(--f-label); color: var(--muted);
}
.frame-meta { padding-top: 14px; }
.frame-title { font-family: var(--f-display); font-stretch: var(--display-stretch); font-weight: calc(var(--display-weight) - 200); font-size: calc(1.25rem / var(--st, 1) * var(--sh, 1)); line-height: 1.2; margin: 0 0 4px; }
.frame-ref { font-family: var(--f-label); font-stretch: var(--label-stretch); font-size: .9rem; color: var(--muted); margin: 0; line-height: 1.45; }

/* ---------- Come arrivare ---------- */
.arrivare { padding: clamp(80px, 12vh, 140px) var(--pad); }
.arrivare > h2 { font-size: calc(clamp(calc(2.6rem / var(--st, 1)), 6vw, calc(5.5rem / var(--st, 1))) * var(--sh, 1)); margin-bottom: clamp(32px, 5vw, 56px); }
.arr-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(20px, 3vw, 40px); }
.arr-col .photo { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--radius); margin-bottom: 22px; }
.arr-col h3 { font-size: calc(clamp(calc(1.5rem / var(--st, 1)), 2.4vw, calc(2.2rem / var(--st, 1))) * var(--sh, 1)); margin-bottom: .45em; }
.arr-col p { color: var(--muted); max-width: 52ch; }
.arr-addr { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--line); font-family: var(--f-label); font-stretch: var(--label-stretch); }

/* ---------- Prenota ---------- */
.prenota {
  margin: 0 clamp(8px, 1.2vw, 16px) clamp(8px, 1.2vw, 16px);
  padding: clamp(56px, 9vw, 120px) var(--pad);
  background: var(--accent); color: var(--on-accent);
  border-radius: var(--radius);
  transition: background-color .7s;
}
.prenota h2 { font-size: calc(clamp(calc(2.2rem / var(--st, 1)), 5vw, calc(4.5rem / var(--st, 1))) * var(--sh, 1)); max-width: 12.3em; margin-bottom: .6em; }
.pren-row { display: flex; flex-wrap: wrap; gap: 8px 48px; margin-bottom: 18px; }
.pren-big {
  font-family: var(--f-display); font-stretch: var(--display-stretch); font-weight: calc(var(--display-weight) - 100);
  font-size: clamp(1.5rem, 3.4vw, 3rem); text-decoration: none; border-bottom: 3px solid currentColor;
}
.prenota p { margin: 0; opacity: .85; }

/* Richiesta di disponibilità (camera o tavolo): scheda chiara sul fondo rosso.
   A sinistra titolo e contatti (colonna stretta), a destra il modulo: tre campi per riga, consenso e pulsante sulla stessa riga. */
.prenota {
  display: grid; grid-template-columns: minmax(240px, .72fr) minmax(0, 1.28fr);
  gap: clamp(28px, 4vw, 64px); align-items: start;
  padding-top: clamp(44px, 6vw, 88px); padding-bottom: clamp(44px, 6vw, 88px);
}
.pren-testo { padding-top: clamp(4px, 1vw, 12px); }
.prenota .pren-testo h2 { max-width: 9em; margin-bottom: .55em; }
.prenota .pren-row { flex-direction: column; align-items: flex-start; gap: 10px; margin-bottom: 20px; }
.prenota .pren-big { font-size: clamp(1.2rem, 2vw, 1.75rem); border-bottom-width: 2px; padding-bottom: 2px; }
.prenota .pren-testo p { max-width: 30ch; font-size: 1rem; }

.rich-box {
  background: var(--bg); color: var(--ink);
  border-radius: calc(var(--radius) - 4px);
  padding: clamp(20px, 2.6vw, 34px);
  box-shadow: 0 24px 48px -28px rgba(0, 0, 0, .55);
}
.rich-box :focus-visible { outline-color: var(--accent); }
.rich-box p { opacity: 1; }
.rich-testa { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; margin-bottom: 22px; }
.rich h3, .rich-ok h3 {
  font-size: calc(clamp(calc(1.35rem / var(--st, 1)), 2vw, calc(1.8rem / var(--st, 1))) * var(--sh, 1));
  margin: 0;
}
.rich-ok h3 { margin-bottom: 12px; }
.rich fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.rich-tipo { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--soft); }
.rich-tipo label { position: relative; }
.rich-tipo input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.rich-tipo span {
  display: block; padding: 8px 20px; border-radius: 999px;
  font-family: var(--f-label); font-stretch: var(--label-stretch); font-weight: 600;
  color: var(--muted); transition: background-color .2s, color .2s;
}
.rich-tipo input:checked + span { background: var(--ink); color: var(--bg); }
.rich-tipo input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }

.rich-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px 16px; }
.rich-per { display: contents; }
.rich-per[hidden] { display: none; }
/* età dei bambini (23/11): un menu per bambino, uno accanto all'altro */
.rich-eta[hidden] { display: none; }
.rich-eta { display: flex; flex-direction: column; gap: 6px; }
.rich-eta-t { font-family: var(--f-label); font-stretch: var(--label-stretch); font-weight: 600; font-size: .9rem; }
.rich-eta-sel { display: flex; flex-wrap: wrap; gap: 10px; }
.rich-eta-sel label { display: flex; flex-direction: column; gap: 4px; width: 124px; font-size: .8rem; color: var(--muted); }
.c2 { grid-column: span 2; } .c3 { grid-column: span 3; } .c6 { grid-column: 1 / -1; }
.rf { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.rf > span { font-family: var(--f-label); font-stretch: var(--label-stretch); font-weight: 600; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rf em { font-style: normal; font-weight: 400; color: var(--muted); }
.rf input, .rf select, .rf textarea, .rich-eta-sel select {
  width: 100%; min-height: 46px; padding: 9px 12px;
  font: inherit; font-size: 1rem; color: var(--ink);
  background: var(--bg); border: 1.5px solid var(--line); border-radius: 10px;
  transition: border-color .2s;
}
html[data-era="1931"] .rf input, html[data-era="1931"] .rf select, html[data-era="1931"] .rf textarea { border-radius: 2px; background: #F3EDDF; }
.rf textarea { resize: vertical; min-height: 84px; line-height: 1.5; }
.rf input:hover, .rf select:hover, .rf textarea:hover { border-color: var(--muted); }
.rf [aria-invalid="true"], .rich-eta-sel [aria-invalid="true"], .rich-consenso input[aria-invalid="true"] { border-color: var(--accent); outline: 2px solid var(--accent); outline-offset: 0; }

.rich-trappola { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.rich-err { margin: 14px 0 0 !important; color: var(--accent); font-weight: 600; }
.rich-piede { display: flex; align-items: center; gap: 16px 28px; margin-top: 20px; }
.rich-legale { flex: 1; min-width: 0; }
.rich-consenso { display: flex; gap: 10px; align-items: flex-start; font-size: .86rem; line-height: 1.45; color: var(--muted); cursor: pointer; }
.rich-consenso input { flex: none; width: 19px; height: 19px; margin: 1px 0 0; accent-color: var(--accent); }
.rich-privacy { margin: 4px 0 0 29px !important; font-size: .86rem; }
.rich-privacy a { color: var(--ink); text-underline-offset: 3px; }
.rich-invia, .rich-altra {
  flex: none; min-height: 50px; padding: 0 28px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--accent); color: var(--on-accent);
  font-family: var(--f-label); font-stretch: var(--label-stretch); font-weight: 700; font-size: 1.02rem;
  transition: filter .2s;
}
.rich-invia:hover:not(:disabled), .rich-altra:hover { filter: brightness(1.1); }
.rich-invia:disabled { opacity: .7; cursor: progress; }
.rich-altra { background: transparent; color: var(--ink); border: 1.5px solid var(--line); margin-top: 20px; }
.rich-ok p { color: var(--muted); }
.rich-ok:focus { outline: none; }

@media (max-width: 1100px) {
  .prenota { grid-template-columns: 1fr; }
  .prenota .pren-testo h2 { max-width: 12.3em; }
  .prenota .pren-row { flex-direction: row; flex-wrap: wrap; gap: 8px 32px; }
  .prenota .pren-testo p { max-width: none; }
  .rich-box { max-width: 760px; }
}
@media (max-width: 700px) {
  .rich-grid .c2 { grid-column: span 3; }
  .rich-grid .ce { grid-column: 1 / -1; }
  .rich-grid .cs { grid-column: span 2; }
  .rich-piede { flex-direction: column; align-items: stretch; }
  .rich-invia { width: 100%; }
}
@media (max-width: 420px) {
  .rich-tipo { display: flex; width: 100%; }
  .rich-tipo label { flex: 1; text-align: center; }
}

/* ---------- Footer ---------- */
.ft { padding: clamp(48px, 7vw, 80px) var(--pad) 28px; display: grid; grid-template-columns: auto 1fr; gap: 24px 48px; align-items: start; }
.ft-logo { height: 150px; width: auto; filter: var(--photo-filter); }
.ft-cols { display: grid; grid-template-columns: repeat(4, auto); gap: 20px 48px; justify-content: start; font-family: var(--f-label); font-stretch: var(--label-stretch); }
.ft-cols a { text-decoration: none; }
.ft-cols a:hover { text-decoration: underline; }
.ft-social { display: inline-flex; gap: 6px; margin-top: 10px; }
.ft-social a { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid var(--line); color: var(--ink); }
.ft-social a:hover { border-color: var(--ink); text-decoration: none; }
.ft-social a[hidden] { display: none; }
.ft-lang a { margin-right: 8px; color: var(--muted); }
.ft-lang a[aria-current="true"] { color: var(--ink); text-decoration: underline; }
.ft-fondo { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 32px; margin: 24px 0 0; padding-top: 18px; border-top: 1px solid var(--line); font-size: .9rem; color: var(--muted); }
.ft-fondo p { margin: 0; }
/* firma di chi ha fatto il sito (richiesta di Paolo, 18/11/2026) */
.ft-firma { white-space: nowrap; }
.ft-firma a { color: var(--ink); font-weight: 600; text-decoration: none; }
.ft-firma a:hover { text-decoration: underline; }
.ft-cuore { display: inline-block; vertical-align: -1px; fill: var(--accent); }
@media (prefers-reduced-motion: no-preference) {
  .ft-firma:hover .ft-cuore { animation: ft-battito .9s ease-in-out infinite; }
  @keyframes ft-battito { 0%, 100% { transform: scale(1); } 30% { transform: scale(1.25); } 60% { transform: scale(.95); } }
}

/* ---------- Responsive ---------- */
/* Sotto i 1400 px il menu scende in una seconda riga, il selettore resta al centro */
@media (max-width: 1400px) {
  :root { --hd: 108px; }
  .hd {
    grid-template-areas: "left vista cta" "nav nav nav"; row-gap: 4px;
    height: auto; padding-top: 10px; padding-bottom: 0; /* --hd = altezza misurata da moderno.js */
  }
  .hd-left { grid-area: left; }
  .vista { grid-area: vista; }
  .hd-right { display: contents; }
  .hd-cta { grid-area: cta; justify-self: end; }
  .hd-nav {
    grid-area: nav; justify-content: center;
    margin: 0 calc(-1 * var(--pad)); padding: 2px var(--pad) 8px; overflow-x: auto; scrollbar-width: none; gap: 20px;
  }
  .hd-nav::-webkit-scrollbar { display: none; }
  .hd-nav.oltre-dx { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 56px), transparent 100%); mask-image: linear-gradient(to right, #000 calc(100% - 56px), transparent 100%); }
  .hd-nav.oltre-sx { -webkit-mask-image: linear-gradient(to right, transparent 0, #000 28px); mask-image: linear-gradient(to right, transparent 0, #000 28px); }
  .hd-nav.oltre-sx.oltre-dx { -webkit-mask-image: linear-gradient(to right, transparent 0, #000 28px, #000 calc(100% - 56px), transparent 100%); mask-image: linear-gradient(to right, transparent 0, #000 28px, #000 calc(100% - 56px), transparent 100%); }
  .nav-avanti {
    grid-area: nav; justify-self: end; align-self: center; z-index: 1; margin-bottom: 4px;
    display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border-radius: 50%;
    background: var(--bg); color: var(--ink); border: 1px solid var(--line); cursor: pointer;
    box-shadow: 0 1px 4px rgba(19, 32, 26, .12);
  }
  .nav-avanti[hidden] { display: none; }
  .nav-avanti svg { width: 14px; height: 14px; }
  .hd-logo img { height: 50px; }
}

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; height: auto; max-height: none; min-height: 0; }
  .hero-photo { height: 58svh; order: -1; }
  .hero-brand { gap: 28px; }
  .hero-logo { height: 210px; }
  .card-body { grid-template-columns: 1fr; }
  .card h2 { grid-row: auto; }
  .arch-head { grid-template-columns: 1fr; }
  .arch-head .btn { justify-self: start; }
  .arr-grid { grid-template-columns: 1fr; }
  .ft { grid-template-columns: 1fr; }
  .ft-cols { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  :root { --hd: 122px; }
  .hd { gap: 10px; }
  .hd { grid-template-areas: "logo vista cta" "nav nav lang"; }
  .hd-left { display: contents; }
  .hd-logo { grid-area: logo; justify-self: start; }
  .lang { grid-area: lang; justify-self: end; padding-bottom: 6px; }
  .hd-logo .hd-logo-full { display: none; }
  .hd-logo .hd-logo-mark { display: block; height: 44px; }
  .hd-cta { padding: 9px 14px; font-size: .95rem; }
  .vista-opt { padding: 6px 10px; font-size: .92rem; gap: 4px; }
  .vista-opt svg { width: 15px; height: 15px; }
  /* Menu su una riga che scorre (scelta di Paolo, 15/11): sfumatura e freccia dicono che continua */
  .hd-nav { justify-content: flex-start; gap: 18px; margin: 0; padding: 2px 34px 8px 0; }
  .reel { grid-auto-columns: 82%; }
}
@media (max-width: 360px) {
  .vista-opt svg { display: none !important; }
}

/* Ancore in flusso per le carte sticky (il menu e i link puntano qui) */
.anchor { display: block; height: 0; }

/* Pulsante video sull'hero */
.hero-play {
  position: absolute; left: var(--pad); bottom: 20px;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 18px 10px 10px; border-radius: 999px;
  background: rgba(255, 255, 255, .94); color: var(--ink);
  font-family: var(--f-label); font-stretch: var(--label-stretch); font-weight: 600;
  text-decoration: none;
  transition: background-color .2s, transform .2s;
}
.hero-play:hover { background: #fff; transform: translateY(-1px); }
.play-ico {
  width: 34px; height: 34px; border-radius: 50%; background: var(--accent); flex: none;
  display: grid; place-items: center;
}
.play-ico::before {
  content: ""; margin-left: 3px;
  border-left: 11px solid #fff; border-top: 7px solid transparent; border-bottom: 7px solid transparent;
}
html[data-era="1931"] .hero-play { border-radius: 0; background: #F3EDDF; }
html[data-era="1931"] .play-ico { border-radius: 0; }
@media (max-width: 520px) { .hero-play { bottom: auto; top: 16px; } }

/* Nel 1931 il video promozionale (2014) non si mostra */
html[data-era="1931"] .hero-play { display: none; }

/* Filmato d'epoca nell'archivio */
.film {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: clamp(24px, 4vw, 56px); align-items: end;
  padding: 0 var(--pad); margin-bottom: clamp(56px, 7vw, 96px);
}
.film-frame {
  margin: 0; aspect-ratio: 4 / 3; overflow: hidden; background: #000;
  border: 12px solid #F3EDDF;
  box-shadow: 0 18px 36px -20px rgba(40, 26, 10, .6);
}
.film-frame > .photo { width: 100%; height: 100%; object-fit: cover; }
.film-play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  display: inline-flex; align-items: center; gap: 12px;
  padding: 12px 22px 12px 12px; background: #F3EDDF; color: var(--ink);
  font-family: var(--f-label); font-weight: 700; font-size: 1.05rem; text-decoration: none;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .45);
}
.film-play:hover { background: #fff; }
.film-play .play-ico { border-radius: 0; width: 40px; height: 40px; }
.film-meta h3 { font-size: calc(clamp(calc(1.8rem / var(--st, 1)), 3vw, calc(2.6rem / var(--st, 1))) * var(--sh, 1)); font-style: italic; font-weight: 500; margin-bottom: .4em; }
.film-meta p { color: var(--muted); max-width: 38ch; }
.film-meta .frame-ref { margin-top: 12px; }
@media (max-width: 860px) {
  .film { grid-template-columns: 1fr; }
  .film-frame { border-width: 8px; }
}

/* Video promo nell'hero: l'hero diventa 16:9 a tutta larghezza, niente bande */
.hero:has(.hero-photo.is-playing) {
  grid-template-columns: 1fr; height: auto; min-height: 0; max-height: none;
}
.hero:has(.hero-photo.is-playing) .hero-brand { display: none; }
.hero-photo.is-playing { aspect-ratio: 16 / 9; height: auto; }


/* Come arrivare: la stagione mostrata viene per prima */
html[data-season="estate"] .arr-col[data-stagione="estate"],
html[data-season="inverno"] .arr-col[data-stagione="inverno"] { order: -1; }



/* ---------- Lingua ---------- */
.lang { position: relative; }
.lang-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px; border-radius: 999px; border: 1px solid var(--line); background: transparent; cursor: pointer;
  font-family: var(--f-label); font-stretch: var(--label-stretch); font-weight: 600; font-size: .92rem; color: var(--ink);
}
.lang-btn:hover, .lang-btn[aria-expanded="true"] { border-color: var(--ink); }
.lang-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.lang-menu {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 130; min-width: 170px;
  list-style: none; margin: 0; padding: 6px; border-radius: 14px;
  background: var(--bg); border: 1px solid var(--line); box-shadow: 0 16px 34px -14px rgba(0, 0, 0, .35);
}
.lang-menu[hidden] { display: none; }
.lang-menu button {
  display: block; width: 100%; text-align: left; padding: 9px 12px; border: 0; border-radius: 9px; cursor: pointer;
  background: transparent; color: var(--ink); font-family: var(--f-label); font-stretch: var(--label-stretch); font-size: 1rem;
}
.lang-menu button:hover { background: var(--soft); }
.lang-menu button[aria-current="true"] { font-weight: 700; background: var(--soft); }
html[data-era="1931"] .lang-btn, html[data-era="1931"] .lang-menu, html[data-era="1931"] .lang-menu button { border-radius: 0; }
@media (max-width: 640px) {
  .lang-menu { left: auto; right: 0; }
  .lang-btn { padding: 4px 9px; }
}
.ft-lang a { margin-right: 10px; }

/* Finché i testi tradotti non sono pronti la pagina resta nascosta (solo lingue diverse dall'italiano) */
html.i18n-attesa body { visibility: hidden; }

/* ---------- Cinese: caratteri di sistema, niente corsivi né spaziature strette ---------- */
html[lang^="zh"][data-era="oggi"] {
  --f-display: "Archivo", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --f-body: "Archivo", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --f-label: "Archivo", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --display-track: 0;
}
html[lang^="zh"][data-era="1931"] {
  --f-display: "Bodoni Moda", "Songti SC", "STSong", "SimSun", "Noto Serif SC", serif;
  --f-body: "Bodoni Moda", "Songti SC", "STSong", "SimSun", "Noto Serif SC", serif;
  --f-label: "Courier Prime", "Songti SC", "SimSun", "Noto Serif SC", monospace;
}
html[lang^="zh"] * { font-style: normal !important; }
html[lang^="zh"] :is(h1, h2, h3, .manifesto-text) { line-height: 1.25 !important; letter-spacing: 0 !important; }
html[lang^="zh"] body { line-height: 1.75; }

/* 1931: nel menu e nel pulsante Prenota il Bodoni, più stretto del Courier, così il selettore resta al centro */
html[data-era="1931"] .hd-nav a, html[data-era="1931"] .hd-cta { font-family: var(--f-display); font-weight: 600; letter-spacing: 0; }
html[data-era="1931"] .hd-nav { gap: 14px; }
html[data-era="1931"] .hd-nav a { font-size: .94rem; }
html[data-era="1931"] .hd-cta { padding: 10px 16px; font-size: .94rem; }

/* Il video promozionale è girato d'inverno: nella versione estiva non si mostra */
html[data-season="estate"] .hero-play:not([data-estate]) { display: none; }
.hero-play[hidden] { display: none !important; }   /* il pannello può togliere il video (moderno.js) */

/* Contenuti dal pannello: la pagina compare quando sono arrivati (al massimo 1,5 s) */
html.contenuti-attesa body { visibility: hidden; }
.anteprima-bar {
  position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 190;
  padding: 8px 16px; border-radius: 999px; background: #13201A; color: #fff;
  font: 600 .9rem/1.2 "Archivo", system-ui, sans-serif; box-shadow: 0 10px 26px -10px rgba(0, 0, 0, .5);
  pointer-events: none;
}
