/* ─── Custom Animations ─── */

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
  animation: fadeIn 0.8s ease-out both;
}

.animate-fade-in-up {
  animation: fadeInUp 0.8s ease-out both;
}

.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-600 { animation-delay: 0.6s; }

/* ─── Scroll Reveal ─── */

.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Stagger children */
.reveal:nth-child(2) { transition-delay: 0.1s; }
.reveal:nth-child(3) { transition-delay: 0.2s; }
.reveal:nth-child(4) { transition-delay: 0.3s; }

/* ─── Navbar ─── */

#navbar {
  background: transparent;
}

#navbar.scrolled {
  background: rgba(10, 10, 10, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* ─── Active nav indicator ─── */

.nav-link {
  position: relative;
}

.nav-link.active {
  color: #C9A84C;
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: #C9A84C;
  border-radius: 1px;
}

/* ─── Smooth scroll ─── */

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

/* ─── Selection color ─── */

::selection {
  background: rgba(201, 168, 76, 0.3);
  color: white;
}

/* ─── Custom scrollbar ─── */

::-webkit-scrollbar {
  width: 6px;
}

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

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* ─── Form focus states ─── */

input:focus,
textarea:focus,
select:focus {
  box-shadow: 0 0 0 2px rgba(201, 168, 76, 0.15);
}

/* ─── Button hover micro-interaction ─── */

a[class*="bg-brand-gold"]:active,
button[class*="bg-brand-gold"]:active {
  transform: scale(0.98);
}

/* ─── Gradient text utility ─── */

.text-gradient {
  background: linear-gradient(135deg, #C9A84C, #D4B86A, #C9A84C);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ─── Hero parallax layer ─── */

@media (min-width: 1024px) {
  #hero {
    perspective: 1000px;
  }
}

/* ─── Card hover elevation ─── */

.group:hover {
  transform: translateY(-2px);
  transition: transform 0.3s ease;
}

/* ─── Loading state for images ─── */

img {
  transition: opacity 0.5s ease;
}

img[loading="lazy"] {
  opacity: 0;
}

img[loading="lazy"].loaded {
  opacity: 1;
}

/* ─── Reduced motion preference ─── */

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .animate-fade-in,
  .animate-fade-in-up {
    animation: none;
    opacity: 1;
  }
  html { scroll-behavior: auto; }
}

/* ─── Print styles ─── */

@media print {
  nav, footer, .fixed { display: none !important; }
  body { background: white !important; color: black !important; }
  section { page-break-inside: avoid; }
}
