/* Custom styles for Italian Legacy Stone & Tile */

/* Clip diagonal for hero */
.clip-diagonal {
    clip-path: polygon(30% 0, 100% 0, 100% 100%, 0% 100%);
}

/* Scroll line animation */
@keyframes scrollLine {
    0% {
        transform: scaleY(0);
        transform-origin: top;
    }
    50% {
        transform: scaleY(1);
        transform-origin: top;
    }
    51% {
        transform-origin: bottom;
    }
    100% {
        transform: scaleY(0);
        transform-origin: bottom;
    }
}

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

/* Nav text color transitions */
.nav-text {
    transition: color 0.3s ease;
}

/* Scroll reveal animations */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal[data-reveal] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

@media (prefers-reduced-motion: no-preference) {
    .reveal[data-reveal] {
        opacity: 0;
        transform: translateY(30px);
    }
}

/* Hero animations - above the fold, always visible */
#hero h1 {
    opacity: 1;
    transform: none;
}

#hero p {
    opacity: 1;
    transform: none;
}

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

/* Mobile menu active state */
.mobile-menu-active #mobile-menu {
    opacity: 1 !important;
    pointer-events: all !important;
}

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

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

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

/* Navbar scrolled state */
.nav-scrolled {
    background: rgba(254, 252, 251, 0.95) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
}

.nav-scrolled .nav-text {
    color: #1a1a1a !important;
}

.nav-scrolled .menu-line {
    background: #1a1a1a !important;
}

.nav-scrolled .nav-link {
    color: #4a4a4a !important;
}

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

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

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

/* Hover underline effect for nav links */
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: #722F37;
    transition: width 0.3s ease;
}

.nav-link {
    position: relative;
}

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

/* Image hover zoom */
.overflow-hidden img {
    transition: transform 0.7s ease;
}

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

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

::-webkit-scrollbar-thumb {
    background: #722F37;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #5c152b;
}

/* Selection color */
::selection {
    background: #722F37;
    color: white;
}
