/* ── Custom overrides & enhancements ── */

/* Smooth focus outlines for accessibility */
:focus-visible {
    outline: 2px solid #8ab595;
    outline-offset: 2px;
}

/* Selection color */
::selection {
    background: #8ab595;
    color: #0a170e;
}

/* Subtle image fade-in for non-animated environments */
img {
    display: block;
}

/* Ensure serif headings render cleanly */
.font-serif {
    text-wrap: pretty;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1 !important;
        transform: none !important;
    }
    html {
        scroll-behavior: auto;
    }
    .group img {
        transition: none;
    }
    .group:hover img {
        transform: none;
    }
}

/* Mobile menu animation */
#mobile-menu {
    animation: fadeIn 0.3s ease forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

#mobile-menu a {
    animation: slideUp 0.4s ease forwards;
    opacity: 0;
}

#mobile-menu a:nth-child(1) { animation-delay: 0.1s; }
#mobile-menu a:nth-child(2) { animation-delay: 0.15s; }
#mobile-menu a:nth-child(3) { animation-delay: 0.2s; }
#mobile-menu a:nth-child(4) { animation-delay: 0.25s; }
#mobile-menu a:nth-child(5) { animation-delay: 0.3s; }
#mobile-menu a:nth-child(6) { animation-delay: 0.35s; }

@keyframes slideUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Hamburger animation */
#menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
#menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(2) {
    opacity: 0;
}
#menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(3) {
    width: 6px;
    transform: rotate(-45deg) translate(5px, -5px);
}
