/* ==========================================
   SIBLEY NUTRITION — Custom Styles
   ========================================== */

/* Base */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    margin: 0;
    overflow-x: hidden;
}

/* Skip Link */
.skip-link {
    position: absolute;
    top: -100%;
    left: 1rem;
    z-index: 100;
    padding: 0.75rem 1.5rem;
    background: #c8956c;
    color: #1a0e09;
    font-weight: 600;
    text-decoration: none;
    border-radius: 0 0 4px 4px;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 0;
}

/* Navbar */
#navbar {
    background: transparent;
    transition: background 0.5s ease, backdrop-filter 0.5s ease, box-shadow 0.5s ease;
}

#navbar.scrolled {
    background: rgba(14, 12, 11, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(200, 149, 108, 0.08);
}

.nav-link {
    position: relative;
}

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

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

/* Mobile Menu */
#mobile-menu {
    z-index: 40;
}

#mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

#mobile-menu.open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

#mobile-menu.open .mobile-link:nth-child(1) { transition-delay: 0.1s; }
#mobile-menu.open .mobile-link:nth-child(2) { transition-delay: 0.15s; }
#mobile-menu.open .mobile-link:nth-child(3) { transition-delay: 0.2s; }
#mobile-menu.open .mobile-link:nth-child(4) { transition-delay: 0.25s; }
#mobile-menu.open .mobile-link:nth-child(5) { transition-delay: 0.3s; }

/* Menu Toggle */
.menu-line {
    display: block;
    transition: all 0.3s ease;
}

#menu-toggle[aria-expanded="true"] .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(3px, 3px);
}

#menu-toggle[aria-expanded="true"] .menu-line:nth-child(2) {
    opacity: 0;
}

#menu-toggle[aria-expanded="true"] .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(3px, -3px);
    width: 1.5rem;
}

/* Scroll Dot Animation */
@keyframes scrollDot {
    0% { top: 0; opacity: 1; }
    100% { top: 100%; opacity: 0; }
}

.scroll-dot {
    animation: scrollDot 1.5s ease-in-out infinite;
}

/* Scroll Reveal Animations */
/* These are applied by JS — default state is visible */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* 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 {
        opacity: 1;
        transform: none;
    }
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #4a4338;
}

/* Selection */
::selection {
    background: rgba(200, 149, 108, 0.3);
    color: #f7f5f3;
}

/* Image aspect ratios */
img {
    max-width: 100%;
    height: auto;
}

/* Focus styles */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #c8956c;
    outline-offset: 2px;
}
