﻿:root {
    --primary-blue: #1e40af;
    --primary-light: #3b82f6;
    --accent-green: #10b981;
    --accent-orange: #f59e0b;
    --accent-red: #ef4444;
    --text-dark: #1f2937;
    --text-gray: #6b7280;
    --text-light: #9ca3af;
    --bg-gray: #f8fafc;
    --white: #ffffff;
    --border: #e5e7eb;
    --shadow-light: rgba(0, 0, 0, 0.05);
    --shadow-medium: rgba(0, 0, 0, 0.1);
    --shadow-heavy: rgba(0, 0, 0, 0.25);
    /* Visual scale set to 85% look */
    --base-scale: 0.85;
}

html {
    box-sizing: border-box;
    height: 100%;
    overflow-x: hidden;
    /* keep scrollbar always visible to avoid 1px layout shifts */
    overflow-y: scroll;
}

*, *::before, *::after {
    box-sizing: inherit;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--white);
    /* Apply the scale that matches 85% visual */
    transform: scale(var(--base-scale));
    transform-origin: top left;
    /* Compensate so the page fills viewport after scaling */
    width: calc(100% / var(--base-scale));
    min-height: calc(100vh / var(--base-scale));
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}


.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Enhanced Navigation */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 1.25rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar-scrolled {
    padding: 1rem 0;
    box-shadow: 0 4px 20px var(--shadow-light);
}

.navbar-brand {
    font-size: 1.75rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    transition: transform 0.3s ease;
}

    .navbar-brand:hover {
        transform: scale(1.05);
    }

.btn-login {
    background: var(--primary-blue);
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(30, 64, 175, 0.3);
}

    .btn-login:hover {
        background: var(--primary-light);
        color: white;
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(30, 64, 175, 0.4);
    }

/* Hero Section - Updated with background image */
.hero {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.7) 0%, rgba(118, 75, 162, 0.7) 100%), url('/images/background-image.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    filter: blur(0); /* Applied to the section itself for subtle blur */
    padding: 6rem 0 8rem;
    position: relative;
    overflow: hidden;
    color: white;
}

    /* Alternative approach with pseudo-element for more blur control */
    .hero::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: url('/images/background-image.jpg');
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        filter: blur(3px); /* Adjust blur amount as needed */
        z-index: -2;
    }

    .hero::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(135deg, rgba(102, 126, 234, 0.6) 0%, rgba(118, 75, 162, 0.6) 100%);
        z-index: -1;
    }

.hero-content {
    position: relative;
    z-index: 2;
}

/* Welcome Section */
.welcome-section {
    display: flex;
    align-items: center;
    margin-bottom: 4rem;
    gap: 4rem;
}

.welcome-text {
    flex: 1;
}

.welcome-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.welcome-subtitle {
    font-size: 1.4rem;
    opacity: 0.9;
    line-height: 1.5;
    font-weight: 400;
}

/* Enhanced Credit Score Meter */
.credit-meter-section {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.credit-gauge-container {
    width: 380px;
    height: 320px;
    position: relative;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 30px;
    padding: 2.5rem 2rem;
    box-shadow: 0 30px 100px rgba(0, 0, 0, 0.4), 0 15px 40px rgba(0, 0, 0, 0.3), inset 0 2px 0 rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(25px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    animation: floatGauge 8s ease-in-out infinite;
    overflow: hidden;
}

    .credit-gauge-container::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 6px;
        background: linear-gradient(90deg, var(--accent-red), var(--accent-orange), var(--accent-green));
        border-radius: 30px 30px 0 0;
    }

    .credit-gauge-container::after {
        content: '';
        position: absolute;
        top: -2px;
        left: -2px;
        right: -2px;
        bottom: -2px;
        background: linear-gradient(45deg, rgba(16, 185, 129, 0.1), rgba(59, 130, 246, 0.1), rgba(245, 158, 11, 0.1));
        border-radius: 32px;
        z-index: -1;
        animation: borderGlow 3s ease-in-out infinite alternate;
    }

@keyframes borderGlow {
    0% {
        opacity: 0.3;
    }

    100% {
        opacity: 0.8;
    }
}

@keyframes floatGauge {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }

    33% {
        transform: translateY(-12px) rotate(1deg);
    }

    66% {
        transform: translateY(-6px) rotate(-1deg);
    }
}

.gauge-header {
    text-align: center;
    margin-bottom: 2rem;
}

.gauge-title {
    font-size: 1.3rem;
    font-weight: 900;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--primary-blue), var(--accent-green));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gauge-subtitle {
    font-size: 0.85rem;
    color: var(--text-gray);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.gauge-visual-container {
    position: relative;
    width: 100%;
    height: 160px;
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.credit-score-visual {
    width: 280px;
    height: 140px;
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    border-radius: 140px 140px 0 0;
    position: relative;
    box-shadow: inset 0 4px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.score-segments {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 140px 140px 0 0;
    overflow: hidden;
}

.segment {
    position: absolute;
    height: 100%;
    top: 0;
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.segment-poor {
    left: 0;
    width: 33.33%;
    background: linear-gradient(45deg, #ef4444, #dc2626);
    border-radius: 140px 0 0 0;
}

.segment-fair {
    left: 33.33%;
    width: 33.33%;
    background: linear-gradient(45deg, #f59e0b, #d97706);
}

.segment-good {
    left: 66.66%;
    width: 33.34%;
    background: linear-gradient(45deg, #10b981, #059669);
    border-radius: 0 140px 0 0;
}

.segment.active {
    box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.4), 0 0 25px rgba(255, 255, 255, 0.6);
    transform: scale(1.02);
    z-index: 2;
}

.score-needle {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 4px;
    height: 80px;
    background: linear-gradient(to top, var(--text-dark), #4b5563);
    border-radius: 2px 2px 0 0;
    transform-origin: bottom center;
    transform: translateX(-50%) rotate(-45deg);
    animation: needleMove 2s ease-out 1s forwards;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    z-index: 3;
}

    .score-needle::after {
        content: '';
        position: absolute;
        bottom: -8px;
        left: 50%;
        width: 16px;
        height: 16px;
        background: var(--text-dark);
        border-radius: 50%;
        transform: translateX(-50%);
        box-shadow: 0 0 15px rgba(0, 0, 0, 0.4);
    }

@keyframes needleMove {
    from {
        transform: translateX(-50%) rotate(-45deg);
    }

    to {
        transform: translateX(-50%) rotate(15deg);
    }
}

.score-center-display {
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    background: rgba(255, 255, 255, 0.95);
    padding: 0.75rem 1.5rem;
    border-radius: 20px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    z-index: 4;
}

.score-status {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--accent-green);
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    animation: fadeInUp 1s ease-out 2s both;
}

.score-description {
    font-size: 0.75rem;
    color: var(--text-gray);
    font-weight: 500;
    animation: fadeInUp 1s ease-out 2.2s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.gauge-labels {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding: 0 1rem;
}

.gauge-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.label-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-bottom: 0.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.label-poor .label-indicator {
    background: var(--accent-red);
}

.label-fair .label-indicator {
    background: var(--accent-orange);
}

.label-good .label-indicator {
    background: var(--accent-green);
}

.label-poor {
    color: var(--accent-red);
}

.label-fair {
    color: var(--accent-orange);
}

.label-good {
    color: var(--accent-green);
}

/* Enhanced Email Section */
.email-section {
    max-width: 700px;
    margin: 0 auto;
}

.email-form {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 60px;
    padding: 0.75rem;
    display: flex;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border: 3px solid transparent;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

    .email-form.focused {
        border-color: var(--accent-orange);
        transform: translateY(-8px);
        box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
    }

.email-input {
    flex: 1;
    border: none;
    padding: 1.5rem 2.5rem;
    border-radius: 50px;
    font-size: 1.2rem;
    outline: none;
    background: transparent;
    color: var(--text-dark);
}

    .email-input::placeholder {
        color: var(--text-light);
        font-style: italic;
    }

.email-submit {
    background: linear-gradient(135deg, var(--accent-orange), #d97706);
    color: white;
    border: none;
    padding: 1.5rem 3rem;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

    .email-submit::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
        transition: left 0.6s ease;
    }

    .email-submit:hover::before {
        left: 100%;
    }

    .email-submit:hover {
        transform: scale(1.05);
        box-shadow: 0 15px 40px rgba(245, 158, 11, 0.4);
    }

.success-message {
    background: var(--accent-green);
    color: white;
    padding: 1.5rem 2.5rem;
    border-radius: 50px;
    margin-top: 2rem;
    text-align: center;
    display: none;
    animation: slideUp 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 15px 40px rgba(16, 185, 129, 0.3);
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Optimized Benefits Section */
.benefits-section {
    padding: 6rem 0;
    background: linear-gradient(135deg, var(--bg-gray), #f1f5f9);
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-gray);
    max-width: 500px;
    margin: 0 auto;
}

.benefits-container {
    overflow: hidden;
    position: relative;
    margin-top: 2rem;
    will-change: transform;
}

.benefits-wrapper {
    display: flex;
    animation: smoothScroll 45s linear infinite;
    gap: 1.5rem;
    will-change: transform;
}

@keyframes smoothScroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.benefit-card {
    background: var(--white);
    border-radius: 20px;
    padding: 2rem 1.5rem;
    min-width: 280px;
    max-width: 280px;
    box-shadow: 0 8px 30px var(--shadow-light);
    border: 2px solid transparent;
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    overflow: hidden;
    flex-shrink: 0;
}

    .benefit-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 4px;
        background: linear-gradient(135deg, var(--primary-blue), var(--accent-green), var(--accent-orange));
        transform: scaleX(0);
        transition: transform 0.4s ease;
    }

    .benefit-card:hover::before {
        transform: scaleX(1);
    }

    .benefit-card:hover {
        transform: translateY(-10px) scale(1.02);
        box-shadow: 0 20px 50px var(--shadow-medium);
        border-color: rgba(59, 130, 246, 0.2);
    }

.benefit-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-light), var(--accent-green));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
    transition: transform 0.3s ease;
}

.benefit-card:hover .benefit-icon {
    transform: rotateY(180deg) scale(1.1);
}

.benefit-percentage {
    font-size: 2.5rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary-blue), var(--accent-green));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 0.75rem;
}

.benefit-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.benefit-description {
    color: var(--text-gray);
    font-size: 0.85rem;
    line-height: 1.5;
}

.benefits-container:hover .benefits-wrapper {
    animation-play-state: paused;
}

/* Loading Animation */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-light));
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.8s ease;
}

.loader {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top: 3px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.hidden {
    opacity: 0;
    pointer-events: none;
}

.scroll-indicator {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(59, 130, 246, 0.2);
    z-index: 1001;
}

.scroll-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-blue), var(--accent-green));
    width: 0%;
    transition: width 0.3s ease;
}

/* Enhanced Mobile Responsive Design */
@media (max-width: 1400px) {
    :root {
        --base-scale: 0.85;
    }
}

@media (max-width: 1200px) {
    :root {
        --base-scale: 0.9;
    }

    .welcome-section {
        gap: 2rem;
    }

    .welcome-title {
        font-size: 3rem;
    }

    .credit-gauge-container {
        width: 340px;
        height: 300px;
    }
}

@media (max-width: 992px) {
    :root {
        --base-scale: 0.95;
    }

    .welcome-title {
        font-size: 2.5rem;
    }

    .credit-gauge-container {
        width: 320px;
        height: 280px;
        padding: 2rem 1.5rem;
    }

    .benefit-card {
        min-width: 260px;
        max-width: 260px;
    }

    .benefits-wrapper {
        animation-duration: 50s;
    }
}

@media (max-width: 768px) {
    :root {
        --base-scale: 1;
    }

    .container {
        padding: 0 0.75rem;
    }

    .hero {
        padding: 4rem 0 6rem;
    }

    .welcome-section {
        flex-direction: row;
        gap: 2rem;
        align-items: center;
        margin-bottom: 3rem;
    }

    .welcome-text {
        flex: 1.2;
    }

    .credit-meter-section {
        flex: 0.8;
    }

    .welcome-title {
        font-size: 2rem;
    }

    .welcome-subtitle {
        font-size: 1.1rem;
    }

    .credit-gauge-container {
        width: 280px;
        height: 240px;
        padding: 1.5rem 1rem;
    }

    .gauge-title {
        font-size: 1rem;
    }

    .gauge-visual-container {
        height: 120px;
    }

    .credit-score-visual {
        width: 220px;
        height: 110px;
    }

    .score-needle {
        height: 60px;
    }

    .email-form {
        flex-direction: column;
        padding: 1.5rem;
        border-radius: 25px;
    }

    .email-input {
        margin-bottom: 1rem;
        border-radius: 20px;
        padding: 1.25rem 2rem;
        font-size: 1.1rem;
    }

    .email-submit {
        border-radius: 20px;
        padding: 1.25rem 2rem;
        font-size: 1rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .benefit-card {
        min-width: 240px;
        max-width: 240px;
        padding: 1.75rem 1.25rem;
    }

    .benefits-wrapper {
        animation-duration: 35s;
    }
}

@media (max-width: 576px) {
    body {
        transform: none;
        width: 100%;
        height: auto;
    }

    .welcome-section {
        gap: 1rem;
    }

    .welcome-title {
        font-size: 1.6rem;
    }

    .welcome-subtitle {
        font-size: 1rem;
    }

    .credit-gauge-container {
        width: 240px;
        height: 200px;
        padding: 1rem 0.75rem;
    }

    .gauge-visual-container {
        height: 100px;
    }

    .credit-score-visual {
        width: 180px;
        height: 90px;
    }

    .score-needle {
        height: 45px;
    }

    .score-center-display {
        padding: 0.5rem 1rem;
    }

    .score-status {
        font-size: 0.9rem;
    }

    .score-description {
        font-size: 0.65rem;
    }

    .email-form {
        padding: 1.25rem;
    }

    .email-input {
        font-size: 1rem;
        padding: 1rem 1.5rem;
    }

    .email-submit {
        font-size: 0.95rem;
        padding: 1rem 1.5rem;
    }

    .benefit-card {
        min-width: 220px;
        max-width: 220px;
        padding: 1.5rem 1rem;
    }

    .benefits-wrapper {
        animation-duration: 30s;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 3rem 0 5rem;
    }

    .welcome-section {
        gap: 0.5rem;
    }

    .welcome-title {
        font-size: 1.4rem;
    }

    .credit-gauge-container {
        width: 200px;
        height: 170px;
        padding: 0.75rem 0.5rem;
    }

    .gauge-title {
        font-size: 0.85rem;
    }

    .gauge-subtitle {
        font-size: 0.7rem;
    }

    .benefit-card {
        min-width: 200px;
        max-width: 200px;
        padding: 1.25rem 0.75rem;
    }
}

/* Performance optimizations */
@media (prefers-reduced-motion: reduce) {
    .benefits-wrapper {
        animation: none;
    }

    .credit-gauge-container {
        animation: none;
    }

    .hero {
        animation: none;
    }
}
