/* Custom styles for Breezy Pines Lake Cottage */

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

/* Reveal animations */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-fade {
    opacity: 0;
    animation: fadeIn 1s cubic-bezier(0.16, 1, 0.3, 1) 0.5s forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* Hero text reveal */
.reveal-text {
    transform: translateY(100%);
    opacity: 0;
    animation: revealText 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.reveal-text:nth-child(1) { animation-delay: 0.1s; }
.reveal-text:nth-child(2) { animation-delay: 0.25s; }
.reveal-text:nth-child(3) { animation-delay: 0.4s; }
.reveal-text:nth-child(4) { animation-delay: 0.55s; }

@keyframes revealText {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.reveal-line {
    transform: scaleX(0);
    transform-origin: left;
    animation: expandLine 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.7s forwards;
}

@keyframes expandLine {
    to {
        transform: scaleX(1);
    }
}

/* Navbar styles */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: currentColor;
    transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Navbar scroll state */
.navbar-scrolled {
    background: rgba(250, 248, 244, 0.95) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(26, 60, 42, 0.08);
}

/* Mobile menu */
.mobile-nav-link {
    position: relative;
}

/* Image hover effect */
img {
    will-change: transform;
}

/* Custom selection color */
::selection {
    background: rgba(26, 60, 42, 0.2);
    color: #1a3c2a;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }

    .reveal-on-scroll {
        opacity: 1;
        transform: none;
    }

    .reveal-text {
        transform: none;
        opacity: 1;
    }

    .reveal-line {
        transform: scaleX(1);
    }

    .reveal-fade {
        animation: none;
        opacity: 1;
    }
}

/* Mobile menu transitions */
#mobile-menu {
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

#mobile-menu.open {
    transform: translateX(0);
}

/* Hamburger animation */
#hamburger span {
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

#mobile-menu-btn.active #hamburger span:nth-child(1) {
    transform: translateY(3px) rotate(45deg);
}

#mobile-menu-btn.active #hamburger span:nth-child(2) {
    opacity: 0;
}

#mobile-menu-btn.active #hamburger span:nth-child(3) {
    transform: translateY(-3px) rotate(-45deg);
    width: 1.5rem;
}

/* Form focus styles */
input:focus,
textarea:focus,
select:focus {
    outline: none;
}

/* Button hover lift */
button[type="submit"] {
    position: relative;
    overflow: hidden;
}

button[type="submit"]:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(26, 60, 42, 0.3);
}

button[type="submit"]:active {
    transform: translateY(0);
}

/* Aspect ratio helper */
.aspect-square {
    aspect-ratio: 1 / 1;
}

/* Gallery hover */
#gallery .overflow-hidden {
    position: relative;
}

#gallery .overflow-hidden::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(26, 60, 42, 0);
    transition: background 0.3s ease;
    pointer-events: none;
}

#gallery .overflow-hidden:hover::after {
    background: rgba(26, 60, 42, 0.05);
}
