/* ========================================
   Duneland Ballroom — Custom Styles
   ======================================== */

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

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

body {
    overflow-x: hidden;
}

/* Selection Color */
::selection {
    background-color: #d4a017;
    color: #150f1a;
}

/* ========================================
   Hero Animations
   ======================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation-name: fadeInUp;
    animation-duration: 0.8s;
    animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
    animation-iteration-count: 1;
}

/* Scroll Line Animation */
@keyframes scrollLine {
    0% {
        opacity: 0;
        transform: scaleY(0);
        transform-origin: top;
    }
    50% {
        opacity: 1;
        transform: scaleY(1);
        transform-origin: top;
    }
    51% {
        transform-origin: bottom;
    }
    100% {
        opacity: 0;
        transform: scaleY(0);
        transform-origin: bottom;
    }
}

.animate-scroll-line {
    animation: scrollLine 2s ease-in-out infinite;
}

/* ========================================
   Scroll Reveal (Progressive Enhancement)
   Only active when JS is enabled and
   user prefers motion
   ======================================== */
@media (prefers-reduced-motion: no-preference) {
    .reveal-on-scroll {
        opacity: 1;
        transform: translateY(0);
        transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                    transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .reveal-on-scroll.revealed {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                    transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    }
}

/* Fallback: always visible if JS disabled */
@media not all and (prefers-reduced-motion: no-preference) {
    .reveal-on-scroll {
        opacity: 1;
        transform: none;
    }
}

/* ========================================
   Navbar Transition
   ======================================== */
#navbar.scrolled {
    background-color: rgba(21, 15, 26, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(140, 115, 140, 0.15);
}

#navbar.scrolled .font-serif {
    color: #f9f5f9 !important;
}

/* ========================================
   Custom Scrollbar
   ======================================== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #150f1a;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #8a6b8a;
}

/* ========================================
   Form Focus Styles
   ======================================== */
input:focus,
select:focus,
textarea:focus {
    outline: none;
}

/* ========================================
   Mobile Menu Animation
   ======================================== */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                opacity 0.3s ease;
    opacity: 0;
}

#mobile-menu.open {
    max-height: 400px;
    opacity: 1;
}

/* ========================================
   Image Loading Placeholder
   ======================================== */
img {
    background: linear-gradient(135deg, #e8d8e8 0%, #f3ecf3 100%);
}

/* ========================================
   Print Styles
   ======================================== */
@media print {
    #navbar,
    .animate-scroll-line,
    #mobile-menu-btn {
        display: none !important;
    }

    body {
        background: white !important;
        color: black !important;
    }

    section {
        page-break-inside: avoid;
    }
}
