/* ============================================
   Bike Shop El Monte — Custom Styles
   ============================================ */

/* Color Variables */
:root {
    --midnight-blue: #0A1628;
    --mint: #34D399;
    --mint-light: #6EE7B7;
    --white: #FFFFFF;
    --off-white: #F8FAFC;
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    color: var(--midnight-blue);
    background-color: var(--white);
    overflow-x: hidden;
}

/* Typography */
.font-playfair {
    font-family: 'Playfair Display', serif;
}

.font-inter {
    font-family: 'Inter', sans-serif;
}

/* Selection */
::selection {
    background-color: var(--mint);
    color: var(--midnight-blue);
}

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

::-webkit-scrollbar-track {
    background: var(--midnight-blue);
}

::-webkit-scrollbar-thumb {
    background: var(--mint);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--mint-light);
}

/* ============================================
   Navigation
   ============================================ */
#navbar {
    transition: background-color 0.5s ease, box-shadow 0.5s ease, padding 0.5s ease;
}

#navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.97);
    box-shadow: 0 1px 0 rgba(10, 22, 40, 0.08);
    backdrop-filter: blur(10px);
}

#navbar.scrolled .nav-logo-text {
    color: var(--midnight-blue);
}

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

/* ============================================
   Hero Section
   ============================================ */
.hero-eyebrow {
    animation: fadeUp 0.8s ease forwards;
}

.hero-title {
    animation: fadeUp 0.8s ease 0.2s forwards;
    opacity: 0;
    transform: translateY(100%);
}

.hero-subtitle {
    animation: fadeUp 0.8s ease 0.4s forwards;
    opacity: 0;
    transform: translateY(100%);
}

.hero-cta-primary,
.hero-cta-secondary {
    animation: fadeUp 0.8s ease 0.6s forwards;
    opacity: 0;
    transform: translateY(100%);
}

.hero-quick-info {
    animation: fadeUp 0.8s ease 0.8s forwards;
    opacity: 0;
    transform: translateY(100%);
}

.hero-image-wrapper {
    animation: fadeIn 1s ease 0.3s forwards;
    opacity: 0;
}

.hero-floating-card {
    animation: slideUp 0.8s ease 1s forwards;
    opacity: 0;
    transform: translateY(20px);
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

/* Scroll Line */
.scroll-line {
    animation: scrollPulse 2s ease infinite;
}

@keyframes scrollPulse {
    0%, 100% {
        opacity: 0.4;
        transform: scaleY(1);
    }
    50% {
        opacity: 1;
        transform: scaleY(1.2);
    }
}

/* ============================================
   Section Animations
   ============================================ */
.section-eyebrow,
.section-title,
.section-divider {
    /* Controlled by JS IntersectionObserver */
}

/* ============================================
   Service Cards
   ============================================ */
.service-card {
    transition: background-color 0.5s ease;
}

.service-card:hover .service-icon {
    transform: scale(1.1);
}

.service-card:hover .service-line {
    width: 48px;
}

/* ============================================
   About Section
   ============================================ */
.about-image-container,
.about-content {
    /* Controlled by JS IntersectionObserver */
}

/* ============================================
   Divider
   ============================================ */
.divider-line {
    transition: width 1s ease;
}

/* ============================================
   Contact Form
   ============================================ */
.form-input,
.form-textarea,
.form-select {
    transition: border-color 0.3s ease;
}

.form-input:focus,
.form-textarea:focus {
    border-color: var(--mint) !important;
}

.form-select option {
    background-color: var(--midnight-blue);
    color: var(--white);
}

.form-submit {
    transition: box-shadow 0.3s ease;
}

.form-submit:hover {
    box-shadow: 0 10px 40px rgba(52, 211, 153, 0.3);
}

/* ============================================
   Back to Top
   ============================================ */
.back-to-top {
    transition: opacity 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
}

.back-to-top:not(.visible) {
    transform: translateY(10px);
}

.back-to-top:hover {
    box-shadow: 0 4px 20px rgba(52, 211, 153, 0.4);
}

/* ============================================
   Map Pin
   ============================================ */
.map-pin-pulse {
    animation: ping 1.5s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes ping {
    75%, 100% {
        transform: scale(2);
        opacity: 0;
    }
}

/* ============================================
   Mobile Menu
   ============================================ */
.mobile-link {
    animation: fadeIn 0.5s ease forwards;
}

/* ============================================
   Utility Classes
   ============================================ */
.writing-mode-vertical {
    writing-mode: vertical-rl;
}

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (max-width: 767px) {
    html {
        scroll-padding-top: 70px;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-floating-card {
        position: relative;
        margin-top: 1.5rem;
        margin-left: 0;
        margin-right: 0;
    }

    .hero-image-wrapper {
        margin-bottom: 2rem;
    }

    .about-title,
    .location-title,
    .contact-title {
        font-size: 2.25rem;
    }

    .cta-title {
        font-size: 2.25rem;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .hero-title {
        font-size: 3.5rem;
    }
}

/* ============================================
   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;
    }
}
