/* ============================================
   S&P Cycles — Custom Styles
   Bold Editorial · Burgundy + Blush
   ============================================ */

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

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

body {
    margin: 0;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ---- Selection ---- */
::selection {
    background: #780000;
    color: #fefdfb;
}

/* ---- Animations ---- */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-up {
    animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* ---- Scroll Reveal ---- */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }
.reveal-delay-6 { transition-delay: 0.6s; }

/* ---- Navbar ---- */
#navbar {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

#navbar.scrolled {
    background: rgba(8, 8, 8, 0.95);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05);
}

.nav-link {
    position: relative;
}

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

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

/* ---- Mobile Menu ---- */
#mobileMenu.open {
    opacity: 1;
    pointer-events: all;
}

#mobileMenu.open .mobile-link {
    animation: fadeUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

.menu-line {
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

#menuBtn.active .menu-line:nth-child(3) {
    width: 6px;
    transform: rotate(-45deg) translate(3px, -3px);
}

/* ---- Service Cards ---- */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #780000, #ff8f70);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.service-card:hover::before {
    transform: scaleX(1);
}

/* ---- Parallax Hero ---- */
#hero {
    perspective: 10px;
}

#hero .absolute.inset-0 img {
    will-change: transform;
}

/* ---- Gallery Hover ---- */
.gallery-item {
    position: relative;
    overflow: hidden;
}

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(120, 0, 0, 0.4), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.gallery-item:hover::after {
    opacity: 1;
}

/* ---- Button Ripple Effect ---- */
button, .cta-button {
    position: relative;
    overflow: hidden;
}

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

::-webkit-scrollbar-track {
    background: #0f0f0f;
}

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

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

/* ---- Focus Styles ---- */
input:focus,
select:focus,
textarea:focus,
button:focus {
    outline: none;
}

/* ---- Responsive Adjustments ---- */
@media (max-width: 768px) {
    .font-serif {
        line-height: 1.1;
    }

    #hero h1 {
        font-size: 2.75rem;
    }

    @media (min-width: 769px) {
        #hero h1 {
            font-size: 3.5rem;
        }
    }

    @media (min-width: 1024px) {
        #hero h1 {
            font-size: 4.5rem;
        }
    }
}

/* ---- Print Styles ---- */
@media print {
    #navbar,
    #mobileMenu,
    .service-card::before {
        display: none;
    }

    body {
        background: white;
        color: black;
    }
}
