/* ============================================
   Guadalupe's Glass & Repair — Custom Styles
   ============================================ */

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

body {
    overflow-x: hidden;
}

/* Selection Color */
::selection {
    background-color: rgba(17, 94, 89, 0.2);
    color: #115e59;
}

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

#navbar.scrolled {
    background-color: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.15);
}

/* ============================================
   Hero
   ============================================ */
#hero {
    position: relative;
}

#hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(to top, #fafaf9, transparent);
    pointer-events: none;
}

/* ============================================
   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, #115e59, #0d9488);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

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

/* ============================================
   Scroll Reveal Animations
   (Progressive enhancement — content is visible without JS)
   ============================================ */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 1;
        transform: translateY(0);
        transition: opacity 0.7s ease, transform 0.7s ease;
    }

    .reveal.from-bottom {
        transform: translateY(30px);
        opacity: 0;
    }

    .reveal.from-bottom.visible {
        opacity: 1;
        transform: translateY(0);
    }

    .reveal.from-left {
        transform: translateX(-30px);
        opacity: 0;
    }

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

    .reveal.from-right {
        transform: translateX(30px);
        opacity: 0;
    }

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

    /* Stagger children */
    .reveal-stagger > * {
        opacity: 1;
        transform: translateY(0);
        transition: opacity 0.5s ease, transform 0.5s ease;
    }

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

/* Without JS, ensure content is always visible */
@media not all and (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* ============================================
   Form Styles
   ============================================ */
input:focus,
select:focus,
textarea:focus {
    outline: none;
}

input::placeholder,
textarea::placeholder {
    color: #a8a39e;
}

/* ============================================
   Testimonial Cards
   ============================================ */
.testimonial-card {
    position: relative;
}

/* ============================================
   Button Hover Effects
   ============================================ */
a, button {
    -webkit-tap-highlight-color: transparent;
}

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (max-width: 767px) {
    #hero::after {
        height: 60px;
    }

    .font-serif {
        word-spacing: -0.02em;
    }
}

/* ============================================
   Focus Visible for Accessibility
   ============================================ */
*:focus-visible {
    outline: 2px solid #14b8a6;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
    header, footer, #contact-form, .reveal {
        display: none !important;
    }

    body {
        color: #000;
        background: #fff;
    }

    a {
        color: #000;
    }
}
