/* Pacific Cottage Motel — Custom Styles */

/* Base & Typography */
html {
    scroll-behavior: smooth;
}

body {
    font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Selection Color */
::selection {
    background-color: rgba(201, 168, 76, 0.3);
    color: #0f172a;
}

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

::-webkit-scrollbar-track {
    background: #0f172a;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #b8943e;
}

/* Navbar Transition */
#navbar.scrolled {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(201, 168, 76, 0.1);
}

#navbar.scrolled .nav-logo-text {
    color: #ffffff;
}

/* 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;
}

/* Marquee Animation */
@keyframes marquee {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.animate-marquee {
    animation: marquee 40s linear infinite;
}

.animate-marquee:hover {
    animation-play-state: paused;
}

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

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

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

/* Hamburger Animation */
#menu-toggle.active #menu-line-1 {
    transform: translateY(7px) rotate(45deg);
}

#menu-toggle.active #menu-line-2 {
    opacity: 0;
    transform: translateX(-10px);
}

#menu-toggle.active #menu-line-3 {
    transform: translateY(-7px) rotate(-45deg);
}

/* Fade In Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
}

.fade-in-up.delay-1 { animation-delay: 0.1s; }
.fade-in-up.delay-2 { animation-delay: 0.2s; }
.fade-in-up.delay-3 { animation-delay: 0.3s; }
.fade-in-up.delay-4 { animation-delay: 0.4s; }

/* Input Autofill Styling */
input:-webkit-autofill,
textarea:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 30px #f5f0e8 inset !important;
    -webkit-text-fill-color: #0f172a !important;
}

/* Focus Visible */
*:focus-visible {
    outline: 2px solid #c9a84c;
    outline-offset: 2px;
}

/* Image Loading */
img {
    opacity: 1;
    transition: opacity 0.3s ease;
}

img[data-src] {
    opacity: 0;
}

/* Responsive Typography */
@media (max-width: 640px) {
    .font-serif {
        line-height: 1.1;
    }
}

/* Print Styles */
@media print {
    #navbar, #back-to-top, .animate-marquee {
        display: none !important;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}

/* Reduced Motion */
@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;
    }
    
    .animate-marquee {
        animation: none;
    }
}
