/* Custom styles for Pete's Irish Barber Shop */

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

/* Custom animations */
@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(2deg); }
}

@keyframes float-delay {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(-2deg); }
}

@keyframes float-slow {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes scroll-line {
    0% { opacity: 0; transform: scaleY(0); transform-origin: top; }
    50% { opacity: 1; transform: scaleY(1); transform-origin: top; }
    51% { transform-origin: bottom; }
    100% { opacity: 0; transform: scaleY(0); transform-origin: bottom; }
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

.animate-float-delay {
    animation: float-delay 8s ease-in-out infinite;
}

.animate-float-slow {
    animation: float-slow 5s ease-in-out infinite;
}

.animate-scroll-line {
    animation: scroll-line 2s ease-in-out infinite;
}

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

.reveal-hidden {
    opacity: 0;
    transform: translateY(30px);
}

@media (prefers-reduced-motion: no-preference) {
    .reveal-hidden {
        opacity: 0;
        transform: translateY(30px);
    }
    
    .reveal-visible {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Navbar styles */
.nav-scrolled {
    background: rgba(254, 253, 248, 0.95) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(54, 80, 41, 0.08);
}

.nav-scrolled .font-serif {
    color: #2c4022 !important;
}

/* Mobile menu */
.mobile-menu-open {
    opacity: 1 !important;
    pointer-events: all !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) {
    transform: rotate(-45deg) translate(5px, -5px);
    width: 24px;
    margin-left: 0;
}

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

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

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

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

/* Selection color */
::selection {
    background: #c7dabb;
    color: #2c4022;
}

/* Form focus styles */
input:focus,
select:focus,
textarea:focus {
    outline: none;
}

/* Image hover zoom */
.group:hover img {
    transform: scale(1.05);
}

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

/* Card lift effect */
.group {
    will-change: transform;
}

/* Hero text gradient for special words */
.text-gradient {
    background: linear-gradient(135deg, #5c8242 0%, #7da362 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Gallery image transition */
.rounded-2xl overflow-hidden {
    overflow: hidden;
}

.rounded-2xl img {
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Service card hover */
.group:hover {
    transform: translateY(-4px);
}

/* Custom select arrow */
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='%235c8242' 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");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    appearance: none;
    -webkit-appearance: none;
}

/* Reduce motion */
@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;
    }
}
