/* ============================================
   BC Iron Railing — Custom Styles
   ============================================ */

/* Base & Smooth Scrolling */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    overflow-x: hidden;
}

/* Selection Color */
::selection {
    background-color: #1a5f6e;
    color: #f6f7f8;
}

/* ============================================
   Reveal Animations
   ============================================ */
.reveal-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

/* Staggered children */
.stagger-children > * {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.stagger-children.visible > *:nth-child(1) { transition-delay: 0.05s; }
.stagger-children.visible > *:nth-child(2) { transition-delay: 0.1s; }
.stagger-children.visible > *:nth-child(3) { transition-delay: 0.15s; }
.stagger-children.visible > *:nth-child(4) { transition-delay: 0.2s; }
.stagger-children.visible > *:nth-child(5) { transition-delay: 0.25s; }
.stagger-children.visible > *:nth-child(6) { transition-delay: 0.3s; }

.stagger-children.visible > * {
    opacity: 1;
    transform: translateY(0);
}

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

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

#navbar.scrolled .font-serif {
    color: #1a5f6e !important;
}

/* ============================================
   Mobile Menu
   ============================================ */
#mobileMenu.open {
    opacity: 1;
    pointer-events: all;
}

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

#menuBtn.open #bar1 {
    transform: translateY(6px) rotate(45deg);
}

#menuBtn.open #bar2 {
    opacity: 0;
}

#menuBtn.open #bar3 {
    transform: translateY(-6px) rotate(-45deg);
}

.mobile-link {
    opacity: 0;
    transform: translateY(10px);
    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; }

/* ============================================
   Gallery Hover Effects
   ============================================ */
.group img {
    will-change: transform;
}

/* ============================================
   Form Styles
   ============================================ */
input:focus,
select:focus,
textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(26, 95, 110, 0.1);
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #154d58;
}

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (max-width: 640px) {
    html {
        scroll-padding-top: 70px;
    }

    .font-serif {
        line-height: 1.15;
    }
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
    #navbar,
    #mobileMenu,
    .reveal-up {
        display: none;
    }

    body {
        color: #111;
        background: white;
    }
}
