/* ============================================
   Mae Skin and Body Spray — Custom Styles
   ============================================ */

/* 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 {
    background: rgba(45, 106, 79, 0.15);
    color: #1a3a2a;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #f5f0e8;
}
::-webkit-scrollbar-thumb {
    background: #b9d1bb;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #8fb892;
}

/* ============================================
   Navigation
   ============================================ */
#nav {
    background: rgba(250, 248, 245, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(185, 209, 187, 0.3);
}

#nav.scrolled {
    background: rgba(250, 248, 245, 0.95);
    box-shadow: 0 1px 0 rgba(185, 209, 187, 0.3);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    width: 0;
    height: 1px;
    background: #2d6a4f;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

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

/* Mobile menu */
.mobile-link {
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.4s 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; }

#mobileMenu.closing .mobile-link {
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

/* Hamburger animation */
.menu-line {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#menuToggle.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(3px, 3px);
}
#menuToggle.active .menu-line:nth-child(2) {
    opacity: 0;
    width: 0;
}
#menuToggle.active .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(3px, -3px);
    width: 1.25rem;
}

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

.hero-title {
    animation: fadeUp 0.8s ease 0.15s forwards;
    opacity: 0;
    transform: translateY(20px);
}

.hero-subtitle {
    animation: fadeUp 0.8s ease 0.3s forwards;
    opacity: 0;
    transform: translateY(20px);
}

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

/* Floating cards */
.card-float-1 {
    animation: float1 6s ease-in-out infinite;
}

.card-float-2 {
    animation: float2 5s ease-in-out infinite;
}

.card-float-3 {
    animation: float3 7s ease-in-out infinite;
}

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

@keyframes float1 {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-12px) rotate(0.5deg); }
}

@keyframes float2 {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

@keyframes float3 {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(-0.5deg); }
}

@keyframes float4 {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-6px); }
}

/* ============================================
   Service Cards
   ============================================ */
.service-card {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease, border-color 0.5s ease, box-shadow 0.5s ease;
}

.service-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.service-card:nth-child(1) { transition-delay: 0s; }
.service-card:nth-child(2) { transition-delay: 0.08s; }
.service-card:nth-child(3) { transition-delay: 0.16s; }
.service-card:nth-child(4) { transition-delay: 0.24s; }
.service-card:nth-child(5) { transition-delay: 0.32s; }
.service-card:nth-child(6) { transition-delay: 0.4s; }

/* ============================================
   Process Steps
   ============================================ */
.process-step {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.process-step.visible {
    opacity: 1;
    transform: translateY(0);
}

.process-step:nth-child(1) { transition-delay: 0s; }
.process-step:nth-child(2) { transition-delay: 0.15s; }
.process-step:nth-child(3) { transition-delay: 0.3s; }

/* ============================================
   General reveal animation
   ============================================ */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* ============================================
   Form styling
   ============================================ */
select option {
    background: #f5f0e8;
    color: #1a3a2a;
}

/* ============================================
   Focus visible for accessibility
   ============================================ */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid #2d6a4f;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ============================================
   Responsive adjustments
   ============================================ */
@media (max-width: 767px) {
    .hero-title {
        font-size: 2.5rem !important;
    }

    #hero {
        min-height: auto;
        padding: 8rem 0 4rem;
    }

    section {
        padding: 4rem 0 !important;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .hero-title {
        font-size: 3.5rem !important;
    }
}
