/* ============================================
   Alton's Roofing Co. — Custom Styles
   Classic & Elegant · Midnight Blue + Mint
   ============================================ */

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

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

body {
    overflow-x: hidden;
}

::selection {
    background-color: rgba(20, 83, 45, 0.15);
    color: #0f172a;
}

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

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* ---------- Navbar ---------- */
.nav-logo-dark {
    color: #0f172a;
}

.nav-link {
    position: relative;
}

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

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

.nav-link:hover {
    color: #0f172a !important;
}

/* ---------- Hero Animations ---------- */
.hero-eyebrow {
    animation: fadeInUp 0.8s ease forwards;
    animation-delay: 0.2s;
    opacity: 0;
}

.hero-headline {
    animation: fadeInUp 0.8s ease forwards;
    animation-delay: 0.4s;
    opacity: 0;
}

.hero-sub {
    animation: fadeInUp 0.8s ease forwards;
    animation-delay: 0.6s;
    opacity: 0;
}

.hero-ctas {
    animation: fadeInUp 0.8s ease forwards;
    animation-delay: 0.8s;
    opacity: 0;
}

.hero-scroll {
    animation: fadeInUp 0.8s ease forwards;
    animation-delay: 1.2s;
    opacity: 0;
}

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

/* ---------- Scroll Reveal ---------- */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

.reveal:nth-child(2) { transition-delay: 0.1s; }
.reveal:nth-child(3) { transition-delay: 0.2s; }
.reveal:nth-child(4) { transition-delay: 0.3s; }
.reveal:nth-child(5) { transition-delay: 0.4s; }
.reveal:nth-child(6) { transition-delay: 0.5s; }

/* ---------- Trust Items ---------- */
.trust-item {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.trust-item.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ---------- Mobile Menu ---------- */
.mobile-link {
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

#mobile-menu.open .mobile-link {
    opacity: 1;
    transform: translateX(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; }
#mobile-menu.open .mobile-link:nth-child(5) { transition-delay: 0.3s; }
#mobile-menu.open .mobile-link:nth-child(6) { transition-delay: 0.35s; }

/* ---------- Form Focus States ---------- */
input:focus,
select:focus,
textarea:focus {
    outline: none;
}

/* ---------- Back to Top ---------- */
#back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

#back-to-top:hover {
    transform: translateY(-2px);
}

/* ---------- Service Card Hover ---------- */
.group:hover .group-hover\!scale-105 {
    transform: scale(1.05);
}

/* ---------- Print Styles ---------- */
@media print {
    nav, #back-to-top, .hero-scroll {
        display: none !important;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}
