/* ===== Base & Typography ===== */
*, *::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: #FF6B4A;
    color: #FDF8F4;
}

/* ===== Scroll Reveal ===== */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    html {
        scroll-behavior: auto;
    }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===== Floating Cards ===== */
.floating-card {
    will-change: transform;
}

.card-fresh {
    animation: float 4s ease-in-out infinite;
}

.card-coffee {
    animation: float-delayed 4s ease-in-out infinite;
}

.card-artisan {
    animation: float 4.5s ease-in-out infinite;
    animation-delay: 1s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-12px); }
}

@keyframes float-delayed {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

/* ===== Navbar ===== */
#navbar {
    transition: background-color 0.4s ease, backdrop-filter 0.4s ease, box-shadow 0.4s ease;
}

#navbar.scrolled {
    background-color: rgba(253, 248, 244, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.08);
}

#navbar.scrolled .nav-link {
    color: #3d3d3d !important;
}

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

#navbar.scrolled .hamburger-line {
    background-color: #1a1a1a !important;
}

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

.mobile-nav-link {
    transition: color 0.3s ease, transform 0.3s ease;
}

.mobile-nav-link:hover {
    transform: scale(1.05);
}

/* ===== Hamburger Animation ===== */
.hamburger-line {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

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

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

#mobile-menu-btn.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
    width: 1.5rem;
}

/* ===== Custom Scrollbar ===== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #FDF8F4;
}

::-webkit-scrollbar-thumb {
    background: #FF6B4A;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #E85A3A;
}

/* ===== Menu Card Hover ===== */
.group:hover .group-hover\:bg-coral-500\/20 {
    background-color: rgba(255, 107, 74, 0.2);
}

/* ===== Button Focus ===== */
a:focus-visible, button:focus-visible {
    outline: 2px solid #FF6B4A;
    outline-offset: 2px;
    border-radius: 0.5rem;
}

/* ===== Image Hover ===== */
.rounded-2xl.overflow-hidden img {
    transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ===== Smooth Section Transitions ===== */
section {
    position: relative;
}

/* ===== Loading State ===== */
body {
    background-color: #FDF8F4;
}
