/* ============================================
   Deja Brew — Custom Styles
   ============================================ */

/* --- Base & Typography --- */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

::selection {
    background-color: #E07A5F;
    color: white;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #1a1a1a;
}
::-webkit-scrollbar-thumb {
    background: #E07A5F;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #d4624a;
}

/* --- Navigation --- */
.nav-logo-text {
    transition: color 0.3s ease;
}

.nav-link {
    position: relative;
}

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

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

.nav-link:hover {
    color: #E07A5F;
}

/* --- Navbar scroll state --- */
#navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 30px rgba(0, 0, 0, 0.08);
}

#navbar.scrolled .nav-logo-text {
    color: #1a1a1a;
}

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

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

#navbar.scrolled .menu-line {
    background: #1a1a1a;
}

/* --- Mobile Menu --- */
.mobile-link {
    position: relative;
}

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

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

/* Hamburger Animation */
.menu-line {
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

#menu-toggle.active .menu-line:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
    width: 1.5rem;
}

/* --- Hero Animations --- */
.hero-eyebrow {
    opacity: 0;
    animation: fadeSlideUp 0.8s ease forwards;
    animation-delay: 0.2s;
}

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

.hero-subtitle {
    opacity: 0;
    animation: fadeSlideUp 0.8s ease forwards;
    animation-delay: 0.8s;
}

.hero-ctas {
    opacity: 0;
    animation: fadeSlideUp 0.8s ease forwards;
    animation-delay: 1.1s;
}

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

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

@media (prefers-reduced-motion: no-preference) {
    .reveal-up {
        opacity: 0;
        transform: translateY(40px);
        transition: opacity 0.8s ease, transform 0.8s ease;
    }
    
    .reveal-left {
        opacity: 0;
        transform: translateX(-40px);
        transition: opacity 0.8s ease, transform 0.8s ease;
    }
    
    .reveal-right {
        opacity: 0;
        transform: translateX(40px);
        transition: opacity 0.8s ease, transform 0.8s ease;
    }
    
    .reveal-up.visible,
    .reveal-left.visible,
    .reveal-right.visible {
        opacity: 1;
        transform: translate(0, 0);
    }
}

/* --- Image Hover Effects --- */
img {
    max-width: 100%;
    height: auto;
}

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

/* --- Smooth section transitions --- */
section {
    position: relative;
}

/* --- Custom underline for serif accents --- */
.font-serif em {
    font-style: italic;
}

/* --- Mobile menu link hover --- */
@media (max-width: 767px) {
    .mobile-link:hover {
        color: #E07A5F;
    }
}

/* --- Image loading placeholder --- */
img {
    background: linear-gradient(135deg, #f6f6f6 0%, #e7e7e7 100%);
}

/* --- Subtle texture on dark sections --- */
.bg-charcoal-950::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='1'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 0;
}

/* --- Card hover lift --- */
.rounded-2xl {
    will-change: transform;
}

/* --- Print styles --- */
@media print {
    #navbar,
    #menu-toggle,
    #mobile-menu {
        display: none !important;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}
