/* ========================================
   WILSON HOMES GROUP — CUSTOM STYLES
   ======================================== */

/* Base & Reset */
*, *::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: #D4A017;
    color: #4A233A;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #25101d;
}
::-webkit-scrollbar-thumb {
    background: #693055;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #D4A017;
}

/* Header */
#site-header {
    transition: background-color 0.4s ease, backdrop-filter 0.4s ease, box-shadow 0.4s ease;
}

#site-header.scrolled {
    background-color: rgba(37, 16, 29, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(212, 160, 23, 0.1);
}

.nav-link {
    position: relative;
}

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

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

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

#mobile-menu.open .mobile-nav-link {
    animation: fadeUp 0.4s ease forwards;
}

#mobile-menu.open .mobile-nav-link:nth-child(1) { animation-delay: 0.05s; }
#mobile-menu.open .mobile-nav-link:nth-child(2) { animation-delay: 0.1s; }
#mobile-menu.open .mobile-nav-link:nth-child(3) { animation-delay: 0.15s; }
#mobile-menu.open .mobile-nav-link:nth-child(4) { animation-delay: 0.2s; }
#mobile-menu.open .mobile-nav-link:nth-child(5) { animation-delay: 0.25s; }

.menu-line {
    transition: transform 0.3s ease, opacity 0.3s ease, width 0.3s ease;
}

#menu-btn.active .menu-line:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}
#menu-btn.active .menu-line:nth-child(2) {
    opacity: 0;
}
#menu-btn.active .menu-line:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
    width: 24px;
}

/* Hero animations */
.hero-eyebrow {
    animation: slideUp 0.8s ease forwards;
    opacity: 0;
    transform: translateY(20px);
}

.hero-title {
    animation: slideUp 0.8s ease 0.15s forwards;
    opacity: 0;
    transform: translateY(30px);
}

.hero-subtitle {
    animation: slideUp 0.8s ease 0.3s forwards;
    opacity: 0;
    transform: translateY(20px);
}

.hero-cta {
    animation: slideUp 0.8s ease 0.45s forwards;
    opacity: 0;
    transform: translateY(20px);
}

.hero-stats {
    animation: slideUp 0.8s ease 0.6s forwards;
    opacity: 0;
    transform: translateY(20px);
}

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

@keyframes slideUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

/* Section animations (scroll-triggered) */
.section-eyebrow,
.section-title {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.section-eyebrow.visible,
.section-title.visible {
    opacity: 1;
    transform: translateY(0);
}

.section-eyebrow {
    transition-delay: 0.1s;
}

.section-title {
    transition-delay: 0.2s;
}

/* Service cards */
.service-card {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease, border-color 0.5s ease;
}

.service-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.service-card:hover {
    transform: translateY(-4px) !important;
}

/* Listing cards */
.listing-card {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.listing-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.listing-card:hover {
    transform: translateY(-4px) !important;
}

/* Testimonial cards */
.testimonial-card {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.testimonial-card.visible {
    opacity: 1;
    transform: translateY(0);
}

/* About image stack */
.about-image-stack {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.about-image-stack.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Contact form */
#contact-form {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

#contact-form.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 767px) {
    .hero-title {
        font-size: 3.5rem;
    }

    .section-title {
        font-size: 2.75rem;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .hero-title {
        font-size: 5rem;
    }
}

/* Focus styles */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid #D4A017;
    outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    html {
        scroll-behavior: auto;
    }
}
