/* ============================================
   Ash&Olive Salon — Custom Styles
   ============================================ */

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

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

body {
    margin: 0;
    overflow-x: hidden;
}

::selection {
    background-color: rgba(232, 98, 78, 0.15);
    color: #2D2D2D;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #FAFAF8;
}
::-webkit-scrollbar-thumb {
    background: #CCCCCC;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #AAAAAA;
}

/* --- Hero Animations --- */
.hero-leave {
    opacity: 0;
    transform: translateY(24px);
    animation: heroLeave 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.hero-leave:nth-child(2) { animation-delay: 0.12s; }
.hero-leave:nth-child(3) { animation-delay: 0.24s; }
.hero-leave:nth-child(4) { animation-delay: 0.36s; }

.hero-enter {
    opacity: 0;
    transform: translateX(40px);
    animation: heroEnter 1s cubic-bezier(0.22, 1, 0.36, 1) 0.2s forwards;
}

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

@keyframes heroEnter {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

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

.scroll-reveal[data-delay="1"] { transition-delay: 0.1s; }
.scroll-reveal[data-delay="2"] { transition-delay: 0.2s; }
.scroll-reveal[data-delay="3"] { transition-delay: 0.3s; }
.scroll-reveal[data-delay="4"] { transition-delay: 0.4s; }
.scroll-reveal[data-delay="5"] { transition-delay: 0.5s; }

/* Reduced motion: disable all scroll animations */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .scroll-reveal { opacity: 1; transform: none; transition: none; }
    .hero-leave, .hero-enter { opacity: 1; transform: none; animation: none; }
    .group img { transition: none; }
}

/* --- Navbar Scroll State --- */
.navbar-scrolled {
    background: rgba(250, 250, 248, 0.92) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

.navbar-scrolled .nav-text {
    color: #2D2D2D !important;
}

.navbar-scrolled .nav-link {
    color: #4A4A4A !important;
}

/* --- Mobile Menu --- */
.mobile-menu-open {
    opacity: 1 !important;
    pointer-events: auto !important;
}

#bar1.open {
    transform: translateY(4px) rotate(45deg);
}
#bar2.open {
    opacity: 0;
    width: 0;
}
#bar3.open {
    transform: translateY(-4px) rotate(-45deg);
}

/* --- Link hover underlines --- */
.nav-link {
    position: relative;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1.5px;
    background: #E8624E;
    transition: width 0.3s ease;
}
.nav-link:hover::after {
    width: 100%;
}

/* --- Card hover glow --- */
.group:hover .card-glow {
    opacity: 1;
}

/* --- Image zoom on hover --- */
.group img {
    transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

/* --- Button ripple effect --- */
button, a {
    position: relative;
    overflow: visible;
}

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

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

.mobile-menu-open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}
.mobile-menu-open .mobile-link:nth-child(1) { transition-delay: 0.05s; }
.mobile-menu-open .mobile-link:nth-child(2) { transition-delay: 0.1s; }
.mobile-menu-open .mobile-link:nth-child(3) { transition-delay: 0.15s; }
.mobile-menu-open .mobile-link:nth-child(4) { transition-delay: 0.2s; }
.mobile-menu-open .mobile-link:nth-child(5) { transition-delay: 0.25s; }
.mobile-menu-open .mobile-link:nth-child(6) { transition-delay: 0.3s; }

/* --- Back to top --- */
#back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* --- Form select arrow override --- */
select {
    background-image: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="%23888888" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"%3E%3Cpolyline points="6 9 12 15 18 9"%3E%3C/polyline%3E%3C/svg%3E');
}

/* --- Print styles --- */
@media print {
    nav, #back-to-top, .scroll-reveal { display: none; }
    body { color: #000; background: #fff; }
    a { color: #000; }
}
