/* ============================================================
   b&b La Villa — style.css
   Design system "Villa di Romagna" + layout mobile-first.
   Anima solo transform/opacity; font self-hosted (GDPR).
   ============================================================ */

/* ---------- FONT (self-hosted, variable) ---------- */
/* latin-ext prima (con unicode-range), poi latin senza range = default */
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url('../assets/fonts/fraunces-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: 'Fraunces';
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url('../assets/fonts/fraunces-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../assets/fonts/manrope-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: 'Manrope';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../assets/fonts/manrope-latin.woff2') format('woff2');
}

/* ---------- TOKENS ---------- */
:root {
  /* palette "Villa di Romagna" */
  --ink: #211C16;
  --bone: #EFE9DE;
  --sand: #E4DAC8;
  --bosco: #2E382F;
  --salvia: #7E8B76;
  --ottone: #A87D3D;
  --ottone-scuro: #8C6631;
  --ottone-chiaro: #C8994F;   /* hover CTA: più chiaro, AA con testo ink */
  --brass-light: #856330;     /* brass per TESTO su fondi chiari (AA ≥4.5) */
  --brass-dark: #BA9866;      /* brass per TESTO su fondi scuri (AA ≥4.5) */
  --velo: rgba(33, 28, 22, 0.40);

  /* superfici derivate */
  --bone-2: #F4F0E9;
  --line: rgba(33, 28, 22, 0.14);
  --line-light: rgba(239, 233, 222, 0.22);

  /* tipografia */
  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  /* spaziatura (base 8px) */
  --sp-1: .5rem;  --sp-2: 1rem;   --sp-3: 1.5rem;  --sp-4: 2rem;
  --sp-5: 3rem;   --sp-6: 4rem;   --sp-7: 6rem;

  --section-y: clamp(5rem, 12vh, 9rem);
  --container: 1200px;
  --gutter: clamp(1.25rem, 5vw, 3rem);
  --radius: 4px;
  --radius-lg: 10px;

  --header-h: 76px;

  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ---------- RESET ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  font-family: var(--sans);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.09rem);
  line-height: 1.65;
  color: var(--ink);
  background: var(--bone);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, picture, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p { margin: 0; }
button { font: inherit; color: inherit; cursor: pointer; }

/* ---------- UTILITY ---------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.container.narrow { max-width: 760px; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; top: -100px; left: 1rem; z-index: 200;
  background: var(--ink); color: var(--bone); padding: .7rem 1.1rem; border-radius: var(--radius);
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 1rem; }

:focus-visible { outline: 2px solid var(--ottone); outline-offset: 3px; border-radius: 2px; }

/* ---------- TYPOGRAPHY ---------- */
.eyebrow {
  font-family: var(--sans);
  font-size: .78rem; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--brass-light); /* default su fondi chiari (AA); override su fondi scuri */
  display: flex; align-items: center; gap: .6rem;
}
.eyebrow .scene-num {
  font-family: var(--serif); font-size: 1rem; font-weight: 500;
  letter-spacing: 0; color: inherit; opacity: .9;
}
.section-title {
  font-family: var(--serif);
  font-optical-sizing: auto;
  font-weight: 400;
  font-size: clamp(1.9rem, 1.2rem + 3.4vw, 3rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
}
.lead { font-size: clamp(1.1rem, 1rem + .6vw, 1.35rem); line-height: 1.55; }

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .5rem; min-height: 44px; padding: .7rem 1.35rem;
  font-family: var(--sans); font-weight: 600; font-size: .95rem;
  letter-spacing: .01em; border: 1.5px solid transparent; border-radius: 999px;
  transition: background-color .25s var(--ease), color .25s var(--ease),
              border-color .25s var(--ease), transform .25s var(--ease);
}
/* testo ink su brass (AA 4.56); hover più chiaro (AA 6.54) per non perdere contrasto */
.btn-cta { background: var(--ottone); color: var(--ink); border-color: var(--ottone); }
.btn-cta:hover { background: var(--ottone-chiaro); border-color: var(--ottone-chiaro); transform: translateY(-1px); }
.btn-lg { min-height: 54px; padding: .95rem 2.1rem; font-size: 1.02rem; }

.link-arrow {
  display: inline-flex; align-items: center; gap: .45rem;
  font-weight: 600; font-size: .95rem; color: var(--brass-light);
  padding: .3rem 0; border-bottom: 1px solid transparent;
  transition: border-color .25s var(--ease);
}
.link-arrow span { transition: transform .25s var(--ease); }
.link-arrow:hover { border-color: currentColor; }
.link-arrow:hover span { transform: translateX(4px); }

/* ---------- HEADER ---------- */
/* Solido di DEFAULT (leggibile ovunque, anche senza JS).
   Il JS aggiunge .is-transparent in cima alla hero. */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  background: color-mix(in srgb, var(--bone-2) 88%, transparent);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  transition: background-color .3s var(--ease), border-color .3s var(--ease), color .3s var(--ease);
}
.header-inner {
  max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter);
  height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.brand { display: inline-flex; align-items: center; gap: .6rem; }
.brand-mark {
  width: 34px; height: 34px; display: grid; place-items: center;
  background: var(--bosco); color: var(--ottone);
  font-family: var(--serif); font-weight: 600; font-size: .92rem;
  border-radius: 7px; letter-spacing: .02em;
}
.brand-name { font-family: var(--serif); font-size: 1.18rem; font-weight: 500; }
.brand-name em { font-style: italic; }

.header-actions { display: flex; align-items: center; gap: .35rem; }
.icon { width: 20px; height: 20px; fill: currentColor; }
.quick-contact {
  width: 42px; height: 42px; display: grid; place-items: center; border-radius: 999px;
  color: var(--ink); transition: background-color .2s var(--ease);
}
.quick-contact:hover { background: color-mix(in srgb, var(--ink) 8%, transparent); }
.header-cta { margin-left: .35rem; }

.menu-toggle {
  width: 46px; height: 46px; display: grid; place-items: center;
  background: transparent; border: 0; margin-left: .1rem;
}
.menu-toggle-bars { position: relative; width: 24px; height: 12px; }
.menu-toggle-bars span {
  position: absolute; left: 0; width: 100%; height: 1.5px; background: currentColor;
  transition: transform .3s var(--ease), opacity .2s var(--ease);
}
.menu-toggle-bars span:first-child { top: 0; }
.menu-toggle-bars span:last-child { bottom: 0; }
.menu-toggle[aria-expanded="true"] .menu-toggle-bars span:first-child { transform: translateY(5px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle-bars span:last-child { transform: translateY(-5px) rotate(-45deg); }

/* stato trasparente sopra la hero (aggiunto dal JS) */
.site-header.is-transparent {
  background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none;
  border-color: transparent; color: var(--bone-2);
}
.site-header.is-transparent .brand-name,
.site-header.is-transparent .quick-contact,
.site-header.is-transparent .menu-toggle { color: var(--bone-2); }
/* ombra leggera: invisibile sulle foto scure, garantisce leggibilità su quelle chiare */
.site-header.is-transparent .brand-name { text-shadow: 0 1px 12px rgba(0, 0, 0, .45); }
.site-header.is-transparent .quick-contact .icon,
.site-header.is-transparent .menu-toggle-bars span,
.site-header.is-transparent .header-cta { filter: drop-shadow(0 1px 8px rgba(0, 0, 0, .4)); }
.site-header.is-transparent .quick-contact:hover { background: color-mix(in srgb, var(--bone) 16%, transparent); }
.site-header.is-transparent .header-cta {
  background: transparent; color: var(--bone-2); border-color: color-mix(in srgb, var(--bone) 55%, transparent);
}
.site-header.is-transparent .header-cta:hover { background: var(--bone-2); color: var(--ink); border-color: var(--bone-2); }

/* ---------- MENU OVERLAY ---------- */
.menu-overlay {
  position: fixed; inset: 0; z-index: 99;
  background: color-mix(in srgb, var(--bosco) 96%, black);
  color: var(--bone); display: grid; place-items: center;
  opacity: 0; visibility: hidden; transition: opacity .35s var(--ease), visibility .35s var(--ease);
}
.menu-overlay.is-open { opacity: 1; visibility: visible; }
.menu-overlay[hidden] { display: grid; } /* gestito via .is-open, non da hidden */
.menu-panel { text-align: center; padding: 2rem; }
.menu-list li { overflow: hidden; }
.menu-list a {
  display: inline-block; font-family: var(--serif); font-weight: 400;
  font-size: clamp(2rem, 1.2rem + 5vw, 3.6rem); line-height: 1.5; letter-spacing: -0.01em;
  transform: translateY(110%); transition: transform .5s var(--ease), color .2s var(--ease);
}
.menu-overlay.is-open .menu-list a { transform: translateY(0); }
.menu-list li:nth-child(1) a { transition-delay: .05s; }
.menu-list li:nth-child(2) a { transition-delay: .10s; }
.menu-list li:nth-child(3) a { transition-delay: .15s; }
.menu-list li:nth-child(4) a { transition-delay: .20s; }
.menu-list li:nth-child(5) a { transition-delay: .25s; }
.menu-list a:hover { color: var(--ottone); }
.menu-meta {
  margin-top: 2.5rem; display: flex; flex-direction: column; gap: .3rem;
  font-family: var(--sans); font-size: 1rem; color: #939E8C; /* salvia schiarito (AA su overlay) */
}
.menu-meta a:hover { color: var(--bone); }

/* ---------- HERO (fallback impilato, senza JS) ---------- */
.hero { position: relative; }
.hero-sticky { position: relative; }
.hero-scenes { display: flex; flex-direction: column; }
.scene {
  position: relative; min-height: 100svh; display: flex;
  overflow: hidden; isolation: isolate;
}
.scene-media { position: absolute; inset: 0; z-index: -2; }
.scene-media img {
  width: 100%; height: 100%; object-fit: cover;
  filter: saturate(1.05) contrast(1.03);
}
/* overlay gradiente per leggibilità del testo (lato basso su mobile) */
.scene::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to top, rgba(18,13,9,.82), rgba(18,13,9,.36) 45%, transparent 72%);
}
.scene-body {
  margin-top: auto; width: 100%; max-width: 620px;
  padding: 0 var(--gutter) clamp(4rem, 12vh, 7rem);
  color: var(--bone-2);
}
.scene-title {
  font-family: var(--serif); font-optical-sizing: auto; font-weight: 400;
  font-size: clamp(2.5rem, 1.5rem + 6vw, 5rem); line-height: 1.03; letter-spacing: -0.015em;
  margin: .4rem 0 .8rem;
  text-shadow: 0 2px 20px rgba(0,0,0,.5);
}
.scene-text { font-size: clamp(1.05rem, 1rem + .6vw, 1.3rem); max-width: 34ch; color: color-mix(in srgb, var(--bone) 96%, white); text-shadow: 0 1px 14px rgba(0,0,0,.55); }
.scene .eyebrow { color: var(--brass-dark); text-shadow: 0 1px 10px rgba(0,0,0,.5); }

.hero-progress { display: none; }

/* ---------- HERO (modalità scrollytelling, con JS) ----------
   Altezza = distanza di scroll dell'animazione. Lo scroll "utile" è
   (height - 100vh): a 220vh sono 120vh, cioè -40% rispetto ai 200vh
   dei precedenti 300vh → scrollytelling ~40% più veloce. */
.js-scrollytelling .hero { height: 220vh; }
.js-scrollytelling .hero-sticky {
  position: sticky; top: 0; height: 100svh; height: 100dvh; overflow: hidden;
}
/* velo scuro sottile in cima: tiene leggibile l'header trasparente su ogni foto */
.js-scrollytelling .hero-sticky::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 190px; z-index: 2;
  background: linear-gradient(to bottom, rgba(20, 16, 12, .42), transparent);
  pointer-events: none;
}
.js-scrollytelling .hero-scenes { display: block; height: 100%; }
.js-scrollytelling .scene {
  position: absolute; inset: 0; min-height: 0; height: 100%;
  opacity: 0; will-change: opacity;
}
.js-scrollytelling .scene.is-active { opacity: 1; }
.js-scrollytelling .scene-media { will-change: transform; }
.js-scrollytelling .scene-body { will-change: transform, opacity; }

/* desktop: testo a destra, overlay più scuro a destra */
@media (min-width: 768px) {
  .scene { align-items: center; }
  .scene-body {
    margin-top: 0; margin-left: auto;
    max-width: 46%; padding: 0 clamp(3rem, 6vw, 6rem) 0 0;
  }
  .scene::after {
    background: linear-gradient(to left, rgba(18,13,9,.80), rgba(18,13,9,.34) 42%, transparent 66%),
                linear-gradient(to top, rgba(18,13,9,.30), transparent 34%);
  }
  .hero-progress {
    position: absolute; z-index: 3; right: clamp(1.5rem, 3vw, 2.5rem); top: 50%;
    transform: translateY(-50%); display: flex; flex-direction: column; gap: 12px;
  }
  .hero-progress span {
    width: 2px; height: 26px; border-radius: 2px; transform-origin: center;
    background: color-mix(in srgb, var(--bone) 45%, transparent);
    /* scaleY invece di height: solo compositor, niente layout */
    transition: transform .4s var(--ease), background-color .4s var(--ease);
  }
  .hero-progress span.is-active { transform: scaleY(1.77); background: var(--ottone); } /* 26px → ~46px */
}

/* ---------- SECTION BASE ---------- */
.section { padding-block: var(--section-y); }
.section-head { max-width: 640px; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section-head .eyebrow { margin-bottom: .9rem; }
.section-sub { margin-top: 1rem; color: color-mix(in srgb, var(--ink) 74%, transparent); font-size: 1.1rem; }

/* La Villa */
.section-intro { background: var(--bone-2); }
.section-intro .eyebrow { justify-content: flex-start; margin-bottom: 1rem; }
.section-intro .section-title { margin-bottom: 1.4rem; }
.section-intro .lead { margin-bottom: 1.2rem; }
.section-intro p:last-child { color: color-mix(in srgb, var(--ink) 78%, transparent); }

/* ---------- CAMERE ---------- */
.camere-grid { display: grid; gap: clamp(1.5rem, 3vw, 2.4rem); grid-template-columns: 1fr; }
.camera-card {
  background: var(--bone-2); border: 1px solid var(--line);
  border-radius: var(--radius-lg); overflow: hidden; display: flex; flex-direction: column;
}
.camera-media {
  display: block; width: 100%; padding: 0; border: 0; background: none; cursor: pointer;
  position: relative; overflow: hidden; aspect-ratio: 4 / 3;
}
.camera-media picture, .camera-media img { display: block; width: 100%; height: 100%; }
.camera-media img {
  object-fit: cover; filter: saturate(1.05) contrast(1.03);
  transition: transform .5s var(--ease); will-change: transform;
}
.camera-media:hover img, .camera-media:focus-visible img { transform: scale(1.045); }
.camera-badge {
  position: absolute; bottom: .7rem; right: .7rem;
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .3rem .6rem; border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 62%, transparent);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  color: var(--bone-2); font-size: .8rem; font-weight: 600; line-height: 1;
}
.camera-badge svg { width: 15px; height: 15px; fill: currentColor; }
.camera-body { padding: 1.5rem 1.5rem 1.7rem; display: flex; flex-direction: column; gap: .55rem; flex: 1; }
.camera-name { font-family: var(--serif); font-weight: 500; font-size: 1.5rem; line-height: 1.15; }
.camera-type { margin-top: -.35rem; font-family: var(--sans); font-size: .72rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--salvia); }
.camera-meta { font-size: .92rem; color: color-mix(in srgb, var(--ink) 66%, transparent); }
.camera-meta .guests { white-space: nowrap; }
.camera-desc { color: color-mix(in srgb, var(--ink) 80%, transparent); }
.camera-body .link-arrow { margin-top: auto; padding-top: .6rem; }

.cta-block { text-align: center; margin-top: clamp(3rem, 6vw, 4.5rem); }
.cta-block .eyebrow { justify-content: center; margin-bottom: 1rem; }

/* ---------- SERVIZI ---------- */
.section-servizi { background: var(--bosco); color: var(--bone); }
.section-servizi .section-title { color: var(--bone-2); }
.section-servizi .eyebrow { justify-content: flex-start; color: var(--brass-dark); } /* su bosco (AA) */
.servizi-grid { display: grid; gap: clamp(1.6rem, 3vw, 2.6rem); grid-template-columns: 1fr; }
.servizio { padding-top: 1.4rem; border-top: 1px solid var(--line-light); }
.servizio-icon { width: 30px; height: 30px; fill: var(--ottone); margin-bottom: .9rem; }
.servizio h3 { font-family: var(--serif); font-weight: 500; font-size: 1.3rem; margin-bottom: .4rem; }
.servizio p { color: color-mix(in srgb, var(--bone) 78%, transparent); font-size: .98rem; }

/* ---------- DOVE SIAMO ---------- */
.dove-grid { display: grid; gap: clamp(2rem, 5vw, 4rem); grid-template-columns: 1fr; align-items: center; }
.dove-media { border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 16 / 10; }
.dove-media img { width: 100%; height: 100%; object-fit: cover; filter: saturate(1.05) contrast(1.03); }
/* mappa Google incorporata */
.dove-map { position: relative; border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 16 / 10; background: var(--sand); }
.dove-map iframe { width: 100%; height: 100%; border: 0; display: block; }

/* ---------- SELETTORE LINGUA (tendina) ---------- */
.lang-select { position: relative; }
.lang-current {
  display: inline-flex; align-items: center; gap: .35rem;
  background: transparent; color: inherit; cursor: pointer;
  border: 1px solid var(--line); border-radius: 999px;
  padding: .4rem .7rem; min-height: 40px;
  font-family: var(--sans); font-weight: 600; font-size: .82rem; letter-spacing: .02em;
  transition: background-color .2s var(--ease), border-color .2s var(--ease);
}
.lang-current:hover { background: color-mix(in srgb, var(--ink) 7%, transparent); }
.lang-globe { width: 16px; height: 16px; fill: currentColor; }
.lang-chevron { width: 11px; height: 11px; fill: currentColor; opacity: .7; transition: transform .2s var(--ease); }
.lang-select.is-open .lang-chevron { transform: rotate(180deg); }
.lang-menu {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 120;
  min-width: 156px; margin: 0; padding: .35rem; list-style: none;
  background: var(--bone-2); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 14px 34px rgba(33,28,22,.18);
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .2s var(--ease), transform .2s var(--ease), visibility .2s var(--ease);
}
.lang-select.is-open .lang-menu { opacity: 1; visibility: visible; transform: none; }
.lang-menu button {
  display: flex; align-items: center; width: 100%; gap: .5rem;
  background: transparent; border: 0; border-radius: 8px; cursor: pointer;
  padding: .6rem .7rem; font-family: var(--sans); font-size: .95rem; color: var(--ink); text-align: left;
}
.lang-menu button:hover { background: color-mix(in srgb, var(--ink) 7%, transparent); }
.lang-menu button.is-active { color: var(--ottone-scuro); font-weight: 600; }
.lang-menu button.is-active::after { content: "✓"; margin-left: auto; }
/* stato trasparente sopra la hero */
.site-header.is-transparent .lang-current {
  color: var(--bone-2); border-color: color-mix(in srgb, var(--bone) 45%, transparent);
  filter: drop-shadow(0 1px 8px rgba(0,0,0,.4));
}
.site-header.is-transparent .lang-current:hover { background: color-mix(in srgb, var(--bone) 14%, transparent); }
.dove-body .eyebrow { justify-content: flex-start; margin-bottom: 1rem; }
.dove-body .section-title { margin-bottom: 1.2rem; }
.distanze { margin: 1.6rem 0; display: grid; gap: .7rem; }
.distanze li {
  display: flex; gap: .8rem; align-items: baseline;
  padding-bottom: .7rem; border-bottom: 1px solid var(--line);
  color: color-mix(in srgb, var(--ink) 80%, transparent);
}
.distanze strong { color: var(--brass-light); font-variant-numeric: tabular-nums; min-width: 4.2rem; }

/* ---------- FOOTER ---------- */
.site-footer { background: var(--ink); color: var(--bone); padding-top: clamp(3.5rem, 7vw, 5.5rem); }
.footer-grid { display: grid; gap: 2.5rem; grid-template-columns: 1fr; }
.footer-name { font-family: var(--serif); font-size: 1.5rem; }
.footer-name em { font-style: italic; }
.footer-tag { color: var(--salvia); margin: .3rem 0 1.3rem; font-size: .95rem; }
.footer-h { font-family: var(--sans); font-size: .78rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--salvia); margin-bottom: 1rem; }
.site-footer address { font-style: normal; line-height: 1.9; color: color-mix(in srgb, var(--bone) 85%, transparent); }
.site-footer address a:hover { color: var(--ottone); }
.socials { display: flex; gap: .6rem; margin-top: 1.2rem; }
.socials a { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid var(--line-light); border-radius: 999px; transition: background-color .2s var(--ease), border-color .2s var(--ease); }
.socials a:hover { background: var(--ottone); border-color: var(--ottone); color: var(--ink); }
.footer-links { display: grid; gap: .55rem; margin-bottom: 1.3rem; }
.footer-links a { color: color-mix(in srgb, var(--bone) 85%, transparent); }
.footer-links a:hover { color: var(--ottone); }
.footer-note { font-size: .88rem; color: var(--salvia); margin-bottom: .8rem; }
.footer-cin { font-size: .88rem; letter-spacing: .04em; color: color-mix(in srgb, var(--bone) 70%, transparent); }
.footer-bottom { margin-top: clamp(3rem, 6vw, 4.5rem); border-top: 1px solid var(--line-light); padding-block: 1.5rem; }
.footer-bottom p { font-size: .85rem; color: var(--salvia); }

/* ---------- MOBILE CTA BAR ---------- */
.mobile-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
  display: none; gap: .6rem; align-items: stretch;
  padding: .7rem var(--gutter); padding-bottom: calc(.7rem + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--bone-2) 90%, transparent);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  transform: translateY(120%); transition: transform .4s var(--ease);
  will-change: transform;
}
.mobile-cta.is-visible { transform: translateY(0); }
.mobile-cta-phone {
  flex: 0 0 auto; width: 52px; display: grid; place-items: center;
  border: 1.5px solid var(--ottone); border-radius: 999px; color: var(--ottone-scuro);
}
.mobile-cta-book { flex: 1; }

@media (max-width: 767.98px) {
  .mobile-cta { display: flex; }
  /* spazio per non coprire il footer con la barra */
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  .header-cta { display: none; } /* su mobile la prenotazione è nella barra fissa */
  .quick-contact + .quick-contact { display: none; } /* tieni solo WhatsApp nell'header mobile */
  .lang-current { padding: .4rem .55rem; } /* tendina lingua più compatta su mobile */
}

/* ---------- LAYOUT ≥768 ---------- */
@media (min-width: 768px) {
  .camere-grid { grid-template-columns: repeat(3, 1fr); }
  .servizi-grid { grid-template-columns: repeat(2, 1fr); column-gap: 3rem; }
  .dove-grid { grid-template-columns: 1.1fr .9fr; }
}
@media (min-width: 1024px) {
  .servizi-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- ENTRATA AL VIEWPORT (stagger, guidato dal JS) ---------- */
/* stato iniziale solo quando il JS è attivo, per non nascondere senza JS */
.js-scrollytelling [data-stagger] > * { opacity: 0; transform: translateY(24px); }
.js-scrollytelling [data-stagger].is-inview > * { opacity: 1; transform: none; }

/* ---------- LIGHTBOX GALLERIA ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  display: grid; grid-template-rows: 1fr auto;
  background: color-mix(in srgb, var(--ink) 92%, black);
  opacity: 0; visibility: hidden; transition: opacity .3s var(--ease), visibility .3s var(--ease);
  padding: max(1rem, env(safe-area-inset-top)) 1rem max(1rem, env(safe-area-inset-bottom));
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lb-stage {
  position: relative; display: flex; align-items: center; justify-content: center;
  min-height: 0; padding: 3.5rem 0 1rem;
}
.lb-figure { margin: 0; max-width: 100%; max-height: 100%; display: flex; flex-direction: column; align-items: center; gap: .8rem; }
.lb-img {
  max-width: min(1100px, 92vw); max-height: 74vh; width: auto; height: auto;
  object-fit: contain; border-radius: 6px; background: color-mix(in srgb, var(--ink) 60%, black);
}
.lb-img.is-swapping { opacity: 0; }
.lb-img { transition: opacity .2s var(--ease); }
.lb-caption { color: color-mix(in srgb, var(--bone) 80%, transparent); font-size: .95rem; text-align: center; }
.lb-close {
  position: absolute; top: .2rem; right: .2rem; z-index: 3;
  width: 46px; height: 46px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--bone) 12%, transparent); color: var(--bone-2);
  border: 0; border-radius: 999px; font-size: 1.6rem; line-height: 1;
  transition: background-color .2s var(--ease);
}
.lb-close:hover { background: color-mix(in srgb, var(--bone) 24%, transparent); }
.lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  width: 52px; height: 52px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--bone) 12%, transparent); color: var(--bone-2);
  border: 0; border-radius: 999px; font-size: 1.8rem; line-height: 1;
  transition: background-color .2s var(--ease), opacity .2s var(--ease);
}
.lb-nav:hover { background: color-mix(in srgb, var(--bone) 24%, transparent); }
.lb-prev { left: .3rem; }
.lb-next { right: .3rem; }
.lb-nav[hidden] { display: none; }
.lb-footer { display: flex; flex-direction: column; align-items: center; gap: .8rem; padding-top: .6rem; }
.lb-counter { color: color-mix(in srgb, var(--bone) 70%, transparent); font-size: .85rem; letter-spacing: .06em; font-variant-numeric: tabular-nums; }
.lb-thumbs { display: flex; gap: .5rem; flex-wrap: wrap; justify-content: center; max-width: 92vw; }
.lb-thumb {
  width: 56px; height: 42px; padding: 0; border: 2px solid transparent; border-radius: 4px;
  overflow: hidden; cursor: pointer; background: none; opacity: .6;
  transition: opacity .2s var(--ease), border-color .2s var(--ease);
}
.lb-thumb img { width: 100%; height: 100%; object-fit: cover; }
.lb-thumb.is-current { opacity: 1; border-color: var(--ottone); }
.lb-thumb:hover { opacity: 1; }
@media (max-width: 600px) {
  .lb-nav { width: 44px; height: 44px; }
  .lb-img { max-height: 68vh; }
  .lb-thumbs { display: none; }
}

/* ---------- PAGINE LEGALI ---------- */
.legal-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--bone-2) 92%, transparent);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.legal-header .header-inner { justify-content: space-between; }
.legal-back { display: inline-flex; align-items: center; gap: .45rem; font-weight: 600; font-size: .95rem; color: var(--ottone-scuro); }
.legal-back:hover { color: var(--ink); }
.legal { padding-block: clamp(3rem, 8vh, 6rem); }
.legal .container { max-width: 760px; }
.legal .eyebrow { justify-content: flex-start; margin-bottom: 1rem; }
.legal h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(2rem, 1.4rem + 3vw, 3rem); line-height: 1.1; margin-bottom: .6rem; }
.legal .updated { color: color-mix(in srgb, var(--ink) 68%, transparent); font-size: .9rem; margin-bottom: 2.5rem; }
.legal h2 { font-family: var(--serif); font-weight: 500; font-size: 1.4rem; margin: 2.2rem 0 .7rem; }
.legal p, .legal li { color: color-mix(in srgb, var(--ink) 84%, transparent); }
.legal p { margin-bottom: 1rem; }
.legal ul { margin: 0 0 1rem; padding-left: 1.1rem; list-style: disc; display: grid; gap: .5rem; }
.legal a { color: var(--brass-light); text-decoration: underline; text-underline-offset: 2px; }
.legal a:hover { color: var(--ink); }
.legal .note { background: var(--bone-2); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.2rem 1.4rem; margin: 1.5rem 0; }
.legal .note p:last-child { margin-bottom: 0; }

/* ---------- REDUCED MOTION ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  /* scene sempre visibili, nessun crossfade */
  .js-scrollytelling .scene { position: relative; opacity: 1; height: auto; min-height: 100svh; }
  .js-scrollytelling .hero { height: auto; }
  .js-scrollytelling .hero-sticky { position: relative; height: auto; }
  .js-scrollytelling [data-stagger] > * { opacity: 1; transform: none; }
}

/* ==================== FAQ ==================== */
.section-faq .section-head { margin-bottom: 2rem; }
.faq-list { display: flex; flex-direction: column; gap: 0; }
.faq-item { padding: 1.25rem 0; border-top: 1px solid var(--line); }
.faq-item:last-child { border-bottom: 1px solid var(--line); }
.faq-item dt {
  font-family: var(--serif); font-size: 1.15rem; font-weight: 600;
  color: var(--ink); margin-bottom: .5rem;
}
.faq-item dd { margin: 0; color: var(--ink); opacity: .85; line-height: 1.6; }
.faq-item dd a { color: var(--brass-light); text-decoration: underline; }

/* ==================== GALLERIA (carosello) ==================== */
.section-galleria .section-head { margin-bottom: 2rem; }
.carousel { position: relative; }
.carousel-track {
  display: flex; gap: 1rem; margin: 0; padding: 0; list-style: none;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-slide {
  flex: 0 0 100%; scroll-snap-align: center;
  border-radius: var(--radius-lg); overflow: hidden;
  aspect-ratio: 4 / 3; background: var(--sand);
}
.carousel-slide picture { display: block; width: 100%; height: 100%; }
.carousel-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (min-width: 768px) { .carousel-slide { aspect-ratio: 16 / 9; } }
/* Slide in verticale: foto intera (contain) su sfondo sfocato di sé stessa */
.carousel-slide--portrait { position: relative; }
.carousel-slide--portrait::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background: var(--bg) center / cover no-repeat;
  filter: blur(26px) brightness(.82); transform: scale(1.12);
}
.carousel-slide--portrait picture { position: relative; z-index: 1; }
.carousel-slide--portrait img { object-fit: contain; }
.carousel-btn {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 44px; height: 44px; display: grid; place-items: center;
  border: 0; border-radius: 999px; cursor: pointer; color: var(--ink);
  background: color-mix(in srgb, var(--bone) 86%, transparent);
  box-shadow: 0 2px 10px rgba(33, 28, 22, .18);
  transition: background-color .2s var(--ease), transform .2s var(--ease);
}
.carousel-btn:hover { background: var(--bone); transform: translateY(-50%) scale(1.06); }
.carousel-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.carousel-prev { left: .6rem; }
.carousel-next { right: .6rem; }
.carousel-dots { display: flex; justify-content: center; gap: .5rem; margin-top: 1.1rem; }
.carousel-dots button {
  width: 8px; height: 8px; padding: 0; border: 0; border-radius: 999px; cursor: pointer;
  background: color-mix(in srgb, var(--ink) 25%, transparent);
  transition: width .25s var(--ease), background-color .25s var(--ease);
}
.carousel-dots button.is-active { width: 24px; background: var(--ottone); }
@media (max-width: 500px) { .carousel-btn { width: 38px; height: 38px; } .carousel-btn svg { width: 18px; height: 18px; } }
