/* ============================================
   Grace House Coffee — Custom Styles
   ============================================ */

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

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

body {
    overflow-x: hidden;
}

::selection {
    background-color: rgba(6, 78, 59, 0.2);
    color: #022C22;
}

/* --- Buttons --- */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background-color: #064E3B;
    color: #FDF8F0;
    padding: 0.875rem 2rem;
    border-radius: 9999px;
    font-size: 0.9375rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid #064E3B;
    cursor: pointer;
}

.btn-primary:hover {
    background-color: transparent;
    color: #064E3B;
    transform: translateY(-2px);
    box-shadow: 0 10px 40px -10px rgba(6, 78, 59, 0.3);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background-color: transparent;
    color: #064E3B;
    padding: 0.875rem 2rem;
    border-radius: 9999px;
    font-size: 0.9375rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid rgba(6, 78, 59, 0.3);
    cursor: pointer;
}

.btn-secondary:hover {
    border-color: #064E3B;
    transform: translateY(-2px);
    box-shadow: 0 10px 40px -10px rgba(6, 78, 59, 0.15);
}

/* --- Section Eyebrow --- */
.section-eyebrow {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #064E3B;
    opacity: 0.6;
}

/* --- Section Title --- */
.section-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 500;
    line-height: 1.1;
    color: #022C22;
    letter-spacing: -0.02em;
}

/* --- Navbar --- */
#navbar {
    background: rgba(253, 248, 240, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(6, 78, 59, 0.08);
}

#navbar.scrolled {
    box-shadow: 0 4px 40px -20px rgba(2, 44, 34, 0.1);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1.5px;
    background-color: #064E3B;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* --- Mobile Menu --- */
.menu-line {
    display: block;
}

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

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

#menu-btn.active .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
    width: 50%;
}

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

.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

/* --- Hero Animations --- */
.hero-eyebrow {
    animation: fadeUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.2s forwards;
}

.hero-title {
    animation: fadeUp 0.9s cubic-bezier(0.4, 0, 0.2, 1) 0.4s forwards;
}

.hero-subtitle {
    animation: fadeUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.6s forwards;
}

.hero-cta {
    animation: fadeUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.8s forwards;
}

.hero-scroll {
    animation: fadeIn 0.8s cubic-bezier(0.4, 0, 0.2, 1) 1.2s forwards;
}

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

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

/* --- Scroll Reveal --- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* --- Gallery Hover --- */
.gallery-item {
    overflow: hidden;
}

.gallery-item img {
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Menu Item Hover --- */
.menu-item {
    border-bottom: 1px solid rgba(253, 248, 240, 0.08);
    padding-bottom: 0.75rem;
    transition: all 0.3s ease;
}

.menu-item:last-child {
    border-bottom: none;
}

/* --- Contact Form Focus --- */
input:focus,
textarea:focus {
    outline: none;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .section-title {
        font-size: clamp(1.75rem, 8vw, 2.5rem);
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
        justify-content: center;
    }

    .hero-cta {
        flex-direction: column;
    }
}

@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;
    }
}
