/* ==========================================
   ULTRA-PREMIUM BUTTON SYSTEM ($300K DESIGN)
   Designed: December 26, 2025
   Level: Enterprise Luxury
   ========================================== */

/* ==========================================
   BASE BUTTON FOUNDATION
   ========================================== */

.btn,
.btn-primary,
.btn-secondary,
.btn-ghost,
.btn-luxury,
.btn-supreme {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1.125rem 2.5rem;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: 0.025em;
  text-decoration: none;
  border: none;
  border-radius: 0.75rem;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  isolation: isolate;
  -webkit-tap-highlight-color: transparent;
}

.btn::before,
.btn-primary::before,
.btn-secondary::before,
.btn-ghost::before,
.btn-luxury::before,
.btn-supreme::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -1;
  transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Shimmer overlay effect */
.btn::after,
.btn-primary::after,
.btn-secondary::after,
.btn-ghost::after,
.btn-luxury::after,
.btn-supreme::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3) 50%,
    transparent
  );
  z-index: 1;
  transition: left 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
}

.btn:hover::after,
.btn-primary:hover::after,
.btn-secondary:hover::after,
.btn-ghost:hover::after,
.btn-luxury:hover::after,
.btn-supreme:hover::after {
  left: 100%;
}

/* ==========================================
   PRIMARY BUTTON - LUXURY GOLD GRADIENT
   Multi-layer depth with gradient mesh
   ========================================== */

.btn-primary {
  background:
    linear-gradient(135deg,
      #f4a460 0%,
      #d4a574 25%,
      #b8941f 50%,
      #d4a574 75%,
      #f4a460 100%
    );
  background-size: 200% 200%;
  color: #0a0807;
  font-weight: 700;
  box-shadow:
    0 2px 8px rgba(212, 165, 116, 0.2),
    0 8px 24px rgba(212, 165, 116, 0.3),
    0 16px 48px rgba(212, 165, 116, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    inset 0 -1px 0 rgba(0, 0, 0, 0.1);
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.3);
  animation: gradientShift 8s ease infinite;
}

.btn-primary::before {
  background: radial-gradient(
    circle at 50% 0%,
    rgba(255, 255, 255, 0.4),
    transparent 70%
  );
  opacity: 0;
}

.btn-primary:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow:
    0 4px 12px rgba(212, 165, 116, 0.3),
    0 12px 32px rgba(212, 165, 116, 0.4),
    0 24px 64px rgba(212, 165, 116, 0.3),
    0 0 80px rgba(212, 165, 116, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    inset 0 -1px 0 rgba(0, 0, 0, 0.15);
  animation: gradientShift 3s ease infinite, pulseGlow 2s ease infinite;
}

.btn-primary:hover::before {
  opacity: 1;
}

.btn-primary:active {
  transform: translateY(-2px) scale(0.98);
  box-shadow:
    0 2px 8px rgba(212, 165, 116, 0.3),
    0 8px 24px rgba(212, 165, 116, 0.4),
    inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* ==========================================
   SECONDARY BUTTON - HOLOGRAPHIC BORDER
   Advanced glass-morphism with animated border
   ========================================== */

.btn-secondary {
  background: rgba(10, 8, 7, 0.6);
  color: #ffffff;
  border: 2px solid transparent;
  background-clip: padding-box;
  backdrop-filter: blur(20px);
  box-shadow:
    0 2px 12px rgba(0, 107, 94, 0.15),
    0 8px 32px rgba(0, 107, 94, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  position: relative;
}

.btn-secondary::before {
  background: linear-gradient(
    135deg,
    #006b5e 0%,
    #d4a574 25%,
    #00d4aa 50%,
    #d4a574 75%,
    #006b5e 100%
  );
  background-size: 300% 300%;
  border-radius: inherit;
  animation: borderShift 6s linear infinite;
  inset: -2px;
  z-index: -2;
}

.btn-secondary:hover {
  transform: translateY(-4px) scale(1.02);
  background: linear-gradient(
    135deg,
    rgba(0, 107, 94, 0.2),
    rgba(212, 165, 116, 0.2)
  );
  box-shadow:
    0 4px 16px rgba(0, 107, 94, 0.2),
    0 12px 40px rgba(0, 107, 94, 0.15),
    0 24px 64px rgba(212, 165, 116, 0.1),
    0 0 80px rgba(0, 212, 170, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.btn-secondary:active {
  transform: translateY(-2px) scale(0.98);
}

/* ==========================================
   GHOST BUTTON - ULTRA GLASS-MORPHISM
   Premium transparency with depth
   ========================================== */

.btn-ghost {
  background:
    linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.08),
      rgba(255, 255, 255, 0.03)
    );
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(30px) saturate(180%);
  box-shadow:
    0 2px 16px rgba(0, 0, 0, 0.1),
    0 8px 32px rgba(0, 0, 0, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    inset 0 -1px 0 rgba(0, 0, 0, 0.1);
}

.btn-ghost::before {
  background: radial-gradient(
    circle at 50% 0%,
    rgba(212, 165, 116, 0.15),
    transparent 70%
  );
  opacity: 0;
}

.btn-ghost:hover {
  transform: translateY(-4px) scale(1.02);
  background:
    linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.15),
      rgba(212, 165, 116, 0.08)
    );
  border-color: rgba(212, 165, 116, 0.4);
  box-shadow:
    0 4px 20px rgba(212, 165, 116, 0.15),
    0 12px 48px rgba(0, 0, 0, 0.1),
    0 0 60px rgba(212, 165, 116, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.15),
    inset 0 -1px 0 rgba(0, 0, 0, 0.15);
}

.btn-ghost:hover::before {
  opacity: 1;
}

.btn-ghost:active {
  transform: translateY(-2px) scale(0.98);
}

/* ==========================================
   LUXURY BUTTON - ULTIMATE PREMIUM
   Teal gradient with multi-dimensional depth
   ========================================== */

.btn-luxury {
  background:
    linear-gradient(135deg,
      #00d4aa 0%,
      #006b5e 50%,
      #1a5a52 100%
    );
  background-size: 200% 200%;
  color: var(--celestial-cream);
  font-weight: 700;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.3),
    0 0 20px rgba(0, 212, 170, 0.3);
  box-shadow:
    0 2px 8px rgba(0, 107, 94, 0.2),
    0 8px 24px rgba(0, 107, 94, 0.3),
    0 16px 48px rgba(0, 107, 94, 0.2),
    0 0 60px rgba(0, 212, 170, 0.15),
    inset 0 1px 0 rgba(0, 212, 170, 0.3),
    inset 0 -1px 0 rgba(0, 0, 0, 0.2);
  animation: gradientShift 8s ease infinite;
}

.btn-luxury::before {
  background:
    radial-gradient(
      circle at 30% 20%,
      rgba(0, 212, 170, 0.4),
      transparent 60%
    );
  opacity: 0;
}

.btn-luxury:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow:
    0 4px 12px rgba(0, 107, 94, 0.3),
    0 12px 32px rgba(0, 107, 94, 0.4),
    0 24px 64px rgba(0, 107, 94, 0.3),
    0 0 100px rgba(0, 212, 170, 0.3),
    inset 0 1px 0 rgba(0, 212, 170, 0.4),
    inset 0 -1px 0 rgba(0, 0, 0, 0.25);
  animation: gradientShift 3s ease infinite, pulseGlow 2s ease infinite;
}

.btn-luxury:hover::before {
  opacity: 1;
}

.btn-luxury:active {
  transform: translateY(-2px) scale(0.98);
}

/* ==========================================
   SUPREME BUTTON - APEX TIER
   Tri-color gradient mesh with particle effect
   ========================================== */

.btn-supreme {
  background:
    linear-gradient(135deg,
      #f4a460 0%,
      #d4a574 20%,
      #006b5e 40%,
      #00d4aa 60%,
      #d4a574 80%,
      #f4a460 100%
    );
  background-size: 300% 300%;
  color: var(--celestial-cream);
  font-weight: 700;
  text-shadow:
    0 1px 3px rgba(0, 0, 0, 0.4),
    0 0 30px rgba(212, 165, 116, 0.4);
  box-shadow:
    0 4px 12px rgba(212, 165, 116, 0.25),
    0 8px 24px rgba(0, 107, 94, 0.25),
    0 16px 48px rgba(212, 165, 116, 0.2),
    0 0 80px rgba(0, 212, 170, 0.15),
    inset 0 2px 0 rgba(255, 255, 255, 0.3),
    inset 0 -2px 0 rgba(0, 0, 0, 0.2);
  animation: supremeGradient 10s ease infinite;
  overflow: visible;
}

.btn-supreme::before {
  background:
    radial-gradient(
      circle at 50% 50%,
      rgba(255, 255, 255, 0.3),
      rgba(0, 212, 170, 0.2) 40%,
      transparent 70%
    );
  filter: blur(20px);
  opacity: 0;
  scale: 0.8;
}

.btn-supreme:hover {
  transform: translateY(-6px) scale(1.03);
  box-shadow:
    0 6px 16px rgba(212, 165, 116, 0.35),
    0 16px 40px rgba(0, 107, 94, 0.35),
    0 32px 80px rgba(212, 165, 116, 0.25),
    0 0 120px rgba(0, 212, 170, 0.3),
    0 0 200px rgba(212, 165, 116, 0.15),
    inset 0 2px 0 rgba(255, 255, 255, 0.4),
    inset 0 -2px 0 rgba(0, 0, 0, 0.25);
  animation: supremeGradient 4s ease infinite, supremePulse 1.5s ease infinite;
}

.btn-supreme:hover::before {
  opacity: 1;
  scale: 1.5;
}

.btn-supreme:active {
  transform: translateY(-3px) scale(1.01);
}

/* ==========================================
   BUTTON SIZES
   ========================================== */

.btn-sm,
.btn-small {
  padding: 0.75rem 1.5rem;
  font-size: 0.9375rem;
  border-radius: 0.625rem;
}

.btn-lg,
.btn-large {
  padding: 1.5rem 3rem;
  font-size: 1.1875rem;
  border-radius: 1rem;
}

.btn-xl,
.btn-xlarge {
  padding: 1.75rem 3.5rem;
  font-size: 1.375rem;
  font-weight: 700;
  border-radius: 1.25rem;
}

/* ==========================================
   BUTTON STATES
   ========================================== */

.btn:disabled,
.btn-primary:disabled,
.btn-secondary:disabled,
.btn-ghost:disabled,
.btn-luxury:disabled,
.btn-supreme:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none !important;
  pointer-events: none;
  animation: none !important;
}

.btn:focus-visible,
.btn-primary:focus-visible,
.btn-secondary:focus-visible,
.btn-ghost:focus-visible,
.btn-luxury:focus-visible,
.btn-supreme:focus-visible {
  outline: 3px solid rgba(212, 165, 116, 0.5);
  outline-offset: 4px;
}

/* Loading state */
.btn.loading,
.btn-primary.loading,
.btn-secondary.loading,
.btn-ghost.loading,
.btn-luxury.loading,
.btn-supreme.loading {
  pointer-events: none;
  position: relative;
}

.btn.loading::after,
.btn-primary.loading::after,
.btn-secondary.loading::after,
.btn-ghost.loading::after,
.btn-luxury.loading::after,
.btn-supreme.loading::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border: 3px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  left: 50%;
  top: 50%;
  margin: -10px 0 0 -10px;
}

/* ==========================================
   BUTTON GROUPS
   ========================================== */

.btn-group {
  display: inline-flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
}

.btn-group-vertical {
  flex-direction: column;
  align-items: stretch;
}

/* ==========================================
   ICON BUTTONS
   ========================================== */

.btn-icon {
  padding: 1rem;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-icon svg {
  width: 1.25rem;
  height: 1.25rem;
}

/* ==========================================
   ANIMATIONS
   ========================================== */

@keyframes gradientShift {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

@keyframes borderShift {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

@keyframes pulseGlow {
  0%, 100% {
    filter: brightness(1);
  }
  50% {
    filter: brightness(1.1);
  }
}

@keyframes supremeGradient {
  0%, 100% {
    background-position: 0% 50%;
  }
  33% {
    background-position: 100% 0%;
  }
  66% {
    background-position: 0% 100%;
  }
}

@keyframes supremePulse {
  0%, 100% {
    filter: brightness(1) saturate(1);
  }
  50% {
    filter: brightness(1.15) saturate(1.2);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ==========================================
   RESPONSIVE ADJUSTMENTS
   ========================================== */

@media (max-width: 768px) {
  .btn,
  .btn-primary,
  .btn-secondary,
  .btn-ghost,
  .btn-luxury,
  .btn-supreme {
    padding: 1rem 2rem;
    font-size: 1rem;
  }

  .btn-lg,
  .btn-large {
    padding: 1.25rem 2.5rem;
    font-size: 1.0625rem;
  }

  .btn-xl,
  .btn-xlarge {
    padding: 1.5rem 3rem;
    font-size: 1.1875rem;
  }

  .btn-group {
    gap: 0.75rem;
  }
}

/* ==========================================
   ACCESSIBILITY
   ========================================== */

@media (prefers-reduced-motion: reduce) {
  .btn,
  .btn-primary,
  .btn-secondary,
  .btn-ghost,
  .btn-luxury,
  .btn-supreme {
    animation: none !important;
    transition-duration: 0.1s !important;
  }

  .btn::after,
  .btn-primary::after,
  .btn-secondary::after,
  .btn-ghost::after,
  .btn-luxury::after,
  .btn-supreme::after {
    display: none;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .btn-primary {
    border: 2px solid #0a0807;
  }

  .btn-secondary,
  .btn-ghost {
    border-width: 3px;
  }
}
