/* ============================================
   Johnson's Barber Shop — Custom Styles
   ============================================ */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #fdfcfa;
}
::-webkit-scrollbar-thumb {
  background: #a7f3d0;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #6ee7b7;
}

/* Selection */
::selection {
  background: #a7f3d0;
  color: #064e3b;
}

/* ============================================
   Floating Card Animations
   ============================================ */
@keyframes float-1 {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-12px) rotate(1deg); }
}
@keyframes float-2 {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-16px) rotate(-1deg); }
}
@keyframes float-3 {
  0%, 100% { transform: translateY(0px) translateX(0px); }
  50% { transform: translateY(-8px) translateX(6px); }
}

.floating-card {
  animation-duration: 4s;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
}

.floating-card:nth-child(1) { animation-name: float-1; }
.floating-card:nth-child(2) { animation-name: float-2; }
.floating-card:nth-child(3) { animation-name: float-3; }

/* Scroll indicator line */
@keyframes scroll-line {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(100%); }
}
.animate-scroll-line {
  animation: scroll-line 1.5s ease-in-out infinite;
}

/* ============================================
   Scroll Reveal (Progressive Enhancement)
   Content is visible by default; JS adds .revealed
   ============================================ */
.reveal {
  opacity: 1;
  transform: none;
  transition: opacity 0.7s ease, transform 0.7s ease;
}

/* When JS is enabled and prefers-reduced-motion is off, start hidden */
.js-enabled .reveal {
  opacity: 0;
  transform: translateY(24px);
}

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

/* Staggered delays for service cards */
.js-enabled .service-card:nth-child(1) { transition-delay: 0ms; }
.js-enabled .service-card:nth-child(2) { transition-delay: 80ms; }
.js-enabled .service-card:nth-child(3) { transition-delay: 160ms; }
.js-enabled .service-card:nth-child(4) { transition-delay: 0ms; }
.js-enabled .service-card:nth-child(5) { transition-delay: 80ms; }
.js-enabled .service-card:nth-child(6) { transition-delay: 160ms; }

/* ============================================
   Navbar Scroll State
   ============================================ */
#site-header.scrolled {
  background: rgba(253, 252, 250, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 rgba(6, 95, 70, 0.08), 0 4px 24px rgba(6, 95, 70, 0.06);
}

#site-header.scrolled .nav-link {
  color: rgba(6, 78, 59, 0.7);
}

#site-header.scrolled .nav-link:hover {
  color: #065f46;
}

/* ============================================
   Hover / Focus Utilities
   ============================================ */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid #10b981;
  outline-offset: 2px;
  border-radius: 4px;
}

/* ============================================
   Reduced Motion
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  .reveal {
    opacity: 1;
    transform: none;
  }
  .js-enabled .reveal {
    opacity: 1;
    transform: none;
  }
}

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

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