/* ============================================
   Dr. Perin Alfred — Custom Styles
   ============================================ */

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Focus visible for keyboard users */
*:focus-visible {
  outline: 2px solid #de4422;
  outline-offset: 2px;
}

/* Header transition */
#header {
  transition: background-color 0.3s ease, box-shadow 0.3s ease, padding 0.3s ease;
}

#header.scrolled {
  background-color: rgba(254, 253, 248, 0.97);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 4px 16px rgba(0, 0, 0, 0.06);
}

/* Nav link underline animation */
.nav-link {
  position: relative;
}

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

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

/* Mobile menu link hover */
.mobile-link:hover {
  color: #de4422;
}

/* Scroll reveal base — content is VISIBLE by default (no JS needed) */
.scroll-reveal {
  opacity: 1;
  transform: none;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

/* When JS adds .revealed, animate in */
.scroll-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Progressive enhancement: hide initially only if JS runs and prefers-reduced-motion is off */
@media (prefers-reduced-motion: no-preference) {
  .scroll-reveal {
    opacity: 0;
    transform: translateY(24px);
  }
  .scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Staggered delays for grid items */
.scroll-reveal:nth-child(1) { transition-delay: 0ms; }
.scroll-reveal:nth-child(2) { transition-delay: 80ms; }
.scroll-reveal:nth-child(3) { transition-delay: 160ms; }
.scroll-reveal:nth-child(4) { transition-delay: 240ms; }
.scroll-reveal:nth-child(5) { transition-delay: 320ms; }
.scroll-reveal:nth-child(6) { transition-delay: 400ms; }

/* Custom select arrow */
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23836830' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

/* Subtle hover lift for service cards */
.group:hover .group-hover\:translate-y-0 {
  transform: translateY(0);
}

/* Selection color */
::selection {
  background-color: #de4422;
  color: #ffffff;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #faf6e8;
}
::-webkit-scrollbar-thumb {
  background: #e0c06d;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #ceb055;
}

/* Hero floating card animation */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-8px); }
}

@keyframes floatReverse {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(8px); }
}

.hero-float-1 {
  animation: float 5s ease-in-out infinite;
}
.hero-float-2 {
  animation: floatReverse 6s ease-in-out infinite;
}
.hero-float-3 {
  animation: float 4.5s ease-in-out infinite;
}

/* Reduce motion for users who prefer it */
@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;
  }
}
