/* ==========================================================================
   CTZeta Informatica: stile «sala controllo»
   Grafite quasi nero con una trama sottile da tavola tecnica, un solo accento ciano/azzurro (con pochi toni freddi per distinguere i servizi),
   testo in Inter Tight, etichette e dati in monospazio. Sobrio, leggibile, da mondo IT.
   Indice: 1 token e base · 2 header · 3 bottoni e campi · 4 pannelli · 5 home e rack · 6 sezioni · 7 servizi · 8 lavori
           9 azienda e contatti · 10 footer · 11 galleria · 12 accessibilità · 13 movimento e schermata servizio · 14 formati stretti
   ========================================================================== */

/* ---------- 1. Token e base ---------- */
@font-face { font-family: 'Inter Tight'; src: url('/fonts/intertight-latin.woff2') format('woff2'); font-weight: 400 700; font-display: swap; }

:root {
  --bg: #090c11;
  --panel: #10151d;
  --panel-2: #151c27;
  --line: rgba(148, 163, 184, .17);
  --line-2: rgba(148, 163, 184, .32);
  --fg: #e8edf4;
  --muted: #93a1b5;
  --accent: #38bdf8;
  --accent-2: #6366f1;
  --ok: #34d399;
  --grad: linear-gradient(135deg, #38bdf8, #6aa5ff 55%, #818cf8);
  --ink: #06101c;          /* testo sui riempimenti chiari */

  --font: 'Inter Tight', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: ui-monospace, 'Cascadia Mono', 'SF Mono', Consolas, 'Liberation Mono', monospace;
  --wrap: 82rem;
  --gutter: clamp(1.1rem, 4vw, 2.5rem);
  --header-h: 4.2rem;
  --r: 14px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --ease-io: cubic-bezier(.65, 0, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: clip; -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 2rem); background: var(--bg); }
/* schermi molto grandi (QHD/4K a risoluzione piena): tutto in rem cresce in proporzione, senza superare l'altezza */
@media (min-width: 2200px) { html { font-size: max(16px, min(calc(100vw / 137.5), calc(100vh / 77.5))); } }
body { margin: 0; color: var(--fg); font: 400 1.125rem/1.6 var(--font); letter-spacing: -.005em; -webkit-font-smoothing: antialiased; overflow-x: clip; background: transparent; }
/* sfondo: tavola tecnica con un alone azzurro dietro il contenuto principale */
body::before { content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(900px 620px at 78% 38%, rgba(56, 189, 248, .11), transparent 62%),
    radial-gradient(760px 520px at 6% -4%, rgba(99, 102, 241, .1), transparent 60%),
    linear-gradient(rgba(148, 163, 184, .045) 1px, transparent 1px) 0 0 / 56px 56px,
    linear-gradient(90deg, rgba(148, 163, 184, .045) 1px, transparent 1px) 0 0 / 56px 56px,
    var(--bg); }
img, svg { max-width: 100%; display: block; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-underline-offset: .2em; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; left: 1rem; top: -4rem; z-index: 100; background: var(--fg); color: var(--ink); padding: .7rem 1rem; border-radius: 10px; transition: top .2s; }
.skip-link:focus { top: 1rem; }
.container { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.view { min-height: 60vh; outline: none; padding-top: calc(var(--header-h) + 1.4rem); }
.view-loading { min-height: 70vh; padding: 6rem var(--gutter); text-align: center; color: var(--muted); }
.js .prerender { display: none; }
.prerender { padding: 2rem var(--gutter); max-width: var(--wrap); margin: auto; }
.ico { width: 1.1em; height: 1.1em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.linklike { background: none; border: 0; padding: 0; color: inherit; text-decoration: underline; text-underline-offset: .2em; }
.muted { color: var(--muted); }

h1, h2, h3 { font-weight: 650; letter-spacing: -.035em; line-height: 1.04; text-wrap: balance; }
.page-title { font-size: clamp(2.6rem, 1rem + 5.4vw, 6rem); line-height: .98; letter-spacing: -.04em; }

.lead { font-size: clamp(1.15rem, 1rem + .5vw, 1.4rem); line-height: 1.5; color: var(--muted); max-width: 38rem; text-wrap: pretty; }
.tag { display: inline-flex; align-items: center; gap: .6rem; font: 500 .82rem/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.tag::before { content: ''; width: .5rem; height: .5rem; border-radius: 2px; background: currentColor; }

/* ---------- 2. Header: una barra fluttuante in vetro scuro ---------- */
.site-header { position: fixed; z-index: 40; left: 0; right: 0; top: .7rem; pointer-events: none; }
.site-header__inner { pointer-events: auto; width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; height: var(--header-h); display: flex; align-items: center; gap: 1.5rem; padding: 0 .6rem 0 .8rem; border-radius: 16px; background: rgba(12, 17, 24, .74); -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2); box-shadow: inset 0 0 0 1px var(--line), 0 1rem 2.4rem -1.2rem rgba(0, 0, 0, .8); transition: box-shadow .3s; }
.site-header.is-scrolled .site-header__inner { box-shadow: inset 0 0 0 1px var(--line-2), 0 1.2rem 2.8rem -1rem rgba(0, 0, 0, .9); }
.brand { display: inline-flex; align-items: center; gap: .7rem; color: var(--fg); text-decoration: none; flex: none; }
.brand__mark { width: 2.7rem; height: 2.7rem; border-radius: 12px; background: #fff; padding: 3px; }
.brand__text { display: flex; flex-direction: column; line-height: 1; }
.brand__text b { font-size: 1.3rem; font-weight: 700; letter-spacing: -.03em; }
.brand__text span { font: 500 .66rem/1 var(--mono); color: var(--muted); margin-top: .3rem; letter-spacing: .12em; text-transform: uppercase; }
.brand--light { color: var(--fg); }
.nav { margin-left: auto; }
.nav__toggle { display: none; }
.nav__menu { display: flex; align-items: center; gap: clamp(.8rem, 2vw, 1.6rem); }
.nav__menu a:not(.btn) { position: relative; color: var(--muted); text-decoration: none; font-size: 1.02rem; font-weight: 500; padding: .5rem .1rem; transition: color .2s; }
.nav__menu a:not(.btn):hover, .nav__menu a[aria-current="page"] { color: var(--fg); }
.nav__menu a:not(.btn)::after { content: ''; position: absolute; left: 0; right: 0; bottom: .15rem; height: 2px; border-radius: 2px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease); }
.nav__menu a:not(.btn):hover::after, .nav__menu a[aria-current="page"]::after { transform: scaleX(1); }

/* ---------- 3. Bottoni e campi ---------- */
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .55rem; min-height: 3.2rem; padding: .8rem 1.5rem; border: 1px solid var(--line-2); border-radius: 12px; background: transparent; color: var(--fg); font: 600 1.02rem/1.1 var(--font); letter-spacing: -.005em; text-decoration: none; transition: transform .3s var(--ease), background-color .25s, color .25s, border-color .25s, box-shadow .3s; }
.btn:hover { transform: translateY(-2px); border-color: var(--accent); background: rgba(56, 189, 248, .08); }
.btn:active { transform: translateY(0) scale(.99); }
.btn--small { min-height: 2.6rem; padding: .5rem 1.05rem; font-size: .95rem; border-radius: 10px; }
.btn--sun { border-color: transparent; background: var(--grad); color: var(--ink); box-shadow: 0 .6rem 1.6rem -.8rem rgba(56, 189, 248, .9); }
.btn--sun:hover { background: var(--grad); filter: brightness(1.1); box-shadow: 0 .9rem 2rem -.8rem rgba(56, 189, 248, 1); border-color: transparent; }
.btn--solid { background: var(--fg); border-color: var(--fg); color: var(--ink); }
.btn--solid:hover { background: #fff; border-color: #fff; }
.btn:disabled { opacity: .55; cursor: progress; }
.icon-btn { display: inline-grid; place-items: center; width: 2.7rem; height: 2.7rem; border: 0; border-radius: 12px; background: transparent; font-size: 1.6rem; line-height: 1; color: inherit; transition: background-color .2s; }
.icon-btn:hover { background: rgba(255, 255, 255, .08); }
.icon-btn--lg { width: 3.2rem; height: 3.2rem; border: 1px solid var(--line-2); }
.link-arrow { display: inline-flex; align-items: center; gap: .5rem; font-weight: 600; text-decoration: none; color: var(--accent); }
.link-arrow .ico { transition: transform .35s var(--ease); }
.link-arrow:hover .ico { transform: translateX(4px); }

.form { display: grid; gap: 1.2rem; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.field { display: grid; gap: .45rem; }
.field label { font-weight: 600; font-size: .98rem; }
.field__opt { color: var(--muted); font-weight: 400; }
.field input, .field select, .field textarea { width: 100%; padding: .8rem 1rem; border: 1px solid var(--line-2); border-radius: 12px; background: rgba(255, 255, 255, .04); color: var(--fg); font: inherit; min-height: 3.2rem; transition: border-color .2s, box-shadow .2s; }
.field textarea { resize: vertical; min-height: 9rem; }
.field input::placeholder, .field textarea::placeholder { color: #6b7a90; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: #5b6b82; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(56, 189, 248, .18); }
.field select option { background: #121923; color: var(--fg); }
.field [aria-invalid="true"] { border-color: #f87171; }
.field__error { color: #fca5a5; font-size: .95rem; font-weight: 500; }
.field--hp { position: absolute; left: -9999px; }
.field--check { grid-template-columns: auto 1fr; align-items: start; gap: .7rem; }
.field--check input { width: 1.3rem; min-height: 0; height: 1.3rem; margin-top: .15rem; accent-color: var(--accent); }
.field--check label { font-weight: 400; }
.form__status { min-height: 1.5rem; font-weight: 600; }
.form__status.is-ok { color: var(--ok); }
.form__status.is-error { color: #fca5a5; }
.form__context { padding: .9rem 1.1rem; border-radius: 12px; background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); }

/* ---------- 4. Pannelli (dialog) ---------- */
dialog.sheet { border: 0; padding: 0; width: min(33rem, calc(100vw - 2rem)); border-radius: 20px; background: var(--panel); color: var(--fg); box-shadow: inset 0 0 0 1px var(--line-2), 0 2rem 5rem -1rem rgba(0, 0, 0, .85); }
dialog.sheet[open] { animation: sheet-in .35s var(--ease); }
dialog::backdrop { background: rgba(3, 5, 9, .78); }
@keyframes sheet-in { from { opacity: 0; transform: translateY(18px) scale(.98); } }
.sheet__inner { padding: 1.5rem 1.6rem 1.7rem; display: grid; gap: 1.1rem; }
.sheet__inner p { color: var(--muted); }
.sheet__head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.sheet__head h2 { font-size: 1.8rem; }
.steps { display: grid; gap: 1.1rem; counter-reset: step; }
.steps li { counter-increment: step; position: relative; padding-left: 2.8rem; color: var(--muted); }
.steps li > strong:first-child { display: block; color: var(--fg); font-weight: 650; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 2rem; height: 2rem; border-radius: 8px; background: rgba(56, 189, 248, .15); color: var(--accent); display: grid; place-items: center; font: 600 .95rem var(--mono); }
.steps__row { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: .6rem; }
.a11y-label { font-weight: 650; margin-bottom: .5rem; color: var(--fg); }
.segmented { display: inline-flex; border: 1px solid var(--line-2); border-radius: 12px; overflow: hidden; }
.segmented button { min-width: 3.4rem; height: 2.8rem; border: 0; background: transparent; font-weight: 650; }
.segmented button + button { border-left: 1px solid var(--line-2); }
.segmented button[aria-pressed="true"] { background: var(--fg); color: var(--ink); }
.switches { display: grid; }
.switch-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .9rem 0; border: 0; border-top: 1px solid var(--line); background: none; text-align: left; }
.switch-row__track { position: relative; flex: none; width: 2.9rem; height: 1.6rem; border-radius: 1rem; border: 1px solid var(--line-2); transition: background-color .2s; }
.switch-row__track::after { content: ''; position: absolute; left: .2rem; top: .2rem; width: 1.1rem; height: 1.1rem; border-radius: 50%; background: var(--muted); transition: transform .25s var(--ease), background-color .2s; }
.switch-row[aria-checked="true"] .switch-row__track { background: rgba(56, 189, 248, .25); border-color: var(--accent); }
.switch-row[aria-checked="true"] .switch-row__track::after { transform: translateX(1.3rem); background: var(--accent); }

/* ---------- 5. Home: il rack ---------- */
.rackhome { min-height: calc(100svh - var(--header-h) - 1.4rem); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 40rem); gap: clamp(2rem, 5vw, 5rem); align-items: center; padding-block: .5rem 1.5rem; }
.rackhome__text { position: relative; z-index: 1; }
.hero__kicker { display: inline-flex; align-items: center; gap: .65rem; padding: .5rem .95rem; border-radius: 100px; background: rgba(255, 255, 255, .05); box-shadow: inset 0 0 0 1px var(--line-2); font: 500 .8rem/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.hero__kicker::before { content: ''; width: .5rem; height: .5rem; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px rgba(52, 211, 153, .18); animation: live 2.4s ease-in-out infinite; }
@keyframes live { 50% { box-shadow: 0 0 0 7px rgba(52, 211, 153, 0); } }
.rackhome__text { container-type: inline-size; }
.rackhome__title { --lh: 1.12em; margin: 1.4rem 0 0; font-size: clamp(2.5rem, min(5vw, 11svh), 5.8rem); font-size: clamp(2.3rem, min(10.4cqi, 11svh), 5.8rem); line-height: var(--lh); letter-spacing: -.045em; }
/* ogni riga è dentro una finestra con un po' di margine (padding compensato dal margine negativo): le lettere non vengono mai ritagliate */
.ht__mask { display: block; height: var(--lh); overflow: hidden; padding: .08em .12em .18em; margin: -.08em -.12em -.18em; }
.ht__line, .ht__phrase { display: block; height: var(--lh); line-height: var(--lh); white-space: nowrap; }
.ht__roll { display: block; }
.ht__phrase { color: #7dd3fc; }
.rackhome .lead { margin-top: 1.4rem; max-width: 29rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.9rem; }
.rackhome__hint { display: flex; align-items: center; gap: 1rem; margin-top: 2.2rem; max-width: 30rem; font-size: 1.12rem; line-height: 1.45; color: var(--muted); }
.rackhome__dot { flex: none; width: 2.4rem; height: 1px; background: var(--accent); position: relative; }
.rackhome__dot::after { content: ''; position: absolute; right: -2px; top: -3px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: live 2.4s ease-in-out infinite; }

/* l'armadio: un vero volume 3D (montanti, pareti, fondo). Gli apparati scorrono su guide telescopiche a tre stadi */
.rack-stage { position: relative; display: flex; justify-content: flex-end; perspective: 1800px; perspective-origin: 35% 45%; --rx: 0deg; --ry: 0deg; --px: 0deg; --py: -9deg; --cam: .6s; }
.rack-stage.is-extracted { --px: 6deg; --py: -30deg; --cam: 1.15s; }
.rack-cam { width: 100%; display: flex; justify-content: flex-end; transform-style: preserve-3d; transform-origin: calc(100% - 13.5rem) 50%; transform: rotateX(calc(var(--rx) + var(--px))) rotateY(calc(var(--ry) + var(--py))); transition: transform var(--cam) cubic-bezier(.5, 0, .15, 1); }
.rack { --U: clamp(1.8rem, min(1rem + 2.4vw, (100svh - 10.5rem) / 22.6), 3.2rem); --D: 17em; --ext: 13.5em; font-size: calc(var(--U) / 3.1); position: relative; width: 100%; max-width: 27rem; padding-bottom: 1.3em; transform-style: preserve-3d; }
.rack__shadow { position: absolute; left: -5%; right: -5%; bottom: -.6em; height: 3em; background: radial-gradient(closest-side, rgba(0, 0, 0, .8), transparent); filter: blur(.5em); transform: translateZ(-2em); }
.rack__cap { position: relative; z-index: 2; display: flex; align-items: center; gap: .8em; padding: .7em 1.1em; border-radius: .8em .8em .3em .3em; background: linear-gradient(180deg, #354052, #1b2230); color: var(--fg); font: 600 1.05em/1 var(--mono); letter-spacing: .24em; text-transform: uppercase; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 .6em 1.2em -.5em rgba(0, 0, 0, .7); }
.rack__power { width: .55em; height: .55em; border-radius: 50%; background: var(--ok); opacity: .25; transition: opacity .6s, box-shadow .6s; }
.rack.is-live .rack__power { opacity: 1; box-shadow: 0 0 .9em var(--ok); }
.rack__vents { margin-left: auto; display: flex; gap: .3em; }
.rack__vents i { width: .18em; height: 1em; border-radius: 1px; background: #0a0d13; }
.rack__shell { position: relative; padding: .45em .35em; transform-style: preserve-3d; }
.rack__back { position: absolute; inset: 0; transform: translateZ(calc(var(--D) * -1)); }
.rack__bay { position: absolute; inset: 0; display: block; background: linear-gradient(180deg, #04060a, #0b1018); box-shadow: inset 0 0 2.4em rgba(0, 0, 0, .85); }
.rack__wall { position: absolute; top: 0; bottom: 0; width: var(--D); transform-origin: left center; transform: rotateY(90deg); background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .03) 0 .15em, transparent .15em 1.6em), linear-gradient(90deg, #1b2330, #0f141d 55%, #070a10); }
.rack__wall--l { left: 0; } .rack__wall--r { left: 100%; }
.rack__rail { position: absolute; top: 0; bottom: 0; width: 1.5em; background: radial-gradient(circle at 50% 50%, #03050a 0 .19em, transparent .23em) 0 0 / 100% calc(var(--U) / 3), linear-gradient(90deg, #2a3342, #1a212d); }
.rack__rail--l { left: .35em; border-radius: .15em 0 0 .15em; } .rack__rail--r { right: .35em; border-radius: 0 .15em .15em 0; }
.rack__units { position: relative; transform-style: preserve-3d; }
.rack__slot { --x: 0; position: relative; height: calc(var(--u) * var(--U)); transform-style: preserve-3d; }
.rack__base { display: flex; justify-content: space-between; padding: 0 1.6em; margin-top: -.15em; }
.rack__base i { width: 2.4em; height: 1.1em; border-radius: 0 0 .5em .5em; background: linear-gradient(180deg, #1f2735, #0e131b); }

/* guide telescopiche: fissa (nel vano), intermedia (esce a metà strada), mobile (solidale al cassetto) */
.slide { position: absolute; transform-origin: left center; border-radius: .12em; box-shadow: 0 0 0 1px rgba(0, 0, 0, .45); background: linear-gradient(180deg, #f4f7fb, #a2abbd 42%, #e3e8f2 56%, #78819a); }
.slide--l { left: 1.75em; } .slide--r { left: calc(100% - 1.75em); }
.slide--fixed { top: calc(50% - .36em); height: .72em; width: 13em; transform: rotateY(90deg); }
.slide--mid { top: calc(50% - .27em); height: .54em; width: 12em; transform: translateZ(calc(var(--x) * var(--ext) * .5)) rotateY(90deg); }
.slide--move { top: calc(50% - .19em); height: .38em; width: 11em; transform: rotateY(90deg); }
.tray { position: relative; height: 100%; transform-style: preserve-3d; transform: translateZ(calc(var(--x) * var(--ext))); }

/* l'apparato: frontale con orecchie metalliche, avvitato al montante con quattro dadi; dietro la scatola (che si vede quando esce) */
.unit { --c: #38bdf8; position: absolute; inset: 2px 0; display: grid; grid-template-columns: 1.5em minmax(0, 1fr) 1.5em; border-radius: 4px; color: var(--fg); text-decoration: none; cursor: pointer; transform-style: preserve-3d; transform: translate3d(calc(var(--f, 0) * -.9em), 0, calc(var(--f, 0) * 1.8em)); }
.unit:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.unit__ear { display: flex; flex-direction: column; align-items: center; justify-content: space-around; padding: .3em 0; background: linear-gradient(90deg, #c2c9d6, #7d8798); }
.unit__ear:first-child { border-radius: 4px 0 0 4px; border-right: 1px solid rgba(0, 0, 0, .4); } .unit__ear:last-child { border-radius: 0 4px 4px 0; border-left: 1px solid rgba(0, 0, 0, .4); }
.screw { position: relative; display: block; width: .82em; height: .82em; clip-path: polygon(25% 4%, 75% 4%, 100% 50%, 75% 96%, 25% 96%, 0 50%); background: radial-gradient(circle at 35% 28%, #fff 0, #e0e4ec 30%, #8d96a6 70%, #5c6575 100%); will-change: transform; }
.screw::after { content: ''; position: absolute; left: 16%; right: 16%; top: calc(50% - .07em); height: .14em; border-radius: 1px; background: #3a4252; }
.unit__art { display: block; width: 100%; height: 100%; transition: filter .3s; }
.unit:hover .unit__art, .unit:focus-visible .unit__art, .unit.is-cue .unit__art { filter: drop-shadow(0 0 .45em var(--c)) brightness(1.12); }
.unit__tag { position: absolute; right: calc(100% + 1.5em); top: 50%; translate: 0 -50%; display: flex; align-items: center; gap: .55em; white-space: nowrap; font: 500 max(.85em, 11px)/1 var(--mono); letter-spacing: .02em; color: var(--muted); pointer-events: none; transform-origin: 100% 50%; transition: translate .4s var(--ease), scale .4s var(--ease), color .25s; }
.unit__tag::before { content: ''; width: .5em; height: .5em; border-radius: 50%; background: var(--c); order: 2; }
.unit__tag::after { content: ''; width: .9em; height: 1px; background: var(--line-2); order: 3; }
.unit:hover .unit__tag, .unit:focus-visible .unit__tag, .unit.is-cue .unit__tag { color: var(--fg); translate: -.4em -50%; scale: 1.75; font-weight: 650; padding: .35em .7em; margin: -.35em -.7em; border-radius: .5em; background: color-mix(in srgb, var(--bg) 90%, transparent); box-shadow: 0 0 0 1px var(--line-2); z-index: 5; }
.box { position: absolute; background: linear-gradient(90deg, #262d3a, #121720); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); }
.box--l, .box--r { top: 0; bottom: 0; width: 12em; transform-origin: left center; transform: rotateY(90deg); }
.box--l { left: 1.5em; } .box--r { left: calc(100% - 1.5em); }
.box--t, .box--b { left: 1.5em; right: 1.5em; height: 12em; transform-origin: top center; transform: rotateX(-90deg); background: linear-gradient(180deg, #2c3544, #151a24); }
.box--t { top: 0; } .box--b { top: 100%; }
.rack.is-opening .rack__slot:not(.is-out) .unit, .rack.is-opening .rack__cap { filter: brightness(.45) saturate(.7); }
.rack__slot .unit, .rack__cap { transition: filter .5s; }

/* LED degli apparati (nelle facce SVG): si accendono a montaggio finito, poi lampeggiano piano */
.l { fill: var(--lc, #34d399); }
.l--g { --lc: #34d399; } .l--a { --lc: #fbbf24; } .l--r { --lc: #f87171; }
.rack:not(.is-live) .l, .rack:not(.is-live) .bar { opacity: .12; }
.l, .bar { transition: opacity .5s; }
.l--b1 { animation: b1 2.7s steps(1, end) infinite; animation-delay: calc(var(--n) * -.43s); }
.l--b2 { animation: b2 1.9s steps(1, end) infinite; animation-delay: calc(var(--n) * -.31s); }
.l--b3 { animation: b3 3.6s steps(1, end) infinite; animation-delay: calc(var(--n) * -.57s); }
.bar { animation: b2 2.4s steps(1, end) infinite; animation-delay: calc(var(--n) * -.3s); }
.caret { animation: caret 1s steps(1) infinite; }
@keyframes b1 { 0%, 100% { opacity: 1; } 11% { opacity: .15; } 17% { opacity: 1; } 52% { opacity: .15; } 58% { opacity: 1; } }
@keyframes b2 { 0%, 100% { opacity: 1; } 30% { opacity: .15; } 36% { opacity: 1; } 70% { opacity: .15; } 80% { opacity: 1; } }
@keyframes b3 { 0%, 100% { opacity: 1; } 6% { opacity: .15; } 9% { opacity: 1; } 44% { opacity: 1; } 47% { opacity: .15; } 90% { opacity: 1; } }
@keyframes caret { 50% { opacity: 0; } }

/* ---------- 6. Sezioni ---------- */
.section { padding: clamp(3.5rem, 9vw, 7.5rem) 0; }

.numbers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1rem, 3vw, 2rem); }
.numbers > div { padding-top: 1rem; border-top: 1px solid var(--line-2); }
.numbers dt { font-size: clamp(3rem, 1rem + 6vw, 6.4rem); font-weight: 650; line-height: .95; letter-spacing: -.05em; }
.numbers dd { margin-top: .7rem; max-width: 18rem; color: var(--muted); }
.values { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1rem, 2.4vw, 1.6rem); margin-top: clamp(2rem, 5vw, 3.5rem); }
.values article { padding: clamp(1.3rem, 2.4vw, 1.9rem); border-radius: var(--r); background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); }
.values h3 { font-size: 1.5rem; margin-bottom: .6rem; }
.values p { color: var(--muted); text-wrap: pretty; }

/* ---------- 7. Servizi ---------- */
.page-head { position: relative; padding: clamp(1.5rem, 4vw, 3.5rem) 0 clamp(1.5rem, 3vw, 2.5rem); }
.page-head .lead { margin-top: 1.4rem; }
.crumbs { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: clamp(1.4rem, 3vw, 2.2rem); font: 500 .8rem/1 var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--fg); }
.crumbs span[aria-current] { color: var(--fg); }

/* catalogo (pagina Servizi): una scheda per apparato */

.techs { display: flex; flex-wrap: wrap; gap: .45rem; }
.techs li { padding: .28rem .7rem; border-radius: 8px; background: rgba(255, 255, 255, .05); box-shadow: inset 0 0 0 1px var(--line); font: 500 .76rem/1.3 var(--mono); color: var(--muted); }

/* pagina di un servizio */

.back { display: inline-flex; align-items: center; gap: .6rem; padding: .55rem 1.1rem .55rem .8rem; border-radius: 10px; background: rgba(255, 255, 255, .06); box-shadow: inset 0 0 0 1px var(--line-2); color: var(--fg); font-weight: 600; font-size: .95rem; text-decoration: none; transition: transform .35s var(--ease), background-color .25s; }
.back .ico { transform: scaleX(-1); }
.back:hover { transform: translateX(-3px); background: rgba(255, 255, 255, .12); }

.svc-stage { position: relative; padding: clamp(1rem, 2vw, 1.6rem); border-radius: 22px; background: radial-gradient(ellipse 70% 60% at 50% 40%, color-mix(in srgb, var(--c) 22%, transparent), transparent 70%), #07090e; box-shadow: inset 0 0 0 1px var(--line-2); overflow: hidden; perspective: 1400px; }
.svc-stage::before { content: ''; position: absolute; inset: 0; background: linear-gradient(rgba(148, 163, 184, .07) 1px, transparent 1px) 0 0 / 32px 32px, linear-gradient(90deg, rgba(148, 163, 184, .07) 1px, transparent 1px) 0 0 / 32px 32px; -webkit-mask-image: radial-gradient(ellipse at 50% 50%, #000 20%, transparent 75%); mask-image: radial-gradient(ellipse at 50% 50%, #000 20%, transparent 75%); }
.svc-stage::after { content: ''; position: absolute; left: -30%; top: 0; bottom: 0; width: 30%; background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--c) 18%, transparent), transparent); transform: skewX(-18deg); animation: scan 6s ease-in-out infinite; pointer-events: none; }
@keyframes scan { 0%, 55% { left: -35%; } 100% { left: 125%; } }
.svc-stage__plate { position: relative; padding-block: clamp(1rem, 3vw, 2rem); transform: rotateY(-12deg) rotateX(6deg); transform-style: preserve-3d; transition: transform .8s var(--ease); }
.svc-stage .art { display: block; width: 100%; height: auto; filter: drop-shadow(0 1.8rem 1.4rem rgba(0, 0, 0, .7)); animation: float 7s ease-in-out infinite; }
@keyframes float { 50% { translate: 0 -.5rem; } }
.svc-stage__rails { position: absolute; left: 4%; right: 4%; bottom: .6rem; height: .45rem; border-radius: .2rem; background: linear-gradient(180deg, #f4f7fb, #a2abbd 45%, #e3e8f2 58%, #78819a); box-shadow: 0 .6rem 1rem rgba(0, 0, 0, .6); }
.svc-stage .techs { position: relative; justify-content: center; margin-top: 1.2rem; }

.svc-points { display: grid; gap: .6rem; }
.svc-points li { position: relative; padding: .95rem 1.1rem .95rem 3.1rem; border-radius: 12px; background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); text-wrap: pretty; }
.svc-points li::before { content: ''; position: absolute; left: 1.05rem; top: 1.1rem; width: 1.2rem; height: 1.2rem; border-radius: 6px; background: color-mix(in srgb, var(--c) 22%, transparent); }
.svc-points li::after { content: ''; position: absolute; left: 1.5rem; top: 1.28rem; width: .34rem; height: .62rem; border: solid var(--c); border-width: 0 2px 2px 0; transform: rotate(40deg); }

/* ---------- 8. Lavori ---------- */
.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 2rem; }
.filter { display: inline-flex; align-items: center; gap: .5rem; padding: .5rem 1rem; border-radius: 10px; border: 1px solid var(--line-2); color: var(--muted); background: transparent; text-decoration: none; font-size: .98rem; font-weight: 500; transition: background-color .25s, color .25s, border-color .25s; }
.filter span { font: 500 .72rem/1 var(--mono); opacity: .8; }
.filter:hover { color: var(--fg); border-color: var(--accent); }
.filter[aria-current="true"] { background: var(--fg); color: var(--ink); border-color: var(--fg); }
.filter[aria-pressed="true"] { background: color-mix(in srgb, var(--accent) 18%, transparent); border-color: var(--accent); color: var(--fg); }
.filter[aria-pressed="true"]:not(.filter--all)::after { content: '×'; font-size: 1.1em; line-height: 1; margin-left: .1rem; color: var(--accent); }
.builder__side > [data-all] { margin-top: .8rem; align-self: flex-start; }
.builder__side > [data-all][hidden] { display: none; }
.work-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr)); gap: clamp(1.2rem, 2.4vw, 1.8rem) clamp(1rem, 2vw, 1.5rem); }
.work-card__link { display: grid; gap: .35rem; align-content: start; height: 100%; color: inherit; text-decoration: none; }
.work-card__media { position: relative; display: block; aspect-ratio: 4 / 3; border-radius: var(--r); overflow: hidden; background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); margin-bottom: .8rem; }
.work-card__media img { width: 100%; height: 100%; object-fit: cover; }
.work-card__link:hover .work-card__media img { transform: scale(1.05); }
.work-card__empty { display: grid; place-items: center; height: 100%; color: var(--muted); font-size: 2rem; }
.work-card__cat { font: 500 .76rem/1.2 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.work-card__title { font-size: clamp(1.25rem, 1.1rem + .6vw, 1.55rem); font-weight: 650; line-height: 1.12; letter-spacing: -.03em; text-wrap: balance; }
.work-card__meta { color: var(--muted); font-size: .95rem; }
.work-card__count { position: absolute; right: .7rem; bottom: .7rem; padding: .2rem .65rem; border-radius: 8px; background: rgba(6, 9, 14, .85); font: 500 .72rem/1.3 var(--mono); }
.empty { padding: 3rem 0; color: var(--muted); grid-column: 1 / -1; }

.work-meta { display: flex; flex-wrap: wrap; gap: .4rem 1.6rem; margin: 1.4rem 0; color: var(--muted); }
.work-meta span { display: inline-flex; align-items: center; gap: .45rem; }
.gallery { columns: 3 18rem; column-gap: 1.2rem; }
.gallery--few { columns: 2 24rem; }
.gallery__item { break-inside: avoid; margin-bottom: 1.2rem; }
.gallery__btn { display: block; width: 100%; padding: 0; border: 0; background: var(--panel); border-radius: var(--r); overflow: hidden; cursor: zoom-in; box-shadow: inset 0 0 0 1px var(--line); }
.gallery__btn img { width: 100%; height: auto; transition: transform .8s var(--ease); }
.gallery__btn:hover img { transform: scale(1.03); }
.gallery__cap { margin-top: .5rem; font-size: .95rem; color: var(--muted); }
.more { margin-top: 2rem; text-align: center; }

/* ---------- 9. Azienda e contatti ---------- */

.contact__grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.contact__aside { display: grid; gap: 1rem; }
.contact__card { padding: clamp(1.4rem, 2.6vw, 2rem); border-radius: 20px; background: radial-gradient(ellipse 80% 100% at 100% 0%, rgba(56, 189, 248, .18), transparent 70%), var(--panel); box-shadow: inset 0 0 0 1px var(--line-2); display: grid; gap: 1.1rem; }
.contact__card h2 { font: 500 .8rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.contact__aside address { font-style: normal; display: grid; gap: .9rem; }
.contact__line { display: flex; gap: .7rem; align-items: flex-start; }
.contact__line .ico { margin-top: .3rem; color: var(--accent); }
.big-phone { display: inline-block; font-size: clamp(2.2rem, 1.2rem + 3vw, 3.8rem); font-weight: 650; letter-spacing: -.045em; line-height: 1; color: var(--fg); text-decoration: none; }
.big-phone:hover { color: var(--accent); }
.remote-box { padding: clamp(1.3rem, 2.4vw, 1.8rem); border-radius: 20px; background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); display: grid; gap: .8rem; justify-items: start; }
.remote-box strong { font-size: 1.35rem; font-weight: 650; letter-spacing: -.02em; }
.remote-box p { color: var(--muted); }
.legal h2 { font-size: 1.6rem; }

/* ---------- 10. Footer ---------- */
.site-footer { background: #06080c; color: var(--muted); padding: clamp(3rem, 6vw, 4.5rem) 0 2rem; box-shadow: inset 0 1px 0 var(--line); }
.site-footer__grid { display: grid; grid-template-columns: 1.4fr 1.2fr .9fr; gap: 2rem 2.5rem; }
.site-footer a { color: var(--fg); }
.site-footer a:hover { color: var(--accent); }
.site-footer__id p { margin-top: 1rem; font-size: 1rem; }
.site-footer__vat { margin-top: .3rem !important; font: 500 .8rem/1.5 var(--mono); opacity: .85; }
.site-footer__h { font: 500 .78rem/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin-bottom: 1rem; }
.site-footer__links { display: grid; gap: .5rem; }
.site-footer__links:empty { display: none; }
.site-footer__copy { grid-column: 1 / -1; margin-top: 1.5rem; padding-top: 1.3rem; border-top: 1px solid var(--line); font-size: .92rem; }

/* ---------- 11. Galleria ---------- */
dialog.lightbox { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(5, 7, 11, .98); color: var(--fg); }
.lightbox__inner { height: 100%; display: grid; grid-template-columns: minmax(0, 1fr) 20rem; }
.lightbox__media { display: grid; place-items: center; padding: 2rem; min-height: 0; }
.lightbox__media img { max-height: calc(100dvh - 4rem); width: auto; max-width: 100%; object-fit: contain; border-radius: 10px; }
.lightbox__info { padding: 4rem 1.6rem 2rem; display: flex; flex-direction: column; gap: 1rem; align-items: flex-start; }
.lightbox__count { font: 500 .8rem/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.lightbox__info h2 { font-size: 1.9rem; line-height: 1.08; }
.lightbox__caption { color: var(--muted); }
.lightbox__nav { display: flex; gap: .7rem; margin-top: auto; }
.lightbox__close { position: absolute; right: 1rem; top: 1rem; color: var(--fg); }
.lightbox .btn--solid { background: var(--grad); border-color: transparent; color: var(--ink); }
.lightbox--single .lightbox__nav { display: none; }
dialog.lightbox[open] { animation: sheet-in .3s var(--ease); }

/* ---------- 12. Accessibilità ---------- */
html.a11y-text-1 { font-size: 112.5%; }
html.a11y-text-2 { font-size: 125%; }
html.a11y-links a:not(.btn):not(.brand):not(.work-card__link):not(.filter):not(.unit):not(.card-act) { text-decoration: underline; }
html.a11y-contrast { --muted: #fff; --line: #fff; --line-2: #fff; --panel: #000; --bg: #000; }
html.a11y-readable { --font: Verdana, 'Segoe UI', sans-serif; }

html.a11y-spacing body { line-height: 1.85; letter-spacing: .02em; word-spacing: .08em; }
html.a11y-motion *, html.a11y-motion *::before, html.a11y-motion *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* ---------- 13. Movimento comune, schermata del servizio, pulsanti fissi ---------- */
/* tra una pagina e l'altra: un pannello scuro sale dal basso con una sottile linea azzurra sul bordo */
.curtain { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; background: #080b10; color: var(--fg); }
.curtain::after { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--grad); box-shadow: 0 0 1.4rem rgba(56, 189, 248, .8); }
.curtain[hidden] { display: none; }
html:not(.js) .curtain { display: none; }
.curtain__label { display: flex; align-items: center; gap: .9rem; font: 500 clamp(.95rem, .8rem + .6vw, 1.2rem)/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.curtain__label::before { content: ''; width: .6rem; height: .6rem; border-radius: 2px; background: var(--accent); animation: live 1.6s ease-in-out infinite; }
.progress { position: fixed; left: 0; top: 0; z-index: 80; width: 100%; height: 2px; background: var(--grad); transform: scaleX(0); transform-origin: left; pointer-events: none; }

html.has-overlay { overflow: hidden; }

/* il box del servizio: una «console» sopra la home */
.sheet-view { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: clamp(.6rem, 2.4vw, 1.8rem); }
.sheet-view__backdrop { position: absolute; inset: 0; background: rgba(4, 6, 10, .68); -webkit-backdrop-filter: blur(7px); backdrop-filter: blur(7px); cursor: pointer; }
.svc-box { --c: #38bdf8; position: relative; width: min(76rem, 100%); height: min(100%, 52rem); display: flex; flex-direction: column; border-radius: 22px; overflow: hidden; color: var(--fg); cursor: auto;
  background: radial-gradient(ellipse 60% 40% at 90% 0%, color-mix(in srgb, var(--c) 16%, transparent), transparent 70%), linear-gradient(rgba(148, 163, 184, .035) 1px, transparent 1px) 0 0 / 40px 40px, linear-gradient(90deg, rgba(148, 163, 184, .035) 1px, transparent 1px) 0 0 / 40px 40px, #0a0e15;
  box-shadow: inset 0 0 0 1px var(--line-2), 0 3rem 6rem -1.5rem rgba(0, 0, 0, .9); }
.svc-box::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 2px; z-index: 3; background: linear-gradient(90deg, transparent, var(--c) 30%, var(--c) 70%, transparent); box-shadow: 0 0 1.2rem var(--c); }
.svc-box__bar { display: flex; align-items: center; gap: 1rem; padding: .7rem .8rem .7rem 1.3rem; border-bottom: 1px solid var(--line); background: rgba(6, 9, 14, .6); font: 500 .76rem/1 var(--mono); letter-spacing: .04em; color: var(--muted); }
.svc-box__crumb { display: flex; align-items: center; gap: .55rem; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.svc-box__crumb i { flex: none; width: .5rem; height: .5rem; border-radius: 2px; background: var(--c); }
.svc-box__crumb b { color: var(--line-2); font-weight: 400; }
.svc-box__crumb span { color: var(--fg); overflow: hidden; text-overflow: ellipsis; }
.svc-box__meta { display: flex; align-items: center; gap: 1rem; margin-left: auto; white-space: nowrap; }
.svc-box__status { display: inline-flex; align-items: center; gap: .45rem; color: var(--ok); text-transform: uppercase; }
.svc-box__status i { width: .5rem; height: .5rem; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px rgba(52, 211, 153, .2); animation: live 2.4s ease-in-out infinite; }
.svc-box .back { flex: none; }
.svc-box__grid { flex: 1; min-height: 0; display: grid; grid-template-columns: 17.5rem minmax(0, 1fr); }
.svc-box__side { display: flex; flex-direction: column; gap: 1.2rem; padding: 1.3rem; border-right: 1px solid var(--line); overflow-y: auto; background: rgba(6, 9, 14, .35); }
.svc-box .svc-stage { padding: .7rem; border-radius: 14px; }
.svc-box .svc-stage__plate { padding-block: .6rem; }
.svc-box__nav { display: grid; gap: .15rem; }
.svc-box__nav a { position: relative; padding: .6rem .8rem; border-radius: 10px; color: var(--muted); text-decoration: none; font-weight: 500; font-size: .98rem; transition: background-color .2s, color .2s; }
.svc-box__nav a:hover { color: var(--fg); background: rgba(255, 255, 255, .05); }
.svc-box__nav a.is-on { color: var(--fg); background: rgba(255, 255, 255, .07); }
.svc-box__nav a.is-on::before { content: ''; position: absolute; left: 0; top: .6rem; bottom: .6rem; width: 2px; border-radius: 2px; background: var(--c); }
.svc-box__switch { display: grid; gap: .5rem; margin-top: auto; }
.svc-box__switch a { display: grid; gap: .25rem; padding: .75rem .9rem; border-radius: 12px; background: rgba(255, 255, 255, .04); box-shadow: inset 0 0 0 1px var(--line); text-decoration: none; transition: box-shadow .25s, background-color .25s; }
.svc-box__switch a:hover { background: rgba(255, 255, 255, .07); box-shadow: inset 0 0 0 1px var(--line-2); }
.svc-box__switch span { font: 500 .68rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.svc-box__switch strong { font-size: .95rem; font-weight: 600; line-height: 1.2; }
/* precedente/successivo: nella colonna laterale se c'è spazio, altrimenti in fondo al contenuto */
.svc-pager { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; padding-bottom: 1rem; }
.svc-pager a { display: grid; gap: .25rem; padding: .85rem 1rem; border-radius: 12px; background: rgba(255, 255, 255, .04); box-shadow: inset 0 0 0 1px var(--line); text-decoration: none; min-width: 0; transition: box-shadow .25s, background-color .25s; }
.svc-pager a:hover { background: rgba(255, 255, 255, .07); box-shadow: inset 0 0 0 1px var(--line-2); }
.svc-pager a[rel="next"] { text-align: right; }
.svc-pager span { font: 500 .68rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.svc-pager strong { font-size: .95rem; font-weight: 600; line-height: 1.25; }
@media (max-width: 30rem) { .svc-pager { grid-template-columns: minmax(0, 1fr); } .svc-pager a[rel="next"] { text-align: left; } }
@media (max-width: 62rem), (max-height: 760px) { .svc-box__switch { display: none; } }
@media (min-width: 62.01rem) and (min-height: 761px) { .svc-pager { display: none; } }
html.a11y-light .svc-pager a, html.a11y-light .svc-box__switch a { background: #fff; }
/* nota sicura (/n/ID#chiave): il box mostra PrivateBin incorporato */
.svc-box--note { width: min(62rem, 100%); }
.note-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.note-intro { padding: 1.1rem clamp(1rem, 3vw, 1.8rem) .5rem; }
.note-intro h1 { font-size: clamp(1.25rem, 2.4vw, 1.65rem); line-height: 1.2; font-weight: 650; }
.note-intro p { margin-top: .4rem; max-width: 46rem; color: var(--muted); font-size: .98rem; line-height: 1.5; }
.note-frame { flex: 1; min-height: 0; }
.note-frame iframe { display: block; width: 100%; height: 100%; border: 0; background: transparent; color-scheme: dark; }
html.a11y-light .note-frame iframe { color-scheme: light; }
.note-empty { padding: 1.4rem clamp(1rem, 3vw, 1.8rem); display: grid; gap: .9rem; justify-items: start; max-width: 40rem; }
.note-empty h2 { font-size: 1.25rem; }
.note-empty p { color: var(--muted); line-height: 1.6; }
@media (max-height: 700px), (max-width: 40rem) { .note-intro p { display: none; } }
/* «ricezione cifrata»: schermata sopra la nota mentre si apre il collegamento (js/fx/secure-transfer.js) */
.note-frame { position: relative; }
.secure {
  position: absolute; inset: 0; z-index: 3; display: flex; padding: 1rem; overflow-x: hidden; overflow-y: auto;
  background: radial-gradient(520px 340px at 50% 36%, rgba(56, 189, 248, .13), transparent 70%), var(--bg);
  transition: opacity .55s var(--ease), transform .55s var(--ease), filter .55s;
}
.secure::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(rgba(148, 163, 184, .06) 1px, transparent 1px) 0 0 / 40px 40px, linear-gradient(90deg, rgba(148, 163, 184, .06) 1px, transparent 1px) 0 0 / 40px 40px;
  -webkit-mask-image: radial-gradient(circle at 50% 44%, #000 15%, transparent 72%); mask-image: radial-gradient(circle at 50% 44%, #000 15%, transparent 72%);
}
.secure::after { content: ''; position: absolute; left: 0; right: 0; top: -32%; height: 32%; pointer-events: none; background: linear-gradient(transparent, rgba(56, 189, 248, .12), transparent); animation: secure-scan 2.8s linear infinite; }
.secure.is-done { opacity: 0; transform: scale(1.03); filter: blur(4px); pointer-events: none; }
.secure__panel { position: relative; z-index: 1; margin: auto; width: min(27rem, 100%); display: grid; justify-items: center; gap: 1.15rem; }
.secure__tag { display: inline-flex; align-items: center; gap: .55rem; font: 500 .72rem/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.secure__tag i { width: .5rem; height: .5rem; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px rgba(56, 189, 248, .22); animation: live 1.6s ease-in-out infinite; }
.secure__lock { position: relative; display: grid; place-items: center; width: 6.4rem; height: 6.4rem; border-radius: 50%; color: var(--accent); background: rgba(56, 189, 248, .07); box-shadow: inset 0 0 0 1px var(--line-2); transition: color .4s, background-color .4s, box-shadow .5s; }
.secure__lock::before { content: ''; position: absolute; inset: -.4rem; border-radius: 50%; border: 1px solid rgba(56, 189, 248, .4); animation: secure-ring 1.9s ease-out infinite; }
.secure__lock svg { display: block; width: 3.1rem; height: 3.7rem; overflow: visible; }
.lock__shackle { transform-origin: 11px 21px; transition: transform .65s var(--ease); }
.lock__hole { fill: currentColor; stroke-width: 2.2; }
.secure.is-decrypting .secure__lock { animation: secure-pulse 1.1s ease-in-out infinite; }
.secure.is-unlocked .secure__lock { color: var(--ok); background: rgba(52, 211, 153, .09); box-shadow: inset 0 0 0 1px var(--ok), 0 0 2.6rem rgba(52, 211, 153, .35); animation: none; }
.secure.is-unlocked .secure__lock::before { border-color: rgba(52, 211, 153, .6); animation: secure-burst .9s ease-out 1; }
.secure.is-unlocked .lock__shackle { transform: translateY(-3.5px) rotate(-36deg); }
.secure.is-failed .secure__lock { color: #f87171; background: rgba(248, 113, 113, .08); box-shadow: inset 0 0 0 1px #f87171; animation: secure-shake .5s ease-in-out 2; }
.secure.is-failed .secure__lock::before { display: none; }
.secure__wire { width: 100%; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .9rem; }
.secure__node { display: grid; justify-items: center; gap: .35rem; color: var(--fg); }
.secure__node small { font: 500 .66rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.secure__line { position: relative; height: 2px; background: repeating-linear-gradient(90deg, var(--line-2) 0 6px, transparent 6px 12px); }
.secure__line i { position: absolute; top: 50%; left: 0; width: .95rem; height: .5rem; margin-top: -.25rem; border-radius: 2px; background: var(--accent); box-shadow: 0 0 .9rem rgba(56, 189, 248, .85); opacity: 0; animation: secure-packet 1.5s linear infinite; animation-delay: calc(var(--n) * .25s); }
.secure.is-decrypting .secure__line i { animation-duration: .85s; animation-delay: calc(var(--n) * .14s); }
.secure.is-unlocked .secure__line i, .secure.is-failed .secure__line i { animation: none; opacity: 0; }
.secure__hex { max-width: 100%; margin: 0; overflow: hidden; white-space: nowrap; text-align: center; font: 500 .84rem/1.2 var(--mono); letter-spacing: .14em; color: var(--accent); opacity: .9; }
.secure.is-unlocked .secure__hex { color: var(--ok); }
.secure.is-failed .secure__hex { color: #f87171; }
.secure__steps { width: 100%; display: grid; gap: .5rem; margin: 0; padding: 0; list-style: none; }
.secure__steps li { position: relative; padding-left: 1.75rem; font-size: .95rem; line-height: 1.35; color: var(--muted); opacity: .42; transition: opacity .35s, color .35s; }
.secure__steps li::before { content: ''; position: absolute; left: 0; top: .22em; width: .95rem; height: .95rem; box-sizing: border-box; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--line-2); }
.secure__steps li.is-active { opacity: 1; color: var(--fg); }
.secure__steps li.is-active::before { box-shadow: none; border: 2px solid rgba(56, 189, 248, .28); border-top-color: var(--accent); animation: secure-spin .8s linear infinite; }
.secure__steps li.is-on { opacity: 1; color: var(--fg); }
.secure__steps li.is-on::before { background: var(--ok); box-shadow: none; }
.secure__steps li.is-on::after { content: ''; position: absolute; left: .26rem; top: .5em; width: .42rem; height: .22rem; border: solid var(--ink); border-width: 0 0 2px 2px; transform: rotate(-45deg); }
.secure.is-failed .secure__steps li.is-active { color: #f87171; }
.secure.is-failed .secure__steps li.is-active::before { animation: none; border-color: #f87171; }
.secure__bar { width: 100%; height: 3px; border-radius: 3px; background: var(--line); overflow: hidden; }
.secure__bar i { display: block; height: 100%; width: calc(var(--p, 0) * 100%); background: var(--grad); transition: width .55s var(--ease); }
.secure.is-failed .secure__bar i { background: #f87171; }
/* richieste dentro la schermata: conferma di lettura singola e password (a metà percorso) */
.secure__ask { width: 100%; display: grid; gap: .7rem; padding: 1rem 1.1rem 1.1rem; border-radius: 14px; background: rgba(251, 191, 36, .06); box-shadow: inset 0 0 0 1px rgba(251, 191, 36, .4); animation: secure-ask-in .4s var(--ease) both; }
.secure__ask[hidden] { display: none; }
.secure__ask-title { margin: 0; font-size: 1.05rem; font-weight: 650; line-height: 1.25; color: var(--fg); }
.secure__ask-text { margin: 0; font-size: .9rem; line-height: 1.5; color: var(--muted); }
.secure__ask-field { position: relative; }
.secure__ask-field input { width: 100%; min-height: 3rem; padding: .6rem 3rem .6rem .9rem; border: 1px solid var(--line-2); border-radius: 11px; background: var(--panel); color: var(--fg); font: 500 1rem/1.2 var(--mono); letter-spacing: .04em; }
.secure__ask-field input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.secure__eye { position: absolute; right: .3rem; top: 50%; translate: 0 -50%; display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border: 0; border-radius: 9px; background: transparent; color: var(--muted); cursor: pointer; }
.secure__eye:hover, .secure__eye:focus-visible { color: var(--fg); background: rgba(255, 255, 255, .07); }
.secure__ask-error { margin: 0; font-size: .9rem; font-weight: 600; color: #f87171; }
.secure__ask-error[hidden] { display: none; }
.secure__ask-acts { display: flex; flex-wrap: wrap; gap: .6rem; }
.secure__ask-acts .btn { min-height: 2.9rem; padding: .55rem 1.2rem; font-size: .98rem; }
.secure__ask-acts .btn--sun { flex: 1 1 11rem; }
.secure.is-asking .secure__wire, .secure.is-asking .secure__hex { display: none; }
.secure.is-asking .secure__lock { color: #fbbf24; background: rgba(251, 191, 36, .08); box-shadow: inset 0 0 0 1px #fbbf24, 0 0 2rem rgba(251, 191, 36, .25); animation: secure-pulse-warn 1.6s ease-in-out infinite; }
.secure.is-asking .secure__lock::before { border-color: rgba(251, 191, 36, .45); animation-duration: 2.4s; }
.secure.is-wrong .secure__lock { animation: secure-shake .5s ease-in-out 1, secure-pulse-warn 1.6s ease-in-out .5s infinite; }
.secure.is-asking::after { animation-play-state: paused; opacity: .4; }
.secure.is-asking .secure__steps li:not(.is-active) { display: none; }
.secure.is-asking .secure__steps { gap: 0; }
.secure.is-asking .secure__tag i { background: #fbbf24; box-shadow: 0 0 0 3px rgba(251, 191, 36, .25); }
.secure.is-asking .secure__steps li.is-active::before { animation: none; border: 2px solid #fbbf24; background: radial-gradient(#fbbf24 40%, transparent 45%); }
.secure.is-asking .secure__steps li.is-active { color: #fbbf24; }
.secure.is-burned .secure__hex { color: #fbbf24; }
.secure.is-burned .secure__lock { color: #fbbf24; background: rgba(251, 191, 36, .08); box-shadow: inset 0 0 0 1px #fbbf24, 0 0 2.2rem rgba(251, 191, 36, .3); }
@keyframes secure-ask-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes secure-pulse-warn { 50% { box-shadow: inset 0 0 0 1px #fbbf24, 0 0 2.6rem rgba(251, 191, 36, .4); } }
@media (max-width: 40rem) { .secure__ask-field input { font-size: 1rem; } .secure__ask-acts .btn { flex: 1 1 100%; } }
@media (max-height: 640px) { .secure.is-asking .secure__lock { width: 3.6rem; height: 3.6rem; } .secure.is-asking .secure__lock svg { width: 1.7rem; height: 2rem; } .secure__ask { padding: .8rem .9rem .9rem; gap: .5rem; } .secure__ask-text { display: none; } }

@keyframes secure-scan { to { top: 100%; } }
@keyframes secure-ring { 0% { transform: scale(.92); opacity: .9; } 100% { transform: scale(1.28); opacity: 0; } }
@keyframes secure-burst { 0% { transform: scale(.95); opacity: 1; } 100% { transform: scale(1.8); opacity: 0; } }
@keyframes secure-pulse { 50% { box-shadow: inset 0 0 0 1px var(--accent), 0 0 2rem rgba(56, 189, 248, .35); } }
@keyframes secure-packet { 0% { left: 0; opacity: 0; } 12% { opacity: 1; } 88% { opacity: 1; } 100% { left: calc(100% - .95rem); opacity: 0; } }
@keyframes secure-spin { to { transform: rotate(360deg); } }
@keyframes secure-shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
@media (max-width: 40rem) { .secure__lock { width: 5.4rem; height: 5.4rem; } .secure__lock svg { width: 2.6rem; height: 3.1rem; } .secure__steps li { font-size: .9rem; } }
@media (max-height: 560px) { .secure__panel { gap: .7rem; } .secure__lock { width: 4.4rem; height: 4.4rem; } .secure__lock svg { width: 2.1rem; height: 2.5rem; } .secure__steps { gap: .3rem; } }
@media (max-height: 520px) { .secure.is-asking .secure__lock, .secure.is-asking .secure__tag { display: none; } .note-intro { display: none; } .secure { padding: .6rem; } }
@media (prefers-reduced-motion: reduce) { .secure { display: none; } }

.svc-box__main::after { content: ''; display: block; height: var(--tail, 0px); }
.svc-box__main { overflow-y: auto; overscroll-behavior: contain; padding: clamp(1.4rem, 3vw, 2.6rem); scroll-behavior: smooth; }
.svc-sec { padding-bottom: clamp(2rem, 4vw, 3rem); }
.svc-sec + .svc-sec { padding-top: clamp(1.6rem, 3vw, 2.4rem); border-top: 1px solid var(--line); }
.svc-box .tag { color: var(--c); }
.svc-sec h2 { font-size: clamp(1.5rem, 1rem + 1.6vw, 2.3rem); margin-bottom: 1.2rem; }
.svc-title { margin-top: .9rem; font-size: clamp(2.1rem, 1rem + 3.4vw, 4.2rem); line-height: 1; letter-spacing: -.04em; overflow-wrap: anywhere; }
.svc-lead { margin-top: 1rem; font-size: clamp(1.15rem, 1rem + .5vw, 1.45rem); line-height: 1.4; max-width: 34rem; opacity: .92; }
.svc-sec .hero__actions { margin-top: 1.6rem; }
.svc-sec .btn--sun { background: var(--c); box-shadow: 0 .6rem 1.6rem -.8rem var(--c); }
.svc-text { margin-top: 2rem; max-width: 40rem; font-size: 1.15rem; line-height: 1.65; color: var(--muted); }
.svc-text p:first-child { color: var(--fg); font-size: 1.2rem; }
.svc-sec .techs { margin-top: 1.4rem; }
.svc-box .svc-points { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.svc-box .work-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 13rem), 1fr)); gap: 1rem; }
.svc-box .work-card__title { font-size: 1.1rem; }

/* da telefono l'indice dei servizi sotto il rack (le etichette dentro il rack sarebbero troppo piccole) */

.dock { position: fixed; right: 1rem; bottom: 1rem; z-index: 38; display: flex; flex-direction: column; align-items: flex-end; gap: .6rem; }
.has-overlay .dock { display: none; }
.fab { position: relative; display: grid; place-items: center; width: 3.1rem; height: 3.1rem; padding: 0; border: 0; border-radius: 14px; background: rgba(14, 19, 27, .82); color: var(--fg); box-shadow: inset 0 0 0 1px var(--line-2), 0 .8rem 1.8rem -.7rem rgba(0, 0, 0, .8); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); text-decoration: none; transition: transform .35s var(--ease), background-color .25s, color .25s; }
.fab[hidden] { display: none; }
.fab .ico { width: 1.45rem; height: 1.45rem; }
.fab--wa { color: #25d366; }
.fab:hover, .fab:focus-visible { transform: translateY(-3px); background: var(--fg); color: var(--ink); }
.fab__label { position: absolute; right: calc(100% + .7rem); top: 50%; translate: 0 -50%; padding: .4rem .85rem; border-radius: 8px; background: var(--fg); color: var(--ink); font: 500 .78rem/1 var(--mono); letter-spacing: .02em; white-space: nowrap; opacity: 0; transform: translateX(10px); pointer-events: none; transition: opacity .25s, transform .35s var(--ease); }
.fab:hover .fab__label, .fab:focus-visible .fab__label { opacity: 1; transform: none; }

/* ---------- 14. Adattamento ai formati stretti ---------- */
@media (max-width: 62rem) {
  .rackhome { grid-template-columns: minmax(0, 1fr); gap: 2rem; padding-bottom: 6rem; align-items: start; }
  .rackhome__title { font-size: clamp(2.3rem, 9.4vw, 4.2rem); }
  .rack-stage { --py: -4deg; justify-content: center; }
  .rack-cam { justify-content: center; transform-origin: 50% 50%; }
  .rack { --U: clamp(1.8rem, 6.6vw, 2.8rem); }
  .unit__tag { display: none; }
  
  .svc-box { height: 100%; border-radius: 18px; }
  .svc-box__grid { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .svc-box__side { flex-direction: row; align-items: center; gap: .8rem; padding: .8rem 1rem; border-right: 0; border-bottom: 1px solid var(--line); overflow-x: auto; }
  .svc-box .svc-stage { display: none; }
  .svc-box__nav { display: flex; gap: .3rem; }
  .svc-box__nav a { white-space: nowrap; padding: .5rem .8rem; background: rgba(255, 255, 255, .05); }
  .svc-box__nav a.is-on::before { display: none; }
  .svc-box .svc-points { grid-template-columns: minmax(0, 1fr); }
  .svc-box__meta span:first-child { display: none; }
  
      
  
  .contact__grid { grid-template-columns: minmax(0, 1fr); }
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
  
  
  .lightbox__inner { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; }
  .lightbox__info { padding: 1rem 1.2rem 1.4rem; }
  .lightbox__media { padding: 3.5rem 1rem .5rem; }
  .lightbox__media img { max-height: calc(100dvh - 15rem); }
}
@media (max-width: 40rem) {
  :root { --header-h: 3.8rem; }
  .sheet-view { padding: 0; }
  .svc-box { border-radius: 0; }
  .svc-box__bar { padding-left: .9rem; }
  .svc-box__crumb { display: none; }
  .site-footer { padding-bottom: 6rem; }
  .brand__text { display: none; }
  .site-header__inner { gap: .5rem; padding: 0 .4rem 0 .45rem; }
  .nav__menu { gap: .6rem; }
  .nav__menu a:not(.btn) { font-size: .92rem; }
  .nav__menu .btn { min-height: 2.5rem; padding: .45rem .95rem; font-size: .92rem; }
  .dock { flex-direction: row; right: 50%; translate: 50% 0; bottom: .8rem; }
  .fab__label { display: none; }
  .hero__actions .btn { flex: 1 1 100%; }
  .numbers, .values { grid-template-columns: minmax(0, 1fr); }
  .form__row { grid-template-columns: minmax(0, 1fr); }
  .site-footer__grid { grid-template-columns: minmax(0, 1fr); }
  
}

/* box dei contatti */
.svc-box--contact .contact__grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(1.4rem, 3vw, 2.4rem); }
.svc-box--contact .big-phone { font-size: clamp(1.9rem, 1rem + 2vw, 2.8rem); }
@media (max-width: 62rem) { .svc-box--contact .contact__grid { grid-template-columns: minmax(0, 1fr); } }

/* «Componete il vostro rack» */
.builder__side { gap: .9rem; }
.builder__label { font: 500 .72rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.mini { display: grid; gap: 3px; padding: .5rem; border-radius: 12px; background: #06080d; box-shadow: inset 0 0 0 1px var(--line); }
.mini__cap { height: 1.05rem; border-radius: 6px 6px 2px 2px; background: linear-gradient(180deg, #354052, #1b2230); font: 600 .52rem/1.05rem var(--mono); letter-spacing: .24em; text-align: center; color: var(--muted); }
.mini__slot { position: relative; display: grid; place-items: center; width: 100%; height: calc(var(--u) * 1.5rem); padding: 0; border: 1px dashed var(--line-2); border-radius: 3px; background: transparent; color: #8392a8; cursor: pointer; overflow: hidden; transition: border-color .25s, background-color .25s; }
.mini__slot:hover { border-color: var(--c); background: rgba(255, 255, 255, .03); }
.mini__label { font: 500 .6rem/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.mini__slot .art { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity .2s; }
.mini__slot.is-on { border-style: solid; border-color: color-mix(in srgb, var(--c) 55%, transparent); }
.mini__slot.is-on .art { opacity: 1; }
.mini__slot.is-on .mini__label { opacity: 0; }
.builder__sum { font: 500 .8rem/1.3 var(--mono); letter-spacing: .02em; color: var(--muted); }
.builder__sum b { color: var(--fg); font-weight: 600; }
.builder__sum.is-on { color: var(--ok); }
.svc-sec .builder__h { margin: 2.4rem 0 1.1rem; font: 500 .8rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.picks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
.pick { --c: var(--accent); position: relative; display: grid; grid-template-columns: minmax(0, 7.5rem) minmax(0, 1fr) auto; align-items: center; gap: .9rem; width: 100%; padding: .7rem .9rem .7rem .7rem; border: 0; border-radius: 14px; background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); color: var(--fg); text-align: left; cursor: pointer; transition: box-shadow .25s, background-color .25s, transform .3s var(--ease); }
.pick:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 1px var(--line-2); }
.pick[aria-pressed="true"] { background: color-mix(in srgb, var(--c) 9%, var(--panel)); box-shadow: inset 0 0 0 1.5px var(--c); }
.pick__art { padding: .35rem; border-radius: 8px; background: #06080d; }
.pick__art .art { width: 100%; height: auto; }
.pick__txt { display: grid; gap: .25rem; min-width: 0; }
.pick__txt strong { font-size: .98rem; font-weight: 600; line-height: 1.2; }
.pick__txt small { font: 500 .68rem/1.2 var(--mono); letter-spacing: .04em; color: var(--muted); }
.pick__state { width: 1.5rem; height: 1.5rem; border-radius: 7px; box-shadow: inset 0 0 0 1.5px var(--line-2); transition: background-color .25s, box-shadow .25s; position: relative; }
.pick[aria-pressed="true"] .pick__state { background: var(--c); box-shadow: none; }
.pick[aria-pressed="true"] .pick__state::after { content: ''; position: absolute; left: .5rem; top: .22rem; width: .36rem; height: .7rem; border: solid var(--ink); border-width: 0 2px 2px 0; transform: rotate(40deg); }
.svc-box--contact .contact__grid { margin-top: 0; }
@media (max-width: 62rem) {
  .svc-box--contact .svc-box__side { padding: .7rem 1rem; }
  .svc-box--contact .mini, .svc-box--contact .builder__label { display: none; }
  .picks { grid-template-columns: minmax(0, 1fr); }
  .pick { grid-template-columns: minmax(0, 6rem) minmax(0, 1fr) auto; }
}

/* popup di un apparato (telefono) e suggerimento diverso per il mouse e per il tocco */
.unit.is-picked .unit__art { filter: drop-shadow(0 0 .5em var(--c)) brightness(1.15); }
.unit.is-picked::after { content: ''; position: absolute; inset: -3px; border-radius: 6px; box-shadow: 0 0 0 2px var(--c); pointer-events: none; }
.unit-pop { --c: var(--accent); --ax: 50%; position: fixed; z-index: 39; width: min(20rem, calc(100vw - 24px)); padding: 1rem 1.1rem 1.05rem; border-radius: 16px; background: rgba(14, 19, 27, .97); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: inset 0 0 0 1px var(--line-2), 0 1.4rem 3rem -1rem rgba(0, 0, 0, .9); }
.unit-pop::before { content: ''; position: absolute; left: calc(var(--ax) - 7px); top: -7px; width: 14px; height: 14px; rotate: 45deg; background: rgba(14, 19, 27, .97); box-shadow: -1px -1px 0 var(--line-2); border-radius: 3px 0 0 0; }
.unit-pop.is-above::before { top: auto; bottom: -7px; box-shadow: 1px 1px 0 var(--line-2); border-radius: 0 0 3px 0; }
.unit-pop__tag { display: flex; align-items: center; gap: .5rem; font: 500 .72rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--c); }
.unit-pop__tag i { width: .5rem; height: .5rem; border-radius: 50%; background: var(--c); box-shadow: 0 0 .6rem var(--c); }
.unit-pop strong { display: block; margin-top: .6rem; font-size: 1.2rem; font-weight: 650; letter-spacing: -.02em; line-height: 1.15; }
.unit-pop > p:not(.unit-pop__tag) { margin-top: .4rem; color: var(--muted); font-size: .98rem; line-height: 1.4; }
.unit-pop__actions { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin-top: .9rem; }
.unit-pop .btn--sun { background: var(--c); box-shadow: 0 .5rem 1.2rem -.6rem var(--c); }
.hint-t { display: none; }
@media (hover: none) { .hint-d { display: none; } .hint-t { display: inline; } }

/* disegno tecnico: quote, unità U e riquadro tratteggiato dietro l'armadio */
.rack { padding-top: 2.6em; }
.rack__dim { position: absolute; left: 0; right: 0; top: .5em; height: 1.2em; display: grid; place-items: center; font: 500 .62em/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.rack__dim::before { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--line-2); }
.rack__dim::after { content: ''; position: absolute; left: 0; right: 0; top: calc(50% - 4px); height: 9px; border-inline: 1px solid var(--line-2); }
.rack__dim span { position: relative; padding: 0 .8em; background: #090c11; }
.rack__ruler { position: absolute; top: .45em; left: calc(100% + .7em); width: 2.6em; display: grid; grid-auto-rows: var(--U); }
.rack__ruler i { position: relative; display: flex; align-items: center; padding-left: .9em; font: 500 .62em/1 var(--mono); font-style: normal; letter-spacing: .04em; color: #566176; }
.rack__ruler i::before { content: ''; position: absolute; left: 0; top: 50%; width: .6em; height: 1px; background: var(--line-2); }
.rack-stage::before { content: ''; position: absolute; right: -1.2rem; top: 1.2rem; bottom: -.8rem; width: min(calc(100% + 2rem), 33rem); border: 1px dashed rgba(148, 163, 184, .16); border-radius: 6px; pointer-events: none;
  background: linear-gradient(var(--line-2), var(--line-2)) 0 0 / 14px 1px no-repeat, linear-gradient(var(--line-2), var(--line-2)) 0 0 / 1px 14px no-repeat, linear-gradient(var(--line-2), var(--line-2)) 100% 0 / 14px 1px no-repeat, linear-gradient(var(--line-2), var(--line-2)) 100% 0 / 1px 14px no-repeat, linear-gradient(var(--line-2), var(--line-2)) 0 100% / 14px 1px no-repeat, linear-gradient(var(--line-2), var(--line-2)) 0 100% / 1px 14px no-repeat, linear-gradient(var(--line-2), var(--line-2)) 100% 100% / 14px 1px no-repeat, linear-gradient(var(--line-2), var(--line-2)) 100% 100% / 1px 14px no-repeat; }

/* rifinitura: riflessi sui frontali, metallo spazzolato, alone dei LED sul pavimento */
.unit::before { content: ''; position: absolute; inset: 0 1.5em; z-index: 2; border-radius: 2px; pointer-events: none; background: linear-gradient(115deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, 0) 34%, rgba(255, 255, 255, 0) 64%, rgba(255, 255, 255, .05)); }
.unit__ear { background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .2) 0 1px, rgba(0, 0, 0, .1) 1px 2px), linear-gradient(90deg, #c8cfdb, #7d8798); }
.rack__glow { position: absolute; left: -8%; right: -8%; bottom: -1.6em; height: 4.4em; filter: blur(1.1em); opacity: 0; transition: opacity 1.6s; transform: translateZ(-1em);
  background: radial-gradient(ellipse at 25% 55%, rgba(52, 211, 153, .5), transparent 60%), radial-gradient(ellipse at 72% 50%, rgba(56, 189, 248, .42), transparent 62%), radial-gradient(ellipse at 50% 60%, rgba(251, 191, 36, .22), transparent 60%); }
.rack.is-live .rack__glow { opacity: .85; }
.rack.is-opening .rack__glow { opacity: .25; }

/* pulsanti fissi in basso a sinistra (a destra c'è il righello delle unità) */
.dock { right: auto; left: var(--gutter); bottom: 1rem; flex-direction: row; align-items: flex-end; }
.fab__label { right: auto; left: 50%; top: auto; bottom: calc(100% + .6rem); translate: -50% 0; transform: translateY(8px); }
.fab:hover .fab__label, .fab:focus-visible .fab__label { transform: none; }
@media (max-width: 62rem) {
  .rack__ruler, .rack-stage::before { display: none; }
  .rack__dim { font-size: .7em; }
}
@media (max-width: 40rem) {
  .dock { left: 50%; translate: -50% 0; right: auto; bottom: .6rem; gap: .4rem; padding: .4rem; border-radius: 20px; background: color-mix(in srgb, var(--bg) 88%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: inset 0 0 0 1px var(--line-2); }
  .site-footer { padding-bottom: 6.5rem; }
}

/* foto dei lavori: stesso trattamento per tutte (taglio freddo e cornice da schermo), qualunque sia la fotocamera */
.work-card__media, .gallery__btn { position: relative; isolation: isolate; }
.work-card__media img, .gallery__btn img { filter: saturate(.78) contrast(1.06) brightness(.93); transition: transform .9s var(--ease), filter .5s; }
.work-card__media::before, .gallery__btn::before { content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none; mix-blend-mode: soft-light; transition: opacity .5s;
  background: linear-gradient(160deg, rgba(56, 130, 246, .55), rgba(9, 12, 17, .55) 70%), repeating-linear-gradient(0deg, rgba(255, 255, 255, .05) 0 1px, transparent 1px 3px); }
.work-card__media::after, .gallery__btn::after { content: ''; position: absolute; inset: .55rem; z-index: 2; pointer-events: none; opacity: .7; transition: opacity .4s, inset .4s var(--ease);
  --b: rgba(186, 215, 255, .8);
  background:
    linear-gradient(var(--b), var(--b)) top left / 1rem 1px no-repeat, linear-gradient(var(--b), var(--b)) top left / 1px 1rem no-repeat,
    linear-gradient(var(--b), var(--b)) top right / 1rem 1px no-repeat, linear-gradient(var(--b), var(--b)) top right / 1px 1rem no-repeat,
    linear-gradient(var(--b), var(--b)) bottom left / 1rem 1px no-repeat, linear-gradient(var(--b), var(--b)) bottom left / 1px 1rem no-repeat,
    linear-gradient(var(--b), var(--b)) bottom right / 1rem 1px no-repeat, linear-gradient(var(--b), var(--b)) bottom right / 1px 1rem no-repeat; }
.work-card__link:hover .work-card__media::before, .gallery__btn:hover::before { opacity: .45; }
.work-card__link:hover .work-card__media::after, .gallery__btn:hover::after { opacity: 1; inset: .4rem; }
.work-card__link:hover .work-card__media img, .gallery__btn:hover img { filter: saturate(1) contrast(1.02) brightness(1); }
.work-card__count { z-index: 3; }
@media (prefers-reduced-motion: reduce) { .work-card__media::after, .gallery__btn::after { transition: none; } }

/* ---------- Tema chiaro (facoltativo: si attiva dal pannello Accessibilità; il rack e gli apparati restano scuri come l'hardware vero) ---------- */
html.a11y-light { --bg: #eaeff6; --panel: #ffffff; --panel-2: #f1f5fa; --line: rgba(15, 27, 45, .12); --line-2: rgba(15, 27, 45, .26);
  --fg: #0e1a2b; --muted: #475569; --accent: #0369c9; --accent-2: #4f46e5; color-scheme: light; }
html.a11y-light body::before { background:
    radial-gradient(900px 620px at 78% 38%, rgba(56, 189, 248, .2), transparent 62%), radial-gradient(760px 520px at 6% -4%, rgba(99, 102, 241, .12), transparent 60%),
    linear-gradient(rgba(15, 27, 45, .05) 1px, transparent 1px) 0 0 / 56px 56px, linear-gradient(90deg, rgba(15, 27, 45, .05) 1px, transparent 1px) 0 0 / 56px 56px, var(--bg); }
html.a11y-light .site-header__inner { background: rgba(255, 255, 255, .82); box-shadow: inset 0 0 0 1px var(--line-2), 0 .8rem 2rem -1rem rgba(15, 27, 45, .25); }
html.a11y-light .site-header.is-scrolled .site-header__inner { box-shadow: inset 0 0 0 1px var(--line-2), 0 1rem 2.4rem -1rem rgba(15, 27, 45, .35); }
html.a11y-light .skip-link { background: var(--fg); color: #fff; }
html.a11y-light .btn--solid { color: #fff; }
html.a11y-light .btn--solid:hover { background: #1d2c44; border-color: #1d2c44; }
html.a11y-light .btn:hover { background: rgba(3, 105, 201, .08); }
html.a11y-light .icon-btn:hover { background: rgba(15, 27, 45, .07); }
html.a11y-light .field input, html.a11y-light .field select, html.a11y-light .field textarea { background: #fff; }
html.a11y-light .field select option { background: #fff; color: var(--fg); }
html.a11y-light .field input::placeholder, html.a11y-light .field textarea::placeholder { color: #7a889c; }
html.a11y-light .field__error, html.a11y-light .form__status.is-error { color: #b91c1c; }
html.a11y-light .form__status.is-ok { color: #047857; }
html.a11y-light dialog.sheet { box-shadow: inset 0 0 0 1px var(--line-2), 0 2rem 5rem -1rem rgba(15, 27, 45, .35); }
html.a11y-light .sheet-view__backdrop { background: rgba(214, 223, 236, .72); }
html.a11y-light .svc-box { background: radial-gradient(ellipse 60% 40% at 90% 0%, color-mix(in srgb, var(--c) 14%, transparent), transparent 70%), linear-gradient(rgba(15, 27, 45, .04) 1px, transparent 1px) 0 0 / 40px 40px, linear-gradient(90deg, rgba(15, 27, 45, .04) 1px, transparent 1px) 0 0 / 40px 40px, #f7f9fc;
  box-shadow: inset 0 0 0 1px var(--line-2), 0 3rem 6rem -1.5rem rgba(15, 27, 45, .45); }
html.a11y-light .svc-box__bar { background: rgba(255, 255, 255, .8); }
html.a11y-light .svc-box__side { background: rgba(236, 241, 248, .7); }

html.a11y-light .site-footer { background: #dfe6f0; }
html.a11y-light .curtain { background: #eaeff6; }
html.a11y-light .fab { background: rgba(255, 255, 255, .9); }
html.a11y-light .unit-pop { background: rgba(255, 255, 255, .98); }
html.a11y-light .rack__dim span { background: var(--bg); }
html.a11y-light .rack__ruler i { color: #64748b; }
html.a11y-light .rack__shadow { background: radial-gradient(closest-side, rgba(15, 27, 45, .45), transparent); }
html.a11y-light .rack-stage::before { border-color: rgba(15, 27, 45, .2); }

.svc-box .work-grid { margin-top: 1.5rem; }
html.a11y-light .rack__cap, html.a11y-light .mini__cap, html.a11y-light .mini__label, html.a11y-light .builder__side .mini { color: #9fb0c6; }
html.a11y-light .unit-pop__tag { color: var(--muted); }

/* tema chiaro: ritocchi di contrasto (accenti dei servizi scuriti per il testo, etichette su fondi scuri, tooltip) */
html.a11y-light .svc-box { --ct: color-mix(in srgb, var(--c) 45%, #0b1220); }
html.a11y-light .svc-box .tag, html.a11y-light .svc-box__status { color: var(--ct, var(--accent)); }
html.a11y-light .svc-box__crumb b { color: #64748b; }
html.a11y-light .svc-box__status i { background: var(--ct, var(--ok)); box-shadow: none; }
html.a11y-light .fab__label { background: #0e1a2b; color: #f4f7fb; }
html.a11y-light .work-card__count { color: #e8edf4; }
html.a11y-light .rack__cap, html.a11y-light .rack__cap * { color: #aab6c8; }
html.a11y-light .rack__ruler i { color: #55627a; }
html.a11y-light .site-footer { background: #e4eaf3; }
html.a11y-light .site-footer__h { color: #0a5aa8; }
html.a11y-light .unit__tag::after { background: var(--line-2); }
html.a11y-light .segmented button[aria-pressed="true"] { background: var(--fg); color: #fff; }
html.a11y-light dialog::backdrop { background: rgba(205, 216, 232, .72); }
html.a11y-light .switch-row__track { background: #e3e9f2; border-color: #94a3b8; }
html.a11y-light .switch-row__track::after { background: #64748b; }
html.a11y-light .switch-row[aria-checked="true"] .switch-row__track { background: rgba(3, 105, 201, .18); border-color: var(--accent); }
html.a11y-light .switch-row[aria-checked="true"] .switch-row__track::after { background: var(--accent); }

/* biglietto da visita digitale */
.bcard { padding: 1.1rem; border-radius: 18px; background: radial-gradient(ellipse 80% 60% at 100% 0%, rgba(56, 189, 248, .18), transparent 70%), linear-gradient(160deg, #141c28, #0b1017); box-shadow: inset 0 0 0 1px var(--line-2), 0 1.6rem 3rem -1.6rem rgba(0, 0, 0, .9); display: grid; gap: 1rem; justify-items: center; text-align: center; }
.bcard__head { display: flex; align-items: center; gap: .8rem; text-align: left; justify-self: stretch; }
.bcard__head img { width: 3.2rem; height: 3.2rem; padding: 3px; border-radius: 12px; background: #fff; flex: none; }
.bcard__head strong { display: block; font-size: 1.2rem; letter-spacing: -.03em; line-height: 1.1; }
.bcard__head span { display: block; margin-top: .25rem; font: 500 .66rem/1.3 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.bcard__qr { padding: .5rem; border-radius: 14px; background: #fff; line-height: 0; }
.bcard__qr svg { width: min(100%, 11.5rem); height: auto; }
.bcard__foot { font-size: .92rem; line-height: 1.4; color: var(--fg); }
.bcard__foot span { display: block; margin-top: .3rem; font: 500 .66rem/1.3 var(--mono); letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.card-acts { display: grid; gap: .7rem; margin-top: 1.6rem; max-width: 34rem; }
.card-act { display: flex; align-items: center; gap: 1rem; width: 100%; padding: 1rem 1.15rem; border: 0; border-radius: 14px; background: var(--panel); color: var(--fg); text-align: left; text-decoration: none; box-shadow: inset 0 0 0 1px var(--line-2); transition: background-color .2s, box-shadow .2s, transform .25s var(--ease); }
.card-act:hover { background: var(--panel-2); box-shadow: inset 0 0 0 1px var(--accent); transform: translateY(-2px); }
.card-act .ico { width: 1.5rem; height: 1.5rem; color: var(--accent); }
.card-act strong { display: block; font-size: 1.12rem; letter-spacing: -.02em; }
.card-act small { display: block; margin-top: .15rem; color: var(--muted); font-size: .92rem; overflow-wrap: anywhere; }
.card-act--main { background: var(--grad); color: var(--ink); box-shadow: 0 .8rem 1.8rem -1rem rgba(56, 189, 248, .9); }
.card-act--main:hover { background: var(--grad); filter: brightness(1.08); box-shadow: 0 1rem 2rem -1rem rgba(56, 189, 248, 1); }
.card-act--main .ico, .card-act--main small { color: var(--ink); }
.card-acts [hidden] { display: none; }
.ico--down { transform: rotate(90deg); }
html.a11y-light .bcard { background: radial-gradient(ellipse 80% 60% at 100% 0%, rgba(56, 189, 248, .22), transparent 70%), linear-gradient(160deg, #1b2636, #0e141d); color: #e8edf4; }
html.a11y-light .bcard__head span, html.a11y-light .bcard__foot span { color: #9fb0c6; }
html.a11y-light .card-act--main { color: #06101c; }

.quote-act { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem 1rem; margin-top: 1.2rem; }
.quote-act span { color: var(--muted); font-size: .95rem; }
.print-sheet { display: none; }

/* ---------- Stampa: riepilogo del rack scelto (foglio A4, colori propri, indipendente dal tema) ---------- */
@media print {
  @page { size: A4; margin: 14mm; }
  html, body { overflow: visible !important; height: auto !important; background: #fff !important; }
  body::before { display: none !important; }
  body > *:not(.print-sheet) { display: none !important; }
  .print-sheet { display: block; color: #0e1a2b; font: 400 10.5pt/1.45 'Inter Tight', Arial, sans-serif; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .print-sheet h1 { margin: 6mm 0 2mm; font-size: 20pt; letter-spacing: -.02em; line-height: 1.1; }
  .print-sheet h2 { margin: 0; font-size: 12pt; letter-spacing: -.01em; }
  .quote__head { display: flex; align-items: center; gap: 4mm; padding-bottom: 4mm; border-bottom: .6mm solid #38bdf8; }
  .quote__head img { width: 14mm; height: 14mm; }
  .quote__head div { flex: 1; }
  .quote__head strong { display: block; font-size: 15pt; letter-spacing: -.02em; }
  .quote__head span, .quote__head p { color: #475569; font-size: 9pt; margin: 0; }
  .quote__for { margin: 0 0 4mm; color: #334155; }
  .quote__body { display: grid; grid-template-columns: 62mm 1fr; gap: 8mm; align-items: start; margin-top: 5mm; }
  .quote__rack { margin: 0; padding: 3mm; border-radius: 3mm; background: #0b1017; color: #e8edf4; break-inside: avoid; }
  .quote__cap { margin-bottom: 1.5mm; padding: 1mm 0; border-radius: 1.2mm 1.2mm .4mm .4mm; background: #2a3445; text-align: center; font: 700 6pt/1 ui-monospace, Consolas, monospace; letter-spacing: .3em; color: #aab6c8; }
  .quote__rack ol { display: grid; gap: .7mm; margin: 0; padding: 0; list-style: none; }
  .quote__unit { position: relative; padding-left: 7mm; }
  .quote__unit .art { display: block; width: 100%; height: auto; }
  .quote__u { position: absolute; left: 0; top: 50%; translate: 0 -50%; font: 500 5.5pt/1 ui-monospace, Consolas, monospace; color: #8392a8; }
  .quote__rack figcaption { margin-top: 2mm; text-align: center; font: 500 6.5pt/1 ui-monospace, Consolas, monospace; letter-spacing: .06em; text-transform: uppercase; color: #8392a8; }
  .quote__list { margin: 0; padding: 0; list-style: none; display: grid; gap: 4mm; }
  .quote__list > li { break-inside: avoid; padding-bottom: 3mm; border-bottom: .2mm solid #cbd5e1; }
  .quote__list p { margin: .6mm 0 0; }
  .quote__fam { color: #0369c9; font: 500 7.5pt/1.2 ui-monospace, Consolas, monospace; letter-spacing: .05em; text-transform: uppercase; }
  .quote__list ul { margin: 1.5mm 0 0; padding-left: 4.5mm; list-style: disc; font-size: 9.5pt; color: #334155; }
  .quote__note { margin: 6mm 0 0; padding: 3mm 4mm; border-left: .8mm solid #38bdf8; background: #eef4fb; font-size: 9.5pt; color: #334155; break-inside: avoid; }
  .quote__foot { display: flex; justify-content: space-between; gap: 6mm; margin-top: 8mm; padding-top: 3mm; border-top: .2mm solid #cbd5e1; font-size: 9pt; color: #475569; break-inside: avoid; }
  .quote__foot p { margin: 0; }
}

/* ---------- Gruppo di continuità: il pulsante spegne e riaccende tutto il rack (sequenze in js/fx/rack-anim.js, mountPower) ---------- */
.unit--ups { cursor: default; }
.ups__btn { position: absolute; left: 89.1%; top: 50%; translate: -50% -50%; z-index: 2; width: calc(var(--U) * .84); aspect-ratio: 1; padding: 0; border: 0; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  color: var(--ok); background: radial-gradient(circle at 35% 28%, #4a5368, #1a202c 70%); box-shadow: inset 0 0 0 .12em #566074, 0 0 0 .16em #0b0e15, 0 0 1.1em color-mix(in srgb, var(--ok) 65%, transparent);
  transition: color .4s, box-shadow .5s, transform .15s var(--ease), filter .3s; transform: translateZ(1px); }
.ups__btn svg { width: 54%; height: 54%; filter: drop-shadow(0 0 .25em currentColor); }
.ups__btn:hover { filter: brightness(1.2); }
.ups__btn:active, .rack.is-switching .ups__btn { transform: translateZ(1px) scale(.92); }
.ups__btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
/* durante l'arresto e l'avvio il pulsante è ambra e lampeggia, a rack spento è rosso e pulsa piano («premetemi») */
.rack.is-switching .ups__btn { color: #fbbf24; box-shadow: inset 0 0 0 .12em #8a6a1c, 0 0 0 .16em #0b0e15, 0 0 1.2em rgba(251, 191, 36, .75); animation: upsblink .5s steps(1, end) infinite; }
@keyframes upsblink { 50% { filter: brightness(.55); } }
.rack.is-off:not(.is-switching) .ups__btn { color: #f87171; box-shadow: inset 0 0 0 .12em #6b3a3f, 0 0 0 .16em #0b0e15, 0 0 .9em rgba(248, 113, 113, .55); animation: standby 2.4s ease-in-out infinite; }
@keyframes standby { 50% { box-shadow: inset 0 0 0 .12em #6b3a3f, 0 0 0 .16em #0b0e15, 0 0 .2em rgba(248, 113, 113, .15); filter: brightness(.7); } }

/* display dell'UPS: un solo stato alla volta (attributo data-power sul rack) */
.ups-off, .ups-down, .ups-start { display: none; }
.rack[data-power="down"] .ups-on, .rack[data-power="start"] .ups-on, .rack[data-power="off"] .ups-on { display: none; }
.rack[data-power="down"] .ups-down, .rack[data-power="start"] .ups-start, .rack[data-power="off"] .ups-off { display: inline; }
.ups-down .fill, .ups-start .fill { transform-box: fill-box; transform-origin: 0 50%; animation: upsfill 1.15s linear forwards; }
@keyframes upsfill { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* spegnimento: LED che lampeggiano un istante e si spengono, schermi con un picco di luce che poi si abbassa (ritardi casuali dal JavaScript) */
.rack__slot.is-dark .l, .rack__slot.is-dark .bar, .rack__slot.is-dark .caret { animation: ledoff .55s ease-out forwards; }
@keyframes ledoff { 0% { opacity: 1; } 10% { opacity: .3; } 18% { opacity: .95; } 100% { opacity: .07; } }
.rack__slot.is-dark .unit__art { animation: unitoff .7s ease-out forwards; }
@keyframes unitoff { 0% { filter: none; } 6% { filter: brightness(1.75) saturate(1.2); } 14% { filter: brightness(.75); } 22% { filter: brightness(1.3); } 100% { filter: brightness(.42) saturate(.55); } }
.rack.is-thump .rack__shell { animation: thump .32s ease-out; }
@keyframes thump { 20% { transform: translateY(1.5px); } 55% { transform: translateY(-.6px); } }
.rack.is-off .rack__glow { opacity: 0 !important; }
.rack.is-off .rack__power { background: #f87171; box-shadow: 0 0 .9em #f87171; opacity: .55; }

/* accensione: picco di corrente, apparati che si accendono con sfarfallio e autotest dei LED */
.rack__slot.is-boot .unit__art { animation: unitboot .95s steps(1, end); }
@keyframes unitboot { 0% { filter: brightness(.42) saturate(.55); } 9% { filter: brightness(1.7); } 17% { filter: brightness(.45) saturate(.6); } 31% { filter: brightness(1.35); } 44% { filter: brightness(.6); } 60% { filter: brightness(1.15); } 100% { filter: none; } }
.rack__slot.is-boot .l, .rack__slot.is-boot .bar { animation: ledtest 1.1s steps(1, end); }
@keyframes ledtest { 0% { opacity: .07; } 12% { opacity: 1; } 34% { opacity: .1; } 56% { opacity: 1; } 78% { opacity: .1; } 100% { opacity: 1; } }
.rack.is-inrush .rack__glow { animation: inrush .5s steps(1, end); }
@keyframes inrush { 0% { opacity: 1; } 20% { opacity: .1; } 40% { opacity: .9; } 60% { opacity: .2; } 100% { opacity: .85; } }
@media (prefers-reduced-motion: reduce) { .rack.is-off:not(.is-switching) .ups__btn, .rack.is-switching .ups__btn { animation: none; } }
html.a11y-motion .rack.is-off:not(.is-switching) .ups__btn, html.a11y-motion .rack.is-switching .ups__btn { animation: none; }
/* senza animazioni: stato finale immediato */
@media (prefers-reduced-motion: reduce) {
  .rack__slot.is-dark .l, .rack__slot.is-dark .bar, .rack__slot.is-dark .caret { animation: none; opacity: .07; }
  .rack__slot.is-dark .unit__art { animation: none; filter: brightness(.42) saturate(.55); }
  .rack__slot.is-boot .unit__art, .rack__slot.is-boot .l, .rack__slot.is-boot .bar, .rack.is-thump .rack__shell, .rack.is-inrush .rack__glow { animation: none; }
}
html.a11y-motion .rack__slot.is-dark .l, html.a11y-motion .rack__slot.is-dark .bar, html.a11y-motion .rack__slot.is-dark .caret { animation: none; opacity: .07; }
html.a11y-motion .rack__slot.is-dark .unit__art { animation: none; filter: brightness(.42) saturate(.55); }
html.a11y-motion .rack__slot.is-boot .unit__art, html.a11y-motion .rack__slot.is-boot .l, html.a11y-motion .rack__slot.is-boot .bar, html.a11y-motion .rack.is-thump .rack__shell, html.a11y-motion .rack.is-inrush .rack__glow { animation: none; }
.ups__btn::after { content: ''; position: absolute; inset: -30%; border-radius: 50%; }   /* area di tocco più grande del pulsante disegnato */

/* schermi bassi (portatili): testi un po' più compatti, così la frase sull'armadio non finisce sotto i pulsanti fissi */
@media (min-width: 62rem) and (max-height: 780px) {
  .rackhome__title { margin-top: 1rem; }
  .rackhome .lead { margin-top: 1rem; font-size: 1.02rem; line-height: 1.45; }
  .rackhome__hint { margin-top: 1.1rem; font-size: 1rem; }
}

html.a11y-light .ht__phrase { color: #0369c9; }
html.a11y-contrast .ht__phrase { color: #fff; }

/* informative legali: tabelle, nota in evidenza, testo del modulo */
.svc-text--legal { max-width: 46rem; font-size: 1.05rem; line-height: 1.65; }
.svc-text--legal p:first-child { font-size: inherit; color: inherit; }
.svc-text--legal p + p, .svc-text--legal ul, .svc-text--legal .legal-table { margin-top: .9rem; }
.svc-text--legal ul { list-style: disc; padding-left: 1.3rem; display: grid; gap: .35rem; }
.svc-text--legal strong { color: var(--fg); font-weight: 650; }
.svc-text--legal a { color: var(--accent); }
.svc-text--legal code { font: 500 .88em var(--mono); padding: .1em .4em; border-radius: 5px; background: rgba(255, 255, 255, .07); color: var(--fg); }
.legal-note { padding: 1rem 1.2rem; border-radius: 12px; background: rgba(52, 211, 153, .08); box-shadow: inset 0 0 0 1px rgba(52, 211, 153, .35); color: var(--fg); }
.legal-table { overflow-x: auto; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--line-2); }
.legal-table table { width: 100%; border-collapse: collapse; font-size: .95rem; line-height: 1.5; min-width: 34rem; }
.legal-table th, .legal-table td { padding: .75rem .9rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.legal-table thead th { font: 500 .72rem/1.3 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); background: rgba(255, 255, 255, .03); }
.legal-table tbody th { font-weight: 650; color: var(--fg); width: 26%; }
.legal-table tr:last-child th, .legal-table tr:last-child td { border-bottom: 0; }
.legal-status { min-height: 1.4em; color: var(--ok); font-weight: 600; }
.form__privacy { font-size: .88rem; line-height: 1.5; color: var(--muted); max-width: 36rem; }
html.a11y-light .svc-text--legal code { background: rgba(15, 27, 45, .07); }
html.a11y-light .legal-note { background: rgba(4, 120, 87, .08); box-shadow: inset 0 0 0 1px rgba(4, 120, 87, .35); }
html.a11y-light .legal-table thead th { background: rgba(15, 27, 45, .04); }
.svc-text--legal .legal-table + p { margin-top: 1rem; }

/* finestra Assistenza remota: gruppi di download */
.steps__group { display: block; margin-top: .8rem; font: 500 .72rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.steps__group + .steps__row { margin-top: .45rem; }
.steps__note { display: block; margin-top: .8rem; font-size: .95rem; line-height: 1.45; color: var(--muted); }

/* schermi medio-piccoli (tablet e finestre strette), con mouse o touch: rack a destra come su desktop, nessun elenco dei servizi; il popup con il pulsante compare
   al passaggio del mouse oppure al tocco su un apparato (js/views/home.js) */
@media (max-width: 62rem) and (min-width: 40.01rem) {
  .rack-stage, .rack-cam { justify-content: flex-end; }
  .rack-cam { transform-origin: 85% 50%; }
  .rack { max-width: 27rem; }
}
.unit-pop.is-side::before { left: auto; right: -7px; top: calc(var(--ay, 50%) - 7px); box-shadow: 1px -1px 0 var(--line-2); border-radius: 0 3px 0 0; }

/* «Come lavoriamo»: linea di lavorazione. I nodi si accendono nel colore del servizio mentre si scorre, e il filo si riempie verso il passo successivo */
.svc-box { --svc: var(--c); }
.flow { position: relative; display: grid; margin-top: 1.6rem; max-width: 40rem; }
.flow__step { position: relative; display: grid; grid-template-columns: 2.7rem minmax(0, 1fr); gap: 1.1rem; padding-bottom: 1.7rem; }
.flow__step:last-child { padding-bottom: 0; }
.flow__node { position: relative; z-index: 1; display: grid; place-items: center; width: 2.7rem; height: 2.7rem; border-radius: 50%; background: var(--panel); box-shadow: inset 0 0 0 1.5px var(--line-2); font: 600 .95rem/1 var(--mono); color: var(--muted); transition: color .5s, background-color .5s, box-shadow .6s; }
.flow__node .ico { width: 1.2rem; height: 1.2rem; }
/* filo tra un nodo e il successivo: grigio, poi colorato quando il passo è acceso */
.flow__step:not(:last-child)::before, .flow__step:not(:last-child)::after { content: ''; position: absolute; left: calc(1.35rem - 1px); top: 2.7rem; bottom: 0; width: 2px; border-radius: 1px; }
.flow__step:not(:last-child)::before { background: var(--line-2); }
.flow__step:not(:last-child)::after { background: linear-gradient(var(--svc, var(--accent)), color-mix(in srgb, var(--svc, var(--accent)) 35%, transparent)); transform: scaleY(0); transform-origin: 50% 0; transition: transform .9s var(--ease) .25s; }
.flow__txt h3 { margin: .35rem 0 .3rem; font-size: 1.3rem; font-weight: 650; letter-spacing: -.025em; line-height: 1.15; }
.flow__txt p { color: var(--muted); font-size: 1.04rem; line-height: 1.55; text-wrap: pretty; }
.flow__step.is-on .flow__node { color: var(--svc, var(--accent)); background: color-mix(in srgb, var(--svc, var(--accent)) 14%, var(--panel)); box-shadow: inset 0 0 0 1.5px var(--svc, var(--accent)), 0 0 1.5rem color-mix(in srgb, var(--svc, var(--accent)) 55%, transparent); }
.flow__step.is-on:not(:last-child)::after { transform: scaleY(1); }
.flow__step--end.is-on .flow__node { background: var(--svc, var(--accent)); color: var(--ink); box-shadow: 0 0 1.8rem color-mix(in srgb, var(--svc, var(--accent)) 70%, transparent); }
.flow__step--end .flow__txt h3 { color: var(--svc, var(--accent)); }
/* acceso per gradi: il testo prende luce quando il passo si accende (solo se il JavaScript ha armato la linea) */
.flow.is-armed .flow__txt { opacity: .38; transform: translateX(10px); transition: opacity .6s var(--ease), transform .7s var(--ease); }
.flow.is-armed .flow__step.is-on .flow__txt { opacity: 1; transform: none; }
html.a11y-light .flow__step--end.is-on .flow__node { color: #fff; }
html.a11y-light .flow__step--end .flow__txt h3 { color: color-mix(in srgb, var(--svc, var(--accent)) 55%, #0b1220); }

/* ---------- Avviso sui cookie (js/ui/consent.js) ---------- */
.consent {
  position: fixed; z-index: 58; left: var(--gutter); bottom: 5.2rem; width: min(44rem, calc(100% - 2 * var(--gutter)));
  border-radius: 18px; overflow: hidden; color: var(--fg);
  background: rgba(13, 18, 26, .93); -webkit-backdrop-filter: blur(16px) saturate(1.25); backdrop-filter: blur(16px) saturate(1.25);
  box-shadow: inset 0 0 0 1px var(--line-2), 0 1.8rem 3.6rem -1.4rem rgba(0, 0, 0, .9);
  opacity: 0; transform: translateY(46px); filter: blur(8px);
}
.consent[hidden] { display: none; }
.consent.is-in { animation: consent-in .72s var(--ease) forwards; }
.consent.is-leaving { animation: consent-out .5s var(--ease) forwards; }
.consent.is-wide { width: min(46rem, calc(100% - 2 * var(--gutter))); }
html.has-overlay .consent { visibility: hidden; }
/* linea di controllo che attraversa il bordo superiore */
.consent__scan { position: absolute; inset: 0 0 auto 0; height: 2px; overflow: hidden; }
.consent__scan i { display: block; width: 36%; height: 100%; background: linear-gradient(90deg, transparent, var(--accent), transparent); box-shadow: 0 0 14px 2px rgba(56, 189, 248, .8); transform: translateX(-120%); }
.consent.is-in .consent__scan i { animation: consent-scan .95s cubic-bezier(.65, 0, .2, 1) .1s forwards; }
.consent__body { padding: 1rem 1.2rem 1.1rem; }
.consent__head { display: flex; align-items: center; flex-wrap: wrap; gap: .45rem .7rem; }
.consent__head h2 { margin: 0; font-size: 1.05rem; font-weight: 650; line-height: 1.2; }
.consent__led { flex: none; width: .6rem; height: .6rem; border-radius: 50%; background: #fbbf24; box-shadow: 0 0 0 3px rgba(251, 191, 36, .22); animation: consent-blink .55s steps(2) infinite; }
.consent.is-ready .consent__led { background: var(--accent); box-shadow: 0 0 0 3px rgba(56, 189, 248, .26); animation: none; }
.consent.is-done .consent__led { background: var(--ok); box-shadow: 0 0 0 3px rgba(52, 211, 153, .3); animation: consent-flash .4s ease 2; }
.consent__tag { margin-left: auto; font: 500 .68rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.consent.is-ready .consent__tag { color: var(--accent); }
.consent.is-done .consent__tag { color: var(--ok); }
/* il contenuto compare a gruppi, dopo la linea di controllo */
.consent__in > * { opacity: 0; }
.consent.is-ready .consent__in > * { animation: consent-fade .5s var(--ease) both; }
.consent.is-ready .consent__in > :nth-child(2) { animation-delay: .07s; }
.consent.is-ready .consent__in > :nth-child(3) { animation-delay: .14s; }
.consent.is-ready .consent__in > :nth-child(4) { animation-delay: .21s; }
.consent__text { margin: .7rem 0 0; font-size: .96rem; line-height: 1.55; color: var(--muted); }
.consent__text strong { color: var(--fg); font-weight: 600; }
.consent__details { margin-top: .8rem; max-height: min(44vh, 21rem); overflow-y: auto; overscroll-behavior: contain; padding-right: .2rem; }
.consent__details[hidden] { display: none; }
.consent__cats { display: grid; gap: .55rem; margin: 0; padding: 0; list-style: none; }
.cat { padding: .75rem .9rem; border-radius: 12px; background: rgba(255, 255, 255, .035); box-shadow: inset 0 0 0 1px var(--line); }
.cat__head { display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
.cat__head strong { font-size: .97rem; font-weight: 650; }
.cat p { margin: .4rem 0 0; font-size: .88rem; line-height: 1.5; color: var(--muted); }
.cat code { font-size: .85em; }
.cat--off { opacity: .82; }
.pill { flex: none; padding: .3rem .6rem; border-radius: 999px; background: rgba(52, 211, 153, .12); color: var(--ok); font: 500 .68rem/1 var(--mono); letter-spacing: .04em; white-space: nowrap; }
.pill--opt { background: rgba(56, 189, 248, .12); color: var(--accent); }
.pill--off { background: rgba(148, 163, 184, .12); color: var(--muted); }
.cat__switch { position: relative; display: inline-flex; align-items: center; gap: .7rem; cursor: pointer; }
.cat__switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.cat__track { position: relative; flex: none; width: 2.6rem; height: 1.45rem; border-radius: 1rem; border: 1px solid var(--line-2); transition: background-color .2s, border-color .2s; }
.cat__track::after { content: ''; position: absolute; left: .2rem; top: .2rem; width: .95rem; height: .95rem; border-radius: 50%; background: var(--muted); transition: transform .25s var(--ease), background-color .2s; }
.cat__switch input:checked + .cat__track { background: rgba(56, 189, 248, .25); border-color: var(--accent); }
.cat__switch input:checked + .cat__track::after { transform: translateX(1.15rem); background: var(--accent); }
.cat__switch input:focus-visible + .cat__track { outline: 2px solid var(--accent); outline-offset: 2px; }
.consent__acts { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem .9rem; margin-top: .95rem; }
.consent__acts .btn { min-height: 2.6rem; }
.consent__more, .consent__policy, .consent__close { font-size: .92rem; font-weight: 500; color: var(--accent); cursor: pointer; text-decoration: underline; text-underline-offset: .2em; }
.consent__more[hidden], .consent__close[hidden], .consent__acts .btn[hidden] { display: none; }
.consent__close { margin-left: auto; color: var(--muted); }
.consent__foot { margin: .8rem 0 0; font-size: .8rem; color: var(--muted); opacity: .85; }
html.a11y-light .consent { background: rgba(255, 255, 255, .95); box-shadow: inset 0 0 0 1px var(--line-2), 0 1.8rem 3.4rem -1.6rem rgba(15, 27, 45, .45); }
html.a11y-light .cat { background: var(--panel-2); }
@keyframes consent-in { from { opacity: 0; transform: translateY(46px); filter: blur(8px); } to { opacity: 1; transform: none; filter: blur(0); } }
@keyframes consent-out { from { opacity: 1; transform: none; filter: blur(0); } to { opacity: 0; transform: translateY(34px) scale(.985); filter: blur(6px); } }
@keyframes consent-scan { to { transform: translateX(300%); } }
@keyframes consent-blink { 50% { opacity: .25; } }
@keyframes consent-flash { 50% { box-shadow: 0 0 0 7px rgba(52, 211, 153, .35); } }
@keyframes consent-fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (max-width: 40rem) {
  .consent { left: .6rem; right: .6rem; width: auto; bottom: 4.9rem; border-radius: 16px; }
  .consent.is-wide { width: auto; }
  .consent__body { padding: .9rem 1rem 1rem; }
  .consent__details { max-height: 38vh; }
  .consent__acts .btn { flex: 1 1 calc(50% - .5rem); }
  .consent__tag { margin-left: 0; flex-basis: 100%; }
}
@media (max-height: 560px) { .consent { bottom: .6rem; } .consent__foot { display: none; } }
/* senza animazioni: tutto subito visibile */
html.a11y-motion .consent, html.a11y-motion .consent *, .consent.is-static, .consent.is-static * { animation: none !important; transition: none !important; }
html.a11y-motion .consent, html.a11y-motion .consent__in > * { opacity: 1; transform: none; filter: none; }
@media (prefers-reduced-motion: reduce) {
  .consent, .consent * { animation: none !important; transition: none !important; }
  .consent, .consent__in > * { opacity: 1; transform: none; filter: none; }
}
