/* QUOTA — design system
   Pietra e cielo coperto come fondo, grafite come inchiostro,
   arancio segnaletica (quello dei droni e delle maniche a vento) solo sull'azione e sul segno di quota. */

:root {
  /* Colore */
  --bg: #e8e9e5;          /* Pietra: fondo pagina */
  --surface: #dadbd6;     /* Pietra in ombra: un passo di tono per i campi */
  --ink: #111413;         /* Grafite: testo e superfici scure */
  --muted: #545a57;       /* Grafite chiara: note secondarie */
  --accent: #ff4f00;      /* Arancio segnaletica: azione primaria e segno ▽ */
  --accent-press: #e04500;
  --accent-ink: #111413;
  --night: #111413;       /* Campo scuro */
  --night-surface: #1c201f;
  --night-ink: #ecede9;
  --night-muted: #a3a9a5;

  /* Tipo — un solo carattere */
  --font: "Clash Grotesk", "Helvetica Neue", Arial, sans-serif;
  --step-small: clamp(0.8125rem, 0.79rem + 0.1vw, 0.875rem);
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.375rem, 1.1rem + 1vw, 2.25rem);
  --step-head: clamp(2rem, 1.3rem + 3.2vw, 4rem);
  --step-display: clamp(7.5rem, min(27vw, 40svh), 26rem);

  /* Spazio */
  --margin: clamp(16px, 1.8vw, 28px);
  --gap: clamp(16px, 1.6vw, 24px);
  --section: clamp(96px, 12vw, 200px);

  /* Movimento */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.76, 0, 0.24, 1);
}


*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--step-body);
  font-weight: 400;
  line-height: 1.55;
  font-feature-settings: "tnum" 1;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
h1, h2, h3, h4, p, figure, blockquote, ul, ol, dl, dd { margin: 0; }
h1, h2, h3 { font-weight: 400; letter-spacing: -0.03em; line-height: 0.98; text-wrap: balance; }
p { text-wrap: pretty; max-width: 62ch; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

.skip { position: absolute; left: var(--margin); top: -60px; z-index: 50; background: var(--ink); color: var(--bg); padding: 12px 16px; }
.skip:focus { top: 12px; }

/* ---------- Marchio ---------- */
.mark { width: 1em; height: 1em; flex: none; }
.mark .tri { fill: var(--accent); }
.mark .bar { fill: currentColor; }
.wordmark { display: inline-flex; align-items: center; gap: 0.32em; font-weight: 500; letter-spacing: -0.02em; text-decoration: none; font-size: 1.375rem; line-height: 1; }

/* Il segno di quota: ▽ +32,00 m sulle fotografie */
.quota { display: inline-flex; align-items: center; gap: 8px; font-size: var(--step-small); font-weight: 500; line-height: 1; white-space: nowrap; }
.quota::before { content: ""; width: 12px; height: 10px; background: var(--accent); clip-path: polygon(0 0, 100% 0, 50% 100%); }
.photo-quota { position: absolute; left: 16px; bottom: 16px; color: var(--night-ink); background: rgb(17 20 19 / 0.72); padding: 8px 10px; }

/* ---------- Bottoni ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 24px;
  background: var(--accent); color: var(--accent-ink);
  font: 500 var(--step-body)/1 var(--font); letter-spacing: -0.005em;
  text-decoration: none; border: 0; border-radius: 0; cursor: pointer;
  transition: background-color 160ms ease, transform 140ms var(--ease-out);
}
.btn:hover { background: var(--accent-press); }
.btn:active { transform: scale(0.97); }
.btn--paper { background: var(--night-ink); color: var(--ink); }
.btn--paper:hover { background: #ffffff; }
.btn--ink { background: var(--ink); color: var(--night-ink); }
.btn--ink:hover { background: #2a2f2d; }
.btn .arrow { transition: transform 200ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .btn:hover .arrow { transform: translateX(4px); } }

.link { font-weight: 500; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; text-decoration-color: var(--accent); transition: text-underline-offset 180ms var(--ease-out), color 160ms ease; }
.link:hover { text-underline-offset: 8px; }

/* ---------- Navigazione ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 20;
  transition: transform 320ms var(--ease-out), background-color 240ms ease, color 240ms ease, padding 240ms var(--ease-out);
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--margin);
  color: var(--night-ink);
}
.nav::before { content: ""; position: absolute; inset: 0 0 -40px 0; z-index: -1; background: linear-gradient(rgb(17 20 19 / 0.7), rgb(17 20 19 / 0)); pointer-events: none; } /* scrim su foto: taste-skill-ignore */
.nav--solid { position: sticky; top: 0; color: var(--ink); background: var(--bg); }
.nav[data-scrolled="true"] { background: var(--bg); color: var(--ink); padding-top: 12px; padding-bottom: 12px; }
.nav[data-scrolled="true"]::before { opacity: 0; }
.nav::before { transition: opacity 240ms ease; }
.nav--solid::before { display: none; }
.nav ul { display: flex; gap: clamp(16px, 2vw, 32px); list-style: none; padding: 0; align-items: center; }
.nav a:not(.btn):not(.wordmark) { text-decoration: none; font-size: 1rem; font-weight: 500; position: relative; padding: 10px 0; }
.nav a:not(.btn):not(.wordmark)::after { content: ""; position: absolute; left: 0; right: 0; bottom: 4px; height: 2px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform 220ms var(--ease-out); }
.nav a:not(.btn):not(.wordmark):hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }
.nav .btn { min-height: 44px; padding: 0 20px; font-size: 1rem; }
.menu-toggle { display: none; background: none; border: 0; color: inherit; font: 500 1rem/1 var(--font); padding: 12px 0; cursor: pointer; }

@media (max-width: 820px) {
  .menu-toggle { display: block; }
  .nav ul { position: fixed; inset: 0; flex-direction: column; align-items: flex-start; justify-content: flex-end; gap: 8px; padding: 96px var(--margin) 40px; background: var(--night); color: var(--night-ink); visibility: hidden; opacity: 0; transform: translateY(-8px); transition: opacity 220ms var(--ease-out), transform 220ms var(--ease-out), visibility 0s 220ms; }
  .nav ul a:not(.btn):not(.wordmark) { font-size: 2.5rem; letter-spacing: -0.03em; font-weight: 400; }
  .nav ul li:last-child { width: 100%; }
  .nav[data-open="true"] { transition: none; background: transparent; }
  .nav ul .btn { margin-top: 24px; width: 100%; min-height: 56px; font-size: 1.0625rem; }
  .nav[data-open="true"] ul { visibility: visible; opacity: 1; transform: none; transition: opacity 220ms var(--ease-out), transform 220ms var(--ease-out); }
  .nav[data-open="true"] .menu-toggle, .nav[data-open="true"] .wordmark { position: relative; z-index: 2; color: var(--night-ink); }
}

/* ---------- Hero: il nome sotto la fotografia ---------- */
.hero { position: relative; min-height: 100svh; display: grid; grid-template-rows: 54svh auto 1fr; background: var(--bg); }
.hero__media { position: relative; overflow: hidden; background: var(--surface); }
.hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: 60% 40%; }
.hero__strip { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--gap); padding: 24px var(--margin) 0; }
.hero__strip p { max-width: 42ch; font-size: var(--step-body); }
.hero__name {
  align-self: end;
  padding: 0 var(--margin);
  font-size: var(--step-display); font-weight: 400; letter-spacing: -0.05em; line-height: 0.85;
  margin: 0 0 clamp(14px, 1.9vw, 28px) -0.04em;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 0.1em;
  transform-origin: 0 100%;
}
.hero__name .hero__tri { width: 0.34em; height: 0.29em; background: var(--accent); clip-path: polygon(0 0, 100% 0, 50% 100%); margin-bottom: 0.56em; flex: none; }
.hero--page .hero__name { font-size: clamp(3.5rem, 10.5vw, 10.5rem); line-height: 0.9; letter-spacing: -0.045em; }

@media (max-width: 720px) {
  .hero { grid-template-rows: 50svh auto auto; }
  .hero__name { order: 2; }
  .hero__strip { order: 3; flex-direction: column; padding-top: 4px; padding-bottom: 40px; }
  .hero__strip p { font-size: 1rem; }
  .hero__strip .btn { width: 100%; }
  .hero__name { font-size: 23vw; margin-top: 20px; margin-bottom: 16px; }
  .hero--page .hero__name { font-size: 13vw; }
}

/* ---------- Sezioni ---------- */
.section { padding: var(--section) var(--margin); }
.night { background: var(--night); color: var(--night-ink); }
.night .muted, .night .soft { color: var(--night-muted); }
.field { background: var(--surface); }
.muted { color: var(--muted); }
.head { font-size: var(--step-head); }
.lead { font-size: var(--step-lead); line-height: 1.3; letter-spacing: -0.01em; }
.small { font-size: var(--step-small); }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); }

figure { position: relative; }
figure img { width: 100%; height: 100%; object-fit: cover; }
figcaption.credit { font-size: var(--step-small); color: var(--muted); margin-top: 10px; }

/* Numeri: la cifra sul bordo della fotografia */
.figure-photo { position: relative; height: 88svh; overflow: hidden; color: var(--night-ink); }
.figure-photo > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.figure-photo::after { content: ""; position: absolute; inset: auto 0 0 0; height: 40%; background: linear-gradient(rgb(17 20 19 / 0), rgb(17 20 19 / 0.78)); } /* scrim su foto: taste-skill-ignore */
.figure-photo h2 { position: absolute; z-index: 2; top: var(--margin); left: var(--margin); font-size: var(--step-body); font-weight: 500; letter-spacing: -0.01em; background: rgb(17 20 19 / 0.6); padding: 8px 12px; }
.figure-photo .big { position: absolute; z-index: 2; left: var(--margin); bottom: 10px; font-size: clamp(7.5rem, 17vw, 17.5rem); line-height: 0.8; letter-spacing: -0.05em; }
.figure-photo .why { position: absolute; z-index: 2; right: var(--margin); bottom: var(--margin); max-width: 28ch; text-align: right; font-size: var(--step-body); line-height: 1.35; }
@media (max-width: 720px) {
  .figure-photo { height: 80svh; }
  .figure-photo .big { font-size: 30vw; bottom: 8px; }
  .figure-photo .why { left: var(--margin); right: auto; bottom: calc(30vw + 24px); text-align: left; font-size: 1rem; }
}

/* Il calcolatore di quota (la cosa viva) */
.calc { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); row-gap: 40px; align-items: start; }
.calc__intro { grid-column: 1 / 6; display: grid; gap: 20px; }
.calc__form { grid-column: 1 / 6; display: grid; gap: 28px; }
.calc__view { grid-column: 7 / 13; grid-row: 1 / 3; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--gap); align-items: end; background: var(--surface); padding: clamp(20px, 3vw, 40px); }
.calc fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 12px; }
.calc legend, .calc label.lbl { font-weight: 500; margin-bottom: 4px; padding: 0; }
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choices label { position: relative; }
.choices input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.choices span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; background: var(--surface); font-weight: 500; transition: background-color 160ms ease, color 160ms ease, transform 140ms var(--ease-out); }
.choices input:hover + span { background: #cdcec8; }
.choices input:checked + span { background: var(--ink); color: var(--night-ink); }
.choices input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.choices input:active + span { transform: scale(0.97); }
.range-row { display: flex; align-items: center; gap: 16px; }
.range-row output { min-width: 4.5ch; font-size: var(--step-lead); font-weight: 500; }
input[type="range"] { flex: 1; appearance: none; -webkit-appearance: none; height: 44px; background: transparent; cursor: pointer; }
input[type="range"]::-webkit-slider-runnable-track { height: 6px; background: var(--ink); }
input[type="range"]::-moz-range-track { height: 6px; background: var(--ink); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; margin-top: -9px; background: var(--accent); border: 0; border-radius: 0; clip-path: polygon(0 0, 100% 0, 50% 100%); transition: transform 140ms var(--ease-out); }
input[type="range"]:active::-webkit-slider-thumb { transform: scale(1.18); }
input[type="range"]::-moz-range-thumb { width: 24px; height: 24px; background: var(--accent); border: 0; border-radius: 0; clip-path: polygon(0 0, 100% 0, 50% 100%); }

.elev { position: relative; height: clamp(320px, 52svh, 520px); }
.elev svg { width: 100%; height: 100%; overflow: visible; }
.elev .bldg { fill: var(--bg); }
.elev .win { fill: var(--surface); }
.elev .ground { fill: var(--ink); }
.elev .limit { fill: var(--muted); }
.elev .marker { transition: transform 180ms var(--ease-out); }
.elev .marker .tri { fill: var(--accent); }
.elev .marker text, .elev .limit-text { font: 500 13px var(--font); fill: var(--ink); }
.calc__out { display: grid; gap: 22px; align-self: stretch; align-content: end; }
.calc__out .val { font-size: var(--step-head); line-height: 0.95; letter-spacing: -0.04em; }
.calc__out .cap { color: var(--muted); font-size: var(--step-small); line-height: 1.35; }
.calc__note { font-size: var(--step-small); color: var(--muted); max-width: 46ch; }
@media (max-width: 900px) {
  .calc { display: flex; flex-direction: column; gap: 32px; }
  .calc__view { grid-template-columns: 1fr 1fr; }
  .elev { height: 300px; }
}

/* Footer: fotografia a metà, menu a metà */
.footer { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); min-height: 100svh; background: var(--night); color: var(--night-ink); }
.footer__media { grid-column: 1 / 7; position: relative; overflow: hidden; }
.footer__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.footer__body { grid-column: 8 / 13; padding: 80px var(--margin) var(--margin) 0; display: flex; flex-direction: column; gap: 56px; }
.footer__menu { list-style: none; padding: 0; display: grid; gap: 18px; }
.footer__menu a { font-size: var(--step-lead); font-weight: 500; letter-spacing: -0.03em; text-decoration: none; display: inline-block; line-height: 1; transition: transform 240ms var(--ease-out), color 200ms ease; }
@media (hover: hover) and (pointer: fine) {
  .footer__menu:hover a { color: var(--night-muted); }
  .footer__menu a:hover { color: var(--night-ink); transform: translateX(12px); }
}
.footer__menu a:focus-visible { transform: translateX(12px); }
.footer__blocks { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); font-size: var(--step-small); }
.footer__blocks b { display: block; font-weight: 500; margin-bottom: 6px; }
.footer__blocks a { text-decoration: none; }
.footer__blocks a:hover { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 4px; }
.footer__legal { margin-top: auto; font-size: var(--step-small); color: var(--night-muted); display: flex; flex-wrap: wrap; gap: 8px 24px; }
.footer__name { font-size: clamp(5rem, 13vw, 12rem); line-height: 0.82; letter-spacing: -0.05em; transform-origin: 0 100%; }
@media (max-width: 900px) {
  .footer { display: flex; flex-direction: column; min-height: 0; }
  .footer__media { height: 50svh; }
  .footer__body { padding: 40px var(--margin) var(--margin); gap: 40px; }

  .footer__blocks { grid-template-columns: 1fr; }
  .footer__name { font-size: 26vw; }
}

/* ---------- Pagine interne ---------- */
.split { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); row-gap: 48px; }
.split__l { grid-column: 1 / 6; display: grid; gap: 24px; align-content: start; }
.split__r { grid-column: 7 / 13; display: grid; gap: 24px; align-content: start; }
.split__r figure, .split__l figure { overflow: hidden; }
.spec { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
.spec div { background: var(--surface); padding: 28px 24px 24px; display: grid; gap: 8px; align-content: space-between; min-height: 200px; }
.night .spec div { background: var(--night-surface); }
.spec .v { font-size: var(--step-head); line-height: 0.9; letter-spacing: -0.04em; }
.list { list-style: none; padding: 0; display: grid; gap: 14px; }
.list li { display: grid; grid-template-columns: 16px 1fr; gap: 14px; align-items: baseline; }
.list li::before { content: ""; width: 12px; height: 10px; background: var(--accent); clip-path: polygon(0 0, 100% 0, 50% 100%); transform: translateY(-1px); }
.pull { font-size: var(--step-lead); line-height: 1.2; letter-spacing: -0.015em; max-width: 30ch; }
.wide-photo { position: relative; height: 72svh; overflow: hidden; }
.wide-photo img { width: 100%; height: 100%; object-fit: cover; }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); }
.compare > div { padding: 32px; display: grid; gap: 16px; align-content: start; }
.compare .a { background: var(--surface); }
.compare .b { background: var(--ink); color: var(--night-ink); }
.compare .b .list li::before { background: var(--accent); }
.compare h3 { font-size: var(--step-lead); letter-spacing: -0.01em; }
@media (max-width: 900px) {
  .split { display: flex; flex-direction: column; }
  .spec { grid-template-columns: 1fr; }
  .spec div { min-height: 0; }
  .compare { grid-template-columns: 1fr; }
}

/* Tabella tecnica (le tabelle tengono le loro linee) */
.table { width: 100%; border-collapse: collapse; font-size: 1rem; }
.table th, .table td { text-align: left; padding: 14px 0; border-bottom: 1px solid rgb(17 20 19 / 0.18); vertical-align: top; }
.night .table th, .night .table td { border-color: rgb(236 237 233 / 0.2); }
.table th { font-weight: 500; width: 42%; }

/* ---------- Modulo preventivo ---------- */
.form { display: grid; gap: 40px; max-width: 760px; }
.form fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 14px; }
.form legend { font-size: var(--step-lead); letter-spacing: -0.01em; margin-bottom: 8px; padding: 0; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.fields .full { grid-column: 1 / -1; }
.f { display: grid; gap: 6px; }
.f label { font-weight: 500; font-size: 0.9375rem; }
.f input, .f select, .f textarea {
  font: 400 1.0625rem/1.4 var(--font); color: var(--ink);
  background: #f4f5f2; border: 1px solid rgb(17 20 19 / 0.22); border-radius: 0;
  min-height: 52px; padding: 12px 14px; width: 100%;
  transition: border-color 160ms ease, background-color 160ms ease;
}
.f textarea { min-height: 120px; resize: vertical; }
.f input:hover, .f select:hover, .f textarea:hover { border-color: rgb(17 20 19 / 0.5); }
.f input:focus, .f select:focus, .f textarea:focus { outline: none; border-color: var(--ink); background: #fff; box-shadow: 0 0 0 3px var(--accent); } /* anello di focus: taste-skill-ignore */
.f .hint { font-size: var(--step-small); color: var(--muted); }
.f [aria-invalid="true"] { border-color: #b3261e; }
.f .err { font-size: var(--step-small); color: #b3261e; min-height: 1em; }
.consent { display: grid; grid-template-columns: 24px 1fr; gap: 12px; align-items: start; font-size: 0.9375rem; }
.consent input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--ink); }
.steps-bar { display: flex; gap: 6px; }
.steps-bar span { flex: 1; height: 6px; background: var(--surface); transition: background-color 300ms ease; }
.steps-bar span.on { background: var(--ink); }
.step[hidden] { display: none; }
.step { animation: stepIn 380ms var(--ease-out); }
@keyframes stepIn { from { opacity: 0; transform: translateY(12px); } }
.form-nav { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.btn--ghost { background: transparent; color: var(--ink); padding: 0 4px; }
.btn--ghost:hover { background: transparent; text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 6px; }
.summary { background: var(--surface); padding: 24px; display: grid; gap: 6px; }
.done { background: var(--ink); color: var(--night-ink); padding: clamp(28px, 4vw, 48px); display: grid; gap: 16px; }
@media (max-width: 720px) {
  .fields { grid-template-columns: 1fr; }
  .form-nav .btn { flex: 1; }
}

/* ---------- Brand book ---------- */
.swatches { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0; }
.swatch { min-height: 260px; padding: 20px; display: flex; flex-direction: column; justify-content: space-between; font-size: 0.9375rem; }
.swatch b { font-weight: 500; font-size: 1.125rem; }
.logo-stage { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
.logo-stage > div { aspect-ratio: 4/3; display: grid; place-items: center; }
.specimen { font-size: clamp(4rem, 12vw, 12rem); line-height: 0.85; letter-spacing: -0.05em; }
.dodont { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); }
.dodont > div { padding: 28px; display: grid; gap: 14px; align-content: start; }
@media (max-width: 900px) {
  .swatches { grid-template-columns: 1fr 1fr; }
  .swatch { min-height: 160px; }
  .logo-stage, .dodont { grid-template-columns: 1fr; }
}

/* ---------- Movimento ---------- */
.js [data-reveal] > * { opacity: 0; transform: translateY(24px); }
.js [data-reveal].in > * { opacity: 1; transform: none; transition: opacity 760ms var(--ease-out), transform 760ms var(--ease-out); transition-delay: calc(var(--i, 0) * 80ms); }
.hero__media img
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; scroll-behavior: auto !important; transition-property: opacity, color, background-color, visibility !important; transition-duration: 200ms !important; }
  [data-scale] { transform: none !important; }
  .js [data-reveal] > * { opacity: 1 !important; transform: none !important; }
}

/* Ordine su telefono: il testo prima della foto */
@media (max-width: 900px) { .split__l:has(> figure), .split__l:has(> .photo-pair) { order: 2; } }
.photo-pair { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); margin-top: var(--gap); }
.photo-pair figure { aspect-ratio: 1/1; }

/* Preventivo */
.quote { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); }
.quote__media { grid-column: 1 / 7; position: relative; }
.quote__media figure { position: sticky; top: 0; height: 100svh; }
.quote__body { grid-column: 8 / 13; padding: clamp(40px, 6vw, 96px) var(--margin) var(--section) 0; display: grid; gap: 56px; align-content: start; }
.quote__intro { display: grid; gap: 24px; }
.step-count { margin-left: auto; }
.after { display: grid; grid-template-columns: 4fr 5fr 3fr; gap: var(--gap); align-items: start; }
.after > div { display: grid; gap: 16px; }
.after > div:nth-child(1) figure { aspect-ratio: 3/4; }
.after > div:nth-child(2) figure { aspect-ratio: 4/3; margin-top: 12vh; }
.after > div:nth-child(3) figure { aspect-ratio: 1/1; margin-top: 4vh; }
.after p b { font-weight: 500; }
@media (max-width: 900px) {
  .quote { display: flex; flex-direction: column-reverse; }
  .quote__media figure { position: relative; height: 56svh; }
  .quote__body { padding: 32px var(--margin) 64px; }
  .after { grid-template-columns: 1fr; gap: 40px; }
  .after > div figure { margin-top: 0 !important; }
}

/* Rifiniture */
.acc details[open] p { animation: answerIn 220ms var(--ease-out); }
@keyframes answerIn { from { opacity: 0; transform: translateY(-4px); } }
.acc summary { transition: color 160ms ease; }
@media (hover: hover) and (pointer: fine) { .acc summary:hover { color: var(--muted); } .night .acc summary:hover { color: var(--night-muted); } }
@media (max-width: 820px) {
  .nav:not([data-open="true"]) ul { transition: opacity 160ms ease, transform 160ms var(--ease-out), visibility 0s 160ms; }
}

/* Tocco, contrasto, tracking delle note */
a, button, summary, label, input[type="range"] { -webkit-tap-highlight-color: transparent; }
.link:active, .footer__menu a:active, .row:active h3 { opacity: 0.6; transition: opacity 80ms ease; }
.row:active figure img { transform: scale(0.985); }
.small, .footer__legal, .calc__note, .photo-quota, .f .hint, .f .err { letter-spacing: 0.01em; }
@media (prefers-contrast: more) {
  .photo-quota { background: var(--night); }
  .muted, .calc__out .cap { color: var(--ink); }
  .figure-photo::after { background: rgb(17 20 19 / 0.85); }
}
.wide-photo .photo-quota { top: 16px; bottom: auto; }
.wide-photo figure { height: 100%; }

/* ================= Redesign: griglie ordinate ================= */
.section--tight { padding-top: 0; }
.hero__actions { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; justify-content: flex-end; }
.hero__tel { white-space: nowrap; }

/* Fatti in breve: quattro colonne uguali */
.factsbar { padding: 0 var(--margin); margin-top: clamp(-8px, -0.5vw, 0px); }
.spec--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.spec--4 div { min-height: 168px; }

/* Testata di sezione: titolo a sinistra, frase a destra, stessa riga */
.sechead { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); align-items: end; margin-bottom: clamp(32px, 4vw, 56px); }
.sechead h2 { grid-column: 1 / 7; }
.sechead p { grid-column: 7 / 13; max-width: 52ch; }

/* Tessere: stessa proporzione, stessi spazi */
.tiles { display: grid; gap: clamp(32px, 3vw, 48px) var(--gap); list-style: none; padding: 0; margin: 0; }
.tiles--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tiles--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tiles--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tile { display: grid; grid-template-rows: auto auto 1fr auto; gap: 12px; align-content: start; text-decoration: none; color: inherit; }
.tile figure { aspect-ratio: 3/2; overflow: hidden; margin-bottom: 8px; }
.tiles--3 .tile figure { aspect-ratio: 4/3; }
.tiles--4 .tile figure { aspect-ratio: 4/5; }
.tile h3 { font-size: var(--step-lead); letter-spacing: -0.02em; line-height: 1.05; }
.tile p { max-width: 46ch; }
.tile .link { justify-self: start; margin-top: 4px; }
a.tile figure img { transition: transform 700ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { a.tile:hover figure img { transform: scale(1.035); } a.tile:hover .link { text-underline-offset: 8px; } }
a.tile:active figure img { transform: scale(0.99); }

/* Split simmetrico 50/50 */
.split--even .split__l { grid-column: 1 / 7; padding-right: clamp(0px, 3vw, 48px); }
.split--even .split__r { grid-column: 7 / 13; }

/* Prima e dopo */
.ba { position: relative; aspect-ratio: 3/2; overflow: hidden; background: var(--surface); touch-action: pan-y; user-select: none; -webkit-user-select: none; cursor: ew-resize; }
.ba img { pointer-events: none; -webkit-user-drag: none; }
.ba img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ba__before { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.ba__handle { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 3px; margin-left: -1.5px; background: var(--night-ink); pointer-events: none; }
.ba__handle::after { content: ""; position: absolute; top: 50%; left: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px; background: var(--accent); clip-path: polygon(0 50%, 30% 20%, 30% 40%, 70% 40%, 70% 20%, 100% 50%, 70% 80%, 70% 60%, 30% 60%, 30% 80%); }
.ba__tag { position: absolute; top: 16px; padding: 8px 12px; background: rgb(17 20 19 / 0.75); color: var(--night-ink); font-size: var(--step-small); font-weight: 500; pointer-events: none; }
.ba__tag--l { left: 16px; } .ba__tag--r { right: 16px; }
.ba__range { position: absolute; left: 0; bottom: 0; width: 100%; height: 44px; margin: 0; opacity: 0; pointer-events: none; }
.ba__range:focus-visible ~ .ba__handle::after, .ba:has(.ba__range:focus-visible) .ba__handle::after { outline: 3px solid var(--night-ink); }
.ba + .small { margin-top: 12px; }

/* CTA: foto a sinistra, modulo rapido a destra */
.cta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); background: var(--night); color: var(--night-ink); }
.cta__media { min-height: 100%; aspect-ratio: auto; overflow: hidden; --cover: var(--night); }
.cta__media img { position: absolute; inset: 0; }
.cta__panel { padding: clamp(48px, 7vw, 112px) var(--margin) clamp(48px, 7vw, 112px) clamp(32px, 5vw, 80px); display: grid; gap: 40px; align-content: center; }
.cta__text { display: grid; gap: 16px; }
.cta__text h2 { font-size: var(--step-head); }
.cta__text p { color: var(--night-muted); max-width: 44ch; }
.quick { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; max-width: 620px; }
.quick .btn--block, .quick > p { grid-column: 1 / -1; }
.quick .f label { color: var(--night-ink); }
.quick .f input, .quick .f select { background: var(--night-surface); color: var(--night-ink); border-color: rgb(236 237 233 / 0.24); }
.quick .f input::placeholder { color: var(--night-muted); }
.quick .f input:focus, .quick .f select:focus { background: #232826; border-color: var(--night-ink); }
.quick .soft { color: var(--night-muted); }
.btn--block { width: 100%; min-height: 56px; }

/* Barra contatto su telefono */
.mbar { display: none; }
@media (max-width: 820px) {
  .mbar { display: grid; grid-template-columns: 1fr 1.6fr; gap: 8px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 19; padding: 8px var(--margin) calc(8px + env(safe-area-inset-bottom)); background: var(--bg); transform: translateY(110%); transition: transform 260ms var(--ease-out); }
  .mbar .btn { min-height: 52px; padding: 0 12px; }
  .mbar[data-show="true"] { transform: none; }
  body:has(.mbar) .footer { padding-bottom: 76px; }
}

@media (max-width: 900px) {
  .hero__actions { justify-content: flex-start; width: 100%; }
  .hero__actions .btn { flex: 1 1 100%; }
  .spec--4 { grid-template-columns: 1fr 1fr; gap: 8px; }
  .spec--4 div { min-height: 132px; padding: 18px 16px; }
  .spec--4 .v { font-size: 2.25rem; }
  .sechead { display: grid; grid-template-columns: 1fr; gap: 12px; }
  .sechead h2, .sechead p { grid-column: auto; }
  .tiles--2, .tiles--3 { grid-template-columns: 1fr; }
  .tiles--4 { grid-template-columns: 1fr 1fr; gap: 28px 12px; }
  .tiles--4 .tile h3 { font-size: 1.25rem; }
  .tiles--4 .tile p { font-size: 0.9375rem; }
  .split--even .split__l { padding-right: 0; }
  .cta { grid-template-columns: 1fr; }
  .cta__media { aspect-ratio: 4/3; }
  .cta__panel { padding: 40px var(--margin) 56px; }
  .quick { grid-template-columns: 1fr; }
}

/* FAQ (ripristinato) */
.facts { display: grid; gap: 6px; font-size: var(--step-body); list-style: none; padding: 0; }
.facts b { font-weight: 500; }
.acc { display: grid; gap: 4px; }
.acc details { padding: 14px 0; }
.acc summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; font-size: var(--step-body); line-height: 1.3; min-height: 44px; font-weight: 500; }
.acc summary::-webkit-details-marker { display: none; }
.acc summary::after { content: ""; flex: none; width: 10px; height: 10px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translate(-3px, -3px); transition: transform 220ms var(--ease-out); }
.acc details[open] summary::after { transform: rotate(225deg) translate(-3px, -3px); }
.acc details p { padding-top: 10px; color: var(--muted); max-width: 60ch; }
.night .acc details p { color: var(--night-muted); }
.faq__actions { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; }
@media (max-width: 900px) { .faq__actions .btn { width: 100%; } }
.split--even .split__l { gap: 28px; }

/* Header sempre visibile e pieno: niente cambi di stato durante lo scroll */
:root { --navh: 72px; }
.nav { background: var(--bg); color: var(--ink); padding-top: 14px; padding-bottom: 14px; min-height: var(--navh); }
.nav::before { display: none; }
.nav[data-scrolled="true"] { padding-top: 14px; padding-bottom: 14px; }
.nav--solid { position: sticky; }
body:has(.nav:not(.nav--solid)) main { padding-top: var(--navh); }
.hero { min-height: calc(100svh - var(--navh)); grid-template-rows: 50svh auto 1fr; }
@media (max-width: 720px) { .hero { grid-template-rows: 44svh auto auto; } }
.figure-photo .big { line-height: 0.9; bottom: 4px; }
.figure-photo .big { line-height: 1; bottom: -0.06em; padding: 0; }
@media (max-width: 720px) { .figure-photo::after { height: 65%; background: linear-gradient(rgb(17 20 19 / 0), rgb(17 20 19 / 0.88) 45%); } } /* scrim su foto: taste-skill-ignore */
.figure-photo .big { bottom: 0; line-height: 1.05; }

/* Hero ordinato: testo a sinistra, foto a destra */
:root { --section: clamp(72px, 8vw, 128px); }
.hero2 { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); min-height: calc(100svh - var(--navh)); padding: 0 0 0 var(--margin); background: var(--bg); }
.hero2__text { grid-column: 1 / 6; align-self: center; display: grid; gap: 28px; padding: 48px 0; }
.hero2 h1 { font-size: clamp(2.75rem, 5.2vw, 5.25rem); line-height: 0.96; letter-spacing: -0.04em; max-width: 11ch; }
.hero2--page h1 { max-width: 12ch; }
.hero2__lead { font-size: var(--step-lead); line-height: 1.25; letter-spacing: -0.01em; max-width: 30ch; }
.hero2__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; }
.hero2__note { color: var(--muted); }
.hero2__media { grid-column: 6 / 13; position: relative; overflow: hidden; min-height: 420px; }
.hero2__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero2--page { min-height: min(78svh, 760px); }
.footer__name { margin-top: auto; }
.footer__legal { margin-top: 0; }
@media (max-width: 900px) {
  .hero2 { display: flex; flex-direction: column-reverse; padding: 0; min-height: 0; }
  .hero2__media { min-height: 0; aspect-ratio: 4/3; }
  .hero2__text { padding: 28px var(--margin) 40px; gap: 20px; }
  .hero2 h1 { font-size: clamp(2.25rem, 10.5vw, 3rem); max-width: none; }
  .hero2__lead { font-size: 1.125rem; }
  .hero2__actions .btn { width: 100%; }
}
.hero2 { min-height: min(calc(100svh - var(--navh)), 820px); }
.footer { grid-template-columns: 1fr 1fr; column-gap: 0; }
.footer__media { grid-column: 1; }
.footer__body { grid-column: 2; padding: 80px var(--margin) var(--margin) clamp(32px, 5vw, 80px); }
@media (max-width: 900px) { .footer__body { padding: 40px var(--margin) 96px; } }
.section--tight { padding-top: clamp(40px, 4vw, 64px); padding-bottom: clamp(40px, 4vw, 64px); }
.quote__body { gap: 36px; padding-top: clamp(32px, 4vw, 64px); }
[hidden] { display: none !important; }
.f select { height: 52px; padding-top: 0; padding-bottom: 0; appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 40px; } /* freccia del select: taste-skill-ignore */
.f input { height: 52px; }
.f textarea { height: auto; }
a[href^="tel:"] { white-space: nowrap; }
.btn { border: 2px solid transparent; }
.hero2__text, .hero2 h1, .tile, .sechead > * { min-width: 0; }
h1, h2, h3 { overflow-wrap: break-word; hyphens: auto; }
@media (max-width: 900px) { .hero2__text { width: 100%; } .hero2__actions .btn { min-width: 0; } }
.hero2 h1 > span { display: block; }
.hero2__note .quota { white-space: normal; align-items: flex-start; line-height: 1.35; }
.nav { min-width: 0; max-width: 100vw; }
.nav .wordmark { flex: none; }

.ba__handle::before { content: "Trascina"; position: absolute; top: calc(50% + 32px); left: 50%; transform: translateX(-50%); padding: 6px 10px; background: var(--ink); color: var(--night-ink); font-size: var(--step-small); font-weight: 500; white-space: nowrap; transition: opacity 200ms ease; }
.ba.is-dragging .ba__handle::before { opacity: 0; }
.ba.is-dragging .ba__handle::after { transform: scale(1.1); }
.ba__handle::after { transition: transform 140ms var(--ease-out); }
.ba:has(.ba__range:focus-visible) { outline: 3px solid var(--accent); outline-offset: 3px; }
.ba.is-used .ba__handle::before { opacity: 0; }
.ba__handle { will-change: left; }
@media (max-width: 900px) { .ba { aspect-ratio: 4/3; } .ba__handle::after { width: 52px; height: 52px; margin: -26px 0 0 -26px; } }

/* Modulo rapido: scelte a riquadri invece del menu a tendina */
.quick__pick { grid-column: 1 / -1; border: 0; padding: 0; margin: 0; display: grid; gap: 10px; }
.quick__pick legend { font-weight: 500; font-size: 0.9375rem; padding: 0; margin-bottom: 10px; color: var(--night-ink); }
.choices--grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.choices--grid label { display: block; }
.choices--grid span { width: 100%; justify-content: center; min-height: 52px; padding: 0 10px; text-align: center; }
.quick .choices span { background: var(--night-surface); color: var(--night-ink); box-shadow: inset 0 0 0 1px rgb(236 237 233 / 0.18); } /* bordo del controllo: taste-skill-ignore */
.quick .choices input:hover + span { background: #262b29; }
.quick .choices input:checked + span { background: var(--night-ink); color: var(--ink); box-shadow: none; } /* bordo del controllo: taste-skill-ignore */
@media (max-width: 900px) { .choices--grid { grid-template-columns: 1fr 1fr; } }

/* Scelte a 3 colonne (6 voci) e funnel */
.choices--grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.choices--grid3 label { display: block; }
.choices--grid3 span { width: 100%; justify-content: center; min-height: 52px; padding: 0 10px; text-align: center; }
.quick .choices--grid3 span { background: var(--night-surface); color: var(--night-ink); box-shadow: inset 0 0 0 1px rgb(236 237 233 / 0.18); } /* bordo del controllo: taste-skill-ignore */
.quick .choices--grid3 input:hover + span { background: #262b29; }
.quick .choices--grid3 input:checked + span { background: var(--night-ink); color: var(--ink); box-shadow: none; } /* bordo del controllo: taste-skill-ignore */
.calc .choices--grid3 span { min-height: 48px; }
.form fieldset.sub { display: grid; gap: 10px; margin-top: 8px; }
.form fieldset.sub legend { font-size: 1.0625rem; font-weight: 500; letter-spacing: 0; margin-bottom: 4px; }
.legend__hint { display: block; font-size: var(--step-small); letter-spacing: 0; margin-top: 4px; }
.funnel__live { background: var(--surface); padding: 12px 14px; line-height: 1.4; }
.form .step { gap: 20px; }
@media (max-width: 900px) {
  .choices--grid3 { grid-template-columns: 1fr 1fr; }
  .form .choices:not(.choices--grid3) span { min-height: 48px; }
}

/* Campi del modulo: tutti allineati, stessa altezza, spazi uguali */
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 16px; align-items: start; }
.f { align-content: start; align-self: start; gap: 8px; }
.f select, .f input:not([type="checkbox"]):not([type="radio"]) { height: 56px; }
.f select { width: 100%; }
.err:empty { display: none; }
.form .step { gap: 20px; }
.form .form-nav { margin-top: 4px; }
.form .step > .err { margin-top: -8px; }
@media (max-width: 720px) { .fields { grid-template-columns: 1fr; gap: 14px; } }
@media (max-width: 900px) { .hero2, .hero2--page { min-height: 0; } }
.footer__name { font-size: clamp(3.5rem, 8.4vw, 8.5rem); }
@media (max-width: 900px) { .footer__name { font-size: 18vw; } }

/* ================= Il 99: segno del marchio ================= */
:root { --accent-text: #d43d00; }
.n99 { font-weight: inherit; color: var(--accent-text); font-style: normal; }
.night .n99, .footer .n99, .figure-photo .n99, .cta .n99, .nav[data-open="true"] .n99 { color: var(--accent); }
.wordmark .n99 { color: var(--accent); }
.footer__name .n99 { color: var(--accent); }
.hero2 h1 .n99 { color: var(--accent-text); }
.sym99 { font-size: clamp(4rem, 9vw, 7.5rem); font-weight: 700; letter-spacing: -0.06em; color: var(--accent); line-height: 1; }
.swatches { grid-template-columns: repeat(7, minmax(0, 1fr)); }
@media (max-width: 900px) { .swatches { grid-template-columns: 1fr 1fr; } }
.elev .limit-text { fill: var(--accent-text); font-weight: 600; }
.wordmark { font-size: 1.5rem; }
.wordmark .n99 { color: var(--accent-text); }
.footer .wordmark .n99, .nav[data-open="true"] .wordmark .n99 { color: var(--accent); }
.on-dark .wordmark .n99 { color: var(--accent); }

/* Pagine legali */
.legal { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); row-gap: 40px; padding-top: clamp(40px, 5vw, 80px); }
.legal__head { grid-column: 1 / 6; display: grid; gap: 16px; align-content: start; }
.legal__body { grid-column: 6 / 13; display: grid; gap: 20px; max-width: 70ch; }
.legal__body h2 { font-size: var(--step-lead); letter-spacing: -0.02em; line-height: 1.1; margin-top: 28px; }
.legal__body h3 { font-size: 1.125rem; font-weight: 500; margin-top: 8px; }
.legal__body p, .legal__body li { max-width: 68ch; }
@media (max-width: 900px) { .legal { display: flex; flex-direction: column; } }
.footer__brand { display: grid; gap: 10px; }
.footer__payoff { color: var(--night-muted); font-size: var(--step-body); max-width: none; }

/* Hero con prodotto ritagliato: il drone su un campo di tono pietra, senza sfondo fotografico */
.hero2--cut .hero2__media { background: var(--surface); display: grid; place-items: center; }
.hero2--cut .hero2__media img { position: static; width: 88%; height: auto; max-height: 86%; object-fit: contain; margin: 0 auto; filter: drop-shadow(0 28px 22px rgb(17 20 19 / 0.22)); } /* ombra del drone sul campo: taste-skill-ignore */
@media (max-width: 900px) { .hero2--cut .hero2__media { aspect-ratio: 4/3; } .hero2--cut .hero2__media img { width: 90%; max-height: 90%; } }

/* Tecnologia: scheda del sistema a griglia, celle di materiali diversi ma tutte uguali per misura */
.sechead .pull { grid-column: 7 / 13; font-size: var(--step-body); line-height: 1.4; letter-spacing: 0; max-width: 46ch; }
.specgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: minmax(340px, auto); gap: var(--gap); }
.spec-cell { position: relative; overflow: hidden; min-width: 0; }
.spec-cell--photo { background: var(--surface); }
.spec-cell--photo figure { position: absolute; inset: 0; margin: 0; }
.spec-cell--photo figure img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.spec-cell--paper, .spec-cell--dark, .spec-cell--stone { padding: clamp(24px, 2.4vw, 36px); display: grid; align-content: space-between; gap: 20px; }
.spec-cell--paper { background: #f4f5f2; }
.spec-cell--stone { background: var(--surface); }
.spec-cell--dark { background: var(--night); color: var(--night-ink); }
.spec-cell--dark p:last-child, .spec-cell--stone p:last-child { max-width: 30ch; font-size: var(--step-body); }
.spec-cell h3 { font-size: var(--step-lead); letter-spacing: -0.02em; line-height: 1.05; }
.spec-num { font-size: clamp(4rem, 7vw, 6.5rem); line-height: 0.9; letter-spacing: -0.05em; }
.spec-rows { display: grid; gap: 18px; margin: 0; }
.spec-rows > div { display: grid; gap: 2px; }
.spec-rows dt { font-size: var(--step-small); color: var(--muted); font-weight: 500; letter-spacing: 0.01em; }
.spec-rows dd { margin: 0; line-height: 1.35; }
@media (max-width: 900px) {
  .specgrid { grid-template-columns: 1fr; grid-auto-rows: auto; gap: 12px; }
  .spec-cell--photo { aspect-ratio: 4/3; }
  .spec-num { font-size: 4.5rem; }
  .sechead .pull { grid-column: auto; }
}

/* Header: logo con payoff sotto */
:root { --navh: 80px; }
.brandlock { display: grid; gap: 2px; align-content: center; }
.payoff { font-size: var(--step-small); color: var(--muted); letter-spacing: 0.01em; line-height: 1.1; padding-left: calc(1.5rem + 0.48rem); white-space: nowrap; }
.nav[data-open="true"] .payoff { color: var(--night-muted); }
.nav { min-height: var(--navh); }
@media (max-width: 380px) { .payoff { font-size: 0.8125rem; } }

/* Header più compatto */
:root { --navh: 62px; }
.nav, .nav[data-scrolled="true"] { padding-top: 7px; padding-bottom: 7px; min-height: var(--navh); }
.nav .btn { min-height: 40px; }
.brandlock { gap: 0; }
.wordmark { line-height: 1; }
.payoff { font-size: 0.8125rem; line-height: 1; margin-top: 1px; padding-left: calc(1.5rem + 0.48rem); }
.menu-toggle { padding: 8px 0; }
.nav { align-items: center; }
.nav, .nav[data-scrolled="true"] { padding-top: 10px; padding-bottom: 10px; min-height: 64px; }
:root { --navh: 64px; }
.brandlock { gap: 3px; }
.wordmark .mark { width: 1.1em; height: 1.1em; }
.hp { position: absolute; left: -9999px; width: 2px; height: 2px; opacity: 0; }

/* Menu aperto: logo e payoff restano sopra il pannello scuro */
.nav[data-open="true"] .brandlock { position: relative; z-index: 2; }
.nav[data-open="true"] .payoff { color: var(--night-muted); }
.nav[data-open="true"] .wordmark { color: var(--night-ink); }

/* ================= Passaggi tra schermate più morbidi ================= */
html { scroll-behavior: smooth; }
[id] { scroll-margin-top: calc(var(--navh) + 16px); }
@view-transition { navigation: auto; }
/* il nome di transizione crea un blocco contenitore: su telefono romperebbe il pannello del menu a tutto schermo */
@media (min-width: 821px) { .nav { view-transition-name: site-nav; } }
::view-transition-old(root) { animation: vt-out 160ms var(--ease-out) both; }
::view-transition-new(root) { animation: vt-in 320ms var(--ease-out) both; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateY(8px); } }
@supports not (view-transition-name: none) { body { animation: vt-in 320ms var(--ease-out) both; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } @view-transition { navigation: none; } }

/* Menu su telefono: pannello chiaro con la foto della pagina in filigrana */
@media (max-width: 820px) {
  .nav ul { background: var(--bg); color: var(--ink); isolation: isolate; overflow: hidden; }
  .nav ul::before { content: ""; position: absolute; inset: 0; z-index: -1; background-image: var(--menu-bg); background-size: cover; background-position: center; opacity: 0.32; transform: scale(1.08); transition: transform 900ms var(--ease-out); }
  .nav[data-open="true"] ul::before { transform: scale(1); }
  .nav[data-open="true"] .menu-toggle, .nav[data-open="true"] .wordmark { color: var(--ink); }
  .nav[data-open="true"] .payoff { color: var(--muted); }
  .nav[data-open="true"] .wordmark .n99 { color: var(--accent-text); }
  .nav ul li { opacity: 0; transform: translateY(12px); transition: opacity 320ms var(--ease-out), transform 320ms var(--ease-out); }
  .nav[data-open="true"] ul li { opacity: 1; transform: none; }
  .nav[data-open="true"] ul li:nth-child(1) { transition-delay: 70ms; }
  .nav[data-open="true"] ul li:nth-child(2) { transition-delay: 120ms; }
  .nav[data-open="true"] ul li:nth-child(3) { transition-delay: 170ms; }
  .nav[data-open="true"] ul li:nth-child(4) { transition-delay: 220ms; }
}
.form { scroll-margin-top: calc(var(--navh) + 12px); }

/* Footer: una sola firma del marchio, in fondo, con il payoff sotto */
.footer__end { margin-top: auto; display: grid; gap: 10px; }
.footer__end .footer__name { margin: 0; }
.footer__end .footer__payoff { margin: 0; }
.footer__legal { margin-top: 0; }
.footer__body { gap: 48px; }

/* Menu su telefono: apertura e chiusura con lo stesso ritmo, senza scatti */
@media (max-width: 820px) {
  .nav ul, .nav:not([data-open="true"]) ul { transition: opacity 300ms var(--ease-in-out), transform 300ms var(--ease-in-out), visibility 0s 300ms; transform: translateY(-14px); }
  .nav[data-open="true"] ul { transform: none; transition: opacity 280ms var(--ease-out), transform 420ms var(--ease-out), visibility 0s; }
  .nav ul li { transition: opacity 160ms ease, transform 160ms ease; transition-delay: 0ms; }
  .nav[data-open="true"] ul li { transition: opacity 360ms var(--ease-out), transform 360ms var(--ease-out); }
  .nav ul::before { transition: none; transform: none; }
  .nav[data-open="true"] ul::before { animation: menu-photo 900ms var(--ease-out) both; }
  .nav { transition: background-color 300ms ease; }
}
@keyframes menu-photo { from { transform: scale(1.08); } to { transform: scale(1); } }
