/* ============================================
   Brogan's Beauty and Barber — Custom Styles
   ============================================ */

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
}

/* ============================================
   Hero Animations
   ============================================ */
.hero-tag {
    animation: slideUp 0.8s ease forwards;
    animation-delay: 0.1s;
    opacity: 0;
}

.hero-title {
    animation: slideUp 0.8s ease forwards;
    animation-delay: 0.3s;
    opacity: 0;
}

.hero-desc {
    animation: slideUp 0.8s ease forwards;
    animation-delay: 0.5s;
    opacity: 0;
}

.hero-cta {
    animation: slideUp 0.8s ease forwards;
    animation-delay: 0.7s;
    opacity: 0;
}

.hero-stats {
    animation: slideUp 0.8s ease forwards;
    animation-delay: 0.9s;
    opacity: 0;
}

.main-hero-img {
    animation: fadeInScale 1s ease forwards;
    animation-delay: 0.4s;
    opacity: 0;
    transform: scale(0.95);
}

.floating-card {
    animation: floatIn 0.8s ease forwards;
    animation-delay: 1s;
    opacity: 0;
}

.accent-hero-img {
    animation: floatIn 0.8s ease forwards;
    animation-delay: 1.2s;
    opacity: 0;
}

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

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

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

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

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

/* ============================================
   Scroll Animations
   ============================================ */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }
.reveal-delay-6 { transition-delay: 0.6s; }

/* ============================================
   Section Styles
   ============================================ */
.section-tag {
    letter-spacing: 0.25em;
}

.section-title {
    letter-spacing: -0.02em;
}

.section-desc {
    letter-spacing: 0.01em;
}

/* ============================================
   Navbar
   ============================================ */
#navbar {
    background: transparent;
    transition: background 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

#navbar.scrolled {
    background: rgba(253, 248, 240, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.06);
}

/* Mobile Menu */
.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.mobile-menu-open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

.mobile-menu-open .mobile-link:nth-child(1) { transition-delay: 0.1s; }
.mobile-menu-open .mobile-link:nth-child(2) { transition-delay: 0.15s; }
.mobile-menu-open .mobile-link:nth-child(3) { transition-delay: 0.2s; }
.mobile-menu-open .mobile-link:nth-child(4) { transition-delay: 0.25s; }

/* Menu Button */
.menu-line {
    transition: all 0.3s ease;
}

#menuBtn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

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

#menuBtn.active .menu-line:nth-child(3) {
    width: 20px;
    transform: rotate(-45deg) translate(4px, -4px);
}

/* ============================================
   Service Cards
   ============================================ */
.service-card {
    border: 1px solid transparent;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card:hover {
    border-color: rgba(192, 96, 60, 0.1);
}

/* ============================================
   Gallery
   ============================================ */
.gallery-item {
    cursor: pointer;
}

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

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

/* ============================================
   CTA Section
   ============================================ */
.cta-tag {
    letter-spacing: 0.25em;
}

/* ============================================
   Contact Form
   ============================================ */
select option {
    background: #FDF8F0;
    color: #4D3029;
}

/* ============================================
   Back to Top
   ============================================ */
.back-to-top {
    transition: opacity 0.3s ease, transform 0.3s ease, background 0.3s ease;
}

.back-to-top.show {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.back-to-top.hide {
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 767px) {
    .hero-title {
        font-size: 2.75rem;
    }

    .section-title {
        font-size: 2.25rem;
    }

    .cta-title {
        font-size: 2.25rem;
    }

    .floating-card {
        position: relative;
        bottom: auto;
        left: auto;
        margin-top: 1rem;
        display: inline-flex;
    }

    .accent-hero-img {
        display: none;
    }
}

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

/* ============================================
   Focus & Accessibility
   ============================================ */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid #C0603C;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
    .back-to-top,
    .scroll-indicator,
    #navbar {
        display: none;
    }

    body {
        background: white;
        color: black;
    }
}
