/* ============================================
   Carol's Skincare — Premium Dark Luxury Styles
   ============================================ */

/* Base & Typography */
html {
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;
}

::selection {
  background: rgba(255, 107, 91, 0.3);
  color: #ffffff;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #0D0D0D;
}
::-webkit-scrollbar-thumb {
  background: #3A3A3A;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #FF6B5B;
}

/* Navbar */
#navbar {
  transition: background 0.4s ease, padding 0.4s ease, box-shadow 0.4s ease;
}

#navbar.scrolled {
  background: rgba(13, 13, 13, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* Reveal Animations — progressive enhancement via JS */
.reveal {
  opacity: 1;
  transform: none;
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.js-active .reveal {
  opacity: 0;
  transform: translateY(30px);
}

.js-active .reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered reveal delays */
.js-active .reveal:nth-child(2) { transition-delay: 0.1s; }
.js-active .reveal:nth-child(3) { transition-delay: 0.2s; }
.js-active .reveal:nth-child(4) { transition-delay: 0.3s; }
.js-active .reveal:nth-child(5) { transition-delay: 0.4s; }
.js-active .reveal:nth-child(6) { transition-delay: 0.5s; }

/* Floating stat cards — only animate on JS */
.reveal-card {
  opacity: 1;
  transform: none;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.js-active .reveal-card {
  opacity: 0;
}

.js-active .reveal-card.visible:nth-child(1) { animation: floatIn1 0.7s ease forwards; animation-delay: 0.3s; }
.js-active .reveal-card.visible:nth-child(2) { animation: floatIn2 0.7s ease forwards; animation-delay: 0.5s; }
.js-active .reveal-card.visible:nth-child(3) { animation: floatIn3 0.7s ease forwards; animation-delay: 0.7s; }
.js-active .reveal-card.visible:nth-child(4) { animation: floatIn4 0.7s ease forwards; animation-delay: 0.9s; }

@keyframes floatIn1 {
  from { opacity: 0; transform: translate(20px, -20px); }
  to { opacity: 1; transform: translate(0, 0); }
}
@keyframes floatIn2 {
  from { opacity: 0; transform: translate(-20px, 10px); }
  to { opacity: 1; transform: translate(0, 0); }
}
@keyframes floatIn3 {
  from { opacity: 0; transform: translate(15px, 20px); }
  to { opacity: 1; transform: translate(0, 0); }
}
@keyframes floatIn4 {
  from { opacity: 0; transform: translate(-15px, -10px); }
  to { opacity: 1; transform: translate(0, 0); }
}

/* Floating animation for stat cards */
.js-active .reveal-card.visible {
  animation: gentleFloat 4s ease-in-out infinite;
}
.js-active .reveal-card.visible:nth-child(2) { animation-delay: 1s; }
.js-active .reveal-card.visible:nth-child(3) { animation-delay: 2s; }
.js-active .reveal-card.visible:nth-child(4) { animation-delay: 0.5s; }

@keyframes gentleFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* Gold line accent */
.gold-line {
  height: 1px;
  background: linear-gradient(90deg, transparent, #D4A84B, transparent);
}

/* Service card hover glow */
.group:hover .w-14 {
  box-shadow: 0 0 20px currentColor;
}

/* Button shine effect */
.bg-coral-500::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
  transition: left 0.5s ease;
}

.bg-coral-500:hover::after {
  left: 100%;
}

/* Mobile menu transition */
#mobileMenu {
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .reveal-card {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }
  .js-active .reveal, .js-active .reveal-card {
    opacity: 1 !important;
    transform: none !important;
  }
}
