/* ===============================================
   DEATHLAB WORLD-CLASS AESTHETIC REFINEMENTS
   Clinical futurism meets transhuman minimalism
   =============================================== */

/* ============================
   ELEVATED TYPOGRAPHY SYSTEM
   ============================ */

/* Enhanced brand typography hierarchy */
.deathlab-title {
  font-family: 'Space Grotesk', var(--font-headings) !important;
  font-weight: 700 !important;
  letter-spacing: -0.025em !important;
  line-height: 1.1 !important;
  text-rendering: optimizeLegibility !important;
  font-feature-settings: "liga", "kern" !important;
}

.deathlab-subtitle {
  font-family: 'Inter', var(--font-body) !important;
  font-weight: 500 !important;
  letter-spacing: 0.02em !important;
  line-height: 1.4 !important;
  color: var(--death-text-secondary) !important;
}

.clinical-text {
  font-family: 'Space Grotesk', var(--font-headings) !important;
  font-weight: 600 !important;
  font-size: 0.75rem !important;
  text-transform: uppercase !important;
  letter-spacing: 0.15em !important;
  color: var(--death-text-muted) !important;
  opacity: 0.8 !important;
}

.deathlab-data {
  font-family: 'JetBrains Mono', monospace !important;
  font-weight: 500 !important;
  letter-spacing: 0.05em !important;
  color: var(--death-chrome) !important;
  background: rgba(189,189,189,0.1) !important;
  padding: 0.25rem 0.5rem !important;
  border-radius: var(--radius-xs) !important;
  border: 1px solid rgba(189,189,189,0.2) !important;
}

/* ============================
   PREMIUM GRADIENT SYSTEM
   ============================ */

.gradient-text {
  background: linear-gradient(135deg,
    var(--death-chrome-light) 0%,
    var(--death-chrome) 30%,
    var(--death-red) 70%,
    var(--death-red-hover) 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
  position: relative !important;
}

.gradient-text::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, transparent 0%, rgba(216,35,42,0.1) 100%);
  border-radius: inherit;
  pointer-events: none;
  z-index: -1;
}

/* Advanced gradient backgrounds */
.deathlab-gradient-subtle {
  background: linear-gradient(135deg,
    var(--death-black) 0%,
    var(--death-black-secondary) 25%,
    var(--death-black-tertiary) 50%,
    var(--death-black-secondary) 75%,
    var(--death-black) 100%) !important;
}

.deathlab-gradient-chrome {
  background: linear-gradient(135deg,
    rgba(189,189,189,0.05) 0%,
    rgba(242,242,242,0.1) 50%,
    rgba(189,189,189,0.05) 100%) !important;
}

/* ============================
   REFINED COMPONENT SYSTEM
   ============================ */

/* World-class buttons */
.deathlab-btn-primary {
  background: linear-gradient(135deg, var(--death-red), var(--death-red-hover)) !important;
  border: 1px solid var(--death-red) !important;
  color: #001015 !important;
  font-family: 'Space Grotesk', var(--font-headings) !important;
  font-weight: 600 !important;
  font-size: 0.875rem !important;
  text-transform: uppercase !important;
  letter-spacing: 0.1em !important;
  padding: 1rem 2rem !important;
  border-radius: var(--radius-sm) !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.2),
    0 4px 16px rgba(111,228,255,0.3),
    0 0 0 1px rgba(111,228,255,0.1) !important;
}

.deathlab-btn-primary:hover {
  background: linear-gradient(135deg, var(--death-red-hover), var(--death-red)) !important;
  color: #001015 !important;
  transform: translateY(-1px) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.3),
    0 8px 32px rgba(111,228,255,0.4),
    0 0 0 2px rgba(111,228,255,0.2) !important;
}

.deathlab-btn-secondary {
  background: transparent !important;
  border: 1px solid rgba(111,228,255,0.4) !important;
  color: #FFFFFF !important;
  font-family: 'Space Grotesk', var(--font-headings) !important;
  font-weight: 500 !important;
  font-size: 0.875rem !important;
  text-transform: uppercase !important;
  letter-spacing: 0.1em !important;
  padding: 1rem 2rem !important;
  border-radius: var(--radius-sm) !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.1),
    0 2px 8px rgba(0,0,0,0.5) !important;
  text-decoration: none !important;
}

.deathlab-btn-secondary:hover {
  background: var(--death-red) !important;
  border-color: var(--death-red) !important;
  color: #000000 !important;
  transform: translateY(-1px) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.15),
    0 4px 16px rgba(111,228,255,0.3) !important;
  text-decoration: none !important;
}

/* Premium cards */
.deathlab-card {
  background: var(--death-black-secondary) !important;
  border: 1px solid var(--death-border) !important;
  border-radius: var(--radius-md) !important;
  padding: 2rem !important;
  position: relative !important;
  overflow: hidden !important;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.1),
    0 8px 32px rgba(0,0,0,0.8),
    0 0 0 1px rgba(255,255,255,0.05) !important;
}

.deathlab-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--death-red), transparent);
  transition: left 0.6s ease;
}

.deathlab-card:hover {
  border-color: var(--death-chrome) !important;
  transform: translateY(-2px) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.15),
    0 16px 64px rgba(0,0,0,0.9),
    0 0 0 1px rgba(255,255,255,0.1) !important;
}

.deathlab-card:hover::before {
  left: 100%;
}

/* ============================
   ADVANCED ANIMATIONS
   ============================ */

@keyframes deathLabPulse {
  0%, 100% {
    opacity: 0.6;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.02);
  }
}

@keyframes deathLabGlow {
  0%, 100% {
    box-shadow: 0 0 5px rgba(216,35,42,0.3);
  }
  50% {
    box-shadow:
      0 0 20px rgba(216,35,42,0.6),
      0 0 40px rgba(216,35,42,0.3),
      inset 0 1px 0 rgba(255,255,255,0.2);
  }
}

@keyframes deathLabScanline {
  0% {
    transform: translateX(-100%) scaleX(0);
  }
  50% {
    transform: translateX(0%) scaleX(1);
  }
  100% {
    transform: translateX(100%) scaleX(0);
  }
}

@keyframes deathLabFloat {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  33% {
    transform: translateY(-10px) rotate(1deg);
  }
  66% {
    transform: translateY(-5px) rotate(-1deg);
  }
}

/* Animation classes */
.deathlab-pulse {
  animation: deathLabPulse 3s ease-in-out infinite;
}

.deathlab-glow {
  animation: deathLabGlow 4s ease-in-out infinite;
}

.deathlab-float {
  animation: deathLabFloat 6s ease-in-out infinite;
}

/* ============================
   PREMIUM MICRO-INTERACTIONS
   ============================ */

/* Enhanced focus states */
*:focus-visible {
  outline: 2px solid var(--death-red) !important;
  outline-offset: 2px !important;
  border-radius: var(--radius-xs) !important;
}

/* Refined selection */
::selection {
  background: rgba(216,35,42,0.3) !important;
  color: var(--death-chrome-light) !important;
}

::-moz-selection {
  background: rgba(216,35,42,0.3) !important;
  color: var(--death-chrome-light) !important;
}

/* Premium scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--death-black-secondary);
  border-radius: var(--radius-xs);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, var(--death-chrome), var(--death-red));
  border-radius: var(--radius-xs);
  border: 1px solid var(--death-border);
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, var(--death-red), var(--death-chrome));
}

/* ============================
   RESPONSIVE EXCELLENCE
   ============================ */

/* Enhanced mobile experience */
@media (max-width: 768px) {
  .deathlab-title {
    font-size: 2.5rem !important;
    letter-spacing: -0.02em !important;
  }

  .deathlab-btn-primary,
  .deathlab-btn-secondary {
    padding: 0.875rem 1.75rem !important;
    font-size: 0.8rem !important;
  }

  .deathlab-card {
    padding: 1.5rem !important;
  }
}

/* High-DPI displays */
@media (-webkit-min-device-pixel-ratio: 2) {
  .gradient-text {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
}

/* Dark mode optimization */
@media (prefers-color-scheme: dark) {
  :root {
    --death-text: #F8F8F8 !important;
    --death-chrome: #E0E0E0 !important;
    --death-border: rgba(255,255,255,0.15) !important;
  }
}

/* Reduced motion accessibility */
@media (prefers-reduced-motion: reduce) {
  .deathlab-pulse,
  .deathlab-glow,
  .deathlab-float {
    animation: none !important;
  }

  * {
    transition-duration: 0.1s !important;
  }
}

/* ============================
   UTILITY CLASSES
   ============================ */

.deathlab-text-primary { color: var(--death-text) !important; }
.deathlab-text-secondary { color: var(--death-text-secondary) !important; }
.deathlab-text-muted { color: var(--death-text-muted) !important; }
.deathlab-text-red { color: var(--death-red) !important; }
.deathlab-text-chrome { color: var(--death-chrome) !important; }

.deathlab-bg-primary { background: var(--death-black) !important; }
.deathlab-bg-secondary { background: var(--death-black-secondary) !important; }
.deathlab-bg-tertiary { background: var(--death-black-tertiary) !important; }

.deathlab-border { border-color: var(--death-border) !important; }
.deathlab-border-chrome { border-color: var(--death-chrome) !important; }
.deathlab-border-red { border-color: var(--death-red) !important; }

/* Layout utilities */
.deathlab-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.deathlab-section {
  padding: 5rem 0;
  position: relative;
}

.deathlab-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

/* Performance optimizations */
.deathlab-optimized {
  will-change: transform, opacity;
  transform: translateZ(0);
  backface-visibility: hidden;
}