/* ============================================
   Corum Well Drilling & Pump Services
   Custom Styles — Bold Editorial Design
   ============================================ */

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

body {
    overflow-x: hidden;
}

::selection {
    background-color: rgba(156, 28, 54, 0.15);
    color: #6b1629;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #fdf2f4;
}
::-webkit-scrollbar-thumb {
    background: #d44060;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #9c1c36;
}

/* Navbar */
#navbar {
    background: transparent;
}

#navbar.scrolled {
    background: rgba(254, 253, 251, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(156, 28, 54, 0.08);
}

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

#mobile-menu .mobile-link {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s 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; }

.menu-line {
    transition: all 0.3s ease;
}

#menu-btn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(3px, 3px);
}
#menu-btn.active .menu-line:nth-child(2) {
    opacity: 0;
}
#menu-btn.active .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(3px, -3px);
    width: 1.25rem;
}

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

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 1rem;
    border: 1px solid transparent;
    transition: border-color 0.5s ease;
    pointer-events: none;
}

.service-card:hover::before {
    border-color: rgba(255, 255, 255, 0.2);
}

/* Process Steps */
.process-step {
    position: relative;
}

.process-step::after {
    content: '';
    position: absolute;
    top: 2rem;
    right: -0.5rem;
    width: 1rem;
    height: 1px;
    background: rgba(251, 166, 184, 0.4);
}

.process-step:last-child::after {
    display: none;
}

/* Scroll Reveal Animations — Progressive Enhancement */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.7s ease, transform 0.7s ease;
    }

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

    .reveal-left {
        opacity: 0;
        transform: translateX(-24px);
        transition: opacity 0.7s ease, transform 0.7s ease;
    }

    .reveal-left.revealed {
        opacity: 1;
        transform: translateX(0);
    }

    .reveal-right {
        opacity: 0;
        transform: translateX(24px);
        transition: opacity 0.7s ease, transform 0.7s ease;
    }

    .reveal-right.revealed {
        opacity: 1;
        transform: translateX(0);
    }

    /* Stagger children */
    .stagger-children .reveal:nth-child(1) { transition-delay: 0.05s; }
    .stagger-children .reveal:nth-child(2) { transition-delay: 0.1s; }
    .stagger-children .reveal:nth-child(3) { transition-delay: 0.15s; }
    .stagger-children .reveal:nth-child(4) { transition-delay: 0.2s; }
    .stagger-children .reveal:nth-child(5) { transition-delay: 0.25s; }
    .stagger-children .reveal:nth-child(6) { transition-delay: 0.3s; }
}

/* Selection highlight for serif */
.font-serif::selection {
    background: rgba(156, 28, 54, 0.2);
}

/* Focus visible */
*:focus-visible {
    outline: 2px solid #d44060;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Print */
@media print {
    #navbar, #mobile-menu, .reveal { display: none; }
    body { background: white; }
}
