/* ============================================
   On The Mark Coffee Company — Custom Styles
   ============================================ */

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

body {
    overflow-x: hidden;
}

::selection {
    background: #7B2D3B;
    color: white;
}

/* ---- Navbar ---- */
#navbar {
    background: rgba(253, 248, 245, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(26, 20, 18, 0.06);
    transition: background 0.4s ease, box-shadow 0.4s ease;
}

#navbar.scrolled {
    background: rgba(253, 248, 245, 0.95);
    box-shadow: 0 4px 30px rgba(26, 20, 18, 0.08);
}

/* ---- Mobile Menu ---- */
#mobile-menu.open {
    transform: translateX(0);
}

#mobile-menu:not(.open) {
    transform: translateX(100%);
}

/* Hamburger animation */
#menu-toggle.active .menu-line:nth-child(1) {
    transform: translateY(5px) 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(-5px) rotate(-45deg);
    width: 1.5rem;
}

/* ---- Hero Shapes Animation ---- */
@keyframes float-slow {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(12px, -18px) rotate(3deg); }
    66% { transform: translate(-8px, 10px) rotate(-2deg); }
}

@keyframes float-medium {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(-15px, 20px) rotate(5deg); }
}

@keyframes float-fast {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(10px, -15px); }
}

@keyframes pulse-dot {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.5); }
}

.hero-shape {
    animation: float-slow 12s ease-in-out infinite;
}

.shape-circle-2 {
    animation: float-medium 16s ease-in-out infinite;
}

.shape-rect-1 {
    animation: float-medium 14s ease-in-out infinite reverse;
}

.shape-rect-2 {
    animation: float-slow 18s ease-in-out infinite;
}

.shape-dot-1 {
    animation: pulse-dot 3s ease-in-out infinite;
}

.shape-dot-2 {
    animation: pulse-dot 4s ease-in-out infinite 1s;
}

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

.animate-marquee {
    animation: marquee 25s linear infinite;
}

/* ---- Reveal Animations ---- */
/* Default: all elements visible (progressive enhancement) */
.reveal-up {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

/* When JS is active and prefers-reduced-motion allows it, apply hidden state */
@media (prefers-reduced-motion: no-preference) {
    .js-active .reveal-up {
        opacity: 0;
        transform: translateY(30px);
    }

    .js-active .reveal-up.revealed {
        opacity: 1;
        transform: translateY(0);
    }

    /* Stagger children */
    .js-active .reveal-up:nth-child(1) { transition-delay: 0ms; }
    .js-active .reveal-up:nth-child(2) { transition-delay: 100ms; }
    .js-active .reveal-up:nth-child(3) { transition-delay: 200ms; }
    .js-active .reveal-up:nth-child(4) { transition-delay: 300ms; }
}

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

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

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

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

/* ---- Responsive ---- */
@media (max-width: 767px) {
    .hero-shape {
        display: none;
    }
}

/* ---- Focus styles ---- */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #7B2D3B;
    outline-offset: 4px;
    border-radius: 4px;
}

/* ---- Print ---- */
@media print {
    #navbar, .hero-shape, .animate-marquee {
        display: none;
    }
    body {
        background: white;
        color: black;
    }
}
