/* ===================================
   Metro Bike — Custom Styles
   Classic & Elegant Design System
   =================================== */

/* --- Custom Properties --- */
:root {
    --color-terracotta-50: #fbf7f6;
    --color-terracotta-100: #f5eadd;
    --color-terracotta-200: #ebd0c2;
    --color-terracotta-400: #c78f77;
    --color-terracotta-500: #b57256;
    --color-terracotta-600: #a35c44;
    --color-terracotta-700: #874a37;
    --color-sand-100: #faf5eb;
    --color-sand-200: #f3e8d0;
    --color-sand-300: #e9d5b0;
    --color-sand-400: #ddc08e;
    --color-espresso: #3d2b1f;
    --color-warm-gray: #6b5e54;
    --color-cream: #faf5eb;

    --font-serif: 'Lora', Georgia, serif;
    --font-sans: 'Montserrat', system-ui, sans-serif;

    --transition-smooth: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --transition-bounce: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

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

body {
    overflow-x: hidden;
}

/* --- Scroll Reveal --- */
.scroll-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);
}

.scroll-reveal[data-revealed="false"] {
    opacity: 0;
    transform: translateY(30px);
}

/* --- Navbar Scroll State --- */
#navbar.scrolled {
    background: rgba(250, 245, 235, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 30px rgba(61, 43, 31, 0.06);
}

#navbar.scrolled .menu-line {
    background: var(--color-espresso);
}

/* --- Mobile Menu --- */
.mobile-link {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
}

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

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

#mobileMenu.open .mobile-link {
    animation: slideIn 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

#mobileMenu.open .mobile-link:nth-child(1) { animation-delay: 0.05s; }
#mobileMenu.open .mobile-link:nth-child(2) { animation-delay: 0.1s; }
#mobileMenu.open .mobile-link:nth-child(3) { animation-delay: 0.15s; }
#mobileMenu.open .mobile-link:nth-child(4) { animation-delay: 0.2s; }
#mobileMenu.open .mobile-link:nth-child(5) { animation-delay: 0.25s; }

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

/* --- Menu Button Animation --- */
#menuBtn.active .menu-line:nth-child(1) {
    transform: translateY(4px) rotate(45deg);
}

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

#menuBtn.active .menu-line:nth-child(3) {
    transform: translateY(-4px) rotate(-45deg);
}

/* --- Button Hover Effects --- */
a[href^="tel:"], 
a[href^="mailto:"] {
    text-decoration: none;
}

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

::-webkit-scrollbar-track {
    background: var(--color-cream);
}

::-webkit-scrollbar-thumb {
    background: var(--color-terracotta-300);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-terracotta-500);
}

/* --- Selection --- */
::selection {
    background: var(--color-terracotta-200);
    color: var(--color-espresso);
}

/* --- 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;
    }
    
    .scroll-reveal {
        opacity: 1;
        transform: none;
    }
    
    .scroll-reveal[data-revealed="false"] {
        opacity: 1;
        transform: none;
    }
}

/* --- Focus Styles --- */
:focus-visible {
    outline: 2px solid var(--color-terracotta-500);
    outline-offset: 2px;
}

/* --- Image Loading --- */
img {
    background-color: var(--color-sand-200);
}

/* --- Form Select Arrow --- */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23a35c44' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* --- Utility --- */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}
