/* ============================================
   Coffee Culture — Custom Styles
   ============================================ */

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    overflow-x: hidden;
}

::selection {
    background: #b8614a;
    color: #FDF9F5;
}

/* --- Navigation --- */
.nav {
    background: transparent;
    transition: background 0.5s ease, box-shadow 0.5s ease;
}

.nav.scrolled {
    background: rgba(253, 249, 245, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(184, 97, 74, 0.08);
}

.nav-link {
    position: relative;
}

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

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

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

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

.menu-line {
    transition: all 0.4s cubic-bezier(0.65, 0, 0.35, 1);
}

.menu-toggle.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(3px, 3px);
    width: 24px;
}

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

.menu-toggle.active .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(3px, -3px);
    width: 24px;
}

/* --- Hero --- */
.hero {
    position: relative;
}

.hero-img {
    will-change: transform;
    transition: transform 8s ease;
}

.hero:hover .hero-img {
    transform: scale(1.02);
}

.hero-scrim {
    background: linear-gradient(
        135deg,
        rgba(46, 23, 16, 0.82) 0%,
        rgba(84, 41, 31, 0.65) 50%,
        rgba(122, 58, 45, 0.5) 100%
    );
}

.hero-eyebrow {
    opacity: 0;
    animation: fadeUp 0.8s ease 0.3s forwards;
}

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

.hero-sub {
    opacity: 0;
    animation: fadeUp 0.8s ease 0.7s forwards;
}

.hero-btn-primary {
    opacity: 0;
    animation: fadeUp 0.8s ease 0.9s forwards;
}

.hero-btn-secondary {
    opacity: 0;
    animation: fadeUp 0.8s ease 1s forwards;
}

.hero-scroll {
    opacity: 0;
    animation: fadeIn 1s ease 1.5s forwards;
}

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

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

/* --- Divider --- */
.divider-line {
    opacity: 0;
    transform: scaleX(0);
    transform-origin: left;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.divider-line.visible {
    opacity: 1;
    transform: scaleX(1);
}

/* --- Reveal Animations --- */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s ease, transform 0.7s 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;
    }
    .divider-line {
        opacity: 1;
        transform: scaleX(1);
    }
}

/* --- Menu Hover --- */
#menu li {
    border-bottom: 1px solid rgba(217, 196, 171, 0.3);
    padding-bottom: 6px;
}

#menu li:last-child {
    border-bottom: none;
}

/* --- Button Focus --- */
a:focus-visible, button:focus-visible {
    outline: 2px solid #b8614a;
    outline-offset: 3px;
    border-radius: 2px;
}

/* --- Mobile Menu Links --- */
.mobile-link {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s 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; }

/* --- Image Hover --- */
img {
    display: block;
    max-width: 100%;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #F5EDE4;
}
::-webkit-scrollbar-thumb {
    background: #C4A888;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #B8614A;
}
