/* EMMEKAPPA Immobiliare — foglio di stile (2026)
   Percorso: la casa si accende al buio → la camera entra dalla finestra → manifesto → servizi in galleria orizzontale
   → la planimetria si costruisce in 5 fasi → calcolatore → zona → si torna alla casa illuminata (contatti) */

/* ---------- Font self-hosted (SIL OFL 1.1 – vedi assets/fonts/OFL-*.txt) ---------- */
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 400; font-display: swap; src: url('../assets/fonts/poppins-400.woff2') format('woff2'); }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 500; font-display: swap; src: url('../assets/fonts/poppins-500.woff2') format('woff2'); }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 600; font-display: swap; src: url('../assets/fonts/poppins-600.woff2') format('woff2'); }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 700; font-display: swap; src: url('../assets/fonts/poppins-700.woff2') format('woff2'); }
@font-face { font-family: 'Lora'; font-style: italic; font-weight: 400 700; font-display: swap; src: url('../assets/fonts/lora-italic-variable.woff2') format('woff2'); }

/* ---------- Token ---------- */
:root {
  /* sezioni chiare (seguono il tema del dispositivo) */
  --bg: #F6F1E9;
  --surface: #FFFFFF;
  --surface-2: #EFE8DC;
  --ink: #1F1916;
  --muted: #6A6458;
  --line: #E2D8C6;
  --accent: #7A1A21;
  --accent-soft: rgba(122, 26, 33, 0.08);
  --glass: rgba(246, 241, 233, 0.72);
  --glass-line: rgba(31, 25, 22, 0.08);
  --room: rgba(232, 184, 150, 0.38);
  --water: #D7E0E6;
  --water-line: #7F98A8;
  --water-ink: #4F6B7C;
  --area: rgba(122, 26, 33, 0.06);
  --logo-pos: block;
  --logo-neg: none;

  /* sezioni notturne (uguali in entrambi i temi) */
  --night: #120406;
  --night-2: #1E070B;
  --wine: #3C0008;
  --wine-2: #5A1218;
  --cream: #F4EFE7;
  --cream-muted: #CDBDB1;
  --cream-line: rgba(244, 239, 231, 0.14);
  --peach: #E8B896;
  --amber: #FFB26B;
  --ok: #7FCB9C;
  --bad: #F29A9A;
  --seg-fixed: #A8937C;

  --font: 'Poppins', 'Helvetica Neue', Arial, sans-serif;
  --serif: 'Lora', Georgia, 'Times New Roman', serif;
  --maxw: 1240px;
  --gutter: clamp(20px, 4vw, 48px);
  --ease: cubic-bezier(.2, .7, .1, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --grain: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .5 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #140E0C; --surface: #1D1613; --surface-2: #272019; --ink: #F4EFE7; --muted: #B5A898; --line: #362C26;
    --accent: #E59096; --accent-soft: rgba(229, 144, 150, 0.12); --glass: rgba(20, 14, 12, 0.7); --glass-line: rgba(244, 239, 231, 0.1);
    --room: rgba(232, 184, 150, 0.16); --water: #1D2A32; --water-line: #5E7E92; --water-ink: #9DB6C5; --area: rgba(229, 144, 150, 0.08);
    --logo-pos: none; --logo-neg: block;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #140E0C; --surface: #1D1613; --surface-2: #272019; --ink: #F4EFE7; --muted: #B5A898; --line: #362C26;
  --accent: #E59096; --accent-soft: rgba(229, 144, 150, 0.12); --glass: rgba(20, 14, 12, 0.7); --glass-line: rgba(244, 239, 231, 0.1);
  --room: rgba(232, 184, 150, 0.16); --water: #1D2A32; --water-line: #5E7E92; --water-ink: #9DB6C5; --area: rgba(229, 144, 150, 0.08);
  --logo-pos: none; --logo-neg: block;
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--night); color: var(--ink); font-family: var(--font); font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: clip; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 60; background: var(--night); }
main { display: block; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { margin: 0; text-wrap: balance; font-weight: 600; }
p { margin: 0; }
a { color: inherit; }
[hidden] { display: none !important; }
::selection { background: var(--peach); color: #1F1916; }
:focus-visible { outline: 2px solid var(--peach); outline-offset: 3px; border-radius: 8px; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--cream); color: #1F1916; padding: 10px 16px; border-radius: 999px; text-decoration: none; font-weight: 600; }
.skip:focus { top: calc(12px + env(safe-area-inset-top, 0px)); }

.wrap { max-width: var(--maxw); margin: 0 auto; padding-left: max(var(--gutter), env(safe-area-inset-left, 0px)); padding-right: max(var(--gutter), env(safe-area-inset-right, 0px)); }
.serif { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -0.01em; }
.eyebrow { display: inline-flex; align-items: center; gap: 12px; font-size: 12px; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; color: var(--accent); }
.eyebrow::before { content: ""; width: 28px; height: 1.5px; background: currentColor; }
.eyebrow-light { color: var(--peach); }
h2 { font-size: clamp(34px, 5.2vw, 72px); line-height: 1.04; letter-spacing: -0.035em; }

/* ---------- Pulsanti ---------- */
.btn { --bx: 0px; --by: 0px; position: relative; display: inline-flex; align-items: center; gap: 10px; padding: 15px 26px; border-radius: 999px; font: 600 15px/1 var(--font); text-decoration: none; white-space: nowrap; border: 1px solid transparent; cursor: pointer; transition: background .35s var(--ease), color .35s var(--ease), border-color .35s var(--ease), transform .45s var(--ease-out), box-shadow .35s var(--ease); transform: translate(var(--bx), var(--by)); }
.btn .arr { transition: transform .35s var(--ease-out); }
.btn:hover .arr { transform: translateX(4px); }
.btn-light { background: var(--cream); color: #1F1916; box-shadow: 0 10px 40px -10px rgba(255, 178, 107, 0.45); }
.btn-light:hover { background: #fff; box-shadow: 0 14px 50px -8px rgba(255, 178, 107, 0.65); }
.btn-glass { color: var(--cream); background: rgba(244, 239, 231, 0.06); border-color: rgba(244, 239, 231, 0.22); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.btn-glass:hover { background: rgba(244, 239, 231, 0.14); border-color: rgba(244, 239, 231, 0.4); }
.btn-cta { padding: 11px 20px; font-size: 14px; background: #7A1A21; color: #fff; }
.btn-cta:hover { background: #8E2129; }

/* ---------- Header a pillola ---------- */
.hdr { position: fixed; z-index: 50; top: calc(14px + env(safe-area-inset-top, 0px)); left: 0; right: 0; display: flex; justify-content: center; padding-left: max(14px, env(safe-area-inset-left, 0px)); padding-right: max(14px, env(safe-area-inset-right, 0px)); pointer-events: none; transition: transform .9s var(--ease-out), opacity .9s var(--ease-out); }
.hdr-pill { pointer-events: auto; position: relative; display: flex; align-items: center; gap: 8px; width: min(100%, 980px); padding: 8px 8px 8px 20px; border-radius: 999px; border: 1px solid var(--h-line); background: var(--h-bg); color: var(--h-fg); backdrop-filter: saturate(160%) blur(18px); -webkit-backdrop-filter: saturate(160%) blur(18px); box-shadow: 0 12px 40px -18px rgba(0, 0, 0, 0.45); transition: background .5s var(--ease), color .5s var(--ease), border-color .5s var(--ease); }
.hdr[data-tone="dark"] { --h-bg: rgba(18, 4, 6, 0.42); --h-fg: var(--cream); --h-line: rgba(244, 239, 231, 0.12); --lp: none; --ln: block; }
.hdr[data-tone="light"] { --h-bg: var(--glass); --h-fg: var(--ink); --h-line: var(--glass-line); --lp: var(--logo-pos); --ln: var(--logo-neg); }
.brand { display: block; margin-right: auto; }
.brand img { height: 38px; width: auto; }
.brand .logo-pos { display: var(--lp); }
.brand .logo-neg { display: var(--ln); }
.nav { display: flex; gap: 2px; }
.nav a { position: relative; padding: 9px 15px; border-radius: 999px; font-size: 14px; font-weight: 500; text-decoration: none; opacity: .78; transition: opacity .3s, background .3s; }
.nav a:hover { opacity: 1; }
.nav a.active { opacity: 1; background: color-mix(in srgb, currentColor 10%, transparent); }
.progress { position: absolute; left: 50%; bottom: -7px; width: min(calc(100% - 120px), 860px); height: 2px; transform: translateX(-50%); border-radius: 2px; overflow: hidden; pointer-events: none; }
.progress i { display: block; height: 100%; width: 100%; transform-origin: left; transform: scaleX(0); background: linear-gradient(90deg, var(--peach), var(--amber)); }
.menu-btn { display: none; width: 44px; height: 44px; border: 0; border-radius: 50%; background: color-mix(in srgb, currentColor 10%, transparent); color: inherit; cursor: pointer; position: relative; }
.menu-btn i { position: absolute; left: 14px; right: 14px; height: 1.5px; background: currentColor; transition: transform .4s var(--ease-out); }
.menu-btn i:first-child { top: 18px; } .menu-btn i:last-child { top: 25px; }
.menu-btn[aria-expanded="true"] i:first-child { transform: translateY(3.5px) rotate(45deg); }
.menu-btn[aria-expanded="true"] i:last-child { transform: translateY(-3.5px) rotate(-45deg); }
.menu { position: fixed; inset: 0; z-index: 45; background: rgba(18, 4, 6, 0.94); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); display: flex; flex-direction: column; justify-content: center; gap: 40px; padding: 100px max(28px, env(safe-area-inset-left, 0px)) 40px; color: var(--cream); }
.menu nav { display: grid; gap: 6px; }
.menu a { font-size: clamp(34px, 9vw, 52px); font-weight: 600; letter-spacing: -0.03em; text-decoration: none; opacity: 0; transform: translateY(20px); animation: menuIn .6s var(--ease-out) forwards; }
.menu a:nth-child(2) { animation-delay: .05s; } .menu a:nth-child(3) { animation-delay: .1s; } .menu a:nth-child(4) { animation-delay: .15s; } .menu a:nth-child(5) { animation-delay: .2s; color: var(--peach); }
.menu p { color: var(--cream-muted); font-size: 14px; }
@keyframes menuIn { to { opacity: 1; transform: none; } }

/* ============ HERO ============ */
.hero { position: relative; height: 260vh; background: var(--night); color: var(--cream); }
.hero-stage { --lit: 1; position: sticky; top: 0; display: flex; flex-direction: column; height: 100vh; height: 100svh; overflow: hidden; isolation: isolate;
  background:
    radial-gradient(ellipse 70% 55% at 50% 78%, rgba(255, 150, 80, calc(var(--lit) * 0.16)), transparent 70%),
    radial-gradient(ellipse 90% 70% at 50% 85%, var(--wine) 0%, #250409 48%, var(--night) 100%); }
.hero-stage::after { content: ""; position: absolute; inset: 0; background-image: var(--grain); opacity: .06; mix-blend-mode: overlay; pointer-events: none; z-index: 5; }
.sky { position: absolute; inset: 0; z-index: 0; }
.sky canvas { width: 100%; height: 100%; display: block; }

.hero-copy { position: relative; flex: none; z-index: 3; padding-top: calc(env(safe-area-inset-top, 0px) + clamp(92px, 13vh, 140px)); text-align: center; padding-inline: max(20px, env(safe-area-inset-left, 0px)); will-change: transform, opacity; }
.hero-areas { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; font-size: 12px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--peach); }
.hero-areas li { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; }
.hero-areas li::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .75; flex: none; }
.hero-title { margin-top: 18px; font-size: clamp(38px, 6.6vw, 104px); line-height: .98; letter-spacing: -0.045em; font-weight: 600; text-wrap: initial; }
.hero-title .ln { display: block; overflow: hidden; padding-bottom: .24em; margin-bottom: -.24em; }
.hero-title .ln > span { display: inline-block; }
.hero-title .serif { color: var(--peach); font-weight: 400; letter-spacing: -0.03em; }

.casa-area { position: relative; z-index: 2; flex: 1 1 auto; min-height: 0; margin-top: clamp(4px, 1.5vh, 20px); container-type: size; }
.casa-zoom { position: absolute; left: 50%; bottom: calc(-0.16 * var(--casa-h)); --casa-w: min(96cqw, 1060px, calc(100cqh / 0.85 * 1312 / 1199)); --casa-h: calc(var(--casa-w) * 1199 / 1312); width: var(--casa-w); margin-left: calc(var(--casa-w) / -2); transform-origin: 55.2% 47.6%; will-change: transform; }
.casa-tilt { transition: transform 1.2s var(--ease-out); transform-style: preserve-3d; }
.casa { position: relative; aspect-ratio: 1312 / 1199; -webkit-mask-image: linear-gradient(#000 76%, transparent 96%); mask-image: linear-gradient(#000 76%, transparent 96%); }
.casa img { position: absolute; inset: 0; width: 100%; height: 100%; }
.casa .night { display: none; }
.bloom { position: absolute; inset: 0; pointer-events: none; mix-blend-mode: screen; opacity: calc(var(--lit) * 0.9);
  background:
    radial-gradient(ellipse 9% 9% at 27% 43%, rgba(255, 190, 120, .55), transparent 70%),
    radial-gradient(ellipse 12% 14% at 55% 48%, rgba(255, 170, 90, .35), transparent 70%),
    radial-gradient(ellipse 9% 12% at 79% 46%, rgba(255, 170, 90, .3), transparent 70%),
    radial-gradient(ellipse 12% 16% at 15% 55%, rgba(255, 180, 100, .28), transparent 70%),
    radial-gradient(ellipse 30% 10% at 50% 72%, rgba(255, 160, 80, .22), transparent 70%); }

.hero-foot { position: absolute; z-index: 3; left: 0; right: 0; bottom: calc(env(safe-area-inset-bottom, 0px) + clamp(22px, 4vh, 44px)); display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; max-width: 1360px; margin: 0 auto; padding-left: max(var(--gutter), env(safe-area-inset-left, 0px)); padding-right: max(var(--gutter), env(safe-area-inset-right, 0px)); will-change: transform, opacity; }
.hero-lead { max-width: 330px; font-size: 15px; line-height: 1.6; color: var(--cream-muted); text-shadow: 0 2px 20px rgba(0, 0, 0, .6); }
.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.cue { position: absolute; z-index: 3; left: 50%; bottom: calc(env(safe-area-inset-bottom, 0px) + 22px); transform: translateX(-50%); display: none; flex-direction: column; align-items: center; gap: 10px; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--cream-muted); }
.cue i { width: 1px; height: 38px; background: linear-gradient(var(--cream), transparent); transform-origin: top; animation: cue 2.2s var(--ease) infinite; }
@keyframes cue { 0% { transform: scaleY(0); opacity: 1; } 60% { transform: scaleY(1); opacity: 1; } 100% { transform: scaleY(1); opacity: 0; } }

.hero-caption { position: absolute; z-index: 4; left: 0; right: 0; top: 50%; transform: translateY(-50%); text-align: center; font-size: clamp(30px, 4.6vw, 64px); font-weight: 600; line-height: 1.08; letter-spacing: -0.035em; color: var(--cream); text-shadow: 0 6px 40px rgba(0, 0, 0, .55); opacity: 0; pointer-events: none; padding-inline: 20px; }
.hero-caption .serif { color: var(--peach); }
.hero-caption::before { content: ""; position: absolute; z-index: -1; left: 50%; top: 50%; width: min(1100px, 120vw); height: 260%; transform: translate(-50%, -50%); background: radial-gradient(closest-side, rgba(18, 4, 6, .86), rgba(18, 4, 6, .55) 55%, transparent); }
.flood { --f: 0; position: absolute; inset: 0; z-index: 6; background: radial-gradient(circle at 50% 50%, var(--bg) calc(var(--f) * 80vmax), transparent calc(var(--f) * 80vmax + 22vmax)); opacity: 0; pointer-events: none; }

/* sequenza d'apertura (solo con JS) */
.js .casa .night { display: block; }
.js .casa .day { -webkit-mask-image: var(--m); mask-image: var(--m); }
.js .casa { --r1: .01; --r2: .01; --r3: .01; --r4: .01; --r5: .01; --r6: .01; --r7: .01; --all: 0;
  --m: radial-gradient(ellipse calc(var(--r1) * 1%) calc(var(--r1) * 1.1%) at 27% 43%, #000 35%, transparent),
       radial-gradient(ellipse calc(var(--r2) * 1%) calc(var(--r2) * 1.1%) at 36% 54%, #000 35%, transparent),
       radial-gradient(ellipse calc(var(--r3) * 1%) calc(var(--r3) * 1.1%) at 55% 47%, #000 35%, transparent),
       radial-gradient(ellipse calc(var(--r4) * 1%) calc(var(--r4) * 1.1%) at 79% 46%, #000 35%, transparent),
       radial-gradient(ellipse calc(var(--r5) * 1%) calc(var(--r5) * 1.1%) at 14% 52%, #000 35%, transparent),
       radial-gradient(ellipse calc(var(--r6) * 1%) calc(var(--r6) * 1.1%) at 72% 68%, #000 35%, transparent),
       radial-gradient(ellipse calc(var(--r7) * 1%) calc(var(--r7) * 1.1%) at 32% 68%, #000 35%, transparent),
       linear-gradient(rgba(0, 0, 0, var(--all)), rgba(0, 0, 0, var(--all))); }
.js .casa.lit .day { -webkit-mask-image: none; mask-image: none; }
.js .casa.lit .night { display: none; }
.js .hero-stage { --lit: 0; }
.js .hero-in { opacity: 0; transform: translateY(105%); filter: blur(8px); }
.js .eyebrow.hero-in, .js .hero-areas.hero-in, .js .hero-foot .hero-in, .js .cue.hero-in { transform: translateY(16px); }
.js .casa-tilt { opacity: 0; transform: scale(1.06); filter: blur(14px) brightness(.4); }
.js .hdr { transform: translateY(-140%); opacity: 0; }
.js.go .hero-in { opacity: 1; transform: none; filter: none; transition: opacity 1.1s var(--ease-out), transform 1.3s var(--ease-out), filter 1.1s var(--ease-out); transition-delay: calc(var(--d) * 110ms + 250ms); }
.js.go .hero-foot .hero-in, .js.go .cue.hero-in { transition-delay: calc(var(--d) * 110ms + 1500ms); }
.js.go .cue.hero-in { transform: translateX(-50%); }
.js.go .casa-tilt { opacity: 1; transform: none; filter: none; transition: opacity 1.6s var(--ease-out), transform 2.4s var(--ease-out), filter 1.8s var(--ease-out); }
.js.ready .hdr { transform: none; opacity: 1; }
.js.ready .casa-tilt { transition: transform 1.2s var(--ease-out); }

/* ============ MANIFESTO ============ */
.manifesto { position: relative; background: var(--bg); color: var(--ink); padding-block: clamp(70px, 10vh, 130px) clamp(90px, 12vh, 140px); }
.mf-text { margin-top: 30px; max-width: 1080px; font-size: clamp(28px, 4.1vw, 58px); line-height: 1.16; letter-spacing: -0.03em; font-weight: 600; }
.mf-text em { font-family: var(--serif); font-weight: 400; color: var(--accent); }
.mf-text .w { transition: opacity .25s linear; }
.js .mf-text .w { opacity: calc(.14 + var(--on, 1) * .86); }
.facts { margin: clamp(70px, 10vh, 110px) 0 0; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); }
.fact { padding: 28px 24px 0 0; display: grid; gap: 4px; align-content: start; }
.fact + .fact { padding-left: 24px; border-left: 1px solid var(--line); }
.fact dt { font-size: 12px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); order: 2; }
.fact dd { margin: 0; font-size: clamp(56px, 7vw, 104px); font-weight: 600; line-height: 1; letter-spacing: -0.05em; color: var(--accent); order: 1; font-variant-numeric: tabular-nums; }
.fact p { order: 3; color: var(--muted); font-size: 15px; }

/* ============ SERVIZI ============ */
.services { position: relative; overflow-x: clip; background: linear-gradient(180deg, var(--night) 0%, #1A0509 50%, var(--night) 100%); color: var(--cream); }
.services::before { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse 60% 50% at 80% 30%, rgba(122, 26, 33, .45), transparent 70%), radial-gradient(ellipse 50% 40% at 10% 90%, rgba(232, 184, 150, .08), transparent 70%); pointer-events: none; }
.svc-stage { position: relative; padding-block: clamp(90px, 13vh, 140px); display: flex; flex-direction: column; gap: clamp(36px, 6vh, 64px); }
.svc-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 40px; width: 100%; }
.svc-head h2 { margin-top: 18px; max-width: 760px; }
.svc-head .serif { color: var(--peach); }
.svc-intro { max-width: 340px; color: var(--cream-muted); font-size: 15px; }
.svc-viewport { overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.svc-viewport::-webkit-scrollbar { display: none; }
.svc-track { display: flex; gap: 20px; width: max-content; padding-left: max(var(--gutter), calc((100vw - var(--maxw)) / 2 + var(--gutter)), env(safe-area-inset-left, 0px)); padding-right: max(var(--gutter), env(safe-area-inset-right, 0px)); will-change: transform; }
.card { --mx: 50%; --my: 0%; position: relative; flex: 0 0 auto; width: clamp(290px, 31vw, 410px); min-height: clamp(400px, 56vh, 520px); padding: 34px 32px; border-radius: 28px; display: flex; flex-direction: column; gap: 16px; overflow: hidden; scroll-snap-align: start; background: linear-gradient(160deg, rgba(244, 239, 231, .085), rgba(244, 239, 231, .025)); border: 1px solid var(--cream-line); transition: transform .7s var(--ease-out), border-color .4s; }
.card:hover { border-color: rgba(232, 184, 150, .4); }
.card-glow { position: absolute; inset: 0; background: radial-gradient(420px circle at var(--mx) var(--my), rgba(232, 184, 150, .16), transparent 45%); opacity: 0; transition: opacity .4s; pointer-events: none; }
.card:hover .card-glow { opacity: 1; }
.card-n { position: absolute; top: 34px; right: 32px; font-size: 13px; font-weight: 600; letter-spacing: .14em; color: var(--peach); font-variant-numeric: tabular-nums; }
.card-n i { font-style: normal; color: var(--cream-muted); opacity: .7; }
.ico { width: 76px; height: 76px; margin-bottom: auto; fill: none; stroke: var(--peach); stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
.js .card .ico path, .js .card .ico circle { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.4s var(--ease-out); }
.js .card.in .ico path, .js .card.in .ico circle { stroke-dashoffset: 0; }
.card h3 { font-size: clamp(22px, 2vw, 27px); line-height: 1.15; letter-spacing: -0.02em; }
.card p { color: var(--cream-muted); font-size: 15px; line-height: 1.6; }
.card ul { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.card li { font-size: 12.5px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--cream-line); color: var(--cream); }
.card-end { text-decoration: none; justify-content: flex-end; background: linear-gradient(160deg, #7A1A21, #3C0008); border-color: rgba(232, 184, 150, .25); }
.card-end img { position: absolute; width: 70%; right: -14%; top: -6%; opacity: .25; filter: saturate(.6); transition: transform 1.2s var(--ease-out); }
.card-end:hover img { transform: rotate(-6deg) scale(1.05); }
.card-end h3 { font-size: clamp(28px, 2.6vw, 36px); position: relative; }
.card-end .btn { align-self: flex-start; position: relative; }
.svc-bar { position: relative; height: 2px; width: 100%; }
.svc-bar::before { content: ""; position: absolute; inset: 0 max(var(--gutter), env(safe-area-inset-right, 0px)) 0 max(var(--gutter), env(safe-area-inset-left, 0px)); background: var(--cream-line); }
.svc-bar i { position: absolute; inset: 0 max(var(--gutter), env(safe-area-inset-right, 0px)) 0 max(var(--gutter), env(safe-area-inset-left, 0px)); background: linear-gradient(90deg, var(--peach), var(--amber)); transform: scaleX(var(--p, 0)); transform-origin: left; }

/* modalità galleria fissata (attivata da JS) */
.services.pin { height: var(--pin-h, 300vh); }
.services.pin .svc-stage { position: sticky; top: 0; height: 100vh; height: 100svh; justify-content: center; padding-block: clamp(80px, 10vh, 110px) clamp(30px, 5vh, 50px); }
.services.pin .svc-viewport { overflow: visible; scroll-snap-type: none; }
.services.pin .card { zoom: var(--cz, 1); }
@media (min-width: 700px) and (max-height: 820px) {
  .services.pin .svc-stage { padding-block: 84px 22px; gap: 24px; }
  .services.pin .svc-head h2 { font-size: clamp(28px, 3.3vw, 46px); margin-top: 10px; }
  .services.pin .card { min-height: 0; padding: 26px 26px 24px; gap: 11px; }
  .services.pin .card p { font-size: 14px; line-height: 1.5; }
  .services.pin .ico { width: 48px; height: 48px; }
  .services.pin .card-n { top: 26px; right: 26px; }
}
@media (min-width: 700px) and (max-height: 680px) { .services.pin .svc-head .eyebrow { display: none; } .services.pin .svc-stage { padding-top: 92px; } }
.services.pin .svc-head h2 { font-size: clamp(34px, 4.1vw, 58px); max-width: 900px; }
.services.pin .card { transform: scale(calc(.93 + .07 * var(--f, 1))); opacity: calc(.45 + .55 * var(--f, 1)); transition: transform .5s var(--ease-out), opacity .5s var(--ease-out), border-color .4s; }
.services.pin .card::after { content: ""; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none; box-shadow: 0 0 0 1px rgba(232, 184, 150, calc(var(--f, 0) * .55)) inset, 0 30px 80px -30px rgba(232, 150, 100, calc(var(--f, 0) * .5)); }

.legal .rea { flex-basis: 100%; font-size: 10px; opacity: .45; letter-spacing: .04em; }
/* ============ ASSET UNDER MANAGEMENT ============ */
.aum { position: relative; color: var(--cream, #F4EFE7); text-align: center;
  background: linear-gradient(160deg, #8E1F28 0%, #6E151C 48%, #3F0A10 100%); }
.aum.pin { height: 250vh; }
.aum-stage { position: relative; overflow: hidden; display: flex; align-items: flex-start; justify-content: center; padding-block: clamp(84px, 13vh, 150px) clamp(150px, 30vh, 300px);
  background: linear-gradient(180deg, rgba(26, 4, 8, .62), transparent 24%), radial-gradient(900px 520px at 50% 108%, rgba(232, 150, 100, .34), transparent 70%), radial-gradient(700px 500px at 12% -10%, rgba(255, 255, 255, .07), transparent 65%); }
.aum.pin .aum-tags { display: none; }
.aum.pin .aum-stage { position: sticky; top: 0; height: 100vh; height: 100svh; padding-block: clamp(84px, 12vh, 130px) 0; }
.aum-mark { position: absolute; inset: 0; pointer-events: none; opacity: .5; background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px); background-size: 64px 64px; -webkit-mask-image: radial-gradient(closest-side, #000, transparent); mask-image: radial-gradient(closest-side, #000, transparent); }
.aum-beam { position: absolute; left: 50%; top: -20%; width: 140vmax; height: 140vmax; margin-left: -70vmax; pointer-events: none; opacity: calc(var(--lit, 1) * .55); background: conic-gradient(from 150deg at 50% 0%, transparent 0deg, rgba(255, 214, 170, .22) 18deg, transparent 36deg, transparent 44deg, rgba(255, 214, 170, .14) 60deg, transparent 78deg); mix-blend-mode: screen; -webkit-mask-image: linear-gradient(transparent 16%, #000 34%); mask-image: linear-gradient(transparent 16%, #000 34%); }
/* skyline: gli immobili in gestione salgono dal basso e si accendono */
.aum-sky { --lit: 1; position: absolute; left: 0; right: 0; bottom: 0; height: clamp(150px, 36%, 340px); display: flex; align-items: flex-end; justify-content: center; gap: clamp(3px, .7vw, 10px); padding-inline: clamp(8px, 3vw, 60px); pointer-events: none; }
.aum-sky::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 34%; background: linear-gradient(transparent, rgba(40, 6, 10, .75)); }
.aum-b { --g: 1; flex: var(--w) 1 0; min-width: 0; height: var(--h); transform-origin: 50% 100%; transform: scaleY(var(--g)); border-radius: 3px 3px 0 0; border-top: 2px solid rgba(242, 201, 164, calc(.25 + .6 * var(--lit)));
  background-color: #4A0D14;
  background-image: repeating-linear-gradient(0deg, #4A0D14 0 9px, transparent 9px 17px), repeating-linear-gradient(90deg, #4A0D14 0 7px, transparent 7px 14px), linear-gradient(180deg, rgba(255, 214, 165, calc(.12 + .8 * var(--lit) * var(--on, 1))), rgba(255, 160, 100, calc(.08 + .5 * var(--lit) * var(--on, 1))));
  box-shadow: 0 -18px 50px -18px rgba(255, 190, 130, calc(var(--lit) * .45)); }
.aum-b:nth-child(3n) { background-color: #3C0A10; --on: .7; }
.aum-in { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: clamp(12px, 2.2vh, 24px); }
.aum-fig { margin: 0; display: flex; align-items: baseline; justify-content: center; flex-wrap: wrap; gap: 0 clamp(14px, 2.4vw, 34px); line-height: .9; font-weight: 700; letter-spacing: -0.05em; will-change: transform; }
.aum-plus { font-size: clamp(56px, 10vw, 150px); font-weight: 500; color: #F2C9A4; margin-right: -.06em; }
.aum-n { font-size: clamp(130px, min(26vw, 34vh), 340px); font-variant-numeric: tabular-nums; background: linear-gradient(180deg, #FFFFFF 10%, #F4CDA6 62%, #E39A72 100%); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 30px 60px rgba(0, 0, 0, .28)); }
.aum-u { font-size: clamp(30px, 5.4vw, 80px); letter-spacing: -0.04em; text-align: left; line-height: 1; }
.aum-u .serif { display: block; color: #F2C9A4; font-weight: 400; }
.aum-count { margin: 0; display: inline-flex; align-items: baseline; gap: .35em; padding: 10px 22px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .22); background: rgba(40, 6, 10, .35); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); font-size: clamp(17px, 2vw, 26px); font-weight: 600; color: #F2C9A4; font-variant-numeric: tabular-nums; }
.aum-count b { font-weight: 700; color: #fff; min-width: 5.1em; text-align: right; }
.aum-count i { font-style: normal; margin-left: -.25em; }
.aum-count span { font-size: .62em; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: rgba(244, 239, 231, .75); }
.aum-lead { max-width: 620px; margin: 0; font-size: clamp(15px, 1.4vw, 19px); line-height: 1.6; color: rgba(244, 239, 231, .86); text-shadow: 0 2px 18px rgba(63, 10, 16, .9); }
.aum-tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.aum-tags li { padding: 8px 16px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .22); background: rgba(63, 10, 16, .55); font-size: 13px; font-weight: 500; }
@media (max-width: 640px) {
  .aum-fig { gap: 0 10px; } .aum-u { flex-basis: 100%; text-align: center; margin-top: 6px; } .aum-u .serif { display: inline; }
  .aum-tags li { font-size: 12px; padding: 7px 13px; }
  .aum-sky { height: clamp(120px, 24%, 200px); gap: 3px; }
  .aum.pin .aum-stage { padding-top: calc(env(safe-area-inset-top, 0px) + 84px); }
  .aum-count span { display: none; }
}
/* ============ PERCORSO ============ */
.path { background: var(--bg); color: var(--ink); padding-block: clamp(110px, 15vh, 170px) clamp(60px, 10vh, 120px); }
.path-head { display: grid; gap: 18px; max-width: 820px; }
.path-head .serif { color: var(--accent); }
.path-head > p:last-child { color: var(--muted); font-size: 17px; max-width: 620px; }
.path-grid { margin-top: clamp(30px, 6vh, 60px); display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: clamp(30px, 6vw, 90px); }
.steps { list-style: none; margin: 0; padding: 0; }
.step { min-height: 72vh; display: flex; flex-direction: column; justify-content: center; gap: 12px; padding-block: 40px; transition: opacity .6s var(--ease); }
.js .step { opacity: .22; }
.js .step.on { opacity: 1; }
.step-n { font-family: var(--serif); font-style: italic; font-size: 22px; color: var(--accent); }
.step h3 { font-size: clamp(32px, 3.6vw, 52px); letter-spacing: -0.035em; line-height: 1.05; }
.step p { color: var(--muted); font-size: 18px; max-width: 440px; }
.plan-sticky { position: relative; }
.plan-card { position: sticky; top: calc(50vh - min(34vw, 300px)); margin: 0; padding: 22px; border-radius: 30px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 40px 80px -50px rgba(60, 0, 8, .35); }
.plan-top { display: flex; justify-content: space-between; font-size: 13px; font-weight: 500; color: var(--muted); padding: 2px 6px 14px; }
.plan-top b { color: var(--accent); font-variant-numeric: tabular-nums; }
.plan-top #phaseName { color: var(--ink); font-weight: 600; }
.plan-box { position: relative; }
.plan { display: block; width: 100%; height: auto; overflow: visible; }
.plan path { fill: none; stroke: var(--ink); stroke-linecap: round; stroke-linejoin: round; }
.plan .w { stroke-width: 7; stroke-linecap: square; }
.plan .w.in { stroke-width: 4; }
.plan .f { stroke-width: 1.4; stroke: var(--muted); }
.plan .dim { stroke-width: 1.2; stroke: var(--accent); }
.plan text { font: 500 13px var(--font); fill: var(--muted); }
.plan .cap { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; fill: var(--accent); }
.plan .rooms rect { fill: var(--room); stroke: none; }
/* planimetria in 3D: il piano si inclina e i muri si alzano (solo con JS e movimento attivo) */
.plan-box.is3d { perspective: 1200px; perspective-origin: 50% 40%; }
.plan-3d { --tilt: 0; --spin: 0; position: relative; transform-style: preserve-3d; transform: rotateX(calc(var(--tilt) * 54deg)) rotateZ(calc(var(--tilt) * -32deg + var(--spin) * 1deg)) scale(calc(1 - var(--tilt) * .2)); will-change: transform; }
.plan-3d::before { content: ""; position: absolute; inset: 6% 4% 12%; border-radius: 12px; background: rgba(60, 0, 8, .28); filter: blur(22px); transform: translateZ(-34px); opacity: var(--tilt); }
.plan-wall { position: absolute; inset: 0; pointer-events: none; transform: translateZ(calc(var(--z) * 2.3px * var(--tilt))); opacity: min(1, calc(var(--tilt) * 4)); }
.plan-wall path { stroke: color-mix(in srgb, var(--accent) 70%, var(--ink)); }
.plan-wall.top path { stroke: var(--ink); }
.ph { --d: 1; }
.ph path { stroke-dasharray: 1; stroke-dashoffset: calc(1 - var(--d)); }
.ph.rooms { opacity: var(--d); }
.lbl { transition: opacity .6s var(--ease); }
.tag { position: absolute; display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px 9px 10px; border-radius: 999px; background: var(--glass); border: 1px solid var(--glass-line); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); font-size: 13px; font-weight: 600; color: var(--ink); box-shadow: 0 14px 30px -18px rgba(0, 0, 0, .4); transition: opacity .6s var(--ease-out), transform .7s var(--ease-out); white-space: nowrap; }
.tag i { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 12px; background: var(--accent-soft); color: var(--accent); }
.tag i:empty::after { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.tag .ok { background: rgba(46, 125, 79, .14); color: #2E7D4F; }
.pulse-dot { position: relative; }
.pulse-dot::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--accent); opacity: .3; animation: ping 1.8s var(--ease) infinite; }
@keyframes ping { 0% { transform: scale(.6); opacity: .5; } 100% { transform: scale(1.8); opacity: 0; } }
.t1 { left: 4%; top: 78%; } .t2 { right: 2%; top: 30%; } .t3 { left: 30%; top: 50%; } .t4 { right: 6%; top: 60%; } .t5 { left: 8%; top: 4%; }
.js .tag { opacity: 0; transform: translateY(10px) scale(.96); }
.js .tag.on { opacity: 1; transform: none; }
.js .lbl { opacity: 0; } .js .lbl.on { opacity: 1; }
.plan-prog { margin-top: 18px; height: 3px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.plan-prog i { display: block; height: 100%; background: var(--accent); transform-origin: left; transform: scaleX(var(--p, 1)); }

/* ============ RENDIMENTO ============ */
.yield { position: relative; background: radial-gradient(ellipse 70% 60% at 20% 0%, rgba(122, 26, 33, .55), transparent 70%), var(--night); color: var(--cream); padding-block: clamp(110px, 15vh, 170px); overflow: hidden; }
.yield-head { display: grid; gap: 18px; max-width: 820px; }
.yield-head .serif { color: var(--peach); }
.yield-head > p:last-child { color: var(--cream-muted); font-size: 17px; max-width: 640px; }
.calc { margin-top: clamp(40px, 7vh, 70px); display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); border-radius: 32px; overflow: hidden; border: 1px solid var(--cream-line); background: rgba(244, 239, 231, .03); }
.calc-in { padding: clamp(24px, 3.4vw, 44px); display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-content: start; border-right: 1px solid var(--cream-line); }
.calc-tag { grid-column: 1 / -1; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--peach); font-weight: 600; }
.field { display: grid; gap: 7px; min-width: 0; }
.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field label { font-size: 13px; color: var(--cream-muted); display: flex; justify-content: space-between; }
.field label span { opacity: .7; }
.field input { width: 100%; min-width: 0; font: 600 18px var(--font); color: var(--cream); background: rgba(244, 239, 231, .05); border: 1px solid var(--cream-line); border-radius: 14px; padding: 13px 14px; font-variant-numeric: tabular-nums; transition: border-color .3s, background .3s; -moz-appearance: textfield; appearance: textfield; color-scheme: dark; }
.field input::-webkit-outer-spin-button, .field input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.field input:hover { border-color: rgba(244, 239, 231, .3); }
.field input:focus { outline: none; border-color: var(--peach); background: rgba(232, 184, 150, .08); }
.calc-note { grid-column: 1 / -1; font-size: 12.5px; color: var(--cream-muted); opacity: .8; line-height: 1.55; margin-top: 6px; }
.calc-out { padding: clamp(24px, 3.4vw, 44px); display: grid; gap: 28px; align-content: start; background: linear-gradient(160deg, rgba(122, 26, 33, .32), rgba(122, 26, 33, .06)); }
.hero-kpi { display: grid; gap: 2px; }
.hero-kpi span { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--peach); font-weight: 600; }
.hero-kpi b { font-size: clamp(64px, 8vw, 112px); line-height: 1; letter-spacing: -0.05em; font-weight: 600; font-variant-numeric: tabular-nums; }
.hero-kpi small { color: var(--cream-muted); font-size: 13px; }
.split-head { display: flex; justify-content: space-between; font-size: 13px; color: var(--cream-muted); margin-bottom: 10px; }
.split-head span:last-child { color: var(--cream); font-weight: 600; font-variant-numeric: tabular-nums; }
.split { display: flex; height: 14px; border-radius: 999px; overflow: hidden; background: rgba(244, 239, 231, .08); gap: 2px; }
.split i { height: 100%; transition: width .8s var(--ease-out); }
.sg-gest { --c: var(--peach); } .sg-costi { --c: var(--seg-fixed); } .sg-rata { --c: #C2434C; } .sg-cf { --c: var(--ok); }
.split i { background: var(--c); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 12px; font-size: 12.5px; color: var(--cream-muted); }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend span::before { content: ""; width: 9px; height: 9px; border-radius: 3px; background: var(--c); }
.shortfall { margin-top: 12px; color: var(--bad); font-size: 13.5px; }
.ledger { display: grid; }
.ledger div { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--cream-line); font-size: 14.5px; }
.ledger span { color: var(--cream-muted); }
.ledger small { opacity: .75; }
.ledger b { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ledger .tot { border-bottom: 0; padding-top: 14px; font-size: 16px; }
.ledger .tot span { color: var(--cream); font-weight: 600; }
.ledger .tot b { color: var(--ok); font-size: 20px; }
.neg, .ledger .tot b.neg { color: var(--bad) !important; }
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.kpi { display: grid; gap: 2px; padding: 18px; border-radius: 18px; background: rgba(244, 239, 231, .05); border: 1px solid var(--cream-line); }
.kpi b { font-size: 30px; font-weight: 600; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.kpi span { font-size: 13.5px; font-weight: 500; }
.kpi small { font-size: 12px; color: var(--cream-muted); }

/* ============ ZONA ============ */
.zone { background: var(--bg); color: var(--ink); padding-block: clamp(110px, 15vh, 170px); }
.zone-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(30px, 6vw, 80px); align-items: center; }
.zone-text { display: grid; gap: 20px; }
.zone-text .serif { color: var(--accent); }
.zone-text > p { color: var(--muted); font-size: 17px; }
.areas { list-style: none; margin: 10px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); }
.areas li { padding: 16px 16px 16px 0; border-bottom: 1px solid var(--line); display: grid; gap: 2px; }
.areas b { font-weight: 600; font-size: 15px; }
.areas span { font-size: 13px; color: var(--muted); }
.mapcard { margin: 0; padding: clamp(16px, 2vw, 26px); border-radius: 30px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 40px 80px -50px rgba(60, 0, 8, .3); }
.map { width: 100%; height: auto; display: block; }
.map text { font: 500 12.5px var(--font); fill: var(--ink); }
.map .small { font-size: 11px; fill: var(--muted); font-weight: 600; }
.map .it { font-family: var(--serif); font-style: italic; font-size: 14px; fill: var(--accent); }
.map .water { fill: var(--water-ink); }
.map .lake { fill: var(--water); }
.map .area { fill: var(--area); stroke: var(--accent); stroke-dasharray: 3 5; stroke-width: 1; }
.map .river { fill: none; stroke: var(--water-line); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: calc(1 - var(--draw, 1)); }
.map .road { fill: none; stroke: var(--muted); stroke-width: 1.5; stroke-dasharray: 7 6; opacity: .55; }
.map .city { fill: var(--muted); }
.map .served { fill: var(--accent); }
.map .hq { fill: var(--accent); stroke: var(--surface); stroke-width: 2.5; }
.map .hq-l { font-weight: 700; font-size: 13.5px; }
.map .pulse { fill: var(--accent); opacity: .35; transform-origin: 229px 173px; animation: mapPulse 2.4s var(--ease) infinite; }
.map .pulse.b { animation-delay: 1.2s; }
@keyframes mapPulse { 0% { transform: scale(.6); opacity: .5; } 100% { transform: scale(3.4); opacity: 0; } }
.map-legend { display: flex; flex-wrap: wrap; gap: 8px 20px; padding: 14px 6px 2px; font-size: 12.5px; color: var(--muted); }
.map-legend span { display: inline-flex; align-items: center; gap: 7px; }
.map-legend i { width: 9px; height: 9px; border-radius: 50%; }
.lg-acc { background: var(--accent); } .lg-mut { background: var(--muted); }

/* ============ CONTATTI ============ */
.contact { position: relative; overflow: hidden; color: var(--cream); padding-block: clamp(120px, 17vh, 190px) clamp(90px, 12vh, 140px); background: radial-gradient(ellipse 80% 70% at 50% 45%, var(--wine) 0%, #22050A 55%, var(--night) 100%); }
.contact::after { content: ""; position: absolute; inset: 0; background-image: var(--grain); opacity: .05; mix-blend-mode: overlay; pointer-events: none; }
.contact-grid { position: relative; z-index: 1; display: grid; justify-items: center; text-align: center; }
.contact-text { display: grid; justify-items: center; gap: 22px; width: 100%; }
.contact-text h2 { font-size: clamp(46px, 8vw, 128px); line-height: .98; letter-spacing: -0.05em; }
.contact-text .serif { color: var(--peach); }
.contact-lead { color: var(--cream-muted); font-size: 17px; max-width: 560px; }
.contact-cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 6px; }
.ccards { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 10px; width: 100%; max-width: 1120px; margin-top: clamp(30px, 6vh, 60px); text-align: left; }
.ccards .ccard { grid-column: span 4; }
.ccards .ccard:nth-child(-n+4) { grid-column: span 3; }
.ccard { position: relative; display: block; padding: 18px 20px; border-radius: 20px; background: rgba(244, 239, 231, .05); border: 1px solid var(--cream-line); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); transition: background .3s, border-color .3s; min-width: 0; }
.ccard:hover { background: rgba(244, 239, 231, .09); border-color: rgba(232, 184, 150, .3); }
.ccard > div { display: grid; gap: 6px; min-width: 0; }
.ccard small { font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--peach); font-weight: 600; }
.ccard a, .ccard p { font-size: 16px; font-weight: 600; text-decoration: none; overflow-wrap: break-word; line-height: 1.35; }
.ccard p { font-size: 14px; font-weight: 500; }
.copy { position: absolute; top: 12px; right: 12px; font: 600 11.5px var(--font); color: var(--cream); background: rgba(244, 239, 231, .08); border: 1px solid var(--cream-line); border-radius: 999px; padding: 5px 11px; cursor: pointer; transition: background .3s; }
.copy:hover { background: rgba(244, 239, 231, .16); }
.contact-mark { position: absolute; left: 50%; top: 46%; width: min(980px, 130vw); transform: translate(-50%, -50%); pointer-events: none; }
.contact-mark::before { content: ""; position: absolute; inset: 10%; background: radial-gradient(closest-side, rgba(255, 150, 80, .16), transparent); filter: blur(30px); }
.contact-mark img { position: relative; width: 100%; opacity: .07; filter: grayscale(.2); }

/* ============ FOOTER ============ */
.foot { background: var(--night); color: var(--cream-muted); padding-block: 40px calc(40px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--cream-line); }
.foot-in { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.foot img { height: 40px; width: auto; }
.legal { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 12.5px; }
.top-link { font-size: 13px; font-weight: 600; text-decoration: none; color: var(--cream); }

/* ---------- Comparse allo scroll (solo per elementi sotto la piega) ---------- */
.reveal { transition: opacity 1s var(--ease-out), transform 1.1s var(--ease-out), filter 1s var(--ease-out); }
.js .reveal.below { opacity: 0; transform: translateY(46px); filter: blur(6px); }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .nav, .hdr-cta { display: none; }
  .menu-btn { display: block; }
  .hdr-pill { padding: 6px 6px 6px 18px; }
  .progress { width: calc(100% - 80px); }
  .hero-foot { position: relative; bottom: auto; flex: none; padding-top: 10px; padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 24px); align-items: center; }
  .casa-zoom { bottom: calc(-0.1 * var(--casa-h)); }
  .svc-head { flex-direction: column; align-items: flex-start; gap: 16px; }
  .path-grid { grid-template-columns: 1fr; gap: 0; }
  .plan-sticky { order: -1; position: sticky; top: 0; z-index: 2; padding: calc(78px + env(safe-area-inset-top, 0px)) var(--gutter) 28px; margin-inline: calc(-1 * var(--gutter)); background: linear-gradient(var(--bg) 86%, transparent); }
  .plan-card { position: relative; top: 0; padding: 14px; border-radius: 22px; max-width: 560px; margin-inline: auto; }
  .plan-top { padding-bottom: 8px; }
  .step { min-height: 62vh; justify-content: flex-end; padding-bottom: 12vh; }
  .step p { font-size: 16px; }
  .tag { font-size: 11.5px; padding: 6px 10px 6px 7px; } .tag i { width: 18px; height: 18px; font-size: 10px; }
  .calc { grid-template-columns: 1fr; }
  .calc-in { border-right: 0; border-bottom: 1px solid var(--cream-line); }
  .zone-grid, .contact-grid { grid-template-columns: minmax(0, 1fr); }
  .ccards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ccards .ccard { grid-column: auto !important; }
  .facts { grid-template-columns: 1fr 1fr; }
  .fact:nth-child(3) { padding-left: 0; border-left: 0; }
  .fact:nth-child(n+3) { border-top: 1px solid var(--line); margin-top: 28px; }
}
@media (max-width: 640px) {
  .hero-copy { padding-top: calc(env(safe-area-inset-top, 0px) + 96px); }
  .hero-title { font-size: clamp(36px, 10.4vw, 52px); }
  /* due righe centrate su un asse: il punto fa da separatore tra le due voci di ogni riga */
  .hero-areas { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 0; width: 100%; font-size: clamp(9.5px, 2.6vw, 11px); letter-spacing: .1em; padding-block: 12px; border-block: 1px solid rgba(232, 184, 150, .22); }
  .hero-areas::before { content: ""; flex-basis: 100%; order: 2; height: 0; }
  .hero-areas li { gap: 0; order: 1; }
  .hero-areas li:nth-child(n+3) { order: 3; }
  .hero-areas li::before { display: none; }
  .hero-areas li:nth-child(even)::before { display: block; width: 4px; height: 4px; margin-inline: 11px; opacity: .8; }
  .eyebrow { font-size: 11px; letter-spacing: .18em; }

  .casa-zoom { --casa-w: min(116cqw, calc(100cqh / 0.9 * 1312 / 1199)); bottom: calc(-0.1 * var(--casa-h)); }
  .hero-foot { position: relative; bottom: auto; flex: none; flex-direction: column; align-items: stretch; gap: 10px; padding-top: 6px; padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 20px); }
  .hero-lead { display: none; }
  .hero-cta { justify-content: stretch; flex-direction: column; }
  .hero-cta .btn { justify-content: center; }
  .calc-in { grid-template-columns: 1fr; }
  .ccards, .areas, .kpis { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr 1fr; }
  .card { width: 82vw; min-height: 0; padding: 22px 22px 24px; gap: 11px; }
  .card h3 { font-size: 22px; }
  .card p { font-size: 14px; line-height: 1.5; }
  .card ul { gap: 5px; margin-top: 2px; }
  .card li { font-size: 11.5px; padding: 5px 10px; }
  .ico { width: 44px; height: 44px; margin-bottom: 6px; }
  .card-n { top: 24px; right: 22px; }
  .card-end { min-height: 300px; }
  .svc-stage { gap: 22px; }
  .services.pin .svc-stage { padding-block: calc(env(safe-area-inset-top, 0px) + 82px) 20px; gap: clamp(16px, 3.2svh, 30px); justify-content: center; }
  .services.pin .svc-intro { display: none; }
  .services.pin .svc-head h2 { font-size: clamp(25px, 7.2vw, 30px); margin-top: 8px; }
  .foot-in { flex-direction: column; align-items: flex-start; }
}
@media (min-width: 641px) and (max-height: 760px) {
  .hero-title { font-size: clamp(36px, 5.4vw, 76px); }
}
@media (min-width: 961px) { .hero-foot { bottom: calc(env(safe-area-inset-bottom, 0px) + 30px); } }

/* ---------- Movimento ridotto: tutto fermo e completo ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .hero { height: auto; }
  .hero-stage { position: relative; height: 100svh; min-height: 640px; }
}

/* ============ PAGINE DI APPROFONDIMENTO (aree di intervento) ============ */
.card-more { margin-top: auto; padding-top: 6px; display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--peach); text-decoration: none; }
.card-more::after { content: ""; position: absolute; inset: 0; z-index: 3; border-radius: inherit; }
.card-more .arr { transition: transform .35s var(--ease-out); }
.card:hover .card-more .arr { transform: translateX(5px); }
.card-link { cursor: pointer; }

.a-hero { position: relative; overflow: hidden; color: var(--cream); padding-block: calc(env(safe-area-inset-top, 0px) + clamp(120px, 18vh, 190px)) clamp(60px, 10vh, 110px);
  background: radial-gradient(ellipse 80% 70% at 78% 8%, rgba(232, 150, 100, .22), transparent 62%), radial-gradient(ellipse 90% 80% at 20% 110%, var(--wine) 0%, #250409 50%, var(--night) 100%); }
.a-hero::after { content: ""; position: absolute; inset: 0; background-image: var(--grain); opacity: .06; mix-blend-mode: overlay; pointer-events: none; }
.a-hero .wrap { position: relative; z-index: 1; }
.a-back { display: inline-flex; align-items: center; gap: 10px; margin-bottom: clamp(26px, 5vh, 48px); padding: 9px 16px 9px 13px; border-radius: 999px; border: 1px solid var(--cream-line); font-size: 13.5px; font-weight: 500; text-decoration: none; color: var(--cream-muted); transition: color .3s, border-color .3s, transform .4s var(--ease-out); }
.a-back:hover { color: var(--cream); border-color: rgba(232, 184, 150, .5); transform: translateX(-3px); }
.a-hero .eyebrow { display: flex; }
.a-title { margin: 18px 0 0; font-size: clamp(46px, 9.4vw, 148px); line-height: .94; letter-spacing: -0.05em; font-weight: 600; }
.a-title .serif { color: var(--peach); letter-spacing: -0.03em; display: inline-block; padding-bottom: .12em; }
.a-lead { max-width: 700px; margin: clamp(20px, 3vh, 34px) 0 0; font-size: clamp(17px, 1.7vw, 22px); line-height: 1.55; color: var(--cream-muted); }
.a-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: clamp(26px, 4vh, 40px); }
.a-toc { list-style: none; margin: clamp(44px, 8vh, 84px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 1px solid var(--cream-line); }
.a-toc a { display: grid; gap: 8px; height: 100%; padding: 18px 16px 4px 0; font-size: 14.5px; font-weight: 500; line-height: 1.3; text-decoration: none; color: var(--cream); border-top: 2px solid transparent; margin-top: -1px; transition: border-color .3s, color .3s; }
.a-toc a:hover { border-top-color: var(--peach); color: var(--peach); }
.a-toc span, .a-num { font-size: 12px; font-weight: 600; letter-spacing: .16em; color: var(--peach); font-variant-numeric: tabular-nums; }

.a-sec { position: relative; padding-block: clamp(76px, 12vh, 150px); }
.a-sec[data-tone="light"] { background: var(--bg); color: var(--ink); }
.a-sec[data-tone="dark"] { background: var(--night); color: var(--cream); }
.a-sec h2 { margin: 16px 0 0; max-width: 900px; }
.a-sec[data-tone="light"] h2 .serif { color: var(--accent); }
.a-sec[data-tone="dark"] h2 .serif { color: var(--peach); }
.a-intro { max-width: 640px; margin: 22px 0 0; font-size: clamp(16px, 1.4vw, 19px); line-height: 1.6; color: var(--muted); }
.a-sec[data-tone="dark"] .a-intro { color: var(--cream-muted); }
.a-sec[data-tone="light"] .a-num { color: var(--accent); }

.a-grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: clamp(36px, 6vh, 64px); }
.a-who-card { display: flex; flex-direction: column; gap: 10px; padding: 26px 24px 28px; border-radius: 24px; background: var(--surface); border: 1px solid var(--line); transition: transform .5s var(--ease-out), border-color .3s, opacity 1s var(--ease-out), filter 1s var(--ease-out); }
.a-who-card:hover { transform: translateY(-6px); border-color: var(--accent); }
.a-who-card h3 { font-size: 21px; letter-spacing: -0.02em; line-height: 1.15; margin-top: 18px; }
.a-who-card p { font-size: 15px; line-height: 1.55; color: var(--muted); margin: 0; }

.a-what { background: radial-gradient(ellipse 70% 40% at 90% 0%, rgba(122, 26, 33, .35), transparent 70%), var(--night) !important; }
.a-blocks { display: grid; gap: 14px; margin-top: clamp(40px, 7vh, 72px); }
.a-block { display: grid; grid-template-columns: clamp(130px, 17vw, 230px) minmax(0, 1fr); gap: clamp(20px, 4vw, 60px); padding: clamp(26px, 3.4vw, 46px); border-radius: 28px; border: 1px solid var(--cream-line); background: linear-gradient(160deg, rgba(244, 239, 231, .075), rgba(244, 239, 231, .02)); scroll-margin-top: 100px; }
.a-block-h { display: flex; flex-direction: column; justify-content: space-between; gap: 24px; }
.a-block-h .a-num { font-size: clamp(44px, 6vw, 92px); line-height: .9; letter-spacing: -0.04em; font-weight: 600; color: transparent; -webkit-text-stroke: 1.2px rgba(232, 184, 150, .6); }
.a-ico { width: clamp(46px, 5vw, 64px); height: auto; fill: none; stroke: var(--peach); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.a-block h3 { font-size: clamp(25px, 2.8vw, 40px); letter-spacing: -0.03em; line-height: 1.08; }
.a-kicker { margin: 8px 0 0; font-size: clamp(17px, 1.6vw, 22px); color: var(--peach); }
.a-block-b > p:not(.a-kicker) { max-width: 760px; margin: 18px 0 0; font-size: 16px; line-height: 1.7; color: var(--cream-muted); }
.a-check { list-style: none; margin: 22px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 26px; }
.a-check li { position: relative; padding-left: 30px; font-size: 15px; line-height: 1.45; }
.a-check li::before { content: ""; position: absolute; left: 0; top: 2px; width: 19px; height: 19px; border-radius: 50%; background: rgba(232, 184, 150, .16); }
.a-check li::after { content: ""; position: absolute; left: 6px; top: 7px; width: 7px; height: 4px; border-left: 1.6px solid var(--peach); border-bottom: 1.6px solid var(--peach); transform: rotate(-45deg); }

.a-steps { list-style: none; margin: clamp(40px, 7vh, 72px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border-top: 1.5px solid var(--line); }
.a-steps li { position: relative; padding: 30px 26px 0 0; }
.a-steps li::before { content: ""; position: absolute; top: -7px; left: 0; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 5px var(--accent-soft); }
.a-steps h3 { margin-top: 14px; font-size: 21px; letter-spacing: -0.02em; line-height: 1.15; }
.a-steps p { margin: 10px 0 0; font-size: 15px; line-height: 1.6; color: var(--muted); }

.a-get { background: linear-gradient(160deg, #8E1F28 0%, #6E151C 48%, #3F0A10 100%) !important; }
.a-get-in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(30px, 6vw, 90px); align-items: center; }
.a-get .a-intro { color: rgba(244, 239, 231, .82); }
.a-check-big { grid-template-columns: 1fr; gap: 0; margin: 0; }
.a-check-big li { padding: 20px 0 20px 46px; font-size: clamp(17px, 1.6vw, 21px); font-weight: 500; line-height: 1.35; border-bottom: 1px solid rgba(255, 255, 255, .16); }
.a-check-big li:first-child { border-top: 1px solid rgba(255, 255, 255, .16); }
.a-check-big li::before { top: 19px; width: 28px; height: 28px; background: rgba(255, 255, 255, .14); }
.a-check-big li::after { left: 9px; top: 27px; width: 10px; height: 5px; border-color: #fff; }

.a-faq-in { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(30px, 6vw, 90px); align-items: start; }
.a-faq-list { border-top: 1px solid var(--line); }
.a-faq-list details { border-bottom: 1px solid var(--line); }
.a-faq-list summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 22px 0; font-size: clamp(17px, 1.5vw, 20px); font-weight: 600; letter-spacing: -0.01em; line-height: 1.3; }
.a-faq-list summary::-webkit-details-marker { display: none; }
.a-faq-list summary i { flex: none; position: relative; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); transition: transform .4s var(--ease-out), background .3s, border-color .3s; }
.a-faq-list summary i::before, .a-faq-list summary i::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 1.5px; margin: -.75px 0 0 -6px; background: currentColor; }
.a-faq-list summary i::after { transform: rotate(90deg); transition: transform .4s var(--ease-out); }
.a-faq-list details[open] summary i { background: var(--accent); border-color: var(--accent); color: var(--bg); transform: rotate(180deg); }
.a-faq-list details[open] summary i::after { transform: rotate(0deg); }
.a-faq-list details p { margin: 0; padding: 0 54px 24px 0; font-size: 16px; line-height: 1.7; color: var(--muted); }

.a-end { text-align: center; background: radial-gradient(ellipse 80% 70% at 50% 45%, var(--wine-2), #250409 55%, var(--night) 100%) !important; }
.a-end h2, .a-end .a-intro { margin-inline: auto; }
.a-end .eyebrow { justify-content: center; }
.a-end .a-cta { justify-content: center; }
.a-note { max-width: 560px; margin: 26px auto 0; font-size: 12.5px; line-height: 1.55; color: var(--cream-muted); opacity: .75; }
.a-next { display: flex; flex-direction: column; align-items: center; gap: 10px; margin: clamp(50px, 9vh, 90px) auto 0; padding-top: clamp(30px, 5vh, 46px); max-width: 760px; border-top: 1px solid var(--cream-line); text-decoration: none; color: var(--cream); }
.a-next small { font-size: 12px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--peach); }
.a-next span { font-size: clamp(24px, 3.4vw, 46px); font-weight: 600; letter-spacing: -0.03em; line-height: 1.1; }
.a-next i { display: inline-block; font-style: normal; color: var(--peach); transition: transform .4s var(--ease-out); }
.a-next:hover i { transform: translateX(10px); }

@media (max-width: 980px) {
  .a-grid4, .a-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .a-steps { row-gap: 34px; border-top: 0; }
  .a-steps li { border-top: 1.5px solid var(--line); }
  .a-toc { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .a-get-in, .a-faq-in { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .a-hero { padding-top: calc(env(safe-area-inset-top, 0px) + 104px); }
  .a-title { font-size: clamp(44px, 14.5vw, 72px); }
  .a-toc { grid-template-columns: 1fr; margin-top: 40px; }
  .a-toc a { grid-template-columns: 34px 1fr; align-items: baseline; padding: 14px 0; border-top: 0; border-bottom: 1px solid var(--cream-line); margin: 0; }
  .a-grid4, .a-steps { grid-template-columns: 1fr; }
  .a-who-card h3 { margin-top: 8px; }
  .a-block { grid-template-columns: 1fr; gap: 18px; padding: 24px 22px 26px; border-radius: 24px; }
  .a-block-h { flex-direction: row; align-items: center; }
  .a-check { grid-template-columns: 1fr; }
  .a-steps li { padding-right: 0; }
  .a-faq-list details p { padding-right: 0; }
  .a-cta .btn { flex: 1 1 100%; justify-content: center; }
}

/* ============ PAGINE LEGALI ============ */
.legal .lg-links { flex-basis: 100%; margin-top: 4px; }
.legal .lg-links a { color: var(--cream); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(244, 239, 231, .35); }
.legal .lg-links a:hover { text-decoration-color: currentColor; }
.lg-hero { padding-bottom: clamp(50px, 8vh, 90px); }
.lg-hero .a-title { font-size: clamp(44px, 8vw, 120px); }
.lg-date { margin-top: 22px; font-size: 13px; color: var(--cream-muted); letter-spacing: .02em; }
.lg-wrap { max-width: 900px; }
.lg-sec { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 18px; padding-block: 34px; border-top: 1px solid var(--line); }
.lg-sec:first-child { border-top: 0; padding-top: 0; }
.lg-sec .a-num { padding-top: 6px; }
.lg-sec h2 { margin: 0 0 14px; font-size: clamp(22px, 2.2vw, 28px); letter-spacing: -0.02em; line-height: 1.2; }
.lg-sec p, .lg-sec li { font-size: 16px; line-height: 1.7; color: var(--muted); }
.lg-sec p { margin: 0 0 12px; }
.lg-sec p:last-child { margin-bottom: 0; }
.lg-sec b { color: var(--ink); font-weight: 600; }
.lg-sec a { color: var(--accent); text-underline-offset: 3px; }
.lg-list { margin: 0 0 12px; padding-left: 20px; display: grid; gap: 8px; }
.lg-list li::marker { color: var(--accent); }
@media (max-width: 640px) { .lg-sec { grid-template-columns: 1fr; gap: 6px; padding-block: 28px; } .lg-sec p, .lg-sec li { font-size: 15px; } }

/* ============ HERO: PANORAMA DISEGNATO ============ */
.casa-zoom { --casa-w: min(100cqw, 1500px, calc(100cqh * 2.5)); --casa-h: calc(var(--casa-w) / 2); bottom: 0; transform-origin: 53.75% 28.5%; will-change: auto; }
.casa-tilt { will-change: auto; }
.casa.borgo-wrap { aspect-ratio: 2 / 1; -webkit-mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent); mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent); }
.borgo { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.borgo .ln { fill: none; stroke: rgba(244, 239, 231, .78); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.borgo .far { stroke: rgba(232, 184, 150, .3); stroke-width: 1.6; }
.borgo .lake { stroke: rgba(170, 196, 214, .45); stroke-width: 1.4; }
.borgo .mtn.thin { stroke-width: 1.1; stroke: rgba(232, 184, 150, .5); }
.borgo .boat { stroke: rgba(244, 239, 231, .7); stroke-width: 1.3; }
.casa.lit .borgo .rf.lk { opacity: .6; }
.borgo .names { opacity: calc(var(--lit, 0) * var(--nm, 1)); pointer-events: none; }
.no-js .borgo .names { opacity: 1; }
.borgo .nm1 { font-family: 'Poppins', sans-serif; font-weight: 500; font-size: 19px; letter-spacing: .28em; text-transform: uppercase; fill: rgba(244, 239, 231, .78); }
.borgo .nm2 { font-family: 'Lora', serif; font-style: italic; font-size: 21px; fill: rgba(242, 168, 119, .78); }
.borgo .nmln { stroke: rgba(242, 168, 119, .6); stroke-width: 1; fill: none; }
.borgo .nmf { animation: nmFloat 7s ease-in-out infinite; will-change: transform; }
.borgo .nm-torre .nmf { animation-duration: 6.2s; animation-delay: -1.4s; }
.borgo .nm-lago .nmf { animation-duration: 8.4s; animation-delay: -3.1s; animation-name: nmFloat2; }
@keyframes nmFloat { 0%, 100% { transform: translate(0, 0); } 30% { transform: translate(3px, -6px); } 65% { transform: translate(-2px, -3px); } }
@keyframes nmFloat2 { 0%, 100% { transform: translate(0, 0); } 35% { transform: translate(-3px, -5px); } 70% { transform: translate(2px, -8px); } }
@media (prefers-reduced-motion: reduce) { .borgo .nmf { animation: none; } }
@media (max-width: 900px) {
  .borgo .nm1 { font-size: 23px; letter-spacing: .22em; }
  .borgo .nm2 { font-size: 24px; }
  .borgo .nm-torre .nm2 { transform: translateY(6px); }
  .borgo .nm-berg text { text-anchor: start; }
  .borgo .nm-berg { transform: translate(18px, 6px); }
  .borgo .nm-lago text { text-anchor: end; }
  .borgo .nm-lago { transform: translate(28px, -40px); }
}
.borgo .hill { stroke: rgba(242, 201, 164, .62); stroke-width: 2; }
.borgo .vine { stroke: rgba(232, 184, 150, .5); stroke-width: 1.3; }
.borgo .post { stroke: rgba(232, 184, 150, .42); stroke-width: 1.1; }
.borgo .berg { stroke: rgba(242, 201, 164, .62); stroke-width: 1.6; }
.borgo .berg.thin { stroke-width: 1.1; stroke: rgba(242, 201, 164, .45); }
.borgo .mtn { stroke: rgba(232, 184, 150, .42); stroke-width: 1.5; }
.borgo .stone { stroke: rgba(246, 234, 219, .32); stroke-width: 1; }
.borgo .sref { fill: #FFC98E; opacity: calc(.75 - var(--lit) * .55); }
.borgo .roof { stroke: rgba(242, 201, 164, .85); }
.borgo .tower { stroke: #F6EADB; stroke-width: 2.6; }
.borgo .thin { stroke-width: 1.4; stroke: rgba(246, 234, 219, .7); }
.borgo .tree { stroke: rgba(196, 160, 120, .6); stroke-width: 1.8; }
.borgo .bridge { stroke: rgba(244, 239, 231, .6); stroke-width: 2; }
.borgo .river { stroke: rgba(232, 184, 150, .35); stroke-width: 1.4; }
.borgo .sun { fill: url(#sunG); opacity: calc(1 - var(--lit) * .75); transform: translateY(calc(var(--lit) * 48px)); }
.borgo .glows { opacity: calc(var(--lit) * .9); mix-blend-mode: screen; }
.borgo .glw { fill: url(#glwG); }
.borgo .fills path { fill: #22070B; }
.borgo .w { fill: #2A0A0E; stroke: rgba(242, 201, 164, .35); stroke-width: .8; transition: fill .9s ease-out, filter .9s ease-out; }
.casa.lit .borgo .w, .no-js .borgo .w { fill: #FFC98E; filter: drop-shadow(0 0 4px rgba(255, 190, 120, .9)); transition-delay: calc(var(--i) * 28ms); }
.borgo .rf { fill: #FFC98E; opacity: 0; transition: opacity 1.2s ease-out; transition-delay: calc(var(--i) * 28ms + 400ms); }
.casa.lit .borgo .rf { opacity: .35; }
/* sequenza: le linee si disegnano per gruppi, poi si accendono le finestre */
.js .borgo .ln { stroke-dasharray: 1; stroke-dashoffset: 1; }
.js.go .borgo .ln { stroke-dashoffset: 0; transition: stroke-dashoffset 2.2s cubic-bezier(.5, 0, .2, 1); transition-delay: calc(var(--g) * 260ms + 300ms); }
.js .casa-tilt { filter: none; }
.bloom { display: none; }
@media (max-width: 900px) { .casa-zoom { --casa-w: min(175cqw, calc(100cqh * 2.2)); } }
@media (prefers-reduced-motion: reduce) { .borgo .w { fill: #FFC98E; } .borgo .rf { opacity: .35; } .borgo .sun { opacity: .4; } }

/* ============ LUOGHI DEL PANORAMA: NOMI CLICCABILI E POP-UP ============ */
.borgo .nm { opacity: .5; transition: opacity .4s; }
.borgo .nm:hover, .borgo .nm:focus-visible { opacity: 1; }
.casa.lit .borgo .nm { pointer-events: auto; cursor: pointer; outline: none; }
.casa-zoom.nm-off .borgo .nm { pointer-events: none; }
.borgo .nmhit { fill: transparent; }
.borgo .nm text { paint-order: stroke; stroke: rgba(30, 6, 10, .85); stroke-width: 5px; stroke-linejoin: round; }
.borgo .nm text { transition: fill .35s; }
.borgo .nm:hover .nm1, .borgo .nm:focus-visible .nm1 { fill: #FFF6EA; }
.borgo .nm:hover .nm2, .borgo .nm:focus-visible .nm2 { fill: #FFC48F; }
.borgo .nm:focus-visible .nmhit { stroke: rgba(242, 168, 119, .7); stroke-width: 1.5; }
.borgo .nmdot { fill: #F2A877; }
.borgo .nmring { fill: none; stroke: #F2A877; stroke-width: 1.4; transform-box: fill-box; transform-origin: center; animation: nmPing 2.6s ease-out infinite; }
.borgo .nm-torre .nmring { animation-delay: -.9s; } .borgo .nm-fran .nmring { animation-delay: -2.2s; }
.borgo .nm-fran .nmf { animation-duration: 7.6s; animation-delay: -4.2s; animation-name: nmFloat2; } .borgo .nm-lago .nmring { animation-delay: -1.7s; }
@keyframes nmPing { 0% { transform: scale(.6); opacity: .9; } 80%, 100% { transform: scale(2.4); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .borgo .nmring { animation: none; opacity: .5; } }

.hero-foot { justify-content: flex-end; }
/* lieve fluttuazione del panorama (si ferma quando parte lo zoom, per restare nitido) */
.casa.lit .borgo { animation: borgoFloat 9s ease-in-out infinite; }
.casa-zoom.nm-off .borgo { animation: none; }
@keyframes borgoFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@media (prefers-reduced-motion: reduce) { .casa.lit .borgo { animation: none; } }
html.lu-open { overflow: hidden; }
.luogo { padding: 0; border: 0; background: transparent; color: var(--cream); max-width: none; max-height: none; width: 100%; height: 100%; margin: 0; inset: 0; display: none; align-items: center; justify-content: center; }
.luogo[open] { display: flex; }
.luogo::backdrop { background: rgba(14, 3, 5, .62); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.lu-box { position: relative; width: min(600px, calc(100% - 32px)); max-height: min(86vh, 860px); overflow: auto; overscroll-behavior: contain; padding: clamp(26px, 4vw, 44px); border-radius: 26px; border: 1px solid var(--cream-line);
  background: radial-gradient(120% 70% at 85% 0%, rgba(242, 168, 119, .16), transparent 60%), linear-gradient(180deg, #2A0B11, #1A0609); box-shadow: 0 40px 120px -30px rgba(0, 0, 0, .8);
  animation: luIn .5s var(--ease-out, cubic-bezier(.2,.8,.2,1)) both; font-family: var(--font); }
@keyframes luIn { from { opacity: 0; transform: translateY(24px) scale(.98); } to { opacity: 1; transform: none; } }
.lu-x { position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--cream-line); background: rgba(244, 239, 231, .06); color: var(--cream); display: grid; place-items: center; cursor: pointer; transition: background .3s; }
.lu-x:hover { background: rgba(244, 239, 231, .14); }
.lu-eyebrow { margin: 0; font-size: 11.5px; font-weight: 600; letter-spacing: .24em; text-transform: uppercase; color: var(--peach); }
.lu-title { margin: 12px 0 0; font-size: clamp(28px, 4vw, 38px); font-weight: 600; letter-spacing: -0.03em; line-height: 1.05; padding-right: 40px; }
.lu-sub { margin: 6px 0 0; font-family: var(--serif); font-style: italic; font-size: 19px; color: var(--peach); }
.lu-intro { margin: 18px 0 0; font-size: 16px; line-height: 1.65; color: var(--cream); }
.lu-sec { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--cream-line); }
.lu-sec h4, .lu-inv h4 { margin: 0 0 6px; font-size: 12px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--cream-muted); }
.lu-sec p, .lu-inv p { margin: 0; font-size: 15px; line-height: 1.65; color: rgba(244, 239, 231, .86); }
.lu-inv { margin-top: 24px; padding: 18px 20px; border-radius: 16px; background: rgba(242, 168, 119, .08); border: 1px solid rgba(242, 168, 119, .25); }
.lu-inv h4 { color: var(--peach); }
.lu-cta { display: inline-flex; align-items: center; gap: 10px; margin-top: 24px; padding: 14px 22px; border-radius: 999px; background: var(--cream); color: #1A0609; font-weight: 600; font-size: 15px; text-decoration: none; transition: transform .3s; }
.lu-cta:hover { transform: translateY(-2px); }
@media (max-width: 640px) {
  .luogo { align-items: flex-end; }
  .lu-box { width: 100%; max-height: 88vh; border-radius: 26px 26px 0 0; padding-bottom: calc(28px + env(safe-area-inset-bottom, 0px)); animation-name: luUp; }
  @keyframes luUp { from { transform: translateY(100%); } to { transform: none; } }
  .lu-cta { width: 100%; justify-content: center; }
}
