/* ========================================
   Denco Roofing Company — Custom Styles
   ======================================== */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Hero clip paths */
.clip-diagonal {
    clip-path: polygon(50% 0, 100% 0, 100% 100%, 40% 100%);
}

.clip-diagonal-reverse {
    clip-path: polygon(0 0, 60% 0, 100% 100%, 0 100%);
}

/* Hero animations */
.hero-subtitle {
    animation: heroSlideUp 0.8s ease forwards 0.2s;
}

.hero-headline {
    animation: heroSlideUp 0.8s ease forwards 0.4s;
}

.hero-desc {
    animation: heroSlideUp 0.8s ease forwards 0.6s;
}

.hero-ctas {
    animation: heroSlideUp 0.8s ease forwards 0.8s;
}

.hero-trust {
    animation: heroSlideUp 0.8s ease forwards 1s;
}

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

.hero-float-card {
    animation: heroFloatCard 0.8s ease forwards 1.2s;
    opacity: 0;
}

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

@keyframes heroImageIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

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

/* Scroll reveal (progressive enhancement) */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(40px);
        transition: opacity 0.8s ease, transform 0.8s ease;
    }

    .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; }
}

/* Navbar scroll state */
.nav-scrolled {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

.nav-scrolled .nav-text {
    color: #0A1628 !important;
}

.nav-scrolled .nav-link {
    color: #152C45 !important;
}

/* Service cards */
.service-card {
    transition: background-color 0.5s ease, transform 0.3s ease;
}

.service-card:hover {
    transform: translateY(-2px);
}

/* Work items */
.work-item {
    cursor: pointer;
}

/* Testimonial cards */
.testimonial-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-4px);
}

/* Process steps */
.process-step {
    transition: transform 0.3s ease;
}

.process-step:hover {
    transform: translateY(-4px);
}

/* Form select styling */
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='%23152C45' 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 0 center;
    padding-right: 2rem;
}

/* Mobile menu */
.mobile-menu-open {
    overflow: hidden;
}

/* Smooth focus styles */
input:focus,
textarea:focus,
select:focus {
    border-bottom-color: #3A9D74 !important;
}

/* Selection color */
::selection {
    background-color: #C0EAD4;
    color: #0A1628;
}

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

::-webkit-scrollbar-track {
    background: #F2FBF7;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #8FD4B4;
}

/* Print styles */
@media print {
    nav, #contact-form, #form-success, .hero-float-card {
        display: none !important;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}
