/* ============================================
   COOSA CREEK — Custom Styles
   Clean Minimalist | Midnight Blue + Mint
   ============================================ */

/* --- Base & Typography --- */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

::selection {
    background-color: rgba(147, 223, 194, 0.3);
    color: #0f2b3c;
}

/* --- Hero Animation --- */
.hero-img {
    animation: heroZoom 20s ease-out forwards;
}

@keyframes heroZoom {
    0% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.hero-anim {
    animation: fadeUp 1s ease-out forwards;
    animation-delay: var(--delay, 0s);
}

.hero-anim:nth-child(1) { --delay: 0.2s; }
.hero-anim:nth-child(2) { --delay: 0.4s; }
.hero-anim:nth-child(3) { --delay: 0.6s; }
.hero-anim:nth-child(4) { --delay: 0.8s; }
.hero-anim:nth-child(5) { --delay: 1s; }

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

/* --- Scroll Line Animation --- */
.scroll-line {
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.3; transform: scaleY(0.5); transform-origin: top; }
    50% { opacity: 1; transform: scaleY(1); }
}

/* --- Scroll Reveal (Progressive Enhancement) --- */
@media (prefers-reduced-motion: no-preference) {
    .reveal-on-scroll {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                    transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }

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

    /* Stagger children */
    .reveal-on-scroll .grid > div {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                    transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }

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

    .reveal-on-scroll.is-visible .grid > div:nth-child(1) { transition-delay: 0.1s; }
    .reveal-on-scroll.is-visible .grid > div:nth-child(2) { transition-delay: 0.2s; }
    .reveal-on-scroll.is-visible .grid > div:nth-child(3) { transition-delay: 0.3s; }
    .reveal-on-scroll.is-visible .grid > div:nth-child(4) { transition-delay: 0.4s; }
}

/* --- Navbar Transition --- */
#navbar.scrolled {
    background-color: rgba(242, 252, 249, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(15, 43, 60, 0.06);
}

#navbar.scrolled .font-serif,
#navbar.scrolled .text-current {
    color: #0f2b3c !important;
}

#navbar.scrolled .text-white,
#navbar.scrolled .text-white\/70,
#navbar.scrolled .text-white\/50 {
    color: rgba(15, 43, 60, 0.7) !important;
}

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

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

#mobile-menu.open .mobile-link:nth-child(1) { transition-delay: 0.05s; }
#mobile-menu.open .mobile-link:nth-child(2) { transition-delay: 0.1s; }
#mobile-menu.open .mobile-link:nth-child(3) { transition-delay: 0.15s; }
#mobile-menu.open .mobile-link:nth-child(4) { transition-delay: 0.2s; }

/* --- Menu Toggle Animation --- */
#menu-toggle.active .menu-line:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

#menu-toggle.active .menu-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

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

/* --- Input Autofill --- */
input:-webkit-autofill,
textarea:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 30px #f2fcf9 inset !important;
    -webkit-text-fill-color: #0f2b3c !important;
    transition: background-color 0.3s ease;
}

/* --- Focus States --- */
input:focus,
textarea:focus,
button:focus {
    outline: none;
}

/* --- Smooth Image Loading --- */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* --- Subtle Hover Effects --- */
a {
    text-decoration: none;
}

/* --- Print Styles --- */
@media print {
    #navbar,
    #mobile-menu,
    .scroll-line {
        display: none;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}
