/* ===== CSH Design System ===== */

/* Disable double-tap-to-zoom on mobile */
html {
    touch-action: manipulation;
}

/* Google Font is loaded via <link> in each page head for non-blocking loading.
   The @import below is kept as a fallback for pages that don't include the link tag. */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

/* ===== ANIMATIONS ===== */

/* Shimmer skeleton loading */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.skeleton {
  background: linear-gradient(90deg, #1C1C1C 25%, #2A2A2A 50%, #1C1C1C 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
}

/* Fade in */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
/* animation-fill-mode:both means the element starts invisible even before the delay fires */
.fade-in { animation: fadeIn 0.6s ease both; }

/* Slide up */
@keyframes slideUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
.slide-up { animation: slideUp 0.7s ease both; }

/* Modal entrance */
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-enter { animation: modalIn 0.3s ease forwards; }

/* Slide in from right (mobile menu) */
@keyframes slideInRight {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}
.slide-in-right { animation: slideInRight 0.3s ease forwards; }

/* Gold spinner */
@keyframes spinGold {
  to { transform: rotate(360deg); }
}
.gold-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid #2A2A2A;
  border-top-color: #C9A84C;
  border-radius: 50%;
  animation: spinGold 0.8s linear infinite;
}
.gold-spinner-sm {
  width: 18px;
  height: 18px;
  border: 2px solid #2A2A2A;
  border-top-color: #C9A84C;
  border-radius: 50%;
  animation: spinGold 0.8s linear infinite;
}

/* Toast slide in */
@keyframes toastIn {
  from { opacity: 0; transform: translateX(100%); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes toastOut {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(100%); }
}
.toast-enter { animation: toastIn 0.3s ease forwards; }
.toast-exit { animation: toastOut 0.3s ease forwards; }

/* Gold gradient text utility */
.gold-text-gradient {
  background: linear-gradient(135deg, #C9A84C, #E8D48B, #C9A84C);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Remove default tap highlight colour on mobile */
* {
  -webkit-tap-highlight-color: transparent;
}

/* Accessible focus ring — keyboard users see this; mouse/touch users don't */
:focus-visible {
  outline: 2px solid #C9A84C;
  outline-offset: 2px;
}

/* Card interaction — shared across all pages */
.card-press {
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.3s ease;
  will-change: transform;
  contain: layout style;
}
.card-press:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.4), 0 0 0 1px rgba(201,168,76,0.15);
}
.card-press:active {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0,0,0,0.3), 0 0 0 1px rgba(201,168,76,0.25);
}

.card-hover {
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.3s ease;
  will-change: transform;
  contain: layout style;
}
.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.4), 0 0 0 1px rgba(201,168,76,0.15);
}
.card-hover:active {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0,0,0,0.3), 0 0 0 1px rgba(201,168,76,0.25);
}

/* Hide scrollbar utility */
.hide-scrollbar::-webkit-scrollbar { display: none; }
.hide-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* Custom scrollbar for content areas */
.gold-scrollbar::-webkit-scrollbar { width: 6px; }
.gold-scrollbar::-webkit-scrollbar-track { background: #0A0A0A; }
.gold-scrollbar::-webkit-scrollbar-thumb { background: #2A2A2A; border-radius: 3px; }
.gold-scrollbar::-webkit-scrollbar-thumb:hover { background: #C9A84C; }

/* ========== MOBILE RESPONSIVENESS ========== */
@media (max-width: 768px) {
  /* Larger slider thumbs for touch */
  input[type="range"]::-webkit-slider-thumb {
    width: 20px !important;
    height: 20px !important;
  }
  input[type="range"]::-moz-range-thumb {
    width: 20px !important;
    height: 20px !important;
  }
  
  /* Larger progress bar track for touch */
  input[type="range"] {
    height: 6px !important;
  }
}

/* Reduced motion accessibility */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Trailer modal fade-in */
@keyframes cshTrailerFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
