.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  display: inline-block;
  vertical-align: middle;
}

body {
  background-color: #f8f9fc;
  color: #111827;
  overflow-x: hidden;
  overflow-y: auto !important; /* Prevents scroll-hijacking from WebGL / Spline scenes */
}

/* ==========================================================================
   Spline 3D WebGL Integration Rules
   ========================================================================== */

spline-viewer::part(logo) {
  display: none !important;
}

spline-viewer {
  --spline-viewer-logo-display: none;
  display: block;
  width: 100%;
  height: 100%;
  contain: strict; /* Pre-allocates space to prevent Cumulative Layout Shift (CLS) */
}

.spline-viewport-3d {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: all;
  z-index: 1;
}

.hero-overlay-content {
  position: relative;
  z-index: 10;
  pointer-events: auto;
}

/* ==========================================================================
   3D Spatial & Glassmorphic Elevation System
   ========================================================================== */

.perspective-1200 {
  perspective: 1200px;
}

.perspective-800 {
  perspective: 800px;
}

.transform-style-3d {
  transform-style: preserve-3d;
}

/* Floating animation */
@keyframes floatSlow {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-8px) rotate(0.5deg);
  }
}

@keyframes floatSlowReverse {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(8px) rotate(-0.5deg);
  }
}

@keyframes pulseGlow {
  0%, 100% {
    opacity: 0.4;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.05);
  }
}

.animate-float-slow {
  animation: floatSlow 6s ease-in-out infinite;
}

.animate-float-reverse {
  animation: floatSlowReverse 7s ease-in-out infinite;
}

.animate-pulse-glow {
  animation: pulseGlow 4s ease-in-out infinite;
}

/* 3D Interactive Tilt Card */
.tilt-card-3d {
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.35s ease, border-color 0.3s ease;
  transform: perspective(1000px) rotateX(0deg) rotateY(0deg) translateZ(0px);
  transform-style: preserve-3d;
  will-change: transform;
}

.tilt-card-3d:hover {
  transform: perspective(1000px) translateY(-6px) translateZ(12px);
  box-shadow: 0 25px 50px -12px rgba(10, 37, 64, 0.18), 0 0 20px rgba(212, 175, 55, 0.15);
}

/* Glassmorphism Classes */
.glass-panel-3d {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(212, 175, 55, 0.2);
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.07);
}

.glass-panel-dark-3d {
  background: rgba(15, 23, 42, 0.82);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(212, 175, 55, 0.3);
  box-shadow: 0 25px 50px -15px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* 3D Isometric Device Showcase */
.mockup-3d-isometric {
  transform: perspective(1400px) rotateY(-8deg) rotateX(6deg) translateZ(10px);
  box-shadow: -20px 30px 60px -15px rgba(10, 37, 64, 0.25), 0 0 30px rgba(212, 175, 55, 0.12);
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.5s ease;
}

.mockup-3d-isometric:hover {
  transform: perspective(1400px) rotateY(-2deg) rotateX(2deg) translateY(-8px) translateZ(25px);
  box-shadow: -25px 40px 80px -20px rgba(10, 37, 64, 0.35), 0 0 45px rgba(212, 175, 55, 0.25);
}

/* Theme Overrides for Emerald Calm & Cosmic Night */
html.theme-emerald body {
  background-color: #f0fdf4;
  color: #064e3b;
}

html.theme-emerald .bg-surface-container-lowest {
  background-color: #ffffff;
}

html.theme-emerald .bg-surface-container {
  background-color: #ecfdf5;
}

html.theme-emerald .text-primary {
  color: #047857;
}

html.theme-emerald .bg-primary {
  background-color: #059669;
  color: #ffffff;
}

html.theme-emerald .border-outline-variant {
  border-color: #a7f3d0;
}

html.theme-cosmic body,
html.dark body {
  background-color: #0b1220;
  color: #f8fafc;
}

html.theme-cosmic .bg-surface-container-lowest,
html.dark .bg-surface-container-lowest {
  background-color: #111b2e;
}

html.theme-cosmic .bg-surface-container,
html.dark .bg-surface-container {
  background-color: #0b1220;
}

html.theme-cosmic .text-primary,
html.dark .text-primary {
  color: #D4AF37;
}

html.theme-cosmic .bg-primary,
html.dark .bg-primary {
  background-color: #D4AF37;
  color: #0A2540;
}

html.theme-cosmic .border-outline-variant,
html.dark .border-outline-variant {
  border-color: #1e293b;
}

/* Accessibility: Disable motion when user requests reduced motion */
@media (prefers-reduced-motion: reduce) {
  .animate-float-slow,
  .animate-float-reverse,
  .animate-pulse-glow,
  .tilt-card-3d,
  .mockup-3d-isometric {
    animation: none !important;
    transform: none !important;
    transition: none !important;
  }
}
