/* ============================================
   Marilyn O'Grady — Editorial Medical Health
   Plum + Amber Palette | Playfair + Inter
   ============================================ */

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

body {
  overflow-x: hidden;
}

::selection {
  background: #683068;
  color: #fff;
}

/* --- Navbar --- */
#navbar {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(104, 48, 104, 0.08);
}

#navbar.scrolled {
  box-shadow: 0 4px 30px rgba(104, 48, 104, 0.08);
}

.nav-link {
  position: relative;
}

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

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

.nav-link:hover {
  color: #683068;
}

/* --- Mobile Menu --- */
.mobile-link {
  opacity: 1;
  transition: opacity 0.3s ease;
}

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

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

.menu-line {
  display: block;
}

#menu-toggle.active .menu-line:nth-child(1) {
  transform: rotate(45deg) translate(4px, 4px);
}

#menu-toggle.active .menu-line:nth-child(2) {
  opacity: 0;
}

#menu-toggle.active .menu-line:nth-child(3) {
  transform: rotate(-45deg) translate(4px, -4px);
  width: 1.25rem;
}

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

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #683068, #f59e0b);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.service-card:hover::before {
  transform: scaleX(1);
}

/* --- Approach Cards --- */
.approach-card {
  position: relative;
}

.approach-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
  border: 1px solid transparent;
  transition: border-color 0.3s ease;
}

.approach-card:hover::after {
  border-color: rgba(245, 158, 11, 0.3);
}

/* --- Testimonial Cards --- */
.testimonial-card {
  position: relative;
}

.testimonial-card::before {
  content: '"';
  position: absolute;
  top: 16px;
  right: 24px;
  font-family: 'Playfair Display', serif;
  font-size: 6rem;
  font-weight: 700;
  color: rgba(104, 48, 104, 0.06);
  line-height: 1;
  pointer-events: none;
}

/* --- Scroll Reveal (progressive enhancement) --- */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
  }

  .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; }
  .reveal-delay-5 { transition-delay: 0.5s; }
  .reveal-delay-6 { transition-delay: 0.6s; }
}

/* --- Decorative hover states --- */
a {
  transition: color 0.2s ease;
}

/* --- Focus styles for accessibility --- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid #f59e0b;
  outline-offset: 2px;
  border-radius: 4px;
}

/* --- Form inputs --- */
input,
textarea {
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

/* --- Smooth image loading --- */
img {
  display: block;
  max-width: 100%;
}

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

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

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

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