/* ==========================================================
   NG Idraulica — Nicola Giancaspero
   Pagina unica, pensata prima per il telefono.
   Porcellana fredda + rame dei tubi. Tema scuro automatico.
   ========================================================== */

/* ---------- Font (inclusi nella cartella) ---------- */
@font-face { font-family: "Archivo"; font-style: normal; font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; src: url("../fonts/archivo-latin-wdth-normal.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 400 500; font-display: swap; src: url("../fonts/jetbrains-mono-latin-500-normal.woff2") format("woff2"); }

/* ---------- Colori ---------- */
:root {
  --bg: #EEF1F1; --bg-2: #E2E8E8; --surface: #F8FAFA;
  --fg: #121819; --fg-2: #3D4749; --muted: #687375;
  --line: rgba(18, 24, 25, .13); --line-2: rgba(18, 24, 25, .28);
  --accent: #A9531D; --accent-hover: #8C4314; --accent-ink: #FFF8F2;
  --wa: #1E8E4E; --wa-hover: #17753F;
  --band-bg: #142022; --band-2: #1C2A2C; --band-fg: #E6ECEC; --band-fg-2: #A9B6B7;
  --band-line: rgba(230, 236, 236, .14); --band-line-2: rgba(230, 236, 236, .30); --band-accent: #E08A4E;
  --header-bg: rgba(238, 241, 241, .9);
  --shadow: 0 18px 50px rgba(18, 24, 25, .16);

  --display: "Archivo", "Arial Narrow", Arial, sans-serif;
  --sans: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;

  --wrap: 1180px;
  --gutter: clamp(16px, 5vw, 48px);
  --sec: clamp(56px, 8vw, 104px);
  --radius: 8px;
  --head-h: 64px;
  --bar-h: 0px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0E1314; --bg-2: #141B1C; --surface: #182122;
    --fg: #E7ECEC; --fg-2: #B3BEBF; --muted: #869293;
    --line: rgba(231, 236, 236, .12); --line-2: rgba(231, 236, 236, .26);
    --accent: #E08A4E; --accent-hover: #F0A26A; --accent-ink: #1A0E06;
    --wa: #25A55C; --wa-hover: #2DBB6A;
    --band-bg: #19393A; --band-2: #1F4344; --band-fg: #EAF1F0; --band-fg-2: #AFC4C3;
    --band-line: rgba(234, 241, 240, .14); --band-line-2: rgba(234, 241, 240, .30); --band-accent: #F0A26A;
    --header-bg: rgba(14, 19, 20, .88); --shadow: 0 18px 50px rgba(0, 0, 0, .5);
    color-scheme: dark;
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-tap-highlight-color: transparent; }
:focus:not(:focus-visible) { outline: none; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--head-h) + 12px); }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font-family: var(--sans); font-size: 17px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
  padding-bottom: var(--bar-h);
}
img { display: block; max-width: 100%; height: auto; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
}
.skip { position: absolute; left: -9999px; top: 8px; background: var(--fg); color: var(--bg); padding: 8px 14px; z-index: 500; }
.skip:focus { left: 8px; }

.wrap {
  width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: 0 auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}
.section { padding-block: var(--sec); }
.section--alt { background: var(--bg-2); }
.section--band { background: var(--band-bg); color: var(--band-fg); }
.section--band p { color: var(--band-fg-2); }

/* ---------- Tipografia ---------- */
h1, h2, h3 { font-family: var(--display); margin: 0; text-wrap: balance; }
h1 { font-size: clamp(36px, 5.6vw, 72px); font-weight: 800; font-stretch: 112%; line-height: 1.02; letter-spacing: -.02em; }
h2 { font-size: clamp(30px, 4.2vw, 52px); font-weight: 800; font-stretch: 112%; line-height: 1.05; letter-spacing: -.015em; }
h3 { font-size: clamp(19px, 1.7vw, 22px); font-weight: 700; font-stretch: 105%; line-height: 1.2; }
h1 em, h2 em { font-style: normal; color: var(--accent); }
.section--band h2 em { color: var(--band-accent); }
p { margin: 0 0 1em; color: var(--fg-2); }
.mono { font-family: var(--mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }

.label {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 12px; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase; color: var(--accent);
}
.label::before { content: ""; width: 18px; height: 2px; border-radius: 2px; background: currentColor; }
.section--band .label { color: var(--band-accent); }

.head { margin-bottom: clamp(32px, 4vw, 52px); max-width: 720px; }
.head h2 { margin-top: 14px; }
.head > p { margin: 16px 0 0; }

/* ---------- Bottoni ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 54px; padding: 0 26px;
  border: 1.5px solid transparent; border-radius: 999px; background: transparent;
  font-family: var(--sans); font-size: 17px; font-weight: 650; font-stretch: 105%;
  cursor: pointer; white-space: nowrap;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .2s ease;
}
.btn svg { width: 20px; height: 20px; flex: none; }
.btn:active { transform: translateY(1px); }
.btn--accent { background: var(--accent); color: var(--accent-ink); }
.btn--accent:hover { background: var(--accent-hover); }
.btn--wa { background: var(--wa); color: #fff; }
.btn--wa:hover { background: var(--wa-hover); }
.btn--line { border-color: var(--line-2); }
.btn--line:hover { border-color: var(--fg); }
.btn--sm { min-height: 42px; padding: 0 18px; font-size: 15px; }
.btn--block { width: 100%; }
.i { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.i-fill { fill: currentColor; stroke: none; }

/* ---------- Header ---------- */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding-top: env(safe-area-inset-top, 0px);
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent; transition: border-color .3s ease;
}
.header.is-scrolled { border-bottom-color: var(--line); }
.header__in { display: flex; align-items: center; gap: 20px; height: var(--head-h); }
.brand { display: inline-flex; align-items: center; gap: 12px; flex: none; color: var(--fg); }
.brand svg { width: 42px; height: 36px; display: block; }
.brand__txt {
  font-family: var(--mono); font-weight: 500; font-size: 13px; letter-spacing: .3em; text-transform: uppercase;
  padding-left: 12px; border-left: 1.5px solid var(--line-2); line-height: 1.6;
}
.nav { display: flex; gap: clamp(20px, 2.6vw, 36px); margin-left: auto; }
.nav a { font-size: 15px; font-weight: 500; padding: 6px 0; color: var(--fg-2); border-bottom: 2px solid transparent; transition: color .2s, border-color .2s; }
.nav a:hover { color: var(--fg); border-bottom-color: var(--accent); }
.header__cta { display: flex; gap: 8px; margin-left: clamp(12px, 2vw, 28px); }
.h-tel { font-variant-numeric: tabular-nums; }
.h-prev { display: none; }
.link-inline { color: var(--accent); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Hero ---------- */
.hero { padding-top: calc(var(--head-h) + env(safe-area-inset-top, 0px) + clamp(28px, 5vw, 64px)); padding-bottom: clamp(40px, 6vw, 80px); }
.hero__in { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.hero h1 { margin: 16px 0 18px; }
.hero__lead { font-size: clamp(17px, 1.4vw, 19px); max-width: 560px; margin-bottom: 26px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero__note { margin: 14px 0 0; font-size: 14px; color: var(--muted); }
.hero { position: relative; overflow: hidden; }
.hero__text { position: relative; z-index: 1; }

/* Manometro */
.gauge { margin: 0; justify-self: center; width: 100%; max-width: 400px; display: grid; gap: 14px; justify-items: center; }
.gauge svg { width: 100%; height: auto; overflow: visible; }
.gauge figcaption { color: var(--muted); text-align: center; }
.g-ring { fill: var(--surface); stroke: var(--fg); stroke-width: 10; }
.g-inner { fill: none; stroke: var(--line); stroke-width: 1.5; }
.g-tick { stroke: var(--fg); stroke-linecap: round; }
.g-tick--min { stroke: var(--muted); }
.g-num { fill: var(--fg); font-family: var(--display); font-weight: 700; font-stretch: 110%; font-size: 26px; }
.g-ok { fill: none; stroke: #2E7A72; stroke-width: 9; }
.g-hot { fill: none; stroke: var(--accent); stroke-width: 9; }
.g-unit { fill: var(--muted); font-family: var(--mono); font-size: 15px; letter-spacing: .1em; }
.g-brand { fill: var(--fg); }
.g-read { fill: var(--fg); font-family: var(--mono); font-size: 13px; letter-spacing: .08em; }
.g-needle { fill: var(--accent); transform-origin: 200px 200px; transform: rotate(-33.75deg); animation: needle 2.2s cubic-bezier(.3, 1.5, .5, 1) .3s both; }
.g-hub { fill: var(--fg); }
.g-hub-dot { fill: var(--surface); }
@keyframes needle { 0% { transform: rotate(-135deg); } 100% { transform: rotate(-33.75deg); } }

.facts { list-style: none; margin: clamp(36px, 5vw, 64px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1.5px solid var(--fg); }
.facts li { display: grid; gap: 2px; padding: 18px 20px 0 0; }
.facts li + li { padding-left: 20px; border-left: 1px solid var(--line); }
.facts b { font-family: var(--display); font-weight: 700; font-stretch: 108%; font-size: 17px; }
.facts span { color: var(--fg-2); font-size: 14.5px; line-height: 1.45; }

/* ---------- Servizi ---------- */
.services { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.service {
  display: flex; flex-direction: column; gap: 10px;
  padding: 24px 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color .25s ease;
}
.service:hover { border-color: var(--accent); }
.service__top { display: flex; align-items: center; gap: 14px; }
.service__icon { width: 48px; height: 48px; border-radius: 50%; background: var(--bg-2); display: grid; place-items: center; color: var(--accent); flex: none; }
.service__icon svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.service p { font-size: 15.5px; line-height: 1.5; margin: 0; }
.ticks { list-style: none; margin: 4px 0 0; padding: 12px 0 0; border-top: 1px dashed var(--line-2); display: grid; gap: 6px; flex: 1; align-content: start; }
.ticks li { position: relative; padding-left: 20px; font-size: 14.5px; line-height: 1.4; color: var(--fg-2); }
.ticks li::before { content: ""; position: absolute; left: 0; top: .45em; width: 9px; height: 9px; border: 2px solid var(--accent); border-radius: 50%; }
.service__link {
  margin-top: 8px; align-self: flex-start;
  font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase;
  border-bottom: 1.5px solid var(--accent); padding: 6px 0 3px;
}
.service__link::after { content: " →"; }
.service__link:hover { color: var(--accent); }
.service--cta { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); justify-content: space-between; }
.service--cta:hover { border-color: var(--accent); }
.service--cta h3 { font-size: clamp(22px, 2vw, 26px); }
.service--cta p { color: inherit; opacity: .9; }
.service--cta .btn { background: var(--accent-ink); color: var(--accent); margin-top: 12px; }
.service--cta .btn:hover { background: #fff; }

/* ---------- Clima F-GAS ---------- */
.fgas__in { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(28px, 6vw, 80px); align-items: center; }
.fgas__ph { margin: 0; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 5; background: var(--band-2); }
.fgas__ph img { width: 100%; height: 100%; object-fit: cover; }
.fgas h2 { margin: 14px 0 18px; }
.fgas p { max-width: 600px; }
.fgas__list { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 10px; }
.fgas__list li { display: flex; gap: 12px; align-items: baseline; color: var(--band-fg); font-weight: 500; }
.fgas__list li::before { content: "✓"; color: var(--band-accent); font-weight: 700; }
.fgas__ref { margin: 24px 0 0; padding-top: 14px; border-top: 1px solid var(--band-line); font-size: 11.5px; }
.fgas .btn { margin-top: 24px; }

/* ---------- Lavori ---------- */
.ba { position: relative; margin: 0 0 14px; aspect-ratio: 16 / 9; user-select: none; touch-action: pan-y; border-radius: var(--radius); overflow: hidden; background: var(--bg-2); }
.ba__img { position: absolute; inset: 0; }
.ba__img img { width: 100%; height: 100%; object-fit: cover; }
.ba__img--before { clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.ba::after { content: ""; position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; background: var(--accent); transform: translateX(-1px); pointer-events: none; z-index: 2; }
.ba__handle { position: absolute; top: 50%; left: var(--pos); z-index: 3; width: 48px; height: 48px; transform: translate(-50%, -50%); background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; pointer-events: none; border-radius: 50%; box-shadow: var(--shadow); }
.ba__handle svg { width: 22px; height: 22px; }
.ba__range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; z-index: 4; }
.ba__tag { position: absolute; top: 12px; z-index: 1; background: var(--fg); color: var(--bg); padding: 5px 10px; border-radius: 4px; }
.ba__tag--l { left: 12px; } .ba__tag--r { right: 12px; }
.ba-wrap { margin-bottom: 40px; }
.ba-wrap .mono { color: var(--muted); }

.gallery { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.gallery__cta {
  aspect-ratio: 4 / 5; border-radius: var(--radius); background: var(--band-bg); color: var(--band-fg);
  display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; padding: clamp(14px, 2vw, 24px);
}
.gallery__cta b { font-family: var(--display); font-weight: 800; font-stretch: 110%; font-size: clamp(19px, 2vw, 26px); line-height: 1.1; }
.gallery__cta span { color: var(--band-fg-2); font-size: 14.5px; line-height: 1.4; }
.gallery__cta i { font-style: normal; margin-top: 8px; align-self: flex-start; }
.gallery__cta:hover i { background: var(--accent-hover); }
.gallery__item { position: relative; aspect-ratio: 4 / 5; border: 0; padding: 0; margin: 0; cursor: zoom-in; display: block; width: 100%; border-radius: var(--radius); overflow: hidden; background: var(--bg-2); }
.gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.gallery__item:hover img { transform: scale(1.04); }
.gallery__item > span {
  position: absolute; left: 10px; bottom: 10px; z-index: 1; text-align: left;
  font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase;
  background: var(--surface); color: var(--fg); padding: 5px 9px; border-radius: 4px;
}
.lavori__foot { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 36px; }

/* ---------- Chi sono + metodo ---------- */
.about { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 80px); align-items: start; }
.about h2 { margin: 14px 0 20px; }
.about__specs { margin: 28px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1.5px solid var(--fg); }
.about__specs div { padding: 14px 14px 0 0; display: grid; gap: 4px; }
.about__specs div + div { padding-left: 14px; border-left: 1px solid var(--line); }
.about__specs dt { color: var(--muted); font-size: 11px; }
.about__specs dd { margin: 0; font-weight: 600; font-size: 15.5px; line-height: 1.3; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; counter-reset: s; }
.steps li { display: grid; grid-template-columns: 44px minmax(0, 1fr); column-gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.steps li:first-child { border-top: 1.5px solid var(--fg); }
.steps__n { grid-row: 1 / span 2; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; border: 2.5px solid var(--fg); font-size: 13px; font-weight: 500; }
.steps li:last-child .steps__n { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.steps h3 { font-size: 19px; margin-top: 2px; }
.steps p { font-size: 15.5px; margin: 4px 0 0; }

/* ---------- Domande ---------- */
.faq-wrap { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(28px, 6vw, 80px); align-items: start; }
.faq-wrap .head { position: sticky; top: calc(var(--head-h) + 32px); margin: 0; }
.faq { border-top: 1.5px solid var(--fg); }
.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: 18px;
  padding: 20px 0; font-family: var(--display); font-weight: 700; font-stretch: 105%; font-size: clamp(17px, 1.6vw, 20px); line-height: 1.3;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--accent); }
.faq summary::after { content: "+"; flex: none; width: 30px; height: 30px; border-radius: 50%; border: 1.5px solid var(--line-2); display: grid; place-items: center; font-family: var(--sans); font-weight: 400; font-size: 20px; line-height: 1; transition: transform .3s ease; }
.faq details[open] summary::after { transform: rotate(45deg); background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.faq details p { margin: -4px 0 20px; max-width: 600px; }
.faq a { color: var(--accent); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Contatti ---------- */
.contact { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(32px, 6vw, 80px); align-items: start; }
.contact h2 { margin: 14px 0 18px; }
.contact__quick { display: grid; gap: 10px; margin: 26px 0 0; }
.contact__quick .btn { justify-content: flex-start; padding-left: 22px; }
.contact__quick .btn--line { border-color: var(--band-line-2); color: var(--band-fg); }
.contact__quick .btn--line:hover { border-color: var(--band-fg); }
.contact__quick small { margin-left: auto; font-size: 13px; font-weight: 500; opacity: .75; }
.contact__list { list-style: none; padding: 0; margin: 26px 0 0; border-top: 1px solid var(--band-line); }
.contact__list li { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--band-line); align-items: baseline; }
.contact__list .mono { color: var(--band-fg-2); font-size: 11px; }
.contact__list a { font-weight: 600; overflow-wrap: anywhere; }
.contact__list a:hover { color: var(--band-accent); }

.form { background: var(--band-2); border: 1px solid var(--band-line); border-radius: calc(var(--radius) * 1.5); padding: clamp(20px, 4vw, 36px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.form__title { grid-column: 1 / -1; margin: 0 0 2px; font-size: 21px; }
.field { display: grid; gap: 7px; min-width: 0; border: 0; margin: 0; padding: 0; }
.field--full { grid-column: 1 / -1; }
.field > label, .field > legend { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--band-fg-2); padding: 0; }
.field > legend { margin-bottom: 7px; }
.form input:not([type=radio]), .form select, .form textarea {
  width: 100%; min-height: 50px; padding: 12px 14px; border-radius: var(--radius);
  background: var(--band-bg); border: 1px solid var(--band-line-2); color: var(--band-fg); font-size: 16px;
}
.form textarea { resize: vertical; min-height: 104px; line-height: 1.5; }
.form textarea::placeholder { color: var(--band-fg-2); opacity: .6; }
.form select { appearance: none; -webkit-appearance: none; padding-right: 40px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--band-fg-2) 50%), linear-gradient(-45deg, transparent 50%, var(--band-fg-2) 50%);
  background-position: calc(100% - 20px) 22px, calc(100% - 15px) 22px; background-size: 5px 5px; background-repeat: no-repeat; }
.form select option { background: var(--band-bg); color: var(--band-fg); }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--band-accent); }
.form .is-invalid { border-color: var(--band-accent) !important; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips label { cursor: pointer; }
.chips input { position: absolute; opacity: 0; pointer-events: none; }
.chips span { display: inline-flex; align-items: center; min-height: 42px; padding: 0 16px; border: 1px solid var(--band-line-2); border-radius: 999px; font-size: 15px; transition: all .2s ease; }
.chips input:checked + span { background: var(--band-fg); color: var(--band-bg); border-color: var(--band-fg); }
.chips input:focus-visible + span { outline: 2px solid var(--band-accent); outline-offset: 2px; }
.form__err { grid-column: 1 / -1; margin: -4px 0 0; color: var(--band-accent) !important; font-size: 14px; font-weight: 600; }
.form__err:empty { display: none; }
.form .btn { grid-column: 1 / -1; }
.form__note { grid-column: 1 / -1; margin: 0; font-size: 13px; }

/* ---------- Footer ---------- */
.footer { padding-block: 48px calc(32px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); }
.footer__in { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 28px 52px; align-items: center; }
.footer__logo { display: block; width: 100px; color: var(--fg); }
.footer__logo svg { width: 100%; height: auto; display: block; }
.footer__cols { display: grid; gap: 18px; }
.footer__links { display: flex; flex-wrap: wrap; gap: 8px 26px; font-size: 15px; font-weight: 500; }
.footer__links a:hover { color: var(--accent); }
.footer__legal { margin: 0; padding-top: 18px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); line-height: 1.8; }
.footer__legal a { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 400; background: rgba(8, 11, 12, .96); overscroll-behavior: contain; display: grid; place-items: center; padding: 64px 72px; }
.lightbox img {
  width: auto; height: auto; max-width: 100%;
  max-height: calc(100vh - 128px); max-height: calc(100dvh - 128px);
  object-fit: contain; border-radius: 4px;
}
.lightbox button { position: absolute; background: none; border: 0; color: #E7ECEC; cursor: pointer; font-size: 44px; line-height: 1; width: 56px; height: 56px; }
.lightbox button:hover { color: #E08A4E; }
.lightbox__close { top: calc(10px + env(safe-area-inset-top, 0px)); right: calc(10px + env(safe-area-inset-right, 0px)); }
.lightbox__prev { left: 8px; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 8px; top: 50%; transform: translateY(-50%); }
.lightbox__count { position: absolute; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); left: 50%; transform: translateX(-50%); color: #A9B6B7; }

/* ---------- Pallino WhatsApp (telefono) ---------- */
.fab { display: none; }

/* ---------- Pagine secondarie ---------- */
.page-hero { padding-top: calc(var(--head-h) + env(safe-area-inset-top, 0px) + 56px); padding-bottom: 40px; border-bottom: 1px solid var(--line); }
.page-hero h1 { margin-top: 16px; font-size: clamp(36px, 6vw, 64px); }
.legal { max-width: calc(760px + 2 * var(--gutter)); margin: 0; padding-block: 48px 88px; }
.legal h2 { font-size: 24px; margin: 36px 0 10px; }
.legal a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }


/* ---------- Menù laterale (telefono e tablet) ---------- */
.menu-btn { display: none; flex: none; width: 44px; height: 44px; margin-left: 4px; padding: 0; border: 1.5px solid var(--line-2); border-radius: 50%; background: transparent; color: var(--fg); cursor: pointer; place-items: center; }
.menu-btn:hover { border-color: var(--fg); }
.menu-btn span, .menu-btn span::before, .menu-btn span::after { display: block; width: 18px; height: 2px; background: currentColor; border-radius: 2px; transition: transform .3s ease, top .3s ease, background-color .2s ease; }
.menu-btn span { position: relative; }
.menu-btn span::before, .menu-btn span::after { content: ""; position: absolute; left: 0; }
.menu-btn span::before { top: -6px; }
.menu-btn span::after { top: 6px; }
.menu-btn[aria-expanded="true"] span { background: transparent; }
.menu-btn[aria-expanded="true"] span::before { top: 0; transform: rotate(45deg); }
.menu-btn[aria-expanded="true"] span::after { top: 0; transform: rotate(-45deg); }
body.menu-open .header { border-bottom-color: var(--line); background: var(--bg); }
body.menu-open .header__cta { visibility: hidden; }
.drawer { position: fixed; inset: 0; z-index: 95; visibility: hidden; pointer-events: none; transition: visibility 0s linear .3s; }
.drawer.is-open { visibility: visible; pointer-events: auto; transition-delay: 0s; }
.drawer__bg { position: absolute; inset: 0; background: rgba(8, 12, 13, .55); opacity: 0; transition: opacity .3s ease; }
.drawer.is-open .drawer__bg { opacity: 1; }
.drawer__panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(86vw, 360px);
  display: flex; flex-direction: column; gap: 22px; overflow-y: auto; overscroll-behavior: contain;
  padding: calc(var(--head-h) + env(safe-area-inset-top, 0px) + 8px) calc(22px + env(safe-area-inset-right, 0px)) calc(24px + env(safe-area-inset-bottom, 0px)) 22px;
  background: var(--bg); color: var(--fg); border-left: 1px solid var(--line); box-shadow: var(--shadow);
  transform: translateX(100%); transition: transform .3s ease;
}
.drawer.is-open .drawer__panel { transform: none; }
.drawer__nav { display: grid; }
.drawer__nav a { padding: 16px 2px; font-size: 20px; font-weight: 600; border-bottom: 1px solid var(--line); color: var(--fg); }
.drawer__nav a:hover, .drawer__nav a:focus-visible { color: var(--accent); }
.drawer__cta { display: grid; gap: 10px; margin-top: auto; }
@media (max-width: 1020px) { .menu-btn { display: inline-grid; } }

/* ---------- Responsive ---------- */
@media (max-width: 1020px) {
  .services { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts li:nth-child(3) { padding-left: 0; border-left: 0; }
  .facts li:nth-child(n+3) { margin-top: 14px; }
  .nav { display: none; }
  .header__cta { margin-left: auto; }
}
@media (max-width: 860px) {
  :root { --head-h: 58px; }
  .h-wa, .h-tel { display: none; }
  .h-prev { display: inline-flex; }
  .hero__in, .fgas__in, .about, .faq-wrap, .contact { grid-template-columns: minmax(0, 1fr); }
  /* su telefono il manometro diventa una filigrana dietro al testo */
  .gauge {
    position: absolute; z-index: 0; pointer-events: none;
    top: calc(var(--head-h) + env(safe-area-inset-top, 0px) + 8px); right: -34%;
    width: 92vw; max-width: 480px; opacity: .09;
  }
  .gauge figcaption { display: none; }
  .g-ring { fill: none; }
  .fgas__ph { aspect-ratio: 16 / 10; order: 2; }
  .fgas__ph img { object-position: center 70%; }
  .faq-wrap .head { position: static; }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .footer__in { grid-template-columns: minmax(0, 1fr); }

  .fab {
    display: grid; place-items: center; position: fixed; z-index: 90;
    right: calc(16px + env(safe-area-inset-right, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    width: 60px; height: 60px; border-radius: 50%; background: var(--wa); color: #fff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
  }
  .fab svg { width: 32px; height: 32px; }
  .fab:active { transform: scale(.95); }
  .lightbox { padding: 56px 8px; }
  .lightbox__prev, .lightbox__next { top: auto; bottom: calc(6px + env(safe-area-inset-bottom, 0px)); transform: none; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .gallery__cta i { min-height: 38px; padding: 0 12px; font-size: 13.5px; white-space: normal; text-align: center; }
  .brand svg { width: 36px; height: 31px; }
  .brand__txt { font-size: 11.5px; letter-spacing: .24em; padding-left: 10px; }
  .header__cta .btn { padding: 0 14px; font-size: 14px; min-height: 40px; }
  .hero__cta .btn { flex: 1 1 100%; }
  .services { grid-template-columns: minmax(0, 1fr); }
  .service { padding: 20px 18px; }
  .ba { aspect-ratio: 4 / 5; }
  .about__specs { grid-template-columns: minmax(0, 1fr); }
  .about__specs div, .about__specs div + div { padding: 10px 0; border-left: 0; }
  .about__specs div + div { border-top: 1px solid var(--line); }
  .form { grid-template-columns: minmax(0, 1fr); }
  .contact__list li { grid-template-columns: 84px minmax(0, 1fr); }
}
@media (max-width: 560px) {
  /* su telefono le card servizi restano corte: le voci di dettaglio si vedono da PC */
  .service .ticks { display: none; }
  .service__link { margin-top: 2px; }
}

/* telefoni stretti: il preventivo è nel menù, l'header lascia spazio al burger */
@media (max-width: 420px) { .header__cta .h-prev { display: none; } }
