/* ==========================================================================
   MONITORAMENTO ARANHA | BIG AMERICAN — Plataforma de Controle Industrial
   Design System: Industrial Dark Premium (#0a0b0e / #12151c)
   ========================================================================== */

:root {
  --bg-deep: #0a0b0e;
  --bg-surface: #12151c;
  --bg-elevated: #181c26;
  --accent-cyan: #00f0ff;
  --accent-amber: #f59e0b;
  --accent-emerald: #10b981;
  --accent-crimson: #ef4444;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(0, 240, 255, 0.35);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html.lenis,
html.lenis body {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}

.lenis.lenis-stopped {
  overflow: hidden;
}

body {
  background-color: var(--bg-deep);
  color: var(--text-primary);
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  overflow-x: hidden;
}

::selection {
  background: rgba(0, 240, 255, 0.22);
  color: #ffffff;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: #08090c;
}

::-webkit-scrollbar-thumb {
  background: #1e2433;
  border-radius: 4px;
  border: 1px solid rgba(0, 240, 255, 0.15);
}

::-webkit-scrollbar-thumb:hover {
  background: #2a3347;
  border-color: rgba(0, 240, 255, 0.4);
}

.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Typography Helpers */
.font-display {
  font-family: 'Space Grotesk', sans-serif;
}

.font-mono-tech {
  font-family: 'JetBrains Mono', monospace;
}

/* Subtle Industrial Grid Background */
.bg-voxel-grid {
  background-size: 40px 40px;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
}

.bg-voxel-subgrid {
  background-size: 160px 160px;
  background-image: 
    linear-gradient(to right, rgba(0, 240, 255, 0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0, 240, 255, 0.035) 1px, transparent 1px);
}

/* Glassmorphism Surfaces */
.glass-panel {
  background: linear-gradient(145deg, rgba(18, 21, 28, 0.85) 0%, rgba(10, 11, 14, 0.92) 100%);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.glass-navbar {
  background: rgba(12, 14, 19, 0.82);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.glass-badge {
  background: rgba(18, 21, 28, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

.glass-card {
  background: linear-gradient(160deg, rgba(22, 26, 36, 0.78) 0%, rgba(12, 14, 20, 0.94) 100%);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.07);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.4s ease,
              box-shadow 0.4s ease;
  position: relative;
  overflow: hidden;
}

.glass-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.35), transparent 45%, rgba(245, 158, 11, 0.25));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

@media (hover: hover) {
  .glass-card:hover {
    transform: translateY(-6px);
    border-color: rgba(0, 240, 255, 0.28);
    box-shadow: 0 24px 60px -12px rgba(0, 0, 0, 0.75),
                0 0 30px -5px rgba(0, 240, 255, 0.15);
  }

  .glass-card:hover::before {
    opacity: 1;
  }
}

/* Magnetic Underline Navigation Links */
.nav-link-magnetic {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0;
  color: #cbd5e1;
  font-weight: 500;
  font-size: 0.875rem;
  transition: color 0.25s ease;
  white-space: nowrap;
}

.nav-link-magnetic:hover {
  color: #ffffff;
}

.nav-link-magnetic::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-emerald));
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  border-radius: 2px;
  box-shadow: 0 0 10px var(--accent-cyan);
}

.nav-link-magnetic:hover::after,
.nav-link-magnetic.active::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* Floating Animation for Operational Badges */
@keyframes floatSlow {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-6px);
  }
}

.animate-float-1 {
  animation: floatSlow 5s ease-in-out infinite;
}

.animate-float-2 {
  animation: floatSlow 6.5s ease-in-out 1.2s infinite;
}

.animate-float-3 {
  animation: floatSlow 5.8s ease-in-out 2.4s infinite;
}

/* Scrollytelling Step Cards */
.scrolly-step {
  opacity: 0.3;
  transform: translateY(6px);
  transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.4s ease, box-shadow 0.4s ease;
}

.scrolly-step.is-active {
  opacity: 1;
  transform: translateY(0);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.65), 0 0 25px rgba(0, 240, 255, 0.12);
}

.scrolly-step.is-active .step-indicator {
  background: var(--accent-cyan);
  color: #05070a;
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.6);
}

/* 3D Projected Hotspots / Markers on Scrollytelling Machine */
.model-pin-marker {
  position: absolute;
  top: 0;
  left: 0;
  transform: translate(-50%, -50%);
  pointer-events: auto;
  cursor: pointer;
  transition: opacity 0.25s ease;
  z-index: 15;
}

.model-pin-marker .pin-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border-radius: 9999px;
  background: rgba(10, 11, 14, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #94a3b8;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  backdrop-filter: blur(8px);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.model-pin-marker.is-active .pin-badge {
  background: rgba(0, 240, 255, 0.2);
  border-color: #00f0ff;
  color: #ffffff;
  transform: scale(1.12);
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.5);
}

.model-pin-marker .pin-dot {
  width: 7px;
  height: 7px;
  border-radius: 9999px;
  background: #64748b;
}

.model-pin-marker.is-active .pin-dot {
  background: #00f0ff;
  box-shadow: 0 0 10px #00f0ff;
}

/* Filter Pill Buttons */
.filter-btn {
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.filter-btn.active {
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.18), rgba(16, 185, 129, 0.12));
  border-color: rgba(0, 240, 255, 0.55);
  color: #ffffff;
  box-shadow: 0 0 25px rgba(0, 240, 255, 0.2);
}

/* Ambient Radial Glows */
.ambient-glow-cyan {
  background: radial-gradient(circle, rgba(0, 240, 255, 0.14) 0%, rgba(0, 240, 255, 0.03) 45%, transparent 70%);
  filter: blur(40px);
  pointer-events: none;
}

.ambient-glow-amber {
  background: radial-gradient(circle, rgba(245, 158, 11, 0.12) 0%, rgba(239, 68, 68, 0.04) 45%, transparent 70%);
  filter: blur(45px);
  pointer-events: none;
}

/* Modal Backdrop & Transitions */
#voxel-modal {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

#voxel-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

#voxel-modal .modal-content {
  transform: scale(0.96) translateY(10px);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

#voxel-modal.is-open .modal-content {
  transform: scale(1) translateY(0);
}

/* Logo Spider macOS Style (Preenchimento branco limpo, sem sombra) */
.logo-spider-clean {
  background: #ffffff;
  border-radius: 0.75rem;
  box-shadow: none;
}

/* Canvas Cursors & Mobile Touch Ergonomics */
.canvas-interactive {
  cursor: grab;
}

.canvas-interactive:active {
  cursor: grabbing;
}

@media (max-width: 1023px) {
  #hero-canvas,
  #scrolly-canvas {
    touch-action: pan-y !important;
  }
}

/* Shimmer Progress Bar */
@keyframes progressPulse {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

.loader-bar-fill {
  background: linear-gradient(90deg, #00f0ff, #10b981, #f59e0b, #00f0ff);
  background-size: 200% 100%;
  animation: progressPulse 2s linear infinite;
}
