/* ============================================
   COZY SPA — Custom Styles
   ============================================ */

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

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Selection Color */
::selection {
  background-color: #fbbf24;
  color: #500724;
}

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

#navbar.scrolled {
  background-color: rgba(80, 7, 36, 0.95);
  backdrop-filter: blur(20px);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}

.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: #fbbf24;
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

.nav-logo-text {
  transition: color 0.4s ease;
}

/* ============================================
   MOBILE MENU
   ============================================ */
#mobile-menu.open {
  opacity: 1;
  pointer-events: all;
}

#mobile-menu.closing {
  opacity: 0;
  pointer-events: none;
}

.menu-line {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#mobile-menu-btn.active .menu-line:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

#mobile-menu-btn.active .menu-line:nth-child(2) {
  opacity: 0;
}

#mobile-menu-btn.active .menu-line:nth-child(3) {
  width: 20px;
  transform: rotate(-45deg) translate(5px, -5px);
}

.mobile-link {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

#mobile-menu.open .mobile-link {
  opacity: 1;
  transform: translateY(0);
}

#mobile-menu.open .mobile-link:nth-child(1) { transition-delay: 0.1s; }
#mobile-menu.open .mobile-link:nth-child(2) { transition-delay: 0.15s; }
#mobile-menu.open .mobile-link:nth-child(3) { transition-delay: 0.2s; }
#mobile-menu.open .mobile-link:nth-child(4) { transition-delay: 0.25s; }
#mobile-menu.open .mobile-link:nth-child(5) { transition-delay: 0.3s; }

/* ============================================
   REVEAL ANIMATIONS (Progressive Enhancement)
   ============================================ */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .reveal.revealed {
    opacity: 1;
    transform: translateY(0);
  }

  /* Stagger children */
  .reveal-grid > * {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
  }
}

/* For reduced motion, ensure everything is visible by default */
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ============================================
   SERVICE CARDS
   ============================================ */
.service-card {
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, transparent 0%, rgba(157, 23, 77, 0.03) 100%);
  opacity: 0;
  transition: opacity 0.5s ease;
  border-radius: inherit;
}

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

/* ============================================
   GALLERY
   ============================================ */
.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
}

.gallery-item img {
  transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-item:hover img {
  transform: scale(1.1);
}

/* ============================================
   BUTTONS
   ============================================ */
.btn-primary {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.btn-primary:hover::before {
  left: 100%;
}

/* ============================================
   FORM INPUTS
   ============================================ */
input:focus,
select:focus,
textarea:focus {
  box-shadow: 0 0 0 3px rgba(157, 23, 77, 0.1);
}

/* ============================================
   TESTIMONIAL CARDS
   ============================================ */
.testimonial-card {
  position: relative;
}

.testimonial-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #9d174d, #fbbf24);
  border-radius: 0 0 1rem 1rem;
  transform: scaleX(0);
  transition: transform 0.4s ease;
}

.testimonial-card:hover::after {
  transform: scaleX(1);
}

/* ============================================
   DECORATIVE SHAPES
   ============================================ */
.geo-circle {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.geo-square {
  position: absolute;
  pointer-events: none;
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */
@media (max-width: 768px) {
  .font-serif {
    font-size: clamp(1.75rem, 5vw, 2.5rem);
  }
}

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

::-webkit-scrollbar-track {
  background: #fdf2f8;
}

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

::-webkit-scrollbar-thumb:hover {
  background: #9d174d;
}

/* ============================================
   FOCUS VISIBLE
   ============================================ */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid #fbbf24;
  outline-offset: 2px;
  border-radius: 4px;
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
  #navbar,
  #mobile-menu-btn,
  .reveal {
    display: none;
  }
  
  body {
    color: #000;
    background: #fff;
  }
}
