/* DRM Informatica — stile demo 2026 */
:root {
  --green: #0b9a3c;
  --green-dark: #077a2f;
  --green-soft: #e6f5ec;
  --ink: #14181c;
  --ink-2: #3c444d;
  --muted: #6b747e;
  --line: #e3e6e9;
  --bg: #f7f8f7;
  --surface: #ffffff;
  --hero: #12161a;
  --hero-ink: #f2f4f3;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(20,24,28,.05), 0 8px 24px rgba(20,24,28,.06);
  --max: 1160px;
  --orange: #f07c1b;
  --orange-ink: #c45f0a; /* arancio per testo su fondo chiaro (contrasto) */
  --logo-accent: #0b9a3c;   /* colori del marchio DRM: fissi, non cambiano con i temi */
  --logo-accent2: #f07c1b;
  /* accenti sulle fasce scure (hero, Voce e Internet, teleassistenza) */
  --hl: #49d27a;
  --hl2: #ff9845;
  --on-hl: #0d1a12;
  --on-hl2: #1a1206;
  --hero-muted: #b9c2bc;
  --hero-faint: #8f9a93;
  --hero-node: #141a17;
  --band-surface: #2a2f33;
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-head: var(--font);
  color-scheme: light;
}
/* Tema scuro: <html data-theme="dark"> (predefinito). L'interruttore in alto passa a data-theme="light" (inc/theme.php) */
:root[data-theme="dark"] {
  --green: #2fbf5f;
  --green-dark: #23a24f;
  --green-soft: #24402f;
  --ink: #f0f2f1;
  --ink-2: #d0d5d2;
  --muted: #a9b0ac;
  --line: #474d52;
  --bg: #2c3135;
  --surface: #363b40;
  --hero: #1f2326;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.3);
  --orange: #ff9845;
  --orange-ink: #ff9845;
  --logo-accent: #2fbf5f;
  --logo-accent2: #ff9845;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
}
img, svg { max-width: 100%; }
a { color: var(--green-dark); text-decoration-thickness: 1px; text-underline-offset: 3px; }
:where([data-theme="dark"]) a { color: var(--green); }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.15; letter-spacing: -.02em; margin: 0 0 .5em; }
h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); }
h3 { font-size: 1.12rem; letter-spacing: -.01em; }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.eyebrow {
  display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--orange-ink); margin-bottom: .8rem;
}

/* barra demo */
.demo-bar {
  background: repeating-linear-gradient(-45deg, #ffcf3f, #ffcf3f 12px, #ffd65c 12px, #ffd65c 24px);
  color: #2a2100; font-size: .85rem; text-align: center; padding: 6px 12px; font-weight: 600;
}

/* header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 24px; min-height: 96px; }
.brand { display: flex; color: var(--ink); }
.brand .logo { height: 84px; width: auto; }
.nav { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.nav a {
  color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: .95rem;
  padding: 8px 12px; border-radius: 8px;
}
.nav a:hover { background: var(--green-soft); color: var(--ink); }
.nav-toggle { display: none; }
/* sito a pagine: percorso, servizi correlati, home */
.briciole { display: flex; flex-wrap: wrap; gap: 8px; font-size: .82rem; font-weight: 600; letter-spacing: .04em; color: var(--hero-faint); margin-bottom: 18px; }
.briciole a { color: var(--hl2); text-decoration: none; }
.briciole a:hover { text-decoration: underline; }
.briciole [aria-current] { color: var(--hero-muted); }
.hero-sub h1 { font-size: clamp(2rem, 4.6vw, 3.4rem); max-width: 20ch; margin-bottom: .35em; }
.hero.hero-sub .deco { opacity: .32; }
.hero.hero-sub .deco-mini { opacity: .38; }
.hero-sub :is(.deco-wifi, .deco-rack, .deco-nuvola, .deco-telecamera) { width: 440px; right: 4%; top: 30px; }
.hero-sub + #teleassistenza { padding-top: clamp(48px, 7vw, 80px) !important; }
.correlati { background: var(--surface); border-top: 1px solid var(--line); }
.correlato { text-decoration: none; color: inherit; display: flex; flex-direction: column; }
.correlato .card-link { margin-top: auto; padding-top: 14px; }
.home-partner .marchi-riga { margin: 0 0 28px; }
.home-cta { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 24px; }
.home-cta h2 { margin-bottom: .3em; }
.home-cta p { color: var(--muted); margin: 0; }

/* pagina impianti e cablaggio */
.imp-grid, .cavi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.imp-grid .checks { margin: 16px 0 0; }
.schermi { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
.schermi div { padding: 14px 16px; border-radius: 10px; border-left: 3px solid var(--green); background: var(--surface); border-top: 1px solid var(--line); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.schermi b { display: block; font-size: 1.05rem; margin-bottom: 4px; }
.schermi span { font-size: .9rem; color: var(--muted); }
.galleria { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.galleria figure { margin: 0; border-radius: var(--radius); overflow: hidden; background: var(--bg); border: 1px solid var(--line); }
.galleria img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .5s ease; }
.galleria figure:hover img { transform: scale(1.04); }
.galleria figcaption { padding: 10px 14px 12px; font-size: .86rem; color: var(--muted); }
.due-col { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.due-col .card { display: flex; flex-direction: column; align-items: flex-start; }
.card-feature-fibra { border-color: color-mix(in srgb, var(--orange) 45%, var(--line)); }
.tag-verde { background: var(--hl); color: var(--on-hl); }
.crediti { padding: 22px 0; border-top: 1px solid var(--line); }
.crediti p { font-size: .78rem; color: var(--muted); margin: 0; }
@media (max-width: 980px) { .imp-grid, .cavi-grid { grid-template-columns: 1fr 1fr; } .galleria { grid-template-columns: 1fr 1fr; } .due-col { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .imp-grid, .cavi-grid, .schermi, .galleria { grid-template-columns: 1fr; } }

/* le ancore del menu non finiscono sotto la barra fissa */
section[id], .sub-section[id] { scroll-margin-top: 76px; }

/* menu a tendina Servizi */
.nav-drop { position: relative; }
.nav-drop-btn {
  display: inline-flex; align-items: center; gap: 4px; font: inherit; font-weight: 500; font-size: .95rem;
  color: var(--ink-2); background: none; border: 0; padding: 8px 12px; border-radius: 8px; cursor: pointer;
}
.nav-drop-btn svg { width: 15px; height: 15px; transition: transform .2s; }
.nav-drop-btn:hover, .nav-drop.open .nav-drop-btn { background: var(--green-soft); color: var(--ink); }
.mega {
  position: absolute; top: calc(100% + 10px); left: 50%; z-index: 30; width: min(760px, 92vw);
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px 18px; padding: 20px 22px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 18px 40px rgba(0,0,0,.28);
  opacity: 0; visibility: hidden; transform: translate(-50%, 6px); transition: opacity .18s, transform .18s, visibility .18s;
}
.mega::before { content: ""; position: absolute; left: 0; right: 0; top: -12px; height: 12px; } /* ponte per l'hover */
@media (hover: hover) and (min-width: 761px) {
  .nav-drop:hover .mega, .nav-drop:focus-within .mega { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
  .nav-drop:hover .nav-drop-btn svg { transform: rotate(180deg); }
}
.nav-drop.open .mega { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.nav-drop.open .nav-drop-btn svg { transform: rotate(180deg); }
.mega-col { display: grid; align-content: start; gap: 2px; }
.mega-title { font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--orange-ink); padding: 0 8px 6px; }
.nav .mega a { font-size: .9rem; padding: 6px 8px; border-radius: 6px; }
.nav .mega a.mega-all { grid-column: 1 / -1; margin-top: 8px; padding-top: 12px; border-top: 1px solid var(--line); border-radius: 0; color: var(--green); font-weight: 600; }
.nav .nav-home { display: inline-flex; align-items: center; gap: 6px; }
.nav-home svg { width: 17px; height: 17px; flex: none; }
@media (min-width: 761px) and (max-width: 1180px) { .nav-home span { display: none; } }

/* interruttore tema chiaro/scuro */
.theme-switch {
  order: 2; /* dopo il menu su desktop, prima dell'hamburger su mobile */
  position: relative; flex: none; width: 60px; height: 32px; padding: 0; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: var(--bg); color: var(--muted);
  display: inline-flex; align-items: center; justify-content: space-between; padding-inline: 8px;
}
.theme-switch svg { width: 15px; height: 15px; position: relative; z-index: 1; transition: color .25s; }
.theme-switch::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%;
  background: var(--orange); box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .25s ease;
}
.theme-switch .sun { color: #fff; }
[data-theme="dark"] .theme-switch::after { transform: translateX(28px); background: var(--green); }
[data-theme="dark"] .theme-switch .sun { color: var(--muted); }
[data-theme="dark"] .theme-switch .moon { color: #0d1410; }
.theme-switch:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
body { transition: background-color .25s, color .25s; }

.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  font: inherit; font-weight: 600; font-size: .95rem; text-decoration: none;
  padding: 11px 20px; border-radius: 10px; border: 1px solid transparent; cursor: pointer;
  transition: background .15s, border-color .15s, transform .15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--green); color: var(--on-accent, #fff); }
.btn-primary:hover { background: var(--green-dark); color: var(--on-accent, #fff); }
.btn-ghost { border-color: rgba(255,255,255,.25); color: var(--hero-ink); }
.btn-ghost:hover { border-color: rgba(255,255,255,.6); color: #fff; }
.nav .btn-primary { color: var(--on-accent, #fff); margin-left: 8px; }
.nav .btn-primary:hover { background: var(--green-dark); }

/* hero */
.hero {
  position: relative; overflow: hidden; background: var(--hero); color: var(--hero-ink);
  padding: clamp(64px, 10vw, 120px) 0 clamp(56px, 8vw, 96px);
}
.hero::before {
  /* griglia a punti, tipo PCB */
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.07) 1px, transparent 1.2px);
  background-size: 26px 26px;
  -webkit-mask-image: linear-gradient(to left, #000 20%, transparent 85%);
          mask-image: linear-gradient(to left, #000 20%, transparent 85%);
}
.hero::after {
  /* alone verde dietro il circuito */
  content: ""; position: absolute; right: -10%; top: 10%; width: 55%; aspect-ratio: 1;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--hl) 14%, transparent), transparent);
}
.hero-bg {
  position: absolute; top: 0; right: 0; height: 100%; width: min(70%, 900px);
  -webkit-mask-image: linear-gradient(to left, #000 40%, transparent 82%);
          mask-image: linear-gradient(to left, #000 40%, transparent 82%);
}
@media (prefers-reduced-motion: reduce) { .hero-bg .packets { display: none; } }
@media (max-width: 760px) { .hero-bg { width: 100%; opacity: .45; } }
.hero .wrap { position: relative; z-index: 1; }
.hero .eyebrow { color: var(--hl2); }
.hero-facts strong::after { content: "."; color: var(--hl2); }
.hero h1 { font-size: clamp(2.2rem, 5.4vw, 4rem); max-width: 15ch; margin-bottom: .4em; }
.hero h1 em { font-style: normal; color: var(--hl); }
.hero p.lead { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--hero-muted); max-width: 56ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-facts {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px;
  margin-top: clamp(48px, 7vw, 80px); background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.08); border-radius: var(--radius); overflow: hidden;
}
.hero-facts div { background: var(--hero); padding: 20px 22px; }
.hero-facts strong { display: block; font-size: 1.7rem; letter-spacing: -.02em; color: #fff; }
.hero-facts span { font-size: .88rem; color: var(--hero-faint); }

/* sezioni */
section { padding: clamp(64px, 9vw, 110px) 0; }
.section-head { max-width: 680px; margin-bottom: 44px; }
.section-head p { color: var(--muted); font-size: 1.08rem; }

.grid { display: grid; gap: 18px; }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow); transition: border-color .2s, transform .2s;
}
.card:hover { border-color: color-mix(in srgb, var(--green) 45%, var(--line)); transform: translateY(-2px); }
.card p { color: var(--muted); font-size: .97rem; margin: 0; }
.icon {
  width: 44px; height: 44px; border-radius: 11px; display: grid; place-items: center;
  background: var(--green-soft); color: var(--green-dark); margin-bottom: 18px;
}
:where([data-theme="dark"]) .icon { color: var(--green); }
.icon svg { width: 22px; height: 22px; }

/* metodo */
.alt { background: var(--surface); border-block: 1px solid var(--line); }
.steps { counter-reset: s; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; }
.step { position: relative; padding-top: 52px; }
.step::before {
  counter-increment: s; content: "0" counter(s);
  position: absolute; top: 0; left: 0; font-weight: 800; font-size: 1.9rem; color: var(--orange);
  letter-spacing: -.03em;
}
.step p { color: var(--muted); font-size: .97rem; }

/* decorazioni di sezione (inc/deco.php) */
.has-deco { position: relative; overflow: hidden; }
.has-deco > .wrap { position: relative; z-index: 1; }
.deco { position: absolute; pointer-events: none; color: var(--green); opacity: .36; height: auto; }
:where([data-theme="dark"]) .deco { opacity: .36; }
.deco-rack { width: 360px; right: -50px; top: 50px; transform: rotate(-8deg); }
.deco-segnale { width: 560px; right: -60px; top: -10px; color: #fff; opacity: .28; }
.deco-maglia { width: 380px; right: 2%; top: 24px; }
.deco-mappa { width: 460px; right: -70px; top: 10px; }
.remote { position: relative; overflow: hidden; border: 1px solid var(--line); }
.remote > div { position: relative; z-index: 1; }
.deco-remoto { width: 300px; left: 36%; bottom: -36px; color: #fff; opacity: .16; }
.steps { position: relative; }
.deco-flusso { top: 0; left: 0; width: 100%; height: 40px; color: var(--orange); opacity: .85; }
.step::before { background: var(--surface); padding-right: 14px; }
/* grafiche che si muovono con lo scroll (parallasse) ed entrano quando la sezione arriva a schermo.
   --p va da circa -1 a 1 mentre la grafica attraversa lo schermo: lo imposta lo script in inc/layout.php */
.deco { translate: 0 calc(var(--p, 0) * var(--sp, 70px)); transition: opacity 1s ease, scale 1s ease; }
.deco.deco-flusso { translate: none; transition: none; }
.deco:not(.vista):not(.deco-flusso) { opacity: 0 !important; scale: .88; }
.deco-mini { width: 64px; opacity: .3; rotate: calc(var(--p, 0) * 28deg); }
.hero .deco-mini, .band-dark .deco-mini { color: var(--hl); opacity: .34; }
@media (max-width: 1100px) { .deco-mini { display: none; } }
@media (prefers-reduced-motion: reduce) { .deco { translate: none; rotate: none; } }

/* decorazioni animate (inc/deco.php): lente e discrete, ferme per chi ha chiesto meno movimento */
@media (prefers-reduced-motion: no-preference) {
  .deco .a-flow { animation: deco-flow 1.4s linear infinite; }
  .deco .a-blink { animation: deco-blink 2.6s ease-in-out infinite; animation-delay: calc(var(--i, 0) * -.37s); }
  .deco .a-pulse { animation: deco-pulse 2.4s ease-in-out infinite; animation-delay: calc(var(--i, 0) * .3s); }
  .deco .a-float { animation: deco-float 6s ease-in-out infinite; }
  .deco .a-spin { transform-box: fill-box; transform-origin: center; animation: deco-spin 16s linear infinite; }
  .deco .a-pan { transform-box: view-box; transform-origin: 80px 92px; animation: deco-pan 8s ease-in-out infinite alternate; }
  .deco .a-draw { stroke-dasharray: 130; animation: deco-draw 5s ease-in-out infinite; }
}
@keyframes deco-flow { to { stroke-dashoffset: -20; } }
@keyframes deco-blink { 0%, 100% { opacity: 1; } 50% { opacity: .15; } }
@keyframes deco-pulse { 0%, 100% { opacity: .15; } 40% { opacity: 1; } }
@keyframes deco-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes deco-spin { to { transform: rotate(360deg); } }
@keyframes deco-pan { from { transform: rotate(-7deg); } to { transform: rotate(9deg); } }
@keyframes deco-draw { 0% { stroke-dashoffset: 130; } 35%, 80% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: -130; } }

/* grafiche di sfondo delle sezioni aggiunte */
.deco-cluster { width: 400px; right: -40px; top: 40px; }
.deco-nuvola { width: 460px; right: -60px; top: 30px; }
.deco-wifi { width: 380px; right: -30px; top: 30px; }
.deco-telecamera { width: 460px; right: -40px; top: 20px; }
.deco-lucchetto { width: 300px; left: 6%; top: 40px; transform: rotate(-8deg); }
.hero .deco { color: var(--hl); opacity: .26; }
.deco-scudo { width: 360px; right: 4%; top: 30px; }
.deco-centralino { width: 420px; right: 3%; top: 40px; }
.deco-firewall { width: 380px; right: -30px; top: 40px; }
.deco-postazione { width: 360px; right: -30px; top: 40px; }
.deco-fibra { width: 440px; right: -60px; top: 50px; }
.deco-radar { width: 360px; right: -40px; top: 30px; }
.deco-globo { width: 380px; right: -50px; top: 30px; }
/* stesso disegno sul lato sinistro della sezione */
.deco.deco-sx { right: auto; left: -60px; top: 32%; max-width: 380px; transform: none; }
.hero .deco.deco-sx, .band-dark .deco.deco-sx { color: var(--hl); }
@media (max-width: 1100px) { .deco.deco-sx { opacity: .2 !important; } }
@media (max-width: 760px) { .deco.deco-sx { display: none; } .deco-firewall, .deco-postazione, .deco-fibra, .deco-radar, .deco-globo { width: 240px; right: -60px; } }
.sub-section { position: relative; }
.band-dark .sub-section { border-top-color: rgba(255,255,255,.12); }
#asterisk-box { margin-top: clamp(40px, 6vw, 64px); padding-top: clamp(40px, 6vw, 64px); }
#asterisk-box .card-wide { margin-top: 0; }
.sub-section > .deco-rack { width: 300px; right: -40px; top: 30px; transform: rotate(6deg); opacity: .12; }
.sub-section > :not(.deco) { position: relative; z-index: 1; }
@media (max-width: 980px) { .deco-scudo, .deco-centralino { opacity: .08; width: 300px; right: -40px; } }
@media (max-width: 760px) {
  .deco-cluster, .deco-nuvola, .deco-wifi, .deco-telecamera { width: 260px; right: -70px; }
  .deco-lucchetto { display: none; }
  .deco-rack, .deco-maglia, .deco-mappa { width: 240px; right: -60px; }
  .deco-segnale { width: 380px; }
  .deco-remoto, .deco-flusso { display: none; }
}

/* voce e internet (CPN) */
.band-dark {
  background: var(--hero); color: var(--hero-ink);
  --surface: var(--band-surface); --line: rgba(255,255,255,.12); --muted: var(--hero-muted); --ink: #f2f4f3;
  --green-soft: color-mix(in srgb, var(--hl) 14%, transparent); --green-dark: var(--hl); --orange-ink: var(--hl2);
  --shadow: none;
}
.band-dark h2, .band-dark h3 { color: #fff; }
.cpn-grid { display: grid; grid-template-columns: 1.25fr 1fr 1fr; gap: 18px; }
.card-feature {
  grid-row: span 2; display: flex; flex-direction: column; align-items: flex-start;
  border-color: color-mix(in srgb, var(--hl2) 45%, transparent);
  background: linear-gradient(160deg, color-mix(in srgb, var(--hl2) 10%, transparent), transparent 55%), var(--surface);
}
.card-feature h3 { font-size: 1.4rem; }
.card-feature .btn { margin-top: auto; }
.tag {
  font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--on-hl2); background: var(--hl2); padding: 3px 9px; border-radius: 999px; margin-bottom: 12px;
}
.checks { list-style: none; padding: 0; margin: 18px 0 26px; display: grid; gap: 10px; font-size: .95rem; color: var(--ink-2, #c4cac6); }
.band-dark .checks { color: color-mix(in srgb, var(--hero-muted) 60%, #fff); }
.checks li { position: relative; padding-left: 28px; }
.checks li::before {
  content: ""; position: absolute; left: 0; top: .35em; width: 16px; height: 16px; border-radius: 50%;
  background: color-mix(in srgb, var(--hl) 18%, transparent);
}
.checks li::after {
  content: ""; position: absolute; left: 0; top: .35em; width: 16px; height: 16px; background: var(--hl);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m4.5 8.2 2.2 2.2 4.8-4.8' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/100% no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m4.5 8.2 2.2 2.2 4.8-4.8' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/100% no-repeat;
}
/* card larga a due colonne: testo + elenco (Asterisk, Proxmox Backup Server) */
.card-wide {
  margin-top: 18px; display: grid; grid-template-columns: 1fr 1.15fr; gap: 40px; align-items: center;
  border-color: color-mix(in srgb, var(--green) 45%, transparent);
  background: linear-gradient(200deg, color-mix(in srgb, var(--green) 10%, transparent), transparent 55%), var(--surface);
}
.card-wide > div { display: flex; flex-direction: column; align-items: flex-start; }
.card-wide h3 { font-size: 1.4rem; }
.card-wide p { margin-bottom: 22px; }
.card-wide .tag { background: var(--hl); color: var(--on-hl); }
.card-wide .checks { margin: 0; }
.card-wide .checks strong { color: var(--ink); }
@media (max-width: 860px) { .card-wide { grid-template-columns: 1fr; gap: 24px; } }

/* cloud e hosting: card dei provider con il riquadro logo in testa */
.cloud-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.cloud-grid .marchio { margin-bottom: 20px; }
.cloud-grid .checks { margin: 16px 0 0; }
@media (max-width: 980px) { .cloud-grid { grid-template-columns: 1fr; } }

/* server e virtualizzazione (Proxmox) */
.px-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.px-grid .card { display: flex; flex-direction: column; }
.px-grid .checks { margin: 16px 0 0; }
.px-mig { display: grid; gap: 10px; margin: 16px 0; }
.px-mig div {
  padding: 10px 14px; border-radius: 10px; border-left: 3px solid var(--orange);
  background: color-mix(in srgb, var(--orange) 8%, transparent);
}
.px-mig strong { display: block; font-size: .93rem; }
.px-mig span { display: block; font-size: .88rem; color: var(--muted); line-height: 1.45; }
.card p.px-note { font-size: .88rem; margin-top: auto; }
.card-pbs .tag { background: var(--hl2); color: var(--on-hl2); }
.card-unifi .marchio { margin-bottom: 18px; }
.px-grid-gap { margin-top: 18px; }

/* VLAN 802.1Q: schema a righe colorate sotto il trunk */
.card-vlan { margin: 0; align-items: start; }
.card-vlan .checks { margin-top: 0; }
.vlan { display: grid; gap: 8px; padding: 18px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); }
.vlan-trunk {
  display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap;
  padding: 12px 14px; border-radius: 8px; font-weight: 700;
  background: repeating-linear-gradient(90deg, #2fbf5f 0 20%, #ff9845 20% 40%, #4c9be8 40% 60%, #b07be0 60% 80%, #e0c341 80% 100%) bottom / 100% 4px no-repeat, var(--surface);
}
.vlan-trunk small { font-weight: 500; color: var(--muted); }
.vlan-row {
  display: grid; grid-template-columns: 84px 1fr; align-items: center; gap: 12px; margin-left: 22px; position: relative;
  padding: 9px 14px; border-radius: 8px; background: var(--surface); border-left: 4px solid var(--c);
}
.vlan-row::before { content: ""; position: absolute; left: -22px; top: -8px; bottom: 50%; width: 14px; border: solid var(--line); border-width: 0 0 2px 2px; border-bottom-left-radius: 6px; }
.vlan-row b { font-size: .85rem; color: var(--c); font-variant-numeric: tabular-nums; }
.vlan-row span { font-size: .93rem; }
.card p.vlan-note { font-size: .82rem; margin: 6px 0 0; }

/* sottosezione cablaggio e armadi rack */
.sub-section { margin-top: clamp(56px, 8vw, 90px); padding-top: clamp(40px, 6vw, 64px); border-top: 1px solid var(--line); }
.sub-title { font-size: clamp(1.4rem, 2.4vw, 1.8rem); letter-spacing: -.02em; }
.cab-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.cab { border-top: 4px solid var(--orange); }
.cab-cat { display: block; font-size: 1.7rem; letter-spacing: -.02em; line-height: 1.1; }
.cab-sub { display: block; font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--orange-ink); margin: 6px 0 12px; }
.cab-rack { margin-top: 18px; display: grid; grid-template-columns: 1fr 1.3fr; gap: 40px; align-items: center; }
.cab-rack .checks { margin: 0; }
@media (max-width: 860px) { .cab-grid, .cab-rack { grid-template-columns: 1fr; } .cab-rack { gap: 20px; } }
@media (max-width: 980px) { .px-grid { grid-template-columns: 1fr 1fr; } .px-grid .card:nth-child(2) { grid-row: span 2; } }
@media (max-width: 760px) { .px-grid { grid-template-columns: 1fr; } .px-grid .card:nth-child(2) { grid-row: auto; } }
@media (max-width: 980px) { .cpn-grid { grid-template-columns: 1fr 1fr; } .card-feature { grid-row: auto; grid-column: 1 / -1; } }
@media (max-width: 760px) { .cpn-grid { grid-template-columns: 1fr; } }

/* partner: marchi per categoria (inc/marchi.php). Riquadri tutti uguali, righe centrate */
.marchi { display: grid; gap: 40px; }
.marchi-cat h3 {
  display: flex; align-items: center; gap: 16px; font-size: .8rem; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 18px;
}
.marchi-cat h3::before, .marchi-cat h3::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.marchi-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
/* riquadri dei loghi, stile "schede in vetro": scheda trasparente con bordo verde tenue,
   logo a colori su una piastrina chiara ma smorzata (per non abbagliare sui fondi scuri), alone al passaggio */
:root { --tile: color-mix(in srgb, var(--bg) 55%, #fff); --tile-dark: color-mix(in srgb, #fff 72%, var(--hero)); }
:root[data-theme="dark"] { --tile: color-mix(in srgb, #fff 72%, var(--bg)); }
.marchio {
  position: relative; width: 148px; height: 118px; display: grid; grid-template-rows: 1fr auto; gap: 7px;
  padding: 9px; border-radius: 16px; text-decoration: none;
  background: linear-gradient(160deg, color-mix(in srgb, var(--hl) 10%, transparent), transparent 60%), color-mix(in srgb, var(--surface) 80%, transparent);
  border: 1px solid color-mix(in srgb, var(--hl) 22%, var(--line)); backdrop-filter: blur(8px);
  transition: transform .3s, box-shadow .3s, border-color .3s;
}
.marchio img { filter: saturate(.9); transition: filter .3s; }
.marchio:hover { transform: translateY(-4px); border-color: var(--hl); box-shadow: 0 14px 34px color-mix(in srgb, var(--hl) 25%, transparent); }
.marchio:hover img { filter: none; }
.marchio:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }
.marchio-logo { display: grid; place-items: center; width: 100%; border-radius: 10px; background: linear-gradient(180deg, #ffffff 0%, #e9edf0 100%); box-shadow: inset 0 1px 0 #fff, inset 0 -1px 0 rgba(0,0,0,.08); }
.marchio-logo img { display: block; }
/* righe di loghi nelle sezioni e versione mini nelle card dei servizi */
.marchi-riga { display: flex; flex-wrap: wrap; gap: 12px; margin: -12px 0 36px; }
.marchi-riga-mini { gap: 8px; margin: 18px 0 0; }
.marchio-mini { width: 86px; height: 46px; padding: 3px; grid-template-rows: 1fr; border-radius: 10px; }
.marchio-mini .marchio-logo { border-radius: 7px; }
.marchio-mini:hover { transform: translateY(-2px); box-shadow: 0 6px 16px color-mix(in srgb, var(--hl) 22%, transparent); }
.hero .marchi-riga { margin: 28px 0 0; }
.card-wide > div > .marchio { margin-bottom: 18px; }
.marchio-nome { font-size: .76rem; font-weight: 600; letter-spacing: .03em; color: var(--ink-2); text-align: center; }
.hero .marchio-nome, .band-dark .marchio-nome { color: var(--hero-muted); }
.marchi-nota { text-align: center; color: var(--muted); font-size: .95rem; max-width: 70ch; margin: 18px auto 0; }
@media (max-width: 760px) {
  .marchi-grid { gap: 10px; }
  .marchio { width: calc(50% - 5px); max-width: 170px; }
}

/* link in fondo a una card */
.card-link { display: inline-block; margin-top: 14px; font-weight: 600; font-size: .93rem; text-decoration: none; }
.card-link:hover { text-decoration: underline; }

/* pagina Security Cloud */
.hero-sub { padding: clamp(56px, 8vw, 96px) 0 clamp(48px, 7vw, 80px); }
.hero-sub h1 { max-width: 18ch; }
.matrice-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.matrice { width: 100%; border-collapse: collapse; font-size: .95rem; min-width: 640px; }
.matrice th, .matrice td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.matrice tbody tr:last-child > * { border-bottom: 0; }
.matrice thead th { font-size: 1.05rem; }
.matrice thead th a { color: var(--ink); text-decoration: none; }
.matrice thead th small { display: block; font-size: .78rem; font-weight: 500; color: var(--muted); }
.matrice tbody th { font-weight: 600; color: var(--muted); white-space: nowrap; }
.matrice td { color: var(--ink-2); }
.vendor { scroll-margin-top: 80px; }
.vendor + .vendor { border-top: 1px solid var(--line); }
.vendor-head { display: grid; grid-template-columns: auto 1fr; gap: 32px; align-items: center; margin-bottom: 36px; max-width: 900px; }
.vendor-head .marchio { width: 190px; height: 142px; }
.vendor-head .marchio img { transform: scale(1.35); }
.vendor-head p { color: var(--muted); margin: 0; }
.vendor-head h2 { margin-bottom: .3em; }
.area { display: block; font-size: .74rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--orange-ink); margin-bottom: 6px; }
.nota-legale { font-size: .85rem; color: var(--hero-faint) !important; align-self: end; margin: 0; }
@media (max-width: 760px) { .vendor-head { grid-template-columns: 1fr; gap: 20px; } }

/* teleassistenza */
.remote {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center;
  background: var(--hero); color: var(--hero-ink); border-radius: 22px; padding: clamp(28px, 5vw, 56px);
}
.remote p { color: var(--hero-muted); }
.remote-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.remote-list a {
  display: grid; grid-template-rows: 78px auto; border-radius: 12px; overflow: hidden;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1);
  color: #fff; text-decoration: none; font-weight: 600; transition: border-color .2s, transform .2s;
}
.remote-list a:hover { border-color: color-mix(in srgb, var(--hl) 70%, transparent); transform: translateY(-2px); }
.remote-logo { display: grid; place-items: center; background: var(--tile-dark); }
.remote-logo img { display: block; }
.remote-nome { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 14px; font-size: .92rem; }
.remote-list a:hover .remote-nome { background: color-mix(in srgb, var(--hl) 18%, transparent); }
.remote-list small { color: var(--hero-faint); font-weight: 500; white-space: nowrap; }

/* contatti */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.contact dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 10px 18px; }
.contact dt { color: var(--muted); font-size: .9rem; }
.contact dd { margin: 0; font-weight: 500; }

/* footer */
.site-footer { border-top: 1px solid var(--line); padding: 40px 0; font-size: .88rem; color: var(--muted); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px; align-items: center; }
.site-footer .logo { height: 56px; width: auto; color: var(--ink); }

/* VPN e IPsec */
.vpn-intro { display: grid; grid-template-columns: 1fr 1.05fr; gap: 40px; align-items: center; margin-bottom: 36px; }
.vpn-intro .section-head { margin-bottom: 0; }
.vpn-schema { margin: 0; padding: 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.vpn-schema svg { display: block; width: 100%; height: auto; }
.vpn-tunnel path { stroke: var(--green); stroke-width: 3; stroke-dasharray: 7 6; fill: none; }
@media (prefers-reduced-motion: no-preference) { .vpn-tunnel path { animation: vpn-flusso 1.2s linear infinite; } }
@keyframes vpn-flusso { to { stroke-dashoffset: -13; } }
.vpn-lucchetti rect { fill: var(--orange); }
.vpn-lucchetti path { stroke: var(--orange); stroke-width: 2.2; }
.vpn-nodo rect { fill: var(--bg); stroke: var(--line); stroke-width: 1.5; }
.vpn-hub rect { fill: var(--green-soft); stroke: var(--green); }
.vpn-nodo text { text-anchor: middle; font-size: 14px; font-weight: 700; fill: var(--ink); font-family: inherit; }
.vpn-nodo text.vpn-sub { font-size: 11px; font-weight: 500; fill: var(--muted); }
#vpn .card-wide .marchi-riga-mini { margin-top: 20px; }
@media (max-width: 980px) { .vpn-intro { grid-template-columns: 1fr; } }

/* videosorveglianza */
.video-ambiti { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-bottom: 18px; }
.video-ambiti .checks, .video-tech .checks { margin: 16px 0 0; }
.video-tech .card { display: flex; flex-direction: column; }
.video-tech .marchi-riga-mini { margin-top: auto; padding-top: 18px; }
@media (max-width: 760px) { .video-ambiti { grid-template-columns: 1fr; } }

/* pulsante torna su */
.torna-su {
  position: fixed; right: 20px; bottom: 20px; z-index: 30; width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center; background: var(--green); color: var(--on-accent, #fff); box-shadow: 0 6px 18px rgba(0,0,0,.3);
  opacity: 0; visibility: hidden; transform: translateY(10px); transition: opacity .25s, transform .25s, visibility .25s, background .15s;
}
.torna-su.visibile { opacity: 1; visibility: visible; transform: none; }
.torna-su:hover { background: var(--green-dark); color: #fff; }
.torna-su:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; }
.torna-su svg { width: 22px; height: 22px; }
@media (max-width: 760px) { .torna-su { right: 14px; bottom: 14px; } }

/* area riservata */
.area-link {
  order: 2; flex: none; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px;
  border: 1px solid var(--line); color: var(--ink-2);
}
.area-link:hover { color: var(--green); border-color: var(--green); }
.area-link svg { width: 18px; height: 18px; }
.auth { min-height: 60vh; }
.auth-card { max-width: 440px; margin: 0 auto; display: grid; gap: 16px; padding: 34px; }
.auth-card h1 { font-size: 1.9rem; margin: 0; }
.auth-card .eyebrow { margin: 0; }
.auth-card label { display: grid; gap: 6px; font-weight: 600; font-size: .92rem; }
.auth-card label small { font-weight: 400; color: var(--muted); }
.auth-card input {
  font: inherit; font-weight: 400; padding: 11px 13px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--bg); color: var(--ink);
}
.auth-card input:focus { outline: 2px solid var(--green); outline-offset: 1px; border-color: transparent; }
.auth-card .btn { margin-top: 4px; }
.card .auth-nota, .auth-nota { font-size: .88rem; color: var(--muted); margin: 0; }
.auth-msg { margin: 0; padding: 10px 14px; border-radius: 10px; font-size: .93rem; border: 1px solid; }
.auth-err  { color: #e5534b; border-color: rgba(229,83,75,.45); background: rgba(229,83,75,.1); }
.auth-ok   { color: var(--green); border-color: color-mix(in srgb, var(--green) 45%, transparent); background: var(--green-soft); margin-bottom: 18px; }
.auth-info { color: var(--orange-ink); border-color: color-mix(in srgb, var(--orange) 45%, transparent); background: color-mix(in srgb, var(--orange) 10%, transparent); }
.area-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 18px; margin-bottom: 28px; }
.area-bar h1 { margin: 0; font-size: clamp(1.8rem, 3.5vw, 2.4rem); }
.area-azioni { display: flex; gap: 10px; }
.btn-outline { border-color: var(--line); color: var(--ink); background: var(--surface); }
.btn-outline:hover { border-color: var(--green); color: var(--ink); }
.area-vuota { min-height: 280px; display: grid; place-items: center; text-align: center; border-style: dashed; }

/* responsive */
@media (max-width: 980px) {
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .remote { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column;
    align-items: stretch; background: var(--surface); border-bottom: 1px solid var(--line); padding: 10px 16px 16px;
  }
  .nav.open { display: flex; max-height: calc(100vh - 110px); overflow-y: auto; }
  .nav-drop-btn { width: 100%; justify-content: space-between; padding: 8px 12px; }
  .mega {
    position: static; width: auto; transform: none; display: none; grid-template-columns: 1fr 1fr;
    box-shadow: none; margin: 4px 0 8px; padding: 12px; opacity: 1; visibility: visible; background: var(--bg);
  }
  .nav-drop.open .mega { display: grid; transform: none; }
  .nav .btn-primary { margin: 8px 0 0; }
  .theme-switch { margin-left: auto; }
  .site-header .nav-toggle { margin-left: 0; order: 3; }
  .nav-toggle {
    display: inline-grid; place-items: center; margin-left: auto; width: 42px; height: 42px;
    border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink);
  }
  .brand .logo { height: 56px; }
  .grid-3, .steps, .contact, .remote-list { grid-template-columns: 1fr; }
  .hero-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.rimando { margin: 22px 0 0; text-align: center; }

/* pagina FreePBX */
.chips { list-style: none; padding: 0; margin: 0 0 22px; display: flex; flex-wrap: wrap; gap: 10px; }
.chips li { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: .9rem; font-weight: 600; color: var(--ink-2); }
.card p.nota-app { font-size: .88rem; padding: 10px 12px; border-left: 3px solid var(--hl2); background: color-mix(in srgb, var(--hl2) 8%, transparent); border-radius: 6px; margin-top: -8px; }
#asterisk-box { margin-top: 18px; padding-top: 0; border-top: 0; }
#kalliope { margin-top: clamp(40px, 6vw, 64px); }
.card-wide > div > .marchi-riga { margin: 0 0 18px; }

/* sfondo "rete di particelle" (script in inc/layout.php) */
.particelle-bg { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; opacity: .75; }
.band-dark .particelle-bg { opacity: .65; }
/* rete di particelle anche in tutte le altre sezioni, più leggera */
main > section { position: relative; }
main > section:not(.senza-particelle) > :not(.particelle-bg):not(.deco):not(.hero-bg) { position: relative; z-index: 1; }
main > section:not(.hero):not(.band-dark) > .particelle-bg { opacity: .55; }
:root[data-theme="light"] main > section:not(.hero):not(.band-dark) > .particelle-bg { opacity: .4; }
.hero-sub .deco:not(.deco-mini) { display: none; }   /* nelle intestazioni interne le particelle prendono il posto del disegno a tratto */
.band-dark > .wrap { position: relative; z-index: 1; }
.apparati-voip { margin-top: 18px; display: grid; grid-template-columns: 1fr 1.1fr; gap: 28px; align-items: center; }
.apparati-voip .marchi-riga-mini { margin: 0; justify-content: flex-end; }
@media (max-width: 860px) { .apparati-voip { grid-template-columns: 1fr; } .apparati-voip .marchi-riga-mini { justify-content: flex-start; } }

/* home: riquadro impianti e cablaggio */
.home-cablaggi .wrap { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.hc-foto { position: relative; margin: 0; min-height: 440px; }
.hc-foto img { display: block; border-radius: var(--radius); object-fit: cover; box-shadow: 0 20px 50px rgba(0,0,0,.35); }
.hc-foto img:first-child { width: 78%; height: 460px; }
.hc-foto-2 { position: absolute; right: 0; bottom: -24px; width: 52%; height: 220px; border: 4px solid var(--surface); transition: transform .6s ease; }
.hc-foto:hover .hc-foto-2 { transform: translateY(-8px) rotate(-1.5deg); }
.hc-testo .checks { margin: 18px 0 22px; }
.hc-testo .marchi-riga-mini { margin: 0 0 22px; }
@media (max-width: 860px) { .home-cablaggi .wrap { grid-template-columns: 1fr; } .hc-foto { min-height: 0; margin-bottom: 30px; } .hc-foto img:first-child { width: 85%; height: 320px; } .hc-foto-2 { height: 160px; } }
/* scene animate nelle intestazioni interne (inc/scene.php), nello stile della home */
.hero-sub { min-height: 460px; display: grid; align-items: center; }
.hero-sub .hero-bg.scena { width: min(62%, 820px); opacity: .95; }
.hero-sub .particelle-bg { opacity: .7; }
.hero-sub .deco-mini { display: none; }
@media (max-width: 760px) { .hero-sub .hero-bg.scena { width: 100%; opacity: .35; } }