/* La Bastida del Mirador — colonna centrale, titolo e introduzione sopra, blocchi allineati, foto grandi.
   Colori del logo: verde bosco #24362a, oro #997835, crema #f8f3ed. */

:root {
  --cream: #f8f3ed;
  --sand: #efe6d8;
  --paper: #fffdfa;
  --ink: #1c2920;
  --ink-2: #3c483f;
  --muted: #646d63;
  --line: rgba(28, 41, 32, 0.14);
  --green: #24362a;
  --green-2: #304a39;
  --green-deep: #19261d;
  --gold: #997835;
  --gold-l: #d2b678;
  --gold-ink: #7a5f27;
  --on-dark: #f6f1e7;

  --display: 'Jost', 'Futura', 'Avenir Next', system-ui, sans-serif;
  --text: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --fs-hero: clamp(min(3.1rem, 12svh), min(7.4vw, 12.5svh), 7rem);
  --fs-h1: clamp(2.8rem, 6vw, 5.4rem);
  --fs-h2: clamp(2.15rem, 4.1vw, 3.75rem);
  --fs-h3: clamp(1.35rem, 1.7vw, 1.6rem);
  --fs-lead: clamp(1.125rem, 1.35vw, 1.35rem);

  --pad: clamp(1.25rem, 4vw, 3rem);
  --max: 1240px;
  --sec: clamp(5rem, 10vw, 9rem);
  --header-h: 92px;
  --r: 10px;
  --r-lg: 18px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.76, 0, 0.24, 1);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--cream); }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
body {
  margin: 0; background: var(--cream); color: var(--ink);
  font-family: var(--text); font-size: 1.125rem; line-height: 1.6;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, p, figure, ul, ol, dl, dd, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg, picture { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--gold-l); color: var(--green-deep); }
.container { width: min(100% - 2 * var(--pad), var(--max)); margin-inline: auto; }
.skip { position: absolute; left: 1rem; top: -4rem; z-index: 200; background: var(--green); color: var(--on-dark); padding: .75rem 1rem; border-radius: var(--r); }
.skip:focus { top: 1rem; }

h1, h2, h3 { font-family: var(--display); font-weight: 500; letter-spacing: -0.015em; line-height: 1.02; text-wrap: balance; color: var(--green); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); line-height: 1.15; letter-spacing: -0.005em; }
p { text-wrap: pretty; }

/* parole che salgono nei titoli */
.w { display: inline-block; overflow: hidden; vertical-align: top; padding: .12em .03em .08em; margin: -.12em -.03em -.08em; }
.wi { display: inline-block; }

/* ---------- bottoni e link ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  min-height: 3.2rem; padding: 0 1.5rem; border-radius: var(--r); overflow: hidden; isolation: isolate;
  font-family: var(--text); font-weight: 600; font-size: 1rem; line-height: 1; text-decoration: none; white-space: nowrap;
  border: 1.5px solid transparent;
  transition: color .35s var(--ease-out), border-color .35s var(--ease-out), transform .15s var(--ease-out);
}
.btn::before { content: ""; position: absolute; inset: 0; z-index: -1; transform: scaleY(0); transform-origin: 50% 100%; transition: transform .5s var(--ease-expo); }
.btn:active { transform: scale(.97); }
.btn--lg { min-height: 3.6rem; padding: 0 1.8rem; font-size: 1.0625rem; }
.btn-primary { background: var(--green); color: var(--on-dark); }
.btn-primary::before { background: var(--green-deep); }
.btn-light { background: var(--on-dark); color: var(--green); }
.btn-light::before { background: #fff; }
.btn-line { border-color: rgba(246, 241, 231, .55); color: var(--on-dark); }
.btn-line::before { background: var(--on-dark); }
.btn-ghost { border-color: rgba(28, 41, 32, .3); color: var(--green); }
.btn-ghost::before { background: var(--green); }
@media (hover: hover) {
  .btn:hover::before { transform: scaleY(1); }
  .btn-line:hover { color: var(--green); border-color: var(--on-dark); }
  .btn-ghost:hover { color: var(--on-dark); border-color: var(--green); }
}
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2.25rem; }
.link { position: relative; display: inline-flex; align-items: center; gap: .45rem; font-weight: 600; color: var(--green); text-decoration: none; padding-bottom: 2px; }
.link::before { content: ""; position: absolute; inset: -.7rem -.5rem; }
.link::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1.5px; background: currentColor; transform: scaleX(0); transform-origin: 100% 50%; transition: transform .45s var(--ease-expo); }
.link .arrow { width: 1.1em; height: 1.1em; transition: transform .45s var(--ease-expo); }
@media (hover: hover) { .link:hover::after { transform: scaleX(1); transform-origin: 0 50%; } .link:hover .arrow { transform: translateX(4px); } }
.more { margin-top: 2.25rem; }
.fine { margin-top: 1.75rem; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; align-items: center; justify-content: space-between; font-size: .9375rem; color: var(--muted); }
.credit { display: block; margin-top: .55rem; font-size: .8125rem; line-height: 1.4; color: var(--muted); }
.credit a { color: inherit; }

/* ---------- testata ---------- */
.site-header { position: fixed; inset: 0 0 auto; z-index: 60; height: var(--header-h); transition: transform .5s var(--ease-expo), background-color .35s ease, box-shadow .35s ease; background: var(--cream); box-shadow: 0 1px 0 var(--line); }
.site-header.is-hidden { transform: translateY(-100%); }
.site-header__inner { height: 100%; display: flex; align-items: center; gap: 2rem; }
.brand { position: relative; display: block; flex: none; width: clamp(190px, 17vw, 236px); }
.brand img { width: 100%; height: auto; transition: opacity .35s ease; }
.brand__light { position: absolute; inset: 0; opacity: 0; }
.site-nav { margin-left: auto; }
.nav-links { display: flex; gap: clamp(1.1rem, 2.2vw, 2.1rem); }
.nav-links a { position: relative; font-size: 1rem; font-weight: 500; text-decoration: none; padding-block: .4rem; color: var(--ink-2); transition: color .3s ease; }
.nav-links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--gold); transform: scaleX(0); transform-origin: 100% 50%; transition: transform .45s var(--ease-expo); }
.nav-links a[aria-current="page"] { color: var(--green); }
.nav-links a[aria-current="page"]::after { transform: scaleX(1); }
@media (hover: hover) { .nav-links a:hover::after { transform: scaleX(1); transform-origin: 0 50%; } }
.site-header__cta { min-height: 2.9rem; padding: 0 1.25rem; font-size: .9375rem; }
/* sopra la foto d'apertura la testata è trasparente */
.over-hero .site-header:not(.is-scrolled) { background: transparent; box-shadow: none; }
.over-hero .site-header:not(.is-scrolled) .brand__light { opacity: 1; }
.over-hero .site-header:not(.is-scrolled) .brand__dark { opacity: 0; }
.over-hero .site-header:not(.is-scrolled) .nav-links a { color: var(--on-dark); }
.over-hero .site-header:not(.is-scrolled) .site-header__cta { background: var(--on-dark); color: var(--green); }
.over-hero .site-header:not(.is-scrolled) .menu-toggle { color: var(--on-dark); }
.site-header.is-scrolled { background: rgba(248, 243, 237, .97); box-shadow: 0 1px 0 var(--line); }

.menu-toggle { display: none; margin-left: auto; align-items: center; gap: .7rem; background: none; border: 0; font-weight: 600; padding: .6rem 0; color: var(--green); }
.menu-toggle i { position: relative; width: 26px; height: 10px; }
.menu-toggle i::before, .menu-toggle i::after { content: ""; position: absolute; left: 0; right: 0; height: 2px; background: currentColor; transition: transform .45s var(--ease-expo), top .45s var(--ease-expo); }
.menu-toggle i::before { top: 0; }
.menu-toggle i::after { top: 8px; }
.menu-open .menu-toggle i::before { top: 4px; transform: rotate(45deg); }
.menu-open .menu-toggle i::after { top: 4px; transform: rotate(-45deg); }
.mobile-menu[hidden] { display: none; }
.mobile-menu { position: fixed; inset: var(--header-h) 0 0; z-index: 59; background: var(--cream); display: flex; flex-direction: column; justify-content: space-between; padding: 1.25rem var(--pad) 2rem; opacity: 0; transition: opacity .35s ease; overflow: auto; }
.menu-open .mobile-menu { opacity: 1; }
.menu-open .site-header { background: var(--cream) !important; box-shadow: 0 1px 0 var(--line) !important; transform: none; }
.menu-open .site-header .brand__dark { opacity: 1 !important; }
.menu-open .site-header .brand__light { opacity: 0 !important; }
.menu-open .site-header .menu-toggle { color: var(--green) !important; }
.mobile-menu ul a { display: block; padding: .65rem 0; border-bottom: 1px solid var(--line); font-family: var(--display); font-weight: 500; font-size: 2rem; line-height: 1.15; color: var(--green); text-decoration: none; }
.mobile-menu__foot { display: grid; gap: .75rem; margin-top: 2rem; }
.mobile-menu__foot .btn-line { color: var(--green); border-color: var(--line); }

/* ---------- cambio pagina: tendina verde con lo stemma ---------- */
.js.curtain-in body::before, .js.curtain-cover body::before {
  content: ""; position: fixed; inset: 0; z-index: 100; pointer-events: none;
  background: var(--green) url("img/emblema-light.webp") center / min(180px, 36vw) auto no-repeat;
}
.js.curtain-in body::before { animation: curtain-up .8s var(--ease-in-out) 2.4s forwards; }
.js.curtain-in.curtain-lift body::before { animation: curtain-up .8s var(--ease-in-out) forwards; }
.js.curtain-cover body::before { animation: curtain-down .6s var(--ease-in-out) forwards; }
@keyframes curtain-up { from { transform: translateY(0); } to { transform: translateY(-100%); } }
@keyframes curtain-down { from { transform: translateY(100%); } to { transform: translateY(0); } }

/* ---------- sezioni ---------- */
.section { padding-block: var(--sec); }
.section--sand { background: var(--sand); }
.section--paper { background: var(--paper); }
.sec-head { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 1.25rem 4rem; align-items: end; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.sec-head h2 { max-width: 15ch; }
.sec-head p { color: var(--ink-2); font-size: var(--fs-lead); line-height: 1.55; max-width: 42ch; }

/* ---------- apertura della home: la facciata a tutto schermo ---------- */
.hero { position: relative; min-height: 100svh; display: flex; align-items: flex-end; color: var(--on-dark); overflow: hidden; background: var(--green-deep); }
.hero__media { position: absolute; inset: 0; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; }
.hero__scrim { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(17, 26, 20, .45) 0%, rgba(17, 26, 20, 0) 22%, rgba(17, 26, 20, 0) 48%, rgba(17, 26, 20, .6) 100%), linear-gradient(90deg, rgba(17, 26, 20, .55) 0%, rgba(17, 26, 20, .22) 36%, rgba(17, 26, 20, 0) 58%); }
.hero__content { position: relative; padding-top: calc(var(--header-h) + 3rem); padding-bottom: clamp(3rem, 8vh, 5.5rem); }
.hero__title { font-size: var(--fs-hero); color: var(--on-dark); max-width: 12ch; line-height: .98; letter-spacing: -0.025em; }
.hero__lead { margin-top: 1.4rem; max-width: 38ch; font-size: var(--fs-lead); line-height: 1.5; color: rgba(246, 241, 231, .94); }

/* ---------- cifre ---------- */
.facts { background: var(--green); color: var(--on-dark); padding-block: clamp(2.25rem, 4vw, 3.25rem); }
.facts__list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.5rem 2.5rem; }
.facts__list li { display: grid; gap: .35rem; align-content: start; }
.facts__list strong { font-family: var(--display); font-weight: 500; font-size: clamp(2.4rem, 4vw, 3.4rem); line-height: 1; letter-spacing: -0.02em; color: var(--gold-l); font-variant-numeric: tabular-nums; }
.facts__list span:not([data-count]) { font-size: 1rem; line-height: 1.4; color: rgba(246, 241, 231, .86); max-width: 22ch; }

/* ---------- foto ---------- */
figure img { width: 100%; }
.mosaic { display: grid; grid-template-columns: minmax(0, 1.42fr) minmax(0, 1fr); grid-template-rows: 1fr 1fr; gap: clamp(1rem, 2vw, 1.5rem); }
.mosaic figure { position: relative; overflow: hidden; border-radius: var(--r-lg); background: var(--sand); }
.mosaic img { height: 100%; object-fit: cover; }
.mosaic__a { grid-row: span 2; aspect-ratio: 4 / 4.6; }
.mosaic__b, .mosaic__c { min-height: 0; }
figcaption { position: absolute; left: 1rem; bottom: 1rem; padding: .45rem .8rem; border-radius: 8px; background: rgba(248, 243, 237, .94); color: var(--green); font-size: .9375rem; font-weight: 600; }

/* ---------- calcolatore ---------- */
.calc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); border-radius: var(--r-lg); overflow: hidden; background: var(--paper); }
.calc__controls { padding: clamp(1.75rem, 4vw, 3.25rem); display: grid; gap: 1.75rem; align-content: center; }
.stepper { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--line); }
.stepper__label { font-family: var(--display); font-size: 1.6rem; color: var(--green); }
.stepper__ctrl { display: flex; align-items: center; gap: .6rem; }
.stepper button { width: 3.25rem; height: 3.25rem; border-radius: 50%; border: 1.5px solid var(--line); background: var(--cream); font-size: 1.5rem; line-height: 1; color: var(--green); transition: background-color .25s ease, color .25s ease, transform .15s var(--ease-out), border-color .25s ease; }
.stepper button:active { transform: scale(.9); }
.stepper button:disabled { opacity: .35; cursor: default; }
@media (hover: hover) { .stepper button:not(:disabled):hover { background: var(--green); color: var(--on-dark); border-color: var(--green); } }
.stepper output { min-width: 2.6ch; text-align: center; font-family: var(--display); font-size: 2.4rem; line-height: 1; color: var(--green); font-variant-numeric: tabular-nums; }
.calc__note { font-size: .9375rem; color: var(--muted); }
.calc__result { background: var(--green); color: var(--on-dark); padding: clamp(1.75rem, 4vw, 3.25rem); display: grid; align-content: center; justify-items: start; }
.calc__big { font-family: var(--display); font-size: clamp(4.5rem, 9vw, 7.5rem); line-height: .9; letter-spacing: -0.03em; color: var(--gold-l); font-variant-numeric: tabular-nums; }
.calc__unit { margin-top: .5rem; font-size: 1.125rem; color: rgba(246, 241, 231, .9); }
.calc__rows { width: 100%; margin: 2rem 0 2.25rem; display: grid; gap: .75rem; }
.calc__rows div { display: flex; justify-content: space-between; gap: 1rem; padding-top: .75rem; border-top: 1px solid rgba(246, 241, 231, .2); }
.calc__rows dt { color: rgba(246, 241, 231, .82); }
.calc__rows dd { font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---------- cerca de casa ---------- */
.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.75rem; }
.chips button { padding: .6rem 1.1rem; border-radius: 999px; border: 1.5px solid var(--line); background: transparent; font-weight: 500; font-size: .9375rem; color: var(--ink-2); transition: background-color .3s ease, color .3s ease, border-color .3s ease; }
.chips button[aria-pressed="true"] { background: var(--green); border-color: var(--green); color: var(--on-dark); }
@media (hover: hover) { .chips button[aria-pressed="false"]:hover { border-color: var(--green); color: var(--green); } }
.near { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .95fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; }
.near__list li { border-top: 1px solid var(--line); }
.near__list li:last-child { border-bottom: 1px solid var(--line); }
.near__list li.is-out { display: none; }
.near__item { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .2rem 1.5rem; align-items: baseline; padding: 1.15rem .25rem; background: none; border: 0; text-align: left; }
.near__name { font-family: var(--display); font-size: clamp(1.35rem, 2vw, 1.75rem); line-height: 1.15; color: var(--green); transition: color .3s ease, transform .45s var(--ease-expo); }
.near__desc { grid-column: 1; color: var(--muted); font-size: 1rem; }
.near__min { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-family: var(--display); font-size: clamp(1.35rem, 2vw, 1.75rem); color: var(--gold-ink); white-space: nowrap; font-variant-numeric: tabular-nums; }
.near__item[aria-pressed="true"] .near__name { transform: translateX(.6rem); }
.near__item[aria-pressed="true"] { box-shadow: inset 3px 0 0 var(--gold); }
@media (hover: hover) { .near__item:hover .near__name { transform: translateX(.6rem); } }
.near__panel { position: sticky; top: calc(var(--header-h) + 1.5rem); display: grid; grid-template-columns: minmax(0, 1fr); min-width: 0; }
.near__panel figure { grid-area: 1 / 1; opacity: 0; visibility: hidden; transform: scale(1.02); transition: opacity .55s ease, transform .9s var(--ease-expo), visibility 0s .55s; }
.near__panel figure.is-on { opacity: 1; visibility: visible; transform: none; transition: opacity .55s ease, transform .9s var(--ease-expo); }
.near__panel img { aspect-ratio: 4 / 3.2; object-fit: cover; border-radius: var(--r-lg); }
.near__plain { aspect-ratio: 4 / 3.2; border-radius: var(--r-lg); background: var(--green) url("img/emblema-light.webp") 50% 38% / 26% auto no-repeat; color: var(--on-dark); display: grid; align-content: end; padding: 2rem; }
.near__plain p { font-family: var(--display); font-size: 2rem; line-height: 1.1; }
.near__plain span { color: var(--gold-l); font-family: var(--display); font-size: 1.25rem; }

/* ---------- fascia a tutta larghezza ---------- */
.band { position: relative; min-height: min(92svh, 820px); display: flex; align-items: flex-end; overflow: hidden; background: var(--green-deep); }
.band__media { position: absolute; inset: 0; }
.band__media img { width: 100%; height: 118%; object-fit: cover; object-position: 50% 60%; }
.band__inner { position: relative; padding-block: clamp(3rem, 8vw, 6rem); }
.band__card { max-width: 34rem; background: var(--green); color: var(--on-dark); padding: clamp(1.75rem, 3.5vw, 2.75rem); border-radius: var(--r-lg); }
.band__card h2 { color: var(--on-dark); font-size: clamp(2rem, 3.6vw, 3.1rem); }
.band__card p { margin-top: 1rem; color: rgba(246, 241, 231, .9); }
.band__card .credit { color: rgba(246, 241, 231, .6); margin-top: 1.25rem; }

/* ---------- testo + foto ---------- */
.split { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1fr); gap: clamp(2rem, 6vw, 5.5rem); align-items: center; }
.split__media { border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 4 / 4.6; }
.split__media img { height: 100%; object-fit: cover; }
.split__text h2 { margin-bottom: 1.5rem; }
.split__text p + p { margin-top: 1rem; }
.split__text p { color: var(--ink-2); max-width: 46ch; }
.langs { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.5rem; }
.langs li { padding: .45rem .9rem; border-radius: 8px; background: var(--sand); color: var(--green); font-weight: 600; font-size: .9375rem; }

/* ---------- chiusura verde ---------- */
.cta-band { background: var(--green); color: var(--on-dark); padding-block: clamp(4.5rem, 9vw, 7.5rem); }
.cta-band__inner { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.cta-band__text { display: grid; justify-items: start; }
.cta-band__media { border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 4 / 3.4; }
.cta-band__media img { height: 100%; object-fit: cover; }
.cta-band h2 { color: var(--on-dark); font-size: var(--fs-h1); max-width: 14ch; }
.cta-band p { margin-top: 1.25rem; max-width: 44ch; font-size: var(--fs-lead); color: rgba(246, 241, 231, .9); }

/* ---------- pagine interne: apertura ---------- */
.page-head { padding-top: calc(var(--header-h) + clamp(3rem, 7vw, 5.5rem)); padding-bottom: clamp(2.5rem, 5vw, 4rem); }
.page-head__grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 1.25rem 4rem; align-items: end; }
.page-head h1 { font-size: var(--fs-h1); max-width: 13ch; }
.page-head p { color: var(--ink-2); font-size: var(--fs-lead); line-height: 1.55; max-width: 42ch; }
.page-head__media { margin-top: clamp(2.5rem, 5vw, 3.5rem); border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 16 / 8; background: var(--sand); }
.page-head__media img { height: 100%; object-fit: cover; }

/* ---------- la casa ---------- */
.rooms { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: clamp(1rem, 2vw, 1.5rem); }
.room { grid-column: span 2; }
.room:nth-child(1), .room:nth-child(2) { grid-column: span 3; }
.room__img { border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 4 / 3.4; background: var(--sand); }
.room__img img { height: 100%; object-fit: cover; transition: transform 1.1s var(--ease-expo); }
@media (hover: hover) { .room:hover .room__img img { transform: scale(1.04); } }
.room h3 { margin-top: 1rem; }
.room p { margin-top: .3rem; color: var(--muted); font-size: 1rem; }
.spaces { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1rem, 2vw, 1.5rem); }
.spaces .room { grid-column: auto; }
.spaces .room__img { aspect-ratio: 4 / 3; }
.know { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 2.5rem; }
.know div { padding-block: 1.25rem; border-top: 1px solid var(--line); }
.know dt { font-size: .9375rem; color: var(--muted); }
.know dd { margin-top: .3rem; font-family: var(--display); font-size: 1.5rem; line-height: 1.2; color: var(--green); }
.know dd.know__note { margin-top: .45rem; font-family: inherit; font-size: .9375rem; line-height: 1.45; color: var(--muted); }

/* ---------- galleria ---------- */
.gallery { columns: 3 300px; column-gap: clamp(1rem, 2vw, 1.5rem); }
.gallery li { break-inside: avoid; margin-bottom: clamp(1rem, 2vw, 1.5rem); }
.gallery button { display: block; width: 100%; padding: 0; border: 0; border-radius: var(--r-lg); overflow: hidden; background: var(--sand); }
.gallery img { transition: transform 1.1s var(--ease-expo); }
@media (hover: hover) { .gallery button:hover img { transform: scale(1.04); } }
.lightbox { position: fixed; inset: 0; z-index: 90; display: grid; grid-template-rows: auto 1fr auto; background: rgba(17, 26, 20, .96); color: var(--on-dark); opacity: 0; transition: opacity .35s ease; }
.lightbox[hidden] { display: none; }
.lightbox.is-open { opacity: 1; }
.lightbox__bar { display: flex; justify-content: space-between; align-items: center; padding: 1rem var(--pad); }
.lightbox__stage { display: grid; place-items: center; padding: 0 var(--pad); min-height: 0; }
.lightbox__stage img { max-height: 78svh; width: auto; max-width: 100%; border-radius: 12px; }
.lightbox__nav { display: flex; justify-content: center; gap: .75rem; padding: 1rem; }
.lightbox button { min-height: 3rem; padding: 0 1.25rem; border-radius: var(--r); border: 1.5px solid rgba(246, 241, 231, .4); background: transparent; color: var(--on-dark); font-weight: 600; }
@media (hover: hover) { .lightbox button:hover { background: var(--on-dark); color: var(--green); } }

/* ---------- qué hacer ---------- */
.places { display: grid; gap: clamp(2.5rem, 5vw, 4rem); }
.place { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; }
.place:nth-child(even) .place__media { order: 2; }
.place__media { border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 4 / 3; background: var(--sand); }
.place__media img { height: 100%; object-fit: cover; }
.place__media.near__plain { display: grid; background: var(--green) url("img/emblema-light.webp") 50% 38% / 22% auto no-repeat; }
.place .near__plain p { color: var(--on-dark); margin: 0; }
.place__min { display: inline-block; margin-bottom: .9rem; font-family: var(--display); font-size: 1.35rem; color: var(--gold-ink); }
.place h3 { font-size: clamp(1.7rem, 2.6vw, 2.3rem); }
.place p { margin-top: .85rem; color: var(--ink-2); max-width: 46ch; }
.ticks { display: grid; gap: .35rem; margin-top: 1rem; color: var(--ink-2); }
.ticks li { padding-left: 1.4rem; position: relative; }
.ticks li::before { content: ""; position: absolute; left: 0; top: .72em; width: .55rem; height: .55rem; border-radius: 50%; background: var(--gold); }

/* ---------- prenotare ---------- */
.book { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.form { background: var(--paper); border-radius: var(--r-lg); padding: clamp(1.5rem, 3.5vw, 2.75rem); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem 1.25rem; }
.field { display: grid; gap: .4rem; }
.field--full { grid-column: 1 / -1; }
.field label, .check { font-size: .9375rem; font-weight: 600; color: var(--green); }
.field input, .field select, .field textarea { width: 100%; min-height: 3.2rem; padding: .8rem 1rem; border: 1.5px solid var(--line); border-radius: var(--r); background: var(--cream); color: var(--ink); font: inherit; font-size: 1rem; transition: border-color .25s ease, background-color .25s ease; }
.field textarea { min-height: 8rem; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--green); background: #fff; }
.check { grid-column: 1 / -1; display: flex; gap: .7rem; align-items: flex-start; font-weight: 500; color: var(--ink-2); line-height: 1.45; }
.check input { flex: none; width: 1.5rem; height: 1.5rem; margin: 0; accent-color: var(--green); }
.check a { color: var(--green); }
.form .btn { grid-column: 1 / -1; justify-self: start; }
.form__msg { grid-column: 1 / -1; padding: 1rem 1.25rem; border-radius: var(--r); background: var(--sand); color: var(--green); font-weight: 600; }
.form__msg[hidden] { display: none; }
.form__note { grid-column: 1 / -1; font-size: .9375rem; line-height: 1.5; color: var(--muted); }
.form__note a { color: var(--green); text-decoration: underline; text-underline-offset: .2em; }
.form__msg.is-error { background: #f6e3dc; color: #7a2e17; }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.ways { display: grid; gap: 1rem; }
.way { display: grid; gap: .2rem; padding: 1.35rem 1.5rem; border-radius: var(--r-lg); background: var(--paper); text-decoration: none; transition: background-color .3s ease, transform .45s var(--ease-expo); }
a.way:hover { background: #fff; transform: translateY(-2px); }
.way span { font-size: .9375rem; color: var(--muted); }
.way strong { font-family: var(--display); font-weight: 500; font-size: 1.5rem; line-height: 1.2; color: var(--green); overflow-wrap: anywhere; }
.way--green { background: var(--green); }
.way--green span { color: rgba(246, 241, 231, .8); }
.way--green strong { color: var(--on-dark); }
a.way--green:hover { background: var(--green-2); }
.routes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 2rem; }
.routes div { padding-block: 1.1rem; border-top: 1px solid var(--line); }
.routes dt { color: var(--muted); font-size: .9375rem; }
.routes--two { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 2rem; }
.routes dd { margin-top: .25rem; font-family: var(--display); font-size: 1.6rem; color: var(--green); }

/* ---------- testo lungo (privacidad, blog) ---------- */
.prose { max-width: 46rem; }
.prose h2 { font-size: clamp(1.6rem, 2.4vw, 2.1rem); margin: 2.5rem 0 .9rem; }
.prose p, .prose li { color: var(--ink-2); }
.prose p + p { margin-top: 1rem; }
.prose ul { list-style: disc; padding-left: 1.3rem; display: grid; gap: .35rem; margin-top: .75rem; }
.prose a { color: var(--green); }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.25rem, 2.5vw, 2rem); }
.card { display: block; text-decoration: none; }
.card__img { border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 4 / 3; background: var(--sand); }
.card__img img { height: 100%; object-fit: cover; transition: transform 1.1s var(--ease-expo); }
@media (hover: hover) { .card:hover .card__img img { transform: scale(1.04); } }
.card h2, .card h3 { margin-top: 1.1rem; font-size: 1.5rem; line-height: 1.2; }
.card p { margin-top: .5rem; color: var(--muted); font-size: 1rem; }

/* ---------- piè di pagina ---------- */
.site-footer { background: var(--green-deep); color: rgba(246, 241, 231, .86); padding-block: clamp(4rem, 8vw, 6rem) 2rem; font-size: 1rem; }
.site-footer__top { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.site-footer__seal { width: clamp(160px, 16vw, 210px); }
.site-footer__cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; }
.site-footer h2 { font-family: var(--display); font-size: 1.25rem; font-weight: 500; color: var(--gold-l); margin-bottom: .75rem; letter-spacing: 0; }
.site-footer a { color: var(--on-dark); text-decoration-color: rgba(246, 241, 231, .35); text-underline-offset: 3px; overflow-wrap: anywhere; }
.site-footer__legal { margin-top: clamp(3rem, 6vw, 4.5rem); padding-top: 1.5rem; border-top: 1px solid rgba(246, 241, 231, .16); display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 2rem; font-size: .875rem; color: rgba(246, 241, 231, .66); }
.site-footer__legal a { color: rgba(246, 241, 231, .8); }
.dock { display: none; }
/* col dito: i link del piè di pagina diventano alti abbastanza da toccare */
@media (pointer: coarse) { .site-footer__cols a { display: inline-block; padding-block: .5rem; } }


/* ---------- varianti ---------- */
.page-head__media--map { position: relative; aspect-ratio: 2266 / 1360; overflow: visible; }
.page-head__media--map img { border-radius: var(--r-lg); }
.pin { position: absolute; left: calc(var(--x) * 1%); top: calc(var(--y) * 1%); transform: translate(-9px, -50%); display: flex; align-items: center; gap: .6rem; pointer-events: none; }
.pin i { position: relative; width: 18px; height: 18px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px rgba(248, 243, 237, .9); }
.pin i::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--gold); animation: pin 2.2s var(--ease-out) infinite; }
.pin b { padding: .4rem .75rem; border-radius: 8px; background: var(--green); color: var(--on-dark); font-size: .875rem; font-weight: 600; white-space: nowrap; }
@keyframes pin { from { transform: scale(.8); opacity: .9; } to { transform: scale(2.6); opacity: 0; } }
.map-cap { margin-top: .75rem; font-size: .875rem; color: var(--muted); }
.map-cap .credit { display: inline; margin: 0; }
.section--tight { padding-top: 0; }
.rooms--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.rooms--three .room { grid-column: auto; }
.rooms--three .room__img { aspect-ratio: 4 / 4.8; }
.lightbox__cap { align-self: center; max-width: 40ch; text-align: center; font-size: .9375rem; color: rgba(246, 241, 231, .8); }
.page-head + .section--tight { padding-top: 0; }

/* ---------- blog del sistema (.svhb) nei colori e caratteri della casa ---------- */
.svhb { --svhb-head: var(--display); --svhb-body: var(--text); --svhb-ink: var(--ink); --svhb-muted: var(--muted); }
.svhb.svhb--shell { --svhb-accent: #24362a !important; --svhb-onaccent: #f6f1e7 !important; --svhb-surface: #efe6d8 !important; --svhb-border: rgba(28, 41, 32, .14) !important; }
.svhb.svhb--shell .svhb__main { padding-top: calc(var(--header-h) + 3.5rem); padding-bottom: 5rem; }
.svhb .svhb__h1 { font-weight: 500; letter-spacing: -0.015em; color: var(--green); }
.svhb__main:has(.svhb__grid) .svhb__h1 { font-size: var(--fs-h1); }
.svhb .svhb__body h2 { font-weight: 500; color: var(--green); }
.svhb .svhb__hero, .svhb .svhb__card img { border-radius: var(--r-lg); }
.svhb { --svhb-muted: #4b554c; }
.svhb .svhb__eyebrow { display: none; }
.svhb .svhb__card { border-color: transparent; background: var(--paper); border-radius: var(--r-lg); }
.svhb .svhb__body p, .svhb .svhb__body li { font-size: 1.0625rem; }
.svhb .svhb__lead { font-size: 1.1875rem; color: var(--ink-2); }
.svhb .svhb__card .ex { font-size: 1rem; }
.svhb .svhb__card .d { font-size: .875rem; }
/* indice del blog: l'ultimo articolo in evidenza su tutta la riga, gli altri sotto in file da tre */
@media (min-width: 900px) {
  .svhb .svhb__grid > .svhb__card:first-child { grid-column: 1 / -1; flex-direction: row; }
  .svhb .svhb__grid > .svhb__card:first-child img { width: 58%; flex: none; aspect-ratio: 16 / 10; }
  .svhb .svhb__grid > .svhb__card:first-child .pad { align-self: center; padding: 2rem 2.5rem; }
  .svhb .svhb__grid > .svhb__card:first-child h3 { font-size: clamp(1.6rem, 2.2vw, 2.1rem); line-height: 1.15; margin-bottom: .75rem; }
}
.svhb .svhb__ctaBox a.btn-primary { display: inline-flex; align-items: center; justify-content: center; min-height: 3.2rem; padding: 0 1.5rem; border-radius: var(--r); background: var(--green); color: var(--on-dark); font-weight: 600; font-size: 1rem; text-decoration: none; transition: background-color .3s ease; }
@media (hover: hover) { .svhb .svhb__ctaBox a.btn-primary:hover { background: var(--green-deep); } }

/* ---------- movimento (solo con JS e senza preferenza contraria) ---------- */
.has-motion [data-reveal-img] { clip-path: inset(6% 6% 6% 6% round 22px); opacity: 0; }
.has-motion [data-reveal-img].is-in { clip-path: inset(0 0 0 0 round var(--r-lg)); opacity: 1; transition: clip-path 1.4s var(--ease-expo), opacity .9s ease; }

/* ---------- desktop: il mosaico della casa sta tutto in uno schermo ---------- */
@media (min-width: 901px) {
  .mosaic { height: clamp(520px, 78svh, 760px); }
  .mosaic__a { aspect-ratio: auto; }
}

/* ---------- tablet ---------- */
@media (max-width: 1080px) {
  .site-nav, .site-header__cta { display: none; }
  .menu-toggle { display: inline-flex; }
  .facts__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-footer__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .routes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  :root { --header-h: 76px; }
  .sec-head, .page-head__grid { grid-template-columns: 1fr; align-items: start; }
  .mosaic { grid-template-columns: 1fr 1fr; grid-template-rows: auto; }
  .mosaic__a { grid-column: 1 / -1; grid-row: auto; aspect-ratio: 4 / 3.6; }
  .calc { grid-template-columns: 1fr; }
  .near { grid-template-columns: 1fr; }
  .near__panel { display: none; }
  .near__item[aria-pressed="true"] { box-shadow: none; }
  .near__item[aria-pressed="true"] .near__name { transform: none; }
  .near__inline { overflow: hidden; }
  .near__inline img { aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--r-lg); }
  .near__inline .credit { margin: .55rem 0 1.4rem; }
  .near__inline.near__plain { aspect-ratio: 16 / 9; margin-bottom: 1.4rem; padding: 1.5rem; background-size: 22% auto; }
  .near__inline.near__plain p { font-size: 1.6rem; }
  .split { grid-template-columns: 1fr; }
  .split__media { aspect-ratio: 4 / 3.4; }
  .rooms { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .room, .room:nth-child(1), .room:nth-child(2) { grid-column: auto; }
  .rooms--three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .know { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .place { grid-template-columns: 1fr; }
  .place:nth-child(even) .place__media { order: 0; }
  .book { grid-template-columns: 1fr; }
  .cta-band__inner { grid-template-columns: 1fr; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-footer__top { grid-template-columns: 1fr; }
}
/* ---------- telefono ---------- */
@media (max-width: 640px) {
  body { font-size: 1.0625rem; }
  .brand { width: 172px; }
  .hero__content { padding-bottom: 6.5rem; }
  .actions .btn { flex: 1 1 100%; }
  .calc__result { justify-items: stretch; }
  .form .btn { justify-self: stretch; }
  .page-head__media { aspect-ratio: 4 / 3; }
  .page-head__media--map { aspect-ratio: 1 / 1; }
  .page-head__media--map img { height: 100%; object-fit: cover; object-position: 0 50%; }
  /* la mappa è 2266×1360: nel quadrato si vede il 60% di sinistra, il segnaposto si sposta di conseguenza */
  .page-head__media--map .pin { left: calc(var(--x) * 1% / .6); }
  .facts__list { gap: 1.25rem 1.5rem; }
  .mosaic { grid-template-columns: 1fr; }
  .mosaic__b, .mosaic__c { aspect-ratio: 4 / 3; min-height: auto; }
  .stepper__label { font-size: 1.35rem; }
  .stepper button { width: 2.9rem; height: 2.9rem; }
  .band { min-height: 0; flex-direction: column; align-items: stretch; }
  .band__media { position: relative; height: 62svh; overflow: hidden; }
  .band__inner { padding: 0; width: 100%; }
  .band__card { border-radius: 0; max-width: none; margin: 0; padding: 2rem var(--pad) 2.25rem; }
  .form { grid-template-columns: 1fr; }
  .rooms, .rooms--three, .know, .cards, .routes { grid-template-columns: 1fr; }
  .lightbox__cap { display: none; }
  .site-footer__cols { grid-template-columns: 1fr; }
  .site-footer { padding-bottom: 6.5rem; }
  .dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 55; display: grid; grid-template-columns: 1fr 1.3fr; gap: .6rem; padding: .7rem var(--pad) calc(.7rem + env(safe-area-inset-bottom)); background: rgba(25, 38, 29, .97); transform: translateY(110%); transition: transform .5s var(--ease-expo); }
  .dock.is-on { transform: none; }
  .dock .btn { min-height: 3rem; }
  .menu-open .dock { transform: translateY(110%); }
}

/* ---------- apertura sul telefono (anche in orizzontale): un velo scuro che parte poco sopra il titolo ---------- */
@media (max-width: 700px), (max-height: 560px) and (orientation: landscape) {
  .hero__content { z-index: 0; }
  .hero__content::before { content: ""; position: absolute; z-index: -1; left: calc(-1 * var(--pad)); right: calc(-1 * var(--pad)); bottom: 0; top: calc(var(--header-h) - 1.5rem); background: linear-gradient(180deg, rgba(17, 26, 20, 0) 0%, rgba(17, 26, 20, .5) 4.5rem, rgba(17, 26, 20, .74) 100%); }
  .hero__lead { color: var(--on-dark); }
}
/* ---------- telefono in orizzontale e schermi bassi ---------- */
@media (max-height: 560px) and (orientation: landscape) {
  :root { --header-h: 64px; }
  .brand { width: 160px; }
  .hero__content { padding-top: calc(var(--header-h) + 1.25rem); padding-bottom: 1.5rem; }
  .hero__lead { margin-top: .75rem; max-width: 60ch; font-size: 1rem; }
  .hero .actions { margin-top: 1.25rem; }
  .hero .btn--lg { min-height: 3rem; }
  .band { min-height: 100svh; }
  .mobile-menu ul a { font-size: 1.5rem; padding: .45rem 0; }
  .lightbox__stage img { max-height: 70svh; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-delay: 0s !important; }
}
