/* Plumbline Builders: cemento chiaro, grafite, blu del filo da tracciare. Un solo carattere (Archivo) su tutta la larghezza. */
@font-face { font-family: 'Archivo'; src: url('fonts/Archivo.ttf') format('truetype'); font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; }

:root {
  --ground: #ebeae6;
  --form: #dfddd7;
  --paper: #f7f6f3;
  --ink: #15171a;
  --ink-2: #4a4e55;
  --line: #cfccc4;
  --line-2: #a9a69d;
  --blue: #2142d6;
  --blue-deep: #1733a8;
  --blue-wash: #e1e6fb;
  --on-blue: #d6ddff;
  --on-blue-line: #9fb0f2;
  --brass: #b48a3c;
  --river: #a9b8de;
  --err: #b42318;
  --m: clamp(20px, 4vw, 56px);
  --plumb: 0.64;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --head: 68px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--head) + 16px); -webkit-text-size-adjust: 100%; scrollbar-color: var(--line-2) var(--ground); }
body { margin: 0; background: var(--ground); color: var(--ink); font-family: 'Archivo', system-ui, sans-serif; font-size: 1.0625rem; line-height: 1.55; font-variation-settings: 'wdth' 100; -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--blue); color: #fff; }
input, textarea { caret-color: var(--blue); }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
[hidden] { display: none !important; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: square; flex: none; }

/* --- comuni ------------------------------------------------------------------ */
.btn { display: inline-flex; align-items: center; gap: 12px; padding: 16px 22px; border: 0; border-radius: 2px; background: var(--blue); color: #fff; font-weight: 620; font-stretch: 112%; font-variation-settings: 'wdth' 112; text-decoration: none; cursor: pointer; transition: background-color 0.25s var(--ease), transform 0.2s var(--ease); }
.btn .ic { transition: transform 0.3s var(--ease); }
.btn:hover { background: var(--blue-deep); }
.btn:hover .ic { transform: translateX(4px); }
.btn:active { transform: scale(0.98); }
.btn--small { padding: 10px 16px; font-size: 0.9375rem; white-space: nowrap; }
.only-narrow { display: none; }
.btn--paper { background: #fff; color: var(--blue); }
.btn--paper:hover { background: var(--blue-wash); }
.link { color: var(--blue); font-weight: 600; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 6px; transition: text-underline-offset 0.25s var(--ease); }
.link:hover { text-underline-offset: 9px; }

.h2 { font-size: clamp(2.1rem, 4.2vw, 3.75rem); line-height: 0.98; letter-spacing: -0.03em; font-weight: 780; font-variation-settings: 'wdth' 125; text-wrap: balance; }
.sec-head { display: grid; gap: 16px; max-width: 46rem; margin-bottom: clamp(32px, 4vw, 56px); }
.sec-head p { color: var(--ink-2); font-size: 1.1875rem; max-width: 48ch; }
.sec-head--light p { color: var(--on-blue); }
.lbl { font-size: 11px; font-weight: 640; letter-spacing: 0.06em; font-variation-settings: 'wdth' 88; }

/* il filo: la verticale vera che attraversa le sezioni */
.services, .build, .area { position: relative; }
.services::before, .build::before, .area::before { content: ''; position: absolute; top: 0; bottom: 0; left: calc(var(--m) + (100% - 2 * var(--m)) * var(--plumb)); width: 1px; background: var(--line); pointer-events: none; }

/* --- intestazione ------------------------------------------------------------ */
.top { position: fixed; inset: 0 0 auto; z-index: 20; height: var(--head); display: flex; align-items: center; gap: 28px; padding: 0 var(--m); background: var(--ground); border-bottom: 1px solid var(--line); }
.top__back { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px 7px 9px; border: 1px solid var(--line-2); border-radius: 999px; font-size: 0.875rem; font-weight: 560; text-decoration: none; color: var(--ink-2); transition: border-color 0.2s, color 0.2s; }
.top__back .ic { width: 16px; height: 16px; }
.top__back:hover { color: var(--ink); border-color: var(--ink); }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.logo__mark { width: 16px; height: 26px; color: var(--ink); }
.logo__word { font-size: 1.125rem; font-weight: 800; letter-spacing: -0.01em; font-variation-settings: 'wdth' 125; white-space: nowrap; }
.logo__word span { margin-left: 0.32em; font-weight: 400; }
.top__nav { display: flex; gap: 26px; margin-left: auto; }
.top__nav a { font-size: 0.9375rem; font-weight: 520; text-decoration: none; color: var(--ink-2); background: linear-gradient(var(--blue), var(--blue)) left bottom / 0 1.5px no-repeat; padding-bottom: 3px; transition: color 0.2s, background-size 0.3s var(--ease); }
.top__nav a:hover { color: var(--ink); background-size: 100% 1.5px; }

/* --- apertura ---------------------------------------------------------------- */
.hero { position: relative; display: grid; grid-template-columns: minmax(0, calc(var(--plumb) * 100%)) minmax(0, 1fr); grid-template-rows: 1fr auto; min-height: min(100svh, 940px); padding: calc(var(--head) + clamp(48px, 9vh, 110px)) var(--m) 0; }
.hero__text { grid-column: 1; align-self: center; display: grid; gap: clamp(22px, 2.6vw, 34px); padding-bottom: 56px; padding-right: 32px; }
.hero__title { font-size: clamp(2.6rem, 6.8vw, 6rem); line-height: 0.9; letter-spacing: -0.035em; font-weight: 820; font-variation-settings: 'wdth' 125; }
.line { display: block; overflow: hidden; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.line > span { display: block; animation: rise 1.05s var(--ease) both; }
.line:nth-child(2) > span { animation-delay: 0.09s; }
@keyframes rise { from { transform: translateY(104%); } to { transform: none; } }
.hero__lead { max-width: 44ch; font-size: clamp(1.125rem, 1.4vw, 1.3125rem); color: var(--ink-2); animation: fade 0.9s 0.25s var(--ease) both; }
.hero__cta { display: flex; flex-wrap: wrap; align-items: center; gap: 28px; animation: fade 0.9s 0.35s var(--ease) both; }
@keyframes fade { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.plumb { position: absolute; top: var(--head); bottom: 150px; left: calc(var(--m) + (100% - 2 * var(--m)) * var(--plumb)); width: clamp(130px, 17vw, 240px); transform: translateX(-50%); display: grid; grid-template-rows: minmax(0, 1fr) auto; justify-items: center; pointer-events: none; }
.plumb__svg { width: 100%; height: 100%; min-height: 0; overflow: visible; }
.plumb__dim path { fill: none; stroke: var(--blue); stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.plumb__dim .plumb__leader { stroke-dasharray: 2 4; }
.plumb__true path { stroke: var(--blue); stroke-width: 1.2; stroke-dasharray: 5 6; vector-effect: non-scaling-stroke; }
.plumb__arc path { fill: none; stroke: var(--blue); stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.plumb__swing { transform-box: view-box; transform-origin: 100px 0; color: var(--ink); }
.plumb__string { stroke: var(--ink); stroke-width: 1.6; vector-effect: non-scaling-stroke; }
.plumb__anchor path { fill: var(--ink); }
.plumb__read { margin-top: 2px; font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.04em; color: var(--blue); white-space: nowrap; font-variant-numeric: tabular-nums; font-variation-settings: 'wdth' 90; }

.facts { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--ink); animation: fade 0.9s 0.45s var(--ease) both; position: relative; z-index: 1; background: var(--ground); }
.facts li { display: grid; gap: 2px; padding: 20px 24px 28px 0; }
.facts li + li { padding-left: 24px; border-left: 1px solid var(--line); }
.facts b { font-weight: 680; font-variation-settings: 'wdth' 112; }
.facts span { color: var(--ink-2); font-size: 0.9375rem; }

/* --- cosa costruiamo: il programma ------------------------------------------- */
.services { padding: clamp(96px, 11vw, 160px) var(--m) clamp(80px, 9vw, 130px); }
.sched { border-top: 1px solid var(--ink); }
.sched__row { position: relative; display: grid; grid-template-columns: minmax(0, calc(var(--plumb) * 100%)) minmax(0, 1fr) auto; align-items: center; gap: 0; padding: 28px 0; border-bottom: 1px solid var(--line); transition: background-color 0.3s var(--ease); }
.sched__row::before { content: ''; position: absolute; inset: 0 calc(-1 * var(--m)); background: var(--form); opacity: 0; transition: opacity 0.3s var(--ease); z-index: -1; }
.sched__row:hover::before { opacity: 1; }
.sched__name { display: grid; gap: 8px; padding-right: 40px; }
.sched__name h3 { font-size: clamp(1.6rem, 2.6vw, 2.375rem); line-height: 1; letter-spacing: -0.025em; font-weight: 760; font-variation-settings: 'wdth' 125; transition: transform 0.35s var(--ease); }
.sched__row:hover h3 { transform: translateX(10px); }
.sched__name p { max-width: 54ch; color: var(--ink-2); }
.sched__time { display: grid; padding-left: 32px; font-size: 1.25rem; font-weight: 650; font-variant-numeric: tabular-nums; font-variation-settings: 'wdth' 112; }
.sched__time span { font-size: 0.8125rem; font-weight: 500; color: var(--ink-2); font-variation-settings: 'wdth' 100; }
.sched__draw { width: 150px; height: auto; }
.sched__draw path { fill: none; stroke-width: 1.6; stroke-linecap: square; stroke-linejoin: miter; }
.sched__draw .g { stroke: var(--ink-2); }
.sched__draw .e { stroke: var(--line-2); stroke-dasharray: 4 3; }
.sched__draw .n { stroke: var(--blue); stroke-dasharray: 1; stroke-dashoffset: 0; transition: stroke-width 0.3s; }
.sched__row:hover .sched__draw .n { stroke-width: 2.2; }

/* --- la costruzione, in ordine ----------------------------------------------- */
.build { padding: clamp(80px, 9vw, 130px) var(--m) clamp(80px, 9vw, 130px); background: var(--ground); }
.build__grid { display: grid; grid-template-columns: minmax(0, calc(var(--plumb) * 100%)) minmax(0, 1fr); }
.build__stage { position: sticky; top: calc(var(--head) + 24px); align-self: start; padding-right: clamp(24px, 4vw, 64px); }
.house { width: 100%; height: auto; overflow: visible; }
.house path, .house circle { fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linecap: square; stroke-linejoin: miter; }
.house .base path { stroke: var(--ink-2); }
.house .base .hatch { stroke: var(--line-2); stroke-width: 1.2; }
.house text { fill: var(--ink-2); stroke: none; }
.house .dw { stroke-dasharray: 1; stroke-dashoffset: 0; transition: stroke-dashoffset 1.2s var(--ease), stroke 0.5s; }
.house .fd { transition: opacity 0.7s var(--ease), stroke 0.5s, fill 0.5s; }
.house .poche { fill: url(#conc); stroke: none; }
.house .poche-l { stroke: var(--line-2); stroke-width: 1; }
.house .dash { stroke-dasharray: 6 5; }
.house .thin { stroke-width: 1; stroke: var(--line-2); }
.house .thick { stroke-width: 3.2; }
.house .sys { stroke: var(--ink-2); }
.house g { transition: opacity 0.6s var(--ease); }
.house .now .dw, .house .now .fd:not(text) { stroke: var(--blue); }
.house .now text { fill: var(--blue); }
.house .now .thin { stroke: var(--on-blue-line); }
.house .faded { opacity: 0.28; }
.build__now { display: flex; align-items: baseline; gap: 14px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--ink); }
.build__now b { font-size: 1.5rem; font-weight: 800; color: var(--blue); font-variation-settings: 'wdth' 125; font-variant-numeric: tabular-nums; }
.build__now span { font-weight: 650; font-variation-settings: 'wdth' 112; }
.build__now em { margin-left: auto; font-style: normal; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.steps { padding-left: clamp(24px, 3vw, 48px); }
.step { display: grid; gap: 10px; align-content: center; min-height: 68vh; padding: 24px 0; }
.step h3, .step__w, .step__n { transition: color 0.5s var(--ease); }
.step:not(.is-now) h3, .step:not(.is-now) .step__w { color: var(--ink-2); }
.step:not(.is-now) .step__n { color: var(--ink-2); }
.step__n { font-size: clamp(2.6rem, 4vw, 3.75rem); line-height: 1; font-weight: 820; color: var(--blue); font-variation-settings: 'wdth' 125; font-variant-numeric: tabular-nums; }
.step h3 { font-size: clamp(1.4rem, 2vw, 1.875rem); line-height: 1.08; letter-spacing: -0.02em; font-weight: 740; font-variation-settings: 'wdth' 118; }
.step__w { font-weight: 640; color: var(--ink); font-variant-numeric: tabular-nums; }
.step p:last-child { color: var(--ink-2); max-width: 40ch; }

/* --- pianificatore ----------------------------------------------------------- */
.planner { background: var(--blue); color: #fff; }
.planner__in { position: relative; padding: clamp(80px, 9vw, 130px) var(--m); }
.planner__in::before { content: ''; position: absolute; top: 0; bottom: 0; left: calc(var(--m) + (100% - 2 * var(--m)) * var(--plumb)); width: 1px; background: var(--on-blue-line); }
.planner__grid { display: grid; grid-template-columns: minmax(0, calc(var(--plumb) * 100%)) minmax(0, 1fr); grid-template-areas: 'res form'; }
.pform { grid-area: form; display: grid; gap: 34px; align-content: start; padding-left: clamp(24px, 3vw, 48px); }
.result { grid-area: res; display: grid; gap: 28px; align-content: start; padding-right: clamp(24px, 4vw, 64px); }
.pform__set { display: grid; gap: 12px; margin: 0; padding: 0; border: 0; min-width: 0; }
.pform legend, .pform__lbl { padding: 0; font-size: 0.9375rem; font-weight: 640; color: var(--on-blue); font-variation-settings: 'wdth' 112; }
.pform legend { margin-bottom: 12px; }
.pform__lbl { display: flex; justify-content: space-between; gap: 12px; }
.pform__lbl output { color: #fff; font-variant-numeric: tabular-nums; }
.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg button { padding: 10px 14px; border: 1px solid var(--on-blue-line); border-radius: 2px; background: transparent; color: #fff; font-weight: 560; cursor: pointer; transition: background-color 0.2s, color 0.2s, border-color 0.2s; }
.seg button:hover { border-color: #fff; }
.seg button[aria-pressed='true'] { background: #fff; color: var(--blue); border-color: #fff; }
.seg button:focus-visible, .range:focus-visible, .planner .btn:focus-visible { outline-color: #fff; }
.range { -webkit-appearance: none; appearance: none; width: 100%; height: 28px; background: transparent; cursor: pointer; }
.range::-webkit-slider-runnable-track { height: 2px; background: linear-gradient(#fff, #fff) left / var(--fill, 30%) 100% no-repeat, var(--on-blue-line); }
.range::-moz-range-track { height: 2px; background: var(--on-blue-line); }
.range::-moz-range-progress { height: 2px; background: #fff; }
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; margin-top: -10px; border-radius: 2px; background: #fff; border: 0; transition: transform 0.2s var(--ease); }
.range::-moz-range-thumb { width: 22px; height: 22px; border-radius: 2px; background: #fff; border: 0; }
.range:active::-webkit-slider-thumb { transform: scale(1.15); }
.range__ends { display: flex; justify-content: space-between; font-size: 0.8125rem; color: var(--on-blue); font-variant-numeric: tabular-nums; }
.result__nums { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid #fff; }
.result__nums p { display: grid; gap: 4px; padding: 16px 20px 0 0; }
.result__nums p + p { padding-left: 20px; border-left: 1px solid var(--on-blue-line); }
.result__nums span { font-size: 0.9375rem; color: var(--on-blue); }
.result__nums b { font-size: clamp(1.75rem, 2.9vw, 2.75rem); line-height: 1; letter-spacing: -0.025em; font-weight: 800; font-variation-settings: 'wdth' 112; white-space: nowrap; font-variant-numeric: tabular-nums; }
.gantt { display: grid; gap: 7px; }
.gantt__row { display: grid; grid-template-columns: minmax(0, 13rem) minmax(0, 1fr); align-items: center; gap: 16px; }
.gantt__row > span { font-size: 0.9375rem; color: var(--on-blue); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gantt__track { position: relative; height: 22px; background: linear-gradient(var(--on-blue-line), var(--on-blue-line)) 0 50% / 100% 1px no-repeat; }
.gantt__bar { position: absolute; top: 0; bottom: 0; left: 0; width: 0; background: #fff; border-radius: 1px; transition: left 0.6s var(--ease), width 0.6s var(--ease); }
.gantt__bar b { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); font-size: 0.75rem; font-weight: 650; color: var(--blue); font-variant-numeric: tabular-nums; }
.gantt__axis { position: relative; height: 18px; margin-left: calc(min(13rem, 100%) + 16px); border-top: 1px solid #fff; }
.gantt__axis i { position: absolute; top: 0; height: 6px; border-left: 1px solid #fff; }
.gantt__axis span { position: absolute; top: 6px; transform: translateX(-50%); font-size: 0.75rem; color: var(--on-blue); font-variant-numeric: tabular-nums; white-space: nowrap; }
.result__note { font-size: 0.9375rem; color: var(--on-blue); max-width: 52ch; }
.result .btn { justify-self: start; }

/* --- progetti: tavole con cartiglio ------------------------------------------ */
.projects { padding: clamp(96px, 11vw, 160px) var(--m) clamp(80px, 9vw, 130px); }
.sheets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(16px, 2vw, 28px); }
.sheet { display: grid; grid-template-rows: 1fr auto; background: var(--paper); border: 1px solid var(--line-2); border-radius: 2px; transition: border-color 0.3s, transform 0.4s var(--ease), box-shadow 0.4s var(--ease); }
.sheet:hover, .sheet:focus-visible { border-color: var(--ink); transform: translateY(-4px); box-shadow: 0 18px 30px -22px rgba(21, 23, 26, 0.45); }
.sheet__draw { width: 100%; height: auto; margin: 18px; width: calc(100% - 36px); outline: 1px solid var(--line); outline-offset: 6px; }
.sheet__draw path { fill: none; stroke-width: 1.5; stroke-linecap: square; }
.sheet__draw .g { stroke: var(--ink-2); }
.sheet__draw .e { stroke: var(--line-2); stroke-dasharray: 5 4; }
.sheet__draw .n { stroke: var(--blue); }
.sheet__draw .sb { fill: var(--ink); }
.sheet__draw .sb-o { fill: var(--paper); stroke: var(--ink); stroke-width: 1; }
.sheet__draw .dim { stroke: var(--ink); stroke-width: 1; stroke-dasharray: 1; stroke-dashoffset: 0; transition: stroke-dashoffset 1.1s var(--ease); }
.sheet__draw text { fill: var(--ink-2); transition: opacity 0.6s 0.4s; }
.tb { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1.15fr) minmax(0, 1.25fr) minmax(0, 0.9fr) minmax(0, 0.85fr) minmax(0, 0.7fr); border-top: 1.5px solid var(--ink); margin-top: 6px; }
.tb > div { display: grid; gap: 2px; padding: 10px 12px 12px; min-width: 0; }
.tb > div + div { border-left: 1px solid var(--line); }
.tb dt { font-size: 0.6875rem; font-weight: 640; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); font-variation-settings: 'wdth' 88; }
.tb dd { font-size: 0.8125rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.tb__name dd { font-size: 1.0625rem; font-weight: 720; line-height: 1.15; font-variation-settings: 'wdth' 112; }

@media (prefers-reduced-motion: no-preference) {
  .js .house .dw { stroke-dashoffset: 1; }
  .js .house .fd { opacity: 0; }
  .js .house .on .dw { stroke-dashoffset: 0; }
  .js .house .on .fd { opacity: 1; }
  .js .sheet__draw .dim { stroke-dashoffset: 1; }
  .js .sheet__draw text { opacity: 0; }
  .js .sheet.in .dim, .js .sheet:hover .dim { stroke-dashoffset: 0; }
  .js .sheet.in text, .js .sheet:hover text { opacity: 1; }
  .js .radius__towns g { opacity: 0; transform: scale(0.6); }
  .js .radius.in .radius__towns g { opacity: 1; transform: none; }
}

/* --- licenze e zona ---------------------------------------------------------- */
.area { display: grid; grid-template-columns: minmax(0, calc(var(--plumb) * 100%)) minmax(0, 1fr); align-items: center; padding: clamp(80px, 9vw, 130px) var(--m); border-top: 1px solid var(--line); }
.area__text { display: grid; gap: 32px; padding-right: clamp(24px, 4vw, 64px); }
.assure { display: grid; border-top: 1px solid var(--ink); }
.assure li { display: flex; gap: 14px; padding: 18px 0; border-bottom: 1px solid var(--line); color: var(--ink-2); }
.assure .ic { color: var(--blue); margin-top: 2px; stroke-width: 2.2; }
.assure b { color: var(--ink); font-weight: 680; }
.area__where { max-width: 56ch; color: var(--ink-2); }
.area__where b { color: var(--ink); font-weight: 650; }
.radius { padding-left: clamp(16px, 3vw, 48px); }
.radius svg { width: 100%; height: auto; overflow: visible; }
.radius__rings circle, .radius__rings path { fill: none; stroke: var(--line-2); stroke-width: 1; }
.radius__rings .out { stroke: var(--blue); stroke-dasharray: 6 6; stroke-width: 1.4; }
.radius__river { fill: none; stroke: var(--river); stroke-width: 6; stroke-linecap: round; }
.radius__lbl text { font-size: 13px; fill: var(--ink-2); font-variant-numeric: tabular-nums; }
.radius__towns circle { fill: var(--ink); }
.radius__towns text { font-size: 15px; font-weight: 560; fill: var(--ink); }
.radius__home circle { fill: var(--blue); }
.radius__home path { stroke: var(--blue); stroke-width: 1.6; }
.radius__towns g { transform-box: fill-box; transform-origin: center; transition: opacity 0.5s var(--ease), transform 0.5s var(--ease); }
.radius__towns .lead { fill: none; stroke: var(--ink-2); stroke-width: 1; }
.radius text { paint-order: stroke; stroke: var(--ground); stroke-width: 5px; stroke-linejoin: round; }
.radius__home text { font-size: 15px; font-weight: 750; fill: var(--blue); }

/* --- preventivo -------------------------------------------------------------- */
.quote { padding: clamp(96px, 11vw, 150px) var(--m) clamp(96px, 11vw, 150px); background: var(--form); }
.qform { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 24px; max-width: calc(var(--plumb) * 100%); }
.field { display: grid; gap: 8px; min-width: 0; }
.field > span { font-size: 0.9375rem; font-weight: 620; font-variation-settings: 'wdth' 106; }
.field small { font-weight: 400; color: var(--ink-2); }
.field--wide { grid-column: 1 / -1; }
.field input, .field select, .field textarea { width: 100%; padding: 14px 14px; border: 1px solid var(--line-2); border-radius: 2px; background: var(--paper); font-size: 1rem; transition: border-color 0.2s; }
.field select { appearance: none; padding-right: 40px; background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2315171a' stroke-width='1.8'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") right 12px center / 18px no-repeat; }
.field textarea { resize: vertical; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--ink-2); }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--blue); outline-offset: 0; border-color: var(--blue); }
.field [aria-invalid='true'] { border-color: var(--err); }
.qform__err { grid-column: 1 / -1; color: var(--err); font-weight: 600; }
.qform__go { grid-column: 1 / -1; }
.qform__ok { grid-column: 1 / -1; display: flex; gap: 12px; padding: 18px 20px; background: var(--blue-wash); border-radius: 2px; font-weight: 560; }
.qform__ok .ic { color: var(--blue); stroke-width: 2.2; }

/* --- piede ------------------------------------------------------------------- */
.foot { background: var(--blue); color: var(--on-blue); }
.foot__in { display: grid; grid-template-columns: minmax(0, calc(var(--plumb) * 100%)) minmax(0, 1fr); gap: 32px 0; padding: clamp(56px, 7vw, 96px) var(--m) 40px; }
.logo--light, .logo--light .logo__mark { color: #fff; }
.logo--light .logo__word { font-size: clamp(1.5rem, 3vw, 2.5rem); }
.logo--light .logo__mark { width: 22px; height: 36px; }
.foot__cols { display: grid; gap: 18px; padding-left: clamp(24px, 3vw, 48px); border-left: 1px solid var(--on-blue-line); font-variant-numeric: tabular-nums; }
.foot__credit { grid-column: 1 / -1; padding-top: 24px; border-top: 1px solid var(--on-blue-line); font-size: 0.875rem; }
.foot__credit a { color: #fff; text-underline-offset: 4px; }

/* --- schermi stretti --------------------------------------------------------- */
@media (max-width: 1080px) {
  .top__nav { display: none; }
  .top .btn--small { margin-left: auto; }
}
@media (max-width: 900px) {
  :root { --head: 60px; }
  .services::before, .build::before, .area::before, .planner__in::before { display: none; }
  .top { gap: 12px; }
  .top__back span { display: none; }
  .top__back { padding: 7px; }
  .logo__word { font-size: 1rem; }
  .hero { grid-template-columns: minmax(0, 1fr) 64px; min-height: auto; padding-top: calc(var(--head) + 48px); }
  .hero__text { padding-right: 12px; padding-bottom: 44px; }
  .hero__title { font-size: clamp(2.2rem, 9.6vw, 3.4rem); }
  .plumb { left: auto; right: 4px; transform: none; width: 84px; bottom: auto; grid-template-rows: auto auto; }
  .plumb__svg { height: auto; aspect-ratio: 200 / 560; }
  .only-wide { display: none; }
  .only-narrow { display: inline; }
  .plumb__read { font-size: 0.6875rem; }
  .facts { grid-template-columns: 1fr; }
  .facts li, .facts li + li { padding: 14px 0; border-left: 0; }
  .facts li + li { border-top: 1px solid var(--line); }
  .sched__row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: 'name name' 'time draw'; gap: 16px 0; }
  .sched__name { grid-area: name; padding-right: 0; }
  .sched__time { grid-area: time; padding-left: 0; }
  .sched__draw { grid-area: draw; width: 116px; }
  .build__grid { grid-template-columns: 1fr; }
  .build__stage { top: var(--head); z-index: 2; padding: 12px 0 0; margin-inline: calc(-1 * var(--m)); padding-inline: var(--m); background: var(--ground); border-bottom: 1px solid var(--line); }
  .house { max-height: 34vh; }
  .house .lbl { font-size: 22px; }
  .house .sec { display: none; }
  .build__now { margin-top: 8px; padding: 10px 0 12px; font-size: 0.9375rem; }
  .build__now b { font-size: 1.125rem; }
  .steps { padding-left: 0; }
  .step { min-height: 52vh; }
  .planner__grid { grid-template-columns: 1fr; grid-template-areas: 'form' 'res'; gap: 48px; }
  .pform { padding-left: 0; }
  .result { padding-right: 0; }
  .gantt__row { grid-template-columns: 8.5rem minmax(0, 1fr); gap: 10px; }
  .gantt__row > span { font-size: 0.8125rem; }
  .gantt__axis { margin-left: calc(8.5rem + 10px); }
  .sheets { grid-template-columns: 1fr; }
  .tb { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tb__name { grid-column: 1 / -1; border-bottom: 1px solid var(--line); }
  .tb > div:nth-child(5) { border-left: 0; }
  .tb > div:nth-child(2) { border-left: 0; }
  .tb > div:nth-child(n+5) { border-top: 1px solid var(--line); }
  .area { grid-template-columns: 1fr; gap: 48px; }
  .area__text { padding-right: 0; }
  .radius { padding-left: 0; max-width: 460px; }
  .qform { grid-template-columns: 1fr; max-width: none; }
  .foot__in { grid-template-columns: 1fr; }
  .foot__cols { padding-left: 0; border-left: 0; }
}

@media (max-width: 520px) {
  .result__nums { grid-template-columns: 1fr; }
  .result__nums p { padding-right: 0; }
  .result__nums p + p { padding-left: 0; border-left: 0; margin-top: 14px; border-top: 1px solid var(--on-blue-line); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-delay: 0ms !important; transition-duration: 0.01ms !important; }
}
