/* Base styles and custom utilities */
html {
    scroll-behavior: smooth;
}

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

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

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

::-webkit-scrollbar-thumb {
    background: #047857;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #059669;
}

/* Selection color */
::selection {
    background: #047857;
    color: #FDFBF7;
}

/* Reveal animations - progressive enhancement */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal[data-reveal] {
    opacity: 0;
    transform: translateY(24px);
}

@media (prefers-reduced-motion: no-preference) {
    .reveal[data-reveal] {
        opacity: 0;
        transform: translateY(24px);
    }
}

/* Navbar styles */
.nav-link {
    position: relative;
}

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

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

/* Mobile menu */
#mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

#mobile-menu.closed {
    opacity: 0;
    pointer-events: none;
}

/* Image hover effects */
.aspect-square img,
.aspect-\[4\/5\] img {
    transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.aspect-square:hover img,
.aspect-\[4\/5\]:hover img {
    transform: scale(1.05);
}

/* Menu item hover */
.group:hover h4 {
    /* Handled by Tailwind hover:text-emerald-700 */
}

/* Button focus styles */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #047857;
    outline-offset: 2px;
    border-radius: 9999px;
}

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

/* Subtle pattern overlay for sections */
.bg-cream-100::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 1px 1px, rgba(4, 120, 87, 0.03) 1px, transparent 0);
    background-size: 24px 24px;
    pointer-events: none;
}

#about {
    position: relative;
}

/* Ensure map iframe has no rounded corners on left side */
iframe {
    border-radius: 0 1rem 1rem 0;
}

@media (max-width: 767px) {
    iframe {
        border-radius: 1rem;
    }
}
