/* ===================================================================
   INSTITUTIONAL-GRADE FINTECH REFINEMENT
   BALANCED SPACING - Dense but breathable
   =================================================================== */

/* ===================================================================
   1. GLOBAL SPACING HARMONIZATION - BALANCED
   =================================================================== */

:root {
    /* Balanced Section Spacing */
    --section-spacing: 90px;
    --section-spacing-compact: 70px;
    
    /* Container Standards */
    --container-max: 1140px;
    --container-padding: 20px;
    
    /* Card Standards */
    --card-padding: 28px;
    --card-radius: 16px;
    --card-gap: 24px;
    
    /* Micro Spacing */
    --space-xs: 8px;
    --space-sm: 12px;
    --space-md: 20px;
    --space-lg: 28px;
    --space-xl: 40px;
    
    /* Typography Scale */
    --text-xs: 0.875rem;
    --text-sm: 0.9375rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
}

/* ===================================================================
   2. HEADER REFINEMENT - CONTROL BAR PRECISION
   =================================================================== */

.header {
    height: 80px;
    display: flex;
    align-items: center;
}

.navbar {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 48px;
}

.logo {
    height: 50px;
    display: flex;
    align-items: center;
}

/* Logo - Original Image (No Filters) */
.logo img {
    filter: none;
    opacity: 1;
    transition: opacity 0.3s ease;
}

/* Navigation - Equal Spacing */
.nav-menu {
    display: flex;
    gap: 40px;
    align-items: center;
    margin: 0;
    padding: 0;
}

.nav-menu a {
    font-size: 0.9375rem;
    font-weight: 600;
    padding: 8px 16px;
    position: relative;
    transition: all 0.25s ease;
}

/* Refined Hover Underline */
.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--color-primary);
    transition: width 0.3s ease;
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
    width: 80%;
}

.nav-menu a.active {
    color: var(--color-primary);
    background: var(--surface-1);
}

/* Dark Mode Header Contrast */
body[data-theme="dark"] .header {
    background: rgba(15, 23, 42, 0.95);
    border-bottom-color: rgba(148, 163, 184, 0.15);
}

/* ===================================================================
   3. HERO SECTION - BALANCED STRUCTURE (NO 100vh)
   =================================================================== */

.hero-premium {
    padding: 100px 0 80px;
    min-height: auto;
}

/* Hero Content - 60/40 Ratio */
.hero-content-premium {
    display: flex;
    gap: 60px;
    align-items: center;
}

.hero-text-premium {
    flex: 1.2;
}

.hero-form-premium {
    flex: 0.8;
}

/* Headline Strength - Tighter Line Height */
.hero-headline {
    font-size: 3.25rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.5px;
    margin-bottom: 18px;
}

/* Subtext Proximity */
.hero-subtext {
    font-size: 1.1875rem;
    line-height: 1.6;
    margin-bottom: 24px;
    max-width: 580px;
}

/* Trust Badges - Tighter Spacing */
.hero-trust-badges {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 24px;
    margin-bottom: 20px;
}

.trust-badge {
    padding: 10px 14px;
    justify-content: flex-start;
}

.trust-badge i {
    font-size: 1.125rem;
    width: 20px;
    flex-shrink: 0;
}

/* Hero Status Refinement */
.hero-status {
    margin-top: 20px;
}

/* Form Container - Balanced Padding */
.form-card-premium {
    padding: 32px 28px;
    background: var(--surface-card);
}

/* Dark Mode Form Surface */
body[data-theme="dark"] .form-card-premium {
    background: rgba(30, 41, 59, 0.95);
    border-color: rgba(148, 163, 184, 0.2);
}

.form-title {
    font-size: 1.625rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.form-subtitle {
    font-size: 0.9375rem;
    margin-bottom: 24px;
}

.lead-form-premium .form-group {
    margin-bottom: 18px;
}

.form-label {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 6px;
}

/* Reduced Hero Background Decoration */
.hero-premium::after {
    opacity: 0.35;
}

.hero-background::after {
    opacity: 0.25;
}

/* ===================================================================
   4. SERVICES SECTION - BALANCED STRUCTURE
   =================================================================== */

.services-section {
    padding: var(--section-spacing) 0;
    background: linear-gradient(to bottom, var(--surface-0) 0%, var(--surface-1) 100%);
}

.services-grid {
    gap: 22px;
}

.service-card {
    padding: 26px 22px;
    transition: all 0.25s ease;
}

.service-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.12);
}

.service-card i {
    font-size: 2.5rem;
    margin-bottom: 14px;
}

.service-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.3;
}

.service-card p {
    font-size: 0.9375rem;
    line-height: 1.6;
    max-width: 320px;
    margin: 0;
}

/* Dark Mode Services */
body[data-theme="dark"] .services-section {
    background: linear-gradient(to bottom, #0f172a 0%, #1e293b 100%);
}

body[data-theme="dark"] .service-card {
    background: rgba(30, 41, 59, 0.8);
    border-color: rgba(148, 163, 184, 0.1);
}

/* ===================================================================
   5. WORKFLOW SECTION - BALANCED ENGINEERING
   =================================================================== */

.how-it-works {
    padding: var(--section-spacing) 0;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.2;
}

.section-subtitle {
    font-size: 1.0625rem;
    line-height: 1.6;
    max-width: 560px;
    margin: 0 auto;
}

/* Workflow Timeline - Balanced Alignment */
.workflow-timeline {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 28px;
    margin-bottom: 50px;
}

.step-number {
    width: 36px;
    height: 36px;
    font-size: 0.8125rem;
    font-weight: 700;
    top: -18px;
}

.step-content {
    padding: 40px 22px 22px;
}

.step-icon {
    width: 54px;
    height: 54px;
    margin-bottom: 14px;
    border-radius: 10px;
}

.step-icon i {
    font-size: 1.5rem;
}

.step-title {
    font-size: 1.0625rem;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.3;
}

.step-description {
    font-size: 0.9375rem;
    line-height: 1.55;
    max-width: 280px;
    margin: 0 auto;
}

/* Connector Line Visibility */
.step-connector {
    height: 2px;
    background: var(--border-color);
    opacity: 0.6;
}

/* Workflow Note Separation */
.workflow-note {
    margin-top: 50px;
    padding: 18px 22px;
}

.workflow-note p {
    font-size: 0.9375rem;
    line-height: 1.6;
}

/* ===================================================================
   6. VISUAL HIERARCHY - CLEAR LEVELS
   =================================================================== */

/* H1 - Authority */
h1 {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

/* H2 - Section Clarity */
h2 {
    font-size: 2.25rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.015em;
}

/* H3 - Card Title */
h3 {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.3;
}

/* Body Text */
p {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

/* Muted Text */
.text-muted,
.section-subtitle,
.form-subtitle {
    opacity: 0.85;
}

/* ===================================================================
   7. DARK MODE - LAYERED DEPTH
   =================================================================== */

/* Dark Mode Surface Layers */
body[data-theme="dark"] {
    --surface-0: #0f172a;
    --surface-1: #1e293b;
    --surface-2: #334155;
    --surface-card: rgba(30, 41, 59, 0.9);
}

/* Section Background Layers */
body[data-theme="dark"] .section-surface {
    background: var(--surface-1);
}

/* Card Elevation in Dark Mode */
body[data-theme="dark"] .card,
body[data-theme="dark"] .service-card,
body[data-theme="dark"] .partner-card,
body[data-theme="dark"] .step-content {
    background: rgba(30, 41, 59, 0.85);
    border-color: rgba(148, 163, 184, 0.12);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* Text Contrast */
body[data-theme="dark"] h1,
body[data-theme="dark"] h2,
body[data-theme="dark"] h3 {
    color: #f1f5f9;
}

body[data-theme="dark"] p,
body[data-theme="dark"] .text-secondary {
    color: #cbd5e1;
}

/* ===================================================================
   8. MICRO-UX POLISH - SUBTLE INTERACTIONS
   =================================================================== */

/* Smooth Transitions */
* {
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Button Elevation */
.btn {
    transition: all 0.25s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn:active {
    transform: translateY(0);
    transition-duration: 0.1s;
}

/* Card Hover - Subtle */
.card:hover,
.service-card:hover,
.partner-card:hover {
    transform: translateY(-3px);
    transition: all 0.25s ease;
}

/* Focus States */
.btn:focus-visible,
.form-input:focus-visible,
.form-select:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* Theme Toggle Refinement */
.theme-btn {
    transition: all 0.2s ease;
}

.theme-dropdown {
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===================================================================
   9. FOOTER - INSTITUTIONAL SEPARATION
   =================================================================== */

.footer {
    padding: 60px 0 28px;
    margin-top: 70px;
    background: linear-gradient(180deg, transparent 0%, var(--surface-0) 10%, var(--surface-1) 30%);
    border-top: 1px solid var(--border-color);
}

/* Footer Logo - Original Image */
.footer img[alt="FinServe2India"] {
    filter: none;
    opacity: 1;
}

.footer-content {
    gap: 44px;
    margin-bottom: 36px;
}

.footer-section h4 {
    font-size: 1.0625rem;
    font-weight: 700;
    margin-bottom: 14px;
}

.footer-section p,
.footer-section li {
    font-size: 0.9375rem;
    line-height: 1.7;
}

.disclaimer {
    font-size: 0.875rem;
    line-height: 1.7;
    opacity: 0.75;
    margin-bottom: 18px;
    padding: 18px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    border-left: 3px solid var(--color-primary);
}

/* Dark Mode Footer */
body[data-theme="dark"] .footer {
    background: linear-gradient(180deg, var(--surface-0) 0%, var(--surface-1) 100%);
    border-top-color: rgba(148, 163, 184, 0.1);
}

/* ===================================================================
   10. PARTNERS SECTION REFINEMENT
   =================================================================== */

.partners-section {
    padding: var(--section-spacing-compact) 0;
    background: var(--surface-0);
}

.partners-grid {
    gap: 24px;
}

.partner-card {
    padding: 24px 18px;
    transition: all 0.25s ease;
}

.partner-card:hover {
    transform: translateY(-3px);
}

.partner-card img {
    max-width: 110px;
    height: 65px;
}

/* ===================================================================
   11. WHY CHOOSE SECTION REFINEMENT
   =================================================================== */

.why-choose-section {
    padding: var(--section-spacing-compact) 0;
}

.why-grid {
    gap: 22px;
}

.why-item {
    padding: 26px 22px;
    text-align: center;
}

.why-icon {
    width: 54px;
    height: 54px;
    margin: 0 auto 14px;
}

.why-icon i {
    font-size: 1.5rem;
}

.why-item h3 {
    font-size: 1.125rem;
    margin-bottom: 8px;
}

.why-item p {
    font-size: 0.9375rem;
}

/* ===================================================================
   12. CONTAINER WIDTH CONTROL
   =================================================================== */

.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding-left: var(--container-padding);
    padding-right: var(--container-padding);
}

/* ===================================================================
   13. SECTION SPACING - BALANCED 90px
   =================================================================== */

.section {
    padding: var(--section-spacing) 0;
}

.section-surface {
    background: var(--surface-1);
}

/* Reduced margins between sections */
.section + .section {
    margin-top: 0;
}

/* ===================================================================
   14. RESPONSIVE REFINEMENT
   =================================================================== */

@media (max-width: 1366px) {
    .container {
        max-width: 1080px;
    }
}

@media (max-width: 968px) {
    .hero-content-premium {
        flex-direction: column;
        gap: 40px;
    }
    
    .hero-text-premium,
    .hero-form-premium {
        flex: 1;
    }
    
    .workflow-timeline {
        grid-template-columns: repeat(2, 1fr);
        gap: 32px;
    }
    
    .hero-headline {
        font-size: 2.5rem;
    }
}

/* ===================================================================
   15. UNIFIED MOBILE OVERRIDE SYSTEM
   =================================================================== */

@media (max-width: 768px) {
    /* Hero - Compact and Clean */
    .hero-premium {
        padding: 60px 20px 40px !important;
        min-height: auto !important;
    }
    
    .hero-headline {
        font-size: 32px !important;
        line-height: 1.15 !important;
        margin-bottom: 14px !important;
    }
    
    .hero-subtext {
        font-size: 16px !important;
        margin-bottom: 20px !important;
    }
    
    /* Trust Badges - Stack Vertically */
    .hero-trust-badges {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
        margin-top: 20px !important;
        margin-bottom: 16px !important;
    }
    
    .trust-badge {
        padding: 10px 12px !important;
    }
    
    /* Sections - Compact Spacing */
    .section {
        padding: 70px 20px !important;
    }
    
    .section-surface {
        padding: 70px 20px !important;
    }
    
    .section-header {
        margin-bottom: 44px !important;
    }
    
    /* Form - Full Width Compact */
    .form-card-premium {
        width: 100% !important;
        margin-top: 30px !important;
        padding: 24px 20px !important;
        box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35) !important;
    }
    
    /* Container - Consistent Padding */
    .container {
        padding: 0 20px !important;
        max-width: 100% !important;
    }
    
    /* Workflow - Clean Stack */
    .workflow-timeline {
        grid-template-columns: 1fr !important;
        gap: 40px !important;
    }
    
    .step-connector {
        display: none !important;
    }
    
    /* Typography - Mobile Scale */
    h1 {
        font-size: 2rem !important;
    }
    
    h2 {
        font-size: 1.75rem !important;
    }
    
    h3 {
        font-size: 1.125rem !important;
    }
    
    /* Footer - Compact */
    .footer {
        padding: 50px 20px 24px !important;
        margin-top: 60px !important;
    }
    
    /* Disable Heavy Visual Patterns */
    .hero-premium::before,
    .hero-premium::after,
    .hero-background::before,
    .hero-background::after {
        display: none !important;
    }
}

/* ===================================================================
   16. CONSISTENCY CHECKS
   =================================================================== */

/* Remove inconsistent margins */
h1, h2, h3, h4, h5, h6 {
    margin: 0;
}

/* Card consistency */
.card,
.service-card,
.partner-card,
.why-item,
.step-content {
    border-radius: var(--card-radius);
}
