/* ============================================
   Whitfield Trailer Leasing Inc.
   Custom Styles — Editorial / Bold Design
   ============================================ */

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

body {
    overflow-x: hidden;
}

::selection {
    background: #c9a84c;
    color: #0a1628;
}

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

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

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

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

.hero-stats {
    animation: fadeSlideUp 0.9s ease forwards;
    animation-delay: 1s;
    opacity: 0;
}

#scrollIndicator {
    animation: fadeIn 1s ease forwards;
    animation-delay: 1.4s;
    opacity: 0;
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

.reveal.visible {
    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; }

/* ---- Section Styles ---- */
.section-eyebrow {
    margin-bottom: 1rem !important;
}

.section-title {
    font-weight: 500;
}

.section-desc {
    line-height: 1.75;
}

/* ---- Navbar ---- */
#navbar.scrolled {
    background: rgba(10, 22, 40, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05);
}

#navbar.scrolled .nav-link,
#navbar.scrolled .nav-text {
    color: #ffffff !important;
}

.nav-link {
    position: relative;
}

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

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

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

#mobileMenu:not(.open) {
    opacity: 0;
    pointer-events: none;
}

.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
}

#mobileMenu.open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

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

/* ---- 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, #c9a84c, #d4b965);
    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);
}

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

.testimonial-card::after {
    content: '"';
    position: absolute;
    top: 16px;
    right: 24px;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 6rem;
    color: rgba(201, 168, 76, 0.08);
    line-height: 1;
    pointer-events: none;
}

/* ---- Parallax Hero ---- */
#heroBg {
    will-change: transform;
}

/* ---- Back to Top ---- */
#backToTop.visible {
    opacity: 1;
    pointer-events: all;
}

#backToTop:not(.visible) {
    opacity: 0;
    pointer-events: none;
}

#backToTop:hover {
    transform: translateY(-2px);
}

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

/* ---- Responsive Adjustments ---- */
@media (max-width: 768px) {
    .hero-headline {
        font-size: 2.75rem !important;
    }

    .hero-stats {
        gap: 8px !important;
    }

    .hero-stats > div {
        flex: 1;
        min-width: 0;
    }

    .hero-stats .font-serif {
        font-size: 2rem !important;
    }

    #about .grid > :first-child {
        order: 2;
    }

    .testimonial-card::after {
        font-size: 4rem;
        top: 12px;
        right: 16px;
    }
}

@media (max-width: 640px) {
    .hero-headline {
        font-size: 2.25rem !important;
    }

    .section-title {
        font-size: 2.25rem !important;
    }

    .lg\:py-32 {
        padding-top: 4rem !important;
        padding-bottom: 4rem !important;
    }
}

/* ---- Reduced Motion ---- */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* ---- Print ---- */
@media print {
    #navbar,
    #backToTop,
    #scrollIndicator {
        display: none !important;
    }

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