/* SurfaceGuard — override tema (blu sicurezza, stesso layout RoomZ) */
:root {
  --accent: #5cb8ff;
  --accent-dim: rgba(61, 139, 253, 0.14);
  --cyan: #3d8bfd;
  --violet: #818cf8;
}

.logo-guard { color: var(--cyan); font-weight: 700; }

.btn-primary { background: linear-gradient(135deg, #3d8bfd, #2563eb); color: #f8fafc; }
.btn-primary:hover { background: linear-gradient(135deg, #5cb8ff, #3d8bfd); filter: none; }

.btn-gradient {
  background: linear-gradient(135deg, #3d8bfd, #818cf8);
  color: #f8fafc;
}

.gradient-text {
  background: linear-gradient(90deg, #5cb8ff, #a78bfa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-stage {
  border-color: rgba(61, 139, 253, 0.2);
  background: radial-gradient(ellipse at 60% 30%, rgba(61, 139, 253, 0.1), transparent 50%),
              radial-gradient(ellipse at 20% 80%, rgba(129, 140, 248, 0.1), transparent 45%),
              #060912;
}

.perimeter-radar {
  position: absolute;
  inset: 12% 8% auto 8%;
  height: 42%;
  border-radius: 14px;
  border: 1px solid rgba(61, 139, 253, 0.25);
  background: rgba(4, 8, 18, 0.85);
  overflow: hidden;
}

.perimeter-radar svg { width: 100%; height: 100%; display: block; }

.radar-pulse {
  animation: radarPulse 3s ease-out infinite;
  transform-origin: 50% 50%;
}
@keyframes radarPulse {
  0% { opacity: 0.6; r: 8; }
  100% { opacity: 0; r: 52; }
}

.terminal-feed {
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 16%;
  top: 52%;
  font-family: var(--mono);
  font-size: clamp(0.62rem, 1.6vw, 0.72rem);
  line-height: 1.65;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.15);
  background: rgba(6, 10, 20, 0.92);
  color: #94a3b8;
  overflow: hidden;
}

.terminal-feed .line-ok { color: #34d399; }
.terminal-feed .line-warn { color: #fbbf24; }
.terminal-feed .line-crit { color: #f87171; }
.terminal-feed .line-accent { color: #5cb8ff; }

.pipeline-steps {
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 4%;
  z-index: 6;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}
.pipeline-steps span {
  font-size: 0.65rem;
  padding: 0.25rem 0.55rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  color: var(--muted);
}
.pipeline-steps span.active {
  border-color: rgba(61, 139, 253, 0.5);
  color: var(--cyan);
  background: var(--accent-dim);
}

.severity-legend .leg-crit { background: #be123c; }
.severity-legend .leg-high { background: #f97316; }
.severity-legend .leg-med { background: #eab308; }
.severity-legend .leg-info { background: #3d8bfd; }

.api-mock pre {
  margin: 0;
  padding: 1rem 1.1rem;
  border-radius: 12px;
  background: #060912;
  border: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 0.72rem;
  line-height: 1.55;
  color: #94a3b8;
  overflow-x: auto;
}
.api-mock code { color: #5cb8ff; }

.demo-chat .demo-user {
  color: var(--cyan);
  margin: 0.5rem 0;
  padding: 0.45rem 0.65rem;
  border-radius: 8px;
  background: rgba(61, 139, 253, 0.08);
  border-left: 2px solid var(--cyan);
}
.demo-chat .demo-sys {
  color: var(--muted);
  margin: 0.5rem 0;
  font-family: var(--mono);
  font-size: 0.8rem;
}
#demo-twin.state-nuclei .path-badge { background: rgba(234, 179, 8, 0.2); color: #fbbf24; }
#demo-twin.state-pentest .path-badge { background: rgba(167, 139, 250, 0.2); color: #c4b5fd; }
#demo-twin.state-blocked .path-badge { background: rgba(190, 18, 60, 0.25); color: #fda4af; }

.demo-log-line { margin: 0.35rem 0; opacity: 0; animation: demoFadeIn 0.4s ease forwards; }
@keyframes demoFadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* —— Facciata host (sostituisce griglia faceplate RoomZ) —— */
.facade-showcase {
  position: relative;
  padding: 1.25rem 1.35rem 1.1rem;
  overflow: hidden;
}
.facade-glow {
  position: absolute;
  inset: -20% 10% auto 10%;
  height: 55%;
  background: radial-gradient(ellipse, rgba(61, 139, 253, 0.18), transparent 70%);
  pointer-events: none;
}
.facade-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1rem;
  margin-bottom: 1rem;
  font-family: var(--mono);
  font-size: 0.78rem;
}
.facade-host { color: #5cb8ff; font-weight: 600; }
.facade-meta { color: var(--muted); }

.facade-stage {
  position: relative;
  min-height: 260px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.1);
  background: linear-gradient(180deg, rgba(4, 8, 16, 0.9), rgba(2, 4, 10, 0.95));
  overflow: hidden;
}
.facade-beam {
  --beam-x: 50%;
  position: absolute;
  top: 0;
  left: var(--beam-x);
  width: 38%;
  height: 75%;
  transform: translateX(-50%);
  background: linear-gradient(
    180deg,
    rgba(92, 184, 255, 0.35) 0%,
    rgba(61, 139, 253, 0.12) 45%,
    transparent 100%
  );
  clip-path: polygon(30% 0, 70% 0, 100% 100%, 0 100%);
  pointer-events: none;
  transition: left 0.55s cubic-bezier(0.22, 1, 0.36, 1);
  filter: blur(1px);
}
.facade-svg {
  display: block;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
}
.facade-doors {
  position: absolute;
  left: 50%;
  bottom: 22%;
  transform: translateX(-50%);
  display: flex;
  align-items: flex-end;
  gap: clamp(0.35rem, 2vw, 0.65rem);
  width: min(92%, 300px);
  justify-content: center;
  z-index: 2;
}
.facade-door {
  flex: 0 0 auto;
  width: clamp(2rem, 7vw, 2.6rem);
  height: clamp(2.6rem, 8vw, 3.2rem);
  border-radius: 6px 6px 4px 4px;
  border: 1px solid rgba(51, 65, 85, 0.9);
  background: linear-gradient(180deg, #0f172a, #020617);
  color: #64748b;
  font-family: var(--mono);
  font-size: clamp(0.55rem, 1.5vw, 0.65rem);
  font-weight: 500;
  cursor: pointer;
  padding: 0;
  transition: border-color 0.25s, box-shadow 0.25s, color 0.25s, transform 0.2s;
}
.facade-door.is-closed {
  width: clamp(1.2rem, 4vw, 1.5rem);
  opacity: 0.35;
  cursor: default;
  border-color: rgba(30, 41, 59, 0.8);
}
.facade-door.is-open {
  border-color: rgba(251, 191, 36, 0.35);
  color: #fbbf24;
  box-shadow: 0 0 0 1px rgba(251, 191, 36, 0.08) inset;
}
.facade-door.is-open::after {
  content: "";
  position: absolute;
  inset: auto 20% 4px 20%;
  height: 3px;
  border-radius: 2px;
  background: rgba(251, 191, 36, 0.5);
  opacity: 0.6;
}
.facade-door { position: relative; }
.facade-door.is-lit {
  border-color: rgba(92, 184, 255, 0.85);
  color: #e0f2fe;
  transform: translateY(-4px);
  box-shadow:
    0 0 28px rgba(61, 139, 253, 0.45),
    0 0 0 1px rgba(147, 197, 253, 0.35) inset;
}
.facade-door.is-lit::after {
  background: #5cb8ff;
  opacity: 1;
  box-shadow: 0 0 10px #3d8bfd;
}

.facade-spotlight {
  position: absolute;
  right: 0.75rem;
  bottom: 0.75rem;
  left: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  z-index: 3;
  background: rgba(8, 12, 22, 0.88) !important;
}
@media (min-width: 520px) {
  .facade-spotlight {
    left: auto;
    width: min(220px, 46%);
  }
}
.spot-eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.spot-port {
  margin: 0;
  font-family: var(--mono);
  font-size: 1.15rem;
  color: #5cb8ff;
  font-weight: 600;
}
.spot-svc {
  margin: 0.25rem 0 0.5rem;
  font-size: 0.82rem;
  color: var(--text);
}
.spot-hint {
  margin: 0;
  font-size: 0.72rem;
  color: var(--muted);
}

.facade-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  margin-top: 1rem;
  font-size: 0.72rem;
  color: var(--muted);
}
.leg-icon {
  font-style: normal;
  margin-right: 0.35rem;
  opacity: 0.85;
}
.leg-dark { color: #475569; }
.leg-open { color: #fbbf24; }
.leg-lit { color: #5cb8ff; }

.scan-snapshot-title {
  margin: 0 0 0.65rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
}
.scan-snapshot-list {
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: var(--mono);
  font-size: 0.8rem;
}
.scan-snapshot-list li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
  color: var(--text);
}
.snap-port {
  min-width: 3.2rem;
  color: #5cb8ff;
}
.snap-port.warn { color: #fbbf24; }

.ai-assist-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.ai-assist-list { margin: 0; }
.ai-grid-3 {
  grid-template-columns: 1fr;
}
@media (min-width: 900px) {
  .ai-grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}
