/* FlatsMed — sistema visivo (30/09/2026)
   Colori presi dal logo: blu #013968, verde #30937B. Carattere: Inter.
   Le variabili hanno gli stessi nomi dei token del design system. */

:root {
  /* colore */
  --navy-700: #013968;   /* blu del marchio: bottoni principali, titoli, metà sinistra del logo */
  --navy-800: #012A4D;   /* blu al passaggio del mouse */
  --navy-100: #E3ECF4;   /* fondo delle icone blu */
  --teal-500: #30937B;   /* verde del marchio: superfici, icone, testo da 24px in su */
  --teal-600: #267A66;   /* verde per testo piccolo e link (5,2:1 sul bianco) */
  --teal-100: #E4F1EC;   /* fondo di conferme e stati "verificato" */
  --mist-200: #DFE7EC;   /* tinta fredda: segnaposto */
  --mist-300: #C2D4DE;   /* righe delle illustrazioni, bordi dei campi al passaggio */
  --surface: #FFFFFF;    /* fondo principale e schede */
  --ground: #F4F7F8;     /* fondo delle sezioni alterne */
  --line: #DCE4E8;       /* bordi di schede e campi */
  --ink: #0F2233;        /* testo principale */
  --muted: #4E5E6B;      /* testo secondario (6,6:1 sul bianco) */
  --danger: #B3261E;     /* errori dei moduli, stato "non disponibile" */
  --status-wait: #B7791F;    /* stato "in attesa" (3,6:1) */
  --status-info: #2F6FDE;    /* stato "prenotato" (4,6:1) */
  --status-neutral: #7E8C97; /* stato "in verifica", segni disattivi (3,4:1) */
  --on-navy: #FFFFFF;
  --on-navy-muted: #B9CCDB;

  --font: "Inter", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;

  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 24px;
  --space-6: 32px; --space-7: 48px; --space-8: 64px; --space-9: 96px;
  --radius-sm: 6px; --radius-md: 8px; --radius-lg: 12px; --radius-xl: 20px; --radius-pill: 999px;
  --shadow-card: 0 1px 2px rgba(1, 57, 104, .06), 0 8px 24px rgba(1, 57, 104, .07);
  --shadow-float: 0 2px 4px rgba(1, 57, 104, .06), 0 18px 40px rgba(1, 57, 104, .12);

  --gutter: clamp(20px, 4vw, 40px);
  --max: 1160px;
  --section: clamp(64px, 8vw, 104px);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

body { margin: 0; background: var(--surface); color: var(--ink); font: 400 17px/1.6 var(--font); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--teal-600); }
p { margin: 0; }
h1, h2, h3 { margin: 0; color: var(--ink); text-wrap: balance; }
:focus-visible { outline: 3px solid var(--teal-500); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: var(--max); margin: 0 auto; padding-inline: var(--gutter); }
.ico { width: 22px; height: 22px; flex: none; }

/* tipografia */
.label { display: inline-flex; width: fit-content; padding: 5px 12px; border-radius: var(--radius-pill); background: var(--teal-100); font-size: 13.5px; font-weight: 600; line-height: 1.3; color: var(--teal-600); }
section.alt .label { background: #fff; border: 1px solid #CFE5DC; }
.h1 { font-size: clamp(38px, 5.2vw, 60px); line-height: 1.05; font-weight: 700; letter-spacing: -.028em; color: var(--navy-700); }
.h1 em { font-style: normal; color: var(--teal-500); }
.h2 { font-size: clamp(28px, 3.4vw, 40px); line-height: 1.12; font-weight: 700; letter-spacing: -.022em; color: var(--navy-700); margin-top: var(--space-2); }
.h3 { font-size: 20px; line-height: 1.3; font-weight: 600; letter-spacing: -.01em; }
.lead { font-size: 19px; line-height: 1.55; color: var(--muted); max-width: 58ch; }
.small { font-size: 14px; color: var(--muted); }
.head { display: grid; gap: var(--space-3); max-width: 720px; }
.head .h2 { margin-top: 0; }

/* bottoni */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: 48px; padding: 0 22px; border-radius: var(--radius-md); border: 1.5px solid var(--navy-700);
  font: 600 16px/1 var(--font); text-decoration: none; cursor: pointer;
  background: var(--navy-700); color: var(--on-navy); transition: background .15s ease, color .15s ease;
}
.btn:hover { background: var(--navy-800); border-color: var(--navy-800); }
.btn.secondary { background: var(--surface); color: var(--navy-700); }
.btn.secondary:hover { background: var(--ground); }
.btn.teal { background: var(--teal-600); border-color: var(--teal-600); }
.btn.teal:hover { background: #1F6554; border-color: #1F6554; }
.btn.small { min-height: 42px; padding: 0 16px; font-size: 15px; }
.btn .ico { width: 18px; height: 18px; }
.actions { display: flex; flex-wrap: wrap; gap: var(--space-3); }

/* etichette di stato */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: var(--radius-pill); font-size: 12.5px; font-weight: 600; line-height: 1.2; background: var(--teal-100); color: var(--teal-600); }
.badge .ico { width: 14px; height: 14px; }
.badge.navy { background: var(--navy-100); color: var(--navy-700); }
.badge.neutral { background: var(--ground); color: var(--muted); border: 1px solid var(--line); }

section.blk { padding-block: var(--section); }
section.alt { background: var(--ground); }

/* ---------- barra ---------- */
.top { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.96); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); min-height: 68px; }
.logo { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; text-decoration: none; }
.logo img { width: 36px; height: auto; }
.logo span { font-size: 21px; font-weight: 700; letter-spacing: -.03em; color: var(--navy-700); }
.logo span b { color: var(--teal-500); font-weight: 700; }
.top nav { display: flex; align-items: center; gap: var(--space-5); }
.top nav a:not(.btn) { font-size: 15px; font-weight: 500; color: var(--ink); text-decoration: none; }
.top nav a:not(.btn):hover { color: var(--teal-600); }
@media (max-width: 820px) { .top nav a:not(.btn) { display: none; } }

/* ---------- apertura della home (dal mockup del 30/09) ---------- */
.top.over .wrap { max-width: 1300px; }
.top.over { background: rgba(247, 250, 252, .92); border-bottom-color: transparent; }
.top .btn .ico { width: 17px; height: 17px; }

.hero { position: relative; overflow: hidden; padding-block: clamp(40px, 6vw, 72px) clamp(40px, 5vw, 64px); background: linear-gradient(180deg, #F7FAFC 0%, #F1F5F8 100%); }
/* la foto occupa la parte destra e sfuma verso il testo e verso il basso */
.hero-photo {
  position: absolute; top: 0; right: 0; bottom: 0; left: 44%;
  background: url("assets/hero-roma.jpg") 62% 30% / cover no-repeat;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 34%), linear-gradient(180deg, #000 62%, transparent 94%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(90deg, transparent 0, #000 34%), linear-gradient(180deg, #000 62%, transparent 94%);
  mask-composite: intersect;
}
.hero .wrap { max-width: 1300px; }
.hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(24px, 4vw, 56px); align-items: center; min-height: 560px; }
.copy { display: grid; gap: var(--space-5); justify-items: start; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px 7px 11px; border-radius: var(--radius-pill); background: var(--teal-100); color: var(--teal-600); font-size: 14px; font-weight: 600; }
.pill .ico { width: 17px; height: 17px; }
.hero .h1 em { display: inline-block; }
.hero .lead { max-width: 46ch; }
.doors .btn { min-width: 200px; min-height: 52px; font-size: 16.5px; }
.hero-note { display: flex; gap: var(--space-3); align-items: flex-start; max-width: 44ch; font-size: 15px; color: var(--muted); line-height: 1.5; }
.hero-note .ico { width: 24px; height: 24px; color: var(--navy-700); margin-top: 1px; }

/* le due schede sopra la foto: una per lato */
.scene { position: relative; min-height: 580px; }
.float { margin: 0; position: absolute; }
.f-med { top: 0; left: 0; width: min(310px, 48%); }
.f-own { right: 0; bottom: 0; width: min(340px, 50%); }
.tag { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; background: var(--surface); border: 1px solid var(--line); border-bottom: 0; border-radius: var(--radius-lg) var(--radius-lg) 0 0; font-size: 14.5px; font-weight: 600; color: var(--navy-700); position: relative; top: 1px; }
.tag .ico { width: 18px; height: 18px; }
.float-card { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 0 var(--radius-lg) var(--radius-lg) var(--radius-lg); box-shadow: var(--shadow-float); padding: 16px; display: grid; gap: 12px; }
.float-card .ex { position: absolute; top: -30px; right: 0; font-size: 11.5px; padding: 3px 8px; background: rgba(255,255,255,.92); }
.minimap { width: 100%; height: auto; display: block; }
.place { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; color: var(--ink); }
.place .ico { width: 20px; height: 20px; color: var(--navy-700); }
.time { display: flex; align-items: baseline; gap: 10px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.time b { font-size: 36px; line-height: 1; font-weight: 700; letter-spacing: -.03em; color: var(--navy-700); font-variant-numeric: tabular-nums; }
.time span { font-size: 14px; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border-radius: var(--radius-pill); background: var(--ground); border: 1px solid var(--line); font-size: 12.5px; font-weight: 500; color: var(--ink); }
.chip .ico { width: 14px; height: 14px; color: var(--teal-600); }

.initials { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--navy-100); color: var(--navy-700); font-weight: 700; font-size: 17px; letter-spacing: .02em; }
.who { display: flex; gap: 12px; align-items: flex-start; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.who > div { display: grid; gap: 3px; justify-items: start; }
.who b { font-size: 16px; font-weight: 600; color: var(--navy-700); }
.who span:not(.badge) { font-size: 13px; color: var(--muted); line-height: 1.35; }
.who .badge { margin-top: 4px; }
.f-own ul { list-style: none; margin: 0; padding: 0 0 12px; border-bottom: 1px solid var(--line); display: grid; gap: 10px; }
.f-own li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.4; }
.f-own li .ico { width: 18px; height: 18px; color: var(--teal-500); }
.lock { display: flex; gap: 8px; align-items: center; font-size: 12.5px; color: var(--muted); }
.lock .ico { width: 15px; height: 15px; }

/* la fascia dei quattro punti */
.strip { position: relative; list-style: none; margin: clamp(28px, 4vw, 44px) 0 0; padding: clamp(18px, 2.4vw, 26px); display: grid; grid-template-columns: repeat(4, 1fr); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-xl); box-shadow: var(--shadow-card); }
.strip li { display: flex; gap: 14px; align-items: flex-start; padding-inline: clamp(12px, 1.8vw, 24px); }
.strip li + li { border-left: 1px solid var(--line); }
.strip .icon-tile { width: 52px; height: 52px; border-radius: 14px; }
.strip b { display: block; font-size: 16px; font-weight: 600; color: var(--navy-700); }
.strip span:not(.icon-tile) { display: block; margin-top: 2px; font-size: 14.5px; color: var(--muted); line-height: 1.45; }

.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-3); }
.ticks li { display: flex; gap: var(--space-3); align-items: flex-start; font-size: 16px; line-height: 1.45; }
.ticks .ico { width: 20px; height: 20px; color: var(--teal-500); margin-top: 1px; }

/* ---------- numeri ---------- */
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-5); margin-top: var(--space-7); }
.facts-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-xl); padding: clamp(24px, 3vw, 36px); display: grid; gap: var(--space-5); align-content: start; }
.facts-card header { display: flex; align-items: center; gap: var(--space-3); }
.icon-tile { width: 44px; height: 44px; border-radius: var(--radius-lg); display: grid; place-items: center; flex: none; background: var(--navy-100); color: var(--navy-700); }
.icon-tile.teal { background: var(--teal-100); color: var(--teal-600); }
.icon-tile .ico { width: 24px; height: 24px; }
.fact { display: grid; gap: 2px; padding-top: var(--space-4); border-top: 1px solid var(--line); }
.fact b { font-size: clamp(34px, 3.6vw, 44px); line-height: 1.05; font-weight: 700; letter-spacing: -.03em; color: var(--navy-700); font-variant-numeric: tabular-nums; }
.facts-card.owner .fact b { color: var(--teal-600); }
.fact span { color: var(--muted); font-size: 16px; }
.facts-card .close { font-weight: 500; }
.facts-card.purpose { grid-column: 1 / -1; grid-template-columns: minmax(0, .5fr) minmax(0, 1.5fr); align-items: center; gap: var(--space-5) clamp(24px, 4vw, 48px); }
.facts-card.purpose p { font-size: clamp(17px, 1.6vw, 19px); line-height: 1.6; color: var(--ink); max-width: 68ch; }
.source { margin-top: var(--space-5); font-size: 13px; color: var(--muted); }

/* ---------- la verifica in mezzo ---------- */
.middle .wrap { display: grid; gap: var(--space-7); }
.middle .head { justify-items: center; text-align: center; margin-inline: auto; }
.middle figure { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-xl); padding: clamp(16px, 3vw, 36px); }
.middle figure img { width: 100%; max-width: 760px; margin-inline: auto; }
.middle figcaption { display: grid; grid-template-columns: 1fr auto 1fr; gap: var(--space-4); max-width: 760px; margin: var(--space-4) auto 0; font-size: 15px; font-weight: 600; }
.middle figcaption span:first-child { color: var(--navy-700); }
.middle figcaption span:nth-child(2) { text-align: center; }
.middle figcaption span:last-child { color: var(--teal-600); text-align: right; }

/* ---------- come funziona ---------- */
.how-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: var(--space-5); margin-bottom: var(--space-7); }
.switch { display: inline-flex; padding: 4px; border-radius: var(--radius-lg); background: var(--ground); border: 1px solid var(--line); }
.switch button { min-height: 42px; padding: 0 18px; border: 0; border-radius: var(--radius-md); cursor: pointer; font: 600 15px/1 var(--font); background: none; color: var(--muted); }
.switch button[aria-pressed="true"] { background: var(--surface); color: var(--navy-700); box-shadow: 0 1px 3px rgba(1,57,104,.14); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-5); counter-reset: s; }
.steps li { display: grid; gap: var(--space-2); align-content: start; padding: var(--space-5); border-radius: var(--radius-xl); background: var(--surface); border: 1px solid var(--line); }
.steps li::before { counter-increment: s; content: counter(s); width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--navy-700); color: var(--on-navy); font-weight: 700; font-size: 15px; margin-bottom: var(--space-2); }
.steps li p { color: var(--muted); font-size: 16px; }
.note { margin-top: var(--space-5); display: flex; gap: var(--space-3); align-items: flex-start; color: var(--muted); max-width: 72ch; }
.note .ico { color: var(--teal-500); margin-top: 2px; }

/* ---------- cosa verifichiamo ---------- */
.verify .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 80px); align-items: center; }
.checks { list-style: none; margin: var(--space-6) 0 0; padding: 0; display: grid; gap: var(--space-4); }
.checks li { display: grid; grid-template-columns: 24px 1fr; gap: var(--space-3); }
.checks .ico { width: 24px; height: 24px; color: var(--teal-500); }
.checks b { display: block; font-weight: 600; }
.checks span { display: block; color: var(--muted); font-size: 16px; }
.caveat { margin-top: var(--space-5); padding: var(--space-4); border-radius: var(--radius-lg); background: var(--ground); color: var(--muted); font-size: 15px; display: flex; gap: var(--space-3); }
.caveat .ico { color: var(--navy-700); }
section.alt .caveat { background: var(--surface); border: 1px solid var(--line); }

.profile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-xl); box-shadow: var(--shadow-card); padding: clamp(20px, 3vw, 28px); display: grid; gap: var(--space-4); }
.profile-top { display: flex; gap: var(--space-4); align-items: center; }
.avatar { width: 64px; height: 64px; border-radius: 50%; background: var(--navy-100); color: var(--navy-700); display: grid; place-items: center; flex: none; }
.avatar .ico { width: 34px; height: 34px; }
.avatar.initials { font-size: 20px; }
.profile-top .h3 { margin-top: 6px; }
.profile-top p { color: var(--muted); font-size: 15px; }
.profile ul { list-style: none; margin: 0; padding: var(--space-4) 0 0; border-top: 1px solid var(--line); display: grid; gap: var(--space-3); }
.profile li { display: flex; gap: var(--space-3); align-items: center; font-size: 15.5px; }
.profile li .ico { width: 20px; height: 20px; color: var(--teal-500); }
.profile dl { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); padding-top: var(--space-4); border-top: 1px solid var(--line); }
.profile dt { font-size: 13px; color: var(--muted); }
.profile dd { margin: 0; font-weight: 600; font-size: 15.5px; }
.profile .foot-note { font-size: 13px; color: var(--muted); }

/* ---------- costi ---------- */
.cost .wrap { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(32px, 5vw, 64px); align-items: start; }
.cost .lead { margin-top: var(--space-4); }
.compare { border: 1px solid var(--line); border-radius: var(--radius-xl); overflow: hidden; background: var(--surface); box-shadow: var(--shadow-card); }
.crow { display: grid; grid-template-columns: .9fr .8fr 1.7fr; }
.crow + .crow { border-top: 1px solid var(--line); }
.crow > * { padding: 18px 20px; }
.chead > * { font-size: 14px; font-weight: 600; color: var(--muted); background: var(--ground); }
.chead > :last-child { background: var(--navy-700); color: var(--on-navy); }
.crow .q { font-size: 15px; color: var(--muted); }
.crow .us { background: #F3F8FB; }
.val { display: block; font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.us .val { color: var(--navy-700); }
.crow small { display: block; margin-top: 4px; font-size: 13.5px; color: var(--muted); line-height: 1.4; }
.crow .who { display: none; }

/* ---------- calcolatore ---------- */
.calc-box { border: 1px solid var(--line); border-radius: var(--radius-xl); display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); overflow: hidden; background: var(--surface); box-shadow: var(--shadow-card); }
.calc-in { padding: clamp(22px, 3.4vw, 40px); display: grid; gap: var(--space-5); align-content: start; }
.calc-in label { display: flex; justify-content: space-between; gap: var(--space-3); font-size: 15px; font-weight: 600; }
.calc-in label output { color: var(--navy-700); }
input[type="range"] { width: 100%; height: 44px; margin: 0; accent-color: var(--navy-700); }
.scale { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); }
.bar { height: 10px; border-radius: var(--radius-pill); background: var(--teal-100); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--navy-700); border-radius: inherit; transition: width .15s ease; }
.calc-note { font-size: 14px; color: var(--muted); }
.calc-out { background: var(--navy-700); color: var(--on-navy); padding: clamp(22px, 3.4vw, 40px); display: grid; align-content: center; gap: var(--space-2); }
.calc-out .label { color: var(--on-navy-muted); }
.calc-out .big { font-size: clamp(52px, 6vw, 72px); line-height: 1; font-weight: 700; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.calc-out dl { margin: var(--space-4) 0 0; display: grid; gap: 6px; font-variant-numeric: tabular-nums; }
.calc-out dl div { display: flex; justify-content: space-between; gap: var(--space-3); border-top: 1px solid rgba(255,255,255,.18); padding-top: 8px; font-size: 15px; }
.calc-out dt { color: var(--on-navy-muted); }
.calc-out dd { margin: 0; font-weight: 600; }

/* ---------- oltre la prima casa ---------- */
.preview { margin-top: var(--space-7); display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.7fr); gap: var(--space-5); align-items: center; --x: 50%; --y: 50%; }
.preview-win { order: 2; }
.preview-win { border: 1px solid var(--line); border-radius: var(--radius-xl); background: var(--surface); box-shadow: var(--shadow-float); overflow: hidden; }
.preview-bar { display: flex; align-items: center; gap: 6px; padding: 10px 16px; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.preview-bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--mist-200); }
.preview-bar span { margin-left: auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.preview-screen { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--ground); }
.pv-scene { position: absolute; inset: 0; margin: 0; opacity: 0; transition: opacity .6s ease; }
.pv-scene.is-on { opacity: 1; }
.pv-scene img { display: block; width: 100%; height: 100%; object-fit: cover; transform-origin: var(--x) var(--y); }
.toast { position: absolute; left: 50%; top: 7%; display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: var(--radius-pill); background: var(--navy-700); color: var(--on-navy); font-size: clamp(12px, 1.4vw, 15px); font-weight: 600; white-space: nowrap; box-shadow: var(--shadow-float); opacity: 0; transform: translate(-50%, -12px); }
.toast .ico { width: 18px; height: 18px; color: #9FD8C6; }
.cursor { position: absolute; left: var(--x); top: var(--y); width: 22px; height: 22px; margin: -4px 0 0 -4px; opacity: 0; pointer-events: none; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 3l15 8-6.5 1.6L9.6 19z' fill='%23013968' stroke='%23fff' stroke-width='1.6' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / contain; }
.cursor::after { content: ""; position: absolute; left: -9px; top: -9px; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--teal-500); opacity: 0; }
.preview-progress { height: 3px; background: var(--mist-200); }
.preview-progress b { display: block; height: 100%; width: 0; background: var(--teal-500); }
.preview.play .pv-scene.is-on img { animation: scena-zoom 6s ease-in-out both; }
.preview.play .pv-scene.is-on .toast { animation: scena-toast 6s ease both; }
.preview.play .cursor { animation: scena-cursore 6s ease-in-out both; }
.preview.play .cursor::after { animation: scena-tocco 6s ease-out both; }
.preview.play .preview-progress b { animation: scena-barra 6s linear both; }
.preview.paused * { animation-play-state: paused !important; }
@keyframes scena-zoom { 0%, 15% { transform: scale(1); } 55%, 88% { transform: scale(1.3); } 100% { transform: scale(1.04); } }
@keyframes scena-cursore { 0% { opacity: 0; transform: translate(120px, 90px); } 12% { opacity: 1; } 42% { transform: translate(0, 0); } 46% { transform: translate(0, 0) scale(.82); } 50%, 85% { opacity: 1; transform: translate(0, 0) scale(1); } 95%, 100% { opacity: 0; } }
@keyframes scena-tocco { 0%, 45% { opacity: 0; transform: scale(.4); } 48% { opacity: 1; } 62%, 100% { opacity: 0; transform: scale(1.8); } }
@keyframes scena-toast { 0%, 50% { opacity: 0; transform: translate(-50%, -12px); } 56%, 88% { opacity: 1; transform: translate(-50%, 0); } 96%, 100% { opacity: 0; transform: translate(-50%, 0); } }
@keyframes scena-barra { from { width: 0; } to { width: 100%; } }
.later { display: grid; gap: var(--space-3); }
.later button { display: grid; grid-template-columns: auto 1fr; gap: var(--space-3); align-content: start; align-items: center; text-align: left; font: inherit; color: inherit; cursor: pointer; padding: var(--space-4) var(--space-5); border: 1px solid var(--line); border-radius: var(--radius-xl); background: var(--surface); transition: border-color .2s, background .2s; }
.later button .badge { justify-self: end; }
.later button .h3, .later button .p { grid-column: 1 / -1; }
.later button .p { color: var(--muted); font-size: 14px; line-height: 1.5; }
.later button .h3 { font-size: 17px; }
.later button:hover { border-color: var(--mist-300); }
.later button[aria-selected="true"] { border-color: #BFDCD1; background: #F6FBF9; }
.later button:focus-visible { outline: 2px solid var(--navy-700); outline-offset: 2px; }

/* ---------- chi c'è dietro ---------- */
.founder .wrap { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, .6fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.founder blockquote { margin: var(--space-4) 0 0; font-size: clamp(20px, 2.2vw, 25px); line-height: 1.45; font-weight: 500; letter-spacing: -.01em; max-width: 42ch; }
.founder .sign { margin-top: var(--space-5); font-weight: 600; }
.founder .role { font-size: 15px; color: var(--muted); }
.founder.dark { background: var(--navy-700); color: var(--on-navy); }
.founder.dark .label { background: rgba(255,255,255,.1); color: #CFE6DE; }
.founder.dark .role { color: var(--on-navy-muted); }
.founder-art { width: 100%; max-width: 300px; justify-self: end; height: auto; font-family: var(--font); }

/* ---------- domande ---------- */
.faq .wrap { display: grid; grid-template-columns: minmax(0, .65fr) minmax(0, 1.35fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
.faq-list { display: grid; gap: var(--space-3); }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: var(--space-4); align-items: center; min-height: 56px; padding: 14px 18px; font-weight: 600; font-size: 16.5px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 9px; height: 9px; border-right: 2px solid var(--navy-700); border-bottom: 2px solid var(--navy-700); transform: rotate(45deg); margin-top: -4px; transition: transform .2s ease; }
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: 4px; }
.faq details p { padding: 0 18px 18px; color: var(--muted); max-width: 64ch; }

/* ---------- chiusura ---------- */
.cta { position: relative; overflow: hidden; background: var(--navy-700); color: var(--on-navy); border-radius: var(--radius-xl); padding: clamp(32px, 5vw, 56px); display: grid; grid-template-columns: minmax(0, 1.3fr) auto; gap: var(--space-5); align-items: center; }
.cta::after { /* frammento di tetto verde, dai riferimenti */
  content: ""; position: absolute; right: -48px; bottom: -48px; width: 230px; height: 150px; background: var(--teal-500);
  clip-path: polygon(0 100%, 0 64%, 58% 0, 100% 0, 100% 100%); }
.cta > * { position: relative; z-index: 1; }
.cta .h2 { color: var(--on-navy); margin: 0; }
.cta p { color: var(--on-navy-muted); margin-top: var(--space-2); }
.cta .actions { justify-content: flex-end; }
.cta .btn { background: var(--surface); color: var(--navy-700); border-color: var(--surface); }
.cta .btn:hover { background: var(--teal-100); border-color: var(--teal-100); }
.cta .btn.ghost { background: var(--navy-700); color: var(--on-navy); border-color: rgba(255,255,255,.6); }
.cta .btn.ghost:hover { background: var(--navy-800); }

/* ---------- piede ---------- */
footer.foot { background: var(--ground); border-top: 1px solid var(--line); padding-block: var(--space-7); }
footer.foot .wrap { display: grid; gap: var(--space-4); }
.foot-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-4); align-items: center; }
.foot nav { display: flex; flex-wrap: wrap; gap: 0 var(--space-5); }
.foot nav a { font-size: 15px; font-weight: 500; color: var(--ink); text-decoration: none; padding-block: 12px; }
.foot nav a:hover { color: var(--teal-600); }
.foot p { font-size: 14px; color: var(--muted); max-width: 72ch; }
.foot p a { color: var(--ink); font-weight: 500; text-underline-offset: 3px; overflow-wrap: anywhere; }
.foot p a:hover { color: var(--teal-600); }

/* =========================================================
   Pagine di spiegazione
   ========================================================= */
.page-hero { padding-block: clamp(44px, 6vw, 80px) var(--section); background: linear-gradient(var(--surface), var(--surface) 70%, var(--ground)); }
.page-hero .wrap { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.page-hero .art { display: grid; gap: var(--space-5); }
.page-hero .art img { width: 100%; max-width: 420px; justify-self: center; }
.top .swap { font-weight: 600; }

.brief { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-xl); box-shadow: var(--shadow-card); padding: var(--space-5); }
.brief h2 { font-size: 16px; font-weight: 700; color: var(--navy-700); }
.brief dl { margin: var(--space-3) 0 0; }
.brief dl div { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: var(--space-3); padding-block: 10px; border-top: 1px solid var(--line); }
.brief dt { font-size: 14px; color: var(--muted); }
.brief dd { margin: 0; font-weight: 600; font-size: 15px; line-height: 1.4; }
.brief dd.ok { color: var(--teal-600); }

.cases { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-5); margin-top: var(--space-7); }
.case { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-xl); padding: var(--space-6); display: grid; gap: var(--space-3); align-content: start; justify-items: start; }
.case p { color: var(--muted); }

.phases { list-style: none; margin: var(--space-7) 0 0; padding: 0; display: grid; gap: var(--space-4); counter-reset: f; }
.phase { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: var(--space-5) clamp(28px, 5vw, 56px); padding: clamp(22px, 3vw, 32px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-xl); }
.phase .n { display: inline-flex; align-items: center; gap: var(--space-2); font-size: 14px; font-weight: 600; color: var(--teal-600); }
.phase .n::before { counter-increment: f; content: counter(f); width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--navy-700); color: var(--on-navy); font-size: 14px; font-weight: 700; }
.phase .h3 { margin-top: var(--space-3); font-size: 22px; color: var(--navy-700); }
.phase .sum { margin-top: var(--space-2); color: var(--muted); max-width: 42ch; }
.points { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); align-content: start; }
.point { background: var(--ground); border-radius: var(--radius-lg); padding: var(--space-4); display: grid; grid-template-columns: auto 1fr; gap: 2px var(--space-3); align-content: start; }
.point .ico { grid-row: span 2; width: 22px; height: 22px; color: var(--navy-700); margin-top: 1px; }
.point b { font-weight: 600; font-size: 15.5px; }
.point p { font-size: 15px; color: var(--muted); }
.point.solo { grid-column: 1 / -1; }

.traits { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-4); margin-top: var(--space-7); }
.traits > div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-xl); padding: var(--space-5); display: grid; gap: var(--space-2); align-content: start; }
.traits .icon-tile { margin-bottom: var(--space-2); }
.traits p { font-size: 15px; color: var(--muted); }

.levels { list-style: none; margin: var(--space-6) 0 0; padding: 0; display: grid; gap: var(--space-3); }
.levels li { display: grid; grid-template-columns: auto 1fr; gap: 2px var(--space-4); padding: var(--space-4); border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
.levels .icon-tile { grid-row: span 2; width: 40px; height: 40px; }
.levels b { font-weight: 600; }
.levels span { color: var(--muted); font-size: 15px; }

.dodont { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-5); margin-top: var(--space-7); }
.dodont > div { border-radius: var(--radius-xl); padding: var(--space-6); border: 1px solid var(--line); background: var(--surface); }
.dodont .yes { border-color: #BFDCD1; background: #F6FBF9; }
.dodont ul { list-style: none; margin: var(--space-4) 0 0; padding: 0; display: grid; gap: var(--space-3); }
.dodont li { display: flex; gap: var(--space-3); align-items: flex-start; }
.dodont li .ico { width: 20px; height: 20px; margin-top: 2px; }
.dodont .yes .ico { color: var(--teal-500); }
.dodont .no .ico { color: var(--muted); }

.prose { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
.prose .body p { color: var(--muted); }
.prose .body p + p { margin-top: var(--space-3); }
.facts3 { margin: var(--space-5) 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-3); }
.facts3 div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--space-4); }
.facts3 dt { font-size: 13px; color: var(--muted); }
.facts3 dd { margin: 4px 0 0; font-size: 18px; font-weight: 700; color: var(--navy-700); letter-spacing: -.01em; }

/* modulo */
.signup .wrap { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, .7fr); gap: clamp(32px, 5vw, 64px); align-items: start; }
.signup form { margin-top: var(--space-6); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-xl); box-shadow: var(--shadow-card); padding: clamp(20px, 3vw, 32px); display: grid; gap: 18px; }
.campi { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.campo label { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 600; color: var(--ink); }
.campo label .opt { font-weight: 400; color: var(--muted); }
.campo input, .campo select, .campo textarea { width: 100%; min-height: 48px; padding: 11px 14px; border: 1px solid var(--line); border-radius: var(--radius-md); font: 400 16px/1.3 var(--font); color: var(--ink); background: var(--surface); transition: border-color .15s ease, box-shadow .15s ease; }
.campo input::placeholder, .campo textarea::placeholder { color: #6E7C87; }
.campo select { appearance: none; -webkit-appearance: none; padding-right: 40px; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23013968' stroke-width='1.75' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 15px center; }
.campo textarea { min-height: 104px; resize: vertical; }
.campo input:hover, .campo select:hover, .campo textarea:hover { border-color: var(--mist-300); }
.campo input:focus, .campo select:focus, .campo textarea:focus { outline: none; border-color: var(--navy-700); box-shadow: 0 0 0 3px rgba(48,147,123,.28); }
.campo [aria-invalid="true"] { border-color: var(--danger); }
.errore { margin-top: 6px; font-size: 14px; color: var(--danger); }
.consensi { background: var(--ground); border-radius: var(--radius-lg); padding: var(--space-4); display: grid; gap: var(--space-3); }
.consenso { display: flex; gap: var(--space-3); align-items: flex-start; }
.consenso input { width: 20px; height: 20px; margin-top: 2px; flex: none; accent-color: var(--navy-700); }
.consenso label { font-size: 15px; color: var(--muted); line-height: 1.45; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.avviso { padding: 12px 14px; border-radius: var(--radius-md); font-size: 15px; }
.avviso.err { background: #FBEDEC; color: #8A2019; }
.signup button[type=submit] { width: 100%; min-height: 52px; font-size: 17px; }
.signup .reassure { text-align: center; font-size: 14px; color: var(--muted); }
.esito { margin-top: var(--space-6); border: 1px solid #BFDCD1; background: var(--teal-100); border-radius: var(--radius-xl); padding: var(--space-6); }
.esito h3 { font-size: 26px; color: var(--teal-600); letter-spacing: -.02em; }
.esito p { margin-top: var(--space-2); }

.after { position: sticky; top: 92px; border: 1px solid var(--line); border-radius: var(--radius-xl); padding: var(--space-5); background: var(--surface); }
.after ol { list-style: none; margin: var(--space-4) 0 0; padding: 0; }
.after li { position: relative; padding: 0 0 var(--space-5) 36px; }
.after li:last-child { padding-bottom: 0; }
.after li::before { content: ""; position: absolute; left: 0; top: 1px; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--navy-700); background: var(--surface); box-sizing: border-box; }
.after li:first-child::before { background: var(--teal-500); border-color: var(--teal-500); }
.after li::after { content: ""; position: absolute; left: 10px; top: 27px; bottom: 4px; width: 2px; background: var(--line); }
.after li:last-child::after { display: none; }
.after li b { display: block; font-weight: 600; }
.after li span { font-size: 15px; color: var(--muted); }

/* ---------- stesso linguaggio della hero in tutte le schede ---------- */
.facts-card, .steps li, .later button, .faq details, .way, .case, .traits > div, .phase, .levels li, .dodont > div, .after, .middle figure { box-shadow: var(--shadow-card); }
.page-hero { background: linear-gradient(180deg, #F7FAFC 0%, #F1F5F8 100%); }
.page-hero + section.blk:not(.alt) { border-top: 1px solid var(--line); }

/* ---------- tablet ---------- */
@media (max-width: 1080px) {
  .strip { grid-template-columns: 1fr 1fr; gap: var(--space-5) 0; }
  .strip li:nth-child(3) { border-left: 0; }
}
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; min-height: 0; }
  .hero-photo { display: none; }
  .scene { min-height: 0; display: grid; gap: var(--space-5); padding: clamp(20px, 5vw, 40px); border-radius: var(--radius-xl); background: url("assets/hero-roma.jpg") 60% 40% / cover no-repeat; }
  .float { position: static; width: auto; max-width: 360px; }
  .f-own { justify-self: end; }
  .hero .wrap, .page-hero .wrap, .verify .wrap, .cost .wrap, .faq .wrap, .calc-box, .founder .wrap, .prose, .signup .wrap { grid-template-columns: 1fr; }
  .phase { grid-template-columns: 1fr; }
  .traits { grid-template-columns: 1fr 1fr; }
  .preview { grid-template-columns: 1fr; }
  .preview-win { order: 0; }
  .founder-art { justify-self: start; max-width: 220px; }
  .after { position: static; }
  .cta { grid-template-columns: 1fr; }
  .cta .actions { justify-content: flex-start; }
  .page-hero .art img { max-width: 340px; }
}

/* ---------- telefono ---------- */
@media (max-width: 640px) {
  body { font-size: 16px; }
  .lead { font-size: 17px; }
  .strip { grid-template-columns: 1fr; gap: 0; padding-block: 8px; }
  .strip li { padding: 14px 4px; }
  .strip li + li { border-left: 0; border-top: 1px solid var(--line); }
  .scene { padding: 16px; }
  .f-own { justify-self: stretch; }
  .float { max-width: none; }
  .doors .btn { min-width: 0; }
  .facts-card.purpose { grid-template-columns: 1fr; }
  .facts, .cases, .points, .dodont, .campi, .traits, .facts3 { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; gap: var(--space-3); }
  .switch { width: 100%; }
  .switch button { flex: 1; padding: 0 10px; }
  .actions, .actions .btn { width: 100%; }
  .middle figcaption { grid-template-columns: 1fr 1fr; font-size: 14px; }
  .middle figcaption span:nth-child(2) { display: none; }
  .profile dl { grid-template-columns: 1fr; }
  .chead { display: none; }
  .crow { grid-template-columns: 1fr 1fr; }
  .crow .q { grid-column: 1 / -1; padding-bottom: 0; color: var(--ink); font-weight: 600; }
  .crow .who { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 2px; }
  .brief dl div { grid-template-columns: 1fr; gap: 2px; }
  .case, .dodont > div { padding: var(--space-5); }
  .cta { padding-bottom: 96px; }
  .cta::after { width: 150px; height: 96px; right: -30px; bottom: -30px; }
}

/* ---------- quanto costa trovare casa ---------- */
.calc2 { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.6fr); gap: var(--space-5); margin-top: var(--space-7); align-items: start; }
.calc2-in { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-xl); box-shadow: var(--shadow-card); padding: var(--space-5); display: grid; gap: var(--space-5); }
.seg-field { border: 0; margin: 0; padding: 0; min-width: 0; }
.seg-field legend { font-size: 14px; font-weight: 600; margin-bottom: 6px; padding: 0; }
.seg { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: var(--radius-lg); background: var(--ground); border: 1px solid var(--line); }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label { min-height: 42px; display: grid; place-items: center; border-radius: var(--radius-md); font-size: 15px; font-weight: 600; color: var(--muted); cursor: pointer; }
.seg input:checked + label { background: var(--surface); color: var(--navy-700); box-shadow: 0 1px 3px rgba(1,57,104,.14); }
.seg input:focus-visible + label { outline: 3px solid var(--teal-500); outline-offset: 2px; }
.campo-range label { display: flex; justify-content: space-between; gap: var(--space-3); font-size: 14px; font-weight: 600; }
.campo-range output { color: var(--navy-700); }
.campo-range .small { margin-top: var(--space-2); }
.calc2-out { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-4); }
.way { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-xl); padding: var(--space-5); display: grid; gap: var(--space-3); align-content: start; }
.way header { display: grid; gap: var(--space-3); }
.way.agency { border-color: #EFCDC9; background: linear-gradient(160deg, #FBE9E7 0%, #FFFFFF 78%); }
.way.ours { border-color: #BFDCD1; background: linear-gradient(160deg, #E4F1EC 0%, #FFFFFF 78%); }
.big-num { font-size: 40px; line-height: 1; font-weight: 700; letter-spacing: -.03em; color: var(--navy-700); font-variant-numeric: tabular-nums; }
.warn { list-style: none; margin: 0; padding: var(--space-3) 0 0; border-top: 1px solid var(--line); display: grid; gap: var(--space-2); font-size: 14px; color: var(--muted); }
.warn li { padding-left: 14px; position: relative; }
.warn li::before { content: ""; position: absolute; left: 0; top: .62em; width: 6px; height: 6px; border-radius: 50%; background: var(--mist-300); }
.way .ticks li { font-size: 15px; }
.entry-cost { grid-column: 1 / -1; padding: var(--space-4) var(--space-5); border-radius: var(--radius-lg); background: var(--ground); font-size: 15px; color: var(--ink); }
.entry-cost b { color: var(--navy-700); }
.entry-cost.aside-note { background: none; border: 1px dashed var(--mist-300); color: var(--muted); }
@media (max-width: 1080px) { .calc2 { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .calc2-out { grid-template-columns: 1fr; } }

/* Informativa privacy: testo lungo, colonna stretta */
main.legal { padding-block: var(--space-8) var(--section); }
main.legal .wrap { max-width: 760px; }
main.legal section + section { margin-top: var(--space-7); }
main.legal .h2 { font-size: clamp(22px, 2.4vw, 28px); margin-bottom: var(--space-3); }
main.legal .lead { font-size: 17px; max-width: none; }
main.legal .lead + .lead { margin-top: var(--space-3); }
main.legal .first .lead { margin-top: var(--space-4); }
main.legal .banner { margin-top: var(--space-5); padding: var(--space-4) var(--space-5); background: #FFF6E5; border: 1px solid #F1D7A6; border-radius: var(--radius-lg); color: var(--ink); font-size: 15px; }

/* barra «Compila il modulo» fissa in basso, solo sul telefono */
.sticky-cta { display: none; }
@media (max-width: 760px) {
  .sticky-cta { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 30; display: flex; gap: var(--space-2); padding: var(--space-2); background: rgba(255,255,255,.97); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-float); transition: transform .2s ease, opacity .2s ease; }
  .sticky-cta .btn { flex: 1; min-height: 46px; padding: 0 12px; font-size: 15px; }
  .sticky-cta.via { opacity: 0; transform: translateY(120%); pointer-events: none; }
  body { padding-bottom: 80px; }
}
.top .btn { white-space: nowrap; }
@media (max-width: 760px) { .top nav .btn { display: none; } }   /* sul telefono c'è la barra in basso */
