/* ===== Custom Styles for Sea Port Coffee Shop ===== */

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== Hero Animations ===== */
.hero-eyebrow {
    animation: slideUp 0.8s ease-out 0.2s both;
}

.hero-title {
    animation: slideUp 0.8s ease-out 0.4s both;
}

.hero-subtitle {
    animation: slideUp 0.8s ease-out 0.6s both;
}

.hero-stat {
    animation: slideUp 0.8s ease-out 0.8s both;
}

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

/* ===== Navbar ===== */
.nav-link {
    position: relative;
}

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

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

/* Navbar scroll state */
.navbar-scrolled {
    background: rgba(254, 252, 251, 0.95) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(115, 32, 32, 0.08);
}

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

/* Menu button animation */
.menu-open .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-open .menu-line:nth-child(2) {
    opacity: 0;
}

.menu-open .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
    width: 1.25rem;
}

/* ===== Marquee ===== */
.marquee-track {
    animation: marquee 30s linear infinite;
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ===== Reveal Animations (scroll-triggered) ===== */
.reveal-content {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-image {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-gallery {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

/* Scroll-triggered states (applied via JS) */
.reveal-hidden {
    opacity: 0;
    transform: translateY(40px);
}

.reveal-hidden-left {
    opacity: 0;
    transform: translateX(-40px);
}

.reveal-hidden-right {
    opacity: 0;
    transform: translateX(40px);
}

.reveal-gallery-hidden {
    opacity: 0;
    transform: scale(0.95);
}

/* ===== Menu Items ===== */
.menu-item {
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    transition: padding-left 0.3s ease;
}

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

.menu-item:hover {
    padding-left: 0.75rem;
}

/* ===== Hover Effects ===== */
a, button {
    transition: all 0.3s ease;
}

img {
    transition: transform 0.7s ease;
}

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

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

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

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

/* ===== Selection ===== */
::selection {
    background: #a83232;
    color: white;
}

/* ===== Responsive Adjustments ===== */
@media (max-width: 768px) {
    .hero-title {
        font-size: 3.5rem;
    }

    #hero {
        min-height: auto;
        padding-top: 2rem;
        padding-bottom: 4rem;
    }

    .hero-stat {
        border: none !important;
        padding-left: 0 !important;
    }

    .hero-stat:nth-child(2),
    .hero-stat:nth-child(3) {
        border-top: 1px solid #fce7e7;
        padding-top: 1rem;
        padding-left: 0 !important;
    }
}

@media (max-width: 640px) {
    .hero-title {
        font-size: 2.75rem;
    }

    .marquee-track {
        animation-duration: 20s;
    }
}

/* ===== 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-hidden,
    .reveal-hidden-left,
    .reveal-hidden-right,
    .reveal-gallery-hidden {
        opacity: 1;
        transform: none;
    }
}
