@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@700;800&family=Inter:wght@400;500;600&display=swap');

:root {
    --primary-color: #FCB161;
    /* The Lending Project Orange Dot */
    --primary-hover: #E59F54;
    --accent-color: #000000;
    /* Sharp Black Accent */
    --bg-deep: #FFFFFF;
    --bg-surface: #F9F9F9;
    --text-primary: #000000;
    --text-secondary: #555555;
    --glass-bg: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(0, 0, 0, 0.06);
    --card-shadow: 0 15px 40px rgba(0, 0, 0, 0.06);
    --max-width: 1200px;
    --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-deep);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
.montserrat {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* Header & Navigation */
header {
    background: #FFFFFF;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--glass-border);
}

nav {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 1.25rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-container {
    height: 60px;
    /* Circular logos need more height */
}

#site-logo {
    height: 100%;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
}

.nav-links a {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-secondary);
    transition: var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-color);
}

/* Hamburger Menu Icon */
.hamburger {
    display: none;
    cursor: pointer;
    z-index: 1001;
    background: none;
    border: none;
    padding: 0.5rem;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 2px;
    background: var(--text-primary);
    margin: 5px 0;
    transition: var(--transition);
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

.cta-button {
    background: var(--primary-color);
    color: #000;
    /* Contrast with Amber */
    padding: 0.8rem 1.8rem;
    border-radius: 6px;
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(252, 177, 97, 0.2);
}

.cta-button:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(252, 177, 97, 0.3);
}

.cta-button.secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--primary-color);
    box-shadow: none;
}

.cta-button.secondary:hover {
    background: rgba(252, 177, 97, 0.05);
    border-color: var(--primary-hover);
}

/* Hero Section with Video Background */
.hero {
    position: relative;
    width: 100%;
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 10rem 2rem;
    text-align: center;
    background: var(--accent-color); /* Dark base for video blending */
}

.video-background-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
}

.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    min-width: 100%;
    min-height: 100%;
    object-fit: cover;
    object-position: center;
    opacity: 0.45;
    filter: saturate(1.1) contrast(1.1);
    transform: translate(-50%, -50%);
    /* Safari specific fixes for background videos */
    -webkit-transform: translate(-50%, -50%) translateZ(0); 
    -webkit-backface-visibility: hidden;
    -webkit-perspective: 1000;
}

.hero-video-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, 
        rgba(0, 0, 0, 0.4) 0%, 
        transparent 50%, 
        rgba(0, 0, 0, 0.6) 100%);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: var(--max-width);
    margin: 0 auto;
}

.hero h1 {
    font-size: 4.5rem;
    font-weight: 800;
    margin-bottom: 2rem;
    line-height: 1.1;
    letter-spacing: -2px;
    color: #FFFFFF;
    text-shadow: 0 4px 50px rgba(0, 0, 0, 0.4);
}

.hero p {
    font-size: 1.4rem;
    color: rgba(255, 255, 255, 0.95);
    max-width: 850px;
    margin: 0 auto 3.5rem;
    padding: 2rem 3rem;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    line-height: 1.6;
}

/* Adjust buttons for video visibility */
.hero .cta-button.secondary {
    color: #FFFFFF;
    border-color: rgba(255, 255, 255, 0.4);
}

.hero .cta-button.secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #FFFFFF;
}

/* Slider Section */
.slider-container {
    background: #FFFFFF;
    border-radius: 16px;
    padding: 4.5rem;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.08);
    margin: 4rem auto;
    max-width: 1000px;
    border: 1px solid #F0F0F0;
}

.loan-display {
    margin-bottom: 3rem;
}

.loan-value {
    font-size: 4rem;
    font-weight: 800;
    color: var(--primary-color);
    font-family: 'Montserrat', sans-serif;
}

.slider-wrapper {
    position: relative;
    margin: 3rem 0;
}

input[type="range"] {
    position: relative;
    width: 100%;
    -webkit-appearance: none;
    appearance: none;
    height: 48px;
    background: transparent;
    outline: none;
    margin: 0;
    cursor: pointer;
    z-index: 5;
}

input[type="range"]::-webkit-slider-runnable-track {
    width: 100%;
    height: 8px;
    background: #EEEEEE;
    border-radius: 4px;
}

input[type="range"]::-moz-range-track {
    width: 100%;
    height: 8px;
    background: #EEEEEE;
    border-radius: 4px;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 36px;
    height: 36px;
    background: var(--primary-color);
    border: 4px solid var(--bg-surface);
    border-radius: 4px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(252, 177, 97, 0.4);
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    z-index: 6;
    margin-top: -14px; /* Center thumb on 8px track: (8-36)/2 */
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

.slider-custom-track {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 8px;
    background: #EAEAEA;
    border-radius: 4px;
    transform: translateY(-50%);
    z-index: 1;
}

.slider-fill {
    position: absolute;
    height: 100%;
    width: var(--progress, 0%);
    background: var(--primary-color);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.tick-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

.tick {
    width: 2px;
    height: 12px;
    background: #DDDDDD;
    transition: all 0.3s ease;
}

.tick-group.active .tick {
    background: var(--primary-color);
    height: 18px;
}

.tick-label {
    position: absolute;
    top: 30px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
}

.tick-group.active .tick-label {
    color: var(--primary-color);
}

/* Stats Counter Section */
.stats-section {
    padding: 6rem 2rem;
    background: var(--bg-deep);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 3rem;
    max-width: var(--max-width);
    margin: 0 auto;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-family: 'Montserrat', sans-serif;
}

.stat-label {
    font-size: 1rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

/* Reviews Section */
.reviews-section {
    padding: 8rem 2rem;
    background: var(--bg-surface);
}

.google-rating {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 4rem;
}

.rating-stars {
    color: #FFD700;
    font-size: 1.5rem;
}

.review-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
    max-width: var(--max-width);
    margin: 0 auto;
}

.review-card {
    background: #FFFFFF;
    padding: 2.5rem;
    border-radius: 12px;
    border: 1px solid #EDEDED;
    transition: var(--transition);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
}

.review-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
    box-shadow: 0 20px 50px rgba(252, 177, 97, 0.1);
}

.reviewer-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.reviewer-img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--bg-surface);
    overflow: hidden;
    /* Ensure image stays circular */
    border: 1px solid var(--glass-border);
}

.reviewer-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.reviewer-name {
    font-weight: 700;
    font-size: 1.1rem;
}

.review-text {
    font-style: italic;
    color: var(--text-secondary);
    line-height: 1.8;
}

/* Notification Popup */
.notification-popup {
    position: fixed;
    bottom: 30px;
    left: 30px;
    background: var(--primary-color);
    color: #000;
    /* Contrast with Amber */
    padding: 1.25rem 2rem;
    border-radius: 8px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    gap: 1rem;
    z-index: 2000;
    transform: translateX(-150%);
    transition: transform 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.notification-popup.active {
    transform: translateX(0);
}

.notification-icon {
    font-size: 1.5rem;
}

.notification-content {
    font-size: 0.95rem;
    font-weight: 500;
}

/* Features/Services Section */
#features {
    padding: 8rem 2rem;
    background: var(--bg-deep);
}

.section-title {
    font-size: 3rem;
    margin-bottom: 4rem;
    text-align: center;
    letter-spacing: -1px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
}

.card {
    background: #FFFFFF;
    padding: 3.5rem;
    border-radius: 12px;
    border: 1px solid #EDEDED;
    transition: var(--transition);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
}

.card:hover {
    background: #FFFFFF;
    border-color: var(--primary-color);
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(252, 177, 97, 0.15);
}

.card h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.card p {
    color: var(--text-secondary);
}

.house-viz {
    height: 450px;
    margin-top: 4rem;
    overflow: hidden;
    position: relative;
    border-radius: 12px;
}

.house-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    position: absolute;
    opacity: 0;
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.house-image.active {
    opacity: 1;
}

.disclaimer {
    margin-top: 3rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    border-top: 1px solid var(--glass-border);
    padding-top: 2rem;
}

/* Footer Update */
footer {
    background: #FFFFFF;
    padding: 6rem 2rem;
    border-top: 1px solid var(--glass-border);
}

.footer-col h4 {
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    font-family: 'Montserrat', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
}

.footer-content {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 4rem;
    text-align: center;
}


.footer-col ul li {
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
}

@media (max-width: 768px) {
    .hamburger {
        display: block;
    }

    .nav-links {
        position: fixed;
        right: -100%;
        top: 0;
        width: 75%;
        height: 100vh;
        background: #FFFFFF;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        transition: var(--transition);
        z-index: 1000;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.05);
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links a {
        font-size: 1.2rem;
        font-weight: 700;
        color: var(--text-primary);
    }

    .cta-button {
        display: none;
        /* Hide top CTA on mobile to keep header clean */
    }

    .hero h1 {
        font-size: 2.8rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }

    .notification-popup {
        bottom: 20px;
        left: 20px;
        right: 20px;
    }
}

/* Lender Marquee */
.lender-section {
    background: #FFFFFF;
    padding: 2rem 0;
    overflow: hidden;
    border-top: 1px solid var(--glass-border);
    border-bottom: 2px solid var(--primary-color);
    /* Amber border instead of lime */
}

.marquee-container {
    display: flex;
    overflow: hidden;
    user-select: none;
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.marquee-content {
    display: flex;
    flex-shrink: 0;
    gap: 6rem;
    animation: scroll 60s linear infinite;
    align-items: center;
    padding-left: 6rem;
    width: max-content;
}

.lender-item {
    flex: 0 0 auto;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: grayscale(1);
    opacity: 0.6;
    transition: all 0.3s ease;
}

.lender-item:hover {
    filter: grayscale(0);
    opacity: 1;
    transform: scale(1.1);
}

.lender-item img {
    max-width: 140px;
    max-height: 45px;
    width: auto;
    height: auto;
    object-fit: contain;
}

@keyframes scroll {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}

.lender-section:hover .marquee-content {
    animation-play-state: paused;
}