/* ===== CUSTOM STYLES FOR THE GRIND ===== */

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

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

/* Selection */
::selection {
    background-color: rgba(94, 234, 212, 0.3);
    color: #0B1D3A;
}

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

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

.animate-fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

/* Scroll indicator */
@keyframes scrollIndicator {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(400%); }
}

.animate-scroll-indicator {
    animation: scrollIndicator 1.5s ease-in-out infinite;
}

/* ===== SCROLL REVEAL ===== */
.reveal-on-scroll {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-on-scroll[data-revealed="false"] {
    opacity: 0;
    transform: translateY(40px);
}

/* ===== NAVIGATION ===== */
#site-header {
    background: transparent;
    transition: background-color 0.5s ease, box-shadow 0.5s ease, backdrop-filter 0.5s ease;
}

#site-header.scrolled {
    background: rgba(7, 16, 32, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* ===== MOBILE MENU ===== */
#mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

#mobile-menu:not(.open) {
    opacity: 0;
    pointer-events: none;
}

/* Mobile menu icon transitions */
#menu-icon-open.active {
    opacity: 0;
    pointer-events: none;
}

#menu-icon-close:not(.active) {
    opacity: 0;
    pointer-events: none;
}

/* ===== GALLERY HOVER ===== */
.group:hover .group-hover\:scale-105 {
    transform: scale(1.05);
}

/* ===== SMOOTH SCROLL OFFSET ===== */
section[id] {
    scroll-margin-top: 80px;
}

/* ===== BUTTON FOCUS ===== */
a:focus-visible, button:focus-visible {
    outline: 2px solid #5EEAD4;
    outline-offset: 2px;
    border-radius: 9999px;
}

/* ===== REDUCED MOTION ===== */
@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-on-scroll {
        opacity: 1;
        transform: none;
    }
    
    .reveal-on-scroll[data-revealed="false"] {
        opacity: 1;
        transform: none;
    }
}

/* ===== RESPONSIVE TWEAKS ===== */
@media (max-width: 640px) {
    .font-serif {
        line-height: 1.1;
    }
    
    #hero h1 {
        font-size: 2.75rem;
    }
    
    #about h2, #menu h2, #gallery h2, #visit h2 {
        font-size: 2.25rem;
    }
}

@media (min-width: 641px) and (max-width: 1023px) {
    #hero h1 {
        font-size: 4.5rem;
    }
}
