/* Ma.Del. srl — stile del sito
   Palette: navy profondo (acqua), blu Ma.Del., rosso fiamma, grigio freddo */
@font-face {
  font-family: "Archivo";
  src: url(../fonts/archivo.woff2) format("woff2");
  font-weight: 400 800;
  font-stretch: 100% 125%;
  font-display: swap;
}
@font-face {
  font-family: "Martian Mono";
  src: url(../fonts/martian-mono.woff2) format("woff2");
  font-weight: 400 500;
  font-display: swap;
}

:root {
  --navy: #0B1B2E;
  --navy-2: #12273F;
  --blu: #1F6FD1;
  --fiamma: #E8432E;
  --fiamma-btn: #CC3520;
  --blu-ink: #195AAA;
  --carta: #EEF2F5;
  --acciaio: #8A97A6;
  --bianco: #FFFFFF;
  --verde-wa: #1FA855;

  --ink: var(--navy);
  --muted: #4E5D6E;
  --line: rgba(11, 27, 46, .12);
  --line-dark: rgba(238, 242, 245, .14);

  --f-display: "Archivo", system-ui, sans-serif;
  --f-body: "Archivo", system-ui, sans-serif;
  --f-mono: "Martian Mono", ui-monospace, monospace;

  --r: 22px;
  --r-sm: 12px;
  --gutter: clamp(16px, 4vw, 40px);
  --max: 1240px;
  --ease: cubic-bezier(.2, .7, .1, 1);
  --header-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 8px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--carta);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--f-body);
  font-stretch: 100%;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--blu); outline-offset: 3px; border-radius: 6px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 200; background: var(--bianco); padding: 10px 16px; border-radius: 8px; }
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }

/* ---------- Tipografia ---------- */
.eyebrow {
  margin: 0 0 18px;
  font: 500 .72rem/1.4 var(--f-mono);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--blu-ink);
}
.h2 {
  margin: 0;
  font-family: var(--f-display);
  font-weight: 800;
  font-stretch: 125%;
  font-size: clamp(2rem, 4.6vw, 3.6rem);
  line-height: .98;
  letter-spacing: -.02em;
  text-transform: uppercase;
}
.section-lead { max-width: 46ch; color: var(--muted); margin: 20px 0 0; }
.inline-link { color: var(--blu); text-decoration-thickness: 1px; text-underline-offset: 3px; font-weight: 600; }

/* ---------- Bottoni ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 22px;
  border: 0; border-radius: 999px;
  font-weight: 600; font-size: 1rem; line-height: 1.2; text-decoration: none;
  cursor: pointer;
  transition: transform .25s var(--ease), background-color .25s, box-shadow .25s, color .25s;
}
.btn svg { width: 20px; height: 20px; flex: none; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-sm { min-height: 42px; padding: 8px 16px; font-size: .9rem; }
.btn-lg { min-height: 58px; padding: 14px 26px; font-size: 1.05rem; }
.btn-call { background: var(--fiamma-btn); color: var(--bianco); box-shadow: 0 10px 30px -10px rgba(232, 67, 46, .8); }
.btn-call:hover { background: #DA3B25; }
.btn-call b { font-weight: 800; font-stretch: 112%; margin-left: 4px; }
.btn-ghost { background: rgba(238, 242, 245, .08); color: var(--carta); box-shadow: inset 0 0 0 1.5px rgba(238, 242, 245, .28); }
.btn-ghost:hover { background: rgba(238, 242, 245, .16); }
.btn-ghost-dark { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn-ghost-dark:hover { box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn-wa { background: var(--verde-wa); color: var(--bianco); box-shadow: 0 10px 28px -12px rgba(31, 168, 85, .9); }
.btn-wa:hover { background: #22B95E; }
.btn-accent { background: var(--navy); color: var(--bianco); box-shadow: inset 0 -3px 0 var(--accent, var(--blu)); }
.btn-accent:hover { background: var(--navy-2); }

/* ---------- Intro ---------- */
.intro {
  position: fixed; inset: 0; z-index: 300;
  display: grid; place-items: center;
  background: var(--navy);
  clip-path: circle(150% at 50% 46%);
  animation: intro-out .75s var(--ease) 2.25s forwards;
}
.intro-stage { display: grid; justify-items: center; gap: 6px; transform: translateY(-2vh); }
.intro-drop { overflow: visible; }
.intro-outline { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw .8s var(--ease) .1s forwards; }
.intro-liquid { transform: translateY(100%); animation: fill 1.3s cubic-bezier(.5, 0, .2, 1) .45s forwards; }
.intro-temp {
  margin: 10px 0 0;
  font: 500 .9rem/1 var(--f-mono); color: var(--acciaio); letter-spacing: .08em;
  opacity: 0; animation: fade .4s ease .5s forwards;
}
.intro-word { margin: 0; overflow: hidden; }
.intro-word span {
  display: block;
  font: 800 clamp(2.4rem, 7vw, 4rem)/1.05 var(--f-display); font-stretch: 125%; font-style: italic;
  color: var(--carta); letter-spacing: -.02em;
  transform: translateY(110%);
  animation: rise .7s var(--ease) 1.25s forwards;
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fill { to { transform: translateY(0); } }
@keyframes fade { to { opacity: 1; } }
@keyframes rise { to { transform: translateY(0); } }
@keyframes intro-out { to { clip-path: circle(0% at 50% 40%); visibility: hidden; } }
.no-intro .intro, .intro.is-done { display: none; }
html.js:not(.no-intro):not(.intro-over) body { overflow: hidden; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 100;
  height: var(--header-h);
  color: var(--carta);
  transition: background-color .35s, box-shadow .35s, transform .35s var(--ease);
}
.site-header.is-solid {
  background: rgba(11, 27, 46, .86);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  box-shadow: 0 1px 0 var(--line-dark);
}
.header-in { height: 100%; display: flex; align-items: center; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { width: 30px; height: auto; }
.brand-word {
  font: 800 1.35rem/1 var(--f-display); font-stretch: 125%; font-style: italic; letter-spacing: -.02em;
}
.brand-word small { font: inherit; font-size: .5em; font-weight: 700; letter-spacing: 0; margin-left: .2em; opacity: .62; }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a {
  padding: 8px 14px; border-radius: 999px;
  text-decoration: none; font-weight: 500; font-size: .95rem;
  color: rgba(238, 242, 245, .82);
  transition: color .2s, background-color .2s;
}
.nav a:hover { color: var(--bianco); background: rgba(238, 242, 245, .08); }
.header-actions { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.nav + .header-actions { margin-left: 0; }
.nav-call { display: none; }
.menu-btn { display: none; }

/* Stato ufficio (aperto/chiuso) */
.status {
  display: inline-flex; align-items: center; gap: 8px;
  font: 500 .68rem/1.3 var(--f-mono); letter-spacing: .04em; text-transform: uppercase;
  color: var(--acciaio);
}
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--acciaio); flex: none; }
.status.is-open { color: #7FE3A4; }
.status.is-open .status-dot { background: #3DDC84; box-shadow: 0 0 0 0 rgba(61, 220, 132, .6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(61, 220, 132, 0); } 100% { box-shadow: 0 0 0 0 rgba(61, 220, 132, 0); } }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background:
    radial-gradient(60% 50% at 85% 20%, rgba(232, 67, 46, .16), transparent 70%),
    radial-gradient(70% 60% at 0% 100%, rgba(31, 111, 209, .28), transparent 70%),
    var(--navy);
  color: var(--carta);
  padding: calc(var(--header-h) + clamp(32px, 7vw, 88px)) 0 clamp(56px, 8vw, 110px);
  overflow: hidden;
}
.hero-grid { display: grid; grid-template-columns: 1.25fr .9fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero .eyebrow { color: #7FB2F0; }
.hero-title {
  margin: 0;
  font-family: var(--f-display);
  font-weight: 800; font-stretch: 125%;
  font-size: clamp(2.5rem, 6.4vw, 5.6rem);
  line-height: .95; letter-spacing: -.035em;
  text-transform: uppercase;
}
.hero-title .line { display: block; overflow: hidden; padding-bottom: .04em; }
.hero-title .line > span { display: inline-block; }
.hero-title .warm {
  background: linear-gradient(90deg, #6FA8F2, var(--fiamma) 85%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-lead { max-width: 50ch; margin: 28px 0 0; font-size: clamp(1.02rem, 1.4vw, 1.15rem); color: rgba(238, 242, 245, .78); }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.proof {
  list-style: none; padding: 26px 0 0; margin: 40px 0 0;
  display: flex; flex-wrap: wrap; gap: 18px 36px;
  border-top: 1px solid var(--line-dark);
}
.proof li { display: flex; align-items: baseline; gap: 6px; font-size: .9rem; color: rgba(238, 242, 245, .7); }
.proof b { font-weight: 800; font-stretch: 125%; font-size: 1.35rem; color: var(--carta); }
.proof b + b { margin-left: -6px; }
.proof li:last-child b { font-size: 1rem; }

.hero-media { position: relative; margin: 0; }
.hero-media img {
  width: 100%; aspect-ratio: 4 / 5; object-fit: cover;
  border-radius: var(--r);
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .7);
}
.hero-video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; border-radius: var(--r);
  opacity: 0; transition: opacity .8s ease;
}
.hero-video.is-playing { opacity: 1; }
.hero-pause {
  position: absolute; top: 14px; right: 14px;
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--line-dark); color: var(--carta); cursor: pointer;
  background: rgba(11, 27, 46, .6);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.hero-pause[hidden] { display: none; }
.hero-pause svg { width: 16px; height: 16px; }
.readout {
  position: absolute; left: -22px; bottom: 28px;
  display: grid; gap: 4px;
  padding: 14px 18px;
  background: rgba(11, 27, 46, .82);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border: 1px solid var(--line-dark);
  border-radius: var(--r-sm);
}
.readout-k { font: 500 .62rem/1 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--fiamma); }
.readout-v { font-weight: 600; font-size: .95rem; }

/* Ingresso hero dopo l'intro */
.js .hero-title .line > span { transform: translateY(105%); }
.js .reveal { opacity: 0; transform: translateY(18px); }
.js .hero-media { transform: scale(.96); }
.ready .hero-title .line > span { transform: none; transition: transform .9s var(--ease); }
.ready .hero-title .line:nth-child(2) > span { transition-delay: .07s; }
.ready .hero-title .line:nth-child(3) > span { transition-delay: .14s; }
.ready .hero-title .line:nth-child(4) > span { transition-delay: .21s; }
.ready .hero .reveal { opacity: 1; transform: none; transition: opacity .8s .3s, transform .8s .3s var(--ease); }
.ready .hero-media { transform: none; transition: transform 1.2s .15s var(--ease); }
.reveal.in { opacity: 1; transform: none; transition: opacity .7s, transform .7s var(--ease); }

/* ---------- Servizi / Termostato ---------- */
.services {
  --accent: #F0901E;
  --accent-ink: color-mix(in srgb, var(--accent), var(--navy) 48%);
  padding: clamp(72px, 10vw, 140px) 0;
  background: var(--carta);
}
.services .eyebrow { color: var(--accent-ink); }
.section-head { max-width: 760px; margin-bottom: clamp(40px, 6vw, 72px); }
.thermo { display: grid; grid-template-columns: minmax(300px, 440px) 1fr; gap: clamp(32px, 6vw, 88px); align-items: center; }

.dial-wrap { position: relative; width: 100%; max-width: 440px; aspect-ratio: 1; margin-inline: auto; }
.dial {
  position: absolute; inset: 9%;
  border-radius: 50%;
  cursor: grab; touch-action: none; user-select: none;
}
.dial:active { cursor: grabbing; }
.dial:focus-visible { outline-offset: 10px; border-radius: 50%; }
.dial-ticks { position: absolute; inset: -8%; width: 116%; height: 116%; color: var(--acciaio); }
.dial-ticks line { stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; }
.dial-ticks line.major { stroke-width: 2.5; color: var(--navy); }
.dial-ticks line.on { stroke: var(--accent); }
.dial-ring {
  position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from -135deg, #2F7BE0 0deg, #2F7BE0 34deg, #1A9BB0 101deg, #F0901E 169deg, #E8432E 236deg, #E8432E 270deg, transparent 270deg);
  -webkit-mask: radial-gradient(closest-side, transparent 86%, #000 87%, #000 99%, transparent 100%);
  mask: radial-gradient(closest-side, transparent 86%, #000 87%, #000 99%, transparent 100%);
  opacity: .9;
}
.dial-knob {
  position: absolute; inset: 15%;
  display: grid; place-content: center; justify-items: center; gap: 6px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 28%, #1C3656, var(--navy) 70%);
  color: var(--carta);
  box-shadow:
    0 30px 60px -20px rgba(11, 27, 46, .65),
    inset 0 1px 0 rgba(255, 255, 255, .12),
    0 0 0 10px var(--bianco),
    0 0 0 11px var(--line);
}
.dial-needle {
  position: absolute; inset: 0;
  transform: rotate(var(--angle, 35deg));
  transition: transform .5s var(--ease);
}
.dial.is-dragging .dial-needle { transition: none; }
.dial-needle::before {
  content: ""; position: absolute; left: 50%; top: 7%;
  width: 6px; height: 13%; margin-left: -3px; border-radius: 3px;
  background: var(--accent);
  box-shadow: 0 0 18px var(--accent);
}
.dial-temp { font-family: var(--f-display); font-weight: 800; font-stretch: 125%; font-size: clamp(3rem, 7vw, 4.6rem); line-height: .9; letter-spacing: -.04em; }
.dial-temp b { font-weight: inherit; }
.dial-name { font: 500 .6rem/1 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }

.dial-stops { list-style: none; margin: 0; padding: 0; }
.dial-stops li {
  position: absolute; left: 50%; top: 50%;
  transform: rotate(var(--a)) translateY(calc(-1 * min(244px, 55.5vw))) rotate(calc(-1 * var(--a)));
}
.dial-stops button {
  transform: translate(-50%, -50%);
  white-space: nowrap;
  padding: 7px 13px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--bianco);
  font-size: .8rem; font-weight: 600; color: var(--muted);
  cursor: pointer;
  transition: background-color .3s, color .3s, border-color .3s, box-shadow .3s;
}
.dial-stops button:hover { color: var(--ink); border-color: var(--ink); }
.dial-stops button[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: var(--bianco); box-shadow: inset 0 -3px 0 var(--accent), 0 8px 20px -10px var(--navy); }

.panels { position: relative; min-height: 560px; }
.panel { display: grid; gap: 28px; }
.panel[hidden] { display: none; }
.panel.is-active { animation: panel-in .55s var(--ease); }
@keyframes panel-in { from { opacity: 0; transform: translateY(14px); } }
.panel picture { display: block; overflow: hidden; border-radius: var(--r); }
.panel img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.panel h3 { margin: 0; font: 800 clamp(1.5rem, 2.6vw, 2.1rem)/1.05 var(--f-display); font-stretch: 115%; letter-spacing: -.02em; }
.panel-lead { margin: 10px 0 0; color: var(--muted); max-width: 52ch; }
.ticks { list-style: none; padding: 0; margin: 22px 0 28px; display: grid; gap: 12px; }
.ticks li { position: relative; padding-left: 28px; color: var(--muted); font-size: .98rem; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: .5em;
  width: 14px; height: 8px;
  border-left: 2.5px solid var(--accent); border-bottom: 2.5px solid var(--accent);
  transform: rotate(-45deg) translateY(-3px);
}
.ticks b { color: var(--ink); font-weight: 650; }

/* ---------- Valori ---------- */
.values { background: var(--navy); color: var(--carta); padding: clamp(72px, 10vw, 130px) 0; }
.values-grid { display: grid; gap: clamp(36px, 5vw, 64px); }
.values-title { font-size: clamp(2rem, 7vw, 6rem); }
.values-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line-dark); border: 1px solid var(--line-dark); border-radius: var(--r); overflow: hidden; }
.values-list li { background: var(--navy); padding: clamp(24px, 3vw, 36px); }
.values-list svg { width: 30px; height: 30px; color: #6FA8F2; }
.values-list li:nth-child(even) svg { color: var(--fiamma); }
.values-list h3 { margin: 18px 0 8px; font: 700 1.15rem/1.2 var(--f-display); font-stretch: 112%; }
.values-list p { margin: 0; color: rgba(238, 242, 245, .68); font-size: .97rem; }

/* ---------- Lavori ---------- */
.works { padding: clamp(72px, 10vw, 130px) 0 clamp(56px, 8vw, 100px); background: var(--carta); overflow: hidden; }
.works-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 40px; }
.works-head .h2 { max-width: 13ch; }
.works-nav { display: flex; gap: 10px; }
.round-btn {
  width: 52px; height: 52px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--line); background: var(--bianco); cursor: pointer;
  transition: background-color .25s, color .25s, transform .25s var(--ease);
}
.round-btn svg { width: 22px; height: 22px; }
.round-btn:hover { background: var(--navy); color: var(--carta); }
.works-track {
  display: flex; gap: 16px; align-items: stretch;
  overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 0 max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter))) 12px;
  scroll-padding-inline: max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter)));
  scrollbar-width: none;
}
.works-track::-webkit-scrollbar { display: none; }
.work { margin: 0; flex: none; scroll-snap-align: start; height: clamp(340px, 46vw, 520px); display: grid; grid-template-rows: 1fr auto; gap: 12px; }
.w-tall { aspect-ratio: 3 / 4.6; }
.w-wide { aspect-ratio: 4 / 4; }
.work button { padding: 0; border: 0; border-radius: var(--r); overflow: hidden; cursor: zoom-in; background: var(--navy); min-height: 0; }
.work img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.work button:hover img { transform: scale(1.05); }
.work figcaption { font: 500 .7rem/1.3 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }

.lightbox { border: 0; padding: 0; background: transparent; max-width: min(1100px, 94vw); max-height: 92vh; overflow: visible; }
.lightbox::backdrop { background: rgba(11, 27, 46, .9); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.lightbox img { max-height: 84vh; width: auto; margin-inline: auto; border-radius: var(--r-sm); }
.lightbox-cap { margin: 12px 0 0; text-align: center; color: var(--carta); font: 500 .75rem/1.3 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; }
.lightbox-close { position: absolute; right: -8px; top: -60px; }

/* ---------- Video + Instagram ---------- */
.film { background: var(--navy); color: var(--carta); padding: clamp(72px, 10vw, 130px) 0; }
.film .eyebrow { color: #7FB2F0; }
.film-head { display: grid; grid-template-columns: 1.1fr .9fr; gap: 28px clamp(32px, 6vw, 80px); align-items: end; margin-bottom: clamp(32px, 5vw, 56px); }
.film-side p { margin: 0 0 24px; color: rgba(238, 242, 245, .72); max-width: 46ch; }
.btn-ig { background: linear-gradient(60deg, #C2185B, #8E2DB5 55%, #5146C8); color: var(--bianco); box-shadow: 0 12px 30px -12px rgba(194, 24, 91, .8); }
.btn-ig:hover { filter: brightness(1.1); }
.btn-ig b { font-weight: 700; opacity: .85; margin-left: 2px; }
.player { position: relative; border-radius: var(--r); overflow: hidden; background: #000; box-shadow: 0 40px 90px -40px rgba(0, 0, 0, .8); }
.player video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.player-play {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  border: 0; cursor: pointer; color: var(--bianco);
  background: linear-gradient(180deg, rgba(11, 27, 46, .1), rgba(11, 27, 46, .55));
  transition: background-color .3s;
}
.player-icon {
  width: clamp(72px, 9vw, 104px); aspect-ratio: 1; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--fiamma-btn);
  box-shadow: 0 0 0 0 rgba(232, 67, 46, .5);
  animation: ring 2.4s infinite;
  transition: transform .35s var(--ease);
}
.player-icon svg { width: 40%; height: 40%; margin-left: 6%; }
.player-play:hover .player-icon { transform: scale(1.08); }
.player-label { font-weight: 600; font-size: 1.05rem; text-shadow: 0 1px 12px rgba(0, 0, 0, .5); }
.player-label i { font: 500 .72rem/1 var(--f-mono); font-style: normal; letter-spacing: .06em; margin-left: 8px; opacity: .8; }
.player.is-started .player-play { display: none; }
@keyframes ring { 70% { box-shadow: 0 0 0 22px rgba(232, 67, 46, 0); } 100% { box-shadow: 0 0 0 0 rgba(232, 67, 46, 0); } }

/* ---------- Chi siamo ---------- */
.about {
  background: var(--bianco);
  padding: clamp(72px, 10vw, 130px) 0;
}
.about-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(32px, 6vw, 88px); align-items: center; }
.about-media {
  margin: 0; position: relative;
  background: var(--navy);
  border-radius: var(--r);
  overflow: hidden;
  box-shadow: 0 40px 80px -40px rgba(11, 27, 46, .55);
}
.about-media img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 12%; }
.about-copy > p:not(.eyebrow) { color: var(--muted); max-width: 56ch; margin: 24px 0 0; }
.quote { margin: 36px 0 0; padding: 0 0 0 24px; border-left: 3px solid var(--fiamma); }
.quote p { margin: 0; font: 500 clamp(1.2rem, 2vw, 1.5rem)/1.35 var(--f-display); font-stretch: 105%; letter-spacing: -.01em; }
.quote footer { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 16px; }
.quote footer img { width: 170px; filter: invert(1); }
.quote footer span { font: 500 .68rem/1.3 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.stats { display: flex; gap: clamp(28px, 5vw, 64px); margin: 44px 0 0; padding-top: 28px; border-top: 1px solid var(--line); }
.stats div { display: flex; flex-direction: column-reverse; }
.stats dd { margin: 0; font: 800 clamp(2.6rem, 5vw, 3.8rem)/1 var(--f-display); font-stretch: 125%; letter-spacing: -.03em; color: var(--blu); }
.stats div + div dd { color: var(--fiamma); }
.stats dt { margin-top: 8px; color: var(--muted); font-size: .9rem; }

/* ---------- FAQ ---------- */
.faq { background: var(--bianco); padding: 0 0 clamp(72px, 10vw, 130px); }
.faq-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(32px, 6vw, 80px); padding-top: clamp(56px, 8vw, 100px); border-top: 1px solid var(--line); }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; gap: 20px; align-items: center;
  padding: 22px 0; font-weight: 600; font-size: 1.08rem;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: ""; flex: none; width: 12px; height: 12px;
  border-right: 2px solid var(--blu); border-bottom: 2px solid var(--blu);
  transform: rotate(45deg) translate(-3px, -3px);
  transition: transform .3s var(--ease);
}
.faq-list details[open] summary::after { transform: rotate(225deg); }
.faq-list details p { margin: 0 0 24px; color: var(--muted); max-width: 62ch; }

/* ---------- Contatti ---------- */
.contact { background: var(--navy); color: var(--carta); padding: clamp(72px, 10vw, 130px) 0; position: relative; overflow: hidden; }
.contact::before {
  content: ""; position: absolute; inset: auto -20% -40% auto; width: 70vw; height: 70vw; border-radius: 50%;
  background: radial-gradient(circle, rgba(31, 111, 209, .22), transparent 65%);
  pointer-events: none;
}
.contact-grid { position: relative; display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(36px, 6vw, 80px); align-items: start; }
.contact .eyebrow { color: #7FB2F0; }
.status-lg { margin: 22px 0 0; font-size: .74rem; }
.phones { list-style: none; padding: 0; margin: 30px 0 0; display: grid; gap: 10px; }
.phones a {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 18px 22px; border-radius: var(--r-sm);
  background: rgba(238, 242, 245, .06); border: 1px solid var(--line-dark);
  text-decoration: none;
  transition: background-color .25s, border-color .25s, transform .25s var(--ease);
}
.phones a:hover { background: rgba(232, 67, 46, .14); border-color: rgba(232, 67, 46, .5); transform: translateX(4px); }
.phones-k { font: 500 .66rem/1.3 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--acciaio); }
.phones-v { font: 800 clamp(1.25rem, 2.6vw, 1.8rem)/1 var(--f-display); font-stretch: 118%; letter-spacing: -.01em; white-space: nowrap; }
.facts { margin: 32px 0 0; display: grid; gap: 18px; }
.facts dt { font: 500 .66rem/1.3 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--acciaio); }
.facts dd { margin: 4px 0 0; color: rgba(238, 242, 245, .88); }
.facts .inline-link { color: #8DBDF5; }
.sede { position: relative; display: block; margin-top: 32px; border-radius: var(--r); overflow: hidden; text-decoration: none; }
.sede img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform .8s var(--ease); }
.sede:hover img { transform: scale(1.04); }
.sede-cta {
  position: absolute; left: 14px; bottom: 14px;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px; border-radius: 999px;
  background: var(--bianco); color: var(--navy); font-weight: 600; font-size: .9rem;
}
.sede-cta svg { width: 16px; height: 16px; }

.form {
  background: var(--bianco); color: var(--ink);
  border-radius: calc(var(--r) + 6px);
  padding: clamp(24px, 4vw, 44px);
  box-shadow: 0 40px 90px -40px rgba(0, 0, 0, .7);
}
.form-title { margin: 0; font: 800 clamp(1.6rem, 3vw, 2.2rem)/1 var(--f-display); font-stretch: 120%; letter-spacing: -.02em; text-transform: uppercase; }
.form-sub { margin: 10px 0 26px; color: var(--muted); }
.form fieldset { border: 0; padding: 0; margin: 0 0 22px; }
.form legend { padding: 0; margin-bottom: 10px; font-weight: 600; font-size: .95rem; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips label { position: relative; }
.chips input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chips span {
  display: inline-block; padding: 9px 15px; border-radius: 999px;
  border: 1.5px solid var(--line); font-size: .9rem; font-weight: 500;
  transition: background-color .2s, border-color .2s, color .2s;
}
.chips label:hover span { border-color: var(--ink); }
.chips input:checked + span { background: var(--navy); border-color: var(--navy); color: var(--bianco); }
.chips .chip-urgent input:checked + span { background: var(--fiamma); border-color: var(--fiamma); }
.chips input:focus-visible + span { outline: 3px solid var(--blu); outline-offset: 2px; }

.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: grid; gap: 6px; }
.field-full { grid-column: 1 / -1; }
.field > span { font-weight: 600; font-size: .9rem; }
.field i { font-style: normal; font-weight: 400; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 50px; padding: 12px 14px;
  border: 1.5px solid var(--line); border-radius: var(--r-sm);
  background: var(--carta); font-size: 1rem;
  transition: border-color .2s, background-color .2s, box-shadow .2s;
}
.field textarea { resize: vertical; min-height: 92px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 0; border-color: var(--blu); background: var(--bianco); box-shadow: 0 0 0 4px rgba(31, 111, 209, .15); }
.err { display: none; font-style: normal; font-size: .82rem; color: #C42E1B; }
.field.is-invalid input { border-color: #C42E1B; }
.field.is-invalid .err, .err-consent.is-shown { display: block; }
.consent { display: flex; gap: 12px; align-items: flex-start; margin-top: 20px; font-size: .88rem; color: var(--muted); cursor: pointer; }
.consent input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--blu); flex: none; }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.form-actions .btn-wa { flex: 1 1 240px; }
.form-done { margin: 18px 0 0; padding: 14px 16px; border-radius: var(--r-sm); background: rgba(31, 168, 85, .1); color: #146C38; font-weight: 500; }

/* ---------- Footer ---------- */
.footer { background: #07121F; color: rgba(238, 242, 245, .72); padding: 56px 0 28px; font-size: .92rem; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 32px; padding-bottom: 32px; border-bottom: 1px solid var(--line-dark); }
.footer .brand { color: var(--carta); }
.footer-claim { margin: 14px 0 0; max-width: 30ch; }
.footer-legal { margin: 0; display: grid; gap: 8px; }
.footer-legal div { display: flex; gap: 10px; }
.footer-legal dt { font: 500 .66rem/1.9 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--acciaio); min-width: 52px; }
.footer-legal dd { margin: 0; }
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { color: var(--bianco); text-decoration: underline; }
.footer-copy { margin: 24px auto 0; font-size: .8rem; color: var(--acciaio); }

/* ---------- Dock mobile ---------- */
.dock { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .nav { display: none; }
  .menu-btn {
    display: grid; place-items: center;
    width: 44px; height: 44px; border-radius: 50%;
    border: 1px solid var(--line-dark); background: transparent; cursor: pointer;
  }
  .menu-bars, .menu-bars::before, .menu-bars::after { display: block; width: 18px; height: 2px; background: currentColor; border-radius: 2px; transition: transform .3s var(--ease), background-color .2s; }
  .menu-bars { position: relative; }
  .menu-bars::before, .menu-bars::after { content: ""; position: absolute; left: 0; }
  .menu-bars::before { top: -6px; }
  .menu-bars::after { top: 6px; }
  .menu-open .menu-bars { background: transparent; }
  .menu-open .menu-bars::before { transform: translateY(6px) rotate(45deg); }
  .menu-open .menu-bars::after { transform: translateY(-6px) rotate(-45deg); }
  .nav + .header-actions { margin-left: auto; }
  .menu-open body { overflow: hidden; }
  .menu-open .nav {
    display: flex; flex-direction: column; gap: 0;
    position: fixed; top: var(--header-h); left: 0; right: 0;
    height: calc(100dvh - var(--header-h)); margin: 0;
    padding: 12px var(--gutter) calc(24px + env(safe-area-inset-bottom));
    background: var(--navy); overflow-y: auto;
    animation: menu-in .3s var(--ease);
  }
  @keyframes menu-in { from { opacity: 0; transform: translateY(-8px); } }
  .menu-open .nav a { padding: 18px 4px; font-size: 1.35rem; font-weight: 600; border-radius: 0; border-bottom: 1px solid var(--line-dark); color: var(--carta); }
  .menu-open .nav .nav-call {
    display: flex; margin-top: 28px; border: 0; border-radius: 999px;
    padding: 16px 22px; font-size: 1.05rem; color: var(--bianco);
  }
  /* header pieno (niente backdrop-filter) a menu aperto: il filtro romperebbe il position: fixed del pannello */
  .menu-open .site-header, .menu-open .site-header.is-solid { background: var(--navy); -webkit-backdrop-filter: none; backdrop-filter: none; }
}

@media (max-width: 900px) {
  :root { --header-h: 64px; }
  .header-actions .status { display: none; }
  .film-head, .hero-grid, .thermo, .values-grid, .about-grid, .faq-grid, .contact-grid { grid-template-columns: 1fr; }
  .hero-media { max-width: 520px; }
  .hero-media img { aspect-ratio: 4 / 3.6; }
  .readout { left: 14px; bottom: 14px; }
  .values-list { grid-template-columns: 1fr 1fr; }
  .panels { min-height: 0; }
  .about-media { max-width: 460px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > div:first-child { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  body { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
  .btn-call.btn-sm span { display: none; }
  .btn-call.btn-sm { width: 44px; height: 44px; min-height: 44px; padding: 0; gap: 0; flex: none; }
  .header-actions { gap: 10px; }
  .menu-btn { flex: none; color: var(--carta); }
  .hero-ctas .btn, .film-side .btn { width: 100%; }
  .player-label { font-size: .95rem; }
  .proof { gap: 14px 24px; }
  .values-list { grid-template-columns: 1fr; }
  .fields { grid-template-columns: 1fr; }
  .works-head { align-items: start; flex-direction: column; }
  .works-nav { display: none; }
  .work { height: 360px; }

  /* termostato: i pulsanti vanno sotto il quadrante */
  .dial-wrap { aspect-ratio: auto; max-width: 360px; }
  .dial { position: relative; inset: auto; width: 82%; aspect-ratio: 1; margin: 6% auto 0; }
  .dial-stops { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 28px; }
  .dial-stops li { position: static; transform: none; }
  .dial-stops button { transform: none; width: 100%; white-space: normal; padding: 11px 12px; font-size: .85rem; min-height: 46px; }

  .dock {
    display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px;
    position: fixed; z-index: 90; left: 0; right: 0; bottom: 0;
    padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
    background: rgba(11, 27, 46, .94);
    -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
    border-top: 1px solid var(--line-dark);
    transform: translateY(110%); transition: transform .4s var(--ease);
  }
  .dock.is-visible { transform: none; }
  .dock a {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    min-height: 52px; border-radius: 14px;
    font-size: .74rem; font-weight: 600; text-decoration: none; color: var(--carta);
    background: rgba(238, 242, 245, .07);
  }
  .dock svg { width: 20px; height: 20px; }
  .dock .dock-call { background: var(--fiamma-btn); }
  .dock .dock-wa { background: var(--verde-wa); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
