/* A'Lo PWA - Custom Styles */
/* These styles complement Tailwind CSS */

/* ============================================
   CSS Variables
   ============================================ */
:root {
  --gold-primary: #D4AF37;
  --gold-light: #F7DC6F;
  --gold-dark: #B8962E;
  --black: #000000;
  --gray-900: #111111;
}

/* ============================================
   Base Styles
   ============================================ */
html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Montserrat', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   Gold Gradient Text
   ============================================ */
.text-gold-gradient {
  background: linear-gradient(135deg, var(--gold-primary) 0%, var(--gold-light) 50%, var(--gold-primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================
   Gold Glow Effects
   ============================================ */
.border-gold-glow {
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.3);
}

.shadow-gold {
  box-shadow: 0 4px 20px rgba(212, 175, 55, 0.2);
}

.shadow-gold-lg {
  box-shadow: 0 10px 40px rgba(212, 175, 55, 0.3);
}

/* ============================================
   Transitions
   ============================================ */
.transition-gold {
  transition: all 0.3s ease;
}

.transition-gold:hover {
  color: var(--gold-primary);
  border-color: var(--gold-primary);
}

/* ============================================
   Animations
   ============================================ */
@keyframes pulse-gold {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.animate-pulse-gold {
  animation: pulse-gold 2s ease-in-out infinite;
}

.animate-shimmer {
  background: linear-gradient(
    90deg,
    var(--gold-dark) 0%,
    var(--gold-light) 50%,
    var(--gold-dark) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 2s linear infinite;
}

/* ============================================
   Scrollbar Styling (Webkit)
   ============================================ */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--black);
}

::-webkit-scrollbar-thumb {
  background: var(--gold-dark);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gold-primary);
}

/* ============================================
   Selection Styling
   ============================================ */
::selection {
  background: var(--gold-primary);
  color: var(--black);
}

::-moz-selection {
  background: var(--gold-primary);
  color: var(--black);
}

/* ============================================
   Focus States (Accessibility)
   ============================================ */
:focus-visible {
  outline: 2px solid var(--gold-primary);
  outline-offset: 2px;
}

/* Enhanced focus ring for interactive elements */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--gold-primary);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.2);
}

/* Screen reader only utility class */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Skip to main content link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--gold-primary);
  color: var(--black);
  padding: 8px 16px;
  z-index: 100;
  font-weight: 600;
  transition: top 0.3s;
}

.skip-link:focus {
  top: 0;
}

/* ============================================
   Loading Skeleton
   ============================================ */
.skeleton {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.05) 0%,
    rgba(255, 255, 255, 0.1) 50%,
    rgba(255, 255, 255, 0.05) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s linear infinite;
}

/* ============================================
   Button Styles
   ============================================ */
.btn-gold {
  background-color: var(--gold-primary);
  color: var(--black);
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
}

.btn-gold:hover {
  background-color: var(--gold-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(212, 175, 55, 0.3);
}

.btn-gold-outline {
  background-color: transparent;
  color: var(--gold-primary);
  border: 2px solid var(--gold-primary);
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
}

.btn-gold-outline:hover {
  background-color: var(--gold-primary);
  color: var(--black);
}

/* ============================================
   Card Styles
   ============================================ */
.card-dark {
  background-color: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 1rem;
  transition: all 0.3s ease;
}

.card-dark:hover {
  border-color: rgba(212, 175, 55, 0.5);
  transform: translateY(-4px);
}

/* ============================================
   Alpine.js Cloak (prevent FOUC)
   ============================================ */
[x-cloak] {
  display: none !important;
}

/* ============================================
   Toast Notifications
   ============================================ */
@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fade-in 0.3s ease-out;
}

/* ============================================
   Reduced Motion (Accessibility)
   Respects user's motion preferences
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  html {
    scroll-behavior: auto;
  }

  .animate-pulse-gold,
  .animate-shimmer,
  .skeleton {
    animation: none;
  }
}
