/* ==========================================================================
   Novum Security — Identidade Visual: Grafite Escuro, Vermelho Intenso & Laranja
   ========================================================================== */

:root {
  --sec-bg-deep: #07080c;
  --sec-bg-base: #0b0d13;
  --sec-bg-surface: #12151f;
  --sec-bg-card: #161a26;
  --sec-red: #ff2200;
  --sec-red-dark: #cc1b00;
  --sec-orange: #ff5e00;
  --sec-amber: #ff8800;
  --sec-border: rgba(255, 255, 255, 0.08);
  --sec-border-warm: rgba(255, 68, 0, 0.28);
  --novum-favicon-dark: url('../assets/images/favicon-dark.png');
  --novum-favicon-light: url('../assets/images/favicon-light.png');
  --novum-icon-dark: url('../assets/images/app-icon-dark.png');
  --novum-icon-light: url('../assets/images/app-icon-light.png');
}

html {
  scroll-behavior: smooth;
  background-color: var(--sec-bg-deep);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #08090d;
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #ff2200 0%, #ff5e00 100%);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #ff3b1a;
}

/* Accessible Focus States */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
#totem3d-canvas-wrapper:focus-visible {
  outline: 2px solid #ff5e00 !important;
  outline-offset: 2px;
}

/* Subtle Tactical Surveillance Grid Background */
.bg-sec-grid {
  background-size: 44px 44px;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
}

/* Warm Ambient Glow Effects */
.sec-card {
  background: linear-gradient(165deg, rgba(24, 28, 40, 0.92) 0%, rgba(14, 16, 24, 0.96) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.28s ease, box-shadow 0.28s ease;
}

.sec-card:hover {
  border-color: rgba(255, 68, 0, 0.42);
  box-shadow: 0 18px 40px -12px rgba(0, 0, 0, 0.8), 0 0 28px rgba(255, 45, 0, 0.12);
  transform: translateY(-3px);
}

/* WhatsApp Floating Pulse */
@keyframes pulse-green {
  0% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.65);
  }
  70% {
    box-shadow: 0 0 0 14px rgba(34, 197, 94, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
  }
}

.pulse-whatsapp {
  animation: pulse-green 2.2s infinite;
}

/* ===================================================
   PALCO 3D DO TOTEM: AMBIENTE GRAFITE, VERMELHO & LARANJA
   =================================================== */

#totem3d-container {
  position: relative;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
}

#totem3d-canvas-wrapper {
  position: relative;
  width: 100%;
  height: 600px;
  border-radius: 26px;
  background:
    radial-gradient(circle at 50% 26%, rgba(255, 68, 0, 0.16) 0%, rgba(255, 34, 0, 0.06) 32%, rgba(15, 17, 25, 0.98) 68%, #07080c 100%);
  border: 1px solid rgba(255, 68, 0, 0.32);
  box-shadow:
    0 28px 65px -12px rgba(0, 0, 0, 0.92),
    0 0 48px rgba(255, 34, 0, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.10);
  overflow: hidden;
  cursor: grab;
  touch-action: none;
  transition: background 0.7s ease, border-color 0.7s ease, box-shadow 0.7s ease;
}

#totem3d-canvas-wrapper:active {
  cursor: grabbing;
}

#totem3d-canvas-wrapper.night-mode {
  background:
    radial-gradient(circle at 50% 22%, rgba(255, 94, 0, 0.22) 0%, rgba(16, 18, 28, 0.96) 58%, #040508 95%);
  border-color: rgba(255, 94, 0, 0.52);
  box-shadow:
    0 28px 75px -10px rgba(0, 0, 0, 0.96),
    0 0 60px rgba(255, 68, 0, 0.22),
    inset 0 1px 0 rgba(255, 120, 50, 0.15);
}

#totem3d-canvas-wrapper canvas {
  width: 100% !important;
  height: 100% !important;
  outline: none;
  touch-action: none;
}

/* Overlay e Controles */
.totem3d-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px 20px;
  z-index: 10;
}

.totem3d-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
}

.totem3d-badge {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(11, 13, 19, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #f3f4f6;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 6px 12px;
  border-radius: 9999px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45);
}

.badge-pill {
  background: linear-gradient(135deg, #ff2200 0%, #ff5e00 100%);
  color: #ffffff;
  padding: 2px 8px;
  border-radius: 9999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
  box-shadow: 0 2px 10px rgba(255, 34, 0, 0.45);
}

.totem3d-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff4500;
  box-shadow: 0 0 10px #ff4500;
  animation: pulse-indicator 1.8s infinite;
}

@keyframes pulse-indicator {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.35); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.totem3d-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: auto;
}

.totem3d-btn {
  background: rgba(11, 13, 19, 0.86);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 94, 0, 0.35);
  color: #ffffff;
  padding: 8px 14px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.25s ease;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
  user-select: none;
}

.totem3d-btn:hover {
  background: linear-gradient(135deg, #ff2200 0%, #ff5e00 100%);
  border-color: #ff5e00;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(255, 34, 0, 0.45);
}

.totem3d-btn.active {
  background: rgba(255, 68, 0, 0.22);
  border-color: #ff5e00;
  color: #ff9a5c;
  box-shadow: 0 0 16px rgba(255, 94, 0, 0.35);
}

.totem3d-footer {
  display: flex;
  justify-content: flex-end;
  pointer-events: none;
}

.totem3d-hint {
  display: inline-flex;
  align-items: center;
  background: rgba(11, 13, 19, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #d1d5db;
  font-size: 11px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 9999px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
}

/* ── HOTSPOTS INTERATIVOS PULSANTES NO MODELO 3D ── */
.totem-hotspot {
  position: absolute;
  width: 28px;
  height: 28px;
  margin-left: -14px;
  margin-top: -14px;
  cursor: pointer;
  z-index: 25;
  pointer-events: auto;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.totem-hotspot:hover {
  transform: scale(1.28);
}

.hs-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid #ff5e00;
  background: rgba(255, 50, 0, 0.26);
  animation: hs-pulse 2.2s infinite ease-out;
}

.hs-dot {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 9px;
  height: 9px;
  margin: -4.5px 0 0 -4.5px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 10px #ff2200, 0 0 20px #ff5e00;
}

@keyframes hs-pulse {
  0% { transform: scale(0.7); opacity: 1; }
  60% { transform: scale(2.3); opacity: 0; }
  100% { transform: scale(2.3); opacity: 0; }
}

.totem-tooltip {
  position: absolute;
  z-index: 35;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  width: 255px;
  background: rgba(12, 14, 21, 0.95);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 75, 0, 0.48);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.80), 0 0 24px rgba(255, 50, 0, 0.22);
  border-radius: 14px;
  padding: 12px 16px;
  color: #f3f4f6;
}

.totem-tooltip.open,
.totem-tooltip.hover-open,
.totem-hotspot:hover + .totem-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.totem-tooltip strong {
  display: block;
  font-size: 12px;
  font-weight: 800;
  color: #ff6a1a;
  margin-bottom: 5px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.totem-tooltip p {
  font-size: 11px;
  line-height: 1.5;
  color: #d1d5db;
  margin: 0;
}

/* ── CONTROLE DIRECIONAL 3D (D-PAD) ── */
.totem3d-dpad {
  position: absolute;
  bottom: 18px;
  left: 18px;
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: rgba(11, 13, 19, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 75, 0, 0.32);
  border-radius: 18px;
  padding: 8px 8px 6px 8px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.75), 0 0 20px rgba(255, 34, 0, 0.14);
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  z-index: 20;
  transition: all 0.3s ease;
}

#totem3d-canvas-wrapper.night-mode .totem3d-dpad {
  border-color: rgba(255, 94, 0, 0.50);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.85), 0 0 25px rgba(255, 75, 0, 0.25);
}

.dpad-mid {
  display: flex;
  align-items: center;
  gap: 4px;
}

.dpad-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(24, 28, 40, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #f3f4f6;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  outline: none;
  padding: 0;
  line-height: 1;
  user-select: none;
  -webkit-user-select: none;
}

.dpad-btn:hover {
  background: rgba(255, 55, 0, 0.32);
  border-color: #ff5e00;
  color: #ffffff;
  box-shadow: 0 0 12px rgba(255, 75, 0, 0.45);
  transform: scale(1.06);
}

.dpad-btn:active {
  background: #ff2200;
  border-color: #ff2200;
  color: #ffffff;
  transform: scale(0.95);
  box-shadow: 0 0 15px rgba(255, 34, 0, 0.65);
}

.dpad-center {
  border-radius: 50%;
  font-size: 14px;
  background: rgba(35, 18, 16, 0.90);
  border-color: rgba(255, 75, 0, 0.45);
  color: #ff6a1a;
}

.dpad-center:hover {
  background: linear-gradient(135deg, #ff2200 0%, #ff5e00 100%);
  color: #ffffff;
}

.dpad-tag {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  margin-top: 3px;
  user-select: none;
}

@media (max-width: 640px) {
  #totem3d-canvas-wrapper {
    height: 490px;
    border-radius: 20px;
  }
  .totem3d-overlay {
    padding: 12px 14px;
  }
  .totem3d-badge {
    font-size: 10px;
    padding: 5px 10px;
  }
  .totem3d-btn {
    padding: 6px 11px;
    font-size: 11px;
  }
  .totem3d-dpad {
    bottom: 12px;
    left: 12px;
    padding: 6px 6px 5px 6px;
    gap: 3px;
    border-radius: 14px;
  }
  .dpad-mid {
    gap: 3px;
  }
  .dpad-btn {
    width: 30px;
    height: 30px;
    font-size: 11px;
    border-radius: 8px;
  }
  .dpad-center {
    font-size: 12px;
  }
  .dpad-tag {
    font-size: 8px;
  }
  .totem3d-hint {
    font-size: 10px;
    padding: 5px 10px;
    max-width: 215px;
    text-align: right;
  }
  .totem-tooltip {
    width: 210px;
    font-size: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .pulse-whatsapp,
  .totem3d-pulse,
  .hs-ring {
    animation: none !important;
  }
  .sec-card {
    transition: none !important;
  }
}
