/* ==========================================================================
   FONT SELF-HOSTED (GDPR: nessuna chiamata a Google)
   Generati da Google Fonts, subset latin + latin-ext (IT/EN/DE/FR).
   NON rimuovere: le pagine non caricano piu' fonts.googleapis.com.
   ========================================================================== */

@font-face {
  font-family: 'Cormorant Garamond';
  font-style: italic;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/cormorant-garamond-500-italic-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: 'Cormorant Garamond';
  font-style: italic;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/cormorant-garamond-500-italic-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: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/cormorant-garamond-400-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: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/cormorant-garamond-400-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: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/cormorant-garamond-500-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: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/cormorant-garamond-500-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: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/cormorant-garamond-600-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: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/cormorant-garamond-600-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: 'Jost';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('../fonts/jost-300-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: 'Jost';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('../fonts/jost-300-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: 'Jost';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/jost-400-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: 'Jost';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/jost-400-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: 'Jost';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/jost-500-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: 'Jost';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/jost-500-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;
}

/* ==========================================================================
   FINESTRE SUL PALIO — Design System
   Palette "Terra di Siena": nero caldo, terra bruciata, oro antico, avorio.
   NON MODIFICARE i token senza autorizzazione: tutto il sito dipende da qui.
   ========================================================================== */

:root {
  /* — Colori — */
  --nero:        #16120E;   /* fondo scuro principale (nero caldo) */
  --carbone:     #221B15;   /* superfici scure secondarie */
  --terra:       #96491F;   /* terra di Siena bruciata — accento caldo */
  --terra-scura: #6E3418;
  --oro:         #C9A45C;   /* oro antico — dettagli, linee, hover */
  --oro-chiaro:  #E0C68C;
  --avorio:      #F4EDE1;   /* fondo sezioni chiare */
  --crema:       #EAE0CE;
  --inchiostro:  #2B211A;   /* testo su fondo chiaro */
  --sabbia:      #6F5F4A;   /* testo secondario su chiaro (contrasto AA) */
  --velo:        rgba(22, 18, 14, 0.55); /* overlay foto */

  /* — Tipografia — */
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-sans:    'Jost', 'Segoe UI', sans-serif;

  /* — Ritmo — */
  --sezione: clamp(5rem, 12vh, 9rem);
  --container: 1280px;
  --gutter: clamp(1.25rem, 4vw, 3rem);

  /* — Movimento — */
  --lento: 1.1s cubic-bezier(0.22, 1, 0.36, 1);
  --medio: 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

/* — Base — */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 1.125rem;
  line-height: 1.75;
  color: var(--inchiostro);
  background: var(--avorio);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

h1, h2, h3, .display {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: 0.01em;
}

h1 { font-size: clamp(2.6rem, 7vw, 5.5rem); }
h2 { font-size: clamp(2rem, 4.5vw, 3.4rem); }
h3 { font-size: clamp(1.4rem, 2.5vw, 1.9rem); }

.container { max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }

section { padding-block: var(--sezione); }

/* Eyebrow: etichetta maiuscola distanziata sopra i titoli */
.eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--terra);
  margin-bottom: 1.4rem;
}
.dark .eyebrow, .eyebrow--oro { color: var(--oro); }

/* Filo d'oro: linea decorativa sotto i titoli */
.filo {
  width: 64px; height: 1px;
  background: var(--oro);
  border: 0;
  margin: 2rem 0;
}
.filo--centro { margin-inline: auto; }

.lead { font-size: clamp(1.1rem, 1.8vw, 1.35rem); font-weight: 300; color: var(--sabbia); }
.dark .lead { color: rgba(244, 237, 225, 0.72); }

/* Sezioni scure */
.dark { background: var(--nero); color: var(--avorio); }
.dark h1, .dark h2, .dark h3 { color: var(--avorio); }

.centro { text-align: center; }
.centro .lead { margin-inline: auto; max-width: 46ch; }

/* ==========================================================================
   Preloader
   ========================================================================== */
#preloader {
  position: fixed; inset: 0; z-index: 200;
  background: var(--nero);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1.2rem;
  transition: opacity 0.9s ease, visibility 0.9s;
}
#preloader.via { opacity: 0; visibility: hidden; }
#preloader .marchio {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  color: var(--avorio);
  letter-spacing: 0.12em;
  animation: respiro 2.4s ease-in-out infinite;
}
#preloader .filo { margin: 0; animation: filoCresci 1.8s var(--lento) both; }
@keyframes respiro { 0%, 100% { opacity: 0.55; } 50% { opacity: 1; } }
@keyframes filoCresci { from { width: 0; } to { width: 64px; } }

/* ==========================================================================
   Header
   ========================================================================== */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 1.4rem 0;
  transition: background var(--medio), padding var(--medio), box-shadow var(--medio);
}
.header .container {
  max-width: none;
  display: flex; align-items: center; justify-content: space-between; gap: 2rem;
}
.header.solido {
  background: rgba(22, 18, 14, 0.92);
  backdrop-filter: blur(12px);
  padding: 0.85rem 0;
  box-shadow: 0 1px 0 rgba(201, 164, 92, 0.25);
}
.logo {
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: 0.1em;
  color: var(--avorio);
  white-space: nowrap;
}
.logo small {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.58rem;
  letter-spacing: 0.5em;
  text-transform: uppercase;
  color: var(--oro);
}
.nav { display: flex; align-items: center; gap: 2.2rem; }
.nav a {
  font-size: 0.8rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--avorio);
  position: relative;
  padding-block: 0.3rem;
}
.nav a::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 100%; height: 1px; background: var(--oro);
  transform: scaleX(0); transform-origin: right;
  transition: transform var(--medio);
}
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }

.lingue { display: flex; gap: 0.9rem; font-size: 0.72rem; letter-spacing: 0.18em; }
.lingue a { color: rgba(244, 237, 225, 0.5); text-transform: uppercase; }
.lingue a.attiva, .lingue a:hover { color: var(--oro); }

/* Hamburger (solo mobile) */
.menu-btn {
  display: none;
  background: none; border: 0; cursor: pointer;
  width: 40px; height: 40px; position: relative; z-index: 110;
}
.menu-btn span {
  display: block; width: 26px; height: 1px; background: var(--avorio);
  margin: 7px auto; transition: transform var(--medio), opacity var(--medio);
}
.menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ==========================================================================
   Bottoni
   ========================================================================== */
.btn {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  padding: 1.05rem 2.6rem;
  border: 1px solid var(--oro);
  color: var(--oro);
  background: transparent;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: color var(--medio);
  z-index: 1;
}
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--oro);
  transform: scaleX(0); transform-origin: right;
  transition: transform var(--medio);
}
.btn:hover { color: var(--nero); }
.btn:hover::before { transform: scaleX(1); transform-origin: left; }
.btn--pieno { background: var(--oro); color: var(--nero); }
.btn--pieno::before { background: var(--avorio); }
.btn--scuro { border-color: var(--terra); color: var(--terra); }
.btn--scuro::before { background: var(--terra); }
.btn--scuro:hover { color: var(--avorio); }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex; align-items: center;
  padding: 0;
  color: var(--avorio);
  overflow: hidden;
}
.hero--basso { min-height: 72svh; }
.hero__media { position: absolute; inset: 0; z-index: 0; }
.hero__media img, .hero__media picture {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
}
.hero__media img { animation: kenburns 22s ease-out both; }
@keyframes kenburns { from { transform: scale(1.12); } to { transform: scale(1); } }
.hero__media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(22,18,14,0.55) 0%, rgba(22,18,14,0.25) 45%, rgba(22,18,14,0.75) 100%);
}
.hero .container { position: relative; z-index: 1; width: 100%; }
.hero h1 { max-width: 14ch; text-wrap: balance; }
.hero .lead { max-width: 44ch; margin-top: 1.6rem; color: rgba(244,237,225,0.85); }
.hero .btn { margin-top: 2.8rem; }

/* Indicatore di scroll */
.scroll-cenno {
  position: absolute; bottom: 2.2rem; left: 50%; transform: translateX(-50%);
  z-index: 2;
  font-size: 0.65rem; letter-spacing: 0.4em; text-transform: uppercase;
  color: rgba(244,237,225,0.65);
  display: flex; flex-direction: column; align-items: center; gap: 0.8rem;
}
.scroll-cenno::after {
  content: ""; width: 1px; height: 44px;
  background: linear-gradient(var(--oro), transparent);
  animation: goccia 2.2s ease-in-out infinite;
}
@keyframes goccia { 0% { transform: scaleY(0); transform-origin: top; } 55% { transform: scaleY(1); transform-origin: top; } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* ==========================================================================
   Numeri / statistiche
   ========================================================================== */
.numeri {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 2.5rem;
  text-align: center;
  margin-top: 4rem;
}
.numeri .cifra {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 5vw, 4rem);
  color: var(--terra);
  line-height: 1;
}
.dark .numeri .cifra { color: var(--oro); }
.numeri .voce {
  font-size: 0.72rem; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--sabbia); margin-top: 0.8rem;
}
.dark .numeri .voce { color: rgba(244,237,225,0.55); }

/* ==========================================================================
   Card finestre (catalogo)
   ========================================================================== */
.griglia-finestre {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: clamp(1.5rem, 3vw, 2.5rem);
  margin-top: 4rem;
}
.card-finestra { position: relative; display: block; }
.card-finestra figure {
  position: relative; overflow: hidden; aspect-ratio: 4 / 5;
  background: var(--carbone);
}
.card-finestra img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 1.4s cubic-bezier(0.22, 1, 0.36, 1), filter 1.4s;
}
.card-finestra:hover img { transform: scale(1.06); filter: brightness(1.06); }
.card-finestra figure::after {
  content: ""; position: absolute; inset: 12px;
  border: 1px solid rgba(201, 164, 92, 0);
  transition: border-color var(--medio), inset var(--medio);
  pointer-events: none;
}
.card-finestra:hover figure::after { border-color: rgba(201, 164, 92, 0.85); inset: 20px; }
.card-finestra .corpo { padding: 1.6rem 0.2rem 0; }
.card-finestra .luogo {
  font-size: 0.7rem; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--terra); display: block; margin-bottom: 0.5rem;
}
.dark .card-finestra .luogo { color: var(--oro); }
.card-finestra h3 { transition: color var(--medio); }
.card-finestra:hover h3 { color: var(--terra); }
.dark .card-finestra:hover h3 { color: var(--oro-chiaro); }
.card-finestra .dettagli {
  display: flex; gap: 1.4rem; margin-top: 0.7rem;
  font-size: 0.85rem; color: var(--sabbia);
}
.dark .card-finestra .dettagli { color: rgba(244,237,225,0.6); }
.card-finestra .prezzo {
  font-family: var(--font-display); font-style: italic;
  font-size: 1.05rem; color: var(--inchiostro); margin-top: 0.6rem;
}
.dark .card-finestra .prezzo { color: var(--avorio); }

/* ==========================================================================
   Sezione editoriale a due colonne
   ========================================================================== */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: center;
}
.split--inversa > *:first-child { order: 2; }
.split figure { overflow: hidden; position: relative; }
.split figure img { transition: transform 1.6s cubic-bezier(0.22, 1, 0.36, 1); }
.split figure:hover img { transform: scale(1.05); }
.split .cornice { border: 1px solid var(--oro); padding: 14px; }

/* ==========================================================================
   Mosaico galleria (sezione Palio)
   ========================================================================== */
.mosaico {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 240px;
  gap: 14px;
  margin-top: 4rem;
}
/* Con 5 figure la griglia 3×2 si riempie ESATTAMENTE: la prima occupa 2 righe
   (2 celle) + 4 singole = 6 celle. Non aggiungere altri span: creano buchi. */
.mosaico figure { overflow: hidden; position: relative; }
.mosaico figure:nth-child(1) { grid-row: span 2; }
.mosaico img {
  width: 100%; height: 100%; object-fit: cover;
  filter: saturate(0.92);
  transition: transform 1.4s cubic-bezier(0.22, 1, 0.36, 1), filter 1.4s;
}
.mosaico figure:hover img { transform: scale(1.07); filter: saturate(1.05); }
.mosaico figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 2rem 1.2rem 1rem;
  font-size: 0.7rem; letter-spacing: 0.25em; text-transform: uppercase;
  color: var(--avorio);
  background: linear-gradient(transparent, rgba(22,18,14,0.8));
  opacity: 0; transform: translateY(8px);
  transition: opacity var(--medio), transform var(--medio);
}
.mosaico figure:hover figcaption { opacity: 1; transform: translateY(0); }

/* ==========================================================================
   Citazione
   ========================================================================== */
.citazione {
  max-width: 820px; margin-inline: auto; text-align: center;
}
.citazione blockquote {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.2vw, 2.4rem);
  font-style: italic;
  font-weight: 500;
  line-height: 1.4;
  text-wrap: balance;
}
.citazione cite {
  display: block; margin-top: 2rem;
  font-family: var(--font-sans); font-style: normal;
  font-size: 0.72rem; letter-spacing: 0.35em; text-transform: uppercase;
  color: var(--sabbia);
}
.dark .citazione cite { color: var(--oro); }

/* ==========================================================================
   Form concierge
   ========================================================================== */
.form-concierge { max-width: 720px; margin-inline: auto; }
.form-riga { display: grid; grid-template-columns: 1fr 1fr; gap: 1.8rem; margin-bottom: 1.8rem; }
.form-campo { display: flex; flex-direction: column; gap: 0.5rem; }
.form-campo--piena { grid-column: 1 / -1; }
.form-campo label {
  font-size: 0.7rem; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--oro);
}
.form-campo input, .form-campo select, .form-campo textarea {
  font-family: var(--font-sans); font-size: 1rem; font-weight: 300;
  color: var(--avorio);
  background: transparent;
  border: 0; border-bottom: 1px solid rgba(201,164,92,0.35);
  padding: 0.7rem 0.1rem;
  transition: border-color var(--medio);
}
.form-campo input:focus, .form-campo select:focus, .form-campo textarea:focus {
  outline: none; border-bottom-color: var(--oro);
}
.form-campo select option { color: var(--inchiostro); }
.form-campo textarea { resize: vertical; min-height: 120px; }
.form-nota { font-size: 0.85rem; color: rgba(244,237,225,0.5); margin-top: 1.5rem; }

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
  background: var(--nero); color: rgba(244,237,225,0.65);
  padding: 4.5rem 0 2.5rem;
  border-top: 1px solid rgba(201,164,92,0.2);
}
.footer .colonne {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3.5rem;
}
.footer h4 {
  font-size: 0.7rem; letter-spacing: 0.35em; text-transform: uppercase;
  color: var(--oro); margin-bottom: 1.2rem; font-weight: 400;
}
.footer li { margin-bottom: 0.6rem; font-size: 0.92rem; }
.footer a:hover { color: var(--oro-chiaro); }
.footer .legale {
  border-top: 1px solid rgba(244,237,225,0.1);
  padding-top: 2rem;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem;
  font-size: 0.78rem; color: rgba(244,237,225,0.4);
}

/* ==========================================================================
   Animazioni di reveal (via IntersectionObserver in main.js)
   ========================================================================== */
[data-reveal] {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity var(--lento), transform var(--lento);
  transition-delay: var(--ritardo, 0s);
}
[data-reveal].visibile { opacity: 1; transform: none; }
[data-reveal="sinistra"] { transform: translateX(-40px); }
[data-reveal="destra"]  { transform: translateX(40px); }
[data-reveal="zoom"]    { transform: scale(0.94); }

/* Parallax leggero (via main.js) */
[data-parallax] { will-change: transform; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 900px) {
  .nav {
    position: fixed; inset: 0;
    background: rgba(22, 18, 14, 0.97);
    backdrop-filter: blur(14px);
    flex-direction: column; justify-content: center; gap: 2.4rem;
    opacity: 0; visibility: hidden;
    transition: opacity var(--medio), visibility var(--medio);
  }
  .nav.aperta { opacity: 1; visibility: visible; }
  .nav a { font-size: 1rem; }
  .menu-btn { display: block; }
  .lingue { position: relative; z-index: 110; }

  .split, .split--inversa { grid-template-columns: 1fr; }
  .split--inversa > *:first-child { order: 0; }

  .mosaico { grid-template-columns: 1fr 1fr; grid-auto-rows: 200px; }

  .footer .colonne { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .form-riga { grid-template-columns: 1fr; gap: 1.4rem; }
}

@media (max-width: 540px) {
  .numeri { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .footer .colonne { grid-template-columns: 1fr; }
  .btn { width: 100%; text-align: center; }
  .hero .btn { width: auto; }
}

/* ==========================================================================
   EFFETTI PREMIUM v2
   ========================================================================== */

/* — Grana pellicola: texture impercettibile su tutto il sito — */
body::after {
  content: "";
  position: fixed; inset: -50%; z-index: 95;
  pointer-events: none;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grana 0.6s steps(4) infinite;
}
@keyframes grana {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-2%, 1%); }
  50% { transform: translate(1%, -2%); }
  75% { transform: translate(-1%, 2%); }
  100% { transform: translate(2%, 1%); }
}

/* — Cursore su misura (solo dispositivi con mouse) — */
.cursore-punto, .cursore-anello {
  position: fixed; top: 0; left: 0;
  pointer-events: none; z-index: 300;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
}
.cursore-punto { width: 5px; height: 5px; background: var(--oro); }
.cursore-anello {
  width: 34px; height: 34px;
  border: 1px solid rgba(201, 164, 92, 0.65);
  transition: width 0.35s, height 0.35s, background 0.35s, border-color 0.35s;
  display: flex; align-items: center; justify-content: center;
  font-size: 0; color: var(--nero);
}
body.cursore-attivo .cursore-punto, body.cursore-attivo .cursore-anello { opacity: 1; }
.cursore-anello.grande {
  width: 58px; height: 58px;
  background: rgba(201, 164, 92, 0.12);
  border-color: var(--oro);
}
.cursore-anello.zoom {
  width: 68px; height: 68px;
  background: var(--oro);
  border-color: var(--oro);
  font-family: var(--font-sans);
  font-size: 0.6rem; letter-spacing: 0.22em; font-weight: 500;
}
.cursore-anello.zoom::after { content: "VEDI"; }
@media (hover: none), (pointer: coarse) {
  .cursore-punto, .cursore-anello { display: none; }
}

/* — Lightbox: ingrandimento immagini a schermo intero — */
[data-lightbox] { cursor: zoom-in; }
.lightbox {
  position: fixed; inset: 0; z-index: 260;
  background: rgba(22, 18, 14, 0.96);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center; flex-direction: column;
  opacity: 0; visibility: hidden;
  transition: opacity 0.55s ease, visibility 0.55s;
}
.lightbox.aperta { opacity: 1; visibility: visible; }
.lightbox figure {
  max-width: min(1500px, 92vw);
  text-align: center;
}
.lightbox img {
  max-width: 100%; max-height: 82svh;
  width: auto; height: auto;
  margin-inline: auto;
  object-fit: contain;
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.65);
  transform: scale(0.94);
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.lightbox.aperta img { transform: scale(1); }
.lightbox figcaption {
  margin-top: 1.4rem;
  font-family: var(--font-display); font-style: italic;
  font-size: 1.05rem; color: var(--avorio);
}
.lightbox figcaption small {
  display: block; margin-top: 0.3rem;
  font-family: var(--font-sans); font-style: normal;
  font-size: 0.65rem; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--oro);
}
.lightbox button {
  position: absolute;
  background: none; border: 0; cursor: pointer;
  color: rgba(244, 237, 225, 0.7);
  font-family: var(--font-display);
  transition: color 0.3s, transform 0.3s;
}
.lightbox button:hover { color: var(--oro); }
.lightbox .lb-chiudi { top: 1.4rem; right: 2rem; font-size: 2.4rem; line-height: 1; }
.lightbox .lb-prec, .lightbox .lb-succ {
  top: 50%; transform: translateY(-50%);
  font-size: 3.4rem; padding: 1rem;
}
.lightbox .lb-prec { left: 1rem; }
.lightbox .lb-succ { right: 1rem; }
.lightbox .lb-prec:hover { transform: translateY(-50%) translateX(-4px); }
.lightbox .lb-succ:hover { transform: translateY(-50%) translateX(4px); }
.lightbox .lb-conta {
  position: absolute; bottom: 1.6rem; left: 50%; transform: translateX(-50%);
  font-family: var(--font-sans); font-size: 0.68rem;
  letter-spacing: 0.35em; color: rgba(244, 237, 225, 0.5);
}
@media (max-width: 700px) {
  .lightbox .lb-prec, .lightbox .lb-succ { font-size: 2.4rem; padding: 0.6rem; }
}

/* — Reveal "a tenda": l'immagine si svela da sinistra come un sipario — */
[data-reveal="tenda"] {
  opacity: 1;
  transform: none;
  clip-path: inset(0 100% 0 0);
  transition: clip-path 1.3s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--ritardo, 0s);
}
[data-reveal="tenda"].visibile { clip-path: inset(0 0 0 0); }

/* — Titoli parola per parola (data-parole, gestito da main.js) — */
[data-parole] .parola {
  display: inline-block;
  opacity: 0;
  transform: translateY(1.1em) rotate(1.5deg);
  transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: calc(var(--i, 0) * 80ms + var(--ritardo, 0s));
}
[data-parole].visibile .parola { opacity: 1; transform: none; }
[data-reveal="parole"] { opacity: 1; transform: none; }

/* — Bottoni magnetici: il transform arriva da main.js — */
.btn { transition: color var(--medio), transform 0.25s ease-out; }

/* — Vetrina finestre (pagina finestre.html): card non-link con CTA — */
.card-finestra .btn { margin-top: 1.2rem; padding: 0.8rem 1.8rem; font-size: 0.68rem; }
.ancora-categoria { scroll-margin-top: 90px; }

@media (prefers-reduced-motion: reduce) {
  body::after { animation: none; }
  .cursore-punto, .cursore-anello { display: none; }
  [data-reveal="tenda"] { clip-path: none; }
  [data-parole] .parola { opacity: 1; transform: none; }
}

/* Accessibilità: rispetta chi disattiva le animazioni */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  [data-reveal] { opacity: 1; transform: none; }
}

/* — Aggiunte 17/07/2026 · pagina Il Palio: i riti della corsa e le curiosità — */
.riti {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: clamp(2rem, 4vw, 3.5rem);
  margin-top: 4.5rem;
  text-align: left;
}
.riti .passo {
  display: block;
  font-size: 0.68rem; letter-spacing: 0.38em; text-transform: uppercase;
  color: var(--oro);
  margin-bottom: 0.9rem;
}
.riti h3 { font-size: 1.35rem; margin-bottom: 0.7rem; }
.riti p { font-size: 1rem; }
.dark .riti p { color: rgba(244, 237, 225, 0.75); }

.curiosita {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: clamp(2rem, 4vw, 3rem);
  margin-top: 4rem;
}
.curiosita article {
  border-top: 1px solid rgba(201, 164, 92, 0.55);
  padding-top: 1.5rem;
}
.curiosita h3 { font-size: 1.35rem; margin-bottom: 0.6rem; }
.curiosita p { font-size: 1rem; }

/* ==========================================================================
   Raffinatezze premium + leggibilità — 17/07/2026
   (le regole qui sotto vincono sulle omonime precedenti: stesso selettore,
   posizione successiva nel foglio)
   ========================================================================== */

/* — FIX menu a tendina: su Windows il popup delle <option> ereditava testo
   avorio su fondo chiaro e sembrava vuoto. Doppia difesa: color-scheme dark
   (Chrome/Edge) + colori espliciti sulle option (Firefox). — */
.form-campo select { color-scheme: dark; }
.form-campo select option,
.form-campo select optgroup {
  background-color: var(--carbone);
  color: var(--avorio);
}

/* Campi del form più tangibili e leggibili */
.form-campo input, .form-campo select, .form-campo textarea {
  background: rgba(244, 237, 225, 0.05);
  padding: 0.8rem 0.8rem;
  border-radius: 2px 2px 0 0;
}
.form-campo input:focus, .form-campo select:focus, .form-campo textarea:focus {
  background: rgba(244, 237, 225, 0.09);
}
input[type="checkbox"] { accent-color: var(--oro); }
.form-nota { color: rgba(244, 237, 225, 0.65); }

/* Respiro tipografico: il reset azzera i margini, ridiamo aria ai paragrafi */
p + p { margin-top: 1.15em; }
h2 + p, h3 + p { margin-top: 0.6em; }
p + .btn, p + a.btn { margin-top: 1.8rem; }

/* Contrasti rafforzati sulle sezioni scure */
.dark .lead { color: rgba(244, 237, 225, 0.82); }
.dark .numeri .voce { color: rgba(244, 237, 225, 0.68); }
.dark .card-finestra .dettagli { color: rgba(244, 237, 225, 0.72); }
.dark .riti p { color: rgba(244, 237, 225, 0.82); }
.mosaico figcaption { font-size: 0.72rem; }
.footer { color: rgba(244, 237, 225, 0.75); }
.footer .legale { color: rgba(244, 237, 225, 0.55); }

/* Titoli hero sempre leggibili sopra le fotografie */
.hero h1, .hero .lead, .hero .eyebrow {
  text-shadow: 0 2px 26px rgba(22, 18, 14, 0.55);
}

/* Selezione del testo e scrollbar coordinate col brand */
::selection { background: var(--oro); color: var(--nero); }
::-webkit-scrollbar { width: 11px; }
::-webkit-scrollbar-track { background: var(--carbone); }
::-webkit-scrollbar-thumb {
  background: #55462f;
  border-radius: 6px;
  border: 2px solid var(--carbone);
}
::-webkit-scrollbar-thumb:hover { background: var(--oro); }

/* Filo d'oro sfumato (più prezioso della linea piatta) */
.filo { background: linear-gradient(90deg, var(--oro), rgba(201, 164, 92, 0.12)); }
.filo--centro { background: linear-gradient(90deg, rgba(201, 164, 92, 0.1), var(--oro), rgba(201, 164, 92, 0.1)); }

/* Eyebrow con lineetta introduttiva */
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 26px; height: 1px;
  background: currentColor;
  vertical-align: middle;
  margin-right: 0.9rem;
  opacity: 0.8;
}

/* Citazioni con segno decorativo */
.citazione blockquote { position: relative; padding-top: 2.4rem; }
.citazione blockquote::before {
  content: "\00AB";
  position: absolute; top: -0.6rem; left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-display);
  font-size: 4.2rem; line-height: 1;
  color: var(--oro);
  opacity: 0.55;
}

/* Card finestre: sollevamento morbido al passaggio */
.card-finestra {
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.card-finestra:hover { transform: translateY(-8px); }

/* Didascalie del mosaico sempre visibili sui dispositivi touch
   (senza hover resterebbero nascoste) */
@media (hover: none), (pointer: coarse) {
  .mosaico figcaption { opacity: 1; transform: none; }
}

/* — Immagini a corredo dei riti e delle curiosità (pagina Il Palio) — */
.riti figure {
  aspect-ratio: 3 / 2;
  overflow: hidden;
  margin-bottom: 1.4rem;
  border: 1px solid rgba(201, 164, 92, 0.35);
}
.riti figure img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}
.riti figure:hover img { transform: scale(1.06); }

/* Quadro storico a tutta larghezza con didascalia */
.quadro { margin-top: clamp(3rem, 6vw, 4.5rem); }
.quadro figcaption {
  margin-top: 1.1rem;
  text-align: center;
  font-family: var(--font-display); font-style: italic;
  font-size: 1rem; color: var(--sabbia);
}
.dark .quadro figcaption { color: rgba(244, 237, 225, 0.65); }

/* Coppia di immagini verticali con didascalia sotto */
.duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.2rem, 3vw, 2.5rem);
  margin-top: 4rem;
}
.duo .inquadro {
  display: block;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  border: 1px solid rgba(201, 164, 92, 0.35);
}
.duo img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}
.duo .inquadro:hover img { transform: scale(1.05); }
.duo figcaption {
  margin-top: 0.9rem;
  text-align: center;
  font-size: 0.7rem; letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--sabbia);
}
@media (max-width: 640px) {
  .duo { grid-template-columns: 1fr; }
}

/* ==========================================================================
   NAVIGAZIONE PIÙ EVIDENTE + BLOCCO "ESPLORA" — 20/07/2026
   Obiettivo: rendere ovvio dove si può andare e invogliare a esplorare.
   ========================================================================== */

/* — Header: velo scuro anche prima dello scroll, così il menu si legge sempre — */
.header::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(22, 18, 14, 0.75), transparent);
  pointer-events: none;
  transition: opacity var(--medio);
}
.header.solido::before { opacity: 0; }
.header > .container { position: relative; z-index: 1; }

/* — Voci di menu più presenti (dimensione, peso, filo d'oro persistente) — */
.nav a {
  font-size: 0.84rem;
  font-weight: 400;
  letter-spacing: 0.2em;
}
.nav a::after { height: 2px; background: var(--oro); }
.nav a[aria-current="page"] { color: var(--oro-chiaro); }

/* — Blocco "Esplora": card grandi verso le altre sezioni — */
.esplora-griglia {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: clamp(1.2rem, 2.5vw, 2rem);
  margin-top: 3.5rem;
}
.esplora-card {
  position: relative;
  display: block;
  overflow: hidden;
  min-height: 340px;
  border: 1px solid rgba(201, 164, 92, 0.28);
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              border-color var(--medio);
}
.esplora-card:hover { transform: translateY(-10px); border-color: var(--oro); }
.esplora-card img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  filter: brightness(0.5) saturate(0.9);
  transition: transform 1.4s cubic-bezier(0.22, 1, 0.36, 1), filter 1s;
}
.esplora-card:hover img { transform: scale(1.08); filter: brightness(0.62) saturate(1); }
.esplora-card::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(22,18,14,0.15) 30%, rgba(22,18,14,0.88) 100%);
}
.esplora-card .corpo {
  position: absolute; inset: auto 0 0 0; z-index: 1;
  padding: 1.8rem 1.6rem;
  color: var(--avorio);
}
.esplora-card .numero {
  display: block;
  font-family: var(--font-display);
  font-size: 0.95rem; letter-spacing: 0.3em;
  color: var(--oro);
  margin-bottom: 0.7rem;
}
.esplora-card h3 {
  font-size: 1.6rem;
  margin-bottom: 0.5rem;
  transition: color var(--medio);
}
.esplora-card:hover h3 { color: var(--oro-chiaro); }
.esplora-card p {
  font-size: 0.92rem;
  color: rgba(244, 237, 225, 0.8);
  margin-bottom: 1rem;
}
.esplora-card .vai {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-size: 0.7rem; letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--oro);
}
.esplora-card .vai::after {
  content: "→";
  transition: transform var(--medio);
}
.esplora-card:hover .vai::after { transform: translateX(6px); }

@media (max-width: 700px) {
  .esplora-card { min-height: 260px; }
  .esplora-card .corpo { padding: 1.4rem 1.2rem; }
  .esplora-card h3 { font-size: 1.35rem; }
}

/* — Logo ufficiale (17/07): i file JPG hanno fondo scuro ~#161510;
   mix-blend-mode: lighten lo fonde con le superfici scure del sito,
   lasciando visibile solo l'oro. Usare il logo SOLO su fondi scuri. — */
.logo { display: inline-flex; align-items: center; gap: 0.85rem; }
.logo-sigillo {
  height: 46px; width: auto;
  mix-blend-mode: lighten;
  flex: none;
}
.footer .logo-sigillo { height: 40px; }
#preloader .marchio-logo {
  width: min(260px, 64vw); height: auto;
  mix-blend-mode: lighten;
  animation: respiro 2.4s ease-in-out infinite;
}
@media (max-width: 540px) {
  .logo-sigillo { height: 38px; }
}

/* ==========================================================================
   LEGGIBILITÀ v3 — 20/07/2026 (blocco finale: vince su tutto per posizione)
   Obiettivo: testo sempre nettamente leggibile, anche sopra le fotografie.
   ========================================================================== */

/* — HERO: overlay molto più deciso, così i testi si staccano dalla foto
   (la foto della folla ha il cielo chiaro proprio dove sta il testo) — */
.hero__media::after {
  background:
    radial-gradient(120% 110% at 22% 48%, rgba(18,14,10,0.55), transparent 62%),
    linear-gradient(180deg,
      rgba(18, 14, 10, 0.80) 0%,
      rgba(18, 14, 10, 0.46) 38%,
      rgba(18, 14, 10, 0.60) 68%,
      rgba(18, 14, 10, 0.90) 100%) !important;
}

/* Ombre robuste sui testi dell'hero */
.hero h1 {
  text-shadow: 0 2px 24px rgba(0,0,0,0.65), 0 1px 4px rgba(0,0,0,0.55);
}
.hero .lead {
  text-shadow: 0 1px 14px rgba(0,0,0,0.75), 0 1px 3px rgba(0,0,0,0.6);
  color: #fff !important;
}
.hero .eyebrow {
  text-shadow: 0 1px 10px rgba(0,0,0,0.7);
}
.hero .scroll-cenno { text-shadow: 0 1px 8px rgba(0,0,0,0.7); }

/* — TESTI su fondo CHIARO: il lead era sottile (300) e grigio: ora pieno — */
.lead {
  font-weight: 400;
  color: #3a3128;   /* quasi inchiostro, alto contrasto su avorio */
}
p { color: #2a2219; }            /* corpo testo più profondo */
.card-finestra .dettagli { color: #5a4d3d; }
.numeri .voce { color: #5a4d3d; }
.riti p, .curiosita p { color: #2a2219; }
.eyebrow { color: var(--terra-scura); font-weight: 500; }

/* — TESTI su fondo SCURO: portati a contrasto pieno — */
.dark .lead { color: rgba(248, 243, 235, 0.94) !important; }
.dark p { color: rgba(244, 237, 225, 0.9); }
.dark .card-finestra .dettagli { color: rgba(244, 237, 225, 0.82); }
.dark .numeri .voce { color: rgba(244, 237, 225, 0.8); }
.dark .riti p { color: rgba(244, 237, 225, 0.9); }
.dark .eyebrow { color: var(--oro-chiaro); }
.footer { color: rgba(244, 237, 225, 0.82); }
.footer li { color: rgba(244, 237, 225, 0.82); }

/* Citazioni: leggibilità piena */
.citazione blockquote { color: var(--inchiostro); }
.dark .citazione blockquote { color: var(--avorio); }

/* ==========================================================================
   HERO CROSSFADE guidato dallo scroll (SOLO home) — 20/07/2026
   La folla del Palio sfuma nella veduta privata dalla finestra: mentre si
   scorre, la seconda immagine diventa opaca; l'hero resta "pinnato" (sticky)
   finché la transizione non è completa, poi la pagina scorre.
   ========================================================================== */
.hero--crossfade {
  min-height: 0;
  height: 360svh;         /* 100svh visibili + 260svh di transizione pinnata: crossfade lento,
                             con "sosta" su ogni fotogramma per un effetto di scoperta. */
  display: block;
  align-items: initial;
  padding: 0;
  overflow: visible;      /* IMPRESCINDIBILE: .hero ha overflow:hidden, che romperebbe
                             lo sticky del pin facendolo scorrere via e lasciando
                             scoperta la metà inferiore vuota della sezione. */
  background: var(--nero);/* fondo scuro sotto il pin: mai un vuoto nero puro */
}
.hero--crossfade .hero__pin {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  display: flex;
  align-items: center;
}
.hero--crossfade .hero__media {
  position: absolute; inset: 0; z-index: 0;
  animation: none;
}
.hero--crossfade .hero__media img { animation: none; }
.hero--crossfade .hero__media::after { display: none; }
.hero--crossfade .hero__media--veduta {
  opacity: 0;
  z-index: 1;
  will-change: opacity;
}
/* Terzo fotogramma: la veduta reale dalla finestra (sedie + Palazzo Pubblico).
   Foto verticale: su desktop la si ritaglia per tenere in quadro il palazzo. */
.hero--crossfade .hero__media--finestra {
  opacity: 0;
  z-index: 2;
  will-change: opacity;
}
.hero--crossfade .hero__media--finestra img { object-position: 50% 40%; }
/* Velo di leggibilità sopra le tre immagini, sotto il testo */
.hero--crossfade .hero__velo {
  position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background:
    radial-gradient(120% 110% at 22% 48%, rgba(18,14,10,0.42), transparent 62%),
    linear-gradient(180deg,
      rgba(18,14,10,0.66) 0%, rgba(18,14,10,0.32) 38%,
      rgba(18,14,10,0.46) 68%, rgba(18,14,10,0.76) 100%);
}
.hero--crossfade .container { position: relative; z-index: 4; width: 100%; }
.hero--crossfade .scroll-cenno { z-index: 4; }

/* Tre didascalie hero, una per fotogramma. Sovrapposte a tutto schermo e pilotate
   nell'opacità dal JS, in sincrono con le immagini. La --uno è visibile di default
   (fallback senza JS / prefers-reduced-motion). */
.hero--crossfade .hero__testo {
  position: absolute; inset: 0; z-index: 4;
  display: flex; align-items: center;
  opacity: 0; pointer-events: none;
  will-change: opacity;
}
.hero--crossfade .hero__testo--uno { opacity: 1; }
.hero--crossfade .hero__testo h2 {
  max-width: 15ch; text-wrap: balance;
  font-size: clamp(2.6rem, 7vw, 5.5rem);
  line-height: 1.02;
  text-shadow: 0 2px 24px rgba(0,0,0,0.65), 0 1px 4px rgba(0,0,0,0.55);
}
.hero--crossfade .hero__testo .lead { margin-top: 1.6rem; }

@media (prefers-reduced-motion: reduce) {
  .hero--crossfade { height: auto; min-height: 100svh; }
  .hero--crossfade .hero__pin { position: relative; height: 100svh; min-height: 100svh; }
  .hero--crossfade .hero__media--veduta,
  .hero--crossfade .hero__media--finestra { opacity: 0; }
}
