/* Studio Termotecnico Muretti — foglio di stile
   Colori ricavati dal logo: verde foglia, arancio sole, azzurro pannelli. */

@font-face { font-family: "Archivo"; src: url("../fonts/archivo.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url("../fonts/plex-mono-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url("../fonts/plex-mono-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  --paper: #f6f8f3;
  --surface: #ffffff;
  --ink: #18221c;
  --ink-2: #48574d;
  --line: #d6ddd1;
  --line-strong: #aab6a6;
  --green: #75ad4e;
  --leaf: #9aca48;
  --green-ink: #2f6a2c;
  --sun: #fbae3e;
  --sun-soft: #fde7c2;
  --blue: #2c9ec7;
  --blue-ink: #1d6b88;
  --hot: #d4513a;
  --cold: #2b7cc4;
  --btn-bg: #2f6a2c;
  --btn-fg: #ffffff;
  --wall: #dfe5da;
  --wall-dark: #c6cfc1;
  --placeholder: #a65d00;
  --shadow: 0 1px 0 rgba(24, 34, 28, .06), 0 8px 24px -12px rgba(24, 34, 28, .25);
  --radius-s: 6px;
  --radius-m: 12px;
  --header-h: 64px;
  --wrap: 1160px;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-head: "Archivo", "Inter", system-ui, sans-serif;
  --font-mono: "Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #111914; --surface: #172119; --ink: #e5ebe3; --ink-2: #a8b7ac; --line: #28362d; --line-strong: #3d5044;
    --green-ink: #a7d35c; --blue-ink: #72c6e6; --btn-bg: #a7d35c; --btn-fg: #102010; --sun-soft: #3a2c12;
    --wall: #26332b; --wall-dark: #314137; --placeholder: #fbae3e;
    --shadow: 0 1px 0 rgba(0,0,0,.4), 0 10px 30px -14px rgba(0,0,0,.8);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #111914; --surface: #172119; --ink: #e5ebe3; --ink-2: #a8b7ac; --line: #28362d; --line-strong: #3d5044;
  --green-ink: #a7d35c; --blue-ink: #72c6e6; --btn-bg: #a7d35c; --btn-fg: #102010; --sun-soft: #3a2c12;
  --wall: #26332b; --wall-dark: #314137; --placeholder: #fbae3e;
  --shadow: 0 1px 0 rgba(0,0,0,.4), 0 10px 30px -14px rgba(0,0,0,.8);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--font-body); font-size: 1.0625rem; line-height: 1.6;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--green-ink); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--blue-ink); outline-offset: 3px; border-radius: 3px; }

h1, h2, h3 { font-family: var(--font-head); line-height: 1.12; letter-spacing: -.012em; margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: clamp(2.1rem, 1.4rem + 3.2vw, 3.6rem); font-weight: 760; letter-spacing: -.022em; }
h2 { font-size: clamp(1.55rem, 1.2rem + 1.5vw, 2.25rem); }
h3 { font-size: 1.2rem; font-weight: 650; letter-spacing: -.005em; }
p { margin: 0 0 1em; }
.lead { font-size: clamp(1.1rem, 1rem + .4vw, 1.3rem); color: var(--ink-2); max-width: 38em; }
.muted { color: var(--ink-2); }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.measure { max-width: 42em; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--btn-bg); color: var(--btn-fg); padding: 10px 14px; border-radius: var(--radius-s); }
.skip:focus { top: 12px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-row { display: flex; align-items: center; gap: 12px; min-height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); margin-right: auto; min-width: 0; }
.brand img { width: 40px; height: 40px; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand-name { font-family: var(--font-head); font-weight: 720; font-size: 1.02rem; letter-spacing: -.01em; }
.brand-sub { font-size: .78rem; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.nav-toggle {
  display: none; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 999px;
  background: var(--surface); color: var(--ink); font: inherit; font-size: .95rem; cursor: pointer;
}
.js .nav-toggle { display: inline-flex; }
.nav-toggle svg { width: 18px; height: 18px; flex: none; }

.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.site-nav a {
  display: flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 999px;
  color: var(--ink); text-decoration: none; font-weight: 520; font-size: .98rem;
}
.site-nav a:hover { background: color-mix(in srgb, var(--green) 14%, transparent); }
.site-nav a[aria-current="page"] { color: var(--green-ink); box-shadow: inset 0 -2px 0 var(--green); border-radius: 0; }

.theme-toggle {
  width: 44px; height: 44px; flex: none; border-radius: 999px; border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--ink); cursor: pointer; display: none; place-items: center;
}
.js .theme-toggle { display: grid; }
.theme-toggle svg { width: 20px; height: 20px; }
.theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .i-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .i-moon { display: none; }
}

/* Mobile nav */
@media (max-width: 899px) {
  .header-cta { display: none; }
  .js .site-nav {
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--paper); border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
    display: none;
  }
  .js .site-nav.is-open { display: block; }
  .js .site-nav ul { flex-direction: column; padding: 8px 12px 16px; }
  .js .site-nav a { font-size: 1.08rem; min-height: 52px; padding: 0 14px; border-radius: var(--radius-s); }
  .js .site-nav a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--green); }
  html:not(.js) .header-row { flex-wrap: wrap; }
  html:not(.js) .site-nav { width: 100%; overflow-x: auto; }
}
@media (max-width: 420px) { .brand-sub { display: none; } }
@media (min-width: 900px) { .site-nav { display: block; } .js .nav-toggle { display: none; } }
@media (max-width: 899px) { .btn.header-cta { display: none; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 22px; border-radius: 999px; border: 2px solid transparent;
  font: inherit; font-weight: 620; font-size: 1.02rem; text-decoration: none; cursor: pointer;
  transition: transform .15s ease, background-color .15s ease;
}
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-primary { background: var(--btn-bg); color: var(--btn-fg); }
.btn-primary:hover { background: color-mix(in srgb, var(--btn-bg) 86%, var(--ink)); }
.btn-secondary { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-secondary:hover { border-color: var(--ink); }
.btn-sun { background: var(--sun); color: #1b1608; }
.btn-sun:hover { background: #f59f1f; }
.btn:active { transform: translateY(1px); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.header-cta { min-height: 44px; padding: 0 18px; font-size: .95rem; }

/* ---------- WhatsApp fisso ---------- */
.wa-float {
  position: fixed; right: 16px; bottom: 16px; z-index: 60;
  display: inline-flex; align-items: center; gap: 10px; min-height: 56px; padding: 0 20px 0 16px;
  border-radius: 999px; background: #1f7a45; color: #fff; text-decoration: none; font-weight: 640;
  box-shadow: 0 10px 28px -10px rgba(10, 40, 20, .55);
}
.wa-float svg { width: 26px; height: 26px; }
.wa-float:hover { background: #18663a; }
@media (max-width: 520px) { .wa-float .wa-label { display: none; } .wa-float { padding: 0; width: 58px; justify-content: center; } }

/* ---------- Sections ---------- */
main { display: block; }
.section { padding: clamp(56px, 8vw, 104px) 0; }
.section + .section { border-top: 1px solid var(--line); }
.section-head { max-width: 44em; margin-bottom: clamp(28px, 4vw, 48px); }
.section-head p { color: var(--ink-2); }

.page-head { padding: clamp(40px, 7vw, 88px) 0 clamp(28px, 4vw, 48px); border-bottom: 1px solid var(--line); background:
  linear-gradient(var(--paper), color-mix(in srgb, var(--paper) 70%, transparent)),
  repeating-linear-gradient(0deg, transparent 0 23px, color-mix(in srgb, var(--blue) 10%, transparent) 23px 24px),
  repeating-linear-gradient(90deg, transparent 0 23px, color-mix(in srgb, var(--blue) 10%, transparent) 23px 24px); }
.page-head .lead { margin-bottom: 0; }
.crumbs { font-size: .9rem; color: var(--ink-2); margin-bottom: 14px; }
.crumbs a { color: var(--ink-2); }

/* ---------- Home: racconto ---------- */
.story { position: relative; }
.story-grid { display: grid; grid-template-columns: 1fr; }
.story-figure {
  position: sticky; top: var(--header-h); z-index: 2;
  background: var(--paper); border-bottom: 1px solid var(--line);
  padding: 8px 0 6px; margin: 0 -20px; padding-left: 20px; padding-right: 20px;
}
.story-figure .drawing { width: 100%; max-height: 38vh; margin: 0 auto; }
.fig-note { font-size: .78rem; color: var(--ink-2); margin: 2px 0 0; text-align: right; }
.hero-text { padding: 28px 0 8px; }
.hero-text h1 { max-width: 14em; }
.hero-text .lead { margin-bottom: 26px; }
.hero-place { display: flex; align-items: center; gap: 8px; color: var(--ink-2); font-size: .95rem; margin: 18px 0 0; }
.hero-place svg { width: 18px; height: 18px; color: var(--green-ink); flex: none; }

.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.step { min-height: 62vh; display: flex; flex-direction: column; justify-content: center; padding: 32px 0; counter-increment: step; }
.step-num {
  display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
  border: 2px solid var(--line-strong); font-family: var(--font-head); font-weight: 700; margin-bottom: 14px;
  transition: background-color .3s ease, border-color .3s ease, color .3s ease;
}
.step.is-active .step-num { background: var(--btn-bg); border-color: var(--btn-bg); color: var(--btn-fg); }
.step h2 { font-size: clamp(1.4rem, 1.1rem + 1.2vw, 2rem); }
.step p { color: var(--ink-2); max-width: 30em; margin: 0; }
.step:last-child { min-height: 52vh; }

@media (min-width: 900px) {
  .story-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 56px; align-items: start; }
  .story-text { grid-column: 1; grid-row: 1; }
  .story-figure {
    grid-column: 2; grid-row: 1; top: calc(var(--header-h) + 24px);
    margin: 0; padding: 0; border: 0; background: none; height: calc(100vh - var(--header-h) - 48px);
    display: flex; flex-direction: column; justify-content: center;
  }
  .story-figure .drawing { max-height: calc(100vh - var(--header-h) - 110px); }
  .hero-text { min-height: calc(100vh - var(--header-h) - 24px); display: flex; flex-direction: column; justify-content: center; padding: 40px 0; }
  .step { min-height: 80vh; }
}

/* Disegno: variabili di avanzamento. Senza JavaScript o senza movimento resta lo stato finale. */
.drawing { --p1: 1; --p2: 1; --p3: 1; color: var(--ink); overflow: visible; }
.drawing .grid { opacity: calc(.55 - var(--p3) * .4); }
.drawing .grid line { stroke: var(--blue); stroke-width: .5; opacity: .35; }
.drawing .ln {
  fill: none; stroke: color-mix(in srgb, var(--ink) calc(var(--p3) * 100%), var(--blue));
  stroke-width: 1.4; stroke-linejoin: round; stroke-linecap: round;
  stroke-dasharray: 1; stroke-dashoffset: calc(1 - var(--p1));
}
.drawing .fl { fill-opacity: var(--p3); }
.drawing .ln.fl { fill: var(--f, transparent); }
.drawing .dash { fill: none; stroke: var(--blue); stroke-width: 1; stroke-dasharray: 4 4; opacity: calc(var(--p1) * (1 - var(--p3) * .5)); }
.drawing .pipe { fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: calc(1 - var(--p2)); }
.drawing .pipe.hot { stroke: var(--hot); }
.drawing .pipe.cold { stroke: var(--cold); }
.drawing .pipe.el { stroke: var(--green); stroke-width: 2; }
.drawing .floor-warm { fill: var(--hot); opacity: calc(var(--p3) * .16); }
.drawing .lbl { opacity: var(--p2); }
.drawing .lbl text { font-family: var(--font-mono); font-size: 11px; fill: var(--ink); }
.drawing .lbl line, .drawing .lbl circle { stroke: var(--ink-2); stroke-width: .8; fill: var(--paper); }
.drawing .dim { stroke: var(--blue); stroke-width: .8; opacity: calc(var(--p1) * (1 - var(--p3) * .6)); fill: none; }
.drawing .dim text { fill: var(--blue-ink); stroke: none; font-family: var(--font-mono); font-size: 10px; }
.drawing .sunray { stroke: var(--sun); stroke-width: 2.4; stroke-linecap: round; opacity: var(--p3); }
.drawing .hatch line { stroke: var(--line-strong); stroke-width: .8; }

/* ---------- Servizi (home) ---------- */
.svc-list { display: grid; grid-template-columns: 1fr; gap: 0; list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.svc-list li { border-bottom: 1px solid var(--line); }
.svc-link {
  display: grid; grid-template-columns: 52px 1fr 24px; gap: 16px; align-items: start;
  padding: 22px 4px; color: var(--ink); text-decoration: none;
}
.svc-link:hover h3 { color: var(--green-ink); }
.svc-link:hover .chev { transform: translateX(3px); }
.svc-icon { width: 52px; height: 52px; border-radius: var(--radius-m); background: color-mix(in srgb, var(--green) 14%, var(--surface)); display: grid; place-items: center; color: var(--green-ink); }
.svc-icon svg { width: 30px; height: 30px; }
.svc-link h3 { margin: 4px 0 4px; transition: color .15s; }
.svc-link p { margin: 0; color: var(--ink-2); font-size: .98rem; }
.chev { width: 22px; height: 22px; margin-top: 8px; color: var(--ink-2); transition: transform .15s; }
@media (min-width: 760px) {
  .svc-list { grid-template-columns: 1fr 1fr; column-gap: 48px; }
}

/* ---------- Principi ---------- */
.principles { display: grid; grid-template-columns: 1fr; gap: 28px 48px; }
.principle { padding-left: 18px; border-left: 3px solid var(--sun); }
.principle h3 { margin-bottom: 6px; }
.principle p { margin: 0; color: var(--ink-2); }
@media (min-width: 760px) { .principles { grid-template-columns: 1fr 1fr; } }

/* ---------- Zona ---------- */
.area { display: grid; gap: 32px; align-items: center; }
.area-facts { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.area-facts li { display: grid; grid-template-columns: 26px 1fr; gap: 12px; align-items: start; }
.area-facts svg { width: 22px; height: 22px; color: var(--green-ink); margin-top: 3px; }
.illus { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 18px; }
.illus figcaption { font-size: .78rem; color: var(--ink-2); margin-top: 8px; }
@media (min-width: 860px) { .area { grid-template-columns: 1fr 1fr; gap: 56px; } }

/* ---------- CTA finale ---------- */
.cta-band { background: var(--ink); color: var(--paper); padding: clamp(48px, 7vw, 88px) 0; }
:root[data-theme="dark"] .cta-band { background: #1d2a21; color: var(--ink); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cta-band { background: #1d2a21; color: var(--ink); } }
.cta-band h2 { max-width: 18em; }
.cta-band p { color: inherit; opacity: .82; max-width: 36em; }
.cta-band .btn-secondary { color: inherit; border-color: color-mix(in srgb, currentColor 45%, transparent); }
.cta-band .btn-secondary:hover { border-color: currentColor; }
.cta-band :focus-visible { outline-color: var(--sun); }

/* ---------- Pagina servizi ---------- */
.jump { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 24px 0 0; }
.jump a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1px solid var(--line-strong); border-radius: 999px; text-decoration: none; color: var(--ink); background: var(--surface); font-size: .95rem; }
.jump a:hover { border-color: var(--green-ink); color: var(--green-ink); }

.service { padding: clamp(48px, 7vw, 88px) 0; border-bottom: 1px solid var(--line); }
.service-head { display: grid; grid-template-columns: 56px 1fr; gap: 18px; align-items: start; margin-bottom: 22px; }
.service-head .svc-icon { width: 56px; height: 56px; }
.service-head h2 { margin: 4px 0 6px; }
.service-head p { margin: 0; color: var(--ink-2); max-width: 40em; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0 0 26px; }
.tags li { font-size: .9rem; padding: 6px 12px; border-radius: 999px; background: color-mix(in srgb, var(--blue) 12%, var(--surface)); color: var(--ink); }

/* Scheda in stile cartiglio */
.sheet { display: grid; grid-template-columns: 1fr; border: 1.5px solid var(--ink); border-radius: 2px; background: var(--surface); }
.sheet > div { padding: 18px 20px 20px; }
.sheet > div + div { border-top: 1px solid var(--line-strong); }
.sheet h3 { font-size: 1rem; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.sheet h3 svg { width: 20px; height: 20px; color: var(--green-ink); }
.sheet ul { margin: 0; padding-left: 1.1em; }
.sheet li { margin-bottom: 6px; color: var(--ink-2); font-size: .98rem; }
.sheet li::marker { color: var(--green); }
.sheet p { color: var(--ink-2); font-size: .98rem; margin: 0 0 .6em; }
.sheet p:last-child { margin: 0; }
@media (min-width: 900px) {
  .sheet { grid-template-columns: repeat(3, 1fr); }
  .sheet > div + div { border-top: 0; border-left: 1px solid var(--line-strong); }
}
.service-foot { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.note { font-size: .92rem; color: var(--ink-2); }

/* ---------- Chi sono ---------- */
.about { display: grid; gap: 32px; align-items: start; }
.portrait { margin: 0; }
.portrait img { width: 100%; max-width: 380px; aspect-ratio: 9 / 14; object-fit: cover; border-radius: var(--radius-m); background: var(--wall); }
@media (min-width: 860px) { .about { grid-template-columns: 340px 1fr; gap: 56px; } }
.cred { list-style: none; padding: 0; margin: 24px 0 0; border-top: 1px solid var(--line); }
.cred li { padding: 14px 0; border-bottom: 1px solid var(--line); display: grid; gap: 2px; }
.cred .k { font-size: .85rem; color: var(--ink-2); }
.cred .v { font-weight: 560; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.chips li { padding: 8px 14px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); font-size: .95rem; }

.faq { border-top: 1px solid var(--line); max-width: 52em; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  min-height: 60px; padding: 14px 0; font-family: var(--font-head); font-weight: 650; font-size: 1.1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; width: 12px; height: 12px; flex: none; border-right: 2px solid var(--ink-2); border-bottom: 2px solid var(--ink-2); transform: rotate(45deg) translate(-3px, -3px); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(-135deg) translate(-3px, -3px); }
.faq details > div { padding: 0 0 18px; color: var(--ink-2); max-width: 44em; }

/* ---------- Contatti ---------- */
.contact-grid { display: grid; gap: 40px; align-items: start; }
@media (min-width: 960px) { .contact-grid { grid-template-columns: 360px 1fr; gap: 56px; } }
.contact-list { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.contact-list li { border-bottom: 1px solid var(--line); }
.contact-list a, .contact-list .row { display: grid; grid-template-columns: 26px 1fr; gap: 12px; padding: 14px 0; color: var(--ink); text-decoration: none; align-items: start; }
.contact-list a:hover .v { color: var(--green-ink); text-decoration: underline; }
.contact-list svg { width: 22px; height: 22px; color: var(--green-ink); margin-top: 2px; }
.contact-list .k { display: block; font-size: .85rem; color: var(--ink-2); }
.contact-list .v { display: block; font-weight: 560; word-break: break-word; }
.placeholder-box { border: 2px dashed var(--placeholder); color: var(--placeholder); border-radius: var(--radius-s); padding: 8px 12px; font-size: .9rem; font-weight: 600; }

.quote { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); padding: clamp(18px, 3vw, 32px); box-shadow: var(--shadow); }
.quote h2 { font-size: clamp(1.4rem, 1.15rem + 1vw, 1.9rem); }
.chat { display: none; }
.js .chat { display: block; }
.js .quote.is-guided form { display: none; }
.chat-log { display: flex; flex-direction: column; gap: 10px; margin: 18px 0; }
.msg { max-width: 88%; padding: 10px 14px; border-radius: 16px; font-size: 1rem; line-height: 1.45; animation: pop .22s ease-out; }
.msg.q { align-self: flex-start; background: color-mix(in srgb, var(--green) 14%, var(--surface)); border-bottom-left-radius: 4px; }
.msg.a { align-self: flex-end; background: var(--btn-bg); color: var(--btn-fg); border-bottom-right-radius: 4px; }
.msg .step-of { display: block; font-size: .78rem; color: var(--ink-2); margin-bottom: 2px; }
@keyframes pop { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.chat-controls { display: flex; flex-wrap: wrap; gap: 8px; }
.chat-controls .opt {
  min-height: 48px; padding: 0 16px; border-radius: 999px; border: 1.5px solid var(--line-strong);
  background: var(--paper); color: var(--ink); font: inherit; font-size: .98rem; cursor: pointer; text-align: left;
}
.chat-controls .opt:hover { border-color: var(--green-ink); color: var(--green-ink); }
.chat-input { display: flex; flex-direction: column; gap: 10px; width: 100%; }
.chat-input .field { margin: 0; }
.chat-input .actions { display: flex; flex-wrap: wrap; gap: 8px; }
.chat-reset { background: none; border: 0; color: var(--ink-2); text-decoration: underline; font: inherit; font-size: .92rem; cursor: pointer; padding: 8px 0; min-height: 44px; }

.form-grid { display: grid; grid-template-columns: 1fr; gap: 16px 20px; }
@media (min-width: 640px) { .form-grid { grid-template-columns: 1fr 1fr; } .form-grid .full { grid-column: 1 / -1; } }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .field .label { font-weight: 580; font-size: .95rem; }
.field .hint { font-size: .85rem; color: var(--ink-2); }
input[type="text"], input[type="email"], input[type="tel"], select, textarea {
  width: 100%; min-height: 50px; padding: 12px 14px; border: 1.5px solid var(--line-strong); border-radius: var(--radius-s);
  background: var(--paper); color: var(--ink); font: inherit; font-size: 1rem;
}
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--blue-ink); outline: 2px solid color-mix(in srgb, var(--blue) 35%, transparent); outline-offset: 0; }
.req { color: var(--hot); }
.check { display: grid; grid-template-columns: 26px 1fr; gap: 10px; align-items: start; font-size: .95rem; }
.check input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--green-ink); }
.preview-box { border: 1.5px dashed var(--line-strong); border-radius: var(--radius-s); padding: 14px 16px; background: var(--paper); }
.preview-box pre { margin: 6px 0 0; white-space: pre-wrap; font-family: var(--font-mono); font-size: .88rem; line-height: 1.55; color: var(--ink); }
.honey { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* ---------- Testi lunghi (privacy) ---------- */
.prose { max-width: 46em; }
.prose h2 { font-size: 1.4rem; margin-top: 1.8em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .4em; }
.alert { border-left: 4px solid var(--sun); background: var(--sun-soft); padding: 14px 18px; border-radius: 0 var(--radius-s) var(--radius-s) 0; margin: 0 0 28px; }

/* ---------- Footer cartiglio ---------- */
.site-footer { padding: 48px 0 110px; border-top: 1px solid var(--line); }
.titleblock { display: grid; grid-template-columns: 1fr; gap: 22px; }
.titleblock > div { padding: 0; }
.tb-k { display: block; font-size: .82rem; color: var(--ink-2); margin-bottom: 2px; }
.tb-v { display: block; font-size: .95rem; }
.tb-brand { display: flex; gap: 12px; align-items: center; }
.tb-brand img { width: 44px; height: 44px; }
.tb-brand strong { font-family: var(--font-head); font-size: 1.05rem; }
.titleblock a { color: var(--ink); }
@media (min-width: 760px) { .titleblock { grid-template-columns: 1.4fr 1fr 1fr; gap: 28px 40px; } }
.footer-meta { border-top: 1px solid var(--line); padding-top: 16px; margin-top: 28px !important; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; margin-top: 16px; font-size: .88rem; color: var(--ink-2); }
.footer-meta a { color: var(--ink-2); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .step { min-height: 0; padding: 22px 0; }
  .hero-text { min-height: 0; }
}

/* Scelta multipla dei servizi */
fieldset.checks { border: 0; padding: 0; margin: 0; min-width: 0; gap: 10px; }
fieldset.checks legend { padding: 0; margin-bottom: 8px; }
fieldset.checks .hint { font-weight: 400; }
.chat-controls .opt[aria-pressed="true"] { background: var(--btn-bg); border-color: var(--btn-bg); color: var(--btn-fg); }
.chat-controls .opt[aria-pressed="true"]::before { content: "✓ "; }
.chat-controls .more { background: none; border: 0; color: var(--green-ink); text-decoration: underline; font: inherit; font-size: .95rem; cursor: pointer; min-height: 44px; padding: 0 8px; }
.chat-controls .actions-row { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.err-msg { flex-basis: 100%; margin: 0; }
fieldset.checks.is-compact label.check:has(input:not(:checked)) { display: none; }
fieldset.checks .more { align-self: flex-start; background: none; border: 0; color: var(--green-ink); text-decoration: underline; font: inherit; font-size: .95rem; cursor: pointer; min-height: 44px; padding: 0; }
.chat-group { flex-basis: 100%; border: 1px solid var(--line); border-radius: var(--radius-m); background: var(--paper); }
.chat-group-h { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 52px; padding: 0 16px; background: none; border: 0; font: inherit; font-weight: 620; color: var(--ink); cursor: pointer; text-align: left; }
.chat-group-h .count { font-weight: 500; color: var(--green-ink); margin-right: auto; }
.chat-group-h::after { content: ""; width: 10px; height: 10px; flex: none; border-right: 2px solid var(--ink-2); border-bottom: 2px solid var(--ink-2); transform: rotate(45deg); transition: transform .2s; }
.chat-group-h[aria-expanded="true"]::after { transform: rotate(-135deg); }
.chat-group-b { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 12px 14px; }
.chat-group-b .opt { background: var(--surface); }
.check-group { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.check-group-t { font-weight: 620; font-size: .92rem; color: var(--green-ink); margin-top: 6px; }
fieldset.checks.is-compact .check-group:not(:has(input:checked)) { display: none; }
.chat-group-h > span:first-child { flex: 1 1 auto; }
.chat-group-h .count { margin-right: 0; font-size: .88rem; white-space: nowrap; }
