/* Custom styles for Mississippi Limestone Corporation */

:root {
    --font-serif: 'DM Serif Display', Georgia, serif;
    --font-sans: 'Inter', system-ui, sans-serif;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: var(--font-sans);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Hero gradient */
.hero {
    background: linear-gradient(135deg, #fefdf8 0%, #f0fdf4 50%, #dcfce7 100%);
}

/* Service card hover lift */
.service-card {
    transform: translateY(0);
}

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

/* Gallery item */
.gallery-item {
    cursor: pointer;
}

/* Mobile menu transition */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    opacity: 0;
}

#mobile-menu.open {
    max-height: 400px;
    opacity: 1;
}

/* Scroll reveal base - content always visible by default */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

/* Only apply hidden state when JS is enabled and motion is preferred */
@media (prefers-reduced-motion: no-preference) {
    .js-enabled .reveal {
        opacity: 0;
        transform: translateY(24px);
    }

    .js-enabled .reveal.visible {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Back to top button */
#back-to-top {
    transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.2s ease;
}

#back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Form focus styles */
input:focus,
select:focus,
textarea:focus {
    outline: none;
}

/* Selection color */
::selection {
    background-color: #86efac;
    color: #022c22;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #4ade80;
}

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

    .gallery-item img {
        transition: none;
    }

    .gallery-item:hover img {
        transform: none;
    }
}
