/* ============================================
   The Pit Stop Barbershop — Custom Styles
   ============================================ */

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    overflow-x: hidden;
}

::selection {
    background-color: rgba(5, 150, 105, 0.2);
    color: #064e3b;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #ecfdf5;
}
::-webkit-scrollbar-thumb {
    background: #059669;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #047857;
}

/* --- Navigation --- */
.nav {
    background: rgba(254, 253, 248, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(6, 78, 59, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav.scrolled {
    background: rgba(254, 253, 248, 0.95);
    box-shadow: 0 4px 30px rgba(6, 78, 59, 0.08);
}

.nav.scrolled .nav-logo-text {
    color: #065f46;
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #059669;
    transition: width 0.3s ease;
    border-radius: 1px;
}

.nav-link:hover::after {
    width: 100%;
}

/* --- Buttons --- */
.btn-primary {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: white;
    font-weight: 600;
    border-radius: 1rem;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(5, 150, 105, 0.3);
    border: none;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(5, 150, 105, 0.4);
    background: linear-gradient(135deg, #047857 0%, #065f46 100%);
    color: white;
    text-decoration: none;
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    color: white;
    font-weight: 600;
    border-radius: 1rem;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    color: white;
    text-decoration: none;
}

.btn-primary-white {
    background: white;
    color: #065f46;
    font-weight: 600;
    border-radius: 1rem;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border: none;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary-white:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    color: #065f46;
    text-decoration: none;
}

.btn-secondary-light {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    color: white;
    font-weight: 600;
    border-radius: 1rem;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-secondary-light:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    color: white;
    text-decoration: none;
}

/* --- Hero --- */
.hero {
    position: relative;
    background: linear-gradient(135deg, #064e3b 0%, #065f46 50%, #047857 100%);
}

.hero-bg {
    position: absolute;
    inset: 0;
}

.hero-bg img {
    filter: brightness(0.4);
}

.hero-overlay {
    background: linear-gradient(
        135deg,
        rgba(6, 78, 59, 0.85) 0%,
        rgba(4, 120, 87, 0.75) 50%,
        rgba(5, 150, 105, 0.65) 100%
    );
}

.hero-content {
    animation: heroFadeIn 1s ease-out forwards;
}

.hero-badge {
    animation: heroFadeIn 1s ease-out 0.2s both;
}

.hero-headline {
    animation: heroFadeIn 1s ease-out 0.4s both;
}

.hero-subtext {
    animation: heroFadeIn 1s ease-out 0.6s both;
}

.hero-cta {
    animation: heroFadeIn 1s ease-out 0.8s both;
}

.hero-stats {
    animation: heroFadeIn 1s ease-out 1s both;
}

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

.hero-scroll {
    animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
    0%, 100% { transform: translate(-50%, 0); }
    50% { transform: translate(-50%, 10px); }
}

.scroll-indicator {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
}

/* --- Section Headers --- */
.section-tag {
    font-size: 0.8125rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.section-title {
    line-height: 1.15;
}

.section-subtitle {
    line-height: 1.7;
}

/* --- Service Cards --- */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #059669, #34d399);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 3px 3px 0 0;
}

.service-card:hover::before {
    transform: scaleX(1);
}

/* --- Gallery --- */
.gallery-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(6, 78, 59, 0.3) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.4s ease;
    border-radius: inherit;
}

.gallery-item:hover::after {
    opacity: 1;
}

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

/* --- Contact Form --- */
.form-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #065f46;
}

.form-input {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.9375rem;
    color: #064e3b;
}

.form-input::placeholder {
    color: #a7f3d0;
}

.form-input:focus {
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1);
}

.form-input option {
    color: #064e3b;
}

/* --- Mobile Menu --- */
.mobile-menu {
    animation: mobileMenuSlide 0.3s ease-out;
}

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

.mobile-menu-link {
    position: relative;
    padding-left: 0;
    transition: padding-left 0.3s ease;
}

.mobile-menu-link:hover {
    padding-left: 0.75rem;
    color: #059669;
}

.mobile-menu-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 2px;
    background: #059669;
    transition: width 0.3s ease;
}

.mobile-menu-link:hover::before {
    width: 4px;
}

/* --- Mobile Menu Button --- */
.mobile-menu-btn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-btn.active .menu-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active .menu-line:nth-child(3) {
    width: 24px;
    transform: rotate(-45deg) translate(5px, -5px);
}

/* --- Footer --- */
.footer a {
    text-decoration: none;
}

/* --- Scroll Reveal Animations --- */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Reduced 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;
    }
    
    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* --- Responsive --- */
@media (max-width: 767px) {
    .hero-headline {
        font-size: 2.5rem;
    }
    
    .hero-stats {
        gap: 1.5rem;
    }
    
    .hero-stat {
        flex: 1;
    }
    
    .about-img-float {
        position: relative;
        bottom: auto;
        right: auto;
        margin-top: 1rem;
        width: 100%;
        height: 200px;
    }
    
    .about-badge {
        position: relative;
        top: auto;
        left: auto;
        display: inline-block;
        margin-bottom: 1rem;
    }
    
    .gallery-item.col-span-2 {
        grid-column: span 1;
    }
    
    .form-row {
        grid-template-columns: 1fr !important;
    }
    
    .footer-grid {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
    }
    
    .footer-grid .lg\\:col-span-2 {
        grid-column: span 1 !important;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .hero-headline {
        font-size: 3.5rem;
    }
}

@media (min-width: 1024px) {
    .hero-headline {
        font-size: 4rem;
    }
}
