/* ============================================
   Idaho Coffee Company — Custom Styles
   ============================================ */

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  overflow-x: hidden;
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: #1B2A4A;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #243B66;
}

/* Selection */
::selection {
  background: #D4A017;
  color: #0D1529;
}

/* Marquee animation */
@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.animate-marquee {
  animation: marquee 25s linear infinite;
}

/* Nav scroll state */
.nav-scrolled {
  background: rgba(255, 255, 255, 0.97) !important;
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 20px rgba(13, 21, 41, 0.08);
}

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

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

.mobile-link {
  position: relative;
}

.mobile-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  width: 0;
  height: 2px;
  background: #D4A017;
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

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

/* Reveal animations — progressive enhancement */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    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.revealed {
    opacity: 1;
    transform: translateY(0);
  }

  /* Stagger children */
  .reveal-delay-1 { transition-delay: 0.1s; }
  .reveal-delay-2 { transition-delay: 0.2s; }
  .reveal-delay-3 { transition-delay: 0.3s; }
}

/* Back to top button */
#back-to-top.visible {
  opacity: 1 !important;
  pointer-events: all !important;
}

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

/* Print styles */
@media print {
  #navbar, #back-to-top, .animate-marquee {
    display: none !important;
  }
  body {
    color: #000;
    background: #fff;
  }
}
