/* ========================================
   109 Coffee Company — Custom Styles
   ======================================== */

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

/* Custom selection color */
::selection {
    background: #ff6b4f;
    color: #ffffff;
}

/* ========================================
   Navbar
   ======================================== */
#navbar {
    color: #ffffff;
}

#navbar.scrolled {
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05);
}

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

#navbar.scrolled .mobile-link {
    color: #1a1a1a;
}

#navbar.scrolled a[style*="color: inherit"] {
    color: #ffffff !important;
}

/* ========================================
   Hero Animations
   ======================================== */
.hero-eyebrow {
    animation: fadeUp 0.8s ease forwards 0.3s;
}

.hero-title {
    animation: fadeUp 0.8s ease forwards 0.5s;
}

.hero-subtitle {
    animation: fadeUp 0.8s ease forwards 0.7s;
}

.hero-cta {
    animation: fadeUp 0.8s ease forwards 0.9s;
}

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

/* ========================================
   Section Eyebrow
   ======================================== */
.section-eyebrow {
    letter-spacing: 0.3em;
}

/* ========================================
   Reveal Animations
   ======================================== */
.reveal-up,
.reveal-left,
.reveal-right {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-left {
    transform: translateX(-40px);
}

.reveal-right {
    transform: translateX(40px);
}

.reveal-up.is-visible,
.reveal-left.is-visible,
.reveal-right.is-visible {
    opacity: 1;
    transform: translate(0, 0);
}

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

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

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

/* Menu toggle animation */
.menu-line {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

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

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

/* ========================================
   Form Styles
   ======================================== */
input:focus,
textarea:focus {
    border-bottom-color: #ff6b4f !important;
}

input::placeholder,
textarea::placeholder {
    color: rgba(45, 45, 45, 0.3);
}

/* ========================================
   Image hover effects
   ======================================== */
img {
    will-change: transform;
}

/* ========================================
   Responsive adjustments
   ======================================== */
@media (max-width: 768px) {
    .font-serif {
        line-height: 1.1;
    }
}

/* ========================================
   Focus visible for accessibility
   ======================================== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #ff6b4f;
    outline-offset: 4px;
    border-radius: 4px;
}

/* ========================================
   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-up,
    .reveal-left,
    .reveal-right {
        opacity: 1;
        transform: none;
    }
}
