/* ========================================
   CREST HOME BUYERS - CLEAN CSS STYLES
   ======================================== */

/* CSS Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* CSS Variables */
:root {
    /* Colors */
    --primary-color: #31445a;
    --primary-dark: #2a3a4f;
    --secondary-color: #efd299;
    --accent-color: #efd299;
    --nav-color: #31445a;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-light: #9ca3af;
    --background: #ffffff;
    --background-light: #f8f9fa;
    --background-dark: #111827;
    --border-color: #e5e7eb;
    --success-color: #10b981;
    --error-color: #ef4444;
    
    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;
    --font-size-4xl: 2.25rem;
    --font-size-5xl: 3rem;
    
    /* Spacing */
    --spacing-1: 0.25rem;
    --spacing-2: 0.5rem;
    --spacing-3: 0.75rem;
    --spacing-4: 1rem;
    --spacing-5: 1.25rem;
    --spacing-6: 1.5rem;
    --spacing-8: 2rem;
    --spacing-10: 2.5rem;
    --spacing-12: 3rem;
    --spacing-16: 4rem;
    --spacing-20: 5rem;
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Base Styles */
html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--background);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-4);
}

@media (min-width: 640px) {
    .container {
        padding: 0 var(--spacing-6);
    }
}

@media (min-width: 1024px) {
    .container {
        padding: 0 var(--spacing-8);
    }
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: var(--spacing-4);
}

h1 { font-size: var(--font-size-5xl); }
h2 { font-size: var(--font-size-4xl); }
h3 { font-size: var(--font-size-3xl); }
h4 { font-size: var(--font-size-2xl); }
h5 { font-size: var(--font-size-xl); }
h6 { font-size: var(--font-size-lg); }

p {
    margin-bottom: var(--spacing-4);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-3) var(--spacing-6);
    font-size: var(--font-size-base);
    font-weight: 500;
    text-decoration: none;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s ease;
    gap: var(--spacing-2);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--secondary-color);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--background);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* ========================================
   HEADER & NAVIGATION
   ======================================== */

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--nav-color);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar {
    padding: var(--spacing-4) 0;
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    height: 60px;
    width: auto;
    max-width: 250px;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: var(--spacing-8);
    margin: 0;
}

.nav-link {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--secondary-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: white;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.bar {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    transition: 0.3s;
}

/* ========================================
   HERO SECTION
   ======================================== */

/* Story animation removed - back to clean design */

/* ========================================
   HERO SECTION
   ======================================== */

.hero {
    padding: 120px 0 80px;
    background: var(--background-light);
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-12);
    align-items: center;
}

@media (min-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr 1fr;
    }
}

.hero-title {
    font-size: var(--font-size-5xl);
    font-weight: 700;
    color: #efd299;
    margin-bottom: var(--spacing-6);
    line-height: 1.1;
}

.hero-subtitle {
    font-size: var(--font-size-xl);
    color: var(--text-secondary);
    margin-bottom: var(--spacing-8);
    line-height: 1.6;
}

.impact-banner {
    background: #2f4157;
    padding: var(--spacing-8) 0;
    color: #efd299;
    box-shadow: var(--shadow-lg);
}

.impact-container {
    max-width: 1200px;
    display: flex;
    justify-content: center;
}

.impact-text {
    font-size: var(--font-size-4xl);
    font-weight: 600;
    letter-spacing: 1px;
    margin: 0 auto;
    text-transform: uppercase;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--spacing-3);
    text-align: center;
}

.impact-highlight {
    font-weight: 800;
    min-width: 80px;
    display: inline-block;
    color: #ffecb3;
}

.impact-plus {
    font-weight: 700;
    margin-right: var(--spacing-1);
    color: #ffecb3;
}

.hero-form {
    background: white;
    padding: var(--spacing-8);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-xl);
}

.form-group {
    position: relative;
    margin-bottom: var(--spacing-6);
}

.form-group input {
    width: 100%;
    padding: var(--spacing-4);
    font-size: var(--font-size-base);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.location-btn {
    position: absolute;
    right: var(--spacing-2);
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    padding: var(--spacing-2);
    cursor: pointer;
    transition: background 0.3s ease;
}

.location-btn:hover {
    background: var(--primary-dark);
}

/* ========================================
   SECTIONS
   ======================================== */

.section {
    padding: var(--spacing-20) 0;
}

.section-alt {
    background: var(--background-light);
}

.section-header {
    text-align: center;
    margin-bottom: var(--spacing-16);
}

.section-title {
    font-size: var(--font-size-4xl);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-4);
}

.section-subtitle {
    font-size: var(--font-size-xl);
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* ========================================
   COMPARISON TABLE
   ======================================== */

/* Override container constraints for comparison section */
#how-it-works .container {
    max-width: none;
    width: 100%;
    padding: 0;
}

.comparison-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-12);
    align-items: start;
    width: 100%;
    max-width: none;
    padding: 0 var(--spacing-4);
}

@media (min-width: 1024px) {
    .comparison-layout {
        grid-template-columns: 1fr 1.2fr;
        padding: 0 var(--spacing-8);
    }
}

.comparison-text {
    padding: var(--spacing-8) 0;
}

.comparison-title {
    font-size: var(--font-size-4xl);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-6);
    line-height: 1.1;
}

.company-logo {
    margin-bottom: var(--spacing-6);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: var(--spacing-3);
}

.logo-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
}

.logo-text {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.logo-text:last-child {
    color: var(--text-primary);
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: 1px;
}

.comparison-description {
    font-size: var(--font-size-lg);
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: var(--spacing-8);
}

.cta-button {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--secondary-color);
    border: none;
    padding: var(--spacing-4) var(--spacing-8);
    font-size: var(--font-size-lg);
    font-weight: 600;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.comparison-table {
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.table-header {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.header-cell {
    padding: var(--spacing-4) var(--spacing-6);
    text-align: center;
    font-weight: 700;
    font-size: var(--font-size-lg);
    color: white;
}

.header-crest {
    background: var(--primary-color);
}

.header-agent {
    background: var(--text-primary);
}

.comparison-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-bottom: 1px solid var(--border-color);
}

.comparison-row:last-child {
    border-bottom: none;
}

.row-cell {
    padding: var(--spacing-3) var(--spacing-6);
    display: flex;
    align-items: center;
    gap: var(--spacing-3);
    font-weight: 500;
    min-height: 50px;
}

.crest-cell {
    background: rgba(49, 68, 90, 0.05);
    color: var(--text-primary);
}

.agent-cell {
    background: white;
    color: var(--text-primary);
}

.check-icon {
    color: var(--success-color);
    font-size: var(--font-size-lg);
    flex-shrink: 0;
}

.x-icon {
    color: var(--error-color);
    font-size: var(--font-size-lg);
    flex-shrink: 0;
}

/* Responsive Design for Comparison Table */
@media (max-width: 768px) {
    .comparison-layout {
        gap: var(--spacing-8);
    }
    
    .comparison-title {
        font-size: var(--font-size-3xl);
    }
    
    .logo-text {
        font-size: 1.5rem;
    }
    
    .logo-text:last-child {
        font-size: 1rem;
    }
    
    .table-header {
        font-size: var(--font-size-base);
    }
    
    .header-cell {
        padding: var(--spacing-3) var(--spacing-4);
    }
    
    .row-cell {
        padding: var(--spacing-2) var(--spacing-4);
        font-size: var(--font-size-sm);
        min-height: 45px;
    }
}

/* ========================================
   ABOUT SECTION
   ======================================== */

.about-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-12);
    align-items: stretch;
}

@media (min-width: 1024px) {
    .about-content {
        grid-template-columns: 1fr 1fr;
    }
}

.about-description {
    font-size: var(--font-size-lg);
    color: var(--text-secondary);
    margin-bottom: var(--spacing-8);
    line-height: 1.6;
}

.features {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-4);
}

@media (min-width: 640px) {
    .features {
        grid-template-columns: repeat(2, 1fr);
    }
}

.feature {
    display: flex;
    align-items: center;
    gap: var(--spacing-3);
    color: var(--text-primary);
}

.feature i {
    color: var(--success-color);
    font-size: var(--font-size-lg);
}

.about-image {
    display: flex;
    justify-content: center;
    align-items: center;
    align-self: stretch;
    min-height: 340px;
}

.carousel-wrapper {
    position: relative;
    width: min(100%, 380px);
    max-width: 380px;
    aspect-ratio: 1 / 1;
    margin: 0 auto;
}

.carousel-track {
    position: absolute;
    inset: 0;
    border-radius: var(--radius-2xl);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    background: var(--background);
}

.carousel-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-slide.active {
    opacity: 1;
    z-index: 1;
}

@media (min-width: 1024px) {
    .about-image {
        justify-content: flex-end;
        min-height: 100%;
    }

    .carousel-wrapper {
        width: min(100%, 540px);
        max-width: 540px;
        aspect-ratio: 1 / 1;
    }
}

@media (max-width: 768px) {
    .about-content {
        gap: var(--spacing-10);
    }

    .about-image {
        order: 2;
        margin-bottom: var(--spacing-8);
        display: flex !important;
    }

    .about-text {
        order: 1;
    }

    .carousel-wrapper {
        width: min(100%, 340px);
    }
}

@media (max-width: 480px) {
    .about-image {
        min-height: 320px;
    }

    .carousel-wrapper {
        width: 100%;
        max-width: none;
    }
}

/* ========================================
   REVIEWS SECTION
   ======================================== */

.reviews-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-8);
}

@media (min-width: 768px) {
    .reviews-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.review {
    background: white;
    padding: var(--spacing-8);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    text-align: center;
}

.review-content {
    margin-bottom: var(--spacing-6);
}

.review-content p {
    font-style: italic;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

.review-author strong {
    color: var(--text-primary);
    font-weight: 600;
    display: block;
    margin-bottom: var(--spacing-1);
}

.review-author span {
    color: var(--text-light);
    font-size: var(--font-size-sm);
}

/* ========================================
   CONTACT SECTION
   ======================================== */

.contact-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-12);
}

@media (min-width: 1024px) {
    .contact-content {
        grid-template-columns: 1fr 1fr;
    }
}

.contact-description {
    font-size: var(--font-size-lg);
    color: var(--text-secondary);
    margin-bottom: var(--spacing-8);
    line-height: 1.6;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-4);
}

.contact-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-3);
    color: var(--text-primary);
}

.contact-item i {
    color: var(--primary-color);
    width: 20px;
}

.contact-form {
    background: white;
    padding: var(--spacing-8);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
}

.contact-form .form-group {
    margin-bottom: var(--spacing-6);
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: var(--spacing-4);
    font-size: var(--font-size-base);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: border-color 0.3s ease;
    font-family: var(--font-family);
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.contact-form textarea {
    resize: vertical;
    min-height: 120px;
}

/* ========================================
   FOOTER
   ======================================== */

.footer {
    background: var(--background-dark);
    color: white;
    padding: var(--spacing-16) 0 var(--spacing-8);
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-8);
    margin-bottom: var(--spacing-8);
}

@media (min-width: 768px) {
    .footer-content {
        grid-template-columns: repeat(3, 1fr);
    }
}

.footer-logo {
    height: 40px;
    width: auto;
    margin-bottom: var(--spacing-4);
}

.footer-section h4 {
    color: white;
    margin-bottom: var(--spacing-4);
}

.footer-section p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    margin: 0;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: var(--spacing-2);
}

.footer-section ul li a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: white;
}

.footer-section ul li i {
    margin-right: var(--spacing-2);
    width: 16px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: var(--spacing-8);
    text-align: center;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        box-shadow: var(--shadow-lg);
        transform: translateY(-100%);
        transition: transform 0.3s ease;
    }
    
    .nav-menu.active {
        transform: translateY(0);
    }
    
    .nav-list {
        flex-direction: column;
        gap: var(--spacing-4);
        padding: var(--spacing-6);
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .hero-title {
        font-size: var(--font-size-3xl);
    }
    
    .hero-subtitle {
        font-size: var(--font-size-lg);
    }
    
    .section-title {
        font-size: var(--font-size-3xl);
    }
    
    .hero-form {
        padding: var(--spacing-6);
    }

    .impact-text {
        font-size: var(--font-size-3xl);
        gap: var(--spacing-2);
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 100px 0 60px;
    }
    
    .hero-title {
        font-size: var(--font-size-2xl);
    }
    
    .btn {
        padding: var(--spacing-3) var(--spacing-6);
    }

    .impact-text {
        font-size: var(--font-size-2xl);
        flex-direction: column;
    }
}
