/* Custom styles for Benito's Hair Styling */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Base typography */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Hero animations - above the fold, always visible */
.hero-anim {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.hero-anim:nth-child(1) { transition-delay: 0.1s; }
.hero-anim:nth-child(2) { transition-delay: 0.3s; }
hero-anim:nth-child(3) { transition-delay: 0.5s; }
.hero-anim:nth-child(4) { transition-delay: 0.7s; }

/* Reveal animations - below the fold only */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.7s ease, transform 0.7s ease;
    }
    
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fallback: ensure revealed content is visible if JS doesn't run */
@supports not (animation-name: reveal) {
    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* Navbar scroll state */
.navbar-scrolled {
    background: rgba(250, 248, 245, 0.95) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
}

.navbar-scrolled .nav-link {
    color: rgba(26, 26, 26, 0.8) !important;
}

.navbar-scrolled #nav-logo {
    color: #822828 !important;
}

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

/* Menu lines animation */
.menu-open .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

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

.menu-open .menu-line:nth-child(3) {
    width: 6px;
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Image hover effects */
img {
    display: block;
    max-width: 100%;
}

/* Selection color */
::selection {
    background: #c53030;
    color: #fdf8f6;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #9b2c2c;
}

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

/* Button hover lift effect */
button, a {
    transition: all 0.3s ease;
}

/* Prevent layout shift on images */
img {
    content-visibility: auto;
}
