/* ============================================
   Nathan Hancock Realtor — Custom Styles
   ============================================ */

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    min-height: 100vh;
    overflow-x: hidden;
}

::selection {
    background: #C2704E;
    color: #fff;
}

/* ---------- Buttons ---------- */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #C2704E;
    color: #fff;
    padding: 14px 28px;
    border-radius: 60px;
    font-size: 0.9375rem;
    font-weight: 500;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(194, 112, 78, 0.3);
}

.btn-primary:hover {
    background: #A85738;
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(194, 112, 78, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary .btn-arrow {
    transition: transform 0.3s ease;
}

.btn-primary:hover .btn-arrow {
    transform: translateX(4px);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    color: #524C44;
    padding: 14px 28px;
    border-radius: 60px;
    font-size: 0.9375rem;
    font-weight: 500;
    text-decoration: none;
    border: 1.5px solid #E8E6E0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    border-color: #C2704E;
    color: #C2704E;
    transform: translateY(-2px);
}

/* ---------- Navigation ---------- */
.nav-link {
    position: relative;
}

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

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

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

/* ---------- Mobile Menu ---------- */
#mobile-menu {
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mobile-nav-link {
    display: block;
    font-size: 1rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

/* ---------- Header Scroll State ---------- */
#site-header.scrolled {
    background: rgba(253, 248, 243, 0.92);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.06);
}

#site-header.scrolled .font-serif {
    color: #2A2520 !important;
}

#site-header.scrolled .text-warmgray-400 {
    color: #B0AAA0 !important;
}

/* ---------- Hero Animations ---------- */
.hero-anim {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 0.8s ease forwards;
}

.hero-anim:nth-child(2) {
    animation-delay: 0.15s;
}

.hero-anim:nth-child(3) {
    animation-delay: 0.3s;
}

.hero-anim:nth-child(4) {
    animation-delay: 0.45s;
}

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

/* ---------- Reveal Animations ---------- */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s ease, transform 0.7s 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; }

/* ---------- Service Cards ---------- */
.service-card {
    position: relative;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

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

/* ---------- Neighborhood Cards ---------- */
.neighborhood-card {
    border-radius: 1.5rem;
}

.neighborhood-card img {
    transition: transform 0.6s ease;
}

/* ---------- Testimonial Cards ---------- */
.testimonial-card {
    transition: transform 0.3s ease, background 0.3s ease;
}

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

/* ---------- Form Styles ---------- */
#contact-form input,
#contact-form select,
#contact-form textarea {
    font-family: 'Inter', system-ui, sans-serif;
}

#contact-form input:focus,
#contact-form select:focus,
#contact-form textarea:focus {
    outline: none;
}

/* ---------- Smooth Scroll Offset ---------- */
section[id] {
    scroll-margin-top: 80px;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .font-serif {
        line-height: 1.15;
    }

    #hero h1 {
        font-size: 2.75rem;
    }

    .btn-primary,
    .btn-secondary {
        padding: 12px 22px;
        font-size: 0.875rem;
    }

    .reveal {
        transform: translateY(20px);
    }
}

@media (max-width: 640px) {
    #hero h1 {
        font-size: 2.25rem;
    }

    #hero .font-serif {
        font-size: 2rem;
    }

    #contact-form {
        padding: 1.5rem;
    }

    #contact-form .grid-cols-2 {
        grid-template-columns: 1fr;
    }
}

/* ---------- 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;
    }
}

/* ---------- Focus Visible ---------- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #C2704E;
    outline-offset: 2px;
    border-radius: 4px;
}
