/*
Theme Name: MortgageFlow
Theme URI: https://mortgageflow.com
Author: Antigravity AI
Author URI: https://mortgageflow.com
Description: A modern, premium B2B SaaS landing page theme for MortgageFlow, featuring a clean light/grey aesthetics.
Version: 1.1.0
Text Domain: mortgageflow
*/

:root {
    /* Core Foundation - Light Theme */
    --bg-primary: #f8fafc;
    /* Very light slate */
    --bg-secondary: #ffffff;
    /* Pure white surface */
    --bg-card: #ffffff;
    /* White card */
    --bg-card-hover: #f1f5f9;
    /* Slight grey on hover */

    --text-primary: #0f172a;
    /* Dark slate */
    --text-secondary: #475569;
    /* Muted dark slate */
    --text-muted: #64748b;

    /* Vibrant Accents */
    --accent-blue-strong: #2563eb;
    --accent-blue-light: #60a5fa;
    --accent-green-strong: #16a34a;
    --accent-purple-strong: #9333ea;
    --accent-red-strong: #dc2626;
    --accent-sky-strong: #0284c7;

    /* Utilities */
    --border-color: #e2e8f0;
    /* Light border */
    --border-radius: 16px;
    --transition-speed: 0.3s;

    --font-family-body: 'Inter', sans-serif;
    --font-family-heading: 'Outfit', sans-serif;

    --max-width: 1280px;
}

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

body {
    font-family: var(--font-family-body);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-family-heading);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

a {
    color: var(--accent-blue-strong);
    text-decoration: none;
    transition: color var(--transition-speed) ease;
}

a:hover {
    color: var(--accent-blue-light);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section-padding {
    padding: 100px 0;
}

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

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

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-family: var(--font-family-body);
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn-block {
    width: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-blue-strong), var(--accent-purple-strong));
    color: #fff;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.35);
    color: #fff;
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.btn-secondary:hover {
    background: var(--bg-card-hover);
    border-color: #cbd5e1;
}

/* --- Header / Nav --- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

.site-title {
    font-size: 1.5rem;
    margin: 0;
    font-family: var(--font-family-heading);
}

.site-title a {
    color: var(--text-primary);
}

.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.main-navigation a {
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.95rem;
}

.main-navigation a:hover {
    color: var(--accent-blue-strong);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
}

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

/* --- Reveal Animations --- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 {
    transition-delay: 0.1s;
}

.delay-2 {
    transition-delay: 0.2s;
}

/* --- Text Utilities --- */
.text-gradient {
    background: linear-gradient(135deg, var(--accent-blue-strong), var(--accent-purple-strong));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: #eff6ff;
    color: var(--accent-blue-strong);
    border-radius: 100px;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
    border: 1px solid rgba(37, 99, 235, 0.1);
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 3rem;
}

/* --- Custom Badges --- */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge.blue {
    background: #eff6ff;
    color: #2563eb;
    border: 1px solid rgba(37, 99, 235, 0.2);
}

.badge.sky {
    background: #f0f9ff;
    color: #0284c7;
    border: 1px solid rgba(2, 132, 199, 0.2);
}

.badge.emerald {
    background: #ecfdf5;
    color: #16a34a;
    border: 1px solid rgba(22, 163, 74, 0.2);
}

.badge.purple {
    background: #faf5ff;
    color: #9333ea;
    border: 1px solid rgba(147, 51, 234, 0.2);
}

/* --- Glass Panel & Cards --- */
.glass-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

.glass-panel-inner {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

/* --- Hero Section --- */
.hero-section {
    position: relative;
    padding: 180px 0 100px;
    overflow: hidden;
    background: radial-gradient(circle at top right, rgba(37, 99, 235, 0.05), transparent 60%), radial-gradient(circle at bottom left, rgba(147, 51, 234, 0.05), transparent 60%);
}

.hero-bg-glow {
    display: none;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-title {
    font-size: 4rem;
    letter-spacing: -1px;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    color: var(--text-primary);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 500px;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
}

.hero-stats {
    display: flex;
    gap: 2rem;
    border-top: 1px solid var(--border-color);
    padding-top: 2rem;
}

.stat-item strong {
    display: block;
    font-size: 1.75rem;
    color: var(--text-primary);
    font-family: var(--font-family-heading);
}

.stat-item span {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* --- Dashboard Mockup --- */
.dashboard-mockup {
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transform: perspective(1000px) rotateY(-5deg) rotateX(2deg);
    transition: transform 0.5s ease;
    border: 1px solid var(--border-color);
}

.dashboard-mockup:hover {
    transform: perspective(1000px) rotateY(0deg) rotateX(0deg);
}

.mockup-header {
    background: #f8fafc;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.mockup-nav {
    display: flex;
    gap: 6px;
}

.mockup-nav span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #cbd5e1;
}

.mockup-nav span:nth-child(1) {
    background: #ef4444;
}

.mockup-nav span:nth-child(2) {
    background: #eab308;
}

.mockup-nav span:nth-child(3) {
    background: #22c55e;
}

.mockup-title {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.mockup-body {
    padding: 1.5rem;
    background: var(--bg-secondary);
}

.mockup-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.mockup-stat-card {
    padding: 1rem;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid var(--border-color);
}

.mockup-stat-card .stat-val {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0.5rem 0 0.25rem;
    font-family: var(--font-family-heading);
}

.mockup-stat-card .stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.mockup-stat-card.green-accent .stat-val {
    color: var(--accent-green-strong);
}

.mockup-stat-card.blue-accent .stat-val {
    color: var(--accent-blue-strong);
}

.mockup-stat-card.sky-accent .stat-val {
    color: var(--accent-sky-strong);
}

.mockup-stat-card.emerald-accent .stat-val {
    color: var(--accent-green-strong);
}

.mockup-chart-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1rem;
}

.mockup-chart {
    height: 120px;
    background: linear-gradient(180deg, rgba(37, 99, 235, 0.05) 0%, rgba(37, 99, 235, 0) 100%);
}

.mockup-list {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.list-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.list-item .avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e2e8f0;
}

.list-item .info {
    flex-grow: 1;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    margin: 0 1rem;
    max-width: 60px;
}

/* --- General Features Grid (used on front-page & features page) --- */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 4rem;
}

.feature-card {
    padding: 2.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: var(--bg-card);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: #fff;
}

.feature-icon.blue-gradient {
    background: linear-gradient(135deg, var(--accent-blue-strong), var(--accent-blue-light));
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.2);
}

.feature-icon.green-gradient {
    background: linear-gradient(135deg, var(--accent-green-strong), #22c55e);
    box-shadow: 0 4px 10px rgba(22, 163, 74, 0.2);
}

.feature-icon.purple-gradient {
    background: linear-gradient(135deg, var(--accent-purple-strong), #c084fc);
    box-shadow: 0 4px 10px rgba(147, 51, 234, 0.2);
}

.feature-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.feature-desc {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.feature-link {
    font-weight: 600;
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
    color: var(--accent-blue-strong);
}

/* List Features layout (for long lists) */
.feature-list-layout {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    margin-top: 3rem;
}

.feature-row {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 4rem;
    align-items: center;
    padding: 3rem 0;
    border-bottom: 1px solid var(--border-color);
}

.feature-row:nth-child(even) .feature-row-image {
    order: -1;
}

.feature-row-image img {
    width: 100%;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.feature-row-image img:hover {
    transform: translateY(-5px) scale(1.02);
}

.feature-row:last-child {
    border-bottom: none;
}

.feature-row-content h3 {
    font-size: 2rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.feature-row-content p {
    color: var(--text-secondary);
    font-size: 1.125rem;
    margin-bottom: 1rem;
}

.feature-row-list {
    list-style: none;
}

.feature-row-list li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.feature-row-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--accent-green-strong);
    font-weight: bold;
}

.feature-benefit {
    margin-top: 1.5rem;
    padding: 1rem;
    background: #f0fdf4;
    border-left: 4px solid var(--accent-green-strong);
    color: #166534;
    font-weight: 500;
    border-radius: 0 8px 8px 0;
}

/* --- Audience Section --- */
.audience-section {
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.audience-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 4rem;
    align-items: center;
}

.audience-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
}

.audience-item {
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--bg-card);
}

.audience-item h4 {
    margin-bottom: 0.5rem;
    font-size: 1.125rem;
}

.audience-item p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.audience-item:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.audience-item.active {
    border-color: var(--accent-blue-strong);
    background: #eff6ff;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1);
}

.audience-visual-content {
    position: relative;
    height: 100%;
    min-height: 400px;
}

.audience-visual-card {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    background: linear-gradient(145deg, rgba(37, 99, 235, 0.05), rgba(147, 51, 234, 0.05));
    border: 1px solid var(--border-color);
    border-radius: 24px;
    opacity: 0;
    transition: all 0.5s ease;
    pointer-events: none;
    transform: translateY(20px);
}

.audience-visual-card.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05);
    background: var(--bg-card);
}

/* --- CTA Section / Form --- */
.cta-box {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    overflow: hidden;
    border-radius: 24px;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05);
}

.cta-content {
    padding: 4rem;
    background: linear-gradient(135deg, var(--bg-primary), #e2e8f0);
}

.cta-benefits {
    list-style: none;
    margin-top: 2rem;
}

.cta-benefits li {
    padding: 0.5rem 0;
    color: var(--text-primary);
    font-weight: 500;
}

.cta-form-wrapper {
    padding: 4rem;
    background: var(--bg-secondary);
    border-left: 1px solid var(--border-color);
}

.lead-form h3 {
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.875rem 1rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-family-body);
    transition: all 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent-blue-strong);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    background: #fff;
}

.form-disclaimer {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: 1rem;
}

.form-success {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    height: 100%;
    min-height: 300px;
}

.form-success .success-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #dcfce7;
    color: #16a34a;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin-bottom: 1.5rem;
}

.hidden {
    display: none !important;
}

/* --- Footer --- */
.site-footer {
    padding: 4rem 0 2rem;
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 4rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 3rem;
    margin-bottom: 2rem;
}

.footer-brand p {
    margin-top: 1rem;
    max-width: 300px;
    color: var(--text-secondary);
}

.footer-widget h3 {
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.footer-widget ul {
    list-style: none;
}

.footer-widget ul li {
    margin-bottom: 0.75rem;
}

.footer-widget ul li a {
    color: var(--text-secondary);
}

.footer-widget ul li a:hover {
    color: var(--accent-blue-strong);
}

.site-info {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* --- Page Header for Inner Pages --- */
.page-header-banner {
    padding: 160px 0 80px;
    background: linear-gradient(135deg, var(--bg-primary), #e2e8f0);
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.page-header-banner h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

.page-header-banner p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-subtitle {
        margin: 0 auto 2.5rem;
    }

    .hero-cta {
        justify-content: center;
    }

    .hero-stats {
        justify-content: center;
    }

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

    .audience-grid {
        grid-template-columns: 1fr;
    }

    .cta-box {
        grid-template-columns: 1fr;
    }

    .cta-form-wrapper {
        border-left: none;
        border-top: 1px solid var(--border-color);
    }

    .page-header-banner h1 {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .header-actions {
        display: none;
    }

    .main-navigation ul {
        display: none;
        position: absolute;
        top: 80px;
        left: 0;
        right: 0;
        background: var(--bg-secondary);
        padding: 2rem;
        flex-direction: column;
        text-align: center;
        border-bottom: 1px solid var(--border-color);
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    }

    .main-navigation.active ul {
        display: flex;
    }

    .menu-toggle {
        display: block;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-cta {
        flex-direction: column;
    }

    .hero-stats {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
        border-top: none;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .feature-row {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 1rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .cta-content,
    .cta-form-wrapper {
        padding: 2.5rem 1.5rem;
    }
}