/* ============================================
   Danita Renee's Natural Beauty — Custom Styles
   ============================================ */

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

body {
    overflow-x: hidden;
}

::selection {
    background-color: rgba(13, 148, 136, 0.2);
    color: #0f766e;
}

/* ============================================
   Animations (progressive enhancement)
   ============================================ */

/* Hero entrance animations — only apply when JS is active */
@media (prefers-reduced-motion: no-preference) {
    @keyframes fadeInUp {
        from {
            opacity: 0;
            transform: translateY(30px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    @keyframes fadeIn {
        from { opacity: 0; }
        to { opacity: 1; }
    }

    @keyframes scrollLine {
        0% { transform: scaleY(0); transform-origin: top; }
        50% { transform: scaleY(1); transform-origin: top; }
        51% { transform-origin: bottom; }
        100% { transform: scaleY(0); transform-origin: bottom; }
    }

    .animate-fade-in-up {
        animation: fadeInUp 0.8s ease-out forwards;
    }

    .animate-fade-in {
        animation: fadeIn 1s ease-out forwards;
    }

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

/* Scroll reveal animations — progressive enhancement */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 1;
        transform: translateY(0);
        transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    }

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

    .reveal[data-delay="100"] { transition-delay: 0.1s; }
    .reveal[data-delay="200"] { transition-delay: 0.2s; }
    .reveal[data-delay="300"] { transition-delay: 0.3s; }
    .reveal[data-delay="400"] { transition-delay: 0.4s; }
}

/* Fallback: ensure content is visible even without JS */
.no-js .reveal,
:root:not(.js-enabled) .reveal {
    opacity: 1 !important;
    transform: none !important;
}

/* ============================================
   Section Shared Styles
   ============================================ */
.section-eyebrow {
    display: block;
}

.section-headline {
    /* Default state visible without JS */
    opacity: 1;
}

/* ============================================
   Navbar
   ============================================ */
#navbar {
    background: transparent;
}

#navbar.scrolled {
    background: rgba(2, 6, 23, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05);
}

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

#navbar.scrolled .nav-logo-text {
    color: #ffffff;
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    width: 0;
    height: 1px;
    background: #2dd4bf;
    transition: width 0.3s ease, left 0.3s ease;
}

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

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

#mobile-menu.closed {
    opacity: 0;
    pointer-events: none;
}

.mobile-nav-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

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

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

/* Hamburger animation */
#mobile-menu-btn.active .hamburger span:nth-child(1) {
    transform: rotate(45deg) translate(3px, 3px);
}

#mobile-menu-btn.active .hamburger span:nth-child(2) {
    opacity: 0;
}

#mobile-menu-btn.active .hamburger span:nth-child(3) {
    transform: rotate(-45deg) translate(3px, -3px);
}

/* ============================================
   Service Cards
   ============================================ */
.service-card {
    /* Default visible state for no-JS */
    opacity: 1;
}

/* ============================================
   Gallery Items
   ============================================ */
.gallery-item {
    aspect-ratio: 1;
    cursor: pointer;
}

.gallery-item.col-span-2 {
    aspect-ratio: auto;
}

/* ============================================
   Testimonial Cards
   ============================================ */
.testimonial-card {
    /* Default visible state */
    opacity: 1;
}

/* ============================================
   Contact Form
   ============================================ */
select option {
    background: #ffffff;
    color: #1e293b;
}

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (max-width: 767px) {
    .section-headline {
        font-size: 2.5rem;
    }

    #hero h1 {
        font-size: 3rem;
    }

    @media (min-width: 480px) {
        #hero h1 {
            font-size: 3.5rem;
        }
    }

    @media (min-width: 640px) {
        #hero h1 {
            font-size: 4.5rem;
        }
    }
}

@media (min-width: 768px) {
    .section-headline {
        font-size: 3.5rem;
    }
}

@media (min-width: 1024px) {
    .section-headline {
        font-size: 4rem;
    }
}

/* ============================================
   Accessibility
   ============================================ */
@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;
    }
}

/* Focus visible for keyboard navigation */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #14b8a6;
    outline-offset: 2px;
    border-radius: 4px;
}

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

    body {
        color: #000;
        background: #fff;
    }
}
