/* ============================================
   D.W. Hannig L.S., P.C. — Custom Styles
   Premium Dark Luxury Theme
   ============================================ */

/* --- Custom Properties --- */
:root {
  --color-midnight-950: #0d1219;
  --color-midnight-900: #1a2332;
  --color-midnight-800: #263341;
  --color-midnight-700: #3a4a5c;
  --color-midnight-600: #505e73;
  --color-midnight-400: #8595ad;
  --color-midnight-300: #9fb3c8;
  --color-midnight-200: #bcccdc;
  --color-gold-500: #d4a745;
  --color-gold-400: #f5c563;
  --color-gold-300: #fcd68a;
  --color-mint-500: #2bc4ab;
  --color-mint-400: #4fd4c0;
}

/* --- Base --- */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  overflow-x: hidden;
}

/* --- Custom scrollbar --- */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--color-midnight-950);
}
::-webkit-scrollbar-thumb {
  background: var(--color-midnight-700);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-gold-500);
}

/* --- Selection --- */
::selection {
  background: rgba(212, 167, 69, 0.3);
  color: #f5c563;
}

/* --- Reveal Animations (progressive enhancement) --- */
/* Default state: visible for no-JS and reduced-motion */
.reveal {
  opacity: 1;
  transform: none;
  transition: none;
}

/* JS-enabled: apply animated state */
.js-enabled .reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.js-enabled .reveal.revealed {
  opacity: 1;
  transform: none;
}

/* Stagger children */
.js-enabled .reveal-delay-1 { transition-delay: 0.1s; }
.js-enabled .reveal-delay-2 { transition-delay: 0.2s; }
.js-enabled .reveal-delay-3 { transition-delay: 0.3s; }
.js-enabled .reveal-delay-4 { transition-delay: 0.4s; }

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .reveal,
  .js-enabled .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* --- Navbar transition --- */
#navbar.scrolled {
  background: rgba(13, 18, 25, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(212, 167, 69, 0.1);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

#navbar.scrolled .menu-line {
  background: #f5c563;
}

/* --- Mobile menu transitions --- */
#mobile-menu.open {
  transform: translateX(0);
}

/* Mobile menu button animation */
#menu-btn.active .menu-line:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
#menu-btn.active .menu-line:nth-child(2) {
  opacity: 0;
}
#menu-btn.active .menu-line:nth-child(3) {
  width: 100%;
  transform: rotate(-45deg) translate(5px, -5px);
}

/* --- Mobile link transitions --- */
.mobile-link {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease, color 0.3s ease;
}

#mobile-menu.open .mobile-link {
  opacity: 1;
  transform: none;
}

#mobile-menu.open .mobile-link:nth-child(1) { transition-delay: 0.1s; }
#mobile-menu.open .mobile-link:nth-child(2) { transition-delay: 0.15s; }
#mobile-menu.open .mobile-link:nth-child(3) { transition-delay: 0.2s; }
#mobile-menu.open .mobile-link:nth-child(4) { transition-delay: 0.25s; }
#mobile-menu.open .mobile-link:nth-child(5) { transition-delay: 0.3s; }

/* --- Form focus states --- */
input:focus,
select:focus,
textarea:focus {
  outline: none;
  box-shadow: 0 0 0 1px rgba(212, 167, 69, 0.2);
}

/* --- Input autofill override --- */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
  -webkit-text-fill-color: #f5c563;
  -webkit-box-shadow: 0 0 0px 1000px #1a2332 inset;
  transition: background-color 5000s ease-in-out 0s;
}

/* --- Smooth image loading --- */
img {
  display: block;
  max-width: 100%;
}

/* --- Map overlay --- */
.rounded-xl.overflow-hidden {
  position: relative;
}

/* --- Gold gradient text utility --- */
.text-gradient-gold {
  background: linear-gradient(135deg, #fcd68a 0%, #d4a745 50%, #b8860b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* --- Floating animation for hero card --- */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.floating {
  animation: float 4s ease-in-out infinite;
}

/* --- Pulse glow for CTA --- */
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 20px rgba(212, 167, 69, 0.3); }
  50% { box-shadow: 0 0 40px rgba(212, 167, 69, 0.6); }
}

.cta-glow:hover {
  animation: pulse-glow 2s ease-in-out infinite;
}

/* --- Responsive adjustments --- */
@media (max-width: 768px) {
  .font-serif {
    line-height: 1.1;
  }
}
