/* ============================================
   The Brow Bar — Custom Styles
   ============================================ */

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

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

body {
    overflow-x: hidden;
}

::selection {
    background-color: #782F2F;
    color: #fff;
}

/* ---------- Navbar ---------- */
#navbar {
    transition: background-color 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

#navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 30px rgba(0, 0, 0, 0.08);
}

#navbar.scrolled .nav-link {
    color: #1f2937;
}

#navbar.scrolled .nav-link:hover {
    color: #782F2F;
}

#navbar.scrolled .nav-link span {
    background-color: #782F2F;
}

#navbar.scrolled .logo-text {
    color: #782F2F;
}

/* ---------- Mobile Menu ---------- */
#mobileMenu {
    transition: opacity 0.4s ease, pointer-events 0.4s ease;
}

#mobileMenu.open {
    opacity: 1;
    pointer-events: all;
}

#mobileMenu.closed {
    opacity: 0;
    pointer-events: none;
}

/* Menu hamburger animation */
.menu-line {
    transition: transform 0.3s ease, opacity 0.3s ease, width 0.3s ease;
}

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

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

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

.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease, color 0.3s ease;
}

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

#mobileMenu.open .mobile-link:nth-child(1) { transition-delay: 0.1s; }
#mobileMenu.open .mobile-link:nth-child(2) { transition-delay: 0.15s; }
#mobileMenu.open .mobile-link:nth-child(3) { transition-delay: 0.2s; }
#mobileMenu.open .mobile-link:nth-child(4) { transition-delay: 0.25s; }
#mobileMenu.open .mobile-link:nth-child(5) { transition-delay: 0.3s; }
#mobileMenu.open .mobile-link:nth-child(6) { transition-delay: 0.35s; }

/* ---------- Hero Animations ---------- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(60px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

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

@keyframes scrollLine {
    0% { transform: scaleY(0); transform-origin: top; opacity: 0; }
    50% { opacity: 1; }
    100% { transform: scaleY(1); transform-origin: top; opacity: 0; }
}

.hero-badge {
    animation: fadeInUp 0.8s ease forwards;
    animation-delay: 0.2s;
    opacity: 0;
}

.hero-image {
    animation: scaleIn 1s ease forwards;
    animation-delay: 0.3s;
    opacity: 0;
}

.hero-float-card {
    animation: float 4s ease-in-out infinite;
    animation-delay: 1.5s;
}

/* Hero content animation delays */
#hero h1 {
    animation: fadeInUp 0.8s ease forwards;
    animation-delay: 0.4s;
    opacity: 0;
}

#hero p {
    animation: fadeInUp 0.8s ease forwards;
    animation-delay: 0.6s;
    opacity: 0;
}

#hero .flex.flex-col {
    animation: fadeInUp 0.8s ease forwards;
    animation-delay: 0.8s;
    opacity: 0;
}

#hero .mt-12 {
    animation: fadeInUp 0.8s ease forwards;
    animation-delay: 1s;
    opacity: 0;
}

/* Scroll line animation */
@keyframes scrollLineAnim {
    0% { transform: scaleY(0); transform-origin: top; opacity: 0; }
    30% { opacity: 1; }
    70% { opacity: 1; }
    100% { transform: scaleY(1); transform-origin: bottom; opacity: 0; }
}

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

/* ---------- Scroll Reveal ---------- */
.section-reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* Hidden state for reduced motion — progressive enhancement handled in JS */
@media (prefers-reduced-motion: no-preference) {
    .section-reveal {
        opacity: 0;
        transform: translateY(30px);
    }
    .section-reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ---------- Service Cards ---------- */
.service-card {
    transition: transform 0.5s ease, box-shadow 0.5s ease;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 60px rgba(120, 47, 47, 0.2);
}

/* ---------- Gallery Items ---------- */
.gallery-item {
    transition: transform 0.5s ease, box-shadow 0.5s ease;
}

.gallery-item:hover {
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

/* ---------- Testimonial Cards ---------- */
.testimonial-card {
    transition: transform 0.5s ease, background-color 0.5s ease;
}

.testimonial-card:hover {
    transform: translateY(-5px);
}

/* ---------- Back to Top ---------- */
#backToTop {
    transition: opacity 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

#backToTop.visible {
    opacity: 1;
    pointer-events: all;
}

#backToTop:not(.visible) {
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
}

/* ---------- Input Focus States ---------- */
input:focus,
select:focus,
textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(120, 47, 47, 0.1);
}

/* ---------- Utility ---------- */
.text-shadow {
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

/* ---------- Print Styles ---------- */
@media print {
    #navbar, #backToTop, .animate-scroll-line {
        display: none;
    }
}
