/* ============================================
   BRAIDANNA - Custom Styles
   ============================================ */

/* Hide elements with x-cloak until Alpine initializes */
[x-cloak] {
  display: none !important;
}

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

/* ============================================
   NAV LINK STYLES
   ============================================ */
.nav-link {
  position: relative;
  font-family: 'Jost', sans-serif;
  font-weight: 400;
  font-size: 0.875rem;
  letter-spacing: 0.05em;
  color: #f5ede0;
  transition: color 0.3s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 1px;
  background: linear-gradient(90deg, #c8913e, #e8c99a);
  transition: width 0.3s ease;
}

.nav-link:hover {
  color: #c8913e;
}

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

/* ============================================
   SCROLL REVEAL ANIMATIONS
   ============================================ */
[data-reveal] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* Stagger children */
[data-reveal] > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

[data-reveal].revealed > *:nth-child(1) { transition-delay: 0.1s; }
[data-reveal].revealed > *:nth-child(2) { transition-delay: 0.2s; }
[data-reveal].revealed > *:nth-child(3) { transition-delay: 0.3s; }
[data-reveal].revealed > *:nth-child(4) { transition-delay: 0.4s; }
[data-reveal].revealed > *:nth-child(5) { transition-delay: 0.5s; }

/* ============================================
   SECTION DIVIDERS
   ============================================ */
section {
  position: relative;
}

section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  max-width: 1000px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(200, 145, 62, 0.2), transparent);
}

section:first-of-type::before,
#hero::before {
  display: none;
}

/* ============================================
   CUSTOM SCROLLBAR
   ============================================ */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #0f2e29;
}

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

::-webkit-scrollbar-thumb:hover {
  background: #e8c99a;
}

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: #c8913e #0f2e29;
}

/* ============================================
   FORM STYLES ENHANCEMENTS
   ============================================ */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus,
select:-webkit-autofill,
select:-webkit-autofill:hover,
select:-webkit-autofill:focus {
  -webkit-text-fill-color: #f5ede0;
  -webkit-box-shadow: 0 0 0px 1000px #1a3d35 inset;
  transition: background-color 5000s ease-in-out 0s;
}

/* Select dropdown arrow color */
select {
  background-image: none;
}

/* ============================================
   GALLERY GRID ENHANCEMENTS
   ============================================ */
@media (min-width: 768px) {
  .gallery-item:nth-child(5n+1) {
    grid-row: span 2;
  }
}

/* ============================================
   MAP FILTER
   ============================================ */
iframe[src*="google.com/maps"] {
  filter: grayscale(100%) sepia(30%) hue-rotate(120deg) saturate(0.6);
  transition: filter 0.3s ease;
}

iframe[src*="google.com/maps"]:hover {
  filter: grayscale(80%) sepia(20%) hue-rotate(120deg) saturate(0.7);
}

/* ============================================
   BUTTON EFFECTS
   ============================================ */
button, a {
  -webkit-tap-highlight-color: transparent;
}

/* Gold button glow on hover */
.bg-gold:hover {
  box-shadow: 0 0 30px rgba(200, 145, 62, 0.3);
}

/* ============================================
   LOADING STATE ANIMATIONS
   ============================================ */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.animate-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* ============================================
   FOCUS STATES (Accessibility)
   ============================================ */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid #c8913e;
  outline-offset: 2px;
}

/* ============================================
   RESPONSIVE TYPOGRAPHY
   ============================================ */
@media (max-width: 640px) {
  .font-display {
    letter-spacing: -0.01em;
  }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
  nav,
  .animate-marquee,
  [data-reveal]::before,
  section::before {
    display: none !important;
  }

  body {
    background: white;
    color: black;
  }

  .text-gold,
  .text-cream {
    color: black !important;
  }
}
