/* ============================================
   Apothecary Salon & Spa — Custom Styles
   ============================================ */

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

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

body {
    background-color: #020617;
    color: #ffffff;
}

/* Selection */
::selection {
    background-color: rgba(16, 185, 129, 0.3);
    color: #ffffff;
}

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

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

::-webkit-scrollbar-thumb {
    background: rgba(16, 185, 129, 0.3);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(16, 185, 129, 0.5);
}

/* ============================================
   Animations
   ============================================ */

/* Slide Up */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-slideUp {
    animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Fade In */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.animate-fadeIn {
    animation: fadeIn 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Float */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-12px);
    }
}

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

/* Scroll Line */
@keyframes scrollLine {
    0% {
        top: -12px;
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        top: 100%;
        opacity: 0;
    }
}

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

/* ============================================
   Reveal on Scroll
   ============================================ */

.reveal {
    opacity: 0;
    transform: translateY(30px);
    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: 1;
    transform: translateY(0);
}

.reveal.revealed:nth-child(2) { transition-delay: 0.1s; }
.reveal.revealed:nth-child(3) { transition-delay: 0.2s; }
.reveal.revealed:nth-child(4) { transition-delay: 0.3s; }
.reveal.revealed:nth-child(5) { transition-delay: 0.4s; }

/* ============================================
   Navigation
   ============================================ */

#navbar {
    transition: background-color 0.4s ease, backdrop-filter 0.4s ease, padding 0.4s ease;
}

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

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

#mobileMenu.open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

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

/* Menu lines animation */
.menu-line {
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

#menuBtn.active .menu-line:first-child {
    transform: rotate(45deg) translate(3px, 3px);
}

#menuBtn.active .menu-line:last-child {
    transform: rotate(-45deg) translate(3px, -3px);
    width: 24px !important;
}

/* ============================================
   Service Cards
   ============================================ */

.service-card {
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.service-card:hover {
    transform: translateY(-4px);
}

/* ============================================
   Form Styles
   ============================================ */

select option {
    background-color: #0f172a;
    color: #ffffff;
}

input:focus, select:focus, textarea:focus {
    outline: none;
}

/* ============================================
   Utility
   ============================================ */

/* Thin decorative line */
.line-accent {
    width: 1px;
    height: 60px;
    background: linear-gradient(to bottom, transparent, rgba(16, 185, 129, 0.4), transparent);
}

/* ============================================
   Responsive
   ============================================ */

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

@media (max-width: 640px) {
    html {
        scroll-padding-top: 80px;
    }
}
