/* ============================================
   The Candle Loft — Custom Styles
   ============================================ */

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

body {
    overflow-x: hidden;
}

/* Selection */
::selection {
    background-color: rgba(94, 234, 212, 0.3);
    color: #0A1628;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #0A1628;
}
::-webkit-scrollbar-thumb {
    background: #1E4976;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #5EEAD4;
}

/* ============================================
   Scroll Reveal Animations
   (Progressive enhancement — content visible without JS)
   ============================================ */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    }
    
    .reveal.revealed {
        opacity: 0;
        transform: translateY(40px);
        transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    }
    
    .reveal-delay-1 { transition-delay: 0.1s; }
    .reveal-delay-2 { transition-delay: 0.2s; }
    .reveal-delay-3 { transition-delay: 0.3s; }
    .reveal-delay-4 { transition-delay: 0.4s; }
    .reveal-delay-5 { transition-delay: 0.5s; }
}

/* Reduced motion: always show content */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* ============================================
   Scroll Indicator Animation
   ============================================ */
@keyframes scrollIndicator {
    0% { transform: translateY(-100%); opacity: 0; }
    50% { opacity: 1; }
    100% { transform: translateY(400%); opacity: 0; }
}

.animate-scroll-indicator {
    animation: scrollIndicator 1.5s ease-in-out infinite;
}

/* ============================================
   Flame Flicker Animation
   ============================================ */
@keyframes flicker {
    0%, 100% { opacity: 1; transform: scale(1) rotate(0deg); }
    25% { opacity: 0.9; transform: scale(1.02) rotate(-1deg); }
    50% { opacity: 0.95; transform: scale(0.98) rotate(1deg); }
    75% { opacity: 1; transform: scale(1.01) rotate(-0.5deg); }
}

.flame-flicker {
    animation: flicker 2s ease-in-out infinite;
    transform-origin: bottom center;
}

/* ============================================
   Floating Animation
   ============================================ */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

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

/* ============================================
   Navbar Active State
   ============================================ */
.nav-link.active {
    color: #5EEAD4 !important;
}

/* ============================================
   Mobile Menu Transitions
   ============================================ */
#mobile-menu {
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), pointer-events 0.1s;
}

#mobile-menu.open {
    opacity: 1;
    transform: translateY(0) !important;
    pointer-events: all;
}

/* ============================================
   Form Styles
   ============================================ */
.contact-form input,
.contact-form textarea {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    transition: border-color 0.3s ease, background 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: rgba(94, 234, 212, 0.5);
    background: rgba(255, 255, 255, 0.08);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

/* ============================================
   Success Message
   ============================================ */
.form-success {
    animation: fadeInUp 0.5s ease forwards;
}

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

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

/* ============================================
   Print Styles
   ============================================ */
@media print {
    header, footer, .no-print {
        display: none;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}
