/* ==========================================================================
   Pierluigi Giglio: landing v2. CSS vanilla, mobile first.
   ========================================================================== */

:root {
  --bg: #0B0B0C;
  --surface: #141416;
  --surface-2: #1B1B1E;
  --line: rgba(255, 255, 255, .09);
  --line-strong: rgba(255, 255, 255, .18);
  --text: #F2F2F0;
  --muted: #9A9A9F;
  --accent: #34D378;
  --on-accent: #0B0B0C;
  --error: #F08A8A;
  --radius: 18px;
  --radius-lg: 18px;
  --gutter: 20px;
  --container: 1320px;
  --header-h: 60px;
  --section-y: 96px;
  --font: 'Archivo', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
@media (min-width: 768px) { :root { --gutter: 40px; --header-h: 72px; } }
@media (min-width: 960px) { :root { --section-y: 160px; } }

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
/* touch-action: manipulation toglie lo zoom col doppio tocco (resta quello a due dita) */
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; touch-action: manipulation; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font); font-weight: 400; font-size: 1.0625rem; line-height: 1.6;
  overflow-x: hidden;
  padding-bottom: 76px; /* spazio per la barra mobile fissa */
}
@media (min-width: 768px) { body { padding-bottom: 0; } }
img, video { max-width: 100%; height: auto; display: block; }
.fill { width: 100%; height: 100%; object-fit: cover; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3, h4, p, ul, ol, dl, dd, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
body.lock { overflow: hidden; }
[hidden] { display: none !important; }

/* ---------- Tipografia ---------- */
h1, h2, h3 { font-weight: 800; letter-spacing: -0.03em; line-height: 1.04; }
/* Display: condensato, maiuscolo, solo nella pagina (non nei moduli) */
main h1, main h2, main h3, .display {
  font-stretch: 62%; font-weight: 800; text-transform: uppercase; line-height: .9; letter-spacing: -0.005em;
}
main h1 { font-size: clamp(4.4rem, 19vw, 9rem); }
main h2 { font-size: clamp(2.8rem, 7vw, 6rem); }
main h3 { font-size: clamp(2.4rem, 4.6vw, 4rem); }
.hl { color: var(--accent); }
.label, .kicker {
  font-size: .72rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); line-height: 1.4;
}
.kicker { color: var(--accent); margin-bottom: 20px; }
.label-accent { color: var(--accent); }
.lead { color: var(--muted); max-width: 60ch; }
.cond { font-stretch: 62%; font-weight: 800; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: calc(var(--container) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: var(--section-y) 0; border-top: 1px solid var(--line); }
.section-head { display: grid; gap: 28px; margin-bottom: 56px; align-items: end; }
.section-head .lead { margin: 0; }
@media (min-width: 960px) {
  .section-head { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 64px; margin-bottom: 96px; }
}

/* ---------- Bottoni ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 26px; border-radius: 999px;
  border: 1px solid transparent; font-weight: 700; font-size: .98rem; text-decoration: none; line-height: 1.2;
  transition: transform .15s ease, background .15s ease, border-color .15s ease, color .15s ease;
}
.btn:active { transform: scale(.98); }
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: #4be08a; }
.btn-ghost { background: transparent; border-color: var(--line-strong); color: var(--text); }
.btn-ghost:hover { border-color: var(--text); }
.btn-lg { min-height: 56px; padding: 0 32px; font-size: 1.05rem; }
.btn-xl { min-height: 64px; padding: 0 40px; font-size: 1.15rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.icon { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- Header ---------- */
.header {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--header-h);
  border-bottom: 1px solid transparent;
  transition: background .25s ease, border-color .25s ease;
}
.header.scrolled { background: rgba(11, 11, 12, .82); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-color: var(--line); }
.header .container { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.logo { font-stretch: 62%; font-weight: 800; letter-spacing: .02em; font-size: 1.35rem; line-height: 1; text-decoration: none; text-transform: uppercase; white-space: nowrap; }
.nav { display: none; align-items: center; gap: 32px; margin-left: auto; margin-right: 8px; }
.nav a { color: var(--muted); font-size: .92rem; font-weight: 500; text-decoration: none; transition: color .15s; }
.nav a:hover { color: var(--text); }
.header .btn { min-height: 42px; padding: 0 20px; font-size: .9rem; }
@media (min-width: 960px) { .nav { display: flex; } }

/* ---------- Hero ---------- */
.hero { position: relative; }
.hero-top { position: relative; min-height: 100svh; display: flex; align-items: flex-end; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; background: var(--surface); }
.hero-bg::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(11,11,12,.55) 0, rgba(11,11,12,0) 22%, rgba(11,11,12,0) 42%, rgba(11,11,12,.78) 62%, rgba(11,11,12,.94) 80%, var(--bg) 100%);
}
.hero-copy { position: relative; z-index: 1; padding-bottom: 28px; padding-top: calc(var(--header-h) + 24px); }
.hero-copy .kicker { margin-bottom: 16px; }
.hero-copy h1 { margin-bottom: 20px; }
.hero-lead { color: var(--text); opacity: .86; max-width: 34ch; margin-bottom: 24px; }
.hero-cta { width: 100%; }
.scroll-hint { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 20px; color: var(--muted); font-size: .72rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; text-decoration: none; }
.scroll-hint .icon { width: 16px; height: 16px; animation: nudge 2s ease-in-out infinite; }
@keyframes nudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(4px); } }

/* La pellicola: su mobile carosello di porte, su desktop 4 pannelli */
.strip-wrap { padding-top: 32px; padding-bottom: 64px; }
.strip-label { margin-bottom: 16px; }
.strip {
  display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter); scroll-padding: 0 var(--gutter);
  overscroll-behavior-x: contain;
}
.strip::-webkit-scrollbar { display: none; }
.panel {
  position: relative; display: block; overflow: hidden; border-radius: var(--radius); background: var(--surface);
  color: var(--text); text-decoration: none; isolation: isolate;
}
.panel-door { flex: none; width: min(74vw, 340px); aspect-ratio: 9 / 14; scroll-snap-align: start; }
.panel-pier { display: none; }
.panel .fill { position: absolute; inset: 0; z-index: -2; }
.panel-shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(to bottom, rgba(11,11,12,.55) 0, rgba(11,11,12,0) 30%, rgba(11,11,12,0) 45%, rgba(11,11,12,.88) 100%); }
.panel-num { position: absolute; top: 18px; left: 20px; font-stretch: 62%; font-weight: 800; font-size: 2rem; line-height: 1; color: var(--accent); }
.panel-info { position: absolute; left: 20px; right: 72px; bottom: 20px; display: grid; gap: 6px; }
.panel-title { font-stretch: 62%; font-weight: 800; text-transform: uppercase; line-height: .92; font-size: clamp(1.8rem, 8vw, 2.6rem); letter-spacing: -0.005em; }
.panel-sub { color: rgba(242,242,240,.78); font-size: .85rem; line-height: 1.35; }
.panel-go {
  position: absolute; right: 18px; bottom: 18px; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid rgba(242,242,240,.45); display: grid; place-items: center;
  transition: background .3s ease, border-color .3s ease, color .3s ease;
}
.panel:hover .panel-go, .panel:focus-visible .panel-go { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.zoom { animation: zoom 14s ease-in-out infinite alternate; }
@keyframes zoom { from { transform: scale(1); } to { transform: scale(1.08); } }

@media (min-width: 960px) {
  /* il titolo si adatta anche all'altezza dello schermo, cosi la pellicola resta sempre intera */
  main h1 { font-size: clamp(4.4rem, min(10.5vw, 17svh), 9rem); }
  .hero { height: 100svh; min-height: 720px; display: flex; flex-direction: column; padding-bottom: 24px; }
  .hero-top { min-height: 0; display: block; overflow: visible; flex: none; }
  .hero-bg, .hero-cta, .scroll-hint, .strip-label { display: none; }
  .hero-copy {
    display: grid; grid-template-columns: minmax(0, 1fr) 34ch; column-gap: 56px; align-items: end;
    padding-top: calc(var(--header-h) + 28px); padding-bottom: 28px;
  }
  .hero-copy .kicker { grid-column: 1 / -1; }
  .hero-copy h1 { margin: 0; grid-column: 1; }
  .hero-lead { grid-column: 2; margin: 0 0 .4rem; opacity: .8; color: var(--muted); }
  .strip-wrap { flex: 1; min-height: 0; padding-top: 0; padding-bottom: 0; display: flex; }
  .strip { flex: 1; min-height: 340px; margin: 0; padding: 0; overflow: visible; scroll-snap-type: none; gap: 10px; }
  .panel, .panel-door, .panel-pier { display: block; flex: 1 1 0; min-width: 0; width: auto; aspect-ratio: auto; transition: flex-grow .5s ease, opacity .4s ease; }
  .panel-title { font-size: clamp(1.8rem, 2.6vw, 2.6rem); }
  .panel-num { font-size: 2.4rem; top: 22px; left: 24px; }
  .panel-info { left: 24px; bottom: 24px; right: 84px; }
  .panel-go { right: 22px; bottom: 22px; }
  .panel-door:hover, .panel-door:focus-visible { flex-grow: 1.5; }
  .strip:has(.panel:hover) .panel:not(:hover),
  .strip:has(.panel:focus-visible) .panel:not(:focus-visible) { opacity: .6; }
}

/* ---------- Banda numeri ---------- */
.stats { border-bottom: 1px solid var(--line); }
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; }
.stat { padding: 40px 0 36px; border-bottom: 1px solid var(--line); }
.stat:nth-child(odd) { padding-right: 16px; border-right: 1px solid var(--line); }
.stat:nth-child(even) { padding-left: 20px; }
.stat:nth-last-child(-n+2) { border-bottom: 0; }
.stat .n { display: block; font-stretch: 62%; font-weight: 800; font-size: clamp(3.4rem, 7vw, 6rem); line-height: .9; letter-spacing: -0.005em; }
.stat .l { display: block; margin-top: 14px; color: var(--muted); font-size: .9rem; line-height: 1.4; max-width: 24ch; }
@media (min-width: 960px) {
  .stats-grid { grid-template-columns: repeat(4, 1fr); }
  .stat { padding: 64px 32px 60px; border-bottom: 0 !important; border-right: 1px solid var(--line) !important; }
  .stat:first-child { padding-left: 0; }
  .stat:last-child { border-right: 0 !important; }
}

/* ---------- Pillole ---------- */
.pill {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px;
  font-size: .78rem; font-weight: 600; letter-spacing: .02em; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line);
}
.pill svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.pill.live { color: var(--accent); border-color: rgba(52, 211, 120, .35); background: rgba(52, 211, 120, .07); }
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }

/* ---------- Operazioni ---------- */
.ops { display: grid; gap: 40px; }
.op { display: grid; gap: 24px; padding: 0; }
.op:first-child { border-top: 0; padding-top: 0; }
.op:last-child { padding-bottom: 0; }
.op-media, .op-body { min-width: 0; }
.op-body { display: flex; flex-direction: column; align-items: flex-start; width: 100%; }
.op-body > *, .op-scroll > * { max-width: 100%; }
.only-mobile { display: none; }

/* Dettagli dell'operazione: da desktop in linea (i contenitori spariscono dal layout),
   su telefono diventano il pannello dal basso (vedi blocco < 960px) */
.op-more, .op-sheet, .op-scroll { display: contents; }
.op-sheet-bar { display: none; }
.op-keys li, .op-actions { text-align: center; }
.op-main { display: block; width: 100%; padding: 0; border: 0; background: var(--surface); aspect-ratio: 16 / 10; border-radius: var(--radius); overflow: hidden; }
.op-main img { transition: transform .8s ease; }
.op-main:hover img { transform: scale(1.03); }
.thumbs { display: flex; gap: 8px; margin-top: 8px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; overscroll-behavior-x: contain; }
.thumbs::-webkit-scrollbar { display: none; }
.thumb { flex: none; height: 64px; aspect-ratio: 4 / 3; padding: 0; border: 0; border-radius: 10px; overflow: hidden; background: var(--surface); scroll-snap-align: start; }
.thumb img { transition: opacity .15s; }
.thumb:hover img { opacity: .75; }
.op-body .loc { margin: 20px 0 8px; }
.op-body h3 { margin-bottom: 20px; }
.desc { color: var(--muted); max-width: 60ch; }
.op-body .desc { margin-bottom: 8px; }

.data { width: 100%; margin: 24px 0 0; border-top: 1px solid var(--line); }
.data-row { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.data-row dt { color: var(--muted); font-size: .95rem; line-height: 1.35; }
.data-row dd { text-align: right; font-stretch: 62%; font-weight: 800; font-size: 1.9rem; line-height: 1; letter-spacing: -0.005em; text-transform: uppercase; white-space: nowrap; }
.data-row dd small { display: block; margin-top: 4px; font-stretch: 100%; font-weight: 400; font-size: .75rem; line-height: 1.3; color: var(--muted); text-transform: none; letter-spacing: 0; white-space: normal; }

/* Linea del tempo: verticale su mobile, orizzontale da desktop */
.tl { width: 100%; margin: 32px 0 0; display: grid; }
.tl li { position: relative; padding: 0 0 22px 28px; display: grid; gap: 2px; }
.tl li.last { padding-bottom: 0; }
.tl li::before { content: ''; position: absolute; left: 5px; top: 14px; bottom: -4px; width: 1px; background: var(--line-strong); }
.tl li.last::before { display: none; }
.tl li::after { content: ''; position: absolute; left: 0; top: 4px; width: 11px; height: 11px; border-radius: 50%; background: var(--bg); border: 1px solid var(--muted); }
.tl li.last::after { background: var(--accent); border-color: var(--accent); }
.tl b { font-weight: 700; font-size: .95rem; line-height: 1.3; }
.tl span { color: var(--muted); font-size: .88rem; line-height: 1.35; }
@media (min-width: 960px) {
  .tl { grid-auto-flow: column; grid-auto-columns: 1fr; }
  .tl li { padding: 26px 12px 0 0; }
  .tl li::before { left: 11px; right: 0; top: 5px; bottom: auto; width: auto; height: 1px; }
  .tl li::after { top: 0; }
}

/* Barre di confronto */
.bars { width: 100%; margin-top: 32px; display: grid; gap: 18px; }
.bar-label { font-size: .85rem; color: var(--muted); margin-bottom: 8px; }
.bar-track { height: 10px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.bar-fill { display: block; height: 100%; width: var(--w); border-radius: 999px; background: #C4C4C8; transform: scaleX(0); transform-origin: left center; transition: transform 1.3s cubic-bezier(.2, .7, .2, 1); }
.bar-fill.accent { background: var(--accent); }
.bars.in .bar-fill { transform: scaleX(1); }
.bars.in .bar-item:nth-child(2) .bar-fill { transition-delay: .25s; }
.footnote { color: var(--muted); font-size: .82rem; line-height: 1.5; margin-top: 20px; max-width: 52ch; }
.quote { border-left: 2px solid var(--accent); padding: 2px 0 2px 18px; margin: 32px 0 32px; font-style: italic; font-size: 1.15rem; line-height: 1.45; max-width: 36ch; }
.op-body .btn-row { margin-top: auto; }

@media (min-width: 960px) {
  .ops { gap: 0; }
  .op { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; padding: 96px 0; border-top: 1px solid var(--line); align-items: start; }
  .op-media { grid-column: 1 / span 7; position: sticky; top: calc(var(--header-h) + 24px); }
  .op-body { grid-column: 8 / span 5; padding-left: 16px; }
  .op:nth-child(even) .op-media { grid-column: 6 / span 7; grid-row: 1; }
  .op:nth-child(even) .op-body { grid-column: 1 / span 5; grid-row: 1; padding-left: 0; padding-right: 16px; }
  .thumb { height: 88px; }
  .op-body .btn-row { margin-top: 0; }
}

/* Fascia di chiusura delle sezioni 01 e 02 */
.cta-band {
  margin-top: 72px; padding: 28px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px;
  display: flex; flex-direction: column; align-items: center; gap: 24px; text-align: center;
}
.cta-title { font-size: clamp(1.9rem, 3.4vw, 2.8rem); }
.cta-text p { margin: 12px auto 0; color: var(--muted); max-width: 44ch; }
.cta-band .btn { flex: none; }
.disclaimer { margin: 18px auto 0; color: var(--muted); font-size: .75rem; line-height: 1.5; max-width: 72ch; text-align: center; }
@media (min-width: 960px) {
  .cta-band { margin-top: 112px; padding: 44px 56px; flex-direction: row; justify-content: space-between; gap: 48px; text-align: left; }
  .cta-text p { margin-left: 0; max-width: 60ch; }
}

/* Pannello della scheda operazione (solo telefono): sale dal basso a tutto schermo */
@media (max-width: 959px) {
  .op-more {
    position: fixed; inset: 0; z-index: 90; display: none; align-items: flex-end; justify-content: center;
    background: rgba(0, 0, 0, .72);
  }
  .op-more.open { display: flex; animation: veil-in .3s ease both; }
  .op-sheet {
    display: flex; flex-direction: column; width: 100%; max-width: 760px; height: calc(100svh - 28px);
    background: var(--surface); border-radius: 20px 20px 0 0; border: 1px solid var(--line); border-bottom: 0; overflow: hidden;
    outline: none;
  }
  .op-more.open .op-sheet { animation: sheet-up .35s cubic-bezier(.2, .7, .2, 1) both; }
  .op-sheet-bar {
    position: sticky; top: 0; z-index: 2; flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 14px 20px 14px 20px; background: var(--surface); border-bottom: 1px solid var(--line);
  }
  .op-sheet-title { font-size: 1.7rem; line-height: .95; }
  .op-sheet-bar .close-btn { flex: none; width: 44px; height: 44px; margin: 0; }
  .op-scroll {
    display: flex; flex-direction: column; align-items: center; text-align: center; flex: 1; min-height: 0;
    padding: 20px 20px calc(28px + env(safe-area-inset-bottom)); overflow-y: auto; overscroll-behavior: contain;
  }
  .op-scroll > * { flex: none; }
  .op-scroll .thumbs { width: 100%; margin: 0 0 24px; }
  .op-scroll .desc { margin: 0 auto 8px; }
  .op-scroll .data, .op-scroll .tl, .op-scroll .bars { text-align: left; }
  .op-scroll .btn-row { margin-top: 8px; justify-content: center; }
  .op-media > .thumbs { display: none; }
}
@keyframes veil-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes sheet-up { from { transform: translateY(100%); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { .op-more.open, .op-more.open .op-sheet { animation: none; } }

/* ---------- Acquisto casa ---------- */
.listings { display: grid; gap: 96px; }
@media (min-width: 960px) { .listings { gap: 160px; } }
.listing { display: grid; gap: 32px; min-width: 0; }
.car { position: relative; min-width: 0; }
.car-track {
  display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain;
  margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter); scroll-padding: 0 var(--gutter);
}
.car-track::-webkit-scrollbar { display: none; }
.car-slide { flex: none; width: 88vw; scroll-snap-align: start; }
.car-slide button { position: relative; display: block; width: 100%; padding: 0; border: 0; background: var(--surface); aspect-ratio: 16 / 10; border-radius: var(--radius); overflow: hidden; }
.slide-tag { position: absolute; top: 14px; left: 14px; padding: 6px 12px; border-radius: 999px; background: rgba(11,11,12,.78); font-size: .72rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.car-btn { display: none; min-width: 44px; min-height: 44px; }
.listing-body { display: grid; gap: 28px; min-width: 0; }
.listing-head { display: flex; flex-direction: column; align-items: flex-start; }
.listing-head .loc { margin: 20px 0 8px; }
.listing-text { display: flex; flex-direction: column; align-items: flex-start; gap: 24px; }
.features { display: grid; grid-template-columns: 1fr; gap: 12px 24px; width: 100%; }
.features li { display: flex; align-items: flex-start; gap: 12px; line-height: 1.4; }
.features .icon { width: 20px; height: 20px; color: var(--accent); margin-top: 1px; stroke-width: 2.2; }
@media (min-width: 560px) { .features { grid-template-columns: 1fr 1fr; } }
@media (min-width: 960px) {
  .car-track { margin: 0; padding: 0; scroll-padding: 0; }
  .car-slide { width: 85%; }
  .car-btn {
    position: absolute; top: 50%; width: 52px; height: 52px; margin-top: -26px; border-radius: 50%; z-index: 2;
    display: grid; place-items: center; border: 1px solid var(--line-strong); background: rgba(11,11,12,.8);
    transition: background .2s, color .2s, opacity .2s;
  }
  .car-btn:hover { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
  .car-btn.prev { left: 16px; } .car-btn.next { right: 16px; }
  .car-btn:disabled { opacity: 0; pointer-events: none; }
  .listing-body { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); column-gap: 64px; align-items: start; }
}

/* ---------- Lavora con noi ---------- */
.work { display: grid; gap: 56px; }
.work-intro .lead { margin: 24px 0 32px; }
.jobs { border-top: 1px solid var(--line); min-width: 0; }
.job {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: 8px 20px; width: 100%; padding: 28px 12px 28px 0;
  text-align: left; background: transparent; border: 0; border-bottom: 1px solid var(--line); color: var(--text);
  transition: background .25s ease, padding .25s ease;
}
.job-num { font-size: .72rem; font-weight: 600; letter-spacing: .14em; color: var(--accent); padding-top: .55rem; min-width: 2ch; }
.job-text { display: grid; gap: 10px; min-width: 0; }
.job-text strong { font-stretch: 62%; font-weight: 800; text-transform: uppercase; line-height: .92; font-size: clamp(1.9rem, 3.4vw, 3rem); letter-spacing: -0.005em; }
.job-text span { color: var(--muted); font-size: .95rem; line-height: 1.45; }
.job-arrow { align-self: center; color: var(--muted); transition: transform .25s ease, color .25s ease; }
.job:hover, .job:focus-visible { background: var(--surface); padding-left: 16px; }
.job:hover .job-arrow, .job:focus-visible .job-arrow { color: var(--accent); transform: translateX(6px); }
@media (min-width: 960px) {
  .work { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: 96px; align-items: start; }
  .work-intro { position: sticky; top: calc(var(--header-h) + 32px); }
  .job { padding-top: 36px; padding-bottom: 36px; }
}

/* ---------- Chi sono ---------- */
.about-grid { display: grid; gap: 48px; }
.about-photo { aspect-ratio: 4 / 5; border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.about-photo .fill { object-position: 50% 30%; }
.about .big { font-stretch: 62%; font-weight: 800; text-transform: uppercase; line-height: .92; letter-spacing: -0.005em; font-size: clamp(2.2rem, 5vw, 4.4rem); }
.signature { margin: 28px 0 20px; }
.about-text { color: var(--muted); max-width: 52ch; }
.social { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.social a { display: inline-flex; align-items: center; gap: 10px; min-height: 46px; padding: 0 20px; border: 1px solid var(--line-strong); border-radius: 999px; text-decoration: none; font-weight: 600; font-size: .92rem; transition: border-color .15s; }
.social a:hover { border-color: var(--accent); }
.social .icon { width: 18px; height: 18px; }
@media (min-width: 960px) {
  .about-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: 96px; align-items: center; }
}

/* ---------- Chiusura e footer ---------- */
.final { border-top: 1px solid var(--line); padding: 128px 0; text-align: center; }
.final h2 { font-size: clamp(3.6rem, 12vw, 10rem); margin: 0 auto 48px; max-width: 12ch; }
.final-btns { display: flex; flex-direction: column; align-items: stretch; gap: 12px; max-width: 420px; margin: 0 auto; }
@media (min-width: 960px) {
  .final { padding: 220px 0; }
  .final-btns { flex-direction: row; justify-content: center; max-width: none; gap: 16px; }
}
.footer { border-top: 1px solid var(--line); padding: 28px 0; color: var(--muted); font-size: .88rem; }
.footer .container { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--text); }

/* ---------- Telefono (< 960px): testi centrati e card compatte ---------- */
@media (max-width: 959px) {
  /* hero */
  .hero-copy { text-align: center; }
  .hero-lead { margin-inline: auto; }
  .strip-label { text-align: center; }
  /* testate di sezione */
  .section-head { text-align: center; }
  .section-head .lead { margin-inline: auto; }
  /* banda numeri: la cella è centrata, i filetti restano */
  .stats .stat:nth-child(n) { text-align: center; padding-left: 12px; padding-right: 12px; }
  .stat .l { margin-inline: auto; }
  /* schede operazione (card compatta) */
  .op-body { align-items: center; text-align: center; }
  .op-body .pill, .listing-head .pill { align-self: center; }
  .op-body .loc { margin-top: 16px; }
  .op-body h3 { margin-bottom: 0; }
  .op-keys { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; margin: 24px 0 0; border-block: 1px solid var(--line); }
  .op-keys li { display: grid; gap: 6px; align-content: start; padding: 16px 6px 14px; }
  .op-keys li + li { border-left: 1px solid var(--line); }
  .op-keys b { font-stretch: 62%; font-weight: 800; font-size: 1.7rem; line-height: .95; letter-spacing: -0.005em; text-transform: uppercase; white-space: nowrap; }
  .op-keys span { color: var(--muted); font-size: .72rem; line-height: 1.3; }
  .op-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 24px; }
  .op-actions .btn { padding: 0 20px; }
  /* il pannello e' position: fixed: niente transform sull'antenato, o si ancorerebbe a lui */
  .op-body.reveal { transform: none; }
  /* quote: via il filetto a sinistra, trattino verde sopra */
  .quote { border-left: 0; padding: 0; margin: 32px auto; text-align: center; }
  .quote::before { content: ''; display: block; width: 40px; height: 2px; margin: 0 auto 16px; background: var(--accent); }
  .footnote { margin-inline: auto; }
  /* annunci */
  .listing-head, .listing-text { align-items: center; text-align: center; }
  .listing-text .desc { margin-inline: auto; }
  .features { display: inline-grid; width: auto; text-align: left; }
  /* lavora con noi: testata centrata, righe a sinistra */
  .work-intro { text-align: center; }
  .work-intro .lead { margin-inline: auto; }
  .jobs, .job { text-align: left; }
  /* chi sono */
  .about-body { text-align: center; }
  .about-text { margin-inline: auto; }
  .social { justify-content: center; }
  /* pulsanti e footer */
  .btn-row { justify-content: center; }
  .footer .container { justify-content: center; text-align: center; }
}
@media (min-width: 960px) { .only-mobile { display: none !important; } }

/* ---------- Barra mobile ---------- */
.mbar {
  position: fixed; inset: auto 0 0 0; z-index: 40; padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom));
  background: rgba(11, 11, 12, .92); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-top: 1px solid var(--line);
  transform: translateY(110%); transition: transform .25s ease;
}
.mbar.show { transform: none; }
.mbar .btn { width: 100%; }
@media (min-width: 768px) { .mbar { display: none; } }

/* ---------- Comparsa allo scroll ---------- */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }
.no-js .bar-fill { transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .zoom, .scroll-hint .icon { animation: none; }
  .bar-fill { transform: none; transition: none; }
  * { transition-duration: .01ms !important; }
}

/* ---------- Modali (form / video / lightbox) ---------- */
.modal {
  position: fixed; inset: 0; z-index: 100; display: none; background: rgba(0, 0, 0, .72);
  align-items: stretch; justify-content: center;
}
.modal.open { display: flex; }
.modal-box {
  position: relative; width: 100%; background: var(--surface); overflow-y: auto; display: flex; flex-direction: column;
  padding: 0 var(--gutter) calc(24px + env(safe-area-inset-bottom));
}
@media (min-width: 768px) {
  .modal { align-items: center; padding: 24px; }
  .modal-box { max-width: 560px; max-height: min(100%, 760px); border-radius: var(--radius-lg); border: 1px solid var(--line); padding: 0 36px 32px; }
}
.modal-top { position: sticky; top: 0; background: var(--surface); z-index: 2; padding: 20px 0 14px; }
.modal-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; font-size: .82rem; color: var(--muted); font-weight: 600; letter-spacing: .04em; }
.close-btn { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-strong); background: transparent; display: grid; place-items: center; margin-right: -6px; }
.close-btn:hover { border-color: var(--text); }
.progress { height: 3px; background: var(--line); border-radius: 3px; overflow: hidden; }
.progress i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .3s ease; }

.fstep { display: none; flex: 1; flex-direction: column; padding-top: 12px; }
.fstep.active { display: flex; }
.fstep h2 { font-size: 1.9rem; margin-bottom: 8px; }
.fstep .sub { color: var(--muted); margin-bottom: 24px; }
.fields { display: grid; gap: 16px; }
@media (min-width: 480px) { .fields.two { grid-template-columns: 1fr 1fr; } }
.field label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 6px; }
.field input, .field textarea {
  width: 100%; min-height: 50px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line-strong);
  background: var(--bg); color: var(--text); font: inherit; font-size: 16px; /* 16px evita lo zoom su iOS */
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); }
.field.invalid input { border-color: var(--error); }
.err { display: none; margin-top: 6px; font-size: .82rem; color: var(--error); }
.field.invalid .err { display: block; }
.tiles { display: grid; gap: 10px; }
.tile { position: relative; }
.tile input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; cursor: pointer; margin: 0; }
.tile span {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px; min-height: 64px;
  border-radius: var(--radius); border: 1px solid var(--line-strong); background: var(--bg); font-weight: 700; font-size: 1.05rem; transition: border-color .15s, background .15s;
}
.tile span::after { content: ''; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line-strong); flex: none; }
.tile:hover span { border-color: var(--muted); }
.tile input:checked + span { border-color: var(--accent); background: rgba(52, 211, 120, .08); }
.tile input:checked + span::after { border-color: var(--accent); background: var(--accent); box-shadow: inset 0 0 0 4px var(--bg); }
.tile input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.check, .field .check { display: flex; gap: 12px; align-items: flex-start; margin-top: 16px; font-size: .9rem; color: var(--muted); }
.check input, .field .check input { width: 22px; height: 22px; min-height: 0; padding: 0; margin: 1px 0 0; border-radius: 4px; accent-color: var(--accent); flex: none; }
.check a { color: var(--text); }
.field.invalid.check-field .err { display: block; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-actions { margin-top: auto; padding-top: 24px; display: flex; gap: 12px; align-items: center; min-height: 72px; }
.form-actions .btn-primary { flex: 1; }
.back-btn { background: none; border: 0; color: var(--muted); font-weight: 600; padding: 12px 8px; }
.back-btn:hover { color: var(--text); }
.form-error { display: none; margin-top: 16px; padding: 12px 14px; border-radius: 12px; background: rgba(240, 138, 138, .1); border: 1px solid rgba(240, 138, 138, .3); color: var(--error); font-size: .9rem; }
.form-error.show { display: block; }
.btn[disabled] { opacity: .6; cursor: progress; }
.spin { width: 18px; height: 18px; border: 2px solid rgba(11,11,12,.3); border-top-color: var(--on-accent); border-radius: 50%; animation: spin .7s linear infinite; display: none; }
.loading .spin { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }
.thanks { text-align: left; justify-content: center; }
.thanks .icon { width: 44px; height: 44px; color: var(--accent); margin-bottom: 20px; }

/* Modale video e lightbox */
.modal.media { align-items: center; padding: 16px; }
.media-box { position: relative; width: 100%; max-width: 420px; }
.media-box video { width: 100%; aspect-ratio: 9 / 16; max-height: 86svh; background: #000; border-radius: var(--radius); }
.lb-box { position: relative; max-width: 1100px; width: 100%; }
.lb-box img { width: 100%; max-height: 82svh; object-fit: contain; border-radius: 12px; }
.media .close-btn { position: absolute; top: -52px; right: 0; background: var(--surface); margin: 0; }
.lb-nav { position: absolute; top: 50%; width: 44px; height: 44px; margin-top: -22px; border-radius: 50%; border: 1px solid var(--line-strong); background: rgba(11,11,12,.8); display: grid; place-items: center; }
.lb-nav.prev { left: 8px; } .lb-nav.next { right: 8px; }


/* Modale tour 3D */
.modal.tour { padding: 2svh 2vw; }
.tour-box { position: relative; width: 96vw; height: 92svh; max-width: 100%; display: flex; flex-direction: column; gap: 10px; }
.tour-frame { flex: 1; min-height: 0; border-radius: 14px; overflow: hidden; background: #000; }
.tour-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
/* la X sta sopra il riquadro, cosi non copre i comandi del tour */
.modal.media .tour-box .close-btn { position: static; align-self: flex-end; flex: none; background: var(--surface-2); }

/* ---------- Pagine di testo (privacy, 404) ---------- */
.doc { padding: calc(var(--header-h) + 56px) 0 80px; }
.doc h1 { font-size: clamp(2rem, 7vw, 3.2rem); margin-bottom: 24px; }
.doc h2 { font-size: 1.4rem; margin: 32px 0 8px; font-stretch: 100%; text-transform: none; line-height: 1.2; letter-spacing: -0.02em; }
.doc p { color: var(--muted); max-width: 70ch; margin-bottom: 12px; }
.placeholder { display: inline-block; padding: 4px 10px; border-radius: 8px; background: rgba(52, 211, 120, .1); color: var(--accent); font-size: .85rem; font-weight: 600; margin-bottom: 20px; }
.notfound { min-height: 100svh; display: grid; place-content: center; text-align: left; padding: 40px var(--gutter); }
.notfound .big { font-stretch: 75%; font-weight: 800; font-size: clamp(6rem, 30vw, 12rem); line-height: .9; color: var(--accent); letter-spacing: -0.04em; }
.notfound p { color: var(--muted); margin: 16px 0 28px; }

/* ---------- Banner "conclusa" sulla foto di Colle Pizzuto ---------- */
.op-main { position: relative; }
.sold-tag {
  position: absolute; top: 0; left: 0; right: 0; z-index: 1; padding: 10px 12px;
  background: #E5383B; color: #fff; text-align: center;
  font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; line-height: 1.2;
}
#pizzuto .op-body .loc { margin-top: 0; }
/* Su desktop il banner e piu grande: deve saltare all'occhio */
@media (min-width: 960px) { .sold-tag { padding: 15px 16px; font-size: .9rem; letter-spacing: .16em; } }

/* ---------- Titoli: le parole salgono una dopo l'altra ---------- */
.tw { display: inline-block; overflow: hidden; vertical-align: top; padding: .16em 0 .08em; margin: -.16em 0 -.08em; }
.tw > span { display: inline-block; transform: translateY(115%); transition: transform .8s cubic-bezier(.19, .8, .22, 1); transition-delay: calc(var(--i, 0) * 55ms); will-change: transform; }
.split.in .tw > span { transform: none; }

/* ---------- Form: campo messaggio nell'ultimo passo ---------- */
.field label .opt { color: var(--muted); font-weight: 500; }
.fstep[data-step="dati"] textarea { min-height: 84px; }

/* ---------- Galleria ampia su desktop: tutte le miniature visibili, 5 per riga ---------- */
@media (min-width: 960px) {
  .op-media > .thumbs-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); overflow: visible; }
  .thumbs-grid .thumb { width: 100%; height: auto; aspect-ratio: 8 / 5; }
}

/* ---------- Firma dell'agenzia nel footer: piccola ma leggibile ---------- */
.footer .credit { font-size: .78rem; letter-spacing: .02em; opacity: .75; transition: opacity .15s, color .15s; }
.footer .credit strong { font-weight: 700; color: var(--text); }
.footer .credit:hover { opacity: 1; }
.footer .credit:hover strong { color: var(--accent); }

/* ---------- Pagine documento (privacy, cookie, termini) ---------- */
.doc .updated { font-size: .82rem; color: var(--muted); letter-spacing: .02em; margin-bottom: 20px; }
.doc .intro { color: var(--text); font-size: 1.1rem; }
.doc ul { max-width: 70ch; margin: 0 0 14px; padding-left: 1.2em; color: var(--muted); }
.doc li { margin-bottom: 8px; }
.doc li::marker { color: var(--accent); }
.doc strong { color: var(--text); font-weight: 600; }
.doc a { color: var(--text); text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; }
.doc a:hover { color: var(--accent); }
.doc h2 { scroll-margin-top: calc(var(--header-h) + 16px); }
.footer-links { display: inline-flex; flex-wrap: wrap; gap: 6px 20px; justify-content: center; }
/* i testi legali restano allineati a sinistra anche su telefono: si leggono meglio */
@media (max-width: 959px) { .doc, .doc p, .doc h1, .doc h2, .doc .kicker { text-align: left; } }
