/* ============================================
   Dr. Coleman Medical Practice — Custom Styles
   ============================================ */

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

body {
  overflow-x: hidden;
}

/* ---- Scroll Reveal (progressive enhancement) ---- */
@media (prefers-reduced-motion: no-preference) {
  .reveal-up,
  .reveal-left,
  .reveal-right {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  }

  .reveal-left {
    transform: translateX(-30px);
  }

  .reveal-right {
    transform: translateX(30px);
  }

  .reveal-h {
    opacity: 0;
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  }

  .reveal-up.revealed,
  .reveal-left.revealed,
  .reveal-right.revealed,
  .reveal-h.revealed {
    opacity: 1;
    transform: translate(0, 0) translateX(0);
  }

  /* Stagger children */
  .reveal-up:nth-child(2) { transition-delay: 0.1s; }
  .reveal-up:nth-child(3) { transition-delay: 0.2s; }
  .reveal-up:nth-child(4) { transition-delay: 0.3s; }
  .reveal-up:nth-child(5) { transition-delay: 0.4s; }
  .reveal-up:nth-child(6) { transition-delay: 0.5s; }
}

/* ---- Nav ---- */
#site-header {
  background: transparent;
}

#site-header.scrolled {
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(115, 40, 63, 0.08);
}

.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: #fbbf24;
  transition: width 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

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

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

/* ---- Hero image ---- */
#top img {
  will-change: transform;
  transition: transform 8s ease;
}

#top:hover img {
  transform: scale(1.02);
}

/* ---- Button hover effects ---- */
a[href="#contact"] .group:hover svg {
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---- Selection ---- */
::selection {
  background: #d7a3b8;
  color: #2a0c15;
}

/* ---- Form focus states ---- */
input:focus,
select:focus,
textarea:focus {
  box-shadow: 0 0 0 3px rgba(166, 75, 104, 0.1);
}

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

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

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

::-webkit-scrollbar-thumb:hover {
  background: #d7a3b8;
}

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal-up,
  .reveal-left,
  .reveal-right,
  .reveal-h {
    opacity: 1;
    transform: none;
    transition: none;
  }

  #top img {
    transition: none;
  }

  #top:hover img {
    transform: none;
  }
}
