/* Custom styles for Simply Planted */

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

/* Focus styles */
*:focus-visible {
    outline: 2px solid #72a06e;
    outline-offset: 2px;
}

/* Nav link underline animation */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #72a06e;
    transition: width 0.3s ease;
}

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

/* Mobile nav link */
.mobile-nav-link {
    display: block;
}

/* Scroll reveal base — visible by default, JS adds hidden state */
.reveal-up,
.reveal-left,
.reveal-right {
    opacity: 1;
    transform: none;
}

/* Only animate when JS is active and user prefers motion */
@media (prefers-reduced-motion: no-preference) {
    .reveal-up {
        transform: translateY(24px);
    }
    .reveal-left {
        transform: translateX(-24px);
    }
    .reveal-right {
        transform: translateX(24px);
    }

    .js-ready .reveal-up,
    .js-ready .reveal-left,
    .js-ready .reveal-right {
        transition: opacity 0.6s ease, transform 0.6s ease;
    }

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

/* Reduced motion — no animations */
@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;
    }
}

/* Header scroll state */
header.scrolled {
    background: rgba(250, 249, 246, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(30, 58, 106, 0.08);
}

header.scrolled .nav-link {
    color: #1e2a4a;
}

/* Form focus states */
input:focus,
select:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(114, 160, 110, 0.15);
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #faf9f6;
}
::-webkit-scrollbar-thumb {
    background: #a8c4e2;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #7ca5d3;
}

/* Selection color */
::selection {
    background: #c5d7be;
    color: #1e2a4a;
}
