/* Custom styles for Robot Bar */

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

/* Ensure content is visible before JS loads (progressive enhancement) */
.js-enabled .reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

/* Reveal animations — only applied when JS adds the .active class */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 1;
        transform: translateY(0);
    }

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

/* Navbar scroll state */
#navbar.scrolled {
    background: rgba(2, 6, 23, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* Mobile menu transitions */
#mobile-menu {
    animation: slideDown 0.3s ease;
}

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

/* Mobile link hover */
.mobile-link {
    display: block;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.mobile-link:last-child {
    border-bottom: none;
}

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

::-webkit-scrollbar-track {
    background: #0f172a;
}

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

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

/* Selection color */
::selection {
    background: rgba(13, 148, 136, 0.3);
    color: #f8fafc;
}

/* Image loading placeholder */
img {
    background-color: #1e293b;
}

/* Focus styles for accessibility */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #2dd4bf;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Subtle card hover lift */
.reveal:hover {
    transform: translateY(-2px);
}

/* Map container aspect ratio */
#visit .rounded-2xl {
    position: relative;
}

/* Ensure hero text is readable on all screens */
@media (max-width: 640px) {
    #hero h1 {
        font-size: 2.75rem;
        line-height: 1.1;
    }

    #hero p {
        font-size: 1.05rem;
    }
}

/* Reduce motion for users who prefer it */
@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;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }
}
