/* ============================================
   Pinkard Residential — 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 --- */
::selection {
    background: #065f46;
    color: #fdfbf7;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #fdfbf7;
}
::-webkit-scrollbar-thumb {
    background: #065f46;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #047857;
}

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

.hero-eyebrow span:first-child {
    animation: expandLine 0.6s ease forwards;
    animation-delay: 0.3s;
    transform-origin: left;
    transform: scaleX(0);
}

h1, .hero-sub {
    animation: fadeSlideUp 0.8s ease forwards;
    opacity: 0;
}

h1 {
    animation-delay: 0.4s;
}

.hero-sub {
    animation-delay: 0.6s;
}

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

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

@keyframes expandLine {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}

/* --- Scroll Reveal (Below the fold only) --- */
.reveal-up,
.reveal-left,
.reveal-right {
    /* Default: visible for progressive enhancement */
    opacity: 1;
    transform: none;
    transition: opacity 0.7s ease, transform 0.7s ease;
}

/* Animated states — applied via JS only */
.reveal-up.animating,
.reveal-left.animating,
.reveal-right.animating {
    opacity: 0;
}

.reveal-up.animating {
    transform: translateY(40px);
}

.reveal-left.animating {
    transform: translateX(-40px);
}

.reveal-right.animating {
    transform: translateX(40px);
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .reveal-up,
    .reveal-left,
    .reveal-right {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
    
    .hero-eyebrow,
    h1,
    .hero-sub,
    .hero-ctas {
        animation: none !important;
        opacity: 1 !important;
    }
}

/* --- Navbar --- */
#navbar {
    background: transparent;
    color: #fdfbf7;
}

#navbar.scrolled {
    background: rgba(2, 44, 34, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(245, 237, 214, 0.1);
}

/* --- Mobile Menu --- */
.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.05s; }
#mobileMenu.open .mobile-link:nth-child(2) { transition-delay: 0.1s; }
#mobileMenu.open .mobile-link:nth-child(3) { transition-delay: 0.15s; }
#mobileMenu.open .mobile-link:nth-child(4) { transition-delay: 0.2s; }
#mobileMenu.open .mobile-link:nth-child(5) { transition-delay: 0.25s; }

/* --- Menu Button Animation --- */
#menuBtn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(3px, 3px);
}
#menuBtn.active .menu-line:nth-child(2) {
    opacity: 0;
}
#menuBtn.active .menu-line:nth-child(3) {
    width: 6rem;
    transform: rotate(-45deg) translate(3px, -3px);
}

/* --- Area Cards Image Hover --- */
.group:hover .group-hover\:scale-110 {
    transform: scale(1.1);
}

/* --- Form Select Arrow --- */
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='%23065f46' 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");
}

/* --- Map Overlay Gradient --- */
.map-overlay {
    pointer-events: none;
}

/* --- Button Focus Styles --- */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #34d399;
    outline-offset: 2px;
}

/* --- Print Styles --- */
@media print {
    #navbar,
    #mobileMenu,
    .reveal-up,
    .reveal-left,
    .reveal-right {
        display: block !important;
        opacity: 1 !important;
    }
    
    section {
        page-break-inside: avoid;
    }
}
