/* ===== Custom Styles for Hays Trophies & Engraving ===== */

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

/* Ensure fixed nav doesn't overlap content */
body {
  padding-top: 0;
}

/* Mobile menu link styles */
.mobile-link {
  display: block;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgb(228, 226, 224);
}

.mobile-link:last-child {
  border-bottom: none;
}

/* Subtle hover underline for nav links */
header nav a:not(.inline-flex) {
  position: relative;
}

header nav a:not(.inline-flex)::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: rgb(123, 45, 59);
  transition: width 0.2s ease;
}

header nav a:not(.inline-flex):hover::after {
  width: 100%;
}

/* Form focus ring animation */
input:focus,
select:focus,
textarea:focus {
  box-shadow: 0 0 0 3px rgba(123, 45, 59, 0.15);
}

/* Prevent scroll-reveal from hiding content before JS runs */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
  }

  .reveal.revealed {
    opacity: 1;
    transform: translateY(0);
  }

  /* Stagger children */
  .reveal-stagger > * {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.5s ease, transform 0.5s ease;
  }

  .reveal-stagger.revealed > *:nth-child(1) { transition-delay: 0s; }
  .reveal-stagger.revealed > *:nth-child(2) { transition-delay: 0.08s; }
  .reveal-stagger.revealed > *:nth-child(3) { transition-delay: 0.16s; }
  .reveal-stagger.revealed > *:nth-child(4) { transition-delay: 0.24s; }
  .reveal-stagger.revealed > *:nth-child(5) { transition-delay: 0.32s; }
  .reveal-stagger.revealed > *:nth-child(6) { transition-delay: 0.40s; }

  .reveal-stagger.revealed > * {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Reduced motion: disable all animations */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Mobile menu open state */
#mobileMenu.open {
  animation: slideDown 0.2s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    max-height: 0;
  }
  to {
    opacity: 1;
    max-height: 400px;
  }
}

/* Print styles */
@media print {
  header, footer, #contactForm, #menuBtn {
    display: none !important;
  }
  body {
    color: #000;
    background: #fff;
  }
  a {
    text-decoration: underline;
    color: #000;
  }
}

/* Scrollbar styling for webkit */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: rgb(250, 249, 248);
}
::-webkit-scrollbar-thumb {
  background: rgb(212, 207, 201);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgb(168, 159, 150);
}
