/* ============================================
   Allison Ward-Moore, MD — Custom Styles
   Terracotta & Sand Editorial Design
   ============================================ */

/* Base & Typography */
html {
  scroll-behavior: smooth;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

/* ============================================
   NAVIGATION
   ============================================ */
#navbar {
  background: rgba(253, 251, 247, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  transition: box-shadow 0.4s ease, background 0.4s ease;
}

#navbar.scrolled {
  box-shadow: 0 1px 20px rgba(0, 0, 0, 0.06);
  background: rgba(253, 251, 247, 0.97);
}

.nav-logo-text {
  transition: color 0.3s ease;
}

/* ============================================
   MOBILE MENU
   ============================================ */
.mobile-link {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.3s ease, transform 0.3s ease, color 0.2s 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; }

.menu-line {
  transition: transform 0.3s ease, opacity 0.3s ease;
}

body.menu-open .menu-line:nth-child(1) {
  transform: rotate(45deg) translate(4px, 4px);
}
body.menu-open .menu-line:nth-child(2) {
  opacity: 0;
}
body.menu-open .menu-line:nth-child(3) {
  transform: rotate(-45deg) translate(4px, -4px);
  width: 1.25rem;
}

body.menu-open {
  overflow: hidden;
}

/* ============================================
   HERO ANIMATIONS
   ============================================ */
.hero-eyebrow {
  animation: slideUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  transform: translateY(100%);
}

.hero-title {
  animation: slideUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.1s forwards;
  transform: translateY(100%);
}

.hero-subtitle {
  animation: slideUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.2s forwards;
  transform: translateY(100%);
}

.hero-ctas {
  animation: slideUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.3s forwards;
  transform: translateY(100%);
}

.hero-stats {
  animation: slideUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.4s forwards;
  transform: translateY(100%);
}

.hero-image-wrapper {
  animation: imageReveal 1s cubic-bezier(0.22, 1, 0.36, 1) 0.2s forwards;
  transform: scale(0.95);
  opacity: 0;
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes imageReveal {
  from {
    transform: scale(0.95);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* ============================================
   SCROLL REVEAL (below fold only)
   Progressive enhancement — JS adds the class
   ============================================ */
.reveal {
  /* Default: fully visible (no JS required) */
}

.reveal[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal[data-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.reveal[data-reveal].revealed ~ .reveal[data-reveal] {
  transition-delay: 0.1s;
}

/* ============================================
   SERVICE CARDS
   ============================================ */
.service-card {
  opacity: 1;
}

/* ============================================
   BUTTONS
   ============================================ */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid #B56C4A;
  outline-offset: 2px;
  border-radius: 4px;
}

/* ============================================
   FORM STYLES
   ============================================ */
input::placeholder,
textarea::placeholder {
  color: #C4B5A0;
}

select option {
  color: #4A3F35;
}

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

  .hero-title span {
    display: inline;
  }

  .hero-stats {
    flex-direction: column;
    gap: 8px;
  }

  .hero-stats > div {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .hero-stats p:first-child {
    font-size: 1.5rem;
  }

  .hero-image-wrapper {
    margin-top: 2rem;
  }

  .floating-badge {
    position: relative !important;
    bottom: auto !important;
    left: auto !important;
    margin-top: 1rem;
  }
}

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

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

  .hero-eyebrow,
  .hero-title,
  .hero-subtitle,
  .hero-ctas,
  .hero-stats,
  .hero-image-wrapper {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .reveal[data-reveal] {
    opacity: 1;
    transform: none;
  }

  .service-card {
    transition: none;
  }
}

/* ============================================
   ACCESSIBILITY: Focus States
   ============================================ */
a:hover {
  text-decoration: none;
}

/* Smooth image loading */
img {
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}
