/* Custom styles for Matcal */

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

/* Base font settings */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

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

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

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

/* Menu lines animation */
#menu-toggle.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(3px, 3px);
}

#menu-toggle.active .menu-line:nth-child(2) {
    opacity: 0;
}

#menu-toggle.active .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(3px, -3px);
    width: 1.5rem;
}

/* Scroll reveal base - content always visible by default */
.reveal-section {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

/* Only apply hidden state when JS is active and motion is preferred */
@media (prefers-reduced-motion: no-preference) {
    .reveal-section[data-reveal="hidden"] {
        opacity: 0;
        transform: translateY(24px);
    }
    
    .reveal-section[data-reveal="visible"] {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Navbar background on scroll */
#navbar.scrolled {
    background-color: rgba(5, 10, 24, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* Image hover effects */
img {
    transition: transform 0.7s ease;
}

/* Selection color */
::selection {
    background-color: rgba(200, 150, 46, 0.3);
    color: white;
}

/* Subtle hover on menu items */
.group:hover h3 {
    transform: translateX(4px);
    transition: transform 0.3s ease;
}

/* Focus styles */
a:focus-visible,
button:focus-visible {
    outline: 1px solid rgba(200, 150, 46, 0.5);
    outline-offset: 4px;
}

/* Mobile menu link hover */
.mobile-link {
    position: relative;
}

.mobile-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 1px;
    background-color: currentColor;
    transition: width 0.3s ease;
}

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