/* ===== Custom Styles for The Bearcave ===== */

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

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

/* Vertical text utility */
.writing-vertical-rl {
    writing-mode: vertical-rl;
    text-orientation: mixed;
}

/* Navbar transitions */
#navbar.scrolled {
    background-color: rgba(254, 253, 248, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(20, 83, 45, 0.08);
}

#navbar.scrolled .menu-line {
    background-color: #14532d;
}

/* Mobile menu */
.mobile-link {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Menu tabs */
.menu-tab {
    background: transparent;
    color: #14532d;
    border: 2px solid rgba(20, 83, 45, 0.15);
    cursor: pointer;
}

.menu-tab:hover {
    border-color: rgba(20, 83, 45, 0.4);
    background: rgba(20, 83, 45, 0.04);
}

.menu-tab.active {
    background: #166534;
    color: #fefdf8;
    border-color: #166534;
}

/* Menu content transitions */
.menu-content {
    animation: fadeIn 0.4s ease forwards;
}

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

/* Scroll reveal base - content is VISIBLE by default */
.reveal {
    /* Default state: fully visible */
}

/* Scroll reveal - enhanced with JS / prefers-reduced-motion */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 1;
        transform: translateY(0);
        transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    }
    
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Button focus states */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #16a34a;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Image hover transitions */
img {
    display: block;
    max-width: 100%;
}

/* Selection color */
::selection {
    background-color: #166534;
    color: #fefdf8;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #14532d;
}

/* Mobile menu animations */
#mobileMenu.open {
    transform: translateX(0);
}

/* Hamburger animation */
.menu-line {
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

#menuToggle.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

#menuToggle.active .menu-line:nth-child(2) {
    opacity: 0;
    transform: translateX(-8px);
}

#menuToggle.active .menu-line:nth-child(3) {
    width: 24px;
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Print styles */
@media print {
    #navbar, #mobileMenu, .reveal {
        display: none !important;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}
