/* Custom Styles for Elgin State Hospital Cemetery */

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

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

/* Selection Color */
::selection {
    background-color: rgba(159, 37, 64, 0.2);
    color: #6a1c30;
}

/* Scroll Reveal Animations */
.scroll-reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    .scroll-reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Navbar Styles */
#navbar {
    background: transparent;
    transition: background-color 0.5s ease, box-shadow 0.5s ease, backdrop-filter 0.5s ease;
}

#navbar.scrolled {
    background: rgba(254, 252, 248, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.08);
}

#navbar.scrolled .font-serif,
#navbar.scrolled .text-stone-850 {
    color: #1c1917 !important;
}

/* Image Hover Effects */
img {
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Button Focus States */
button:focus-visible,
a:focus-visible {
    outline: 2px solid #db4a67;
    outline-offset: 2px;
    border-radius: 0.5rem;
}

/* Input Focus States */
input:focus-visible,
textarea:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(219, 74, 103, 0.2);
}

/* Smooth Scroll Offset for Fixed Header */
section[id] {
    scroll-margin-top: 80px;
}

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

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

::-webkit-scrollbar-thumb {
    background: #c23451;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #9f2540;
}

/* Loading Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hero Animation */
.hero-content {
    animation: fadeInUp 1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.hero-content > *:nth-child(1) { animation-delay: 0.1s; }
.hero-content > *:nth-child(2) { animation-delay: 0.3s; }
.hero-content > *:nth-child(3) { animation-delay: 0.5s; }
.hero-content > *:nth-child(4) { animation-delay: 0.7s; }

.hero-content > * {
    opacity: 0;
}

/* Mobile Menu Animation */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    opacity: 0;
}

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

/* Decorative Pattern */
.pattern-dots {
    background-image: radial-gradient(circle, rgba(159, 37, 64, 0.1) 1px, transparent 1px);
    background-size: 20px 20px;
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, #9f2540 0%, #c23451 50%, #ec748e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Card Hover Glow */
.card-glow:hover {
    box-shadow: 0 20px 60px -15px rgba(159, 37, 64, 0.2);
}

/* Image Container Shadow */
.img-shadow {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Responsive Typography */
@media (max-width: 768px) {
    .font-serif {
        line-height: 1.2;
    }
}

/* Print Styles */
@media print {
    #navbar,
    #mobile-menu-btn,
    button,
    form {
        display: none !important;
    }
    
    body {
        color: #000;
        background: #fff;
    }
    
    section {
        page-break-inside: avoid;
    }
}
