/* Google Fonts */
:root {
    --primary: #4F46E5;
    /* Indigo */
    --primary-hover: #4338CA;
    --secondary: #10B981;
    /* Emerald */
    --secondary-hover: #059669;
    --text-main: #1F2937;
    --text-muted: #6B7280;
    --bg-glass: rgba(255, 255, 255, 0.75);
    --border-glass: rgba(255, 255, 255, 0.5);
    --shadow-glass: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    --error: #EF4444;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
    background-color: #f3f4f6;
    position: relative;
    overflow-x: hidden;
}

/* Dynamic Animated Background */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(135deg, #f5f7fa 0%, #eef2f3 100%);
    overflow: hidden;
}

.blob {
    position: absolute;
    filter: blur(80px);
    z-index: -1;
    opacity: 0.6;
    animation: float 20s infinite alternate cubic-bezier(0.4, 0, 0.2, 1);
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: #E0E7FF;
    /* Light Indigo */
    animation-delay: 0s;
}

.blob-2 {
    bottom: -20%;
    right: -10%;
    width: 60vw;
    height: 60vw;
    background: #D1FAE5;
    /* Light Emerald */
    animation-delay: -5s;
}

.blob-3 {
    top: 40%;
    left: 60%;
    width: 40vw;
    height: 40vw;
    background: #FCE7F3;
    /* Light Pink */
    animation-delay: -10s;
}

@keyframes float {
    0% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(5%, 10%) scale(1.1);
    }

    66% {
        transform: translate(-10%, 5%) scale(0.9);
    }

    100% {
        transform: translate(0, 0) scale(1);
    }
}

/* Main Container - Glassmorphism */
.container {
    width: 100%;
    max-width: 800px;
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-glass);
    border-radius: 24px;
    box-shadow: var(--shadow-glass);
    padding: 40px;
    position: relative;
    z-index: 10;
}

/* Header & Logo */
.form-header {
    text-align: center;
    margin-bottom: 30px;
}

.brand-logo {
    max-width: 140px;
    height: auto;
    display: block;
    margin: 0 auto 15px auto;
}

.form-header h1 {
    font-size: 28px;
    color: var(--text-main);
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.form-header p {
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.5;
}

/* Progress Bar */
.progress-bar-container {
    margin-bottom: 40px;
}

.progress-bar {
    height: 6px;
    background: #E5E7EB;
    border-radius: 10px;
    position: relative;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 20%;
    /* Will be updated via JS */
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 10px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.step-indicator {
    text-align: right;
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

/* Form Steps */
.glass-form {
    position: relative;
    min-height: 300px;
}

.form-step {
    display: none;
    animation: fadeInStep 0.5s ease-out forwards;
}

.form-step-active {
    display: block;
}

@keyframes fadeInStep {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-step h2 {
    font-size: 20px;
    color: var(--primary);
    margin-bottom: 24px;
    font-weight: 600;
    border-bottom: 2px solid #E0E7FF;
    padding-bottom: 8px;
    display: inline-block;
}

.divider {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 30px 0 15px 0;
    display: flex;
    align-items: center;
}

.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #E5E7EB;
    margin-left: 15px;
}

/* Form Inputs */
.form-group {
    margin-bottom: 20px;
}

.row-group {
    display: flex;
    gap: 20px;
}

.col {
    flex: 1;
}

label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-main);
    margin-bottom: 8px;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #D1D5DB;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.9);
    font-size: 15px;
    color: var(--text-main);
    transition: all 0.3s ease;
    font-family: inherit;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
    background: #fff;
}

input::placeholder,
textarea::placeholder {
    color: #9CA3AF;
}

/* Radio & Checkboxes */
.radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.radio-group.row-radio {
    gap: 20px;
}

.radio-group label {
    display: flex;
    align-items: center;
    font-weight: 400;
    cursor: pointer;
    font-size: 15px;
    margin-bottom: 0;
}

.radio-group input[type="radio"] {
    margin-right: 8px;
    accent-color: var(--primary);
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* Custom Checkbox */
.checkbox-container {
    display: flex;
    align-items: center;
    position: relative;
    padding-left: 30px;
    cursor: pointer;
    font-size: 15px;
    user-select: none;
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    height: 20px;
    width: 20px;
    background-color: #f3f4f6;
    border: 1px solid #D1D5DB;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.checkbox-container:hover input~.checkmark {
    background-color: #E5E7EB;
}

.checkbox-container input:checked~.checkmark {
    background-color: var(--primary);
    border-color: var(--primary);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-container input:checked~.checkmark:after {
    display: block;
}

/* File Uploads */
.upload-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.section-desc {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 20px;
}

.file-group {
    background: rgba(255, 255, 255, 0.6);
    border: 1px dashed #A7F3D0;
    border-radius: 12px;
    padding: 15px;
    transition: all 0.3s ease;
}

.file-group:hover {
    border-color: var(--secondary);
    background: rgba(255, 255, 255, 0.9);
}

.file-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.file-input-wrapper input[type="file"] {
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.file-label-custom {
    background: #E5E7EB;
    color: var(--text-main);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
}

.file-group:hover .file-label-custom {
    background: var(--secondary);
    color: white;
}

.file-name {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
}

/* Declaration Box */
.declaration-box {
    background: rgba(243, 244, 246, 0.7);
    padding: 20px;
    border-radius: 16px;
    border-left: 4px solid var(--primary);
}

.declaration-box h3 {
    font-size: 16px;
    margin-bottom: 10px;
    color: var(--text-main);
}

.declaration-box p {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.6;
}

/* Buttons */
.form-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    border-top: 1px solid var(--border-glass);
    padding-top: 20px;
}

.btn {
    padding: 12px 28px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-primary {
    background: var(--primary);
    color: white;
    margin-left: auto;
    /* Pushes to right when alone */
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.btn-secondary {
    background: #E5E7EB;
    color: var(--text-main);
}

.btn-secondary:hover {
    background: #D1D5DB;
}

.btn-success {
    background: var(--secondary);
    color: white;
    margin-left: auto;
}

.btn-success:hover {
    background: var(--secondary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Loader */
.loader {
    display: none;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
    margin-left: 10px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Error Msg */
.error-msg {
    color: var(--error);
    font-size: 14px;
    font-weight: 500;
    text-align: right;
    margin-top: 15px;
    min-height: 20px;
}

input:invalid.touched {
    border-color: var(--error);
    background: #FEF2F2;
}

/* Thank You State */
.thank-you-state {
    text-align: center;
    padding: 40px 20px;
    animation: fadeInStep 0.8s ease-out;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: #D1FAE5;
    color: var(--secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}

.success-icon svg {
    width: 40px;
    height: 40px;
}

.thank-you-state h2 {
    font-size: 28px;
    color: var(--text-main);
    margin-bottom: 15px;
}

.thank-you-state p {
    color: var(--text-muted);
    font-size: 16px;
    max-width: 500px;
    margin: 0 auto 10px;
    line-height: 1.6;
}

/* Footer */
.site-footer {
    text-align: center;
    margin-top: 30px;
    padding: 10px 20px;
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 500;
    z-index: 10;
}

/* Responsive */
@media (max-width: 768px) {
    .row-group {
        flex-direction: column;
        gap: 0;
    }

    .upload-container {
        grid-template-columns: 1fr;
    }

    .container {
        padding: 30px 20px;
        margin: 10px;
    }

    .form-header h1 {
        font-size: 24px;
    }

    .brand-logo {
        max-width: 120px;
    }
}