/* Custom styles for RPub Milford */

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

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

.animate-fade-in-up {
    animation: fadeInUp 0.7s ease-out forwards;
}

/* Reveal on scroll - progressive enhancement, only active with JS */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

/* Stat cards floating animation */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

.stat-card {
    animation: float 4s ease-in-out infinite;
}

.stat-card:nth-child(2) {
    animation-delay: 0.5s;
}

.stat-card:nth-child(3) {
    animation-delay: 1s;
}

/* Thin decorative lines */
.line-decor {
    position: relative;
}

.line-decor::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 48px;
    height: 1px;
    background-color: currentColor;
    opacity: 0.3;
}

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

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

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

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

/* Selection color */
::selection {
    background-color: #c7dfca;
    color: #111b13;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .stat-card {
        animation: none;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    .reveal {
        transition: none;
    }
    
    img {
        transition: none;
    }
}

/* Navbar scroll state */
nav.scrolled {
    border-bottom-color: rgba(214, 211, 209, 0.5);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
}

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

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

/* Focus styles for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid #74a175;
    outline-offset: 2px;
}
