html { color-scheme: light; }
body { margin: 0; }
img { max-width: 100%; }
[hidden] { display: none !important; }
footer a { color: inherit; }
/* Layout: scheda tecnica di cantiere. Home con offerta in evidenza e servizi a tutta larghezza;
     quattro sottopagine (hash) con foto intere, guida alla scelta e richiesta di sopralluogo. */
  :root {
    --bg: #FFFFFF;
    --surface: #FFFFFF;
    --fg: #16303F;
    --muted: #4F6572;
    --line: #D6E3EC;
    --heat: #C94A12;
    --on-heat: #FFFFFF;
    --cool: #1B6FA8;
    --sun: #8A5A00;
    --sun-bright: #F5B82E;
    --tint: #EAF4FB;
    --teal: #0F766E;
    color-scheme: light;
    --font-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
    --font-body: "Public Sans", "Segoe UI", system-ui, sans-serif;
    --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  }
  /* Look chiaro e unico: il sito resta luminoso anche se il telefono è in modalità scura. */

  * { box-sizing: border-box; }
  body {
    background: var(--bg);
    color: var(--fg);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    padding-left: max(16px, env(safe-area-inset-left, 0px));
    padding-right: max(16px, env(safe-area-inset-right, 0px));
    padding-block: 0;
  }
  .wrap { max-width: 1080px; margin-inline: auto; }
  h1, h2, h3 { font-family: var(--font-display); line-height: 1.1; text-wrap: balance; margin: 0; letter-spacing: -0.01em; }
  p { margin: 0; }
  a { color: inherit; }
  img { max-width: 100%; }
  :focus-visible { outline: 3px solid var(--cool); outline-offset: 3px; border-radius: 2px; }
  .mono { font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }

  /* Header */
  header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding-block: 18px; border-bottom: 1px solid var(--line); }
  .brand { display: flex; align-items: baseline; gap: 10px; text-decoration: none; }
  .brand strong { font-family: var(--font-display); font-size: 1.4rem; font-weight: 700; letter-spacing: -0.02em; }
  nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; font-size: 0.95rem; }
  nav a { text-decoration: none; color: var(--muted); padding-block: 4px; }
  nav a:hover { color: var(--fg); }
  nav a[aria-current="page"] { color: var(--fg); box-shadow: inset 0 -2px 0 var(--heat); }
  .btn { display: inline-block; background: var(--heat); color: var(--on-heat); padding: 12px 20px; border-radius: 4px; font-weight: 600; text-decoration: none; }
  .btn:hover { filter: brightness(1.08); }
  .btn.ghost { background: transparent; color: var(--fg); border: 1.5px solid var(--fg); padding: 10.5px 20px; }
  .btn.navy { background: var(--fg); color: #FFFFFF; }
  nav .btn { color: var(--on-heat); padding: 9px 16px; }
  nav .btn:hover { color: var(--on-heat); }
  @media (max-width: 760px) {
    nav { width: 100%; flex-wrap: nowrap; overflow-x: auto; gap: 18px; padding-bottom: 6px; }
    nav a { white-space: nowrap; flex: none; }
  }

  /* Hero */
  .hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 40px; align-items: center; padding-block: 56px 48px; }
  .hero h1 { font-size: clamp(2.1rem, 5.2vw, 3.6rem); font-weight: 700; }
  .hero h1 em { font-style: normal; color: var(--heat); }
  .hero .lead { margin-top: 20px; font-size: 1.12rem; color: var(--muted); max-width: 34em; }
  .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
  .hero figure { margin: 0; min-width: 0; background: var(--tint); padding: 20px; }
  .hero svg { width: 100%; height: auto; display: block; }
  .hero figcaption { margin-top: 8px; }
  @media (max-width: 800px) { .hero { grid-template-columns: minmax(0, 1fr); gap: 28px; padding-block: 36px 32px; } }

  .facts { display: flex; flex-wrap: wrap; gap: 8px 28px; padding-block: 14px; border-block: 1px solid var(--line); }

  /* Sections */
  section { padding-block: 64px 8px; }
  .sec-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; margin-bottom: 28px; }
  .sec-head h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); font-weight: 700; }
  .sec-head p { max-width: 32em; color: var(--muted); }

  /* Offerta */
  .offer { position: relative; overflow: hidden; isolation: isolate; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 32px; align-items: center; padding: 40px;
    background: linear-gradient(125deg, #FFEBAE 0%, #FFCB5C 48%, #FF9A3D 100%); color: var(--fg); border-radius: 6px; box-shadow: 0 22px 44px -26px rgba(201, 74, 18, 0.6); }
  .offer::before { content: ""; position: absolute; z-index: -1; right: -110px; top: -110px; width: 380px; height: 380px; border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.95) 0 26%, rgba(255, 255, 255, 0.38) 27% 52%, rgba(255, 255, 255, 0) 70%); }
  .offer::after { content: ""; position: absolute; z-index: -1; inset: 0;
    background-image: linear-gradient(rgba(22, 48, 63, 0.08) 1px, transparent 1px), linear-gradient(90deg, rgba(22, 48, 63, 0.08) 1px, transparent 1px);
    background-size: 34px 34px; -webkit-mask-image: linear-gradient(100deg, transparent 30%, #000 100%); mask-image: linear-gradient(100deg, transparent 30%, #000 100%); }
  @media (max-width: 760px) { .offer { grid-template-columns: minmax(0, 1fr); padding: 26px 20px; gap: 24px; } }
  .badge { display: inline-block; background: var(--fg); color: #FFD36B; padding: 6px 14px; border-radius: 999px; font-family: var(--font-mono); font-size: 0.76rem; letter-spacing: 0.08em; text-transform: uppercase; }
  .offer h3 { font-size: clamp(1.4rem, 3vw, 1.9rem); margin-top: 16px; }
  .price { font-family: var(--font-display); font-size: clamp(3.2rem, 9vw, 5.2rem); font-weight: 700; line-height: 1; margin-top: 14px; font-variant-numeric: tabular-nums; letter-spacing: -0.03em; }
  .valid { margin-top: 12px; color: var(--fg); font-weight: 500; }
  .offer .note { margin-top: 8px; font-size: 0.95rem; color: #2A4453; }
  .offer .actions { margin-top: 24px; }
  .spec { margin: 0; display: grid; align-content: start; background: rgba(255, 255, 255, 0.74); padding: 6px 22px; border-radius: 4px; }
  .spec div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 14px 0; border-bottom: 1px solid rgba(22, 48, 63, 0.16); }
  .spec div:last-child { border-bottom: none; }
  .spec dt { color: #35505F; }
  .spec dd { margin: 0; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }

  /* Servizi in home */
  .services { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .svc { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); background: var(--surface); border: 1px solid var(--line); border-left: 6px solid var(--accent); min-width: 0; }
  .svc.heat { --accent: var(--heat); --accent-text: var(--heat); }
  .svc.pv { --accent: var(--sun-bright); --accent-text: var(--sun); }
  .svc.st { --accent: var(--cool); --accent-text: var(--cool); }
  .svc.aq { --accent: var(--teal); --accent-text: var(--teal); }
  .svc .pic { display: flex; background: var(--tint); min-width: 0; }
  .svc .pic img { display: block; width: 100%; height: 100%; object-fit: cover; }
  .svc .body { padding: 24px 28px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
  .svc h3 { font-size: 1.5rem; }
  .svc .tag { color: var(--accent-text); }
  .svc p { color: var(--muted); }
  .svc ul { margin: 0; padding: 12px 0 0; list-style: none; display: grid; gap: 6px; border-top: 1px solid var(--line); }
  .svc li { padding-left: 18px; position: relative; font-size: 0.97rem; }
  .svc li::before { content: ""; position: absolute; left: 0; top: 0.72em; width: 8px; height: 2px; background: var(--accent); }
  .more { margin-top: auto; padding-top: 4px; font-weight: 600; text-decoration: none; width: fit-content; border-bottom: 2px solid var(--accent); }
  @media (max-width: 760px) {
    .svc { grid-template-columns: minmax(0, 1fr); border-left: 1px solid var(--line); border-top: 6px solid var(--accent); }
    .svc .body { padding: 20px; }
    .svc .pic img { height: auto; }
  }

  /* Sottopagine */
  .crumb { display: inline-block; padding-top: 28px; text-decoration: none; color: var(--muted); font-size: 0.95rem; }
  .crumb:hover { color: var(--fg); }
  .page-head { padding-block: 16px 8px; max-width: 46em; }
  .page-head h1 { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 700; }
  .page-head .lead { margin-top: 16px; color: var(--muted); font-size: 1.1rem; }
  .sub { font-family: var(--font-display); font-size: 1.35rem; font-weight: 700; margin-bottom: 16px; }

  /* Foto intere, senza ritagli */
  .gallery { columns: 3 240px; column-gap: 16px; }
  .gallery.two { columns: 2 280px; }
  .gallery.one { max-width: 560px; }
  .shot { break-inside: avoid; margin: 0 0 16px; display: block; }
  .shot-btn { padding: 0; border: 0; background: var(--tint); cursor: zoom-in; display: block; width: 100%; }
  .shot img { display: block; width: 100%; height: auto; }
  .shot figcaption { font-size: 0.92rem; color: var(--muted); margin-top: 6px; }
  .lb { position: fixed; inset: 0; z-index: 20; background: rgba(12, 24, 33, 0.94); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
    padding-top: max(16px, env(safe-area-inset-top, 0px)); padding-bottom: max(16px, env(safe-area-inset-bottom, 0px));
    padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  .lb img { max-width: 100%; max-height: 74vh; object-fit: contain; display: block; }
  .lb p { color: #FFFFFF; text-align: center; }
  .lb-row { display: flex; gap: 12px; }
  .lb button { font: inherit; font-weight: 600; background: #FFFFFF; color: #16303F; border: 0; border-radius: 4px; padding: 10px 18px; cursor: pointer; }

  /* Guide */
  .types { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
  @media (max-width: 860px) { .types { grid-template-columns: minmax(0, 1fr); } }
  .type { background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--accent); padding: 22px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
  .type.a { --accent: var(--heat); --accent-text: var(--heat); }
  .type.b { --accent: var(--cool); --accent-text: var(--cool); }
  .type.c { --accent: var(--teal); --accent-text: var(--teal); }
  .type .tag { color: var(--accent-text); }
  .type h3 { font-size: 1.35rem; }
  .type p { color: var(--muted); font-size: 0.97rem; }
  .type p b { color: var(--fg); font-weight: 600; }
  .tips { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 32px; }
  @media (max-width: 760px) { .tips { grid-template-columns: minmax(0, 1fr); } }
  .tip { border-top: 1.5px solid var(--fg); padding-top: 12px; min-width: 0; }
  .tip h3 { font-size: 1.15rem; margin-bottom: 6px; }
  .tip p { color: var(--muted); font-size: 0.97rem; }
  .callout { margin-top: 24px; background: var(--tint); padding: 16px 20px; border-left: 4px solid var(--cool); font-size: 0.95rem; }
  .split { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 32px; align-items: start; }
  @media (max-width: 760px) { .split { grid-template-columns: minmax(0, 1fr); } }
  .split .tips { grid-template-columns: minmax(0, 1fr); }
  .diagrams { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-bottom: 24px; }
  @media (max-width: 760px) { .diagrams { grid-template-columns: minmax(0, 1fr); } }
  .diagrams figure { margin: 0; background: var(--tint); padding: 16px; min-width: 0; }
  .diagrams svg { width: 100%; height: auto; display: block; }
  .diagrams h3 { font-size: 1.2rem; margin-bottom: 8px; }
  .diagrams figcaption { margin-top: 8px; font-size: 0.92rem; color: var(--muted); }
  .table-wrap { overflow-x: auto; border: 1px solid var(--line); }
  table { border-collapse: collapse; width: 100%; min-width: 600px; font-size: 0.95rem; }
  th, td { text-align: left; vertical-align: top; padding: 12px 16px; border-bottom: 1px solid var(--line); }
  thead th { background: var(--tint); font-family: var(--font-display); font-size: 1.05rem; }
  tbody th { width: 22%; font-weight: 600; }
  tbody tr:last-child th, tbody tr:last-child td { border-bottom: none; }
  .cta-band { margin-top: 64px; background: var(--tint); border: 1px solid var(--line); padding: 28px 32px; display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; justify-content: space-between; }
  .cta-band h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); }
  .cta-band p { color: var(--muted); margin-top: 6px; }
  .more-links { display: flex; flex-wrap: wrap; gap: 10px 14px; margin-top: 20px; }
  .more-links .btn { padding: 9px 16px; }

  /* Assistenza */
  .brands { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); background: var(--surface); border: 1px solid var(--line); }
  .brand-tile { padding: 28px 24px; display: flex; flex-direction: column; gap: 6px; border-right: 1px solid var(--line); min-width: 0; }
  .brand-tile:last-child { border-right: none; }
  .brand-tile strong { font-family: var(--font-display); font-size: clamp(1.7rem, 4vw, 2.6rem); font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
  @media (max-width: 640px) {
    .brands { grid-template-columns: minmax(0, 1fr); }
    .brand-tile { border-right: none; border-bottom: 1px solid var(--line); padding: 20px; }
    .brand-tile:last-child { border-bottom: none; }
  }
  .assist { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 20px; }
  @media (max-width: 760px) { .assist { grid-template-columns: minmax(0, 1fr); } }
  .assist div { border-top: 1.5px solid var(--fg); padding-top: 12px; }
  .assist h3 { font-size: 1.15rem; margin-bottom: 6px; }
  .assist p { color: var(--muted); font-size: 0.97rem; }

  /* Stima produzione */
  .calc { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 32px; background: var(--surface); border: 1px solid var(--line); padding: 28px; }
  @media (max-width: 820px) { .calc { grid-template-columns: minmax(0, 1fr); padding: 20px; } }
  .calc label { display: block; font-weight: 600; margin-bottom: 10px; }
  .calc input[type="range"] { width: 100%; accent-color: var(--heat); }
  .scale { display: flex; justify-content: space-between; margin-top: 4px; }
  .readout { display: flex; flex-wrap: wrap; gap: 20px 32px; margin-top: 24px; }
  .readout div { min-width: 0; }
  .big { font-family: var(--font-display); font-size: clamp(1.9rem, 4vw, 2.7rem); font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
  .unit { font-family: var(--font-mono); font-size: 0.85rem; color: var(--muted); }
  .note { margin-top: 20px; font-size: 0.88rem; color: var(--muted); }
  .bars { display: flex; align-items: flex-end; gap: 6px; height: 170px; border-bottom: 1.5px solid var(--fg); }
  .bar { flex: 1; min-width: 0; display: flex; align-items: flex-end; height: 100%; }
  .bar span { display: block; width: 100%; background: var(--sun-bright); height: 0; transition: height 0.25s ease; }
  @media (prefers-reduced-motion: reduce) { .bar span { transition: none; } }
  .months { display: flex; gap: 6px; margin-top: 6px; }
  .months span { flex: 1; text-align: center; font-family: var(--font-mono); font-size: 0.72rem; color: var(--muted); }
  .chart-title { margin-bottom: 12px; }

  /* Come lavoriamo */
  .steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; counter-reset: step; border-top: 1.5px solid var(--fg); }
  .steps li { counter-increment: step; padding: 18px 16px 8px 0; display: flex; flex-direction: column; gap: 6px; }
  .steps li::before { content: "Fase " counter(step); font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--heat); }
  .steps h3 { font-size: 1.1rem; }
  .steps p { font-size: 0.93rem; color: var(--muted); }
  @media (max-width: 860px) {
    .steps { grid-template-columns: minmax(0, 1fr); border-top: none; }
    .steps li { border-top: 1.5px solid var(--fg); padding-right: 0; }
  }

  /* Contatti */
  .contact { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; background: var(--tint); border: 1px solid var(--line); padding: 32px; }
  @media (max-width: 760px) { .contact { grid-template-columns: minmax(0, 1fr); padding: 22px; } }
  .contact h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); }
  .contact .lead { margin-top: 14px; color: var(--muted); }
  .contact dl { margin: 0; display: grid; gap: 16px; align-content: start; }
  .contact dt { margin-bottom: 2px; }
  .contact dd { margin: 0; font-size: 1.1rem; font-weight: 500; overflow-wrap: anywhere; }
  .contact dd a { text-decoration-thickness: 1px; text-underline-offset: 3px; }

  footer { margin-top: 64px; padding-block: 24px 40px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }
  footer .mono { text-transform: none; letter-spacing: 0.02em; }

  /* Schemi */
  .d-line { fill: none; stroke: var(--fg); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
  .d-soft { fill: var(--surface); stroke: var(--fg); stroke-width: 2; stroke-linejoin: round; }
  .d-heat { fill: none; stroke: var(--heat); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
  .d-elec { fill: none; stroke: var(--sun-bright); stroke-width: 2.5; stroke-dasharray: 6 5; stroke-linecap: round; stroke-linejoin: round; }
  .d-pv { fill: var(--cool); stroke: var(--fg); stroke-width: 1.5; }
  .d-sun { fill: var(--sun-bright); }
  .d-label { font-family: var(--font-mono); font-size: 12px; fill: var(--fg); letter-spacing: 0.04em; }

  /* Modulo di richiesta sopralluogo */
  .contact .info { margin-top: 24px; }
  .richiesta { display: grid; gap: 14px; align-content: start; background: #FFFFFF; border: 1px solid var(--line); border-radius: 4px; padding: 24px; position: relative; }
  .richiesta .campi { display: grid; gap: 14px; }
  .richiesta .riga2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
  @media (max-width: 520px) { .richiesta .riga2 { grid-template-columns: minmax(0, 1fr); } .richiesta { padding: 18px; } }
  .richiesta label { display: grid; gap: 6px; font-weight: 600; font-size: 0.95rem; }
  .richiesta .opz { font-weight: 400; color: var(--muted); }
  .richiesta input, .richiesta select, .richiesta textarea { font: inherit; font-weight: 400; color: var(--fg); background: #FFFFFF; border: 1.5px solid #9FB4C2; border-radius: 4px; padding: 11px 12px; width: 100%; min-width: 0; }
  .richiesta textarea { min-height: 96px; resize: vertical; }
  .richiesta input:focus, .richiesta select:focus, .richiesta textarea:focus { outline: 2px solid var(--cool); outline-offset: 1px; border-color: var(--cool); }
  .richiesta button.btn { border: 0; cursor: pointer; font: inherit; font-weight: 600; justify-self: start; }
  .richiesta button.btn:disabled { opacity: 0.6; cursor: wait; }
  .richiesta .nota { font-size: 0.85rem; color: var(--muted); margin: 0; }
  .richiesta .nota a { color: inherit; }
  .richiesta .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
  .esito { margin: 0; padding: 14px 16px; border-left: 4px solid var(--teal); background: var(--tint); font-weight: 500; }
  .esito.errore { border-left-color: var(--heat); }
  .esito a { color: inherit; }
  /* Pagina privacy */
  .testo { max-width: 46rem; }
  .testo h2 { font-size: 1.25rem; margin: 28px 0 8px; }
  .testo p, .testo li { color: var(--fg); }
  .testo ul { padding-left: 1.2em; }
