/* Custom styles for Rockwall Barber Company */

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

/* Hide scrollbar for clean look */
::-webkit-scrollbar {
    width: 8px;
}

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

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

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

/* Navigation transitions */
.nav-text {
    transition: color 0.3s ease;
}

.nav-text-sub {
    transition: color 0.3s ease;
}

.nav-btn {
    transition: all 0.3s ease;
}

/* Hero animations */
.hero-anim {
    opacity: 1;
    transform: translateY(0);
    animation: heroFadeIn 0.8s ease forwards;
}

.hero-anim:nth-child(2) {
    animation-delay: 0.2s;
}

.hero-anim:nth-child(3) {
    animation-delay: 0.4s;
}

.hero-anim:nth-child(4) {
    animation-delay: 0.6s;
}

@keyframes heroFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll reveal animations - progressive enhancement */
.scroll-reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal {
        opacity: 0;
        transform: translateY(40px);
    }
    
    .scroll-reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Service card hover effect */
.group:hover .group-hover\:bg-terracotta-600 {
    background-color: #b86454;
}

/* Focus styles for accessibility */
input:focus,
select:focus,
textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(184, 100, 84, 0.2);
}

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

/* Mobile menu transitions */
#mobile-menu {
    transition: max-height 0.3s ease, opacity 0.3s ease;
}

#mobile-menu.hidden {
    max-height: 0;
    opacity: 0;
}

#mobile-menu:not(.hidden) {
    max-height: 500px;
    opacity: 1;
}

/* Image hover zoom */
img {
    transition: transform 0.5s ease;
}

img:hover {
    transform: scale(1.05);
}

/* Prevent layout shift on images */
img {
    max-width: 100%;
    height: auto;
}

/* Ensure all text is readable */
.text-dark-900,
.text-dark-800,
.text-sand-100,
.text-sand-200 {
    color: inherit;
}

/* Ensure contrast on buttons */
button,
a {
    cursor: pointer;
}

/* Custom selection color */
::selection {
    background-color: #b86454;
    color: #fdfcfa;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* Loading state for form */
button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Success message animation */
#form-success {
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
