/* ==========================================================================
   Elettrotech S.r.l. — foglio di stile principale
   Palette ripresa dal logo: arancio #EB671C + grafite.
   ========================================================================== */

/* ---------- Font (self-hosted: nessuna chiamata a Google Fonts) ---------- */
@font-face { font-family: "Barlow"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/barlow-400.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 500; font-style: normal; font-display: swap; src: url("../fonts/barlow-500.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 600; font-style: normal; font-display: swap; src: url("../fonts/barlow-600.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 700; font-style: normal; font-display: swap; src: url("../fonts/barlow-700.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 600; font-style: normal; font-display: swap; src: url("../fonts/barlow-condensed-600.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 700; font-style: normal; font-display: swap; src: url("../fonts/barlow-condensed-700.woff2") format("woff2"); }

:root {
  --orange: #eb671c;
  --orange-hover: #f47e3a;
  --orange-ink: #b84a0a;      /* arancio per testo su fondo chiaro (AA) */
  --orange-light: #f28a4b;    /* arancio per testo su fondo scuro (AA) */
  --orange-soft: #fdeee4;

  --ink: #0e1621;
  --ink-2: #152030;
  --ink-3: #1f2c3d;
  --text: #1b2430;
  --muted: #5a6472;
  --muted-dark: #a9b3c1;
  --line: #e5e1db;
  --line-dark: rgba(255, 255, 255, 0.12);
  --paper: #f6f4f0;
  --white: #ffffff;
  --success: #1f7a4d;
  --error: #b3261e;

  --font: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-display: "Barlow Condensed", "Barlow", "Arial Narrow", system-ui, sans-serif;

  --radius: 16px;
  --radius-sm: 10px;
  /* Profondità a strati (scelta del cliente): schede appoggiate, pannelli sollevati, finestre sospese */
  --shadow-sm: 0 1px 2px rgba(14, 22, 33, 0.06), 0 4px 14px rgba(14, 22, 33, 0.07);
  --shadow-md: 0 2px 4px rgba(14, 22, 33, 0.05), 0 12px 32px rgba(14, 22, 33, 0.11);
  --shadow-lg: 0 24px 60px rgba(14, 22, 33, 0.18);

  --container: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  --header-h: 76px;
  --section: clamp(64px, 9vw, 120px);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);

  color-scheme: light;
}

/* ---------- Reset essenziale ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; scroll-padding-top: 16px; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  caret-color: var(--orange-ink);
}
img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { margin: 0 0 0.5em; line-height: 1.1; color: var(--ink); text-wrap: balance; }
p { margin: 0 0 1em; text-wrap: pretty; }
ul, ol { margin: 0 0 1em; padding-left: 1.25em; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--orange); color: var(--ink); }
html { scrollbar-color: #b9b2a8 var(--paper); }
.tel { font-variant-numeric: tabular-nums; white-space: nowrap; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 2000;
  background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 8px; text-decoration: none; font-weight: 600;
}
.skip-link:focus { top: 12px; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section); }
.section--paper { background: var(--paper); }
.section--dark { background: var(--ink); color: #e8ecf1; }
.section--dark h2, .section--dark h3 { color: #fff; }

/* ---------- Tipografia ---------- */
.display, h1, .h1 {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.005em;
}
h1, .h1 { font-size: clamp(2.5rem, 6.2vw, 4.75rem); line-height: 0.98; }
h2, .h2 {
  font-family: var(--font-display); font-weight: 700; text-transform: uppercase;
  font-size: clamp(2rem, 4.2vw, 3.25rem); line-height: 1.02; letter-spacing: 0.005em;
}
h3, .h3 { font-size: 1.3rem; font-weight: 700; line-height: 1.25; }
.lead { font-size: clamp(1.1rem, 1.6vw, 1.3rem); line-height: 1.6; color: var(--muted); max-width: 62ch; }
.section--dark .lead, .hero .lead, .page-hero .lead { color: var(--muted-dark); }
.text-orange { color: var(--orange-ink); }
.section--dark .text-orange, .hero .text-orange, .page-hero .text-orange { color: var(--orange); }

.section-head { max-width: 760px; margin-bottom: clamp(36px, 5vw, 56px); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head--center .lead { margin-inline: auto; }
.section-head--split { max-width: none; display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 24px; }
.section-head--split > div { max-width: 720px; }

/* ---------- Pulsanti ---------- */
.btn {
  --btn-bg: var(--orange); --btn-fg: var(--ink); --btn-bd: var(--orange);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 12px 26px;
  border: 2px solid var(--btn-bd); border-radius: 999px;
  background: var(--btn-bg); color: var(--btn-fg);
  font-weight: 700; font-size: 1rem; letter-spacing: 0.01em; text-decoration: none; line-height: 1.2;
  transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease, box-shadow 150ms ease, transform 160ms var(--ease);
}
.btn svg { width: 20px; height: 20px; flex: none; }
@media (hover: hover) and (pointer: fine) { .btn:hover { --btn-bg: var(--orange-hover); --btn-bd: var(--orange-hover); transform: translateY(-1px); box-shadow: 0 10px 24px rgba(235, 103, 28, 0.28); } }
.btn:active { transform: scale(0.97); }
.btn--dark { --btn-bg: var(--ink); --btn-fg: #fff; --btn-bd: var(--ink); }
@media (hover: hover) and (pointer: fine) { .btn--dark:hover { --btn-bg: var(--ink-3); --btn-bd: var(--ink-3); box-shadow: var(--shadow-md); } }
.btn--ghost { --btn-bg: transparent; --btn-fg: #fff; --btn-bd: rgba(255, 255, 255, 0.5); }
@media (hover: hover) and (pointer: fine) { .btn--ghost:hover { --btn-bg: #fff; --btn-fg: var(--ink); --btn-bd: #fff; box-shadow: none; } }
.btn--outline { --btn-bg: transparent; --btn-fg: var(--ink); --btn-bd: var(--ink); }
@media (hover: hover) and (pointer: fine) { .btn--outline:hover { --btn-bg: var(--ink); --btn-fg: #fff; --btn-bd: var(--ink); box-shadow: none; } }
.btn--sm { min-height: 44px; padding: 8px 20px; font-size: 0.95rem; }
.btn--block { width: 100%; }
.btn[disabled], .btn[aria-busy="true"] { opacity: 0.7; pointer-events: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

.link-arrow {
  display: inline-flex; align-items: center; gap: 8px; font-weight: 700; text-decoration: none; color: var(--orange-ink);
}
.link-arrow svg { width: 18px; height: 18px; transition: transform 0.2s var(--ease); }
@media (hover: hover) and (pointer: fine) { .link-arrow:hover svg { transform: translateX(4px); } }

.icon { width: 24px; height: 24px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Header ---------- */
/* Header statico (scelta del cliente: non resta fisso durante lo scorrimento) */
.site-header {
  position: relative; z-index: 100;
  background: #fff; border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 24px; height: var(--header-h); }
.brand { display: block; flex: none; margin-right: auto; }
.brand img { width: auto; height: 50px; }

.main-nav { display: flex; align-items: center; }
.nav-list { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-list > li { position: relative; }
.nav-link {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 14px; border-radius: 999px;
  font-weight: 600; font-size: 1rem; text-decoration: none; color: var(--ink);
  background: none; border: 0;
  transition: background-color 150ms var(--ease), color 150ms var(--ease);
}
@media (hover: hover) and (pointer: fine) { .nav-link:hover { background: var(--paper); } }
.nav-link[aria-current="page"], .nav-link.is-active { color: var(--orange-ink); }
.nav-item-split { display: flex; align-items: center; }
.nav-item-split .nav-link { padding-right: 4px; }
.sub-toggle {
  display: inline-grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: 50%; background: none; color: var(--ink);
  transition: background-color 150ms var(--ease), transform 160ms var(--ease);
}
@media (hover: hover) and (pointer: fine) { .sub-toggle:hover { background: var(--paper); } }
.sub-toggle .icon { width: 18px; height: 18px; transition: transform 0.2s var(--ease); }
.sub-toggle[aria-expanded="true"] .icon { transform: rotate(180deg); }

/* Il pannello nasce dalla voce "Servizi" (origine in alto), entra in 180ms ed esce più in fretta */
.sub-menu {
  position: absolute; top: calc(100% + 10px); left: 50%; translate: -50% 0;
  width: min(680px, 90vw); padding: 14px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; transform: scale(0.97); transform-origin: 50% 0;
  transition: opacity 120ms ease-out, transform 120ms ease-out, visibility 0s linear 120ms;
}
.sub-menu::before { content: ""; position: absolute; left: 0; right: 0; top: -14px; height: 14px; }
.sub-menu ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.sub-menu a {
  display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 12px; text-decoration: none;
  transition: background-color 150ms var(--ease);
}
.sub-menu a[aria-current="page"] { background: var(--paper); }
@media (hover: hover) and (pointer: fine) { .sub-menu a:hover { background: var(--paper); } }
.sub-menu .sub-icon {
  display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 10px;
  background: var(--orange-soft); color: var(--orange-ink);
}
.sub-menu .sub-icon .icon { width: 22px; height: 22px; }
.sub-menu strong { display: block; font-size: 0.98rem; color: var(--ink); line-height: 1.3; }
.sub-menu small { display: block; color: var(--muted); font-size: 0.85rem; line-height: 1.35; margin-top: 2px; }
.has-sub:focus-within .sub-menu, .has-sub.is-open .sub-menu {
  opacity: 1; visibility: visible; transform: none;
  transition: opacity 180ms var(--ease), transform 180ms var(--ease), visibility 0s;
}
@media (hover: hover) and (pointer: fine) { .has-sub:hover .sub-menu {
  opacity: 1; visibility: visible; transform: none;
  transition: opacity 180ms var(--ease), transform 180ms var(--ease), visibility 0s;
} }
/* intenzione: passando sopra "Servizi" di sfuggita il pannello non lampeggia */
@media (hover: hover) and (pointer: fine) { .has-sub:hover .sub-menu { transition-delay: 80ms; } }
/* da tastiera il pannello appare subito */
.has-sub:has(:focus-visible) .sub-menu { transition: none; }
/* la freccia segue sempre lo stato reale del pannello */
@media (min-width: 961px) {
  .has-sub:focus-within .sub-toggle .icon { transform: rotate(180deg); }
  @media (hover: hover) and (pointer: fine) { .has-sub:hover .sub-toggle .icon { transform: rotate(180deg); } }
}

.header-actions { display: flex; align-items: center; gap: 14px; }
.header-phone {
  display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); line-height: 1.15;
}
.header-phone .phone-icon {
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%;
  background: var(--orange-soft); color: var(--orange-ink);
}
.header-phone .phone-icon .icon { width: 20px; height: 20px; }
.header-phone small { display: block; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); font-weight: 600; }
.header-phone strong { font-size: 1.05rem; font-weight: 700; white-space: nowrap; }

.nav-toggle {
  display: none; width: 46px; height: 46px; border: 0; border-radius: 12px; background: var(--ink); color: #fff;
  place-items: center;
}
.nav-toggle .icon { width: 24px; height: 24px; }
.nav-toggle .icon-close { display: none; }
.nav-open .nav-toggle .icon-open { display: none; }
.nav-open .nav-toggle .icon-close { display: block; }
.nav-mobile-extra { display: none; }

@media (max-width: 1100px) {
  .header-phone span { display: none; }
}

@media (max-width: 960px) {
  :root { --header-h: 68px; }
  .brand img { height: 42px; }
  .nav-toggle { display: grid; }
  .header-actions .btn { display: none; }
  .header-phone .phone-icon { width: 46px; height: 46px; border-radius: 12px; }
  .main-nav {
    position: fixed; inset: var(--menu-top, var(--header-h)) 0 0 0; z-index: 99;
    display: block; overflow-y: auto; overscroll-behavior: contain;
    background: #fff;
    /* margini anche per la tacca dello schermo e la barra di sistema */
    padding: 12px max(var(--gutter), env(safe-area-inset-right, 0px)) calc(32px + env(safe-area-inset-bottom, 0px)) max(var(--gutter), env(safe-area-inset-left, 0px));
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    /* si chiude più in fretta di come si apre */
    transition: opacity 180ms var(--ease), transform 180ms var(--ease), visibility 0s linear 180ms;
  }
  .nav-open .main-nav { opacity: 1; visibility: visible; transform: none; transition: opacity 250ms var(--ease), transform 250ms var(--ease), visibility 0s; }
  .nav-list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav-list > li { border-bottom: 1px solid var(--line); }
  .nav-link { width: 100%; padding: 18px 4px; border-radius: 0; font-size: 1.2rem; font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.02em; }
  @media (hover: hover) and (pointer: fine) { .nav-link:hover { background: none; } }
  .nav-item-split { justify-content: space-between; }
  .sub-toggle { width: 44px; height: 44px; background: var(--paper); }
  .sub-menu {
    position: static; translate: none; width: auto; padding: 0 0 12px; border: 0; box-shadow: none; border-radius: 0;
    opacity: 1; visibility: visible; transform: none; display: none;
  }
  .has-sub:focus-within .sub-menu { display: none; }
  @media (hover: hover) and (pointer: fine) { .has-sub:hover .sub-menu { display: none; } }
  .has-sub.is-open .sub-menu { display: block; }
  .sub-menu ul { grid-template-columns: 1fr; }
  .sub-menu a { padding: 10px 4px; }
  .sub-menu small { display: none; }
  .nav-mobile-extra { display: grid; gap: 12px; margin-top: 24px; }
  .nav-mobile-extra p { margin: 8px 0 0; color: var(--muted); font-size: 0.95rem; }
  body.nav-open { overflow: hidden; }
}

/* ---------- Hero (home) ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  background: var(--ink); color: #fff;
  padding: clamp(72px, 10vw, 136px) 0 clamp(72px, 9vw, 128px);
}
.hero-media { position: absolute; inset: 0; z-index: -2; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: 30% center; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(14, 22, 33, 0.97) 0%, rgba(14, 22, 33, 0.9) 40%, rgba(14, 22, 33, 0.55) 70%, rgba(14, 22, 33, 0.35) 100%),
    linear-gradient(0deg, rgba(14, 22, 33, 0.6) 0%, rgba(14, 22, 33, 0) 40%);
}
.hero-content { position: relative; max-width: 760px; }
.hero h1 { color: #fff; margin-bottom: 24px; }
.hero .lead { margin-bottom: 32px; font-size: clamp(1.1rem, 1.7vw, 1.3rem); }
.hero-note { margin: 18px 0 0; color: var(--muted-dark); font-size: 0.97rem; }

.hero-circuit {
  position: absolute; right: -40px; bottom: 60px; z-index: -1;
  width: min(720px, 60vw); color: var(--orange); opacity: 0.9; pointer-events: none;
}
/* Il circuito si disegna dall'esterno verso l'interno (1,6 s); ogni nodo si accende
   quando la sua linea arriva. Una sola volta per visita (classe .circuit-seen da consent.js). */
.hero-circuit path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.6s var(--ease) 0.3s forwards; }
.hero-circuit path:nth-child(2), .hero-circuit path:nth-child(4) { animation-delay: 0.42s; }
.hero-circuit path:nth-child(3) { animation-delay: 0.54s; }
.hero-circuit path:nth-child(6) { animation-delay: 0.73s; }
.hero-circuit circle {
  opacity: 0; transform-box: fill-box; transform-origin: center;
  animation: node-in 200ms var(--ease) 1.2s forwards;
}
.hero-circuit circle:nth-child(2), .hero-circuit circle:nth-child(4) { animation-delay: 1.32s; }
.hero-circuit circle:nth-child(3) { animation-delay: 1.44s; }
.hero-circuit circle:nth-child(6) { animation-delay: 1.63s; }
.circuit-seen .hero-circuit path { animation: none; stroke-dashoffset: 0; }
.circuit-seen .hero-circuit circle { animation: none; opacity: 1; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes node-in { from { opacity: 0; transform: scale(0.6); } to { opacity: 1; transform: none; } }

/* Icona in pastiglia, usata solo accanto a un testo (contatti, riquadri) */
.trust-icon {
  display: grid; place-items: center; width: 48px; height: 48px; flex: none; border-radius: 12px;
  background: var(--orange-soft); color: var(--orange-ink);
}

/* ---------- Schema unifilare: Elettrotech -> i quattro tipi di cliente ----------
   Il circuito del logo diventa struttura: una linea principale (sbarra) da cui
   partono le derivazioni verso ogni tipo di cliente, come in uno schema elettrico. */
.bus { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; }
.bus-source {
  display: inline-flex; align-items: center; gap: 12px; margin: 0; padding-right: 0;
  font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; line-height: 26px;
  text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink);
}
.bus-node { width: 16px; height: 16px; border-radius: 50%; background: var(--orange); flex: none; }
.bus-loads {
  --bus-gap: 28px; --drop-x: 7px;
  position: relative; list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 var(--bus-gap);
}
.bus-loads::before {
  content: ""; position: absolute; top: 11.5px; left: 0; height: 3px; background: var(--orange); border-radius: 2px;
  right: calc((100% - 3 * var(--bus-gap)) / 4 - var(--drop-x) - 1.5px);
}
.bus-load { position: relative; padding: 78px 0 0; }
.bus-load::before {
  content: ""; position: absolute; left: var(--drop-x); top: 13px; width: 3px; height: 44px; background: var(--orange);
}
.bus-load::after {
  content: ""; position: absolute; left: calc(var(--drop-x) - 6.5px); top: 52px;
  width: 16px; height: 16px; border-radius: 50%; border: 3px solid var(--orange); background: #fff;
}
.bus-load h3 { font-size: 1.25rem; margin: 0 0 8px; }
.bus-load p { color: var(--muted); font-size: 0.98rem; margin: 0 0 14px; }
.bus-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.bus-links a {
  display: inline-flex; align-items: center; gap: 6px; min-height: 32px;
  font-weight: 600; color: var(--ink); text-decoration: underline; text-decoration-color: rgba(184, 74, 10, 0.45);
  transition: color 0.15s var(--ease), text-decoration-color 0.15s var(--ease);
}
@media (hover: hover) and (pointer: fine) { .bus-links a:hover { color: var(--orange-ink); text-decoration-color: currentColor; } }

/* ---------- Griglia servizi (bento) ---------- */
.services-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: minmax(270px, auto); gap: 16px;
}
.service-card {
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 26px; border-radius: var(--radius);
  background: var(--ink); color: #fff; text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: transform 200ms var(--ease), box-shadow 200ms var(--ease);
}
.service-card > img {
  position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover;
  transition: transform 300ms var(--ease);
}
.service-card::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(14, 22, 33, 0.1) 0%, rgba(14, 22, 33, 0.45) 45%, rgba(14, 22, 33, 0.92) 100%);
}
@media (hover: hover) and (pointer: fine) { .service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); } }
@media (hover: hover) and (pointer: fine) { .service-card:hover > img { transform: scale(1.06); } }
.service-card h3 {
  font-family: var(--font-display); text-transform: uppercase; font-size: clamp(1.45rem, 2vw, 1.75rem);
  line-height: 1.05; color: #fff; margin: 0 0 8px;
}
.service-card p { margin: 0 0 12px; color: #d3dae3; font-size: 0.97rem; line-height: 1.5; max-width: 46ch; }
.service-card .card-more {
  display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 0.95rem; color: var(--orange-light);
}
.service-card .card-more .icon { width: 18px; height: 18px; transition: transform 0.2s var(--ease); }
@media (hover: hover) and (pointer: fine) { .service-card:hover .card-more .icon { transform: translateX(4px); } }
.service-card.is-feature { grid-column: span 2; grid-row: span 2; padding: 34px; }
.service-card.is-feature h3 { font-size: clamp(2rem, 3.2vw, 2.75rem); }
.service-card.is-feature p { font-size: 1.08rem; }
.service-card.is-wide { grid-column: span 2; }
.service-card.is-cta { background: var(--orange); color: var(--ink); }
.service-card.is-cta::before { display: none; }
.service-card.is-cta h3 { color: var(--ink); }
.service-card.is-cta p { color: var(--ink); }
.service-card.is-cta .card-more { color: var(--ink); }
.service-card.is-cta:focus-visible { outline-color: var(--ink); }
/* soggetto della foto (parete uniforme) spinto nell'angolo in alto a destra,
   così il testo resta sul fondo libero */
.service-card.img-right > img { transform: scale(1.2); transform-origin: 0% 100%; }
@media (hover: hover) and (pointer: fine) { .service-card.img-right:hover > img { transform: scale(1.26); } }

/* ---------- Blocco immagine + testo ---------- */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(40px, 6vw, 88px); align-items: center; }
.split--reverse .split-media { order: 2; }
.split-media { position: relative; isolation: isolate; }
.split-media .frame {
  position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 5; box-shadow: var(--shadow-lg);
}
.split-media .frame img { width: 100%; height: 100%; object-fit: cover; }
.split-media::before {
  content: ""; position: absolute; inset: 28px -18px -18px 28px; z-index: -1;
  border: 2px solid var(--orange); border-radius: var(--radius);
}
/* Le icone tonde dell'azienda (dal PDF del logo) al posto delle foto di repertorio */
.roundels { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 20px; }
.roundels li { display: grid; justify-items: center; gap: 10px; text-align: center; font-weight: 700; color: var(--ink); font-size: 0.95rem; line-height: 1.3; }
.roundels img { width: 112px; height: 112px; }

.checklist { list-style: none; padding: 0; margin: 0 0 1.5em; display: grid; gap: 12px; }
.checklist li { position: relative; padding-left: 36px; }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: 2px; width: 24px; height: 24px; border-radius: 50%;
  background: var(--orange-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b84a0a' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 14px no-repeat;
}
.checklist--cols { grid-template-columns: 1fr 1fr; gap: 14px 28px; }
.checklist strong { color: var(--ink); }
.section--dark .checklist li::before { background-color: rgba(235, 103, 28, 0.16); }

/* ---------- Perché sceglierci: introduzione + punti di forza in elenco ---------- */
.why { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(40px, 6vw, 96px); align-items: start; }
.why-intro p { color: #343e4b; max-width: 52ch; }
.why-intro .btn-row { align-items: center; gap: 20px; margin-top: 28px; }
.pillars { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; }
.pillars li { padding: 24px 0 28px; border-top: 1px solid var(--line); }
.pillars h3 { display: flex; align-items: flex-start; gap: 12px; font-size: 1.2rem; margin-bottom: 10px; }
/* nodo del circuito come segnaposto, lo stesso del logo */
.pillars h3::before { content: ""; width: 12px; height: 12px; flex: none; margin-top: 0.4em; border-radius: 50%; border: 3px solid var(--orange); }
.pillars p { margin: 0; color: var(--muted); }
.pillars--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.section--dark .pillars li { border-color: var(--line-dark); }
.section--dark .pillars p { color: var(--muted-dark); }

/* ---------- Processo di lavoro ---------- */
.steps { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; list-style: none; margin: 0; padding: 0; }
.steps::before {
  content: ""; position: absolute; top: 31px; left: 32px; right: calc((100% - 84px) / 4 - 32px); height: 2px;
  background: linear-gradient(90deg, var(--orange) 0 50%, transparent 50%) 0 0 / 14px 2px repeat-x;
}
.step { position: relative; }
.step-num {
  position: relative; z-index: 1;
  display: grid; place-items: center; width: 64px; height: 64px; margin-bottom: 22px; border-radius: 50%;
  background: #fff; border: 2px solid var(--orange);
  font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; color: var(--ink);
}
.section--paper .step-num { background: var(--paper); }
.section--dark .step-num { background: var(--ink); color: #fff; }
.step h3 { font-size: 1.2rem; margin-bottom: 8px; }
.step p { margin: 0; color: var(--muted); font-size: 0.98rem; }
.section--dark .step p { color: var(--muted-dark); }
.steps-cta { margin-top: clamp(32px, 4vw, 48px); display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; }
.steps-cta p { margin: 0; color: var(--muted-dark); }
.steps-cta p a { color: #fff; font-weight: 700; }

/* ---------- Marchi partner ---------- */
.brands { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; list-style: none; margin: 0; padding: 0; }
.brand-tile {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  height: 100%; min-height: 150px; padding: 22px 16px 18px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); text-align: center;
  box-shadow: var(--shadow-sm);
}
/* loghi sempre a colori: su touch l'effetto al passaggio del mouse non esiste */
.brand-tile img { max-width: 82%; max-height: 54px; width: auto; height: auto; object-fit: contain; }
.brand-tile span { font-size: 0.82rem; font-weight: 600; color: var(--muted); line-height: 1.3; }
.brands--compact { grid-template-columns: repeat(auto-fit, minmax(170px, 230px)); justify-content: end; }
.brand-band { padding-block: clamp(56px, 7vw, 88px); }
.brand-band-inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 40px; align-items: center; }
.brand-band .section-head { margin-bottom: 0; }
.brand-band .lead { font-size: 1.05rem; }
@media (max-width: 860px) {
  .brand-band-inner { grid-template-columns: minmax(0, 1fr); }
  .brands--compact { justify-content: start; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
}
.badges-more { margin: 28px 0 0; max-width: 62ch; color: var(--muted); }
.badges-more a { color: var(--orange-ink); font-weight: 600; text-underline-offset: 3px; }
.link-inline { background: none; border: 0; padding: 0; color: var(--orange-ink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Banda call-to-action ---------- */
.cta-band {
  position: relative; isolation: isolate; overflow: hidden;
  background: var(--orange); color: var(--ink);
  padding-block: clamp(56px, 7vw, 88px);
}
.cta-band::after {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0.18;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='120' viewBox='0 0 240 120' fill='none' stroke='%230e1621' stroke-width='2'%3E%3Cpath d='M0 30h70l20 20h60'/%3E%3Ccircle cx='156' cy='50' r='5'/%3E%3Cpath d='M240 90h-60l-20-20h-40'/%3E%3Ccircle cx='114' cy='70' r='5'/%3E%3C/svg%3E");
  background-size: 240px 120px;
}
.cta-band .container { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 28px 48px; }
.cta-band h2 { color: var(--ink); margin-bottom: 10px; }
.cta-band p { margin: 0; font-size: 1.15rem; max-width: 52ch; color: var(--ink); }
/* sul fondo arancione il contorno di focus arancione sparirebbe */
.cta-band :focus-visible { outline-color: var(--ink); }
.cta-phone {
  display: inline-flex; align-items: center; gap: 14px; text-decoration: none; color: var(--ink);
  font-family: var(--font-display); font-weight: 700; font-size: clamp(2rem, 4vw, 2.75rem); line-height: 1;
}
.cta-phone .phone-icon { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%; background: var(--ink); color: var(--orange); }
.cta-phone .phone-icon .icon { width: 28px; height: 28px; }
.cta-actions { display: grid; gap: 16px; justify-items: start; }

/* ---------- Header pagine interne ---------- */
.page-hero {
  position: relative; isolation: isolate; overflow: hidden;
  background: var(--ink); color: #fff;
  padding: clamp(56px, 8vw, 112px) 0 clamp(52px, 7vw, 96px);
}
.page-hero-media { position: absolute; inset: 0; z-index: -2; }
.page-hero-media img { width: 100%; height: 100%; object-fit: cover; }
.page-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(14, 22, 33, 0.96) 0%, rgba(14, 22, 33, 0.86) 50%, rgba(14, 22, 33, 0.55) 100%);
}
.page-hero--plain::before { display: none; }
.page-hero .hero-circuit { bottom: 0; opacity: 0.55; width: min(620px, 52vw); }
.page-hero h1 { color: #fff; font-size: clamp(2.3rem, 5.4vw, 4rem); max-width: 18ch; margin-bottom: 18px; }
.page-hero .lead { margin-bottom: 28px; }
.page-hero .btn-row { margin-top: 8px; }

.breadcrumb { margin-bottom: 22px; font-size: 0.9rem; }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; color: var(--muted-dark); }
.breadcrumb li + li::before { content: "/"; margin-right: 6px; opacity: 0.6; }
.breadcrumb a { color: #fff; text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .breadcrumb a:hover { text-decoration: underline; text-underline-offset: 3px; } }

/* ---------- Pagine servizio ---------- */
.content-layout { display: grid; grid-template-columns: minmax(0, 1fr) 370px; gap: clamp(40px, 5vw, 72px); align-items: start; }
.prose > * + * { margin-top: 0; }
.prose h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); margin-top: 1.4em; margin-bottom: 0.5em; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.4em; }
.prose p, .prose li { color: #343e4b; }
/* ~75 caratteri per riga: con Barlow 1ch vale più di una lettera media */
.prose > p, .callout p, .prose figcaption { max-width: 60ch; }
li, figcaption { text-wrap: pretty; }
.prose figure { margin: 2em 0; }
.prose figure img { width: 100%; border-radius: var(--radius); aspect-ratio: 16 / 9; object-fit: cover; }
.prose figcaption { margin-top: 10px; font-size: 0.9rem; color: var(--muted); }
.prose a { color: var(--orange-ink); text-underline-offset: 3px; }

.callout {
  display: flex; gap: 14px; align-items: flex-start;
  margin: 2em 0; padding: 20px 22px; border-radius: var(--radius-sm); background: var(--paper);
}
.callout > .icon { color: var(--orange-ink); margin-top: 2px; }
.callout p { margin: 0; }
.callout strong { color: var(--ink); }

.aside-card {
  position: sticky; top: 24px;
  padding: 30px; border-radius: var(--radius); background: var(--ink); color: #e8ecf1;
  box-shadow: var(--shadow-lg);
}
.aside-card h2 { color: #fff; font-size: 1.9rem; margin-bottom: 10px; }
.aside-card p { color: var(--muted-dark); font-size: 0.98rem; }
.aside-card .btn { width: 100%; margin-top: 10px; }
.aside-contacts { list-style: none; margin: 20px 0; padding: 20px 0 0; border-top: 1px solid var(--line-dark); display: grid; gap: 14px; }
.aside-contacts a { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; font-weight: 600; word-break: break-word; }
@media (hover: hover) and (pointer: fine) { .aside-contacts a:hover { color: var(--orange-light); } }
.aside-contacts .icon { color: var(--orange); }

/* Altri servizi: elenco a righe, senza card */
.related { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.related li { border-bottom: 1px solid var(--line); }
.related a {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) auto; gap: 8px 32px; align-items: center;
  /* margini fissi (nessuna animazione del layout): il testo resta allineato come prima */
  padding: 22px 16px; margin-inline: -12px; border-radius: 10px; text-decoration: none; color: var(--ink);
  transition: background-color 150ms var(--ease);
}
@media (hover: hover) and (pointer: fine) { .related a:hover { background: var(--paper); } }
.related h3 { margin: 0; font-size: 1.15rem; }
.related p { margin: 0; color: var(--muted); font-size: 0.97rem; }
.related .icon { color: var(--orange-ink); transition: transform 0.2s var(--ease); }
@media (hover: hover) and (pointer: fine) { .related a:hover .icon { transform: translateX(4px); } }

/* Elenco servizi esteso (pagina Servizi) */
.service-rows { display: grid; gap: 28px; }
.service-row {
  display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: 0; overflow: hidden;
  border-radius: var(--radius); background: #fff; border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.service-row .row-media { position: relative; min-height: 260px; }
.service-row .row-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.service-row .row-body { padding: clamp(26px, 3vw, 40px); }
.service-row h2 { font-size: clamp(1.7rem, 2.6vw, 2.2rem); margin-bottom: 10px; }
.service-row .checklist { grid-template-columns: 1fr 1fr; gap: 10px 24px; font-size: 0.98rem; }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 12px; }
.faq details { border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; box-shadow: var(--shadow-sm); }
.faq summary {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 18px 22px; cursor: pointer; font-weight: 700; color: var(--ink); list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; width: 12px; height: 12px; flex: none; border-right: 2.5px solid var(--orange-ink); border-bottom: 2.5px solid var(--orange-ink);
  transform: rotate(45deg) translateY(-3px); transition: transform 0.2s var(--ease);
}
.faq details[open] summary::after { transform: rotate(-135deg) translateY(-3px); }
.faq details > div { padding: 0 22px 18px; color: #343e4b; }
.faq details > div p:last-child { margin-bottom: 0; }

/* ---------- Contatti ---------- */
.contact-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: clamp(28px, 4vw, 56px); align-items: start; }
.form-card { padding: clamp(24px, 4vw, 44px); border-radius: var(--radius); background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-md); }
.form-card h2 { font-size: clamp(1.9rem, 3vw, 2.4rem); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 20px; }
.field { display: grid; gap: 6px; }
.field--full { grid-column: 1 / -1; }
.field label { font-weight: 600; font-size: 0.95rem; color: var(--ink); }
.field .req { color: var(--orange-ink); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 52px; padding: 12px 16px;
  border: 1.5px solid #cfd5dc; border-radius: var(--radius-sm); background: #fff;
  /* solo il bordo al passaggio del mouse; l'anello di focus appare all'istante */
  transition: border-color 150ms ease;
}
.field textarea { min-height: 150px; resize: vertical; }
.field select {
  appearance: none; padding-right: 44px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230e1621' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") right 14px center / 18px no-repeat;
}
@media (hover: hover) and (pointer: fine) { .field input:hover, .field select:hover, .field textarea:hover { border-color: #9aa4b1; } }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 4px rgba(235, 103, 28, 0.18); }
.field [aria-invalid="true"] { border-color: var(--error); }
.field-error { margin: 0; min-height: 0; font-size: 0.88rem; color: var(--error); font-weight: 600; }
.field-error:empty { display: none; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 0.95rem; line-height: 1.5; }
.check input { width: 22px; height: 22px; margin: 1px 0 0; flex: none; accent-color: var(--orange-ink); }
.check a { color: var(--orange-ink); }
.hp-field { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.form-note { font-size: 0.85rem; color: var(--muted); margin: 0; }
.form-note--intro { margin-bottom: 24px; }
.form-note a { color: inherit; }
.form-status { display: none; margin-top: 18px; padding: 16px 18px; border-radius: var(--radius-sm); font-weight: 600; }
.form-status.is-success { display: block; background: #e8f5ee; color: var(--success); border: 1px solid #b9e0cb; }
.form-status.is-error { display: block; background: #fdecea; color: var(--error); border: 1px solid #f4c4bf; }
.form-actions { display: grid; gap: 14px; grid-column: 1 / -1; margin-top: 4px; }
.grecaptcha-badge { visibility: hidden; }

.info-stack { display: grid; gap: 16px; }
.info-card {
  display: flex; gap: 16px; align-items: flex-start; padding: 22px 24px;
  border-radius: var(--radius-sm); background: #fff; border: 1px solid var(--line); text-decoration: none;
  box-shadow: var(--shadow-sm); transition: border-color 150ms var(--ease), box-shadow 150ms var(--ease), transform 120ms var(--ease);
}
@media (hover: hover) and (pointer: fine) { a.info-card:hover { border-color: transparent; box-shadow: var(--shadow-md); } }
.info-card small { display: block; font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.info-card strong { display: block; font-size: 1.15rem; color: var(--ink); line-height: 1.35; word-break: break-word; }
.info-card--dark { background: var(--ink); border-color: var(--ink); }
.info-card--dark small { color: var(--muted-dark); }
.info-card--dark strong { color: #fff; font-family: var(--font-display); font-size: 1.9rem; letter-spacing: 0.01em; }
.info-card--dark .trust-icon { background: var(--orange); color: var(--ink); }

.map-embed { position: relative; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--line); background: var(--paper); aspect-ratio: 4 / 3; }
.map-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.map-placeholder {
  position: absolute; inset: 0; display: grid; place-content: center; gap: 12px; padding: 24px; text-align: center;
  background-color: #eef0f2;
  background-image:
    linear-gradient(rgba(14, 22, 33, 0.05) 2px, transparent 2px),
    linear-gradient(90deg, rgba(14, 22, 33, 0.05) 2px, transparent 2px);
  background-size: 48px 48px, 48px 48px;
}
.map-placeholder .pin { display: grid; place-items: center; width: 56px; height: 56px; margin: 0 auto; border-radius: 50%; background: var(--ink); color: var(--orange); box-shadow: var(--shadow-md); }
.map-placeholder p { margin: 0 auto; max-width: 36ch; font-size: 0.88rem; color: #4a5462; }

/* ---------- Pagine legali ---------- */
.legal { max-width: 860px; }
.legal h2 { font-size: clamp(1.5rem, 2.4vw, 1.9rem); margin-top: 1.8em; }
.legal h3 { font-size: 1.15rem; margin-top: 1.4em; }
.legal p, .legal li { color: #343e4b; max-width: 60ch; }
.legal a { color: var(--orange-ink); text-underline-offset: 3px; word-break: break-word; }
.legal .meta { color: var(--muted); font-size: 0.95rem; }
.table-wrap { overflow-x: auto; margin: 1.2em 0 1.6em; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.table-wrap table { width: 100%; border-collapse: collapse; font-size: 0.93rem; min-width: 620px; }
.table-wrap th, .table-wrap td { padding: 12px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.table-wrap th { background: var(--paper); color: var(--ink); font-weight: 700; }
.table-wrap tr:last-child td { border-bottom: 0; }
.table-wrap code { font-size: 0.88em; background: var(--paper); padding: 1px 6px; border-radius: 4px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: var(--muted-dark); font-size: 0.97rem; }
.footer-main { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.1fr; gap: 40px; padding-block: clamp(56px, 7vw, 88px) 48px; }
.footer-logo img { height: 56px; width: auto; margin-bottom: 20px; }
.footer-title { font-family: var(--font); font-size: 0.8rem; letter-spacing: 0.16em; text-transform: uppercase; color: #fff; margin: 0 0 18px; font-weight: 700; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.footer-links a, .footer-links button { display: inline-block; padding: 5px 0; color: var(--muted-dark); text-decoration: none; background: none; border: 0; text-align: left; }
@media (hover: hover) and (pointer: fine) { .footer-links a:hover, .footer-links button:hover { color: #fff; } }
.footer-contacts { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.footer-contacts li { display: flex; gap: 12px; align-items: flex-start; }
.footer-contacts .icon { width: 20px; height: 20px; color: var(--orange); margin-top: 3px; }
.footer-contacts a { color: #fff; text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .footer-contacts a:hover { color: var(--orange-light); } }
.footer-bottom {
  display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between; align-items: center;
  padding-block: 24px; border-top: 1px solid var(--line-dark); font-size: 0.88rem;
}
.footer-bottom p { margin: 0; }
.footer-legal { display: flex; flex-wrap: wrap; gap: 8px 20px; list-style: none; margin: 0; padding: 0; }
.footer-legal a, .footer-legal button { display: inline-block; padding: 6px 0; color: var(--muted-dark); background: none; border: 0; text-decoration: underline; text-underline-offset: 3px; font-size: inherit; }
@media (hover: hover) and (pointer: fine) { .footer-legal a:hover, .footer-legal button:hover { color: #fff; } }

/* Barra azioni rapide su mobile */
.mobile-cta { display: none; }
@media (max-width: 760px) {
  .mobile-cta {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
    display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.97); border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(14, 22, 33, 0.08);
  }
  .mobile-cta .btn { min-height: 48px; padding: 8px 12px; }
  body { padding-bottom: calc(70px + env(safe-area-inset-bottom)); }
}

/* ---------- Banner e preferenze cookie ---------- */
.cc-banner {
  position: fixed; z-index: 1000; left: 12px; right: 12px; bottom: 12px;
  max-width: 470px; padding: 24px 22px 18px;
  background: #fff; color: var(--text); border-radius: 18px;
  box-shadow: 0 24px 70px rgba(14, 22, 33, 0.32), 0 0 0 1px rgba(14, 22, 33, 0.06);
  animation: cc-in 400ms var(--ease) both;
}
/* dalla seconda pagina della visita il banner è già noto: compare senza animazione */
.cc-banner.no-anim { animation: none; }
@keyframes cc-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.cc-banner[hidden] { display: none; }
.cc-banner h2 { font-family: var(--font); text-transform: none; font-size: 1.15rem; margin: 0 36px 8px 0; letter-spacing: 0; }
.cc-banner p { font-size: 0.92rem; line-height: 1.55; color: #3c4653; margin: 0 0 16px; }
.cc-banner a { color: var(--orange-ink); font-weight: 600; }
.cc-close {
  position: absolute; top: 10px; right: 10px; display: grid; place-items: center;
  width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--paper); color: var(--ink);
}
@media (hover: hover) and (pointer: fine) { .cc-close:hover { background: var(--line); } }
.cc-close .icon { width: 20px; height: 20px; }
.cc-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cc-btn {
  min-height: 46px; padding: 10px 14px; border-radius: 999px; font-weight: 700; font-size: 0.95rem;
  border: 2px solid var(--ink); background: var(--ink); color: #fff;
  transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease, transform 160ms var(--ease);
}
@media (hover: hover) and (pointer: fine) { .cc-btn:hover { background: var(--ink-3); border-color: var(--ink-3); } }
.cc-btn--link {
  grid-column: 1 / -1; min-height: 40px; background: none; border-color: transparent; color: var(--ink);
  text-decoration: underline; text-underline-offset: 3px;
}
@media (hover: hover) and (pointer: fine) { .cc-btn--link:hover { background: var(--paper); border-color: transparent; } }
/* in basso a destra su schermi grandi: a sinistra coprirebbe i pulsanti dell'hero */
@media (min-width: 720px) {
  .cc-banner { left: auto; right: 24px; bottom: 24px; }
}
@media (max-width: 760px) {
  .cc-banner { bottom: calc(80px + env(safe-area-inset-bottom)); }
}

.cc-modal {
  width: min(600px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 0;
  border: 0; border-radius: 18px; box-shadow: var(--shadow-lg); color: var(--text);
}
.cc-modal::backdrop { background: rgba(14, 22, 33, 0.6); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.cc-modal-inner { display: flex; flex-direction: column; max-height: calc(100dvh - 24px); }
.cc-modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 24px 24px 12px; }
.cc-modal-head h2 { font-family: var(--font); text-transform: none; font-size: 1.3rem; margin: 0; letter-spacing: 0; }
.cc-modal-head .cc-close { position: static; flex: none; }
.cc-modal-body { overflow-y: auto; padding: 0 24px 8px; }
.cc-modal-body > p { font-size: 0.93rem; color: #3c4653; }
.cc-cat { border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; margin-bottom: 12px; }
.cc-cat-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.cc-cat-head strong { font-size: 1rem; color: var(--ink); }
.cc-cat p { margin: 8px 0 0; font-size: 0.88rem; color: var(--muted); line-height: 1.5; }
.cc-switch { position: relative; display: inline-flex; align-items: center; gap: 10px; font-size: 0.85rem; font-weight: 600; color: var(--muted); flex: none; }
.cc-switch input { position: absolute; opacity: 0; width: 52px; height: 30px; right: 0; margin: 0; cursor: pointer; }
.cc-switch .track { position: relative; width: 52px; height: 30px; border-radius: 999px; background: #c5ccd5; transition: background-color 0.2s; }
.cc-switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25); transition: transform 0.2s var(--ease); }
.cc-switch input:checked + .track { background: var(--orange-ink); }
.cc-switch input:checked + .track::after { transform: translateX(22px); }
.cc-switch input:focus-visible + .track { outline: 3px solid var(--orange); outline-offset: 2px; }
.cc-switch input:disabled + .track { opacity: 0.6; }
.cc-modal-foot { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 16px 24px 22px; border-top: 1px solid var(--line); }
.cc-modal-foot .cc-btn--alt { background: #fff; color: var(--ink); }
@media (hover: hover) and (pointer: fine) { .cc-modal-foot .cc-btn--alt:hover { background: var(--paper); } }
.cc-proof { font-size: 0.8rem; color: var(--muted); margin: 4px 0 8px; }
@media (max-width: 520px) {
  .cc-modal-foot { grid-template-columns: 1fr; }
}

/* ---------- Pagina 404 ---------- */
.notfound { text-align: center; padding-block: clamp(80px, 12vw, 160px); }
.notfound .code { font-family: var(--font-display); font-weight: 700; font-size: clamp(6rem, 18vw, 11rem); line-height: 0.9; color: var(--orange); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .brands { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer-main { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 1024px) {
  .services-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: minmax(260px, auto); }
  .service-card.is-feature { grid-row: span 1; grid-column: span 2; }
  .bus-loads { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px var(--bus-gap); }
  .bus-loads::before { display: none; }
  .why { grid-template-columns: minmax(0, 1fr); }
  .pillars--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .content-layout { grid-template-columns: minmax(0, 1fr); }
  .aside-card { position: static; }
  .service-row { grid-template-columns: 300px minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .split, .contact-layout { grid-template-columns: minmax(0, 1fr); }
  .split--reverse .split-media { order: 0; }
  .split-media { max-width: 560px; }
  .split-media .frame { aspect-ratio: 4 / 3; }
  .split-media::before { inset: 16px -6px -6px 16px; }
  .steps { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .steps::before { display: none; }
  .step { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 0 20px; padding-bottom: 28px; }
  /* linea tratteggiata tra un passaggio e il successivo, non oltre l'ultimo */
  .step:not(:last-child)::before {
    content: ""; position: absolute; left: 31px; top: 64px; bottom: 0; width: 2px;
    background: linear-gradient(180deg, var(--orange) 0 50%, transparent 50%) 0 0 / 2px 14px repeat-y;
  }
  .step-num { grid-row: span 2; margin: 0; }
  .step h3 { margin-top: 8px; }
  .related a { grid-template-columns: minmax(0, 1fr) auto; }
  .related p { grid-column: 1; }
  .related .icon { grid-row: 1 / span 2; grid-column: 2; }
  .roundels { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px 12px; }
  .roundels img { width: 88px; height: 88px; }
  /* schema unifilare in verticale: la sbarra scende a sinistra */
  .bus { grid-template-columns: minmax(0, 1fr); }
  .bus-node { order: -1; position: relative; z-index: 1; }
  .bus-loads { grid-template-columns: minmax(0, 1fr); gap: 0; padding-top: 8px; }
  .bus-load { padding: 0 0 32px 44px; }
  .bus-load::before { left: 6.5px; top: 0; bottom: 0; height: auto; }
  .bus-load:first-child::before { top: -21px; }
  .bus-load:last-child::before { bottom: auto; height: 14px; }
  .bus-load:last-child { padding-bottom: 0; }
  .bus-load::after { left: 0; top: 6px; }
  .service-row { grid-template-columns: minmax(0, 1fr); }
  .service-row .row-media { min-height: 220px; }
  .hero-circuit { opacity: 0.45; width: 90vw; bottom: 30px; }
}
@media (max-width: 640px) {
  body { font-size: 1rem; }
  .hero { padding-top: 56px; }
  .hero::before { background: linear-gradient(180deg, rgba(14, 22, 33, 0.7) 0%, rgba(14, 22, 33, 0.86) 55%, rgba(14, 22, 33, 0.96) 100%); }
  .hero .btn-row .btn { width: 100%; }
  .services-grid { grid-template-columns: minmax(0, 1fr); grid-auto-rows: auto; gap: 12px; }
  .service-card, .service-card.is-feature, .service-card.is-wide { grid-column: auto; grid-row: auto; padding: 22px; min-height: 200px; padding-top: 72px; }
  .service-card.is-feature { min-height: 260px; }
  .service-card.is-feature h3 { font-size: 2rem; }
  .pillars, .pillars--3 { grid-template-columns: minmax(0, 1fr); }
  .brands { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .checklist--cols, .service-row .checklist { grid-template-columns: minmax(0, 1fr); }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .footer-main { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .cta-band .container { flex-direction: column; align-items: flex-start; }
  .cta-actions { width: 100%; }
  .cta-actions .btn { width: 100%; }
}

/* ---------- Interazione al tocco e movimento ----------
   Criteri delle skill di Emil Kowalski: risposta immediata alla pressione, hover solo
   con il mouse, uscite più rapide delle entrate, nessuna animazione per le azioni da tastiera. */
html { -webkit-tap-highlight-color: transparent; }
a, button, summary, label, select { touch-action: manipulation; }
.btn, .cc-btn, .nav-toggle, .sub-toggle, .cc-close, .nav-link, .faq summary, .mobile-cta {
  -webkit-user-select: none; user-select: none;
}
.nav-toggle, .cc-close { transition: transform 160ms var(--ease), background-color 150ms ease; }
.cc-btn:active, .nav-toggle:active, .sub-toggle:active, .cc-close:active { transform: scale(0.97); }
.service-card:active, a.info-card:active { transform: scale(0.985); transition-duration: 120ms; }

/* comparsa dei contenuti che si aprono: il testo arriva insieme alla freccia che ruota */
@keyframes reveal { from { opacity: 0; transform: translateY(-4px); } }
.faq details[open] > div { animation: reveal 200ms var(--ease); }
@media (max-width: 960px) {
  .has-sub.is-open .sub-menu { animation: reveal 180ms var(--ease); }
}

/* esito del modulo: entra con un piccolo movimento, il segno di spunta si disegna */
@keyframes status-in { from { opacity: 0; transform: translateY(6px); } }
.form-status.is-success, .form-status.is-error { animation: status-in 250ms var(--ease); }
.form-status.is-success { display: flex; gap: 12px; align-items: flex-start; }
.status-check { width: 22px; height: 22px; flex: none; margin-top: 1px; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.status-check path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 300ms var(--ease) 100ms forwards; }

/* mappa: il segnaposto resta sotto finché la mappa non è caricata, poi dissolvenza */
.map-embed iframe { z-index: 1; opacity: 0; transition: opacity 250ms var(--ease); }
.map-embed iframe.is-loaded { opacity: 1; }

/* finestra preferenze cookie: si apre e si chiude con dolcezza; su telefono sale dal basso */
.cc-modal {
  transition: opacity 200ms var(--ease), transform 200ms var(--ease), overlay 200ms allow-discrete, display 200ms allow-discrete;
}
.cc-modal:not([open]) { opacity: 0; transform: scale(0.98); transition-duration: 150ms; }
@starting-style { .cc-modal[open] { opacity: 0; transform: scale(0.96); } }
.cc-modal::backdrop { opacity: 0; transition: opacity 150ms ease, overlay 150ms allow-discrete, display 150ms allow-discrete; }
.cc-modal[open]::backdrop { opacity: 1; transition-duration: 200ms; }
@starting-style { .cc-modal[open]::backdrop { opacity: 0; } }
.cc-modal-body { overscroll-behavior: contain; }
html:has(.cc-modal[open]) { overflow: hidden; }
@media (max-width: 520px) {
  .cc-modal {
    margin: auto 0 0; width: 100%; max-width: 100%; max-height: 92dvh; border-radius: 18px 18px 0 0;
    transition-duration: 300ms; transition-timing-function: cubic-bezier(0.32, 0.72, 0, 1);
  }
  .cc-modal:not([open]) { opacity: 1; transform: translateY(100%); transition-duration: 200ms; }
  @starting-style { .cc-modal[open] { opacity: 1; transform: translateY(100%); } }
  .cc-modal-inner { max-height: 92dvh; }
  .cc-modal-foot { padding-bottom: calc(22px + env(safe-area-inset-bottom, 0px)); }
}

/* ---------- Telefono: tacca dello schermo, zone di tocco, tastiera ---------- */
.container {
  padding-inline: max(var(--gutter), env(safe-area-inset-left, 0px)) max(var(--gutter), env(safe-area-inset-right, 0px));
}
.breadcrumb a { display: inline-block; padding: 12px 0; margin: -12px 0; }
.aside-contacts a { padding-block: 9px; margin-block: -9px; }
.footer-contacts a { display: inline-block; padding-block: 9px; margin-block: -9px; }
.link-arrow { min-height: 44px; }
.bus-links { gap: 0; }
.bus-links a { min-height: 44px; }
.footer-links a, .footer-links button { padding: 9px 0; }
.cc-switch { min-height: 44px; }
@media (max-width: 760px) {
  /* mentre si scrive nel modulo la barra in basso si toglie di mezzo */
  .mobile-cta { transition: transform 200ms var(--ease); }
  body:has(.field :is(input, select, textarea):focus) .mobile-cta { transform: translateY(110%); }
}

/* "Riduci animazioni": via i movimenti, restano dissolvenze e cambi di colore */
@media (prefers-reduced-motion: reduce) {
  .hero-circuit path { animation: none; stroke-dashoffset: 0; }
  .hero-circuit circle { animation: none; opacity: 1; }
  .btn, .cc-btn, .nav-toggle, .sub-toggle, .cc-close, .service-card, a.info-card,
  .link-arrow svg, .card-more .icon, .related .icon, .main-nav, .sub-menu, .cc-modal { transform: none !important; }
  .service-card > img { transition: none; }
  @media (hover: hover) and (pointer: fine) { .service-card:hover > img { transform: none; } }
  @media (hover: hover) and (pointer: fine) { .service-card.img-right:hover > img { transform: scale(1.2); } }
  .cc-banner { animation-name: fade-only; }
  .faq details[open] > div, .has-sub.is-open .sub-menu, .form-status.is-success, .form-status.is-error { animation-name: fade-only; }
  .status-check path { animation: none; stroke-dashoffset: 0; }
  .mobile-cta { transition: none; }
}
@keyframes fade-only { from { opacity: 0; } }

@media print {
  .site-header, .mobile-cta, .cc-banner, .cta-band, .site-footer .footer-main { display: none !important; }
  body { padding: 0; }
}
