/* ============================================================================
   VIEWS — navigazione, hero, masterplan, dettaglio, configuratore,
           gallery, form, pannelli, lightbox, footer
   ========================================================================== */

/* --- BANNER PROTOTIPO ----------------------------------------------------- */
.protobar {
  position: sticky; top: 0; z-index: 90;
  background: var(--ink); color: var(--paper);
  font-size: .64rem; letter-spacing: .12em; text-transform: uppercase;
  display: flex; align-items: center; gap: var(--s4);
  padding: 8px var(--gut); justify-content: space-between;
}
.protobar__l { display: flex; align-items: center; gap: 10px; min-width: 0; }
.protobar__dot { width: 6px; height: 6px; background: var(--terra); border-radius: 50%; flex: none; }
.protobar__txt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; opacity: .82; }
.protobar__r { display: flex; align-items: center; gap: var(--s3); flex: none; }
.protobar button {
  background: none; border: 1px solid rgba(255,255,255,.28); color: inherit;
  font: inherit; letter-spacing: .12em; text-transform: uppercase;
  padding: 4px 9px; cursor: pointer; transition: all var(--t-fast) var(--ease);
}
.protobar button:hover { background: rgba(255,255,255,.14); }
.protobar button[aria-pressed="true"] { background: var(--terra); border-color: var(--terra); color: #fff; }
@media (max-width: 900px) { .protobar__txt { display: none; } }
@media (max-width: 560px) { .protobar { font-size: .58rem; gap: var(--s2); padding-inline: 14px; } .protobar button { padding: 4px 7px; } }

/* --- NAV ------------------------------------------------------------------ */
.nav {
  position: sticky; top: 0; z-index: 80;
  background: color-mix(in srgb, var(--header-bg) 88%, transparent);
  backdrop-filter: blur(14px) saturate(1.1);
  border-bottom: 1px solid var(--line-soft);
  transition: background var(--t) var(--ease), border-color var(--t) var(--ease);
}
.cms-header-static .nav { position: relative; top: auto; }
body.has-protobar .nav { top: 30px; }
.nav__in {
  max-width: var(--page); margin: 0 auto; padding: 0 var(--gut);
  height: var(--header-height); display: flex; align-items: center; justify-content: space-between; gap: var(--s5);
}
.brand { display: flex; align-items: center; gap: 12px; cursor: pointer; background: none; border: 0; padding: 0; }
.brand__mark { font-family: var(--serif); font-size: 1.5rem; letter-spacing: .04em; font-weight: 400; }
.brand__sub { font-size: .58rem; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-3); }

/* --- Logo ufficiale ITTIN srl ----------------------------------------------
   Asset unico fornito dall'azienda: non esiste una versione a sfondo
   trasparente. Si alternano due file (pensati rispettivamente per sfondo
   chiaro e sfondo scuro) con lo stesso meccanismo con cui i token colore
   passano al tema scuro in system.css — nessuna modifica al file immagine. */
.brand-logo { display: inline-flex; align-items: center; line-height: 0; }
.brand-logo__img { display: block; width: auto; }
.brand-logo--header .brand-logo__img { height: var(--logo-height); }
.brand-logo--footer .brand-logo__img { height: calc(var(--logo-height) + 6px); }
.brand-logo__img--dark { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .brand-logo__img--light { display: none; }
  :root:not([data-theme="light"]) .brand-logo__img--dark { display: block; }
}
:root[data-theme="dark"] .brand-logo__img--light { display: none; }
:root[data-theme="dark"] .brand-logo__img--dark { display: block; }
@media (max-width: 480px) {
  .brand-logo--header .brand-logo__img { height: min(var(--logo-height), 28px); }
}
.nav__links { display: flex; gap: 2px; align-items: center; }
.nav__link {
  background: none; border: 0; cursor: pointer; padding: 10px 13px;
  font-size: var(--menu-size); letter-spacing: .14em; text-transform: uppercase; font-weight: 500;
  color: var(--ink-2); position: relative; transition: color var(--t-fast) var(--ease);
}
.nav__link::after {
  content: ''; position: absolute; left: 13px; right: 13px; bottom: 4px; height: 1px;
  background: var(--terra); transform: scaleX(0); transform-origin: left;
  transition: transform var(--t) var(--ease);
}
.nav__link:hover { color: var(--ink); }
.nav__link[aria-current="true"] { color: var(--ink); }
.nav__link[aria-current="true"]::after { transform: scaleX(1); }
.nav__cta { display: flex; gap: var(--s2); align-items: center; }
.nav__burger { display: none; background: none; border: 1px solid var(--line); padding: 9px 12px; cursor: pointer; font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; }
@media (max-width: 1080px) {
  .nav__links { display: none; }
  .nav__burger { display: block; }
  .nav__cta .btn { display: none; }
}
.navdrawer {
  position: fixed; inset: 0; z-index: 200; background: var(--paper);
  display: flex; flex-direction: column; padding: var(--s5) var(--gut);
  transform: translateY(-100%); transition: transform var(--t-slow) var(--ease);
}
.navdrawer.is-open { transform: none; }
.navdrawer__top { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--s7); }
.navdrawer a, .navdrawer button.nav__link {
  font-family: var(--serif); font-size: 2rem; letter-spacing: 0; text-transform: none;
  padding: 10px 0; text-align: left; color: var(--ink); border-bottom: 1px solid var(--line-soft);
}
.navdrawer button.nav__link::after { display: none; }

/* --- HERO ----------------------------------------------------------------- */
.hero { position: relative; min-height: min(88vh, var(--hero-height)); display: flex; align-items: flex-end; overflow: hidden; background: var(--ink); }
.hero__media { position: absolute; inset: 0; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; opacity: .82; transform: scale(1.04); animation: heroIn 2.4s var(--ease) forwards; }
@keyframes heroIn { to { transform: scale(1); } }
.hero__grad { position: absolute; inset: 0; background:
  linear-gradient(to top, rgba(12,10,8,.90) 0%, rgba(12,10,8,.42) 38%, rgba(12,10,8,.30) 100%); }
.hero__in { position: relative; z-index: 2; width: 100%; max-width: var(--page); margin: 0 auto; padding: 0 var(--gut) clamp(40px, 6vw, 76px); color: #fff; }
.hero__eyebrow { color: rgba(255,255,255,.72); margin-bottom: var(--s4); }
.hero .display { color: #fff; }
.hero__lede { color: rgba(255,255,255,.84); max-width: 54ch; margin-top: var(--s4); font-size: clamp(.95rem, 1.4vw, 1.1rem); }
.hero__cta { display: flex; gap: var(--s3); flex-wrap: wrap; margin-top: var(--s6); }
.hero__facts { display: flex; gap: clamp(20px, 4vw, 56px); flex-wrap: wrap; margin-top: clamp(32px, 5vw, 56px); padding-top: var(--s5); border-top: 1px solid rgba(255,255,255,.2); }
.hero__fact { color: #fff; }
.hero__fact b { display: block; font-family: var(--serif); font-weight: 400; font-size: clamp(1.5rem, 2.8vw, 2.2rem); line-height: 1.06; font-variant-numeric: tabular-nums; }
.hero__fact span { font-size: .62rem; letter-spacing: .16em; text-transform: uppercase; color: rgba(255,255,255,.62); display: block; margin-top: 8px; }
.hero__credit { position: absolute; right: var(--gut); bottom: 14px; z-index: 3; color: rgba(255,255,255,.5); font-size: .58rem; letter-spacing: .1em; text-transform: uppercase; }

/* --- INTESTAZIONI DI SEZIONE ---------------------------------------------- */
.shead { display: flex; gap: var(--s5); justify-content: space-between; align-items: flex-end; flex-wrap: wrap; margin-bottom: clamp(28px, 4vw, 52px); }
.shead__l { max-width: 60ch; }
.shead .eyebrow { margin-bottom: var(--s3); }

/* --- SCHEDA DATI (key/value editoriale) ----------------------------------- */
.kv { border-top: 1px solid var(--line); }
.kv__row { display: grid; grid-template-columns: minmax(120px, 34%) 1fr; gap: var(--s4); padding: 13px 0; border-bottom: 1px solid var(--line-soft); align-items: baseline; }
.kv__k { font-size: .68rem; letter-spacing: .13em; text-transform: uppercase; color: var(--ink-3); }
.kv__v { font-size: .93rem; }
.kv__v .dv__text { font-weight: 500; }

/* --- MASTERPLAN ----------------------------------------------------------- */
.mp { display: grid; gap: var(--s5); }
@media (min-width: 1000px) { .mp { grid-template-columns: minmax(0,1fr) 348px; gap: var(--s6); align-items: start; } }

.mp__stage {
  position: relative; background: var(--surface-2); border: 1px solid var(--line);
  overflow: hidden;
}
.mp__svg { display: block; width: 100%; height: clamp(400px, 72vh, 800px); touch-action: manipulation; }
@media (max-width: 760px) { .mp__svg { height: clamp(380px, 64vh, 560px); } }
.mp__cad { opacity: 0; transition: opacity var(--t) var(--ease); pointer-events: none; }
.mp__stage.show-cad .mp__cad { opacity: .42; }
.mp__base { opacity: .22; pointer-events: none; }

.lot { fill: var(--sage-soft); stroke: var(--line); stroke-width: .12; cursor: pointer;
       transition: fill var(--t) var(--ease), stroke var(--t) var(--ease); }
.lot:hover { fill: rgba(176, 96, 60, .16); stroke: var(--terra); }
.bld  { fill: var(--terra); opacity: .78; stroke: none; pointer-events: none;
        transition: opacity var(--t) var(--ease), fill var(--t) var(--ease); }
.unit.is-hover .lot  { fill: rgba(176, 96, 60, .18); stroke: var(--terra); stroke-width: .22; }
.unit.is-hover .bld  { opacity: 1; }
.unit.is-selected .lot { fill: rgba(176, 96, 60, .26); stroke: var(--terra); stroke-width: .34; }
.unit.is-selected .bld { opacity: 1; fill: var(--terra-deep); }
.unit.status-venduta .lot { fill: rgba(130,77,69,.13); }
.unit.status-venduta .bld { fill: #824d45; }
.unit.status-opzionata .lot { fill: var(--st-proto-bg); }
.unit.status-non-disponibile { opacity: .58; }
.unit.is-dim { opacity: .26; }
.unit .lot, .unit .bld { transition: opacity var(--t) var(--ease), fill var(--t) var(--ease), stroke var(--t) var(--ease); }
.mp__road { fill: var(--paper-3); stroke: var(--line); stroke-width: .1; }
.mp__excl { fill: none; stroke: var(--line); stroke-width: .12; stroke-dasharray: .6 .5; }
.mp__num { font-family: var(--serif); font-size: 2.2px; fill: var(--ink); pointer-events: none;
           text-anchor: middle; dominant-baseline: central; transition: fill var(--t) var(--ease); }
.unit.is-selected .mp__num { fill: var(--terra-deep); font-weight: 600; }
.mp__ntxt { font-family: var(--sans); font-size: 1.15px; letter-spacing: .1px; fill: var(--ink-3); pointer-events: none; }
.mp__north { fill: none; stroke: var(--ink-3); stroke-width: .12; }

.mp__legend { display: flex; gap: var(--s4); flex-wrap: wrap; padding: var(--s3) var(--s4); border-top: 1px solid var(--line); background: var(--surface); }
.mp__lg { display: flex; align-items: center; gap: 8px; font-size: .66rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.mp__sw { width: 14px; height: 10px; border: 1px solid var(--line); }
.mp__sw--lot { background: var(--sage-soft); }
.mp__sw--bld { background: var(--terra); border-color: var(--terra); }
.mp__sw--road { background: var(--paper-3); }
.mp__sw--excl { background: transparent; border-style: dashed; }

.mp__tools { display: flex; gap: var(--s2); flex-wrap: wrap; align-items: center; margin-bottom: var(--s3); }
.chip {
  background: none; border: 1px solid var(--line); cursor: pointer; padding: 7px 13px;
  font-size: .64rem; letter-spacing: .13em; text-transform: uppercase; color: var(--ink-2);
  transition: all var(--t-fast) var(--ease);
}
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }

/* Pannello di anteprima villa */
.mpcard { border: 1px solid var(--line); background: var(--surface); position: sticky; top: 116px; }
.mpcard__empty { padding: var(--s6) var(--s5); text-align: center; color: var(--ink-3); }
.mpcard__hd { padding: var(--s5); border-bottom: 1px solid var(--line); }
.mpcard__n { font-family: var(--serif); font-size: 2.3rem; line-height: 1.04; font-weight: 400; font-variation-settings: 'opsz' 48; }
.mpcard__body { padding: var(--s5); }
.mpcard__ft { padding: var(--s4) var(--s5) var(--s5); border-top: 1px solid var(--line-soft); display: grid; gap: var(--s2); }
.mpcard.is-in { animation: cardIn 380ms var(--ease); }
@keyframes cardIn { from { opacity: 0; transform: translateY(10px); } }

/* Lista unità (mobile + vista Ville) */
.ulist { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.ulist__row {
  display: grid; grid-template-columns: 52px 1fr auto; gap: var(--s3); align-items: center;
  background: var(--surface); padding: var(--s3) var(--s4); cursor: pointer; text-align: left;
  border: 0; width: 100%; transition: background var(--t-fast) var(--ease);
}
.ulist__row:hover, .ulist__row.is-selected { background: var(--paper-2); }
.ulist__n { font-family: var(--serif); font-size: 1.5rem; line-height: 1; }
.ulist__meta { font-size: .72rem; color: var(--ink-3); letter-spacing: .06em; text-transform: uppercase; }
.ulist__price { font-family: var(--serif); font-size: 1.15rem; white-space: nowrap; }

/* Griglia ville */
.vgrid { display: grid; gap: var(--s4); grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.vcard { display: flex; flex-direction: column; cursor: pointer; text-align: left; border: 1px solid var(--line); background: var(--surface); padding: 0; transition: border-color var(--t) var(--ease), transform var(--t) var(--ease); }
.vcard:hover { border-color: var(--ink); transform: translateY(-3px); }
.vcard__thumb { position: relative; aspect-ratio: 4/3; background: var(--paper-2); overflow: hidden; }
.vcard__thumb svg { width: 100%; height: 100%; }
.vcard__body { padding: var(--s4); display: grid; gap: var(--s3); }
.vcard__top { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s3); }
.vcard__n { font-family: var(--serif); font-size: 1.7rem; line-height: 1; }
.vcard__facts { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s2) var(--s3); }
.vcard__f { font-size: .74rem; }
.vcard__f b { display: block; font-size: .6rem; letter-spacing: .13em; text-transform: uppercase; color: var(--ink-3); font-weight: 500; margin-bottom: 2px; }

/* --- DETTAGLIO VILLA ------------------------------------------------------ */
.vd__hd { border-bottom: 1px solid var(--line); padding-block: var(--s5) var(--s6); }
.vd__crumbs { display: flex; gap: 10px; align-items: center; font-size: .66rem; letter-spacing: .13em; text-transform: uppercase; color: var(--ink-3); margin-bottom: var(--s5); flex-wrap: wrap; }
.vd__crumbs button { background: none; border: 0; padding: 0; cursor: pointer; color: var(--ink-3); letter-spacing: inherit; text-transform: inherit; font-size: inherit; }
.vd__crumbs button:hover { color: var(--terra); }
.vd__title { display: flex; align-items: flex-end; gap: var(--s5); flex-wrap: wrap; justify-content: space-between; }
.vd__no { font-family: var(--serif); font-size: clamp(2.6rem, 7vw, 5.2rem); line-height: .95; font-weight: 400; font-variation-settings: 'opsz' 96; }
.vd__tags { display: flex; gap: var(--s2); flex-wrap: wrap; margin-top: var(--s3); }
.vd__price { text-align: right; }
.vd__price b { font-family: var(--serif); font-weight: 400; font-size: clamp(1.7rem, 3.6vw, 2.6rem); line-height: 1.04; display: block; font-variant-numeric: tabular-nums; }

.vd__nav { display: flex; gap: var(--s2); border-bottom: 1px solid var(--line); overflow-x: auto; position: sticky; top: 98px; background: var(--paper); z-index: 40; }
.vd__nav button {
  background: none; border: 0; border-bottom: 2px solid transparent; cursor: pointer;
  padding: 14px 4px; margin-right: var(--s4); white-space: nowrap;
  font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3);
  transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.vd__nav button:hover { color: var(--ink); }
.vd__nav button[aria-current="true"] { color: var(--ink); border-bottom-color: var(--terra); }

.vd__hero { position: relative; aspect-ratio: 16/9; background: var(--paper-2); overflow: hidden; }
.vd__hero img { width: 100%; height: 100%; object-fit: cover; }

.planbox { border: 1px solid var(--line); background: var(--surface); }
.planbox__img { position: relative; background: #fff; cursor: zoom-in; display: block; width: 100%; border: 0; padding: 0; }
.planbox__img img { width: 100%; height: auto; }
.planbox__ft { padding: var(--s3) var(--s4); border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: var(--s3); align-items: center; flex-wrap: wrap; }

.roomlist { display: flex; flex-wrap: wrap; gap: var(--s2); }
.roomlist li { list-style: none; }
.feature-list { margin: 0; padding-left: 1.2rem; color: var(--ink-2); }
.feature-list li + li { margin-top: 6px; }

/* --- CONFIGURATORE -------------------------------------------------------- */
.cfg { display: grid; gap: var(--s5); }
@media (min-width: 1000px) { .cfg { grid-template-columns: minmax(0,1fr) 360px; gap: var(--s7); align-items: start; } }
.cfg__cat + .cfg__cat { margin-top: var(--s6); }
.cfg__cathd { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s3); border-bottom: 1px solid var(--line); padding-bottom: var(--s3); margin-bottom: var(--s4); flex-wrap: wrap; }
.opts { display: grid; gap: var(--s3); grid-template-columns: repeat(auto-fill, minmax(min(100%, 156px), 1fr)); }
.opt {
  border: 1px solid var(--line); background: var(--surface); cursor: pointer; padding: 0;
  text-align: left; transition: border-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
  display: flex; flex-direction: column;
}
.opt:hover { border-color: var(--ink); transform: translateY(-2px); }
.opt[aria-pressed="true"] { border-color: var(--terra); border-width: 2px; }
.opt__sw { height: 78px; position: relative; }
.opt__sw--img { width: 100%; object-fit: cover; }
.opt[aria-pressed="true"] .opt__sw::after {
  content: '✓'; position: absolute; right: 8px; top: 8px; color: #fff;
  background: var(--terra); width: 20px; height: 20px; border-radius: 50%;
  display: grid; place-items: center; font-size: .68rem; line-height: 1;
  box-shadow: 0 1px 6px rgba(0,0,0,.28);
}
.opt__b { padding: 10px 12px 12px; display: grid; gap: 3px; }
.opt__n { font-size: .78rem; font-weight: 500; }
.opt__h { font-size: .68rem; color: var(--ink-3); }
.opt__d { font-size: .68rem; color: var(--ink-2); font-variant-numeric: tabular-nums; margin-top: 3px; }

.cfg__locked { display: grid; gap: var(--s2); margin-top: var(--s6); }
.cfg__lockrow { display: flex; gap: var(--s3); align-items: baseline; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--line-soft); flex-wrap: wrap; opacity: .72; }

/* Riepilogo prezzo */
.sum { border: 1px solid var(--line); background: var(--surface); position: sticky; top: 116px; }
.sum__hd { padding: var(--s4) var(--s5); border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: baseline; gap: var(--s3); }
.sum__body { padding: var(--s4) var(--s5); }
.sum__line { display: flex; justify-content: space-between; gap: var(--s3); padding: 9px 0; font-size: .82rem; border-bottom: 1px solid var(--line-soft); }
.sum__line span:first-child { color: var(--ink-2); }
.sum__line b { font-weight: 500; font-variant-numeric: tabular-nums; }
.sum__tot { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s3); padding-top: var(--s4); margin-top: var(--s3); border-top: 1px solid var(--ink); }
.sum__tot b { font-family: var(--serif); font-weight: 400; font-size: 1.9rem; line-height: 1.06; font-variant-numeric: tabular-nums; }
.sum__tot b.is-flash { animation: flash 620ms var(--ease); }
@keyframes flash { 0% { color: var(--terra); } 100% { color: inherit; } }
.sum__ft { padding: var(--s4) var(--s5) var(--s5); display: grid; gap: var(--s2); border-top: 1px solid var(--line-soft); }

/* --- GALLERY -------------------------------------------------------------- */
.gal { display: grid; gap: var(--s3); grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.gal__item { border: 0; padding: 0; background: none; cursor: pointer; text-align: left; }
.gal__item .figure { aspect-ratio: 4/3; border: 1px solid var(--line); }
.gal__item .ph { aspect-ratio: 4/3; }
.gal__item:hover .figure { border-color: var(--ink); }

/* Visita virtuale */
.vv { position: relative; border: 1px solid var(--line); background: var(--surface); overflow: hidden; }
.vv__stage { position: relative; aspect-ratio: 16/10; background: var(--paper-2); }
.vv__stage img { width: 100%; height: 100%; object-fit: cover; }
.vv__ui { position: absolute; inset: auto 0 0 0; display: flex; justify-content: space-between; align-items: center; gap: var(--s3); padding: var(--s3) var(--s4); background: linear-gradient(to top, rgba(15,13,11,.8), transparent); color: #fff; }
.vv__nav { display: flex; gap: var(--s2); }
.vv__btn { width: 42px; height: 42px; border: 1px solid rgba(255,255,255,.5); background: rgba(0,0,0,.25); color: #fff; cursor: pointer; display: grid; place-items: center; transition: all var(--t-fast) var(--ease); }
.vv__btn:hover { background: #fff; color: #111; }
.vv__dots { display: flex; gap: 6px; align-items: center; }
.vv__dot { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.4); border: 0; padding: 0; cursor: pointer; }
.vv__dot[aria-current="true"] { background: #fff; width: 22px; border-radius: 4px; }
.vv__cap { font-size: .72rem; color: rgba(255,255,255,.86); max-width: 46ch; }

/* --- FORM / PANNELLI ------------------------------------------------------ */
.scrim { position: fixed; inset: 0; background: var(--overlay); z-index: 300; opacity: 0; pointer-events: none; transition: opacity var(--t) var(--ease); backdrop-filter: blur(3px); }
.scrim.is-open { opacity: 1; pointer-events: auto; }
.panel {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(520px, 100%); z-index: 310;
  background: var(--paper); border-left: 1px solid var(--line);
  transform: translateX(100%); transition: transform var(--t-slow) var(--ease);
  display: flex; flex-direction: column;
}
.panel.is-open { transform: none; }
.panel__hd { padding: var(--s5) var(--s5) var(--s4); border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: flex-start; gap: var(--s3); }
.panel__body { padding: var(--s5); overflow-y: auto; flex: 1; }
.iclose { background: none; border: 1px solid var(--line); width: 38px; height: 38px; cursor: pointer; display: grid; place-items: center; flex: none; transition: all var(--t-fast) var(--ease); }
.iclose:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.field { display: grid; gap: 6px; margin-bottom: var(--s4); }
.field label { font-size: .64rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.field input, .field select, .field textarea {
  background: var(--surface); border: 1px solid var(--line); padding: 12px 14px; font-size: .9rem;
  border-radius: 0; transition: border-color var(--t-fast) var(--ease); width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--ink); outline: none; }
.field textarea { resize: vertical; min-height: 96px; }
.field--err input, .field--err select { border-color: var(--st-todo); }
.field__err { font-size: .7rem; color: var(--st-todo); }
.fields2 { display: grid; gap: 0 var(--s3); }
@media (min-width: 520px) { .fields2 { grid-template-columns: 1fr 1fr; } }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: .76rem; color: var(--ink-2); line-height: 1.5; }
.consent input { width: 17px; height: 17px; margin-top: 2px; flex: none; }

.success { text-align: center; padding: var(--s7) var(--s4); display: grid; gap: var(--s4); place-items: center; }
.success__mark { width: 62px; height: 62px; border: 1px solid var(--terra); border-radius: 50%; display: grid; place-items: center; color: var(--terra); font-size: 1.5rem; animation: pop 520ms var(--ease); }
@keyframes pop { from { transform: scale(.5); opacity: 0; } }

/* --- LIGHTBOX ------------------------------------------------------------- */
.lb { position: fixed; inset: 0; z-index: 400; background: rgba(12,10,9,.94); display: none; flex-direction: column; }
.lb.is-open { display: flex; animation: fade var(--t) var(--ease); }
@keyframes fade { from { opacity: 0; } }
.lb__top { display: flex; justify-content: space-between; align-items: center; padding: var(--s4) var(--gut); color: #fff; gap: var(--s3); }
.lb__body { flex: 1; display: grid; place-items: center; padding: 0 var(--gut) var(--s4); min-height: 0; }
.lb__body img { max-width: 100%; max-height: 100%; object-fit: contain; background: #fff; }
.lb__ft { padding: var(--s3) var(--gut) var(--s5); color: rgba(255,255,255,.8); display: flex; justify-content: space-between; gap: var(--s4); align-items: center; flex-wrap: wrap; }
.lb__arrows { display: flex; gap: var(--s2); }
.lb .iclose, .lb .vv__btn { border-color: rgba(255,255,255,.45); color: #fff; }
.lb .iclose:hover { background: #fff; color: #111; }

/* --- PAGINA STATO DATI ---------------------------------------------------- */
.issue { border: 1px solid var(--line); background: var(--surface); padding: var(--s5); display: grid; gap: var(--s3); }
.issue__hd { display: flex; gap: var(--s3); align-items: center; flex-wrap: wrap; }
.issue__q { border-left: 2px solid var(--terra); padding-left: var(--s4); font-size: .84rem; color: var(--ink); }
.dtable { width: 100%; border-collapse: collapse; font-size: .82rem; min-width: 760px; }
.dtable th, .dtable td { text-align: left; padding: 11px var(--s3); border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.dtable th { font-size: .62rem; letter-spacing: .13em; text-transform: uppercase; color: var(--ink-3); font-weight: 500; border-bottom-color: var(--line); }
.dtable tbody tr:hover { background: var(--paper-2); }
.dtable td.n { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* --- FOOTER --------------------------------------------------------------- */
.foot { border-top: 1px solid var(--line); padding-block: var(--footer-padding) var(--s5); margin-top: var(--s8); background: var(--footer-bg); }
.foot__grid { display: grid; gap: var(--s5); }
@media (min-width: 800px) { .foot__grid { grid-template-columns: repeat(var(--footer-columns, 3), minmax(0, 1fr)); gap: var(--s6); } }
.foot__col h4 { font-size: .64rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 var(--s3); font-weight: 500; }
.foot__col li { list-style: none; font-size: .84rem; color: var(--ink-2); padding: 4px 0; }
.foot__col ul { margin: 0; padding: 0; }
.foot__bot { margin-top: var(--s6); padding-top: var(--s4); border-top: 1px solid var(--line-soft); display: flex; justify-content: space-between; gap: var(--s4); flex-wrap: wrap; font-size: .7rem; color: var(--ink-3); }

/* --- BARRA AZIONI MOBILE -------------------------------------------------- */
.mobar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 70; display: none; gap: 1px; background: var(--line); border-top: 1px solid var(--line); }
.mobar .btn { flex: 1; border: 0; }
@media (max-width: 760px) {
  .mobar.is-on { display: flex; }
  body.has-mobar { padding-bottom: 58px; }
  .vd__nav { top: 90px; }
  .mpcard, .sum { position: static; }
}

/* --- TOOLTIP MASTERPLAN ---------------------------------------------------- */
.mptip {
  position: absolute; z-index: 5; pointer-events: none;
  background: var(--ink); color: var(--paper); padding: 9px 13px;
  display: grid; gap: 2px; min-width: 168px; max-width: 210px;
  opacity: 0; transform: translateY(4px); transition: opacity 140ms var(--ease), transform 140ms var(--ease);
}
.mptip.is-on { opacity: 1; transform: none; }
.mptip b { font-family: var(--serif); font-size: 1.05rem; font-weight: 400; line-height: 1.1; }
.mptip span { font-size: .62rem; letter-spacing: .1em; text-transform: uppercase; opacity: .68; }
.mptip em { font-style: normal; font-size: .82rem; font-variant-numeric: tabular-nums; margin-top: 3px; }
@media (hover: none) { .mptip { display: none; } }

/* ============================================================================
   ANTEPRIMA v0.3 — media reali, stato futuro, posizione
   ========================================================================== */

/* --- HERO (rev.) ------------------------------------------------------------
   L'hero ospita una sola colonna di testo e un inserto fotografico compatto.
   I numeri chiave sono stati spostati nella fascia sottostante per non
   affollare la composizione. */
.hero { min-height: min(84vh, var(--hero-height)); }
.hero__media img { opacity: .88; }
.hero__grad {
  background:
    linear-gradient(to top, color-mix(in srgb, var(--overlay-color) 86%, transparent) 0%, color-mix(in srgb, var(--overlay-color) 46%, transparent) 34%, color-mix(in srgb, var(--overlay-color) 6%, transparent) 62%, color-mix(in srgb, var(--overlay-color) 30%, transparent) 100%),
    linear-gradient(to right, color-mix(in srgb, var(--overlay-color) 62%, transparent) 0%, color-mix(in srgb, var(--overlay-color) 12%, transparent) 56%, transparent 78%);
}
.hero__in { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s6); }
.hero__col { max-width: min(660px, 58%); }
.hero .display { font-size: clamp(2.3rem, 5.2vw, 4.4rem); line-height: 1.02; text-wrap: balance; }
.hero__lede { max-width: 46ch; margin-top: var(--s4); }
.hero__cta { margin-top: clamp(24px, 3.2vw, 38px); }

.hero__inset {
  flex: none; width: clamp(150px, 15vw, 208px);
  border: 0; padding: 0; background: none; cursor: pointer; text-align: left;
  display: grid; gap: 0; margin-bottom: 6px;
  transition: transform var(--t) var(--ease);
}
.hero__inset img {
  display: block; width: 100%; aspect-ratio: 3/4; object-fit: cover;
  border: 1px solid rgba(255,255,255,.34);
}
.hero__insetcap {
  display: flex; justify-content: space-between; gap: 8px; align-items: baseline;
  background: rgba(255,255,255,.94); color: var(--ink);
  padding: 8px 10px; font-size: .56rem; letter-spacing: .13em; text-transform: uppercase;
}
.hero__insetcap b { font-weight: 600; }
.hero__insetcap span { color: var(--ink-3); font-variant-numeric: tabular-nums; }
.hero__inset:hover { transform: translateY(-3px); }
.hero__inset:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

/* --- FASCIA NUMERI CHIAVE --------------------------------------------------- */
.kfig { background: var(--ink); color: #fff; }
.kfig__in {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: var(--s4); padding-block: clamp(22px, 3vw, 34px);
}
.kfig .hero__fact b { color: #fff; }
.kfig .hero__fact span { color: rgba(255,255,255,.56); }
@media (max-width: 760px) { .kfig__in { grid-template-columns: repeat(2, 1fr); gap: var(--s5) var(--s4); } }

/* --- CONFRONTO STATO ATTUALE / STATO FUTURO --------------------------------- */
.ba { display: grid; gap: var(--s3); }
.ba__switch {
  display: inline-flex; border: 1px solid var(--line); background: var(--surface);
  padding: 3px; gap: 3px; width: fit-content;
}
.ba__btn {
  border: 0; background: none; cursor: pointer; font: inherit; color: var(--ink-2);
  font-size: .64rem; letter-spacing: .13em; text-transform: uppercase;
  padding: 8px 14px; transition: all var(--t-fast) var(--ease);
}
.ba__btn:hover { color: var(--ink); }
.ba__btn[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.ba__stage {
  position: relative; aspect-ratio: 4/5; overflow: hidden;
  background: var(--paper-2); border: 1px solid var(--line);
}
.ba__stage img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ba__cap { font-size: .74rem; color: var(--ink-3); line-height: 1.55; margin: 0; max-width: 52ch; }
@media (min-width: 900px) { .ba__stage { aspect-ratio: 4/4.4; } }

/* --- GRIGLIA STATO FUTURO --------------------------------------------------- */
.fsgrid { display: grid; gap: var(--s3); grid-template-columns: 1fr; }
.fsgrid__big, .fsgrid__s { border: 0; padding: 0; background: none; cursor: pointer; display: block; }
.fsgrid__big .figure { aspect-ratio: 4/3; border: 1px solid var(--line); }
.fsgrid__side { display: grid; gap: var(--s3); grid-template-columns: 1fr 1fr; }
.fsgrid__s .figure { aspect-ratio: 4/3; border: 1px solid var(--line); }
.fsgrid__big:hover .figure, .fsgrid__s:hover .figure { border-color: var(--terra); }
@media (min-width: 900px) {
  .fsgrid { grid-template-columns: 1.62fr 1fr; height: clamp(430px, 44vw, 600px); }
  .fsgrid__side { grid-template-columns: 1fr; grid-template-rows: 1fr 1fr; min-height: 0; }
  .fsgrid__big, .fsgrid__s { min-height: 0; }
  .fsgrid__big .figure, .fsgrid__s .figure { aspect-ratio: auto; height: 100%; }
}

/* --- STRISCIA FOTOGRAFICA --------------------------------------------------- */
.strip {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 1fr);
  gap: var(--s3); overflow-x: auto; overscroll-behavior-x: contain;
  max-width: var(--page); margin-inline: auto;
  padding: 0 var(--gut) var(--s3); scroll-snap-type: x proximity;
  scrollbar-width: thin;
}
.strip__i {
  border: 0; padding: 0; background: none; cursor: pointer; text-align: left;
  scroll-snap-align: start; display: grid; gap: 8px; align-content: start;
  grid-template-rows: auto auto;
}
.strip__i .figure { aspect-ratio: 3/4; width: 100%; align-self: start; border: 1px solid var(--line); }
.strip__i:hover .figure { border-color: var(--ink); }
.strip__cap { font-size: .68rem; letter-spacing: .06em; color: var(--ink-3); }
@media (min-width: 1100px) { .strip { grid-auto-columns: minmax(0, 1fr); overflow: visible; } }

/* --- POSIZIONE / SEGNAPOSTO CARTOGRAFICO ------------------------------------ */
.mapbox {
  position: relative; overflow: hidden; min-height: 380px;
  border: 1px solid var(--line); background: var(--surface-2);
  display: flex; align-items: flex-end;
}
.mapbox__grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: radial-gradient(120% 100% at 50% 40%, #000 40%, transparent 100%);
  -webkit-mask-image: radial-gradient(120% 100% at 50% 40%, #000 40%, transparent 100%);
}
.mapbox__pin { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); }
.mapbox__pin span {
  display: block; width: 13px; height: 13px; border-radius: 50%;
  background: var(--terra); box-shadow: 0 0 0 6px rgba(168,90,56,.18);
}
.mapbox__pin em {
  position: absolute; left: 50%; top: 50%; width: 66px; height: 66px; margin: -33px 0 0 -33px;
  border: 1px solid var(--terra); border-radius: 50%; opacity: .5;
}
.mapbox__in { position: relative; padding: var(--s5); }
.mapbox__addr { font-family: var(--serif); font-size: 1.22rem; margin-top: 8px; }

/* --- SEQUENZA DI NAVIGAZIONE ------------------------------------------------ */
.flow { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.flow__i {
  display: grid; grid-template-columns: 42px 1fr; gap: var(--s3);
  padding: 13px 0; border-bottom: 1px solid var(--line-soft); align-items: start;
}
.flow__n {
  font-family: var(--serif); font-size: .84rem; color: var(--terra);
  font-variant-numeric: tabular-nums; padding-top: 2px;
}
.flow__i b { display: block; font-size: .9rem; font-weight: 600; }
.flow__i .small { display: block; margin-top: 3px; color: var(--ink-3); }

/* --- GALLERY (rev.) --------------------------------------------------------- */
.gal__item .figure { aspect-ratio: 3/4; }
.gal__item.is-fs .figure { border-color: rgba(168,90,56,.42); }
.gal__item:focus-visible { outline: 2px solid var(--terra); outline-offset: 3px; }

/* --- LIGHTBOX (rev.) -------------------------------------------------------- */
.lb__body { position: relative; }

/* --- MASTERPLAN (rev.) ------------------------------------------------------
   Presentazione digitale, non riproduzione di una tavola stampata: fondo
   neutro, etichette leggibili, marcatori V01–V13 sempre distinguibili. */
.mp__stage { background: var(--surface); }
.mp__stage::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 40px 40px; opacity: .55;
}
.mp__svg { position: relative; }
.mp__num {
  paint-order: stroke fill; stroke: var(--surface); stroke-width: .5px; stroke-linejoin: round;
  font-family: var(--sans); font-size: 1.75px; font-weight: 600; letter-spacing: .12px;
}
.unit.is-hover .mp__num, .unit.is-selected .mp__num { stroke-width: .7px; }
.mp__ntxt { paint-order: stroke fill; stroke: var(--surface); stroke-width: .45px; stroke-linejoin: round; }
.unit:focus-visible .lot { stroke: var(--terra); stroke-width: .34; outline: none; }
.unit { outline: none; }
.mp__legend { font-size: .64rem; letter-spacing: .1em; text-transform: uppercase; }

/* --- MOBILE / TABLET -------------------------------------------------------- */
@media (max-width: 1000px) {
  .hero__in { flex-direction: column; align-items: flex-start; }
  .hero__col { max-width: 100%; }
  /* L'inserto diventa una riga compatta: resta leggibile e non finisce sotto
     la barra azioni fissa. */
  .hero__inset {
    width: auto; display: flex; align-items: stretch; gap: 0; margin: var(--s5) 0 0;
    border: 1px solid rgba(255,255,255,.3); background: rgba(12,10,9,.42);
    backdrop-filter: blur(6px);
  }
  .hero__inset img { width: 66px; aspect-ratio: 3/4; border: 0; }
  .hero__insetcap {
    background: none; color: #fff; flex-direction: row; align-items: center;
    gap: 12px; padding: 8px 14px; font-size: .55rem; white-space: nowrap;
  }
  .hero__insetcap span { color: rgba(255,255,255,.6); }
  .hero__inset:hover { transform: none; }
}
@media (max-width: 760px) {
  .hero { min-height: clamp(600px, 86svh, 760px); }
  .hero__inset { width: 116px; }
  .hero__insetcap { font-size: .5rem; padding: 6px 8px; flex-direction: column; gap: 2px; }
  .stamp { font-size: .52rem; padding: 6px 9px; letter-spacing: .1em; }
  .stamp--hero { max-width: 62%; }
  .fsgrid__side { grid-template-columns: 1fr; }
  .ba__stage { aspect-ratio: 3/4; }
  .mapbox { min-height: 300px; }
  .strip { grid-auto-columns: minmax(190px, 78%); }
}
@media (max-width: 480px) {
  .ba__switch { width: 100%; }
  .ba__btn { flex: 1; padding: 9px 6px; font-size: .58rem; }
  .kfig__in { grid-template-columns: 1fr 1fr; }
}

/* --- Correzioni mobile mirate ----------------------------------------------- */
.protobar__l strong { white-space: nowrap; }
body.has-mobar .hero__in { padding-bottom: calc(58px + clamp(28px, 5vw, 48px)); }

@media (max-width: 760px) {
  .hero__inset img { width: 58px; }
  .hero__insetcap { flex-direction: column; align-items: flex-start; gap: 3px; padding: 8px 12px; font-size: .52rem; }
}
.protobar__l { flex: 1 1 auto; min-width: 0; overflow: hidden; }
.mobar { background: var(--line); }
.mobar .btn--ghost { background: var(--surface); }
.mobar .btn--primary { background: var(--ink); color: var(--paper); }
@media (max-width: 420px) { .protobar__l strong { font-size: .58rem; } }
/* Sotto i 560px la barra ospita solo l'etichetta di versione e i due
   interruttori: «Questioni aperte» resta raggiungibile da footer e menu. */
@media (max-width: 560px) {
  .protobar__r button:first-child { display: none; }
  .protobar__l { overflow: visible; }
}

/* Verifica responsive V3: i contenuti editoriali lunghi possono andare a
   capo senza modificare la struttura grafica o creare overflow orizzontale. */
.navdrawer { min-height: 100dvh; max-height: 100dvh; overflow-y: auto; overscroll-behavior: contain; }
.navdrawer > * { flex-shrink: 0; }
.mobar { padding-bottom: env(safe-area-inset-bottom); }
body.has-mobar { padding-bottom: calc(58px + env(safe-area-inset-bottom)); }

@media (max-width: 760px) {
  .nav__in { height: 62px; }
  .nav__burger, .navdrawer .nav__link, .hero__cta .btn, .mobar .btn,
  .vd__tab, .chip, .iclose, .vv__btn, .field input, .field select {
    min-height: 44px;
  }
  .navdrawer { padding-top: max(var(--s5), env(safe-area-inset-top)); padding-bottom: max(var(--s5), env(safe-area-inset-bottom)); }
  .navdrawer a, .navdrawer button.nav__link { font-size: clamp(1.45rem, 8vw, 2rem); }
  .hero__in { padding-bottom: calc(38px + env(safe-area-inset-bottom)); }
  body.has-mobar .hero__in { padding-bottom: calc(82px + env(safe-area-inset-bottom)); }
  .hero__facts { gap: 18px 28px; }
  .hero__fact { min-width: calc(50% - 18px); }
  .vd__nav { top: 62px; margin-inline: calc(-1 * var(--gut)); padding-inline: var(--gut); scrollbar-width: none; }
  .vd__nav::-webkit-scrollbar { display: none; }
  .vd__price { text-align: left; width: 100%; }
  .vd__price > div { justify-content: flex-start !important; }
  .vd__hero { aspect-ratio: 4/3; }
  .kv__row { grid-template-columns: 1fr; gap: 5px; }
  .ulist__row { grid-template-columns: 44px minmax(0, 1fr); }
  .ulist__price { grid-column: 2; font-size: 1rem; }
  .mp__svg { height: clamp(340px, 58svh, 520px); }
  .mpcard, .sum { position: static; }
  .opts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cfg__lockrow { display: grid; }
  .foot__grid { gap: var(--s6); }
  .lb__body { padding-inline: var(--s3); }
  .display, .h1, .h2, .h3, .lede, .body, .vcard, .mpcard, .sum, .foot { overflow-wrap: anywhere; }
}

@media (max-width: 430px) {
  :root { --gut: var(--mobile-gutter); }
  .section { padding-block: var(--mobile-section-space); }
  .section--tight { padding-block: 38px; }
  .hero { min-height: min(var(--mobile-hero-height), 92svh); }
  .hero__cta { display: grid; width: 100%; }
  .hero__cta .btn { width: 100%; white-space: normal; }
  .hero__facts { display: grid; grid-template-columns: 1fr 1fr; }
  .hero__fact { min-width: 0; }
  .hero__inset { max-width: 100%; width: auto; }
  .hero__insetcap { white-space: normal; }
  .vcard__facts { grid-template-columns: 1fr; }
  .opts { grid-template-columns: 1fr; }
  .opt { display: grid; grid-template-columns: 96px 1fr; }
  .opt__sw { width: 96px; height: 100%; min-height: 92px; }
  .sum__hd, .sum__line, .sum__tot { align-items: flex-start; }
  .sum__line { flex-direction: column; gap: 2px; }
  .mobar .btn { padding-inline: 10px; font-size: .62rem; white-space: normal; }
  .figure__cap { align-items: flex-start; }
}

/* ============================================================================
   HERO · CAROSELLO IMMAGINI
   ----------------------------------------------------------------------------
   Aggiunta non distruttiva. Nessuna regola precedente è stata modificata: con
   una sola immagine il markup resta `.hero__media > img` e nulla di quanto
   segue si applica. L'altezza, l'overlay, la tipografia, l'inserto e il
   comportamento responsive dell'hero non cambiano.
   ========================================================================== */

/* Le diapositive si sovrappongono nello stesso riquadro: nessuna di esse
   occupa spazio nel flusso, quindi non c'è alcuno spostamento di layout. */
.hero__slide { position: absolute; inset: 0; opacity: 0; transition: opacity 900ms var(--ease); }
.hero__slide.is-active { opacity: 1; }

/* L'immagine conserva `opacity` e `object-fit` dalle regole esistenti di
   `.hero__media img`: la dissolvenza agisce sul contenitore, così il risultato
   finale è identico a quello della singola immagine. */
.hero__media--carousel .hero__slide img { animation: none; transform: scale(1.04); }
.hero__media--carousel .hero__slide.is-active img { animation: heroIn 2.4s var(--ease) forwards; }

/* Indicatori: dentro la colonna di testo, sotto le CTA. Non introducono un
   livello sovrapposto e non possono collidere con l'inserto, con la barra
   azioni mobile o con le aree sicure. */
.hero__dots { display: flex; gap: 10px; align-items: center; margin-top: clamp(18px, 2.4vw, 28px); }
.hero__dot {
  appearance: none; -webkit-appearance: none; border: 0; background: none;
  width: 34px; padding: 9px 0; cursor: pointer; display: block;
}
.hero__dot::before {
  content: ''; display: block; height: 2px;
  background: rgba(255,255,255,.34);
  transition: background var(--t) var(--ease);
}
.hero__dot:hover::before { background: rgba(255,255,255,.7); }
.hero__dot.is-on::before { background: #fff; }
.hero__dot:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

@media (max-width: 760px) {
  /* Bersaglio tattile conforme, senza alterare l'ingombro visivo. */
  .hero__dot { width: 30px; padding: 21px 0; }
  .hero__dots { gap: 8px; margin-top: clamp(14px, 3vw, 22px); }
}

@media (prefers-reduced-motion: reduce) {
  .hero__slide { transition: none; }
  .hero__media--carousel .hero__slide.is-active img { animation: none; transform: none; }
}

/* ============================================================================
   HERO · MOBILE — fotografia libera, testo e CTA sotto l'immagine
   ----------------------------------------------------------------------------
   Solo sotto i 760px. Su mobile la fotografia non è più coperta: occupa un
   riquadro 3:2 a tutta larghezza e testo, CTA e indicatori seguono sotto, nel
   flusso, sul fondo scuro dell'hero. Desktop e tablet non cambiano.
   `html body` alza la specificità sopra le regole `!important` del CSS
   personalizzato del CMS (altezza 62svh e `contain`), che vengono iniettate
   dopo questo file; il CSS del CMS resta invariato.
   ========================================================================== */
@media (max-width: 760px) {
  html body .hero {
    flex-direction: column; align-items: stretch;
    height: auto !important; min-height: 0 !important;
  }
  html body .hero .hero__media { position: relative; inset: auto; flex: none; width: 100%; aspect-ratio: 3 / 2; }
  html body .hero .hero__media img { object-fit: cover !important; opacity: 1; }
  html body .hero .hero__grad { display: none; }
  html body .hero .hero__in,
  html body.has-mobar .hero .hero__in { padding-top: var(--s6); padding-bottom: var(--s5); }
}

/* ============================================================================
   ETICHETTE E ANNOTAZIONI — rimosse dal sito pubblico
   ----------------------------------------------------------------------------
   Badge, etichette e timbri (qualsiasi colore) non vengono più mostrati:
   `.tag` (es. «Visualizzazioni · non fotografie», «6 unità», «Tip. A»,
   «Tipologia B»), `.stamp` (timbri sopra le immagini) e `.dv__badge`
   (indicatori di stato del dato). Si nascondono anche i contenitori che
   restano vuoti, per non lasciare spazi. Fotografie, planimetrie e immagini
   tecniche non cambiano.
   ========================================================================== */
.tag, .stamp, .dv__badge { display: none !important; }
.roomlist, .vd__tags { display: none !important; }
.row:not(:has(> :not(.tag))) { display: none !important; }

/* ============================================================================
   «PROSSIMO PASSO» — contrasto in modalità scura
   ----------------------------------------------------------------------------
   La sezione (views.js ctaBand, villa.js #sec-contatto) ha sfondo
   var(--paper-2), che in modalità scura diventa #191B16; i colori di testo e
   pulsanti impostati dal CMS restano invece quelli chiari del tema, quindi
   scuro su scuro. Qui si schiariscono solo testo e pulsanti di questa sezione
   e solo in modalità scura: in modalità chiara non cambia nulla.
   ========================================================================== */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .section[style*="background:var(--paper-2)"] .eyebrow { color: #EDEDE4; }
  :root:not([data-theme="light"]) .section[style*="background:var(--paper-2)"] .h1 { color: #F4F4EE; }
  :root:not([data-theme="light"]) .section[style*="background:var(--paper-2)"] .body { color: #C9CCC2; }
  :root:not([data-theme="light"]) .section[style*="background:var(--paper-2)"] .btn--primary { --bg: #F4F4EE; --fg: #141210; --bd: #F4F4EE; }
  :root:not([data-theme="light"]) .section[style*="background:var(--paper-2)"] .btn--primary:hover { --bg: transparent; --fg: #F4F4EE; --bd: #F4F4EE; }
  :root:not([data-theme="light"]) .section[style*="background:var(--paper-2)"] .btn--ghost { --fg: #EDEDE4; --bd: rgba(237, 237, 228, 0.7); }
  :root:not([data-theme="light"]) .section[style*="background:var(--paper-2)"] .btn--ghost:hover { --bg: #EDEDE4; --fg: #141210; --bd: #EDEDE4; }
  :root:not([data-theme="light"]) .section[style*="background:var(--paper-2)"] .btn:focus-visible { outline: 2px solid #F4F4EE; outline-offset: 3px; }
}
:root[data-theme="dark"] .section[style*="background:var(--paper-2)"] .eyebrow { color: #EDEDE4; }
:root[data-theme="dark"] .section[style*="background:var(--paper-2)"] .h1 { color: #F4F4EE; }
:root[data-theme="dark"] .section[style*="background:var(--paper-2)"] .body { color: #C9CCC2; }
:root[data-theme="dark"] .section[style*="background:var(--paper-2)"] .btn--primary { --bg: #F4F4EE; --fg: #141210; --bd: #F4F4EE; }
:root[data-theme="dark"] .section[style*="background:var(--paper-2)"] .btn--primary:hover { --bg: transparent; --fg: #F4F4EE; --bd: #F4F4EE; }
:root[data-theme="dark"] .section[style*="background:var(--paper-2)"] .btn--ghost { --fg: #EDEDE4; --bd: rgba(237, 237, 228, 0.7); }
:root[data-theme="dark"] .section[style*="background:var(--paper-2)"] .btn--ghost:hover { --bg: #EDEDE4; --fg: #141210; --bd: #EDEDE4; }
:root[data-theme="dark"] .section[style*="background:var(--paper-2)"] .btn:focus-visible { outline: 2px solid #F4F4EE; outline-offset: 3px; }

/* ============================================================================
   GALLERY — didascalie
   ----------------------------------------------------------------------------
   Sotto le fotografie non compare più alcuna didascalia (titolo e categoria).
   Le planimetrie (`.gal__item.is-plan`, impostata in gallery.js per la
   categoria ELABORATI) conservano il solo titolo. Si usa visibility e non
   display, così ogni voce mantiene la stessa altezza e la griglia non cambia.
   ========================================================================== */
.gal__item:not(.is-plan) .figure__cap { visibility: hidden; }
.gal__item.is-plan .figure__cap > span + span { visibility: hidden; }
