/* =============================================
   Rancho del Chino North — Custom Styles
   ============================================= */

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

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

body {
  overflow-x: hidden;
}

::selection {
  background: rgba(245, 166, 35, 0.3);
  color: #f5f0f8;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #1a101f;
}
::-webkit-scrollbar-thumb {
  background: #4f335e;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #664178;
}

/* --- Scroll Indicator --- */
.scroll-line {
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(1); }
  50% { opacity: 1; transform: scaleY(1.2); }
}

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

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

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

/* --- Stat Counters --- */
.stat-item {
  opacity: 1;
}

/* --- Scroll Reveal Animations --- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(30px);
  }
  .reveal.revealed {
    opacity: 1;
    transform: translateY(0);
  }
}

@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;
  }
}

/* --- Mobile Menu Animation --- */
#mobile-menu.open {
  opacity: 1;
  pointer-events: all;
}

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

/* --- Navbar Scrolled State --- */
.navbar-scrolled {
  background: rgba(26, 16, 31, 0.95) !important;
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(79, 51, 94, 0.3);
}

/* --- Form Focus States --- */
input:focus, select:focus, textarea:focus {
  outline: none;
}

/* --- Button Hover Glow --- */
button[type="submit"]:hover,
a[href="#contact"]:hover {
  cursor: pointer;
}

/* --- Responsive Tweaks --- */
@media (max-width: 640px) {
  .font-serif {
    word-break: keep-all;
  }
}

@media (min-width: 1024px) {
  .service-card {
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .service-card:hover {
    transform: translateY(-4px);
  }
}
