/* nannicini.com — v4 "due porte": home + pagine Aziende e Privati */
:root {
  --ink: #14232d;          /* testo e fondi scuri */
  --paper: #f6f3ee;        /* fondo chiaro caldo */
  --line: #d9d2c6;
  --muted: #55606a;        /* su paper: 5.8:1 */

  --az: #183746;           /* Aziende: petrolio */
  --az-2: #22495c;
  --az-text: #d3dfe5;      /* su --az: 9.3:1 */
  --az-accent: #8fd0e8;
  --az-ink: #1d4a5e;       /* petrolio su paper: 8.6:1 */

  --pr: #f1e4d2;           /* Privati: intonaco caldo */
  --pr-accent: #9e3f26;    /* terracotta, su --pr: 5.3:1, bianco su terracotta: 6.6:1 */
  --pr-text: #3b2a20;

  --bar-h: 68px;
  --id-h: 76px;           /* fascia con il nome sopra le porte (home) */
  --call-h: 0px;
  --wrap: 1200px;
  --gut: clamp(16px, 4vw, 56px);
  --font: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--bar-h); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.12; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gut); }

/* ---------- barra ---------- */
.bar {
  position: sticky; top: 0; z-index: 50;
  height: var(--bar-h);
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.bar-in {
  height: 100%;
  display: flex; align-items: center; gap: 32px;
  padding: 0 var(--gut);
}
.brand { margin: 0; font-size: 1rem; font-weight: 400; }
.brand a { text-decoration: none; display: flex; flex-direction: column; justify-content: center; min-height: 44px; line-height: 1.2; }
.brand strong { font-size: 1.25rem; font-weight: 800; font-stretch: 112%; letter-spacing: -0.01em; }
.brand span { font-size: 0.9rem; color: var(--muted); }
.bar-nav { display: flex; gap: 28px; margin-left: auto; }
.bar-nav a { text-decoration: none; font-weight: 600; padding: 12px 0; display: inline-flex; align-items: center; min-height: 44px; }
.bar-nav a:hover { text-decoration: underline; text-underline-offset: 4px; }
.bar-nav a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 6px; }
.bar-call { display: flex; gap: 10px; }
.bar-call a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px;
  text-decoration: none; font-weight: 700; border-radius: 6px;
}
.bar-tel { background: var(--ink); color: #fff; font-variant-numeric: tabular-nums; }
.bar-tel:hover { background: #000; }
.bar-wa { border: 1.5px solid var(--ink); }
.bar-wa:hover { background: var(--ink); color: #fff; }

/* ---------- home: fascia con nome e iscrizione ---------- */
.idline {
  min-height: var(--id-h);
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 4px 32px;
  padding: 10px var(--gut);
  background: var(--paper); border-bottom: 1px solid var(--line);
}
.idline h1 { font-size: clamp(22px, 2vw, 30px); font-weight: 700; letter-spacing: -0.01em; line-height: 1.15; }
.idline p { margin: 0; font-size: .9375rem; color: var(--muted); }

/* ---------- home: le due porte ---------- */
.doors {
  display: flex;
  height: calc(100vh - var(--bar-h) - var(--id-h));
  height: calc(100svh - var(--bar-h) - var(--id-h));
  min-height: 540px;
  max-height: 1100px;
  background: var(--ink);
}
.door {
  position: relative;
  flex: 1 1 0;
  overflow: hidden;
  color: #fff;
  text-decoration: none;
  transition: flex-grow .5s cubic-bezier(.2,.7,.2,1);
}
.door + .door { border-left: 2px solid var(--paper); }
.door img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover;
}
.door-az img { object-position: 50% 62%; }
.door-pr img { object-position: 62% 45%; }
.door::after { content: ""; position: absolute; inset: 0; }
.door-az::after { background: linear-gradient(to top, rgba(12,33,44,.94) 0%, rgba(12,33,44,.84) 36%, rgba(12,33,44,.52) 60%, rgba(12,33,44,.15) 82%, rgba(12,33,44,.05) 100%); }
.door-pr::after { background: linear-gradient(to top, rgba(46,20,10,.94) 0%, rgba(46,20,10,.84) 36%, rgba(46,20,10,.52) 60%, rgba(46,20,10,.12) 82%, rgba(46,20,10,0) 100%); }

.door-body {
  position: absolute; z-index: 2; left: 0; right: 0; bottom: 0;
  padding: clamp(24px, 4vw, 64px);
  display: flex; flex-direction: column; align-items: flex-start;
  max-width: 640px;
}
.door-word {
  margin: 0;
  font-size: clamp(56px, 7.4vw, 124px);
  font-weight: 850;
  font-stretch: 118%;
  letter-spacing: -0.035em;
  line-height: .9;
  text-shadow: 0 2px 28px rgba(0,0,0,.35);
}
.door-what {
  margin-top: 14px;
  font-size: clamp(20px, 1.8vw, 28px);
  font-weight: 700;
  line-height: 1.2;
  max-width: 26ch;
  min-height: 2.4em;
  text-wrap: balance;
}
.door-text {
  margin-top: 12px;
  font-size: 1.0625rem;
  max-width: 40ch;
  min-height: calc(3 * 1.55em);
  color: rgba(255,255,255,.92);
}
.door-go {
  margin-top: 22px;
  display: inline-flex; align-items: center;
  min-height: 48px; padding: 0 22px;
  font-weight: 800; font-size: 1rem;
  border-radius: 6px;
  transition: background .25s, color .25s;
}
.door-az .door-go { background: #fff; color: var(--az); }
.door-pr .door-go { background: var(--pr-accent); color: #fff; }

@media (hover: hover) and (min-width: 761px) {
  .doors:hover .door { flex-grow: .82; }
  .doors .door:hover, .doors .door:focus-visible { flex-grow: 1.18; }
  .door-az:hover .door-go { background: var(--az-accent); }
  .door-pr:hover .door-go { background: #7d2f1b; }
}
.door:focus-visible { outline: 4px solid #fff; outline-offset: -8px; }
@media (prefers-reduced-motion: reduce) {
  .door { transition: none; }
}

/* ---------- sezioni ---------- */
.sec { padding: clamp(56px, 8vw, 112px) 0; }
.sec h2 {
  font-size: clamp(26px, 2.4vw, 36px); font-weight: 700; font-stretch: 100%;
  letter-spacing: -0.01em; max-width: 24ch;
}
.sec h3 { font-size: 1.25rem; font-weight: 700; }
.lead { font-size: clamp(17px, 1.3vw, 19px); }
.sec-head {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 12px clamp(32px, 5vw, 80px);
  padding-top: 18px; border-top: 1px solid var(--ink);
}
.sec-head p { margin-top: 0; max-width: 62ch; }
.sec-az .sec-head { border-top-color: rgba(255,255,255,.4); }
.sec-az .sec-head p { color: var(--az-text); }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 10px 24px;
  font: inherit; font-weight: 800; line-height: 1.25; text-align: center;
  text-decoration: none; border: 0; border-radius: 6px; cursor: pointer;
}
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.btn-light { background: #fff; color: var(--az); }
.btn-light:hover { background: var(--az-accent); }
.btn-ghost-light { color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.7); }
.btn-ghost-light:hover { background: var(--az-2); }
.btn-az { background: var(--az); color: #fff; }
.btn-az:hover { background: #0e2530; }
.btn-pr { background: var(--pr-accent); color: #fff; }
.btn-pr:hover { background: #7d2f1b; }
.btn-ghost-dark { color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn-ghost-dark:hover { background: var(--ink); color: #fff; }

.more {
  display: inline-flex; align-items: center; min-height: 44px;
  font-weight: 800; text-underline-offset: 4px;
}

/* ---------- home: blocchi brevi ---------- */
.hb { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: clamp(32px, 5vw, 80px); align-items: center; }
.hb-az { background: var(--az); color: #fff; }
.hb-az p { color: var(--az-text); }
.hb-pr { background: var(--pr); color: var(--pr-text); }
.hb-pr h2 { color: var(--ink); }
.hb-text p { margin-top: 18px; max-width: 50ch; }
.hb-pics { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hb-pics img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 4px; }
.hb-pr .hb-pics { order: -1; }

/* ---------- pagine: hero diviso ---------- */
.phero {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  min-height: clamp(540px, calc(88vh - var(--bar-h)), 820px);
  min-height: clamp(540px, calc(88svh - var(--bar-h)), 820px);
}
.phero-text {
  padding: clamp(32px, 5vw, 80px) var(--gut);
  padding-left: max(var(--gut), calc((100vw - var(--wrap)) / 2 + var(--gut)));
  display: flex; flex-direction: column; justify-content: center; align-items: flex-start;
}
.phero h1 {
  font-size: clamp(32px, 3vw, 46px); font-weight: 700; font-stretch: 100%;
  letter-spacing: -0.015em; line-height: 1.1; max-width: 21ch; text-wrap: balance;
}
.phero .lead { margin-top: 22px; max-width: 42ch; }
.phero-img { position: relative; overflow: hidden; margin: 0; }
.phero-img > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.phero-az { background: var(--az); color: #fff; }
.phero-az .lead { color: var(--az-text); }
.phero-az .phero-img > img { object-position: 50% 58%; }
.phero-pr { background: var(--pr); color: var(--pr-text); }
.phero-pr h1 { color: var(--ink); }
.phero-pr .phero-img > img { object-position: 62% 45%; }

/* ---------- aziende: tipi di immobile ---------- */
.types {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(40px, 5vw, 64px) clamp(24px, 3vw, 48px);
  margin-top: clamp(32px, 4vw, 56px);
}
.type img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 4px; }
.type h3 { font-size: clamp(26px, 2.4vw, 34px); font-stretch: 112%; letter-spacing: -0.01em; margin: 20px 0 8px; }
.type p { max-width: 54ch; margin-bottom: 8px; color: #2c3943; }

/* ---------- aziende: scheda controlli ---------- */
.sec-az { background: var(--az); color: #fff; }
.sec-az .lead, .sec-az dd { color: var(--az-text); }
.scheda { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(32px, 5vw, 80px); align-items: start; }
.scheda h2 { max-width: 16ch; }
.checks { margin: 0; border-top: 1px solid rgba(255,255,255,.22); }
.checks > div {
  display: grid; grid-template-columns: 180px 1fr; gap: 16px;
  padding: 18px 0; border-bottom: 1px solid rgba(255,255,255,.22);
}
.checks dt { font-weight: 800; color: #fff; font-size: 1.125rem; }
.checks dd { margin: 0; }

/* ---------- aziende: mappa della piana ---------- */
.map-sec .sec-head { margin-bottom: 28px; }
.map-legend { display: flex; gap: 8px 20px; flex-wrap: wrap; font-size: .9375rem; color: var(--muted); margin: 0 0 12px; }
.lg { display: inline-flex; align-items: center; gap: 8px; }
.lg i { display: inline-block; width: 22px; height: 12px; border-radius: 2px; }
.lg-az i { background: #2d6b85; }
.lg-az2 i { background: #bccdd4; }
.lg-pr i { background: #e9b994; }
.lg-mw i { height: 6px; background: #f4c542; box-shadow: 0 0 0 1.5px #3a342e; }
.lg-cas i { width: 12px; height: 12px; border-radius: 50%; background: #1f7a3e; }
.map-scroll { border: 1px solid var(--line); border-radius: 4px; overflow: hidden; background: #ebe6da; }
.map-canvas { position: relative; }
.map-canvas img { width: 100%; height: auto; }
.ml {
  position: absolute; transform: translate(-50%, -50%);
  white-space: nowrap; padding: 4px 9px; border-radius: 4px;
  font-size: 14px; font-weight: 700; line-height: 1.2;
  background: #fff; color: var(--az-ink); border: 2px solid currentColor;
}
.ml-pr { color: var(--pr-accent); }
.map-note { margin-top: 10px; font-size: .875rem; color: var(--muted); }
.map-note a { color: inherit; }
.only-touch { display: none; }

/* ---------- numeri pubblici di EstimoTerreni (home e aziende, su fondo petrolio) ---------- */
.et-nums {
  display: grid; grid-template-columns: repeat(3, auto); justify-content: start;
  margin: 28px 0 0;
  border-top: 1px solid rgba(255,255,255,.3); border-bottom: 1px solid rgba(255,255,255,.3);
}
.et-nums > div { display: flex; flex-direction: column-reverse; padding: 12px 32px 12px 0; }
.et-nums > div + div { padding-left: 24px; border-left: 1px solid rgba(255,255,255,.3); }
.et-nums dd {
  margin: 0; color: #fff;
  font-size: clamp(28px, 2.4vw, 36px); font-weight: 700; line-height: 1.1;
  font-variant-numeric: tabular-nums lining-nums;
}
.et-nums dt { font-size: .9375rem; color: var(--az-text); }
.et-src { margin: 10px 0 0; font-size: .875rem; color: var(--az-text); }
.hb-text .et-src { margin-top: 10px; }
.et-src a { color: #fff; text-underline-offset: 3px; }

/* ---------- aziende: schermate del motore ---------- */
.pg-az .more { color: var(--az-ink); }

.ex { margin: 0; }
.ex img { width: 100%; height: auto; border-radius: 4px; background: #0c0d12; box-shadow: 0 0 0 1px #c9c1b4; }
.ex-link { display: block; border-radius: 4px; }
.ex-link:focus-visible { outline: 3px solid var(--az-ink); outline-offset: 3px; }
.ex figcaption { margin-top: 10px; font-size: .875rem; line-height: 1.45; color: var(--muted); max-width: 90ch; }
.ex figcaption b { color: var(--ink); }
.ex figcaption a { color: var(--az-ink); font-weight: 700; text-underline-offset: 3px; }
.ex-wide { margin-top: clamp(32px, 4vw, 48px); }
.phero-inset {
  position: absolute; z-index: 2; margin: 0;
  left: clamp(20px, 3vw, 40px); bottom: clamp(20px, 3vw, 40px);
  width: min(460px, calc(100% - 48px));
}
.phero-inset img { width: 100%; height: auto; border-radius: 6px; box-shadow: 0 0 0 1px rgba(255,255,255,.22), 0 10px 28px rgba(0,0,0,.32); }
.phero-inset figcaption {
  display: inline-block; margin-top: 8px; padding: 4px 10px; border-radius: 3px;
  background: rgba(12,20,26,.88); color: #e3eaee; font-size: .8125rem; line-height: 1.4;
}
.phero-inset figcaption a { color: #fff; text-underline-offset: 3px; }
.only-narrow { display: none; }
.ex-strip { display: none; }
.reads h3 { font-size: 1.125rem; font-weight: 700; padding-bottom: 10px; border-bottom: 1px solid var(--ink); }
.reads dl { margin: 0; }
.reads dl > div {
  display: grid; grid-template-columns: 116px minmax(0, 1fr); gap: 12px;
  padding: 11px 0; border-bottom: 1px solid var(--line); font-size: .9375rem;
}
.reads dt { font-weight: 700; }
.reads dd { margin: 0; color: #2c3943; }
.ex-pair {
  display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: clamp(24px, 3vw, 40px); align-items: start; margin-top: clamp(32px, 4vw, 48px);
}

.sec-profili { border-top: 1px solid var(--line); background: #fbf9f5; }
.pf-head, .pf {
  display: grid; grid-template-columns: 200px minmax(0, 1fr) minmax(0, 2fr);
  gap: clamp(20px, 3vw, 40px); align-items: center;
}
.pf-head {
  margin-top: clamp(32px, 4vw, 48px); padding: 10px 0;
  border-bottom: 1px solid var(--ink); font-size: .875rem; color: var(--muted);
}
.profili { list-style: none; margin: 0; padding: 0; }
.pf { padding: 16px 0; border-bottom: 1px solid var(--line); }
.pf img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 3px; }
.sec .pf h3 { font-size: 1.375rem; font-weight: 700; letter-spacing: -0.005em; }
.pf p { margin: 0; color: #2c3943; max-width: 58ch; }

.steps {
  list-style: none; margin: clamp(32px, 4vw, 48px) 0 0; padding: 0;
  counter-reset: passo; border-top: 1px solid rgba(255,255,255,.4);
}
.steps li {
  counter-increment: passo;
  display: grid; grid-template-columns: 48px minmax(0, 5fr) minmax(0, 7fr);
  gap: 8px clamp(20px, 3vw, 40px); align-items: baseline;
  padding: 18px 0; border-bottom: 1px solid rgba(255,255,255,.22);
}
.steps li::before {
  content: counter(passo); color: var(--az-text);
  font-weight: 600; font-variant-numeric: tabular-nums;
}
.sec .steps h3 { font-size: 1.125rem; font-weight: 700; color: #fff; }
.steps p { margin: 0; color: var(--az-text); max-width: 60ch; }

/* ---------- privati: vendere, comprare, affittare ---------- */
.docs {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 12px clamp(32px, 5vw, 80px);
  margin-top: clamp(28px, 3.5vw, 40px);
}
.sec .docs h3 { font-size: clamp(20px, 1.7vw, 24px); font-weight: 700; }
.docs .kv { margin-top: 0; }
.prows { margin-top: clamp(40px, 5vw, 64px); }
.prow {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 72px); align-items: start;
  padding: clamp(28px, 4vw, 48px) 0;
  border-top: 1px solid var(--line);
}
.prow:first-child { border-top: 0; padding-top: 0; }
.prow:nth-child(even) .prow-img { order: 2; }
.prow-img img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 4px; }
.sec .prow h3 { font-size: clamp(24px, 2.2vw, 30px); font-weight: 700; letter-spacing: -0.01em; color: var(--ink); margin-bottom: 10px; }
.prow p { max-width: 52ch; }
.prow .more { color: var(--pr-accent); }
.prow .more:hover { color: #6e2814; }
.kv { margin: 18px 0 0; border-top: 1px solid var(--ink); }
.kv > div {
  display: grid; grid-template-columns: 116px minmax(0, 1fr); gap: 12px;
  padding: 9px 0; border-bottom: 1px solid var(--line); font-size: .9375rem;
}
.kv dt { font-weight: 700; }
.kv dd { margin: 0; color: #2c3943; }
.prow-steps { margin: 14px 0 6px; font-size: .9375rem; color: #2c3943; }
.prow-steps b { margin-right: 8px; color: var(--ink); }

/* ---------- privati: valutazione ---------- */
.sec-val { background: var(--paper); }
.jump { border-bottom: 1px solid var(--line); }
.jump-in { display: flex; flex-wrap: wrap; gap: 0 32px; }
.jump a { display: inline-flex; align-items: center; min-height: 52px; font-weight: 700; text-underline-offset: 4px; }
.jump a:hover { color: var(--pr-accent); }
.sec-servizi { border-top: 1px solid var(--line); background: #fbf9f5; }
.pg-home .bar .brand span { display: none; }
.omi {
  width: 100%; border-collapse: collapse; margin-top: clamp(28px, 3vw, 40px);
  font-variant-numeric: tabular-nums lining-nums;
}
.omi caption { caption-side: top; text-align: left; font-size: .9375rem; color: var(--pr-text); padding-bottom: 10px; }
.omi th, .omi td {
  text-align: left; vertical-align: baseline;
  padding: 11px 16px 11px 0; border-bottom: 1px solid rgba(59,42,32,.22);
}
.omi thead th { padding-top: 0; font-size: .875rem; font-weight: 600; color: #5a4a3f; border-bottom: 1px solid var(--ink); }
.omi tbody th { font-weight: 700; color: var(--ink); white-space: nowrap; }
.omi tbody th span { margin-left: 6px; font-size: .875rem; font-weight: 500; color: #6b5a4e; }
.omi td { color: var(--pr-text); }
.omi .n { text-align: right; white-space: nowrap; padding-left: 16px; padding-right: 0; width: 1%; }
.omi td.n { font-weight: 700; font-size: 1.0625rem; color: var(--ink); }
.omi-prov { margin-top: clamp(32px, 4vw, 48px); }
.omi thead th:first-child { width: 15rem; }
.omi-src { margin: 16px 0 0; font-size: .875rem; color: #5a4a3f; max-width: 80ch; }

/* quotazioni in evidenza (hero Privati e blocco Privati della home, su fondo intonaco) */
.nums {
  width: 100%; max-width: 440px; margin: 28px 0 0;
  border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink);
}
.nums > div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 8px 0; }
.nums > div + div { border-top: 1px solid rgba(59,42,32,.22); }
.nums dd {
  margin: 0; color: var(--ink); white-space: nowrap;
  font-size: clamp(20px, 1.6vw, 24px); font-weight: 700; line-height: 1.2;
  font-variant-numeric: tabular-nums lining-nums;
}
.nums dt { font-size: 1rem; color: var(--pr-text); }
.nums-src { margin: 10px 0 0; font-size: .875rem; color: #5a4a3f; max-width: 60ch; }
.hb-text .nums-src { margin-top: 10px; }
.nums-src a { color: var(--pr-accent); font-weight: 700; text-underline-offset: 3px; display: inline-block; padding: 12px 0; margin: -12px 0; }

/* ---------- privati: room documenti ---------- */
.sec-room { background: var(--pr-accent); color: #fff; overflow: hidden; }
.room { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(32px, 5vw, 80px); align-items: center; }
.room p { color: #fff; max-width: 50ch; }
.room .room-text { margin-top: 20px; font-size: clamp(18px, 1.5vw, 20px); max-width: 44ch; }
.room h2 { max-width: 22ch; }
.room-fig { margin: 0; justify-self: center; width: min(300px, 100%); }
.room-fig figcaption { margin-top: 14px; text-align: center; font-size: .875rem; color: #fbe3d6; }
.room .btn { margin-top: 28px; background: #fff; color: var(--pr-accent); }
.room .btn:hover { background: #fbe3d6; }

/* il telefono è disegnato in CSS: nessuna foto */
.phone {
  width: 100%; aspect-ratio: 300 / 610;
  padding: 12px; border-radius: 44px;
  background: #1b1512;
  box-shadow: 0 0 0 2px #3a2e28, 0 16px 32px rgba(0,0,0,.25);
  position: relative;
}
.phone::before {
  content: ""; position: absolute; top: 22px; left: 50%; transform: translateX(-50%);
  width: 84px; height: 24px; border-radius: 14px; background: #1b1512; z-index: 2;
}
.ph-screen {
  height: 100%; border-radius: 33px; overflow: hidden;
  background: #faf7f2; color: var(--ink);
  display: flex; flex-direction: column;
  font-size: 13px; line-height: 1.35;
}
.ph-status { height: 52px; flex: none; }
.ph-url {
  margin: 0 14px; padding: 7px 12px; border-radius: 10px; background: #ece6dc;
  font-size: 12px; font-weight: 600; color: #4b5560; text-align: center;
}
.ph-body { padding: 18px 16px 16px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.room .ph-title { font-size: 18px; font-weight: 700; margin: 0; color: var(--ink); }
.ph-code {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 12px; border-radius: 10px; border: 1.5px solid #c9c0b3; background: #fff;
}
.ph-code span { color: #55606a; }
.ph-code b { letter-spacing: .25em; }
.ph-files { list-style: none; margin: 0; padding: 0; border-top: 1px solid #e3dccf; }
.ph-files li { display: flex; justify-content: space-between; gap: 8px; padding: 9px 0; border-bottom: 1px solid #e3dccf; }
.ph-files i { font-style: normal; font-weight: 700; color: #8a5a00; white-space: nowrap; }
.ph-files .ok i { color: #1d6b45; }
.ph-btn {
  margin-top: auto; padding: 12px; border-radius: 12px; text-align: center;
  background: var(--pr-accent); color: #fff; font-weight: 800; font-size: 14px;
}
.room .ph-note { margin: 0; text-align: center; color: #55606a; font-size: 12px; }
.ph-count { font-size: 12px; font-weight: 700; color: #55606a; }

/* ---------- zona ---------- */
.zona-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px;
  margin-top: 36px; padding-top: 28px; border-top: 1.5px solid var(--ink);
}
.zona-grid h3 { margin-bottom: 8px; }
.zona-grid p { color: #2c3943; }
.zona-grid a { font-weight: 700; text-underline-offset: 3px; display: inline-flex; min-height: 44px; align-items: center; }
.comuni {
  list-style: none; margin: 32px 0 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 4px 0;
  font-size: clamp(20px, 2vw, 28px); font-weight: 700; letter-spacing: -0.01em; line-height: 1.3;
}
.comuni li:not(:last-child)::after { content: "·"; margin: 0 .35em; color: var(--pr-accent); font-weight: 400; }
.comuni li:first-child { color: var(--pr-accent); }

/* ---------- contatti ---------- */
.sec-ct { background: var(--paper); border-top: 1px solid var(--line); }
.ct-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.ct-phone {
  display: inline-flex; align-items: center; min-height: 48px; margin-top: 24px;
  font-size: clamp(28px, 3vw, 40px); font-weight: 700;
  letter-spacing: -0.01em; text-decoration: none; font-variant-numeric: tabular-nums; white-space: nowrap;
}
.ct-phone:hover { text-decoration: underline; text-underline-offset: 6px; }
.ct-links { display: flex; flex-wrap: wrap; gap: 4px 24px; margin-top: 8px; }
.ct-links a { font-weight: 700; display: inline-flex; align-items: center; min-height: 44px; text-underline-offset: 3px; }
.ct-addr { color: var(--muted); margin-top: 12px; }

.form {
  background: #fff; border: 1.5px solid var(--ink); border-radius: 6px;
  padding: clamp(20px, 3vw, 36px);
  display: grid; gap: 18px;
}
.f2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: grid; gap: 6px; font-weight: 700; font-size: .9375rem; }
.field em { font-style: normal; font-weight: 400; color: var(--muted); }
.field input, .field textarea, .field select {
  font: inherit; font-weight: 400; font-size: 1rem; color: var(--ink);
  min-height: 48px; padding: 10px 12px;
  border: 1.5px solid #8a949c; border-radius: 4px; background: #fff;
}
.field textarea { resize: vertical; min-height: 110px; }
/* tendine disegnate a mano: su iPhone quelle native ignorano altezza e padding e escono schiacciate */
.field select {
  -webkit-appearance: none; appearance: none; width: 100%; padding-right: 40px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%2314232d' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 14px center / 14px 9px;
}
.field input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
.field input::-webkit-inner-spin-button, .field input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.field input:focus, .field textarea:focus, .field select:focus { outline: 3px solid var(--az-accent); outline-offset: 0; border-color: var(--ink); }
.chips { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips legend { font-weight: 700; font-size: .9375rem; margin-bottom: 8px; padding: 0; }
.chips label { position: relative; }
.chips input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chips span {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px;
  border: 1.5px solid #8a949c; border-radius: 999px; font-weight: 600; cursor: pointer;
}
.chips input:checked + span { background: var(--ink); color: #fff; border-color: var(--ink); }
.chips input:focus-visible + span { outline: 3px solid var(--az-accent); outline-offset: 2px; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: .9375rem; }
.check input {
  -webkit-appearance: none; appearance: none; width: 24px; height: 24px; margin: 0; flex: none; cursor: pointer;
  border: 1.5px solid #8a949c; border-radius: 4px; background: #fff;
}
.check input:checked {
  border-color: var(--ink);
  background: var(--ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 12'%3E%3Cpath d='M1.5 6l4.5 4.5L14.5 1.5' fill='none' stroke='%23fff' stroke-width='2.5'/%3E%3C/svg%3E") no-repeat center / 14px 11px;
}
.check input:focus-visible { outline: 3px solid var(--az-accent); outline-offset: 2px; }
.check a { font-weight: 700; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.btn-dark { background: var(--ink); color: #fff; justify-self: start; min-width: 180px; }
.btn-dark:hover { background: #000; }
.btn-dark[disabled] { opacity: .6; cursor: wait; }
.form-msg { margin: 0; font-weight: 600; }
.form-msg:empty { display: none; }
.form-msg.err { color: #8a1c1c; }
.form-note { margin: 0; padding: 12px; background: var(--pr); border-radius: 4px; }
.form-done { padding: 8px 0; }
.form-done h3 { font-size: 1.5rem; margin-bottom: 8px; }

/* ---------- footer ---------- */
.foot { background: var(--ink); color: #d5dde2; padding: 48px 0 40px; font-size: .9375rem; }
.foot a { color: #fff; text-underline-offset: 3px; }
.foot-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.foot-name { font-weight: 800; color: #fff; font-size: 1.0625rem; }
.foot-legal { display: flex; gap: 20px; }
.foot-legal a { display: inline-flex; min-height: 44px; align-items: center; font-weight: 700; }
.foot-nav { display: flex; flex-wrap: wrap; gap: 0 20px; }
.foot-nav a { display: inline-flex; min-height: 44px; align-items: center; font-weight: 700; }
.credits { font-size: .8125rem; color: #c4ced4; }

/* ---------- offerte (BRIEF § Offerte decise da Lorenzo) ---------- */
[hidden] { display: none !important; }
.offer { margin-top: 26px; padding-top: 14px; border-top: 1px solid var(--ink); max-width: 46ch; }
.offer p { margin: 0; }
.offer-what {
  margin: 0 0 6px; color: var(--ink);
  font-size: clamp(21px, 1.8vw, 26px); font-weight: 700; line-height: 1.2; letter-spacing: -0.005em;
}
.offer-az { border-top-color: rgba(255,255,255,.5); }
.offer-az .offer-what { color: #fff; }
.offer-az p { color: var(--az-text); }
.hb-pr .offer { margin-top: 22px; }
.nums-hero { margin-top: 36px; }
.ct-one { margin: 12px 0 0; font-weight: 600; }
.form-send { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.form-when { margin: 0; font-weight: 600; font-size: .9375rem; }
.req { border: 0; margin: 0; padding: 0; min-width: 0; }
.req legend { font-weight: 700; font-size: .9375rem; margin-bottom: 8px; padding: 0; }
.req legend em { font-style: normal; font-weight: 400; color: var(--muted); }
.f3 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.f3 .field:first-child { grid-column: 1 / -1; }
.field input, .field select { width: 100%; min-width: 0; }

/* ---------- privati: calcolatore ---------- */
.calc {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(24px, 4vw, 56px);
  margin-top: clamp(28px, 3vw, 40px); align-items: start;
}
.calc-in {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px;
  background: #fff; border: 1.5px solid var(--ink); border-radius: 6px; padding: clamp(20px, 2.6vw, 32px);
}
.field-wide { grid-column: 1 / -1; }
.calc-out { background: var(--pr); color: var(--pr-text); border-radius: 6px; padding: clamp(20px, 2.6vw, 32px); }
.calc-empty { margin: 0; font-size: 1.125rem; }
.calc-label { margin: 0; font-size: .9375rem; }
.calc-range {
  margin: 6px 0 6px; color: var(--ink);
  font-size: clamp(30px, 3.2vw, 46px); font-weight: 700; line-height: 1.1; letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums lining-nums;
}
.calc-range span { font-size: .55em; font-weight: 500; color: var(--pr-text); letter-spacing: 0; }
.calc-mq { margin: 0 0 16px; font-variant-numeric: tabular-nums; }
.calc-pochi { margin: 0 0 16px; padding-left: 12px; border-left: 3px solid var(--pr-accent); color: var(--pr-accent); font-weight: 700; }
.calc-src { margin: 0; border-top: 1px solid var(--ink); font-size: .9375rem; }
.calc-src > div {
  display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 1fr); gap: 2px 16px;
  padding: 8px 0; border-bottom: 1px solid rgba(59,42,32,.22);
}
.calc-src dt { color: var(--pr-text); }
.calc-src dd { margin: 0; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.calc-note { margin: 10px 0 0; font-size: .875rem; color: #5a4a3f; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.calc-cta { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--ink); }
.calc-cta p { margin: 0; }
.calc-cta .actions { margin-top: 16px; }
.omi-all { margin-top: clamp(48px, 6vw, 80px); border-top: 1px solid var(--ink); border-bottom: 1px solid var(--line); }
.omi-all summary {
  display: list-item; cursor: pointer; min-height: 44px; padding: 14px 0;
  font-size: clamp(20px, 1.7vw, 24px); font-weight: 700; letter-spacing: -0.005em;
}
.omi-all summary:hover { color: var(--pr-accent); }
.omi-all[open] { padding-bottom: 24px; }
.omi.omi-first { margin-top: 18px; }

/* barra chiamata fissa (telefono) */
.callbar { display: none; }

/* ---------- tablet ---------- */
@media (max-width: 1000px) {
  .bar-in { gap: 20px; }
  .bar-nav { gap: 20px; }
  .bar-nav .nav-ct { display: none; }
  .scheda, .room { grid-template-columns: 1fr; }
  .ct-grid { grid-template-columns: 1fr; }
  .calc { grid-template-columns: 1fr; }
  .hb { grid-template-columns: 1fr; }
  .hb-pr .hb-pics { order: 0; }
  .hb-pics img { aspect-ratio: 4 / 3; }
  .phero h1 { font-size: clamp(34px, 5vw, 52px); }
  .room-fig { width: min(280px, 100%); }
}

/* ---------- telefono ---------- */
@media (max-width: 760px) {
  :root { --bar-h: 60px; --call-h: 60px; --id-h: 0px; }
  body { font-size: 16px; }
  /* lo spazio sotto la barra Chiama/WhatsApp sta nel footer: quando la barra si nasconde resta fondo scuro, non una striscia chiara */
  .foot { padding-bottom: calc(40px + var(--call-h) + env(safe-area-inset-bottom)); }
  .bar-in { gap: 12px; }
  .bar-call { display: none; }
  .brand strong { font-size: 1.0625rem; }
  .brand span { font-size: .8125rem; }
  .bar-nav { gap: 14px; }
  .bar-nav a { font-size: .9375rem; padding: 0; }
  .bar-nav .nav-ct { display: none; }

  /* home: il nome è già nella barra, la fascia col titolo resta solo per Google e lettori di schermo;
     «agente immobiliare a Prato» passa sotto il nome, come nelle altre pagine */
  .pg-home .bar .brand span { display: block; }
  .idline {
    position: absolute; width: 1px; height: 1px; min-height: 0; padding: 0; border: 0;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
  }
  /* con JS la barra Chiama/WhatsApp compare dopo la prima schermata (js/main.js) e le porte prendono tutto lo schermo;
     senza JS la barra è sempre lì e le porte le lasciano il posto */
  .doors {
    flex-direction: column;
    height: calc(100vh - var(--bar-h) - var(--call-h));
    height: calc(100svh - var(--bar-h) - var(--call-h));
    min-height: 460px; max-height: 760px;
  }
  .js .doors {
    height: calc(100vh - var(--bar-h));
    height: calc(100svh - var(--bar-h));
  }
  .door + .door { border-left: 0; border-top: 2px solid var(--paper); }
  .door-az img { object-position: 50% 58%; }
  .door-pr img { object-position: 60% 42%; }
  .door-body { padding: 18px 18px 20px; }
  .door-word { font-size: 46px; }
  .door-what { margin-top: 6px; font-size: 18px; max-width: none; min-height: 0; }
  .door-text { display: none; }
  .door-go { margin-top: 12px; min-height: 44px; padding: 0 18px; font-size: .9375rem; }
  .door-az::after { background: linear-gradient(to top, rgba(12,33,44,.95) 0%, rgba(12,33,44,.82) 45%, rgba(12,33,44,.5) 70%, rgba(12,33,44,.12) 92%); }
  .door-pr::after { background: linear-gradient(to top, rgba(46,20,10,.95) 0%, rgba(46,20,10,.82) 45%, rgba(46,20,10,.5) 70%, rgba(46,20,10,.1) 92%); }

  .phero { grid-template-columns: 1fr; height: auto; }
  .phero-img { order: -1; height: 30vh; height: 30svh; min-height: 210px; max-height: 340px; }
  .phero-text { padding: 28px var(--gut) 36px; }
  .phero h1 { font-size: 28px; }
  .phero .lead { margin-top: 14px; }
  .phero .actions { margin-top: 20px; width: 100%; }

  .types { grid-template-columns: 1fr; }
  .omi, .omi tbody, .omi tr, .omi caption { display: block; width: 100%; }
  .omi thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .omi caption { padding-bottom: 8px; border-bottom: 1px solid var(--ink); }
  .omi tr { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 16px; padding: 12px 0; border-bottom: 1px solid rgba(59,42,32,.22); }
  .omi th, .omi td { padding: 0; border: 0; }
  .omi tbody th { grid-column: 1 / -1; white-space: normal; }
  .omi td:not(.n) { grid-column: 1 / -1; margin-bottom: 6px; font-size: .9375rem; }
  .omi .n { width: auto; text-align: left; padding-left: 0; }
  .omi td.n::before { content: attr(data-l); display: block; font-size: .8125rem; font-weight: 500; color: #5a4a3f; }
  .nums dd { font-size: 20px; }
  .kv > div { grid-template-columns: 100px minmax(0, 1fr); }
  .prow { grid-template-columns: 1fr; gap: 18px; }
  .prow:nth-child(even) .prow-img { order: 0; }

  .map-scroll { overflow-x: auto; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; }
  .map-canvas { width: 640px; }
  .only-touch { display: inline; }
  .map-legend { font-size: .875rem; gap: 6px 14px; }

  .checks > div { grid-template-columns: 1fr; gap: 2px; }
  /* righe a tutta larghezza; se un'etichetta va a capo i numeri restano allineati in alto */
  .et-nums { grid-template-columns: auto auto minmax(0, 1fr); align-self: stretch; }
  .et-nums > div { padding-right: 14px; justify-content: flex-end; }
  .et-nums > div + div { padding-left: 14px; }
  .et-nums dd { font-size: 26px; }
  .et-nums dt { font-size: .8125rem; line-height: 1.3; }
  .sec-head, .docs { grid-template-columns: 1fr; }
  .ex-pair { grid-template-columns: 1fr; }
  .only-narrow { display: block; }
  /* i tre verdetti: in colonna erano quasi mille pixel di schermate, qui si scorrono di lato */
  .ex-verdetti > .ex-link { display: none; }
  .ex-strip {
    display: grid; grid-auto-flow: column; grid-auto-columns: 84%; gap: 10px;
    margin: 0 calc(-1 * var(--gut)); padding: 0 var(--gut) 6px;
    overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 var(--gut);
    overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; scrollbar-width: none;
  }
  .ex-strip::-webkit-scrollbar { display: none; }
  .ex-strip a { scroll-snap-align: start; border-radius: 4px; }
  .ex-strip a:focus-visible { outline: 3px solid var(--az-ink); outline-offset: -3px; }
  .phero-inset { display: none; }
  .pf-head { display: none; }
  .profili { margin-top: 28px; border-top: 1px solid var(--ink); }
  .pf { grid-template-columns: 112px minmax(0, 1fr); gap: 4px 16px; align-items: start; }
  .pf img { grid-row: span 2; }
  .sec .pf h3 { font-size: 1.125rem; }
  .pf p { font-size: .9375rem; }
  .steps li { grid-template-columns: 28px minmax(0, 1fr); }
  .steps p { grid-column: 2; }
  .zona-grid { grid-template-columns: 1fr; gap: 24px; }
  .comuni { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px; font-size: 24px; }
  .comuni li:not(:last-child)::after { content: none; }
  .f2, .f3 { grid-template-columns: 1fr; }
  .calc { grid-template-columns: 1fr; }
  .calc-in { grid-template-columns: 1fr; gap: 14px; }
  .calc-src > div { grid-template-columns: 1fr; }
  .form-send .btn-dark { flex: 1 1 100%; }
  .btn-dark { justify-self: stretch; }
  .actions .btn { width: 100%; }
  .foot-grid { grid-template-columns: 1fr; gap: 16px; }

  .callbar {
    display: grid; grid-template-columns: 1fr 1fr;
    position: fixed; z-index: 60; left: 0; right: 0; bottom: 0;
    height: calc(var(--call-h) + env(safe-area-inset-bottom));
    padding: 8px var(--gut) calc(8px + env(safe-area-inset-bottom));
    gap: 8px; background: var(--paper); box-shadow: 0 -1px 0 var(--line), 0 -6px 18px rgba(20,35,45,.08);
    transition: transform .25s ease, visibility 0s;
  }
  .js .callbar:not(.is-on) { transform: translateY(110%); visibility: hidden; transition: transform .25s ease, visibility 0s .25s; }
  .callbar a {
    display: flex; align-items: center; justify-content: center;
    min-height: 44px; border-radius: 6px;
    font-weight: 800; font-size: 1rem; text-decoration: none;
  }
  .callbar a:first-child { background: var(--ink); color: #fff; }
  .callbar a:last-child { background: #1d6b45; color: #fff; }
}
@media (max-width: 760px) and (prefers-reduced-motion: reduce) {
  .callbar, .js .callbar:not(.is-on) { transition: none; }
}
@media (max-width: 340px) {
  .brand span, .pg-home .bar .brand span { display: none; }
}
/* contrasto forzato (Windows): tendine e casella tornano native, la freccia e la spunta disegnate potrebbero sparire */
@media (forced-colors: active) {
  .field select, .check input { -webkit-appearance: auto; appearance: auto; background-image: none; }
}

/* Immagine intera sopra la pagina (js/main.js) */
.lightbox {
  width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0;
  padding: 64px 16px 16px; border: 0; overflow: auto; background: rgba(20, 35, 45, .95);
}
.lightbox[open] { display: flex; flex-direction: column; }
.lightbox::backdrop { background: rgba(20, 35, 45, .95); }
.lightbox img { display: block; margin: auto; max-width: 100%; height: auto; flex-shrink: 0; }
.lightbox-close {
  position: fixed; top: 10px; right: 16px; min-height: 44px; padding: 0 18px;
  border: 1px solid var(--az-text); background: var(--ink); color: #fff;
  font: inherit; font-weight: 600; cursor: pointer;
}
