/* ===== CUSTOM STYLES ===== */

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

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #040a08;
}
::-webkit-scrollbar-thumb {
  background: #0f6d38;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #1c8a4a;
}

/* Selection color */
::selection {
  background: rgba(212, 168, 67, 0.3);
  color: #faf9f6;
}

/* ===== SCROLL REVEAL ANIMATIONS ===== */
/* Default visible state (no JS fallback) */
.reveal {
  opacity: 1;
  transform: none;
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Animated state — applied via JS only */
@media (prefers-reduced-motion: no-preference) {
  .reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Hidden initial state for JS-enhanced reveals */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 1;
    transform: translateY(0);
  }
  .reveal[data-reveal] {
    opacity: 0;
    transform: translateY(24px);
  }
  .reveal[data-reveal].is-visible {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== NAVBAR SCROLL STATE ===== */
.navbar-scrolled {
  background: rgba(4, 10, 8, 0.92) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(15, 109, 56, 0.2);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* ===== MOBILE MENU ===== */
#mobile-menu {
  animation: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* ===== FLOATING CARD ANIMATIONS ===== */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-8px); }
}

@media (prefers-reduced-motion: no-preference) {
  .floating-card-1 {
    animation: float 4s ease-in-out infinite;
  }
  .floating-card-2 {
    animation: float 4s ease-in-out infinite;
    animation-delay: 1s;
  }
}

/* ===== GOLD SHIMMER EFFECT ===== */
@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

.gold-shimmer {
  background: linear-gradient(90deg, #d4a843 0%, #f0d078 50%, #d4a843 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 4s linear infinite;
}

/* ===== CARD HOVER GLOW ===== */
.service-card:hover {
  box-shadow: 0 0 40px rgba(212, 168, 67, 0.08);
}

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

button:active, a:active {
  transform: scale(0.98);
}

/* ===== FOCUS VISIBLE ===== */
*:focus-visible {
  outline: 2px solid #d4a843;
  outline-offset: 2px;
}

/* ===== RESPONSIVE TWEAKS ===== */
@media (max-width: 640px) {
  .font-serif {
    font-size: clamp(1.75rem, 8vw, 2.5rem);
  }
}

/* ===== IMAGE LAZY LOAD FADE ===== */
img[loading="lazy"] {
  transition: opacity 0.5s ease;
}
img[loading="lazy"]:not(.loaded) {
  opacity: 0;
}
img[loading="lazy"].loaded {
  opacity: 1;
}
