/* ============================================
   CrepEscape & A la Folie — Custom Styles
   ============================================ */

/* Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    overflow-x: hidden;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #020610;
}

::-webkit-scrollbar-thumb {
    background: rgba(72, 201, 155, 0.3);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(72, 201, 155, 0.5);
}

/* Selection */
::selection {
    background: rgba(72, 201, 155, 0.3);
    color: #F0FBF7;
}

/* ============================================
   Navigation
   ============================================ */
#navbar {
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
}

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

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: #48C99B;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Mobile Menu */
#mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

#mobile-menu.open .mobile-link {
    animation: fadeUp 0.4s ease forwards;
    opacity: 1;
}

#mobile-menu .mobile-link {
    opacity: 0;
}

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

/* Hamburger */
#menu-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg);
    top: 11px;
}

#menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

#menu-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg);
    top: 11px;
}

/* ============================================
   Hero Animations
   ============================================ */
.hero-subtitle {
    animation: slideUp 0.8s ease forwards;
}

.hero-title {
    animation: slideUp 0.8s ease 0.15s forwards;
    opacity: 0;
}

.hero-desc {
    animation: slideUp 0.8s ease 0.3s forwards;
    opacity: 0;
}

.hero-cta {
    animation: slideUp 0.8s ease 0.45s forwards;
    opacity: 0;
}

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

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

/* Scroll Dot */
@keyframes scrollDot {
    0% {
        top: 0;
        opacity: 1;
    }
    100% {
        top: 48px;
        opacity: 0;
    }
}

.scroll-dot {
    animation: scrollDot 1.5s ease-in-out infinite;
}

/* ============================================
   Reveal Animations (Below the Fold)
   ============================================ */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

.reveal-hidden {
    opacity: 0;
    transform: translateY(30px);
}

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

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

/* ============================================
   Reduced Motion
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    .reveal-hidden {
        opacity: 1;
        transform: none;
    }
}

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