/* === Custom Styles for Trenditions Family Hair Care === */

/* Base */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  overflow-x: hidden;
}

/* Selection */
::selection {
  background: rgba(168, 85, 247, 0.3);
  color: #f5f5f5;
}

/* === Floating Animation for Hero Stats === */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-12px); }
}

.animate-float {
  animation: float 4s ease-in-out infinite;
}

/* === Stat Cards === */
.stat-card {
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 20px 24px;
  text-align: center;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  min-width: 140px;
}

.stat-card--plum {
  background: rgba(74, 14, 47, 0.7);
  border-color: rgba(168, 85, 247, 0.3);
}

.stat-card--amber {
  background: rgba(180, 83, 9, 0.7);
  border-color: rgba(251, 191, 36, 0.3);
}

.stat-card--dark {
  background: rgba(15, 23, 42, 0.9);
  border-color: rgba(255, 255, 255, 0.08);
}

/* === Service Cards === */
.service-card {
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, rgba(168, 85, 247, 0.5), transparent);
  opacity: 0;
  transition: opacity 0.5s ease;
}

.service-card:hover::before {
  opacity: 1;
}

/* === Gallery === */
.gallery-item {
  position: relative;
  cursor: pointer;
}

.gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.4), transparent);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.gallery-item:hover::after {
  opacity: 1;
}

/* === Scroll Reveal (progressive enhancement) === */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  }
  
  .reveal.revealed {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Fallback: content is always visible if JS is disabled */
@supports not (animation: reveal 1s) {
  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* === Navbar Scroll State === */
.navbar-scrolled {
  background: rgba(10, 15, 30, 0.95) !important;
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* === Testimonial Cards === */
.testimonial-card {
  position: relative;
}

.testimonial-card::before {
  content: '"';
  position: absolute;
  top: 16px;
  right: 24px;
  font-family: 'Playfair Display', serif;
  font-size: 80px;
  font-weight: 700;
  line-height: 1;
  opacity: 0.06;
  color: white;
}

/* === Custom Scrollbar === */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #0a0f1e;
}

::-webkit-scrollbar-thumb {
  background: #374151;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #4b5563;
}

/* === Mobile Menu Transitions === */
#mobileMenu {
  animation: slideDown 0.3s ease-out;
}

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

/* === Button Focus States === */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid #fbbf24;
  outline-offset: 2px;
}

/* === Responsive tweaks === */
@media (max-width: 640px) {
  .stat-card {
    display: none;
  }
}

@media (min-width: 641px) and (max-width: 1023px) {
  .stat-card {
    display: none;
  }
}
