/* ===== Custom Styles for Eastern Therapeutic Massage ===== */

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

body {
    font-family: 'Lato', 'Helvetica Neue', Arial, sans-serif;
}

/* Selection Color */
::selection {
    background-color: #832a44;
    color: #fefdfc;
}

/* ===== Animations ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.animate-fade-in-up {
    animation: fadeInUp 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.animate-fade-in {
    animation: fadeIn 1s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* Scroll Reveal */
.scroll-reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1), transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

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

.scroll-reveal.revealed:nth-child(2) { transition-delay: 0.1s; }
.scroll-reveal.revealed:nth-child(3) { transition-delay: 0.2s; }

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

#navbar.scrolled {
    background: rgba(254, 253, 252, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(131, 42, 68, 0.08);
}

#navbar.scrolled .nav-logo-color {
    color: #832a44;
}

#navbar.scrolled .nav-text-color {
    color: #6a2339;
}

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

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

.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.1s; }
#mobileMenu.open .mobile-link:nth-child(2) { transition-delay: 0.15s; }
#mobileMenu.open .mobile-link:nth-child(3) { transition-delay: 0.2s; }
#mobileMenu.open .mobile-link:nth-child(4) { transition-delay: 0.25s; }
#mobileMenu.open .mobile-link:nth-child(5) { transition-delay: 0.3s; }
#mobileMenu.open .mobile-link:nth-child(6) { transition-delay: 0.35s; }

/* Menu button animation */
.menu-line {
    transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

body.menu-open .menu-line:nth-child(1) {
    transform: translateY(4px) rotate(45deg);
}

body.menu-open .menu-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

body.menu-open .menu-line:nth-child(3) {
    transform: translateY(-4px) rotate(-45deg);
    width: 1.5rem;
}

/* ===== Button Hover Effects ===== */
a[href="#services"], a[href="#about"], a[href="#experience"], a[href="#contact"] {
    position: relative;
}

/* ===== Image Hover ===== */
.group:hover .group-hover\:scale-105 {
    transform: scale(1.05);
}

/* ===== Custom Scrollbar ===== */
::-webkit-scrollbar {
    width: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: #d4a0aa;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a33450;
}

/* ===== Focus Styles ===== */
input:focus, select:focus, textarea:focus {
    outline: none;
}

/* ===== Select Arrow ===== */
select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23a33450' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.75rem center;
    background-repeat: no-repeat;
    background-size: 1.25em 1.25em;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* ===== Smooth Image Loading ===== */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* ===== Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    .scroll-reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    
    .animate-fade-in-up, .animate-fade-in {
        animation: none;
        opacity: 1;
    }
    
    .group:hover .group-hover\:scale-105 {
        transform: none;
    }
    
    * {
        transition-duration: 0.01ms !important;
    }
}

/* ===== Tablet ===== */
@media (max-width: 767px) {
    .font-display.text-4xl {
        font-size: 2rem;
        line-height: 1.1;
    }
}

/* ===== Print ===== */
@media print {
    #navbar, #mobileMenu {
        display: none;
    }
    
    body {
        color: #000;
        background: #fff;
    }
    
    section {
        page-break-inside: avoid;
    }
}
