/* ============================================
   POOLBRITE — Custom Styles
   Clean minimalist · Terracotta + Sand
   ============================================ */

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

img {
  display: block;
  max-width: 100%;
}

/* Selection */
::selection {
  background: #c47e5e;
  color: #fff;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: #f9f3e8;
}
::-webkit-scrollbar-thumb {
  background: #d19880;
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: #b56347;
}

/* ============================================
   HERO ANIMATIONS
   Above-the-fold: CSS-only, no JS dependency
   ============================================ */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   SCROLL REVEAL — Progressive Enhancement
   Default state: visible. JS adds animation class.
   Respects prefers-reduced-motion.
   ============================================ */
.reveal {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(20px);
  }
  .reveal.revealed {
    opacity: 1;
    transform: translateY(0);
  }
  .reveal:nth-child(2) { transition-delay: 0.1s; }
  .reveal:nth-child(3) { transition-delay: 0.2s; }
  .reveal:nth-child(4) { transition-delay: 0.3s; }
}

/* ============================================
   NAVBAR
   ============================================ */
#navbar {
  background: transparent;
}

#navbar.scrolled {
  background: rgba(253, 252, 250, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(196, 126, 94, 0.1);
}

#navbar.scrolled .group {
  color: #1a1a1a;
}

#navbar:not(.scrolled) .group {
  color: #ffffff;
}

#navbar:not(.scrolled) .text-current\/70 {
  color: rgba(255, 255, 255, 0.7);
}

#navbar:not(.scrolled) .text-current\/70:hover {
  color: rgba(255, 255, 255, 0.95);
}

#navbar:not(.scrolled) .text-current {
  color: #ffffff;
}

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

.service-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: #c47e5e;
  transition: width 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.service-card:hover::after {
  width: 100%;
}

/* ============================================
   FORM STYLES
   ============================================ */
input:focus,
textarea:focus,
select:focus {
  border-color: #c47e5e !important;
}

select option {
  background: #fdfcfa;
  color: #1a1a1a;
}

/* ============================================
   MOBILE MENU
   ============================================ */
.mobile-link {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease, color 0.3s ease;
}

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

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

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 767px) {
  .hero-title {
    font-size: 2.5rem;
  }

  .hero-sub {
    font-size: 1rem;
  }

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

@media (min-width: 768px) and (max-width: 1023px) {
  .hero-title {
    font-size: 3.5rem;
  }
}

/* ============================================
   FOCUS VISIBLE
   ============================================ */
:focus-visible {
  outline: 2px solid #c47e5e;
  outline-offset: 2px;
}

button:focus-visible,
a:focus-visible {
  outline-offset: 4px;
}
