/* Custom styles for Main Street Video */

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

/* Prevent scroll-reveal flash: all content visible by default */
/* JS adds .is-visible class for scroll animations */

/* Hero image grid hover effect */
@media (min-width: 768px) {
  .group:hover .group-hover\:scale-105 {
    transform: scale(1.05);
  }
}

/* Subtle grain texture overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  z-index: 1;
}

body > main,
body > footer {
  position: relative;
  z-index: 2;
}

/* Scroll reveal base states — content is visible by default */
.reveal {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Only animate when the class is added by JS */
@media (prefers-reduced-motion: no-preference) {
  .reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Stagger children */
.reveal-stagger > * {
  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);
}

@media (prefers-reduced-motion: no-preference) {
  .reveal-stagger > * {
    opacity: 0;
    transform: translateY(20px);
  }
  .reveal-stagger.is-visible > * {
    opacity: 1;
    transform: translateY(0);
  }
  .reveal-stagger.is-visible > *:nth-child(1) { transition-delay: 0s; }
  .reveal-stagger.is-visible > *:nth-child(2) { transition-delay: 0.1s; }
  .reveal-stagger.is-visible > *:nth-child(3) { transition-delay: 0.2s; }
  .reveal-stagger.is-visible > *:nth-child(4) { transition-delay: 0.3s; }
}

/* 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='%2394a3b8' 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;
  padding-right: 36px;
}

/* Header scroll state */
#site-header.scrolled {
  background: rgba(2, 6, 16, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
}

/* Selection color */
::selection {
  background: rgba(52, 211, 153, 0.3);
  color: #f1f5f9;
}

/* Focus visible */
:focus-visible {
  outline: 2px solid #34d399;
  outline-offset: 2px;
}

/* 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;
  }
}
