@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&display=swap");

:root {
    --bg: #020817;
    --bg-2: #040d1e;
    --surface: rgba(9, 17, 34, 0.82);
    --surface-strong: rgba(15, 23, 42, 0.94);
    --border: rgba(148, 163, 184, 0.16);
    --border-strong: rgba(147, 197, 253, 0.3);
    --text: #f8fafc;
    --text-soft: #cbd5e1;
    --text-muted: #7d8ca2;
    --blue: #3b82f6;
    --blue-deep: #1d4ed8;
    --cyan: #38bdf8;
    --cyan-soft: rgba(56, 189, 248, 0.14);
    --glow: rgba(59, 130, 246, 0.35);
    --danger: #f87171;
    --radius: 22px;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    padding: clamp(24px, 4vw, 56px) 20px;
    color: var(--text);
    font-family: "Outfit", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at 50% -10%, rgba(59, 130, 246, 0.26), transparent 34%),
        radial-gradient(circle at 10% 20%, rgba(56, 189, 248, 0.13), transparent 28%),
        radial-gradient(circle at 88% 82%, rgba(99, 102, 241, 0.15), transparent 30%),
        linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 44%, #02040b 100%);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.026) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.026) 1px, transparent 1px);
    background-size: 68px 68px;
    -webkit-mask-image: linear-gradient(to bottom, black 0%, transparent 78%);
    mask-image: linear-gradient(to bottom, black 0%, transparent 78%);
    pointer-events: none;
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background: radial-gradient(ellipse 72% 56% at 50% 30%, transparent 0%, rgba(2, 8, 23, 0.42) 68%, rgba(2, 8, 23, 0.9) 100%);
    pointer-events: none;
}

.form-container {
    position: relative;
    width: min(100%, 860px);
    max-width: 860px;
    margin: 0 auto;
    padding: clamp(28px, 4vw, 48px);
    border: 1px solid var(--border);
    border-radius: 30px;
    background:
        radial-gradient(circle at 24% 0%, rgba(56, 189, 248, 0.14), transparent 34%),
        linear-gradient(145deg, rgba(9, 17, 34, 0.86), rgba(4, 9, 20, 0.96));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.055),
        0 30px 90px rgba(0, 0, 0, 0.42);
    overflow: hidden;
}

.form-container::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.22), transparent);
    opacity: 0.8;
    pointer-events: none;
}

.progress-bar {
    height: 5px;
    background: linear-gradient(90deg, var(--cyan), #bfdbfe, var(--blue));
    box-shadow: 0 0 22px rgba(56, 189, 248, 0.56);
    border-radius: 30px 30px 0 0;
}

.logo {
    justify-content: center;
    margin-bottom: 32px;
}

.logo .brand {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 8px 16px 8px 10px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 999px;
    color: var(--text);
    background: rgba(2, 8, 23, 0.54);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 18px 50px rgba(0, 0, 0, 0.22);
    text-decoration: none;
    backdrop-filter: blur(18px);
}

.brand-logo {
    width: 34px;
    height: 34px;
    object-fit: contain;
    filter: drop-shadow(0 0 14px rgba(56, 189, 248, 0.54));
}

.brand-stack {
    display: flex;
    flex-direction: column;
    line-height: 0.86;
}

.brand-main {
    font-size: 1.18rem;
    font-weight: 850;
    letter-spacing: -0.055em;
}

.brand-sub {
    margin-top: 4px;
    color: rgba(203, 213, 225, 0.68);
    font-size: 0.42rem;
    font-weight: 400;
    letter-spacing: 0.68em;
    text-transform: uppercase;
}

.intro-section {
    margin-bottom: 36px;
    padding: clamp(24px, 4vw, 34px);
    border: 1px solid var(--border);
    border-left: 1px solid var(--border);
    border-radius: 24px;
    background:
        radial-gradient(circle at 80% 20%, rgba(56, 189, 248, 0.15), transparent 32%),
        linear-gradient(135deg, rgba(37, 99, 235, 0.22), rgba(9, 17, 34, 0.72));
}

.intro-section::before {
    content: "Solicitud de proyecto";
    display: inline-flex;
    margin-bottom: 14px;
    color: var(--cyan);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.intro-title {
    max-width: 680px;
    margin-inline: auto;
    color: var(--text);
    font-size: clamp(2rem, 5vw, 3.45rem);
    font-weight: 850;
    letter-spacing: -0.062em;
    line-height: 0.98;
    text-wrap: balance;
    background: linear-gradient(170deg, #ffffff 8%, #e0f2fe 46%, #93c5fd 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.intro-text {
    max-width: 640px;
    margin-top: 18px;
    color: rgba(203, 213, 225, 0.9);
    font-size: 1.02rem;
    line-height: 1.74;
}

.section-container {
    min-height: 360px;
}

.section-title {
    margin-bottom: 28px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    font-size: clamp(1.55rem, 3vw, 2.1rem);
    font-weight: 780;
    letter-spacing: -0.04em;
}

.form-group {
    margin-bottom: 22px;
}

.form-group label {
    margin-bottom: 9px;
    color: var(--text-soft);
    font-size: 0.82rem;
    font-weight: 750;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.required {
    color: var(--cyan);
}

.form-group input,
.form-group textarea,
.form-group select,
.edit-input {
    width: 100%;
    padding: 15px 16px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 16px;
    color: var(--text);
    background: rgba(2, 8, 23, 0.6);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
    font: inherit;
    transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(125, 140, 162, 0.8);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus,
.edit-input:focus {
    outline: none;
    border-color: var(--border-strong);
    background: rgba(2, 8, 23, 0.78);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.14), 0 0 32px rgba(59, 130, 246, 0.12);
}

.form-group select,
.edit-input select {
    color-scheme: dark;
}

.form-group textarea {
    min-height: 132px;
}

.material-symbols-rounded {
    font-family: "Material Symbols Rounded";
    font-weight: normal;
    font-style: normal;
    font-size: 22px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-feature-settings: "liga";
    -webkit-font-smoothing: antialiased;
    font-feature-settings: "liga";
}

.sector-select {
    position: relative;
}

.sector-toggle {
    width: 100%;
    min-height: 56px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 16px;
    color: var(--text);
    background: rgba(2, 8, 23, 0.6);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
    transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
}

.sector-toggle:hover,
.sector-select.open .sector-toggle {
    border-color: var(--border-strong);
    background: rgba(2, 8, 23, 0.78);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.14), 0 0 32px rgba(59, 130, 246, 0.12);
}

.sector-preview {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

#sectorPreviewIcon,
.sector-option-icon {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    display: inline-grid;
    place-items: center;
    font-size: 18px;
}

#sectorPreviewText {
    color: var(--text-soft);
    font-size: 0.95rem;
    font-weight: 500;
}

.sector-arrow {
    color: var(--text-muted);
    transition: transform 0.18s;
}

.sector-select.open .sector-arrow {
    transform: rotate(180deg);
}

.sector-options {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 8px);
    z-index: 30;
    display: none;
    max-height: 320px;
    overflow: auto;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: rgba(2, 8, 23, 0.96);
    box-shadow: 0 28px 64px rgba(0, 0, 0, 0.44);
    backdrop-filter: blur(18px);
}

.sector-select.open .sector-options {
    display: grid;
    gap: 6px;
}

.sector-option {
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: var(--text-soft);
    min-height: 46px;
    padding: 8px 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: left;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.16s, color 0.16s;
}

.sector-option:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
}

.sector-option-label {
    line-height: 1.25;
}

.turnstile-wrap {
    display: flex;
    justify-content: center;
    margin: 0 auto 22px;
    min-height: 65px;
}

.button-row {
    align-items: center;
    margin-top: 10px;
}

.btn-next,
.btn-prev,
.btn-edit,
.btn-save,
.btn-cancel {
    min-height: 44px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-family: inherit;
    font-size: 0.94rem;
    font-weight: 750;
    transition: transform 0.18s, box-shadow 0.18s, background 0.18s, border-color 0.18s;
}

.btn-next {
    padding: 14px 26px;
    color: #fff;
    background: linear-gradient(135deg, var(--blue), var(--blue-deep));
    box-shadow: 0 0 34px var(--glow);
}

.btn-next:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 48px rgba(59, 130, 246, 0.46);
}

.btn-next:disabled {
    opacity: 0.58;
    cursor: not-allowed;
    box-shadow: none;
}

.btn-prev {
    padding: 14px 24px;
    color: var(--text-soft);
    border-color: var(--border);
    background: rgba(255, 255, 255, 0.055);
}

.btn-prev:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(203, 213, 225, 0.24);
    transform: translateY(-1px);
    box-shadow: none;
}

.answers-summary {
    margin-top: 42px;
    padding-top: 30px;
    border-top: 1px solid var(--border);
}

.answers-summary-title {
    color: var(--text);
    font-size: 1.28rem;
    font-weight: 760;
    letter-spacing: -0.025em;
}

.answer-item {
    padding: 17px;
    border: 1px solid var(--border);
    border-left: 1px solid var(--border);
    border-radius: 18px;
    background:
        radial-gradient(circle at 14% 0%, rgba(56, 189, 248, 0.1), transparent 32%),
        rgba(9, 17, 34, 0.72);
}

.answer-label {
    color: var(--text-muted);
    letter-spacing: 0.1em;
}

.answer-value {
    color: var(--text-soft);
    line-height: 1.55;
}

.answer-value.empty {
    color: rgba(125, 140, 162, 0.74);
}

.btn-edit {
    min-height: 34px;
    padding: 8px 15px;
    color: var(--text);
    border-color: rgba(56, 189, 248, 0.28);
    background: rgba(56, 189, 248, 0.12);
}

.btn-edit:hover {
    background: rgba(56, 189, 248, 0.2);
    transform: translateY(-1px);
}

.edit-actions {
    margin-top: 12px;
}

.btn-save,
.btn-cancel {
    min-height: 34px;
    padding: 7px 14px;
    font-size: 0.78rem;
}

.btn-save {
    color: #fff;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
}

.btn-cancel {
    color: var(--text-soft);
    border-color: var(--border);
    background: rgba(255, 255, 255, 0.055);
}

.success-message {
    padding: 64px 20px;
}

.success-icon {
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 0 44px var(--glow);
}

.success-title {
    color: var(--text);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 820;
    letter-spacing: -0.05em;
}

.success-text {
    max-width: 560px;
    margin-inline: auto;
    color: var(--text-soft);
}

.error-message {
    border: 1px solid rgba(248, 113, 113, 0.26);
    color: #fecaca;
    background: rgba(127, 29, 29, 0.42);
}

@media (max-width: 768px) {
    body {
        padding: 14px;
    }

    .form-container {
        padding: 28px 18px;
        border-radius: 24px;
    }

    .intro-section {
        padding: 22px;
    }

    .button-row {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .btn-next,
    .btn-prev {
        justify-content: center;
        width: 100%;
    }

    .answer-item {
        gap: 12px;
    }
}
