/* NEXA ELECTRONICS — Premium Cinematic Design System */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-display: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --bg-primary: #FFFFFF;
  --bg-dark: #101116;
  --bg-light: #F5F6F8;
  --text-primary: #111318;
  --text-secondary: #717784;
  --purple-accent: #6558F5;
  --purple-glow: rgba(101, 88, 245, 0.35);
  --border-light: #E6E8ED;
  --success-color: #16845B;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html, body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  overflow-x: clip;
  scroll-behavior: auto !important; /* Lenis handles buttery smooth scroll */
}

h1, h2, h3, h4, .font-display {
  font-family: var(--font-display);
}

/* Custom Sleek Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #101116;
}
::-webkit-scrollbar-thumb {
  background: rgba(101, 88, 245, 0.4);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(101, 88, 245, 0.8);
}

/* Image blend mask as specified in scroll-site-generator */
.img-blend {
  -webkit-mask-image: radial-gradient(ellipse 85% 85% at 50% 50%, black 65%, transparent 100%);
  mask-image: radial-gradient(ellipse 85% 85% at 50% 50%, black 65%, transparent 100%);
}

.img-blend-fade {
  -webkit-mask-image: linear-gradient(to bottom, black 80%, transparent 100%);
  mask-image: linear-gradient(to bottom, black 80%, transparent 100%);
}

/* Glow effects */
.glow-purple {
  box-shadow: 0 0 45px -10px rgba(101, 88, 245, 0.45);
}

.glow-purple-sm {
  box-shadow: 0 0 20px -5px rgba(101, 88, 245, 0.35);
}

.glow-purple-text {
  text-shadow: 0 0 30px rgba(101, 88, 245, 0.5);
}

/* Cinematic Dark Hero Stage */
.dark-stage {
  background-color: #101116;
  color: #FFFFFF;
}

/* Subtle Animated Ambient Radial Lights */
.ambient-glow-circle {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  opacity: 0.45;
  transition: transform 0.5s ease-out;
}

/* Smooth badge pulse */
@keyframes subtle-pulse {
  0%, 100% { opacity: 0.9; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.98); }
}
.animate-subtle-pulse {
  animation: subtle-pulse 3s infinite ease-in-out;
}

/* ── PROGRESSIVE SCROLL ANIMATION STYLES ── */
/* Default safe state: elements remain fully visible if JS or animation is delayed */
.nexa-reveal-item {
  will-change: transform, opacity;
}

/* Parallax smoothing */
.nexa-parallax-layer {
  will-change: transform;
}

/* ── 3D EXPLODED VIEW STYLING ── */
.exploded-canvas-container {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: radial-gradient(circle at 50% 40%, #171821 0%, #0c0d12 70%, #06070a 100%);
  user-select: none;
  touch-action: none;
}

.exploded-canvas-container canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
  outline: none;
}

/* Floating 3D Component Labels */
.exploded-3d-label {
  position: absolute;
  pointer-events: auto;
  cursor: pointer;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(16, 17, 22, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 4px 10px;
  border-radius: 9999px;
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 20;
}

.exploded-3d-label:hover,
.exploded-3d-label.active {
  background: #6558F5;
  border-color: #8b80fc;
  box-shadow: 0 0 20px rgba(101, 88, 245, 0.6);
  transform: translate(-50%, -50%) scale(1.08);
}

.exploded-3d-label .label-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #6558F5;
  box-shadow: 0 0 8px #6558F5;
}

.exploded-3d-label:hover .label-dot,
.exploded-3d-label.active .label-dot {
  background: #FFFFFF;
  box-shadow: 0 0 8px #FFFFFF;
}

/* 3D Viewer Control Slider */
input[type=range].exploded-slider {
  -webkit-appearance: none;
  width: 100%;
  background: transparent;
}

input[type=range].exploded-slider::-webkit-slider-runnable-track {
  width: 100%;
  height: 6px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 9999px;
}

input[type=range].exploded-slider::-webkit-slider-thumb {
  height: 18px;
  width: 18px;
  border-radius: 50%;
  background: #6558F5;
  cursor: pointer;
  -webkit-appearance: none;
  margin-top: -6px;
  box-shadow: 0 0 12px rgba(101, 88, 245, 0.8);
  border: 2px solid #FFFFFF;
  transition: transform 0.15s ease;
}

input[type=range].exploded-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
