/* Custom styles for Lagalo Flooring */

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

/* Base styles */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Selection color */
::selection {
    background-color: rgba(52, 196, 120, 0.2);
    color: #0a1820;
}

/* Navbar transitions */
#navbar {
    transition: background-color 0.5s ease, box-shadow 0.5s ease, padding 0.5s ease;
}

#navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 0 rgba(10, 24, 32, 0.06);
}

#navbar.scrolled .menu-line {
    background-color: #0a1820;
}

#navbar.scrolled a:not([class*="bg-"]) {
    color: #1a3450;
}

/* Hero animations - above the fold, always visible */
.hero-badge {
    animation: fadeInDown 0.8s ease-out both;
}

#hero h1 {
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

#hero p {
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

#hero .flex-col {
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

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

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

/* Scroll reveal - progressive enhancement, only below fold */
.reveal {
    /* Default state: visible, no animation */
}

@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(20px);
        transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    }
    
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

/* Mobile menu link transitions */
.mobile-link {
    opacity: 0;
    transform: translateY(12px);
    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.05s; }
#mobileMenu.open .mobile-link:nth-child(2) { transition-delay: 0.1s; }
#mobileMenu.open .mobile-link:nth-child(3) { transition-delay: 0.15s; }
#mobileMenu.open .mobile-link:nth-child(4) { transition-delay: 0.2s; }
#mobileMenu.open .mobile-link:nth-child(5) { transition-delay: 0.25s; }

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

body.menu-open .menu-line:nth-child(1) {
    transform: translateY(4px) rotate(45deg);
}

body.menu-open .menu-line:nth-child(2) {
    opacity: 0;
}

body.menu-open .menu-line:nth-child(3) {
    transform: translateY(-4px) rotate(-45deg);
    width: 1.5rem;
    margin-left: 0;
}

/* Subtle hover underline for links */
a:hover {
    text-decoration: none;
}

/* Image aspect ratio helpers */
.aspect-\[4\/3\] {
    aspect-ratio: 4 / 3;
}

.aspect-\[4\/5\] {
    aspect-ratio: 4 / 5;
}

/* Thin line decoration */
.line-accent {
    width: 48px;
    height: 1px;
    background: linear-gradient(to right, #34c478, transparent);
}
