/* ===== Custom Styles for Island Nutrition PCB ===== */

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

body {
    font-family: 'Inter', system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4 {
    font-family: 'Playfair Display', Georgia, serif;
}

/* Navbar */
#navbar {
    background: transparent;
}

#navbar.scrolled {
    background: rgba(21, 14, 9, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

#navbar.scrolled .nav-link {
    color: rgba(254, 253, 248, 0.8);
}

#navbar.scrolled .nav-link:hover {
    color: #f8c4b0;
}

#navbar.scrolled .font-serif {
    color: #fefefb !important;
}

#navbar.scrolled .menu-line {
    background: #fefefb !important;
}

/* Marquee */
.marquee-track {
    animation: marquee 30s linear infinite;
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

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

#mobile-menu.open .mobile-link {
    animation: fadeUp 0.4s ease forwards;
}

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

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

/* Mobile menu button active state */
#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.25rem;
}

/* Reveal Animations */
.reveal-content {
    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-content.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Default visible state for progressive enhancement */
.reveal-content {
    will-change: auto;
}

/* Image reveal */
.reveal-image {
    opacity: 1;
    transform: scale(1);
    transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Scroll-triggered states (applied via JS) */
.reveal-content.scroll-hidden {
    opacity: 0;
    transform: translateY(40px);
}

.reveal-image.scroll-hidden {
    opacity: 0;
    transform: scale(0.95);
}

/* Reduced motion */
@media (prefers-reduced-motion: no-preference) {
    .reveal-content.scroll-hidden {
        opacity: 0;
        transform: translateY(40px);
    }
    
    .reveal-image.scroll-hidden {
        opacity: 0;
        transform: scale(0.95);
    }
}

@media (prefers-reduced-motion: reduce) {
    .reveal-content,
    .reveal-image {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
    
    .marquee-track {
        animation: none;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* Selection */
::selection {
    background: #c93d1c;
    color: #fefefb;
}

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

::-webkit-scrollbar-track {
    background: #150e09;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #c93d1c;
}

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

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

/* Smooth image loading */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}
