/* ===== Custom Styles for North Side Weekly Rental LLC ===== */

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

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Selection */
::selection {
    background: #a7f3d0;
    color: #064e3b;
}

/* ===== Floating Card Animations ===== */
.floating-card {
    animation: float 4s ease-in-out infinite;
}

.floating-card:nth-child(2) {
    animation-delay: -1.33s;
}

.floating-card:nth-child(3) {
    animation-delay: -2.66s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.animate-float-slow {
    animation-duration: 5s;
}

.animate-float-medium {
    animation-duration: 4s;
}

.animate-float-fast {
    animation-duration: 3s;
}

/* ===== Scroll Line Animation ===== */
@keyframes scroll-line {
    0% { top: -100%; }
    100% { top: 100%; }
}

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

/* ===== Scroll Reveal Animations ===== */
/* Default state: visible (progressive enhancement — content always renders) */
.reveal-up,
.reveal-left,
.reveal-right {
    opacity: 1;
    transform: none;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

/* When JS is ready and user prefers motion, add hidden initial state */
.js-ready:not(.reduced-motion) .reveal-up {
    opacity: 0;
    transform: translateY(30px);
}

.js-ready:not(.reduced-motion) .reveal-left {
    opacity: 0;
    transform: translateX(-30px);
}

.js-ready:not(.reduced-motion) .reveal-right {
    opacity: 0;
    transform: translateX(30px);
}

/* Active state (added by JS) */
.js-ready:not(.reduced-motion) .reveal-up.revealed,
.js-ready:not(.reduced-motion) .reveal-left.revealed,
.js-ready:not(.reduced-motion) .reveal-right.revealed {
    opacity: 1;
    transform: translate(0, 0);
}

/* ===== Navbar Scroll State ===== */
#navbar.scrolled {
    background: rgba(254, 253, 248, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(5, 150, 105, 0.08);
}

/* ===== Mobile Menu ===== */
#mobile-menu {
    animation: slideDown 0.3s ease;
}

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

.mobile-link {
    position: relative;
}

.mobile-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1.5px;
    background: #059669;
    transition: width 0.2s ease;
}

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

/* ===== Button Focus States ===== */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #059669;
    outline-offset: 2px;
    border-radius: 0.5rem;
}

/* ===== Image Loading ===== */
img {
    max-width: 100%;
    height: auto;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #34d399;
}

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

    .reveal-up,
    .reveal-left,
    .reveal-right {
        opacity: 1;
        transform: none;
    }
}

/* ===== Tablet ===== */
@media (max-width: 768px) {
    .floating-card {
        display: none;
    }
}

/* ===== Small Mobile ===== */
@media (max-width: 360px) {
    .font-serif {
        font-size: 1.5rem;
    }

    h1 {
        font-size: 2rem !important;
    }
}
