/* ============================================
   Tina's Dog House — Custom Styles
   ============================================ */

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

/* Base adjustments */
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Scroll reveal — progressive enhancement only */
.scroll-reveal {
  /* Default: fully visible, no animation needed if JS is blocked */
}

/* When JS adds the animated class, apply transitions */
.scroll-reveal.animated {
  animation: fadeUp 0.7s ease forwards;
}

.scroll-reveal[data-delay="80"] {
  animation-delay: 80ms;
}

.scroll-reveal[data-delay="160"] {
  animation-delay: 160ms;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Navbar scroll state */
#navbar.scrolled {
  box-shadow: 0 4px 20px rgba(4, 78, 59, 0.1);
}

/* Mobile menu transitions */
#mobile-menu {
  animation: slideDown 0.25s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

  .scroll-reveal.animated {
    animation: none;
  }

  img:hover,
  .hover\:scale-105:hover {
    transform: none;
  }

  .animate-bounce {
    animation: none;
  }
}

/* Ensure images don't cause layout shift */
img {
  max-width: 100%;
  height: auto;
}

/* Selection color */
::selection {
  background-color: #a7f3d0;
  color: #064e3b;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
  background: #065f46;
}
