/* Cherry's Garden — 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;
}

/* Hero Animations — only for elements with .hero-anim class */
.hero-anim {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.js-enabled .hero-anim {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.js-enabled .hero-anim:nth-child(1) { transition-delay: 0.1s; }
.js-enabled .hero-anim:nth-child(2) { transition-delay: 0.25s; }
.js-enabled .hero-anim:nth-child(3) { transition-delay: 0.4s; }
.js-enabled .hero-anim:nth-child(4) { transition-delay: 0.55s; }
.js-enabled .hero-anim:nth-child(5) { transition-delay: 0.7s; }

/* Scroll Reveal — progressive enhancement, only active with JS */
.js-enabled .reveal-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Navbar transition */
#navbar.scrolled {
    background: rgba(61, 43, 31, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
}

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

/* Hamburger animation */
#menu-btn.active #line1 {
    transform: rotate(45deg) translate(5px, 5px);
}

#menu-btn.active #line2 {
    opacity: 0;
}

#menu-btn.active #line3 {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .hero-anim,
    .reveal-on-scroll,
    .mobile-link,
    #line1, #line2, #line3 {
        transition: none !important;
        animation: none !important;
    }
    .hero-anim {
        opacity: 1 !important;
        transform: none !important;
    }
    .reveal-on-scroll {
        opacity: 1 !important;
        transform: none !important;
    }
    html {
        scroll-behavior: auto;
    }
}

/* Selection color */
::selection {
    background: #d44a25;
    color: #FAF6F0;
}

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

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

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

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

/* Image hover container */
.aspect-square, .aspect-\[4\/5\] {
    will-change: transform;
}

/* Smooth focus outlines */
a:focus-visible, button:focus-visible {
    outline: 2px solid #d44a25;
    outline-offset: 2px;
    border-radius: 4px;
}
