/* ============================================================
   BELMONT COFFEE COMPANY — Custom Styles
   ============================================================ */

/* ——— Base / Reset ——— */
*, *::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;
}

img {
    display: block;
    max-width: 100%;
}

/* ——— Skip Link ——— */
.skip-link {
    position: absolute;
    top: -100%;
    left: 1rem;
    z-index: 999;
    padding: 0.75rem 1.5rem;
    background: #1a3c3e;
    color: #fff;
    font-size: 0.875rem;
    text-decoration: none;
    border-radius: 0 0 4px 4px;
}

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

/* ——— Header ——— */
#site-header {
    background: transparent;
    border-bottom: 1px solid transparent;
}

#site-header.scrolled {
    background: rgba(240, 247, 246, 0.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(26, 60, 62, 0.08);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.06);
}

.header-text {
    color: #1a3c3e;
}

.header-subtext {
    color: #b08d4a;
}

.header-btn {
    color: #1a3c3e;
}

/* Scrolled state */
#site-header.scrolled .header-text {
    color: #1a3c3e;
}

#site-header.scrolled .header-subtext {
    color: #b08d4a;
}

#site-header.scrolled .header-line {
    background: #1a3c3e;
}

/* ——— Hero ——— */
.hero-eyebrow {
    opacity: 1;
    animation: fadeSlideUp 0.8s 0.3s both;
}

.hero-headline {
    opacity: 1;
    animation: fadeSlideUp 0.8s 0.5s both;
}

.hero-subhead {
    opacity: 1;
    animation: fadeSlideUp 0.8s 0.7s both;
}

.hero-ctas {
    opacity: 1;
    animation: fadeSlideUp 0.8s 0.9s both;
}

.hero-scroll {
    opacity: 1;
    animation: fadeIn 1s 1.2s both;
}

.scroll-line {
    animation: scrollPulse 2s infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.3; transform: scaleY(0.6); transform-origin: top; }
    50% { opacity: 1; transform: scaleY(1); }
}

/* ——— Scroll Reveal ——— */
.reveal-up,
.reveal-left,
.reveal-right {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: no-preference) {
    .reveal-up {
        opacity: 0;
        transform: translateY(32px);
        transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    }
    
    .reveal-left {
        opacity: 0;
        transform: translateX(-40px);
        transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    }
    
    .reveal-right {
        opacity: 0;
        transform: translateX(40px);
        transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    }
    
    .reveal-up.revealed,
    .reveal-left.revealed,
    .reveal-right.revealed {
        opacity: 1;
        transform: none;
    }
}

/* ——— Animations ——— */
@keyframes fadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

#mobile-menu.closed {
    opacity: 0;
    pointer-events: none;
}

.mobile-nav-link {
    opacity: 1;
    animation: fadeSlideUp 0.5s both;
}

.mobile-nav-link:nth-child(1) { animation-delay: 0.1s; }
.mobile-nav-link:nth-child(2) { animation-delay: 0.15s; }
.mobile-nav-link:nth-child(3) { animation-delay: 0.2s; }
.mobile-nav-link:nth-child(4) { animation-delay: 0.25s; }

/* ——— Hamburger ——— */
#menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(1) {
    top: 16px;
    transform: rotate(45deg);
}

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

#menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(3) {
    top: 16px;
    left: 12px;
    width: 24px;
    transform: rotate(-45deg);
}

/* ——— Nav Links ——— */
.nav-link::after {
    content: '';
    display: block;
    width: 0;
    height: 1px;
    background: #c8a96e;
    transition: width 0.3s ease;
    margin-top: 2px;
}

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

/* ——— Menu Items ——— */
#menu li:hover .font-serif {
    color: #c8a96e;
    transition: color 0.3s ease;
}

/* ——— Form ——— */
#contact-form select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

#contact-form select:focus {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2326675e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}

/* ——— Utility ——— */
::selection {
    background: #c8a96e;
    color: #1a3c3e;
}

/* ——— Responsive ——— */
@media (max-width: 767px) {
    .hero-headline {
        font-size: 2.5rem;
    }
    
    .hero-headline br {
        display: none;
    }
}
