/* --------------------------------------------------------------------------
   solocasebelle.it — public site styles
   Palette: bottle green + warm off-white
   -------------------------------------------------------------------------- */
:root {
  --c-bg: #F8F6F1;
  --c-bg-alt: #EFEAE0;
  --c-ink: #1A1A1A;
  --c-ink-soft: #3a3a3a;
  --c-muted: #7A7A7A;
  --c-line: #d8d2c4;
  --c-primary: #1F3A2E;
  --c-primary-2: #3B6B52;
  --c-primary-ink: #F8F6F1;
  --c-accent: #B68B4A;
  --c-danger: #8a3027;
  --c-success: #2d6a4f;

  --r-sm: 4px;
  --r-md: 10px;
  --r-lg: 18px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,.08), 0 2px 4px rgba(0,0,0,.04);
  --shadow-lg: 0 18px 40px rgba(0,0,0,.14);

  --container: 1200px;
  --container-narrow: 880px;

  --f-serif: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  --f-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  --header-h: 76px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--f-sans);
  font-size: 18px;
  line-height: 1.65;
  color: var(--c-ink);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--c-primary); }
a:hover { color: var(--c-primary-2); }

h1, h2, h3, h4 {
  font-family: var(--f-serif);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.15;
  color: var(--c-ink);
}
h1 { font-size: clamp(2rem, 4.5vw, 3.4rem); margin: 0 0 .4em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); margin: 0 0 .5em; }
h3 { font-size: 1.4rem; margin: 0 0 .4em; }
h4 { font-size: 1.1rem; margin: 0 0 .35em; }

p { margin: 0 0 1em; }
.muted { color: var(--c-muted); }
.lead { font-size: 1.15rem; color: var(--c-ink-soft); }

.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 500;
  font-size: 0.95rem;
  text-decoration: none;
  transition: transform .15s ease, background-color .2s ease, color .2s ease, border-color .2s ease;
  border: 1px solid transparent;
  cursor: pointer;
  letter-spacing: .02em;
}
.btn--primary { background: var(--c-primary); color: var(--c-primary-ink); }
.btn--primary:hover { background: var(--c-primary-2); color: var(--c-primary-ink); }
.btn--ghost { background: transparent; color: var(--c-primary-ink); border-color: rgba(248,246,241,.4); }
.btn--ghost:hover { background: rgba(248,246,241,.12); color: var(--c-primary-ink); }
.btn--outline { background: transparent; color: var(--c-primary); border-color: var(--c-primary); }
.btn--outline:hover { background: var(--c-primary); color: var(--c-primary-ink); }
.btn:active { transform: translateY(1px); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(248,246,241,.92);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--c-line);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--c-primary); }
.brand__logo { display: block; line-height: 0; }
.brand__logo img {
  display: block;
  height: 56px;
  width: auto;
  max-width: 240px;
  object-fit: contain;
}
@media (max-width: 600px) {
  .brand__logo img { height: 44px; max-width: 180px; }
}

.primary-nav ul { display: flex; gap: 30px; margin: 0; padding: 0; list-style: none; }
.primary-nav a {
  color: var(--c-ink); text-decoration: none; font-size: .92rem; font-weight: 500;
  padding: 6px 0; position: relative;
}
.primary-nav a.is-active::after,
.primary-nav a:hover::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; background: var(--c-primary);
}

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  background: transparent; border: 0; cursor: pointer;
  padding: 0;
}
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--c-ink); margin: 5px auto; transition: transform .25s ease, opacity .25s ease; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .primary-nav {
    position: absolute; top: var(--header-h); left: 0; right: 0;
    background: var(--c-bg);
    border-bottom: 1px solid var(--c-line);
    overflow: hidden;
    max-height: 0;
    transition: max-height .3s ease;
  }
  .primary-nav.is-open { max-height: 500px; }
  .primary-nav ul { flex-direction: column; gap: 0; padding: 12px 24px; }
  .primary-nav li { border-bottom: 1px solid var(--c-line); }
  .primary-nav li:last-child { border-bottom: 0; }
  .primary-nav a { display: block; padding: 14px 0; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: clamp(520px, 78vh, 820px);
  display: flex; align-items: center;
  text-align: center;
  color: var(--c-primary-ink);
  isolation: isolate;
  overflow: hidden;
}
.hero__bg {
  position: absolute; inset: 0;
  z-index: -2;
  background: linear-gradient(135deg, #1F3A2E 0%, #2c5a44 50%, #3B6B52 100%);
}
.hero__bg::after {
  content: '';
  position: absolute; inset: 0;
  background-image:
    radial-gradient(ellipse at 20% 30%, rgba(255,255,255,.08), transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(0,0,0,.25), transparent 60%);
}
.hero--has-image .hero__backdrop { display: none; }
.hero--has-image .hero__bg::after { display: none; }
.hero--has-image picture.hero__bg { background: #1a1a1a; }
.hero--has-image picture.hero__bg img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 42%;
  filter: brightness(.78) saturate(1.05);
}
/* on wide screens make the hero a bit taller proportionally so the side-crop is minimal */
@media (min-width: 1100px) {
  .hero--has-image { min-height: clamp(560px, calc(100vw / 2.3), 760px); }
}
@media (max-width: 700px) {
  .hero--has-image picture.hero__bg img {
    object-position: center 35%;
  }
}
.hero__overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(0,0,0,.35) 0%, rgba(0,0,0,.20) 35%, rgba(0,0,0,.50) 100%),
    radial-gradient(ellipse 70% 55% at 50% 50%, rgba(0,0,0,.30) 0%, rgba(0,0,0,0) 70%);
  z-index: -1;
}
.hero__content {
  padding: 40px 24px;
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.hero__eyebrow {
  color: rgba(248,246,241,.78);
  letter-spacing: .42em;
  text-transform: uppercase;
  font-size: .72rem;
  font-weight: 500;
  margin: 0 0 28px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255,255,255,.35);
}
.hero__title { color: var(--c-primary-ink); max-width: 920px; font-size: clamp(1.6rem, 3.5vw, 2.6rem); line-height: 1.3; font-weight: 500; }
.hero__title--xl {
  font-family: var(--f-serif, 'Cormorant Garamond', Georgia, serif);
  font-weight: 300;
  font-size: clamp(2.6rem, 7vw, 5.6rem);
  line-height: 1.02;
  letter-spacing: .005em;
  text-transform: none;
  margin: 0 0 28px;
  text-shadow: 0 4px 24px rgba(0,0,0,.45);
  text-wrap: balance;
}
.hero__title--xl strong { font-weight: 500; font-style: italic; }
.hero__slogan {
  color: rgba(248,246,241,.92);
  font-family: var(--f-sans, 'Inter', system-ui, sans-serif);
  font-style: normal;
  font-size: clamp(1rem, 1.5vw, 1.18rem);
  font-weight: 300;
  letter-spacing: .04em;
  max-width: 640px;
  margin: 0;
  text-shadow: 0 1px 8px rgba(0,0,0,.4);
  line-height: 1.55;
}
.hero__cta { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 14px; }

/* page hero (lighter, used on inner pages) */
.page-hero {
  background: var(--c-primary);
  color: var(--c-primary-ink);
  padding: 80px 0 56px;
  position: relative;
  isolation: isolate;
  overflow: hidden;
}
.page-hero h1 { color: var(--c-primary-ink); }
.page-hero .lead { color: rgba(248,246,241,.85); }
.page-hero .eyebrow { color: rgba(248,246,241,.7); letter-spacing: .15em; text-transform: uppercase; font-size: .8rem; margin: 0 0 14px; }
.page-hero a { color: rgba(248,246,241,.9); }

/* Variante con foto di sfondo: --hero-bg viene impostata inline dal template */
.page-hero--photo {
  padding: 120px 0 80px;
  min-height: clamp(280px, 38vh, 460px);
  display: flex;
  align-items: flex-end;
}
.page-hero--photo::before {
  content: '';
  position: absolute; inset: 0;
  z-index: -2;
  background-image: var(--hero-bg);
  background-size: cover;
  background-position: center;
  filter: brightness(.72) saturate(1.05);
}
.page-hero--photo::after {
  content: '';
  position: absolute; inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(0,0,0,.10) 0%, rgba(31,58,46,.20) 35%, rgba(0,0,0,.65) 100%);
}
@media (max-width: 700px) {
  .page-hero--photo { padding: 90px 0 60px; }
}

.page-hero--apt h1 { display: inline; margin-right: 16px; }

/* ---------- Capitolato viewer (full-page) ---------- */
/* La pagina capitolato nasconde il footer globale e il PDF riempie tutto
   lo spazio sotto l'header + una toolbar sottile. */
.page--capitolato { display: flex; flex-direction: column; min-height: 100vh; }
.page--capitolato .site-footer,
.page--capitolato .cta-band { display: none; }
.page--capitolato main { flex: 1 1 auto; display: flex; flex-direction: column; min-height: 0; }
.capitolato-page__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 24px;
  background: var(--c-bg-alt, #f5efe6);
  border-bottom: 1px solid var(--c-line);
  flex-shrink: 0;
}
.capitolato-page__title {
  font-family: var(--f-serif, Georgia, serif);
  font-size: 1.2rem;
  font-weight: 500;
  margin: 0;
  color: var(--c-text);
}
.capitolato-page__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.capitolato-page__frame {
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  border: 0;
  display: block;
  background: #2a2a2a;
}
@media (max-width: 700px) {
  .capitolato-page__toolbar { flex-direction: column; align-items: stretch; gap: 8px; padding: 10px 16px; }
  .capitolato-page__title { font-size: 1.05rem; }
}

/* ---------- Sections ---------- */
.section { padding: 72px 0; }
.section--alt { background: var(--c-bg-alt); }
.section__title {
  font-family: var(--f-serif, 'Cormorant Garamond', Georgia, serif);
  font-weight: 400;
  font-size: clamp(2rem, 3.4vw, 3rem);
  letter-spacing: -.005em;
  color: var(--c-text, #1c1816);
  margin: 0 0 14px;
  line-height: 1.08;
  text-align: left;
  max-width: 22ch;
}
.section__title--center { text-align: center; margin-left: auto; margin-right: auto; }
.section__lead {
  color: rgba(17,24,39,.6);
  font-size: 1.04rem;
  font-weight: 400;
  font-style: normal;
  letter-spacing: 0;
  margin: 0 0 40px;
  text-align: left;
  max-width: 56ch;
  line-height: 1.6;
}
.section__lead--center { text-align: center; margin-left: auto; margin-right: auto; }
.section__subtitle { font-size: 1.4rem; margin: 36px 0 16px; }

.eyebrow { letter-spacing: .15em; text-transform: uppercase; font-size: .8rem; color: var(--c-muted); margin: 0 0 14px; }

/* ---------- Prose ---------- */
.prose { max-width: 60ch; }
.prose ul { padding-left: 1.2em; }
.prose li { margin: .25em 0; }

/* ---------- Two col ---------- */
.two-col { display: grid; grid-template-columns: 2fr 1fr; gap: 56px; align-items: start; }
@media (max-width: 800px) {
  .two-col { grid-template-columns: 1fr; gap: 32px; }
}

.info-card {
  background: white;
  border: 1px solid var(--c-line);
  border-radius: var(--r-md);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}
.info-card h3 { margin-top: 0; font-size: 1.05rem; color: var(--c-primary); }
.info-card h3 + p { margin-top: -2px; }
.info-card h3:not(:first-child) { margin-top: 18px; }

/* ---------- Features list ---------- */
.features {
  margin: 36px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px 28px;
}
.features li { padding-left: 0; color: var(--c-ink-soft); }
.features li > span { color: var(--c-primary); margin-right: 8px; }

.values { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 32px; }
.values article h3 { color: var(--c-primary); }

/* ---------- Building grid (home) ---------- */
.building-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 28px; }
.building-card {
  display: flex; flex-direction: column;
  text-decoration: none;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: white;
  border: 1px solid var(--c-line);
  color: var(--c-ink);
  box-shadow: var(--shadow-sm);
  transition: transform .25s ease, box-shadow .25s ease;
}
.building-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.building-card__media { aspect-ratio: 4 / 3; overflow: hidden; background: var(--c-bg-alt); }
.building-card__media img { width: 100%; height: 100%; object-fit: cover; object-position: center 35%; transition: transform .4s ease; }
.building-card:hover .building-card__media img { transform: scale(1.04); }
.building-card__body { padding: 22px 24px 24px; }
.building-card__eyebrow {
  display: inline-block;
  color: var(--c-muted);
  font-size: .78rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 8px;
}
.building-card__status {
  display: inline-block;
  font-size: .78rem; letter-spacing: .12em; text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--c-bg-alt); color: var(--c-primary);
  margin-bottom: 12px;
}
.building-card.is-ready .building-card__status { background: var(--c-primary); color: var(--c-primary-ink); }
.building-card.is-building .building-card__status { background: var(--c-accent); color: white; }
.building-card.is-reserving .building-card__status { background: #2b4a8b; color: white; }
.building-card__title { margin: 0 0 6px; font-size: 1.6rem; }
.building-card__cta { margin: 0; color: var(--c-primary); font-weight: 500; }

/* ---------- Apartment grid + card ---------- */
.apt-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 26px; }
.apt-card {
  position: relative;
  display: flex; flex-direction: column;
  background: white; border: 1px solid var(--c-line); border-radius: var(--r-md);
  overflow: hidden; text-decoration: none; color: var(--c-ink);
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease;
}
.apt-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.apt-card__media { position: relative; aspect-ratio: 4 / 3; background: var(--c-bg-alt); overflow: hidden; }
.apt-card__media img { width: 100%; height: 100%; object-fit: contain; padding: 10px; background: white; }
.apt-card__overlay { position: absolute; top: 12px; right: 12px; }
.apt-card--sold .apt-card__media img { filter: grayscale(.2) opacity(.8); }
.apt-card--sold::after {
  content: ''; position: absolute; inset: 0; background: rgba(255,255,255,.05); pointer-events: none;
}
.apt-card__body { padding: 20px 22px; }
.apt-card__title { margin: 0 0 8px; font-size: 1.3rem; line-height: 1.25; }
.apt-card__meta { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 14px; color: var(--c-muted); font-size: 1rem; }
.apt-card__meta strong { color: var(--c-ink); }

/* ---------- Badge ---------- */
.badge {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: .76rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.badge--available { background: #e6f3ec; color: var(--c-success); }
.badge--reserved { background: #fcf2dc; color: #8a6300; }
.badge--sold { background: #f4dada; color: var(--c-danger); }

/* ---------- Tabs ---------- */
.tabs {
  border: 1px solid var(--c-line);
  border-radius: var(--r-md);
  background: white;
  overflow: hidden;
}
.tabs__nav {
  display: flex;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--c-line);
  background: var(--c-bg-alt);
}
.tabs__nav button {
  flex: 1 1 auto;
  padding: 16px 20px;
  background: transparent;
  border: 0;
  cursor: pointer;
  font-family: var(--f-sans);
  font-weight: 500;
  font-size: .95rem;
  color: var(--c-ink-soft);
  border-right: 1px solid var(--c-line);
  border-bottom: 2px solid transparent;
  transition: background-color .2s ease, color .2s ease;
}
.tabs__nav button:last-child { border-right: 0; }
.tabs__nav button[aria-selected="true"] {
  background: white; color: var(--c-primary); border-bottom-color: var(--c-primary);
}
.tabs__panel { display: none; padding: 32px; }
.tabs__panel.is-active { display: block; }

.building-header { display: flex; align-items: baseline; gap: 14px; margin-bottom: 18px; }
.building-header h3 { margin: 0; }

/* ---------- Forms ---------- */
.form { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: .9rem; }
.field span { font-weight: 500; color: var(--c-ink-soft); }
.field input, .field textarea {
  font: inherit; padding: 12px 14px; border: 1px solid var(--c-line);
  border-radius: var(--r-sm); background: white; color: var(--c-ink);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field input:focus, .field textarea:focus {
  outline: 0; border-color: var(--c-primary); box-shadow: 0 0 0 3px rgba(31,58,46,.12);
}
.field__err { color: var(--c-danger); font-size: .85rem; }
.hp { position: absolute; left: -10000px; }
.alert { padding: 16px 20px; border-radius: var(--r-md); margin-bottom: 18px; }
.alert--ok { background: #e6f3ec; color: var(--c-success); border: 1px solid #b7d8c4; }

/* ---------- Map ---------- */
.map-frame {
  position: relative;
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.map-frame iframe { width: 100%; height: 460px; border: 0; display: block; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--c-primary);
  color: rgba(248,246,241,.85);
  padding: 64px 0 24px;
  margin-top: 0;
}
.cta-band + .site-footer { margin-top: 0; border-top: 1px solid rgba(248,246,241,.10); }
.site-footer h3, .site-footer h4 { color: var(--c-primary-ink); }
.site-footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 36px; }
@media (max-width: 800px) { .site-footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 540px) { .site-footer__grid { grid-template-columns: 1fr; } }
.site-footer a { color: rgba(248,246,241,.9); }
.footer-nav { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.site-footer__bottom { margin-top: 48px; padding-top: 18px; border-top: 1px solid rgba(248,246,241,.15); color: rgba(248,246,241,.6); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; }
.site-footer__powered { color: rgba(248,246,241,.45); font-size: .82rem; letter-spacing: .04em; }
.site-footer__powered a { color: inherit; text-decoration: none; border-bottom: 1px dotted currentColor; }
.site-footer__powered a:hover { color: rgba(248,246,241,.85); }

/* ---------- WhatsApp FAB ---------- */
.whatsapp-fab {
  position: fixed; right: 22px; bottom: 22px;
  width: 56px; height: 56px;
  background: #25d366;
  color: white;
  border-radius: 50%;
  display: grid; place-items: center;
  box-shadow: 0 6px 18px rgba(0,0,0,.2);
  z-index: 100;
  transition: transform .2s ease;
}
.whatsapp-fab:hover { transform: scale(1.07); color: white; }

/* ---------- Anchor nav ---------- */
.anchor-nav {
  position: sticky;
  top: var(--header-h);
  background: rgba(248,246,241,.95);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--c-line);
  z-index: 30;
}
.anchor-nav__inner { display: flex; gap: 28px; padding: 14px 24px; overflow-x: auto; }
.anchor-nav a { color: var(--c-ink-soft); text-decoration: none; font-size: .92rem; font-weight: 500; white-space: nowrap; padding: 6px 0; }
.anchor-nav a:hover { color: var(--c-primary); }

/* ---------- Specs table ---------- */
.specs { width: 100%; border-collapse: collapse; max-width: 720px; }
.specs th, .specs td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--c-line); }
.specs th { width: 36%; color: var(--c-muted); font-weight: 500; }
.specs tr:last-child th, .specs tr:last-child td { border-bottom: 0; }

.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }

/* ---------- Building plan figure ---------- */
.building-plan { margin: 0; }
.building-plan img { background: white; border: 1px solid var(--c-line); border-radius: var(--r-md); padding: 16px; }
.building-plan figcaption { color: var(--c-muted); font-size: .9rem; margin-top: 8px; text-align: center; }

/* ---------- Apartment title row ---------- */
.apt-title-row { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }

/* ---------- Gallery ---------- */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.gallery--floorplans { grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 18px; }
.gallery__item {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--r-sm);
  background: var(--c-bg-alt);
}
.gallery__item--floorplan {
  aspect-ratio: 3 / 2;
  background: #fff;
  border: 1px solid rgba(0,0,0,.08);
  padding: 10px;
}
.gallery__item--floorplan img { object-fit: contain; }
.gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.gallery__item:hover img { transform: scale(1.04); }
.gallery__item--floorplan:hover img { transform: none; }
.gallery__cap {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 6px 10px;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,.7));
  color: white; font-size: .8rem;
}

/* ---------- 404 ---------- */
.page-404 { text-align: center; padding: 80px 0; }
.page-404 h1 { font-size: 6rem; line-height: 1; margin-bottom: 0; color: var(--c-primary); }

/* ---------- Spaces grid (home) ---------- */
.spaces-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  margin-top: 28px;
}
.space-card {
  position: relative;
  margin: 0;
  border-radius: var(--r-md);
  overflow: hidden;
  aspect-ratio: 4 / 5;
  box-shadow: var(--shadow-sm);
  isolation: isolate;
}
.space-card img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: -2;
  transition: transform .45s ease;
}
.space-card::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 35%, rgba(0,0,0,.78) 100%);
  z-index: -1;
}
.space-card:hover img { transform: scale(1.05); }
.space-card figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 22px 22px 24px;
  color: var(--c-primary-ink);
}
.space-card figcaption h3 {
  color: var(--c-primary-ink);
  margin: 0 0 6px;
  font-size: 1.3rem;
}
.space-card figcaption p {
  margin: 0;
  font-size: .92rem;
  color: rgba(248,246,241,.85);
  line-height: 1.4;
}

/* ---------- Location banner (home) ---------- */
.location-banner {
  position: relative;
  isolation: isolate;
  color: var(--c-primary-ink);
  padding: 100px 0;
  margin-top: 0;
  overflow: hidden;
}
.location-banner::before {
  content: '';
  position: absolute; inset: 0;
  background-image: var(--bg);
  background-size: cover;
  background-position: center;
  z-index: -2;
  filter: saturate(1.05);
}
.location-banner::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(110deg, rgba(31,58,46,.85) 0%, rgba(31,58,46,.55) 50%, rgba(31,58,46,.20) 100%);
  z-index: -1;
}
.location-banner__inner { max-width: 720px; }
.location-banner h2 { color: var(--c-primary-ink); margin: 0 0 12px; font-size: clamp(1.7rem, 3vw, 2.4rem); }
.location-banner .eyebrow { color: rgba(248,246,241,.7); margin: 0 0 14px; }
.location-banner .lead { color: rgba(248,246,241,.92); }
.location-banner .cta-row { margin-top: 22px; }
.location-banner .btn--ghost { border-color: rgba(248,246,241,.45); }

/* ---------- Animations ---------- */
@media (prefers-reduced-motion: no-preference) {
  [data-fade-in] { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
  [data-fade-in].is-visible { opacity: 1; transform: none; }
}

/* ---------- Floorplan with markers ---------- */
.floorplan { position: relative; display: inline-block; max-width: 100%; }
.floorplan__img { display: block; width: 100%; height: auto; border-radius: var(--r-md, 8px); }
.floorplan__markers {
  position: absolute; inset: 0;
  list-style: none; margin: 0; padding: 0;
}
.floorplan__marker {
  position: absolute;
  transform: translate(-50%, -50%);
}
.floorplan__pin {
  display: grid; place-items: center;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--c-primary, #1F3A2E);
  color: var(--c-primary-ink, #f8f6f1);
  font-weight: 600; font-size: 0.95rem;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(0,0,0,.25), 0 0 0 3px rgba(248,246,241,.85);
  transition: transform .18s ease, box-shadow .18s ease;
  cursor: pointer;
}
.floorplan__pin:hover,
.floorplan__pin:focus-visible {
  transform: scale(1.18);
  box-shadow: 0 6px 18px rgba(0,0,0,.35), 0 0 0 3px var(--c-accent, #d4a574);
  outline: none;
}
.floorplan__legend {
  margin-top: 18px;
  padding: 0; list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px 18px;
  font-size: .95rem;
}
.floorplan__legend li {
  display: flex; align-items: center; gap: 10px;
}
.floorplan__legend-num {
  display: inline-grid; place-items: center;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--c-primary, #1F3A2E);
  color: var(--c-primary-ink, #f8f6f1);
  font-size: .8rem; font-weight: 600;
  flex: none;
}
.floorplan__caption { margin-top: 12px; }
@media (max-width: 600px) {
  .floorplan__pin { width: 34px; height: 34px; font-size: 1rem; }
}

/* ---------- CTA band (global, sopra il footer) ---------- */
.cta-band {
  background: var(--c-primary);
  color: var(--c-primary-ink);
  padding: 56px 0;
}
.cta-band__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.cta-band__text { flex: 1 1 320px; min-width: 0; }
.cta-band__text .eyebrow {
  color: rgba(248,246,241,.7);
  letter-spacing: .15em;
  text-transform: uppercase;
  font-size: .8rem;
  margin: 0 0 10px;
}
.cta-band__text h2 {
  color: var(--c-primary-ink);
  margin: 0;
  font-size: clamp(1.4rem, 2.6vw, 2rem);
}
.cta-band__buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.cta-band__buttons .btn--primary {
  background: var(--c-primary-ink);
  color: var(--c-primary);
}
.cta-band__buttons .btn--primary:hover {
  background: white;
  color: var(--c-primary);
}
.cta-band__buttons .btn--ghost {
  border-color: rgba(248,246,241,.55);
  color: var(--c-primary-ink);
}
.cta-band__buttons .btn--ghost:hover {
  background: rgba(248,246,241,.15);
}
@media (max-width: 700px) {
  .cta-band { padding: 40px 0; }
  .cta-band__inner { flex-direction: column; align-items: flex-start; gap: 22px; }
}

/* ---------- Progetto — punti filosofia (split image/text) ---------- */
.progetto-points { padding-top: 12px; padding-bottom: 12px; }
.progetto-point {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  padding: 56px 0;
  align-items: center;
}
.progetto-point + .progetto-point { border-top: 1px solid rgba(0,0,0,.08); }
@media (min-width: 880px) {
  .progetto-point {
    grid-template-columns: 1.05fr 1fr;
    gap: 64px;
    padding: 84px 0;
  }
  .progetto-point--alt .progetto-point__media { order: 2; }
  .progetto-point--alt .progetto-point__content { order: 1; }
}
.progetto-point__media {
  margin: 0;
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--c-bg-alt, #f5efe6);
  box-shadow: 0 20px 60px -28px rgba(17,24,39,.35);
}
.progetto-point__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.02);
  transition: transform .9s ease;
}
.progetto-point:hover .progetto-point__media img { transform: scale(1.06); }
.progetto-point__media::after {
  /* delicate top-left vignette per non rendere piatta la foto */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0,0,0,.18) 0%, rgba(0,0,0,0) 45%);
  pointer-events: none;
}
.progetto-point__content { position: relative; padding-left: 0; }
@media (min-width: 880px) {
  .progetto-point__content { padding-left: 8px; }
  .progetto-point--alt .progetto-point__content { padding-left: 0; padding-right: 8px; }
}
.progetto-point__num {
  display: block;
  font-family: 'Cinzel', var(--f-serif, Georgia), serif;
  font-size: 1rem;
  letter-spacing: .26em;
  color: var(--c-primary, #8a6b3a);
  margin: 0 0 14px;
  position: relative;
  padding-left: 50px;
}
.progetto-point__num::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 38px;
  height: 1px;
  background: var(--c-primary, #8a6b3a);
  opacity: .55;
}
.progetto-point__title {
  font-family: 'Cinzel', var(--f-serif, Georgia), serif;
  font-size: clamp(1.8rem, 2.6vw, 2.4rem);
  font-weight: 500;
  letter-spacing: .02em;
  color: var(--c-text, #1c1816);
  margin: 0 0 22px;
  line-height: 1.16;
  max-width: 24ch;
}
.progetto-point__body {
  font-size: 1.04rem;
  line-height: 1.72;
  color: rgba(17,24,39,.78);
  max-width: 60ch;
}
.progetto-point__body p:last-child { margin-bottom: 0; }

/* ---------- POI list (dove siamo) ---------- */
.poi-list { list-style: none; padding: 0; margin: 0 0 1.6em; }
.poi-list li { padding: 6px 0; border-bottom: 1px dashed var(--c-line); display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.poi-list li:last-child { border-bottom: 0; }
.poi-list a { color: var(--c-primary); text-decoration: none; font-weight: 500; }
.poi-list a:hover { text-decoration: underline; }
.poi-list small { font-size: .82rem; }

/* ---------- Buildings banner (home, sostituisce building-grid) ---------- */
.buildings-banner {
  position: relative;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  margin-top: 28px;
  background-image: var(--banner-bg);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  isolation: isolate;
  overflow: hidden;
}
.buildings-banner::after {
  /* leggero scurimento per leggibilità dei bottoni */
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.18) 0%, rgba(0,0,0,.28) 50%, rgba(0,0,0,.42) 100%);
  z-index: -1;
}
.buildings-banner__cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: clamp(320px, 32vw, 520px);
}
.buildings-banner__col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  text-decoration: none;
  color: var(--c-primary-ink);
  padding: 40px 24px;
  position: relative;
  transition: background-color .25s ease;
}
.buildings-banner__col:hover { background: rgba(0,0,0,.15); color: var(--c-primary-ink); }
.buildings-banner__col + .buildings-banner__col { border-left: 1px solid rgba(255,255,255,.18); }

.buildings-banner__btn {
  display: grid;
  place-items: center;
  width: clamp(72px, 9vw, 116px);
  height: clamp(72px, 9vw, 116px);
  border-radius: 50%;
  background: rgba(248,246,241,.92);
  color: var(--c-primary);
  font-family: 'Cinzel', var(--f-serif);
  font-weight: 600;
  font-size: clamp(2rem, 3.6vw, 3.4rem);
  letter-spacing: .02em;
  box-shadow: 0 8px 24px rgba(0,0,0,.35), 0 0 0 4px rgba(248,246,241,.25);
  transition: transform .25s ease, background-color .2s ease, box-shadow .25s ease;
}
.buildings-banner__col:hover .buildings-banner__btn {
  transform: scale(1.08);
  background: var(--c-primary-ink);
  box-shadow: 0 12px 30px rgba(0,0,0,.45), 0 0 0 5px rgba(248,246,241,.45);
}
.buildings-banner__caption {
  text-align: center;
  text-shadow: 0 2px 10px rgba(0,0,0,.55);
}
.buildings-banner__caption strong {
  display: block;
  font-family: var(--f-serif);
  font-size: clamp(1.2rem, 1.6vw, 1.6rem);
  letter-spacing: .06em;
  text-transform: uppercase;
  font-weight: 600;
}
.buildings-banner__caption small {
  display: block;
  margin-top: 4px;
  font-size: .82rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  opacity: .92;
}

@media (max-width: 700px) {
  .buildings-banner__cols { grid-template-columns: 1fr; min-height: 0; }
  .buildings-banner__col { padding: 56px 24px; }
  .buildings-banner__col + .buildings-banner__col { border-left: 0; border-top: 1px solid rgba(255,255,255,.18); }
}

/* ---------- Icon helpers ---------- */
.icon { display: inline-block; vertical-align: -.18em; flex-shrink: 0; }
.btn--icon { display: inline-flex; align-items: center; gap: 8px; }
.btn--icon .icon { margin: 0; }
.features { list-style: none; padding: 0; margin: 28px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px 24px; }
.features li { display: flex; align-items: center; gap: 10px; color: rgba(17,24,39,.82); font-size: .98rem; }
.features__icon { color: var(--c-primary, #8a6b3a); }
.whatsapp-fab__icon { display: block; }

/* ---------- Mobile polish ---------- */
@media (max-width: 700px) {
  /* spaziature sezioni più compatte */
  .section { padding: 48px 0; }
  .container { padding-left: 18px; padding-right: 18px; }

  /* hero più ariosa: meno alto, padding ridotto */
  .hero { min-height: clamp(440px, 62vh, 620px); }
  .hero__content { padding: 32px 18px; }
  .hero__eyebrow { font-size: .66rem; letter-spacing: .32em; margin-bottom: 18px; padding-bottom: 10px; }
  .hero__slogan { font-size: .98rem; max-width: 90%; }

  /* page-hero (pagine interne) */
  .page-hero h1 { font-size: clamp(1.6rem, 7vw, 2rem); }
  .page-hero .lead { font-size: .96rem; }

  /* section titles compatti */
  .section__title { font-size: clamp(1.5rem, 6.5vw, 2rem); margin-bottom: 10px; }
  .section__lead { font-size: .95rem; margin-bottom: 24px; }

  /* CTA buttons full-width per essere comodi al tap */
  .cta-row { gap: 10px; }
  .cta-row .btn { flex: 1 1 100%; justify-content: center; }

  /* CTA band stack */
  .cta-band__buttons { flex-direction: column; width: 100%; }
  .cta-band__buttons .btn { width: 100%; justify-content: center; }

  /* anchor nav scrollable */
  .anchor-nav__inner { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; gap: 18px; padding-bottom: 4px; }
  .anchor-nav__inner a { white-space: nowrap; flex-shrink: 0; }

  /* property page: stack two-col */
  .two-col { grid-template-columns: 1fr !important; }
  .building-plan, .prose { width: 100%; }

  /* specs table padding ridotto */
  table.specs th, table.specs td { padding: 8px 10px; font-size: .92rem; }

  /* gallery più alta cell density */
  .gallery { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 6px; }
  .gallery--floorplans { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; }

  /* progetto points stack image then content */
  .progetto-point { padding: 36px 0; gap: 20px; }
  .progetto-point__media { aspect-ratio: 3/2; }
  .progetto-point__title { font-size: clamp(1.5rem, 6.5vw, 2rem); }
  .progetto-point__body { font-size: .98rem; }

  /* features grid → single col on very small */
  .features { grid-template-columns: 1fr; gap: 10px; }

  /* poi list più leggibile */
  .poi-list li { font-size: .94rem; }

  /* apartment cards più piccoli ma utilizzabili */
  .apt-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .apt-card__title { font-size: .98rem; }
  .apt-card__meta { font-size: .82rem; gap: 6px; }

  /* floorplan markers più grandi per touch */
  .floorplan__pin { width: 30px; height: 30px; font-size: .9rem; }
  .floorplan__legend { font-size: .92rem; }

  /* WhatsApp FAB più piccolo per non coprire UI */
  .whatsapp-fab { width: 48px; height: 48px; right: 16px; bottom: 16px; }
  .whatsapp-fab__icon { width: 26px; height: 26px; }

  /* capitolato page on mobile — toolbar compatta */
  .capitolato-page__title { font-size: 1rem; }

  /* footer compatto */
  .site-footer { padding: 40px 0 24px; }
  .site-footer__grid { gap: 22px; }
}

@media (max-width: 380px) {
  /* aggiusta per dispositivi molto stretti (es. iPhone SE 1st gen) */
  .container { padding-left: 14px; padding-right: 14px; }
  .hero__title--xl { font-size: clamp(1.8rem, 9vw, 2.4rem); }
  .apt-grid { grid-template-columns: 1fr; }
}
