/* HomeEdge, anteprima v3: foglio comune (bloccante) a tutte le pagine.
   Token del kit (DS/brand-kit/tokens.css, ridotti a quelli usati), caratteri, temi, base, bottoni,
   fascia «Anteprima», interruttori, testata, menu, colmo a tetto, piede, pagine legali. */
@font-face { font-family: 'Montserrat Alt1'; font-weight: 300; font-style: normal; font-display: swap; src: url('../../fonts/MontserratAlt1-Light.woff2') format('woff2'); }
@font-face { font-family: 'Montserrat Alt1'; font-weight: 400; font-style: normal; font-display: swap; src: url('../../fonts/MontserratAlt1-Regular.woff2') format('woff2'); }
@font-face { font-family: 'Montserrat'; font-weight: 400; font-style: normal; font-display: swap; src: url('../../fonts/Montserrat-Regular.woff2') format('woff2'); }

:root {
  --he-azzurro: #00A3E0; --he-azzurro-profondo: #006085; --he-azzurro-medio: #73CCEE; --he-azzurro-nebbia: #EBF8FD;
  --he-nero: #1A1A1A; --he-grigio: #545454; --he-grigio-su-scuro: #B8B8B8; --he-superficie-scura: #242424; --he-linea-scura: #3D3D3D;
  --he-fondo: #FFFFFF; --he-fondo-alt: #EBF8FD; --he-testo: #545454; --he-testo-forte: #1A1A1A; --he-testo-secondario: #545454;
  --he-titolo-accento: #006085; --he-link: #006085; --he-link-hover: #1A1A1A; --he-accento: #00A3E0; --he-accento-ui: #006085;
  --he-linea-sottile: #D9D9D9; --he-bottone-fondo: #006085; --he-bottone-testo: #FFFFFF; --he-superficie: #EBF8FD;
  --font-titoli: 'Montserrat Alt1', 'Montserrat', 'Helvetica Neue', Arial, sans-serif;
  --font-testo: 'Montserrat', 'Helvetica Neue', Arial, sans-serif;
  --r1: 2px; --r2: 4px;
  --ombra: 0 2px 4px rgba(26, 26, 26, .04), 0 8px 24px rgba(26, 26, 26, .08);
  --margine: clamp(16px, 5vw, 48px);
  --cont: min(1200px, 100vw - 2 * var(--margine));
  --bleed: calc((100vw - var(--cont)) / 2);
  --header-h: 72px;
  --sez-pad: 128px;
  --tetto: 96px; --tetto-passo: 14px;
  --ease-uscita: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-mov: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-sheet: cubic-bezier(0.32, 0.72, 0, 1);
  --z-header: 40; --z-fluttuante: 45; --z-menu: 50; --z-nota: 60;
  color-scheme: light;
}
@media (max-width: 999px) { :root { --tetto: 64px; } }
@media (width < 800px) { :root { --header-h: 64px; --sez-pad: 64px; --tetto: 40px; --tetto-passo: 10px; } }
@media (prefers-color-scheme: dark) {
  :root:not([data-tema="chiaro"]) {
    --he-fondo: #1A1A1A; --he-fondo-alt: #242424; --he-testo: #FFFFFF; --he-testo-forte: #FFFFFF; --he-testo-secondario: #B8B8B8;
    --he-titolo-accento: #00A3E0; --he-link: #00A3E0; --he-link-hover: #73CCEE; --he-accento-ui: #00A3E0;
    --he-linea-sottile: #3D3D3D; --he-bottone-fondo: #00A3E0; --he-bottone-testo: #1A1A1A; --he-superficie: #242424;
    --ombra: 0 2px 4px rgba(0, 0, 0, .2), 0 8px 24px rgba(0, 0, 0, .3);
    color-scheme: dark;
  }
}
:root[data-tema="scuro"] {
  --he-fondo: #1A1A1A; --he-fondo-alt: #242424; --he-testo: #FFFFFF; --he-testo-forte: #FFFFFF; --he-testo-secondario: #B8B8B8;
  --he-titolo-accento: #00A3E0; --he-link: #00A3E0; --he-link-hover: #73CCEE; --he-accento-ui: #00A3E0;
  --he-linea-sottile: #3D3D3D; --he-bottone-fondo: #00A3E0; --he-bottone-testo: #1A1A1A; --he-superficie: #242424;
  --ombra: 0 2px 4px rgba(0, 0, 0, .2), 0 8px 24px rgba(0, 0, 0, .3);
  color-scheme: dark;
}
/* superfici scure fisse (voce, plancia, piede, sopralluogo): i token si comportano come nel tema scuro */
.su-scuro {
  --he-testo: #FFFFFF; --he-testo-forte: #FFFFFF; --he-testo-secondario: #B8B8B8; --he-titolo-accento: #73CCEE;
  --he-link: #73CCEE; --he-link-hover: #FFFFFF; --he-accento-ui: #73CCEE; --he-linea-sottile: #3D3D3D;
  --he-bottone-fondo: #00A3E0; --he-bottone-testo: #1A1A1A; --he-superficie: #242424;
  color: var(--he-testo);
}

*, *::before, *::after { box-sizing: border-box; }
html {
  font-synthesis: none; -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent;
  overflow-x: clip; background: var(--he-fondo);
  scroll-padding-top: calc(var(--header-h) + 16px);
}
@media (prefers-reduced-motion: no-preference) { html.liscio { scroll-behavior: smooth; } }
html.menu-aperto { overflow: hidden; }
body {
  margin: 0; background: var(--he-fondo); color: var(--he-testo); overflow-x: clip;
  font-family: var(--font-testo); font-weight: 400; font-size: 1rem; line-height: 1.625;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg, video { display: block; max-width: 100%; }
p, ul, ol, h1, h2, h3, h4, figure, dl, dd, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a, button, [role="button"], [role="switch"], [role="tab"], summary, label { touch-action: manipulation; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: var(--he-link); text-underline-offset: .18em; text-decoration-thickness: 1px; }
@media (hover: hover) and (pointer: fine) { a:hover { color: var(--he-link-hover); } }
:focus-visible { outline: 3px solid var(--he-accento-ui); outline-offset: 3px; border-radius: var(--r1); }
.vh { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
[hidden] { display: none !important; }
html:not(.js) [data-solo-js] { display: none !important; }
.nowrap { white-space: nowrap; }
.contenitore { width: var(--cont); margin-inline: auto; }

/* tipografia */
.display, .h1, .h2, .h3, .h4 { font-family: var(--font-titoli); color: var(--he-testo-forte); text-wrap: balance; letter-spacing: .005em; }
.display { font-weight: 300; font-size: clamp(2.875rem, 1rem + 7.4vw, 8.75rem); line-height: 1; letter-spacing: 0; }
.h1 { font-weight: 300; font-size: clamp(2.5rem, 1.6rem + 3.6vw, 5rem); line-height: 1.05; }
.h2 { font-weight: 300; font-size: clamp(1.75rem, 1.45rem + 1.1vw, 2.25rem); line-height: 1.2; }
.h3 { font-weight: 400; font-size: 1.5rem; line-height: 1.3; }
.h4 { font-weight: 400; font-size: 1.25rem; line-height: 1.35; }
.lead { font-size: clamp(1.125rem, 1rem + .45vw, 1.375rem); line-height: 1.45; max-width: 36em; color: var(--he-testo); }
.corpo { max-width: 62ch; }
.didascalia { font-size: .875rem; line-height: 1.5; color: var(--he-testo-secondario); }
.etichetta-es { display: inline-flex; align-items: center; gap: 10px; font-size: .875rem; line-height: 1.5; color: var(--he-testo-secondario); }
.etichetta-es::before { content: ""; width: 24px; height: 1.5px; background: currentColor; }
.collegamento { display: inline-flex; align-items: center; min-height: 44px; gap: 8px; }

/* bottoni */
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 28px; border-radius: var(--r2);
  font-family: var(--font-testo); font-size: 1rem; line-height: 1.2; white-space: nowrap; text-decoration: none;
  user-select: none; -webkit-user-select: none;
  transition: background-color 160ms ease, color 160ms ease, transform 120ms var(--ease-uscita);
}
.btn--primario { background: var(--he-bottone-fondo); color: var(--he-bottone-testo); }
.btn--secondario { color: var(--he-titolo-accento); box-shadow: inset 0 0 0 1.5px var(--he-accento-ui); }
.btn--chiaro { background: #FFFFFF; color: #1A1A1A; }
.btn:active { transform: scale(.98); }
@media (hover: hover) and (pointer: fine) {
  .btn--primario:hover { background: var(--he-testo-forte); color: var(--he-fondo); }
  .btn--secondario:hover { background: var(--he-superficie); }
  .btn--chiaro:hover { background: #EBF8FD; color: #1A1A1A; }
  :root[data-tema="scuro"] .btn--primario:hover, .su-scuro .btn--primario:hover { background: #73CCEE; color: #1A1A1A; }
}
@media (hover: hover) and (pointer: fine) and (prefers-color-scheme: dark) { :root:not([data-tema="chiaro"]) .btn--primario:hover { background: #73CCEE; color: #1A1A1A; } }
@media (width < 800px) { .btn { min-height: 52px; } }

.salta { position: absolute; left: 16px; top: -100px; z-index: 100; background: var(--he-bottone-fondo); color: var(--he-bottone-testo); padding: 12px 20px; border-radius: var(--r2); text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.salta:focus { top: 16px; }

/* fascia «Anteprima» */
.fascia { background: var(--he-fondo-alt); border-bottom: 1px solid var(--he-linea-sottile); font-size: .875rem; line-height: 1.5; color: var(--he-testo-secondario); }
.fascia__in { display: flex; align-items: center; justify-content: space-between; gap: 8px 24px; min-height: 44px; flex-wrap: wrap; padding-block: 4px; }
.fascia__testo { padding-block: 4px; }
.fascia__testo b { font-weight: 400; color: var(--he-testo-forte); }
.fascia__comandi { display: flex; align-items: center; gap: 4px 16px; flex-wrap: wrap; }
.fascia__aiuto { padding-block: 0 10px; }
.fascia__aiuto p { max-width: 80ch; }
@media (width < 800px) { .fascia__in { flex-direction: column; align-items: flex-start; gap: 0; padding-block: 6px 4px; } .fascia .tema { display: none; } }
.tema { display: inline-flex; border: 0; margin: 0; padding: 0; }
.tema legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tema label { position: relative; display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px; cursor: pointer; color: var(--he-testo-secondario); user-select: none; -webkit-user-select: none; }
.tema input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.tema label span { padding-block: 2px; border-bottom: 1.5px solid transparent; }
.tema input:checked + span { color: var(--he-testo-forte); border-bottom-color: var(--he-accento-ui); }
.tema label:has(input:focus-visible) { outline: 3px solid var(--he-accento-ui); outline-offset: -3px; border-radius: var(--r1); }
.interruttore { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; text-align: left; cursor: pointer; user-select: none; -webkit-user-select: none; }
.interruttore__binario { position: relative; flex: none; width: 44px; height: 24px; border-radius: var(--r2); box-shadow: inset 0 0 0 1.5px var(--he-accento-ui); }
.interruttore__pomello { position: absolute; left: 4px; top: 4px; width: 16px; height: 16px; border-radius: var(--r1); background: var(--he-accento-ui); transition: transform 180ms var(--ease-uscita), background-color 180ms ease; }
.interruttore[aria-checked="true"] .interruttore__binario { background: var(--he-accento-ui); }
.interruttore[aria-checked="true"] .interruttore__pomello { transform: translateX(20px); background: var(--he-fondo); }
.interruttore__stato { min-width: 3.8em; }
.dc-pulsante { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border-radius: var(--r2); font-size: .875rem; color: var(--he-testo-forte);
  border: 1.5px dashed var(--he-accento-ui); user-select: none; -webkit-user-select: none; white-space: nowrap; }
.dc-pulsante[aria-pressed="true"] { background: var(--he-fondo-alt); border-style: solid; }
.dc-pulsante:active { transform: scale(.98); }
mark { background: none; color: inherit; }
html.evidenzia mark.dc { outline: 1.5px dashed var(--he-accento-ui); outline-offset: 2px; border-radius: 2px; cursor: help; }
html.evidenzia mark.dc:focus-visible { outline: 3px solid var(--he-accento-ui); }
.nota-dc { position: absolute; z-index: var(--z-nota); max-width: min(280px, calc(100vw - 32px)); padding: 10px 12px; border-radius: var(--r2); background: var(--he-testo-forte); color: var(--he-fondo); font-size: .875rem; line-height: 1.5; box-shadow: var(--ombra); }
mark.segnaposto { background: var(--he-fondo-alt); border-radius: var(--r1); padding: 0 2px; text-decoration: underline dotted 1.5px var(--he-accento-ui); text-underline-offset: .2em; }

/* testata: su fondo pieno, mai trasparente */
.testata { position: sticky; top: 0; z-index: var(--z-header); background: var(--he-fondo); border-bottom: 1px solid var(--he-linea-sottile); }
.testata__in { display: flex; align-items: center; gap: 32px; height: var(--header-h); }
.logo { display: block; flex: none; border-radius: var(--r1); }
.logo img { width: 280px; height: auto; }
.logo .logo--scuro { display: none; }
:root[data-tema="scuro"] .logo .logo--chiaro { display: none; }
:root[data-tema="scuro"] .logo .logo--scuro { display: block; }
@media (prefers-color-scheme: dark) { :root:not([data-tema="chiaro"]) .logo .logo--chiaro { display: none; } :root:not([data-tema="chiaro"]) .logo .logo--scuro { display: block; } }
.piede .logo .logo--chiaro { display: none !important; }
.piede .logo .logo--scuro { display: block !important; }
.nav { margin-left: auto; }
.testata .dc-pulsante { flex: none; }
.nav ul { display: flex; gap: 4px 28px; }
.nav a { position: relative; display: inline-flex; align-items: center; min-height: 44px; font-size: .9375rem; color: var(--he-testo-forte); text-decoration: none; }
.nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 8px; height: 1.5px; background: var(--he-accento-ui); transform: scaleX(0); transform-origin: left; transition: transform 200ms var(--ease-uscita); }
.nav a[aria-current="page"]::after { transform: scaleX(1); }
@media (hover: hover) and (pointer: fine) { .nav a:hover { color: var(--he-titolo-accento); } .nav a:hover::after { transform: scaleX(1); } }
.testata__cta { flex: none; }
.menu-apri { display: none; flex: none; width: 44px; height: 44px; position: relative; color: var(--he-testo-forte); border-radius: var(--r2); margin-left: auto; }
.menu-apri span { position: absolute; left: 10px; width: 24px; height: 2px; border-radius: 1px; background: currentColor; }
.menu-apri span:first-child { top: 17px; } .menu-apri span:last-child { top: 25px; }
@media (width < 1100px) {
  html.js .nav, html.js .testata .dc-pulsante { display: none; }
  html.js .menu-apri { display: block; margin-left: 0; }
  html.js .testata__cta { margin-left: auto; }
}
@media (width < 800px) {
  .logo img { width: 240px; }
  html.js .testata__cta { display: none; }
  html.js .menu-apri { margin-left: auto; }
  html:not(.js) .testata { position: static; }
  html:not(.js) .testata__in { flex-wrap: wrap; height: auto; padding-block: 8px; gap: 0 16px; }
  html:not(.js) .nav { margin: 0; }
  html:not(.js) .testata__cta { min-height: 44px; padding: 0 16px; }
}
@media (max-width: 359px) { .testata__in { gap: 4px; } }
.menu { position: fixed; inset: 0; z-index: var(--z-menu); background: var(--he-fondo); overflow-y: auto; overscroll-behavior: contain; padding: env(safe-area-inset-top, 0px) 0 calc(24px + env(safe-area-inset-bottom, 0px)); }
.menu__testa { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }
.menu__chiudi { width: 44px; height: 44px; position: relative; color: var(--he-testo-forte); border-radius: var(--r2); }
.menu__chiudi span { position: absolute; left: 10px; top: 21px; width: 24px; height: 2px; border-radius: 1px; background: currentColor; }
.menu__chiudi span:first-child { transform: rotate(45deg); } .menu__chiudi span:last-child { transform: rotate(-45deg); }
.menu__chevron { position: absolute; right: 0; top: calc(var(--header-h) + 8px); width: 96px; height: 80px; color: var(--he-accento); pointer-events: none; }
.menu__voci { margin-top: 24px; position: relative; }
.menu__voci li { border-bottom: 1px solid var(--he-linea-sottile); }
.menu__voci a { display: flex; align-items: center; min-height: 64px; font-family: var(--font-titoli); font-weight: 300; font-size: 2rem; line-height: 1.2; color: var(--he-testo-forte); text-decoration: none; }
.menu__voci a[aria-current="page"] { color: var(--he-titolo-accento); }
.menu__azioni { display: grid; gap: 16px; margin-top: 32px; justify-items: center; }
.menu__azioni .btn { width: 100%; }
.menu__azioni a.tel { display: inline-flex; align-items: center; min-height: 44px; }
.menu .tema { margin-top: 8px; font-size: .875rem; }
@media (prefers-reduced-motion: no-preference) {
  .menu.apre { animation: menu-apre 320ms var(--ease-sheet) both; }
  .menu.apre .menu__voci li, .menu.apre .menu__azioni { animation: voce-entra 240ms var(--ease-uscita) both; animation-delay: calc(80ms + var(--i, 0) * 40ms); }
  .menu.chiude { animation: menu-chiude 200ms var(--ease-sheet) both; }
}
@keyframes menu-apre { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0); } }
@keyframes menu-chiude { from { clip-path: inset(0); } to { clip-path: inset(0 0 100% 0); } }
@keyframes voce-entra { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* colmo a tetto: fascia con bordo superiore a due falde e fino a 3 linee parallele (solo CSS, scala a ogni larghezza) */
.colmo { position: relative; --n: 1; padding-top: calc(var(--n) * var(--tetto-passo)); }
.colmo__vetro { position: relative; overflow: hidden; clip-path: polygon(0 var(--tetto), 50% 0, 100% var(--tetto), 100% 100%, 0 100%); background: var(--he-fondo-alt); }
.colmo__vetro img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.colmo__linea { position: absolute; left: 0; right: 0; height: calc(var(--tetto) + 2px); top: calc((var(--n) - 1 - var(--k)) * var(--tetto-passo)); background: var(--linea, var(--he-accento));
  clip-path: polygon(0 var(--tetto), 50% 0, 100% var(--tetto), 100% calc(var(--tetto) + 1.5px), 50% 1.5px, 0 calc(var(--tetto) + 1.5px)); pointer-events: none; }
.colmo__linea:nth-of-type(1) { --k: 0; }
.colmo__linea:nth-of-type(2) { --k: 1; opacity: .6; }
.colmo__linea:nth-of-type(3) { --k: 2; opacity: .3; }

/* piede */
.piede { background: #1A1A1A; color: #FFFFFF; padding-block: 64px calc(48px + env(safe-area-inset-bottom, 0px)); }
:root[data-tema="scuro"] .piede { border-top: 1px solid #3D3D3D; }
@media (prefers-color-scheme: dark) { :root:not([data-tema="chiaro"]) .piede { border-top: 1px solid #3D3D3D; } }
.piede__in { display: grid; gap: 32px; }
.piede__marca { display: grid; gap: 16px; }
.piede__firma, .piede__indirizzo, .piede__note p { color: #B8B8B8; font-size: .875rem; line-height: 1.5; }
.piede__firma { font-size: 1rem; }
.piede__link { display: flex; flex-wrap: wrap; gap: 0 24px; }
.piede__link a { display: inline-flex; align-items: center; min-height: 44px; color: #FFFFFF; }
.piede__destra { display: grid; gap: 12px; align-content: start; }
@media (min-width: 1000px) { .piede__in { grid-template-columns: 1fr auto; align-items: start; } .piede__destra { justify-items: end; text-align: right; } }
@media (width < 800px) { .piede .logo img { width: 240px; } }
.piede :focus-visible { outline-color: #73CCEE; }

/* pagine legali */
.legale { padding-block: 64px 96px; }
.legale__colonna { max-width: 62ch; display: grid; gap: 24px; }
.legale h2 { font-family: var(--font-titoli); font-weight: 300; font-size: 1.75rem; line-height: 1.25; color: var(--he-testo-forte); margin-top: 24px; }
.bozza { border: 1.5px dashed var(--he-accento-ui); background: var(--he-fondo-alt); border-radius: var(--r2); padding: 24px; display: grid; gap: 8px; }
.bozza--piccola { padding: 16px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; } .nav a::after { transition: none; } }
