/* =========================================================
   Template B&B · Michele Bagnod Studio
   ---------------------------------------------------------
   1. PALETTE E CARATTERI  ← per un nuovo cliente si cambia qui
   ========================================================= */
:root {
  /* Colori: toni caldi neutri + un solo accento */
  --c-bg:          #F7F3ED;  /* fondo pagina (lino caldo) */
  --c-paper:       #FCFAF7;  /* schede e campi */
  --c-stone:       #EFE8DE;  /* fondo sezioni alternate */
  --c-sand:        #DDD2C3;  /* linee forti, segnaposto */
  --c-ink:         #2A2420;  /* testo principale */
  --c-ink-soft:    #544A42;  /* testo secondario */
  --c-muted:       #6F6357;  /* etichette, note */
  --c-line:        rgba(42, 36, 32, .14);
  --c-accent:      #A45A2E;  /* accento: terracotta / arancio bruciato */
  --c-accent-dark: #85461F;
  --c-accent-soft: #F3E2D3;
  --c-dark:        #2A2420;  /* footer */

  /* Segnaposto foto */
  --ph-a: #DED6CA;
  --ph-b: #CEC4B5;
  --ph-hero-a: #8A7D6E;
  --ph-hero-b: #5A5046;

  /* Caratteri */
  --f-serif: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --f-sans:  "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Scala tipografica (fluida, min 390px, max 1440px) */
  --t-xs:   0.75rem;                                   /* 12  etichette maiuscole */
  --t-sm:   0.875rem;                                  /* 14  note, legende */
  --t-base: clamp(1rem, 0.96rem + 0.19vw, 1.125rem);   /* 16 → 18  testo */
  --t-lead: clamp(1.125rem, 1.05rem + 0.38vw, 1.375rem);/* 18 → 22  attacchi */
  --t-h4:   clamp(1.375rem, 1.3rem + 0.38vw, 1.625rem);/* 22 → 26 */
  --t-h3:   clamp(1.625rem, 1.48rem + 0.67vw, 2.125rem);/* 26 → 34 */
  --t-h2:   clamp(2.25rem, 1.87rem + 1.9vw, 3.5rem);   /* 36 → 56 */
  --t-h1:   clamp(3rem, 2.07rem + 4.76vw, 6.125rem);   /* 48 → 98 */

  /* Spazi */
  --gutter: clamp(1.25rem, 0.8rem + 2.2vw, 3rem);
  --section: clamp(4.5rem, 3rem + 6vw, 9rem);
  --container: 1320px;
  --radius: 4px;
  --header-h: 72px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* =========================================================
   2. BASE
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 8px);
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-ink);
  font-family: var(--f-sans);
  font-size: var(--t-base);
  line-height: 1.65;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 {
  font-family: var(--f-serif);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: var(--t-h1); line-height: 0.98; }
h2 { font-size: var(--t-h2); }
h3 { font-size: var(--t-h3); }
h4 { font-size: var(--t-h4); }
p { margin: 0 0 1em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }
em.serif { font-family: var(--f-serif); font-style: italic; }
.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;
}
:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 3px; border-radius: 2px; }
.skip-link {
  position: absolute; left: 1rem; top: -100px; z-index: 200;
  background: var(--c-ink); color: #fff; padding: .75rem 1rem; text-decoration: none;
}
.skip-link:focus { top: 1rem; }

.icon { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor;
  stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

.container { width: 100%; max-width: calc(var(--container) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section); }
.section--stone { background: var(--c-stone); }

/* Intestazione di sezione */
.eyebrow {
  display: inline-flex; align-items: center; gap: .75rem;
  font-size: var(--t-xs); font-weight: 500; letter-spacing: .16em; text-transform: uppercase;
  color: var(--c-muted); margin: 0 0 1.25rem;
}
.eyebrow::before { content: ""; width: 2rem; height: 1px; background: currentColor; opacity: .6; }
.section-head { display: grid; gap: 1.25rem; margin-bottom: clamp(2.5rem, 2rem + 2vw, 4rem); }
.section-head p { color: var(--c-ink-soft); max-width: 56ch; font-size: var(--t-base); }
@media (min-width: 900px) {
  .section-head--split { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: end; column-gap: 4rem; }
  .section-head--split p { justify-self: end; }
}
.section-head h2 { max-width: 16ch; }

/* Etichetta "Esempio" */
.tag {
  display: inline-flex; align-items: center; gap: .4rem;
  font-family: var(--f-sans); font-size: 0.6875rem; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; line-height: 1;
  padding: .45rem .6rem .4rem; border-radius: 99px;
  background: var(--c-accent-soft); color: var(--c-accent-dark);
  vertical-align: middle; white-space: nowrap;
}
.tag::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }

/* Pulsanti */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  min-height: 48px; padding: .8rem 1.5rem;
  border: 1px solid transparent; border-radius: 99px;
  font-size: 0.9375rem; font-weight: 500; letter-spacing: .01em; line-height: 1.2;
  text-decoration: none; cursor: pointer;
  transition: background-color .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease), transform .25s var(--ease);
}
.btn .icon { width: 1.15rem; height: 1.15rem; }
.btn--primary { background: var(--c-accent); color: #fff; }
.btn--primary:hover { background: var(--c-accent-dark); }
.btn--ghost { border-color: var(--c-ink); color: var(--c-ink); background: transparent; }
.btn--ghost:hover { background: var(--c-ink); color: var(--c-bg); }
.btn--light { background: var(--c-bg); color: var(--c-ink); }
.btn--light:hover { background: #fff; }
.btn--outline-light { border-color: rgba(255,255,255,.7); color: #fff; }
.btn--outline-light:hover { background: rgba(255,255,255,.12); border-color: #fff; }
.btn--sm { min-height: 44px; padding: .6rem 1.15rem; font-size: 0.875rem; }
.btn--block { width: 100%; }

/* =========================================================
   3. SEGNAPOSTO FOTO
   Ogni foto è <figure class="ph" data-label="..."><img data-src="img/..."></figure>.
   Finché la foto non c'è, si vede il segnaposto con l'etichetta.
   ========================================================= */
.ph {
  position: relative; margin: 0; overflow: hidden;
  background-color: var(--ph-b);
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 .07 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"),
    radial-gradient(120% 90% at 20% 10%, rgba(255,255,255,.35), transparent 60%),
    linear-gradient(150deg, var(--ph-a), var(--ph-b));
  aspect-ratio: var(--ratio, 4 / 3);
}
.ph::after {
  content: attr(data-label);
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  max-width: calc(100% - 2rem); width: max-content;
  padding: .5rem .85rem; border-radius: 99px;
  background: rgba(251, 249, 245, .6);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  font-size: 0.6875rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase;
  color: rgba(42, 36, 32, .7); text-align: center; line-height: 1.35;
  pointer-events: none; z-index: 0;
}
/* La foto sta sopra l'etichetta: se il file c'è, copre il segnaposto. */
.ph img {
  position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%;
  object-fit: cover; object-position: var(--pos, 50% 50%);
}
.ph img.is-missing { display: none; }

/* =========================================================
   4. INTESTAZIONE
   ========================================================= */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 50; height: var(--header-h);
  color: #fff;
  transition: background-color .35s var(--ease), color .35s var(--ease), box-shadow .35s var(--ease);
}
.site-header.is-solid, .site-header.menu-open {
  background: rgba(245, 241, 234, .94);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  color: var(--c-ink); box-shadow: 0 1px 0 var(--c-line);
}
.site-header .container { height: 100%; display: flex; align-items: center; gap: 2rem; }
.brand {
  font-family: var(--f-serif); font-size: 1.5rem; font-weight: 500; letter-spacing: -0.005em;
  text-decoration: none; line-height: 1; white-space: nowrap; margin-right: auto; padding-block: .75rem;
}
.nav { display: none; }
.nav ul { list-style: none; display: flex; gap: clamp(1.25rem, 0.5rem + 1.2vw, 2.25rem); margin: 0; padding: 0; }
.nav a {
  font-size: 0.875rem; font-weight: 500; text-decoration: none; letter-spacing: .01em;
  display: inline-block; padding-block: .85rem; position: relative; opacity: .88;
}
.nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: .55rem; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease); }
.nav a:hover { opacity: 1; }
.nav a:hover::after { transform: scaleX(1); }
.header-cta { display: flex; align-items: center; gap: .5rem; }
.site-header .btn--header { border-color: currentColor; color: inherit; background: transparent; }
.site-header .btn--header:hover { background: var(--c-ink); color: var(--c-bg); border-color: var(--c-ink); }
.site-header:not(.is-solid):not(.menu-open) .btn--header:hover { background: #fff; color: var(--c-ink); border-color: #fff; }
.menu-toggle {
  width: 48px; height: 48px; display: inline-grid; place-items: center;
  border: 0; background: transparent; color: inherit; cursor: pointer; margin-right: -10px;
}
.menu-toggle .icon { width: 26px; height: 26px; stroke-width: 1.75; }
.menu-toggle .i-close { display: none; }
.menu-open .menu-toggle .i-menu { display: none; }
.menu-open .menu-toggle .i-close { display: block; }

.mobile-menu {
  position: fixed; inset: var(--header-h) 0 0; z-index: 49;
  background: var(--c-bg); overflow-y: auto;
  padding: 1.5rem var(--gutter) 3rem;
}
.mobile-menu[hidden] { display: none; }
.mobile-menu ul { list-style: none; margin: 0 0 2rem; padding: 0; }
.mobile-menu li { border-bottom: 1px solid var(--c-line); }
.mobile-menu li a {
  display: flex; align-items: center; justify-content: space-between; min-height: 60px;
  font-family: var(--f-serif); font-size: 1.75rem; text-decoration: none;
}
.mobile-menu li .icon { width: 22px; height: 22px; color: var(--c-accent); }
.mobile-menu .btn { width: 100%; margin-bottom: .75rem; }

@media (min-width: 1100px) {
  .nav { display: block; }
  .menu-toggle, .mobile-menu { display: none !important; }
}
@media (max-width: 479px) {
  .header-cta .btn--header { display: none; }
  .brand { font-size: 1.375rem; }
}

/* =========================================================
   5. HERO
   ========================================================= */
.hero { position: relative; min-height: max(620px, 100svh); display: flex; align-items: flex-end; color: #fff; isolation: isolate; }
.hero .ph {
  position: absolute; inset: 0; aspect-ratio: auto; z-index: -2;
  --ph-a: var(--ph-hero-a); --ph-b: var(--ph-hero-b);
}
.hero .ph::after { top: 40%; background: rgba(255,255,255,.14); color: rgba(255,255,255,.85); }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(30,22,16,.5) 0%, rgba(30,22,16,0) 20%, rgba(30,22,16,0) 38%, rgba(30,22,16,.72) 100%),
    linear-gradient(90deg, rgba(30,22,16,.35) 0%, rgba(30,22,16,0) 60%);
}
.hero__content { padding-block: calc(var(--header-h) + 3rem) clamp(3rem, 2rem + 4vw, 6rem); }
.hero .eyebrow { color: rgba(255,255,255,.85); }
.hero h1 { max-width: 12ch; margin-bottom: 1.5rem; }
.hero__line { font-size: var(--t-lead); max-width: 36ch; color: rgba(255,255,255,.9); margin-bottom: 2.25rem; line-height: 1.5; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .75rem; }
@media (max-width: 479px) { .hero__actions .btn { width: 100%; } }
.hero__scroll {
  position: absolute; right: var(--gutter); bottom: clamp(3rem, 2rem + 4vw, 6rem);
  writing-mode: vertical-rl; font-size: var(--t-xs); letter-spacing: .2em; text-transform: uppercase;
  color: rgba(255,255,255,.75); text-decoration: none; display: none; align-items: center; gap: .75rem;
}
.hero__scroll::after { content: ""; width: 1px; height: 3.5rem; background: currentColor; }
@media (min-width: 900px) { .hero__scroll { display: inline-flex; } }

/* =========================================================
   6. BENVENUTI
   ========================================================= */
.intro { display: grid; gap: 3rem; align-items: center; }
.intro .ph { --ratio: 4 / 5; }
.intro__text h2 { margin-bottom: 1.75rem; max-width: 14ch; }
.intro__text .lead { line-height: 1.3; color: var(--c-ink); max-width: 34ch; font-family: var(--f-serif); font-style: italic; font-size: clamp(1.375rem, 1.2rem + 0.75vw, 1.875rem); }
.intro__text p { color: var(--c-ink-soft); max-width: 58ch; }
.facts { list-style: none; padding: 0; margin: 2.5rem 0 0; display: grid; gap: 0; border-top: 1px solid var(--c-line); }
.facts li { display: flex; align-items: center; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--c-line); font-weight: 500; }
.facts .icon { width: 24px; height: 24px; color: var(--c-accent); }
.facts-note { margin-top: 1rem; }
@media (min-width: 600px) and (max-width: 759px), (min-width: 1000px) {
  .facts { grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--c-line); }
  .facts li { flex-direction: column; align-items: flex-start; gap: .75rem; padding: 1.25rem 1.25rem 1.25rem 0; border-bottom: 0; font-size: 0.9375rem; }
  .facts li + li { padding-left: 1.25rem; border-left: 1px solid var(--c-line); }
}
@media (min-width: 760px) {
  .intro { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(3rem, 1rem + 5vw, 7rem); }
}

/* =========================================================
   7. CAMERE
   ========================================================= */
.rooms { display: grid; gap: clamp(2.5rem, 2rem + 2vw, 3.5rem) 2rem; }
.room { display: grid; gap: 1.5rem; align-content: start; }
.room__body { display: grid; gap: 1.25rem; align-content: start; }
.room__title { display: grid; gap: .35rem; }
.room__price { order: -1; font-size: var(--t-xs); letter-spacing: .14em; text-transform: uppercase; color: var(--c-accent); font-weight: 500; }
.room__desc { color: var(--c-ink-soft); margin: 0; }
.specs { list-style: none; padding: 0; display: grid; grid-template-columns: 1fr 1fr; margin: 0; border-top: 1px solid var(--c-line); }
.specs li { padding: .85rem 0; border-bottom: 1px solid var(--c-line); display: flex; gap: .7rem; align-items: flex-start; min-width: 0; }
.specs li:nth-child(odd) { padding-right: 1rem; }
.specs li:nth-child(even) { padding-left: 1rem; border-left: 1px solid var(--c-line); }
.specs .icon { width: 20px; height: 20px; color: var(--c-accent); margin-top: .15rem; }
.specs .k { display: block; font-size: var(--t-xs); letter-spacing: .1em; text-transform: uppercase; color: var(--c-muted); line-height: 1.4; }
.specs .v { display: block; margin-top: .1rem; font-size: 0.9375rem; font-weight: 500; line-height: 1.4; }
.amenities { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.amenities li {
  display: inline-flex; align-items: center; gap: .45rem; padding: .4rem .75rem .4rem .6rem;
  border: 1px solid var(--c-line); border-radius: 99px; font-size: 0.8125rem; color: var(--c-ink-soft);
}
.amenities .icon { width: 18px; height: 18px; color: var(--c-accent); }
.room .btn { justify-self: start; }

@media (min-width: 700px) and (max-width: 1099px) {
  .room { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2rem; align-items: start; }
  .room + .room { padding-top: clamp(2.5rem, 2rem + 2vw, 3.5rem); border-top: 1px solid var(--c-line); }
  .rooms { gap: clamp(2.5rem, 2rem + 2vw, 3.5rem); }
}
@media (min-width: 1100px) {
  .rooms { grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: clamp(1.5rem, 0.5rem + 1.5vw, 2.5rem); }
  /* subgrid: titoli, testi e caratteristiche restano allineati fra le tre camere */
  .room { grid-row: span 6; grid-template-rows: subgrid; row-gap: 1.25rem; }
  .room__body { display: contents; }
  .room .carousel { margin-bottom: .25rem; }
  .room .specs, .room .amenities { align-self: start; }
}

/* Carosello */
.carousel { position: relative; }
.carousel__track {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  overscroll-behavior-x: contain; border-radius: var(--radius);
}
.carousel__track::-webkit-scrollbar { display: none; }
.carousel__slide { flex: 0 0 100%; scroll-snap-align: start; }
.carousel__slide .ph { --ratio: 4 / 3; }
.carousel__btn {
  position: absolute; z-index: 2; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer;
  display: none; place-items: center;
  background: rgba(251, 249, 245, .92); color: var(--c-ink);
  box-shadow: 0 2px 10px rgba(0,0,0,.08);
  transition: opacity .25s var(--ease), background-color .25s;
}
.carousel__btn:hover { background: #fff; }
.carousel__btn[disabled] { opacity: 0; pointer-events: none; }
.carousel__btn--prev { left: .75rem; }
.carousel__btn--next { right: .75rem; }
.carousel__btn .icon { width: 20px; height: 20px; }
@media (hover: hover) and (pointer: fine) { .carousel__btn { display: grid; } }
.carousel__dots { position: absolute; z-index: 2; left: 0; right: 0; bottom: .5rem; display: flex; justify-content: center; gap: .1rem; }
.carousel__dot { width: 24px; height: 24px; border: 0; padding: 0; background: transparent; cursor: pointer; display: grid; place-items: center; }
.carousel__dot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.6); box-shadow: 0 0 0 1px rgba(0,0,0,.08); transition: background-color .25s, transform .25s; }
.carousel__dot[aria-current="true"]::before { background: #fff; transform: scale(1.25); }
.carousel__count {
  position: absolute; z-index: 2; top: .75rem; right: .75rem; font-size: var(--t-xs); letter-spacing: .08em;
  background: rgba(38,35,31,.55); color: #fff; padding: .3rem .55rem; border-radius: 99px; font-variant-numeric: tabular-nums;
}

/* =========================================================
   8. SERVIZI
   ========================================================= */
.services { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; border-top: 1px solid var(--c-line); }
.service { padding: 1.75rem 0; border-bottom: 1px solid var(--c-line); display: grid; grid-template-columns: auto 1fr; gap: .35rem 1.25rem; align-items: start; }
.service .icon { grid-row: span 2; width: 32px; height: 32px; color: var(--c-accent); stroke-width: 1.25; }
.service h3 { font-size: var(--t-h4); }
.service p { color: var(--c-ink-soft); font-size: 0.9375rem; margin: 0; }
@media (min-width: 600px) {
  .services { grid-template-columns: repeat(2, 1fr); }
  .service:nth-child(odd) { padding-right: 2rem; }
  .service:nth-child(even) { padding-left: 2rem; border-left: 1px solid var(--c-line); }
}
@media (min-width: 1000px) {
  .services { grid-template-columns: repeat(3, 1fr); }
  .service { grid-template-columns: 1fr; padding: 2.5rem 2.5rem 2.5rem 0; gap: 1.25rem; }
  .service .icon { grid-row: auto; }
  .service:nth-child(n) { padding-left: 2.5rem; border-left: 1px solid var(--c-line); padding-right: 2.5rem; }
  .service:nth-child(3n+1) { padding-left: 0; border-left: 0; }
}

/* =========================================================
   9. GALLERIA
   ========================================================= */
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); grid-auto-rows: clamp(140px, 30vw, 240px); gap: .5rem; grid-auto-flow: dense; }
.gallery__item { padding: 0; border: 0; cursor: zoom-in; display: block; border-radius: var(--radius); overflow: hidden; background: none; }
.gallery__item .ph { display: block; aspect-ratio: auto; width: 100%; height: 100%; transition: transform .8s var(--ease); }
.gallery__item:hover .ph { transform: scale(1.025); }
.gallery__item .ph::after { font-size: 0.625rem; }
.g-wide, .g-big { grid-column: span 2; }
.g-tall { grid-row: span 2; }
@media (min-width: 900px) {
  .gallery { grid-template-columns: repeat(4, 1fr); grid-auto-rows: clamp(180px, 15vw, 300px); gap: .75rem; }
  .g-big { grid-column: span 2; grid-row: span 2; }
}

/* Fascia fotografica fra le sezioni */
.band { position: relative; margin: 0; }
.band .ph { --ratio: 4 / 3; }
.band figcaption {
  position: absolute; left: var(--gutter); bottom: clamp(1.5rem, 1rem + 2vw, 3rem); z-index: 2; max-width: 22ch;
  font-family: var(--f-serif); font-style: italic; font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.5rem); line-height: 1.2; color: #fff;
  text-shadow: 0 1px 24px rgba(30,22,16,.35);
}
.band::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(180deg, rgba(30,22,16,0) 45%, rgba(30,22,16,.5) 100%); }
@media (min-width: 700px) { .band .ph { --ratio: 16 / 9; } }
@media (min-width: 1100px) { .band .ph { --ratio: 21 / 8; } }

/* Lightbox */
.lightbox {
  width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: rgba(24, 22, 19, .96); color: #fff;
}
.lightbox::backdrop { background: rgba(24, 22, 19, .9); }
.lightbox[open] { display: grid; grid-template-rows: auto 1fr auto; }
.lightbox__top { display: flex; justify-content: space-between; align-items: center; padding: 1rem var(--gutter); font-size: var(--t-sm); color: rgba(255,255,255,.75); font-variant-numeric: tabular-nums; }
.lightbox__stage { display: grid; place-items: center; padding: 0 var(--gutter); min-height: 0; }
.lightbox__stage img { max-width: 100%; max-height: calc(100dvh - 200px); width: auto; height: auto; object-fit: contain; border-radius: var(--radius); }
.lightbox__stage .ph { width: min(100%, calc((100dvh - 200px) * 1.5)); --ratio: 3 / 2; border-radius: var(--radius); }
.lightbox__bar { display: flex; justify-content: center; gap: 1rem; padding: 1rem var(--gutter) 1.5rem; }
.icon-btn {
  width: 48px; height: 48px; display: inline-grid; place-items: center; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.3); background: transparent; color: #fff; cursor: pointer;
  transition: background-color .25s, border-color .25s;
}
.icon-btn:hover { background: rgba(255,255,255,.1); border-color: #fff; }
.icon-btn .icon { width: 22px; height: 22px; }
.lightbox__caption { text-align: center; padding: 0 var(--gutter); font-size: var(--t-sm); color: rgba(255,255,255,.7); }

/* =========================================================
   10. DISPONIBILITÀ
   ========================================================= */
.cal-wrap { background: var(--c-paper); border: 1px solid var(--c-line); border-radius: calc(var(--radius) * 2); padding: clamp(1.25rem, 0.8rem + 2vw, 2.75rem); }
.cal-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.cal-legend { display: flex; gap: 1.5rem; list-style: none; margin: 0; padding: 0; font-size: var(--t-sm); color: var(--c-ink-soft); }
.cal-legend li { display: inline-flex; align-items: center; gap: .55rem; }
.swatch { width: 16px; height: 16px; border-radius: 3px; border: 1px solid var(--c-line); background: var(--c-paper); }
.swatch--busy { background: repeating-linear-gradient(135deg, var(--c-sand) 0 2px, var(--c-stone) 2px 6px); border-color: transparent; }
.cal-nav { display: flex; gap: .5rem; }
.cal-nav .icon-btn { color: var(--c-ink); border-color: var(--c-line); width: 44px; height: 44px; }
.cal-nav .icon-btn:hover { background: var(--c-stone); border-color: var(--c-ink); }
.cal-nav .icon-btn[disabled] { opacity: .35; pointer-events: none; }
.cal-track { display: flex; gap: 3rem; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.cal-track::-webkit-scrollbar { display: none; }
.cal-month { flex: 0 0 100%; scroll-snap-align: start; }
@media (min-width: 760px) { .cal-month { flex-basis: calc((100% - 3rem) / 2); } }
.cal-month h3 { font-size: var(--t-h4); margin-bottom: 1rem; text-transform: capitalize; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.cal-grid .dow { font-size: var(--t-xs); letter-spacing: .08em; color: var(--c-muted); padding-bottom: .4rem; font-weight: 500; }
.cal-day {
  height: clamp(40px, 2.6vw + 14px, 50px); display: grid; place-items: center; border-radius: 3px;
  font-size: 0.875rem; font-variant-numeric: tabular-nums; font-weight: 500;
  background: var(--c-bg); color: var(--c-ink);
}
.cal-day.is-busy { background: repeating-linear-gradient(135deg, var(--c-sand) 0 2px, var(--c-stone) 2px 6px); color: var(--c-muted); text-decoration: line-through; text-decoration-color: rgba(38,35,31,.35); font-weight: 400; }
.cal-day.is-past { background: transparent; color: rgba(38,35,31,.28); font-weight: 400; text-decoration: none; }
.cal-day.is-today { box-shadow: inset 0 0 0 1.5px var(--c-accent); }
.cal-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; margin-top: 1.75rem; padding-top: 1.5rem; border-top: 1px solid var(--c-line); }
.cal-sync { display: flex; align-items: center; gap: .6rem; font-size: var(--t-sm); color: var(--c-ink-soft); margin: 0; }
.cal-sync .icon { color: var(--c-accent); width: 18px; height: 18px; }

/* =========================================================
   11. DOVE SIAMO
   ========================================================= */
.where { display: grid; gap: clamp(2.5rem, 2rem + 2vw, 4rem); }
.map { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--c-stone); width: 100%; height: clamp(320px, 70vw, 560px); }
.map::before { content: "Mappa"; position: absolute; inset: 0; display: grid; place-items: center; font-size: var(--t-xs); letter-spacing: .16em; text-transform: uppercase; color: var(--c-muted); }
.map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; filter: grayscale(.4) sepia(.15) contrast(.95); }
.map__link {
  position: absolute; left: 1rem; top: 1rem; z-index: 2;
  display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; padding: .55rem 1rem;
  background: var(--c-paper); border-radius: 99px; font-size: 0.875rem; font-weight: 500; text-decoration: none;
  box-shadow: 0 2px 12px rgba(0,0,0,.1);
}
.map__link .icon { width: 18px; height: 18px; color: var(--c-accent); }
.address { font-family: var(--f-serif); font-size: var(--t-h4); line-height: 1.3; margin: 0 0 2rem; font-style: normal; }
.where h3 { font-size: var(--t-xs); font-family: var(--f-sans); font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--c-muted); margin: 0 0 1rem; display: flex; align-items: center; gap: .75rem; }
.how { list-style: none; margin: 0 0 2.5rem; padding: 0; border-top: 1px solid var(--c-line); }
.how li { display: grid; grid-template-columns: 28px 1fr; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--c-line); }
.how .icon { width: 24px; height: 24px; color: var(--c-accent); margin-top: .1rem; }
.how strong { display: block; font-weight: 500; }
.how span { color: var(--c-ink-soft); font-size: 0.9375rem; }
.distances { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; border-top: 1px solid var(--c-line); }
.distances li { display: flex; justify-content: space-between; gap: 1rem; padding: .8rem 0; border-bottom: 1px dashed var(--c-line); font-size: 0.9375rem; }
.distances li span:last-child { color: var(--c-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (min-width: 1000px) {
  .where { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: start; }
  .map { height: 100%; min-height: 560px; }
}

/* =========================================================
   12. COSA FARE IN ZONA
   ========================================================= */
.todo { display: grid; grid-template-columns: 1fr; gap: 2.5rem 1.25rem; list-style: none; margin: 0; padding: 0; }
.todo .ph { --ratio: 4 / 3; margin-bottom: 1.25rem; border-radius: var(--radius); }
.todo h3 { font-size: var(--t-h3); margin-bottom: .5rem; }
.todo p { color: var(--c-ink-soft); font-size: 0.9375rem; max-width: 34ch; }
@media (min-width: 600px) { .todo { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .todo { grid-template-columns: repeat(4, 1fr); } .todo .ph { --ratio: 4 / 5; } .todo li:nth-child(even) { margin-top: 4rem; } }

/* =========================================================
   13. RECENSIONI
   ========================================================= */
.reviews { display: grid; gap: 1.25rem; list-style: none; margin: 0; padding: 0; }
.review { margin: 0; height: 100%; background: var(--c-paper); border: 1px solid var(--c-line); border-radius: calc(var(--radius) * 2); padding: clamp(1.75rem, 1.4rem + 1.2vw, 2.5rem); display: flex; flex-direction: column; gap: 1.5rem; }
.review__top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.stars { display: flex; gap: 2px; color: var(--c-accent); }
.stars .icon { width: 16px; height: 16px; fill: currentColor; stroke: none; }
.review blockquote { margin: 0; font-family: var(--f-serif); font-size: clamp(1.25rem, 1.15rem + 0.45vw, 1.5rem); line-height: 1.4; flex: 1; }
.review figcaption { font-size: var(--t-sm); color: var(--c-muted); }
.review figcaption strong { color: var(--c-ink); font-weight: 500; }
.reviews-note { margin-top: 2rem; color: var(--c-ink-soft); font-size: 0.9375rem; display: flex; align-items: center; gap: .6rem; }
.reviews-note .icon { width: 18px; height: 18px; color: var(--c-accent); }
@media (min-width: 900px) { .reviews { grid-template-columns: repeat(3, 1fr); } }

/* =========================================================
   14. DOMANDE FREQUENTI
   ========================================================= */
.faq-layout { display: grid; gap: 2rem; }
.faq-layout .section-head { margin-bottom: 0; }
@media (min-width: 1000px) { .faq-layout { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 6rem; } .faq-layout .section-head { margin-bottom: 0; position: sticky; top: calc(var(--header-h) + 2rem); align-self: start; } }
.faq { border-top: 1px solid var(--c-line); }
.faq details { border-bottom: 1px solid var(--c-line); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 1.5rem;
  min-height: 64px; padding: 1.25rem 0; font-family: var(--f-serif); font-size: var(--t-h4); line-height: 1.25;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .icon { width: 22px; height: 22px; color: var(--c-accent); transition: transform .35s var(--ease); }
.faq details[open] summary .icon { transform: rotate(45deg); }
.faq__answer { padding: 0 3rem 1.75rem 0; color: var(--c-ink-soft); max-width: 62ch; }

/* =========================================================
   15. CONTATTI
   ========================================================= */
.contact { display: grid; gap: 3rem; }
@media (min-width: 1000px) { .contact { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 6rem; } }
.contact__info h2 { margin-bottom: 1.5rem; }
.contact__info > p { color: var(--c-ink-soft); max-width: 42ch; }
.contact-list { list-style: none; margin: 2.5rem 0 0; padding: 0; border-top: 1px solid var(--c-line); }
.contact-list li { border-bottom: 1px solid var(--c-line); }
.contact-list a { display: flex; align-items: center; gap: 1rem; min-height: 64px; padding: .75rem 0; text-decoration: none; }
.contact-list .icon { width: 22px; height: 22px; color: var(--c-accent); }
.contact-list small { display: block; font-size: var(--t-xs); letter-spacing: .12em; text-transform: uppercase; color: var(--c-muted); line-height: 1.4; }
.contact-list span { font-weight: 500; }
.contact-list a:hover span span { text-decoration: underline; text-underline-offset: 3px; }

.form { background: var(--c-paper); border: 1px solid var(--c-line); border-radius: calc(var(--radius) * 2); padding: clamp(1.5rem, 1rem + 2vw, 3rem); }
.form-grid { display: grid; gap: 1.25rem; }
@media (min-width: 600px) { .form-grid { grid-template-columns: 1fr 1fr; } .span-2 { grid-column: span 2; } }
.field { display: grid; gap: .45rem; min-width: 0; }
.field label { font-size: 0.8125rem; font-weight: 500; color: var(--c-ink-soft); }
.field label .opt { color: var(--c-muted); font-weight: 400; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 52px; padding: .8rem 1rem; border: 1px solid var(--c-sand); border-radius: var(--radius);
  background: var(--c-bg); font-size: 1rem; line-height: 1.4; appearance: none; -webkit-appearance: none;
  transition: border-color .2s, background-color .2s, box-shadow .2s;
}
.field input[type="date"] { min-width: 0; display: block; }
.field input[type="date"]::-webkit-date-and-time-value { text-align: left; }
.field select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23A45A2E' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'><path d='M6 9l6 6 6-6'/></svg>");
  background-repeat: no-repeat; background-position: right .9rem center; background-size: 18px; padding-right: 2.75rem;
}
.field textarea { min-height: 128px; resize: vertical; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--c-muted); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--c-accent); background: #fff; box-shadow: 0 0 0 3px var(--c-accent-soft); }
.field.has-error input, .field.has-error select { border-color: #A4553F; }
.field .error { font-size: 0.8125rem; color: #8E4532; min-height: 0; }
.check { display: flex; gap: .85rem; align-items: flex-start; font-size: 0.875rem; color: var(--c-ink-soft); cursor: pointer; line-height: 1.5; }
.check input { appearance: none; -webkit-appearance: none; flex: none; width: 22px; height: 22px; margin: 0; border: 1px solid var(--c-muted); border-radius: 4px; background: var(--c-bg); display: grid; place-items: center; cursor: pointer; }
.check input:checked { background: var(--c-accent); border-color: var(--c-accent); }
.check input:checked::after { content: ""; width: 6px; height: 11px; border: solid #fff; border-width: 0 2px 2px 0; transform: translateY(-1px) rotate(45deg); }
.check.has-error input { border-color: #A4553F; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; margin-top: .5rem; }
.form-actions p { font-size: var(--t-sm); color: var(--c-muted); margin: 0; max-width: 34ch; }
.form-success { text-align: left; }
.form-success[hidden] { display: none; }
.form-success__icon { width: 56px; height: 56px; border-radius: 50%; background: var(--c-accent-soft); color: var(--c-accent); display: grid; place-items: center; margin-bottom: 1.5rem; }
.form-success__icon .icon { width: 26px; height: 26px; stroke-width: 2; }
.form-success h3 { margin-bottom: 1rem; }
.form-success p { color: var(--c-ink-soft); max-width: 46ch; }
.form-success .summary { margin: 1.5rem 0 2rem; padding: 1.25rem; background: var(--c-bg); border-radius: var(--radius); font-size: 0.875rem; white-space: pre-line; color: var(--c-ink-soft); line-height: 1.6; }
.form-success__actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-bottom: 1.5rem; }
.link-btn { background: none; border: 0; padding: .5rem 0; min-height: 44px; font-size: var(--t-sm); color: var(--c-muted); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* =========================================================
   16. FOOTER
   ========================================================= */
.site-footer { background: var(--c-dark); color: rgba(255,255,255,.72); padding: clamp(4rem, 3rem + 4vw, 7rem) 0 calc(2rem + 72px); font-size: 0.9375rem; }
.footer-top { display: grid; gap: 2.5rem; padding-bottom: 3rem; border-bottom: 1px solid rgba(255,255,255,.14); }
.footer-brand { font-family: var(--f-serif); font-size: clamp(2.25rem, 1.8rem + 2vw, 3.5rem); color: #fff; line-height: 1; margin: 0 0 1rem; }
.site-footer h3 { font-family: var(--f-sans); font-size: var(--t-xs); letter-spacing: .16em; text-transform: uppercase; color: rgba(255,255,255,.5); font-weight: 500; margin-bottom: 1rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.site-footer .footer-top a { display: inline-flex; align-items: center; min-height: 44px; }
.site-footer .footer-bottom a { display: inline-flex; align-items: center; min-height: 44px; }
.site-footer a { text-decoration: none; color: rgba(255,255,255,.85); }
.site-footer a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.site-footer address { font-style: normal; line-height: 1.7; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .25rem 2rem; padding-top: 2rem; font-size: var(--t-sm); color: rgba(255,255,255,.55); }
.footer-bottom ul { display: flex; flex-wrap: wrap; align-items: center; gap: 0 1.5rem; }
.footer-bottom p { margin: 0; }
@media (min-width: 800px) { .footer-top { grid-template-columns: 2fr 1fr 1fr; } }

/* =========================================================
   17. WHATSAPP FLOTTANTE
   ========================================================= */
.wa-float {
  position: fixed; z-index: 40;
  right: max(1rem, env(safe-area-inset-right)); bottom: max(1rem, env(safe-area-inset-bottom));
  width: 58px; height: 58px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--c-accent); color: #fff;
  box-shadow: 0 6px 24px rgba(38,35,31,.25);
  transition: transform .3s var(--ease), background-color .3s;
}
.wa-float:hover { transform: translateY(-2px); background: var(--c-accent-dark); }
.wa-float .icon { width: 28px; height: 28px; stroke-width: 1.6; }
@media (min-width: 900px) { .wa-float { right: 1.75rem; bottom: 1.75rem; width: 62px; height: 62px; } }

/* =========================================================
   18. MOVIMENTO
   ========================================================= */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }
.js .reveal-d1 { transition-delay: .08s; }
.js .reveal-d2 { transition-delay: .16s; }
.js .reveal-d3 { transition-delay: .24s; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* =========================================================
   19. SCHERMI GRANDI: tutto in rem, quindi basta scalare la radice
   ========================================================= */
@media (min-width: 1920px) {
  html { font-size: 112.5%; }
  :root { --container: 1440px; }
}
@media (min-width: 2400px) {
  html { font-size: 125%; }
  :root { --container: 1560px; }
}
