/* ============================================
   Kingston Farmers Market — Custom Styles
   ============================================ */

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

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

::selection {
    background-color: rgba(161, 29, 62, 0.15);
    color: #3d0a16;
}

/* --- Navigation --- */
.nav {
    transition: box-shadow 0.3s ease;
}

.nav.scrolled {
    box-shadow: 0 1px 0 rgba(161, 29, 62, 0.1);
}

.nav-links .nav-link {
    position: relative;
}

.nav-links .nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: currentColor;
    transition: width 0.3s ease;
}

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

/* Mobile menu toggle */
.nav-toggle.active .nav-bar:first-child {
    transform: rotate(45deg) translate(3px, 3px);
}

.nav-toggle.active .nav-bar:last-child {
    transform: rotate(-45deg) translate(3px, -3px);
}

.mobile-menu {
    animation: slideDown 0.3s ease forwards;
}

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

.mobile-link {
    position: relative;
    display: block;
    padding: 8px 0;
}

/* --- Hero --- */
.hero-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
    padding-bottom: 3rem;
}

@media (min-width: 1024px) {
    .hero-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.hero-eyebrow {
    animation: fadeUp 0.8s ease forwards;
    opacity: 0;
}

.hero-headline {
    animation: fadeUp 0.8s ease 0.1s forwards;
    opacity: 0;
}

.hero-subtitle {
    animation: fadeUp 0.8s ease 0.2s forwards;
    opacity: 0;
}

.hero-cta {
    animation: fadeUp 0.8s ease 0.3s forwards;
    opacity: 0;
}

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

.hero-img-main {
    position: relative;
}

.hero-img-main-img {
    box-shadow: 0 25px 50px -12px rgba(61, 10, 22, 0.15);
}

.hero-img-secondary {
    box-shadow: 0 20px 40px -12px rgba(61, 10, 22, 0.2);
}

/* --- Buttons --- */
.btn-primary,
.btn-secondary,
.btn-light,
.btn-dark {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.8rem;
    font-weight: 400;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 0;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid transparent;
}

.btn-primary {
    background-color: #851c38;
    color: #fef0ec;
    border-color: #851c38;
}

.btn-primary:hover {
    background-color: #6f1b33;
    border-color: #6f1b33;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(61, 10, 22, 0.2);
}

.btn-primary .btn-arrow {
    transition: transform 0.3s ease;
}

.btn-primary:hover .btn-arrow {
    transform: translate(3px, -3px);
}

.btn-secondary {
    background-color: transparent;
    color: #851c38;
    border-color: #851c38;
}

.btn-secondary:hover {
    background-color: #851c38;
    color: #fef0ec;
    transform: translateY(-1px);
}

.btn-light {
    background-color: #fef0ec;
    color: #851c38;
    border-color: #fef0ec;
}

.btn-light:hover {
    background-color: #fad0d9;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-light .btn-arrow-light {
    transition: transform 0.3s ease;
}

.btn-light:hover .btn-arrow-light {
    transform: translate(3px, -3px);
}

.btn-dark {
    background-color: #3d0a16;
    color: #fef0ec;
    border-color: #3d0a16;
}

.btn-dark:hover {
    background-color: #6f1b33;
    border-color: #6f1b33;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(61, 10, 22, 0.3);
}

.btn-dark .btn-arrow-dark {
    transition: transform 0.3s ease;
}

.btn-dark:hover .btn-arrow-dark {
    transform: translate(3px, -3px);
}

/* --- Dividers --- */
.divider-line {
    transition: opacity 0.3s ease;
}

/* --- Reveal Animations --- */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Reduced motion */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
    }

    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Vendor Cards --- */
.vendor-card {
    transition: transform 0.3s ease;
}

.vendor-card:hover {
    transform: translateY(-4px);
}

.vendor-card-img {
    height: 220px;
}

@media (min-width: 768px) {
    .vendor-card-img {
        height: 250px;
    }
}

/* --- Community Images --- */
.community-img-stack {
    position: relative;
}

.community-img-stack-main {
    box-shadow: 0 25px 50px -12px rgba(61, 10, 22, 0.15);
}

.community-img-stack-secondary {
    box-shadow: 0 20px 40px -12px rgba(61, 10, 22, 0.2);
}

@media (max-width: 1023px) {
    .community-img-stack-secondary {
        position: relative;
        bottom: auto;
        left: auto;
        margin-top: 1rem;
    }
}

/* --- Contact Form --- */
.form-label {
    transition: color 0.3s ease;
}

.form-input {
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-input:focus {
    border-color: #a11d3e;
    box-shadow: 0 0 0 3px rgba(161, 29, 62, 0.08);
}

.form-input::placeholder {
    color: #fad0d9;
}

.form-success {
    animation: fadeIn 0.4s ease forwards;
}

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

/* --- Contact Info Links --- */
.contact-item a {
    text-decoration: none;
}

/* --- Footer --- */
footer a {
    text-decoration: none;
}

/* --- Utility --- */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}
