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

body {
  overflow-x: hidden;
}

::selection {
  background-color: #B85C38;
  color: #FDF6EC;
}

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

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

/* ─── Scroll Dot Animation ─── */
@keyframes scrollDot {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(200%); }
}

.animate-scroll-dot {
  animation: scrollDot 1.5s ease-in-out infinite;
}

/* ─── Hero Animations ─── */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-anim {
  opacity: 1;
  animation: fadeUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.hero-anim:nth-child(2) { animation-delay: 0.1s; }
.hero-anim:nth-child(3) { animation-delay: 0.2s; }
.hero-anim:nth-child(4) { animation-delay: 0.3s; }
.hero-anim:nth-child(5) { animation-delay: 0.45s; }

/* ─── Scroll Reveal ─── */
.reveal {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1), transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

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

@media (prefers-reduced-motion: no-preference) {
  .reveal[data-reveal] {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  }
}

/* ─── Mobile Menu Transitions ─── */
#mobile-menu {
  transition: max-height 0.3s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.2s ease;
}

#mobile-menu.hidden {
  max-height: 0 !important;
  opacity: 0;
  overflow: hidden;
}

#mobile-menu:not(.hidden) {
  max-height: 400px;
  opacity: 1;
}

.mobile-link {
  transition: color 0.2s ease;
}

/* ─── Custom Select Arrow ─── */
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

/* ─── Focus Visible ─── */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid #B85C38;
  outline-offset: 2px;
  border-radius: 4px;
}

/* ─── Reduced Motion ─── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html {
    scroll-behavior: auto;
  }
  .animate-marquee {
    animation: none;
  }
}
