/* ================================================================
   hidetect.html — "la veglia notturna": ciclo giorno/notte in hero,
   mappa di rete + radar sweep condivisi da #mdr e #assistenza-24-7,
   EKG in #mdr. Pagina specifica, non tocca css/style.css.
   ================================================================ */

/* ---------- Hero: stelle che compaiono una a una ---------- */
.hero--nightwatch { overflow: hidden; }
.nightwatch-stars {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}
.nightwatch-stars::before,
.nightwatch-stars::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1.6px 1.6px at 10% 20%, #fff, transparent),
    radial-gradient(1.6px 1.6px at 22% 55%, #fff, transparent),
    radial-gradient(1.2px 1.2px at 33% 15%, #fff, transparent),
    radial-gradient(1.6px 1.6px at 44% 70%, #fff, transparent),
    radial-gradient(1.2px 1.2px at 55% 35%, #fff, transparent),
    radial-gradient(1.6px 1.6px at 66% 60%, #fff, transparent),
    radial-gradient(1.2px 1.2px at 77% 25%, #fff, transparent),
    radial-gradient(1.6px 1.6px at 88% 50%, #fff, transparent),
    radial-gradient(1.2px 1.2px at 95% 80%, #fff, transparent),
    radial-gradient(1.4px 1.4px at 5% 85%, #fff, transparent),
    radial-gradient(1.4px 1.4px at 60% 90%, #fff, transparent),
    radial-gradient(1.4px 1.4px at 15% 40%, #fff, transparent);
  opacity: 0;
}
.hero--nightwatch.reveal.visible .nightwatch-stars::before {
  animation: nw-star-fade 6s ease-in forwards;
  animation-delay: 0.3s;
}
.hero--nightwatch.reveal.visible .nightwatch-stars::after {
  animation: nw-star-fade 7s ease-in forwards;
  animation-delay: 1.6s;
  transform: translate(30px, -20px) scale(0.85);
}
@keyframes nw-star-fade { to { opacity: 0.8; } }
@media (prefers-reduced-motion: reduce) {
  .hero--nightwatch.reveal.visible .nightwatch-stars::before,
  .hero--nightwatch.reveal.visible .nightwatch-stars::after {
    animation: none;
    opacity: 0.8;
  }
}

/* ---------- Sezione condivisa #mdr / #assistenza-24-7 ---------- */
.night-watch {
  position: relative;
  overflow: hidden;
  background: linear-gradient(185deg, var(--navy-dark) 0%, var(--navy-deep) 70%, #0a0f15 100%);
  color: rgba(255, 255, 255, 0.88);
  padding-top: 90px;
  padding-bottom: 90px;
}
.night-watch__bg { position: absolute; inset: 0; z-index: 0; opacity: 0.5; }
.night-watch__map { width: 100%; height: 100%; color: rgba(255, 255, 255, 0.35); }
.night-watch__lines line { opacity: 0.5; }
.nw-node { fill: rgba(255, 255, 255, 0.55); stroke: none; transition: fill 0.3s ease; }
.nw-node.is-blip { fill: var(--orange); }
.night-watch__radar { color: rgba(255, 255, 255, 0.12); }
.nw-radar-ring { fill: none; stroke: currentColor; stroke-width: 1; }

.night-watch__sweep {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 900px;
  height: 900px;
  margin: -450px 0 0 -450px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(255, 130, 0, 0.22), transparent 55deg, transparent 360deg);
  transform-origin: center;
}
.night-watch.reveal.visible .night-watch__sweep { animation: nw-sweep-spin 9s linear infinite; }
@keyframes nw-sweep-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .night-watch.reveal.visible .night-watch__sweep { animation: none; opacity: 0.4; }
}

.night-watch__content { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 64px; }
.night-watch__block { max-width: 720px; }
.night-watch__block h2 { font-size: 1.7rem; margin: 14px 0 18px; color: var(--white); }
.night-watch__block p { font-size: 0.98rem; line-height: 1.75; color: rgba(255, 255, 255, 0.78); margin-bottom: 14px; }
.night-watch__block .badge-product { background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.25); color: var(--white); }

.night-watch__block--mdr .badge-product { border-color: rgba(255, 130, 0, 0.5); color: var(--orange); }
.night-watch__block--assistenza .badge-product { border-color: rgba(18, 181, 166, 0.5); color: var(--teal); }

.night-watch__list { list-style: none; display: flex; flex-direction: column; gap: 12px; margin-top: 22px; }
.night-watch__list li {
  position: relative;
  padding-left: 24px;
  font-size: 0.94rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.82);
}
.night-watch__block--mdr .night-watch__list li::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 10px; height: 2px; background: var(--orange); }
.night-watch__block--assistenza .night-watch__list li::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 10px; height: 2px; background: var(--teal); }

/* ---------- EKG (solo #mdr) ---------- */
.night-watch__ekg { width: 100%; max-width: 420px; height: 60px; margin: 18px 0 8px; color: var(--orange); opacity: 0.85; }
.night-watch__ekg svg { width: 100%; height: 100%; display: block; }
.ekg-path { stroke-dasharray: 900; stroke-dashoffset: 900; }
.night-watch.reveal.visible .ekg-path { animation: ekg-draw 3.2s ease-in-out infinite; }
@keyframes ekg-draw {
  0% { stroke-dashoffset: 900; }
  55% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: -900; }
}
@media (prefers-reduced-motion: reduce) {
  .night-watch.reveal.visible .ekg-path { animation: none; stroke-dashoffset: 0; }
}

/* ---------- Blip: anello che si espande + timer di risposta ---------- */
.nw-blip-ring {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1.5px solid var(--orange);
  transform: translate(-50%, -50%);
  pointer-events: none;
  opacity: 0;
}
.nw-blip-ring.is-active { animation: nw-blip-expand 1.1s ease-out; }
@keyframes nw-blip-expand {
  0% { opacity: 0.9; width: 10px; height: 10px; }
  100% { opacity: 0; width: 70px; height: 70px; }
}
.nw-blip-timer {
  position: absolute;
  transform: translate(-50%, -140%);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--orange);
  background: rgba(10, 15, 21, 0.85);
  border: 1px solid rgba(255, 130, 0, 0.4);
  border-radius: 6px;
  padding: 3px 7px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  white-space: nowrap;
}
.nw-blip-timer.is-visible { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .nw-blip-ring, .nw-blip-timer { display: none; }
}

@media (max-width: 720px) {
  .night-watch { padding-top: 64px; padding-bottom: 64px; }
  .night-watch__block h2 { font-size: 1.4rem; }
}

/* ---------- Perché scegliere: check list ---------- */
.check-list { list-style: none; max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.check-list li {
  position: relative;
  padding-left: 32px;
  font-size: 0.98rem;
  line-height: 1.65;
  color: var(--navy-mid);
}
.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.15em;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(255, 130, 0, 0.12);
  border: 1.5px solid var(--orange);
}
.check-list li::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 0.5em;
  width: 9px;
  height: 5px;
  border-left: 2px solid var(--orange);
  border-bottom: 2px solid var(--orange);
  transform: rotate(-45deg);
}
