/* ============================================
   MADISON ALTERATIONS — Custom Styles
   ============================================ */

/* Base & Typography */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

/* Selection Color */
::selection {
    background-color: rgba(212, 175, 55, 0.3);
    color: #0a1628;
}

/* ============================================
   NAVBAR
   ============================================ */
#navbar {
    transition: background-color 0.5s ease, backdrop-filter 0.5s ease, box-shadow 0.5s ease;
}

#navbar.scrolled {
    background-color: rgba(10, 22, 40, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
}

.nav-logo-text {
    transition: color 0.5s ease;
}

/* ============================================
   HERO ANIMATIONS
   ============================================ */
.hero-anim {
    opacity: 0;
    transform: translateY(30px);
    animation: heroFadeIn 0.8s ease forwards;
}

.hero-anim:nth-child(1) { animation-delay: 0.2s; }
.hero-anim:nth-child(2) { animation-delay: 0.4s; }
.hero-anim:nth-child(3) { animation-delay: 0.6s; }
.hero-anim:nth-child(4) { animation-delay: 0.8s; }

@keyframes heroFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll indicator line animation */
.scroll-line {
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.4; transform: scaleY(1); }
    50% { opacity: 1; transform: scaleY(1.2); }
}

/* ============================================
   SCROLL REVEAL (Progressive Enhancement)
   ============================================ */
@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal {
        opacity: 0;
        transform: translateY(40px);
        transition: opacity 0.7s ease, transform 0.7s ease;
    }

    .scroll-reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }

    /* Staggered delays */
    .scroll-reveal:nth-child(1) { transition-delay: 0.05s; }
    .scroll-reveal:nth-child(2) { transition-delay: 0.15s; }
    .scroll-reveal:nth-child(3) { transition-delay: 0.25s; }
    .scroll-reveal:nth-child(4) { transition-delay: 0.35s; }
    .scroll-reveal:nth-child(5) { transition-delay: 0.45s; }
    .scroll-reveal:nth-child(6) { transition-delay: 0.55s; }
}

/* Fallback: always visible when JS is disabled or reduced motion preferred */
@media (prefers-reduced-motion: reduce) {
    .scroll-reveal {
        opacity: 1;
        transform: none;
    }
}

/* ============================================
   BUTTONS & LINKS
   ============================================ */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid rgba(212, 175, 55, 0.6);
    outline-offset: 2px;
}

/* ============================================
   SELECT STYLING
   ============================================ */
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='%231a2744' 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 1rem center;
    padding-right: 2.5rem;
}

/* ============================================
   IMAGE HOVER EFFECTS
   ============================================ */
img {
    display: block;
    max-width: 100%;
}

/* ============================================
   RESPONSIVE TWEAKS
   ============================================ */
@media (max-width: 768px) {
    .font-serif {
        line-height: 1.15;
    }
}

/* ============================================
   SUBTLE GRADIENT BACKGROUNDS
   ============================================ */
.bg-gradient-navy {
    background: linear-gradient(135deg, #0a1628 0%, #1a2744 100%);
}

/* ============================================
   CARD SHADOWS
   ============================================ */
.card-elevated {
    box-shadow: 0 4px 20px rgba(10, 22, 40, 0.06);
}

.card-elevated:hover {
    box-shadow: 0 12px 40px rgba(10, 22, 40, 0.12);
}

/* ============================================
   GOLD ACCENT UTILITIES
   ============================================ */
.text-gold-gradient {
    background: linear-gradient(135deg, #d4af37, #c9a227);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================
   MOBILE MENU TRANSITIONS
   ============================================ */
#mobile-menu {
    animation: slideDown 0.3s ease;
}

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