:root {
    --bg-color: #020010;
    /* Deep dark blue/black from new design */
    --text-color: #ffffff;

    /* Official Brand Colors */
    --brand-blue: #1B23CC;
    --brand-grey: #C3CEE0;
    --brand-burgundy: #72162E;
    --brand-red: #D83D49;
    --brand-lavender: #AE8EFF;

    /* Applied Colors */
    --accent-color: var(--brand-red);
    --secondary-accent: var(--brand-lavender);

    --blob-color-1: var(--brand-blue);
    --blob-color-2: var(--brand-burgundy);
    --blob-color-3: var(--brand-lavender);
    --blob-color-4: var(--brand-red);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    background-color: #020010;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: transparent;
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    margin: 0 auto;
    width: 100%;
}

/* --- BACKGROUND SYSTEM (NEW) --- */
.background-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    background: #020010;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.6;
    mix-blend-mode: screen;
    will-change: transform;
    pointer-events: none;
}

/* CSS Animation Fallback (Overridden by GSAP if loaded) */
@keyframes float-1 {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(30px, -50px) scale(1.1);
    }

    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
}

@keyframes float-2 {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(-30px, 40px) scale(1.1);
    }

    66% {
        transform: translate(20px, -30px) scale(0.9);
    }
}

@keyframes float-3 {

    0%,
    100% {
        transform: translate(-50%, -50%) scale(1);
    }

    50% {
        transform: translate(-50%, -50%) translate(40px, 40px) scale(1.1);
    }
}

@keyframes float-4 {

    0%,
    100% {
        transform: translate(20%, -20%) scale(1);
    }

    50% {
        transform: translate(20%, -20%) translate(-40px, 40px) scale(1.1);
    }
}

.blob-1 {
    width: 60vw;
    height: 60vw;
    background: var(--blob-color-1);
    top: -20%;
    left: -20%;
    animation: float-1 20s infinite ease-in-out;
}

.blob-2 {
    width: 50vw;
    height: 50vw;
    background: var(--blob-color-2);
    bottom: -10%;
    right: -10%;
    animation: float-2 25s infinite ease-in-out reverse;
}

/* Reset transforms for blob 3 and 4 to allow GSAP full control */
.blob-3 {
    width: 40vw;
    height: 40vw;
    background: var(--blob-color-3);
    top: 30%;
    left: 30%;
    animation: float-3 22s infinite ease-in-out;
}

.blob-4 {
    width: 55vw;
    height: 55vw;
    background: var(--blob-color-4);
    top: 10%;
    right: 10%;
    animation: float-4 28s infinite ease-in-out reverse;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(10, 10, 15, 0.2) 0%, rgba(2, 0, 16, 0.8) 100%);
    backdrop-filter: blur(25px);
}

/* --- MAIN CONTENT & FORM STYLES (RESTORED) --- */

.content {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
    opacity: 0;
    /* Animated in by JS */
    transform: translateY(20px);
}

.logo-container {
    margin-bottom: 2rem;
}

.logo {
    width: 280px;
    max-width: 80%;
    height: auto;
    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.1));
}

.title {
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    background: linear-gradient(to right, #ffffff, #a0a0a0);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    font-size: 1.2rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 1rem;
}

/* Responsiveness */
@media (max-width: 768px) {
    .title {
        font-size: 2rem;
    }

    .logo {
        width: 220px;
    }
}

/* --- FORM PAGE STYLES --- */

/* Allow scrolling for the form page */
body:has(.form-content) {
    overflow-y: auto;
    height: auto;
    min-height: 100vh;
    display: block;
}

.form-content {
    opacity: 0;
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem 4rem 1rem;
    position: relative;
    z-index: 10;
}

.logo-container-small {
    text-align: center;
    margin-bottom: 2rem;
}

.logo-small {
    width: 180px;
    /* Adjusted size */
    height: auto;
    transition: transform 0.3s ease;
}

.logo-small:hover {
    transform: scale(1.05);
}

.form-container {
    background: rgba(30, 35, 45, 0.6);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
}

.project-form {
    width: 100%;
}

.form-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(to right, #ffffff, #a0a0a0);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-align: center;
}

.form-subtitle {
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 2.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-section {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.form-section.no-border {
    border-bottom: none;
}

label {
    display: block;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

input[type="text"],
input[type="email"],
input[type="number"],
input[type="url"],
select,
textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 12px 16px;
    color: #fff;
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    background: rgba(0, 0, 0, 0.4);
    box-shadow: 0 0 10px rgba(216, 61, 73, 0.1);
}

input::placeholder,
textarea::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

select option {
    background-color: #0a0a0f;
    color: #fff;
}

/* Grids */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 0.5fr;
    gap: 1rem;
}

.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.8rem;
}

/* Radio & Checkbox */
.radio-group {
    display: flex;
    gap: 2rem;
    margin-bottom: 0.5rem;
}

.radio-label,
.checkbox-grid label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 300;
    font-size: 0.9rem;
}

input[type="radio"],
input[type="checkbox"] {
    accent-color: var(--accent-color);
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Required Field Asterisks */
.required-star {
    color: var(--brand-red);
    font-weight: 700;
    margin-left: 2px;
}

/* File Upload */
.file-upload-area {
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.03);
}

.file-upload-area:hover {
    border-color: var(--brand-red);
    background: rgba(255, 80, 0, 0.05);
}

.file-upload-area i {
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 0.5rem;
}

.file-upload-area p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
    margin: 0;
}

.file-upload-area input[type="file"] {
    display: none;
}

.file-upload-area .file-name {
    color: var(--brand-lavender);
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

/* Submit Button */
.submit-btn {
    width: auto;
    min-width: 160px;
    padding: 12px 30px;
    margin-top: 0;
    background: var(--brand-red);
    border: none;
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(216, 61, 73, 0.4);
    border-radius: 6px;
}

.submit-btn:hover {
    background: var(--brand-red);
    box-shadow: 0 0 15px rgba(216, 61, 73, 0.6);
    transform: translateY(-1px);
}

/* Helpers */
.mt-2 {
    margin-top: 0.8rem;
}

.mb-2 {
    margin-bottom: 0.8rem;
}

.hidden {
    display: none !important;
}

/* Responsive Form */
@media (max-width: 600px) {

    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
    }

    .form-container {
        padding: 1.5rem;
    }
}

/* --- WIZARD STYLES --- */
.wizard-progress {
    margin-bottom: 2.5rem;
    position: relative;
    padding: 0 1rem;
}

.progress-bar-bg {
    background: rgba(255, 255, 255, 0.1);
    height: 4px;
    width: 100%;
    border-radius: 2px;
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    z-index: 1;
}

.progress-bar-fill {
    background: linear-gradient(90deg, var(--brand-blue), var(--brand-red));
    height: 100%;
    width: 0%;
    border-radius: 2px;
    transition: width 0.5s ease;
}

.steps-indicator {
    display: flex;
    justify-content: space-between;
    position: relative;
    z-index: 2;
}

.step-dot {
    width: 35px;
    height: 35px;
    background: #0a0a0f;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.step-dot.active {
    border-color: var(--accent-color);
    background: #1a1a25;
    color: var(--accent-color);
    box-shadow: 0 0 10px rgba(216, 61, 73, 0.3);
}

.step-dot.completed {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: #fff;
}

.step {
    display: none;
    animation: fadeIn 0.5s ease;
}

.step.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.step-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.2rem;
}

.step-subtitle {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 2rem;
}

/* Floating Labels */
.floating-label-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.floating-label-group input,
.floating-label-group textarea,
.floating-label-group select {
    padding: 24px 16px 8px 16px;
    height: auto;
    font-size: 1.1rem;
}

.floating-label-group label {
    position: absolute;
    top: 50%;
    left: 16px;
    transform: translateY(-50%);
    background: transparent;
    color: rgba(255, 255, 255, 0.5);
    font-size: 1rem;
    transition: all 0.2s ease;
    pointer-events: none;
    margin: 0;
}

.floating-label-group input:focus~label,
.floating-label-group input:not(:placeholder-shown)~label,
.floating-label-group select:focus~label,
.floating-label-group select.has-value~label {
    top: 10px;
    font-size: 0.75rem;
    color: var(--brand-lavender);
    transform: translateY(0);
    font-weight: 600;
}

/* Cards & Chips */
.section-label-small {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.cards-grid.two-col {
    grid-template-columns: 1fr 1fr;
}

.card-radio {
    display: block;
    cursor: pointer;
}

.card-radio input {
    position: absolute;
    opacity: 0;
}

.card-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    padding: 1.5rem 1rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-content i {
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.6);
    transition: all 0.3s ease;
}

.card-content span {
    font-size: 0.95rem;
    font-weight: 400;
}

.card-radio input:checked+.card-content {
    background: rgba(255, 80, 0, 0.15);
    border-color: var(--accent-color);
    box-shadow: 0 0 0 1px rgba(255, 80, 0, 0.3);
}

.card-radio input:checked+.card-content i {
    color: var(--accent-color);
}

/* Checkbox Card Styles */
.card-checkbox {
    display: block;
    cursor: pointer;
}

.card-checkbox input {
    position: absolute;
    opacity: 0;
}

.card-checkbox input:checked+.card-content {
    background: rgba(216, 61, 73, 0.2);
    border-color: var(--brand-red);
    box-shadow: 0 0 0 1px rgba(216, 61, 73, 0.4);
}

.card-checkbox input:checked+.card-content i {
    color: var(--brand-red);
}

/* Sub-options for Tipo de Desarrollo */
.sub-options {
    margin-top: 0.8rem;
    margin-bottom: 1rem;
    padding: 1rem 1.2rem;
    background: rgba(255, 255, 255, 0.03);
    border-left: 3px solid var(--brand-red);
    border-radius: 0 8px 8px 0;
    overflow: hidden;
}

.sub-options-label {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 0.6rem;
    font-weight: 400;
}

/* Hide number input spinners */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

/* Floating label for textarea */
.floating-label-group textarea:focus~label,
.floating-label-group textarea:not(:placeholder-shown)~label {
    top: 10px;
    font-size: 0.75rem;
    color: var(--brand-lavender);
    transform: translateY(0);
    font-weight: 600;
}

.small-card .card-content {
    padding: 1rem;
    flex-direction: row;
    gap: 0.5rem;
}

.checkbox-grid-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.chip {
    cursor: pointer;
}

.chip input {
    display: none;
}

.chip span {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    user-select: none;
    color: rgba(255, 255, 255, 0.8);
}

.chip input:checked+span {
    background: var(--brand-red);
    border-color: var(--brand-red);
    color: #fff;
    font-weight: 500;
    box-shadow: 0 0 10px rgba(216, 61, 73, 0.4);
}

/* Layout Nav */
.wizard-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-btn {
    padding: 10px 20px;
    border-radius: 6px;
    border: none;
    font-weight: 500;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.prev-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.7);
}

.prev-btn:hover:not(:disabled) {
    border-color: #fff;
    color: #fff;
}

.next-btn {
    background: #fff;
    color: #000;
}

.next-btn:hover {
    background: #e0e0e0;
    transform: translateX(2px);
}

/* --- RESPONSIVE OPTIMIZATION --- */

/* Tablet (max-width: 900px) */
@media (max-width: 900px) {
    .grid-3 {
        grid-template-columns: 1fr 1fr;
        /* 2 columns instead of 3 */
    }

    .form-container {
        max-width: 90%;
    }
}

/* Mobile Standard (max-width: 768px) */
@media (max-width: 768px) {
    .title {
        font-size: 2rem;
    }

    .logo {
        width: 200px;
    }

    .grid-3 {
        grid-template-columns: 1fr;
        /* Stack everything */
    }

    .wizard-nav {
        margin-top: 1.5rem;
    }
}

/* Mobile Small (max-width: 480px) */
@media (max-width: 480px) {

    /* Background adjustments */
    .blob {
        filter: blur(60px);
        opacity: 0.5;
    }

    /* Reduce performance load */

    /* Typography */
    .title {
        font-size: 1.8rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .form-title {
        font-size: 1.5rem;
    }

    .step-title {
        font-size: 1.4rem;
    }

    .step-subtitle {
        font-size: 0.9rem;
    }

    /* Layout */
    body {
        justify-content: center !important;
        align-items: center !important;
    }

    .content {
        width: 100% !important;
        max-width: 100% !important;
        padding: 1rem !important;
        margin: 0 auto !important;
        text-align: center;
        box-sizing: border-box;
    }

    .form-content {
        padding: 1rem 0.75rem 3rem 0.75rem;
        width: 100% !important;
        display: flex;
        flex-direction: column;
        align-items: center;
        margin: 0 auto !important;
        box-sizing: border-box;
    }

    .form-container {
        padding: 1.5rem 1rem;
        border-radius: 16px;
        margin: 0 auto !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
    }

    /* Force all form children to stretch full width */
    .step,
    .form-section,
    .form-group,
    .floating-label-group,
    .wizard-progress,
    .wizard-nav {
        width: 100% !important;
        box-sizing: border-box;
    }

    .step {
        text-align: left;
    }

    /* Form Elements */
    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }

    .floating-label-group input,
    .floating-label-group textarea,
    .floating-label-group select {
        font-size: 1rem;
        padding: 20px 12px 6px 12px;
        width: 100%;
        box-sizing: border-box;
    }

    .floating-label-group label {
        left: 12px;
        font-size: 0.9rem;
    }

    /* Cards & Chips */
    .cards-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.8rem;
    }

    /* Force 2 columns for icons */
    .checkbox-grid-chips {
        gap: 0.5rem;
    }

    .chip span {
        padding: 6px 12px;
        font-size: 0.8rem;
    }

    /* Navigation */
    .wizard-nav {
        flex-direction: column-reverse;
        gap: 1rem;
    }

    .nav-btn {
        width: 100%;
        padding: 12px;
    }

    /* Logos */
    .logo {
        width: 160px;
    }

    .logo-small {
        width: 140px;
    }

    /* File upload */
    .file-upload-area {
        padding: 1.5rem 1rem;
    }
}