/* ============================================
   Chaney Abbott — Guaranteed Rate
   Bold Editorial Mortgage Lending Website
   ============================================ */

/* --- 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: #1B4332;
    color: #FEFCF3;
}

/* --- Custom Scrollbar --- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #FDF8E8;
}
::-webkit-scrollbar-thumb {
    background: #1B4332;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #2D6A4F;
}

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

#site-header.scrolled {
    background: rgba(254, 252, 243, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(27, 67, 50, 0.08);
}

.nav-link {
    position: relative;
}

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

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

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

h1 {
    animation: slideUp 0.8s ease 0.15s forwards;
    opacity: 0;
    transform: translateY(20px);
}

h1 ~ p {
    animation: slideUp 0.8s ease 0.3s forwards;
    opacity: 0;
    transform: translateY(20px);
}

h1 ~ p ~ * {
    animation: slideUp 0.8s ease 0.45s forwards;
    opacity: 0;
    transform: translateY(20px);
}

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

.scroll-line {
    animation: scrollDown 1.5s ease-in-out infinite;
}

@keyframes scrollDown {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(200%); }
}

/* --- Section Tags --- */
.section-tag {
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.section-tag.visible {
    opacity: 1;
    transform: translateY(0);
}

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

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

/* --- Process Steps --- */
.process-step {
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.process-step.visible {
    opacity: 1;
    transform: translateX(0);
}

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

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

/* --- Mobile Menu --- */
#mobile-menu {
    opacity: 0;
    pointer-events: none;
}

#mobile-menu.active {
    opacity: 1;
    pointer-events: all;
}

#mobile-menu.active .mobile-menu-link {
    animation: menuLinkIn 0.4s ease forwards;
    opacity: 0;
    transform: translateY(15px);
}

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

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

/* --- Mobile Menu Toggle --- */
.menu-line {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

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

/* --- Form --- */
#contact-form input,
#contact-form select,
#contact-form textarea {
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

#contact-form input:focus,
#contact-form select:focus,
#contact-form textarea:focus {
    border-color: #1B4332;
    box-shadow: 0 0 0 3px rgba(27, 67, 50, 0.1);
}

/* --- General Animations --- */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

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

@media (min-width: 768px) and (max-width: 1023px) {
    /* Tablet adjustments */
}
