/* ══════════════════════════════════════════════════════════════
   NORVEX GROUP — Premium Multi-Step Form Styles
   Design System: Inherits from landing page
   Fonts: Bricolage Grotesque (headings) + Inter (body)
   Palette: #0a0a0a · #021038 · #003DE1 · #011C64
   ══════════════════════════════════════════════════════════════ */

/* ─── Reset & Base ─── */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.6;
    color: #B9B9B9;
    background-color: #060a18;
    overflow-x: hidden;
    width: 100%;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body::-webkit-scrollbar {
    width: 5px;
}

body::-webkit-scrollbar-track {
    background: #060a18;
}

body::-webkit-scrollbar-thumb {
    background: #003DE1;
    border-radius: 20px;
}

::selection {
    color: #fff;
    background: #003DE1;
}

/* ─── Ambient Glow ─── */
.form-ambient-glow {
    position: fixed;
    top: 20%;
    left: 50%;
    width: 700px;
    height: 700px;
    transform: translateX(-50%);
    background: radial-gradient(circle,
            rgba(0, 61, 225, 0.12) 0%,
            rgba(0, 61, 225, 0.06) 30%,
            rgba(2, 16, 56, 0.03) 60%,
            transparent 80%);
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    z-index: 0;
}

/* ─── Page Layout ─── */
.form-page {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    padding: 40px 20px 60px;
}

.form-container {
    width: 100%;
    max-width: 620px;
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* ─── Header ─── */
.form-header {
    text-align: center;
    margin-bottom: 32px;
    padding-top: 10px;
}

.form-logo-link {
    display: inline-block;
}

.form-logo {
    width: 180px;
    height: auto;
    margin-bottom: 8px;
    opacity: 0.9;
    transition: opacity 0.3s;
}

.form-logo:hover {
    opacity: 1;
}

.form-header-tagline {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    color: #003DE1;
}

/* ─── Progress Bar ─── */
.form-progress {
    margin-bottom: 28px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.form-progress-track {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 100px;
    overflow: hidden;
}

.form-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #003DE1, #0066ff);
    border-radius: 100px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-progress-label {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.35);
    letter-spacing: 0.5px;
}

/* ─── Honeypot (hidden) ─── */
.form-hp {
    position: absolute;
    left: -9999px;
    opacity: 0;
    height: 0;
    width: 0;
    overflow: hidden;
}

/* ══════════════════════════════════════════════════════════════
   FORM STEPS
   ══════════════════════════════════════════════════════════════ */

.form-step {
    display: none;
    animation: formStepIn 0.45s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.form-step.active {
    display: block;
}

@keyframes formStepIn {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Going back animation */
.form-step.slide-back {
    animation: formStepBack 0.45s cubic-bezier(0.4, 0, 0.2, 1) both;
}

@keyframes formStepBack {
    from {
        opacity: 0;
        transform: translateY(-16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ─── Card ─── */
.form-card {
    background: linear-gradient(145deg, rgba(2, 16, 56, 0.6) 0%, rgba(2, 16, 56, 0.35) 100%);
    border: 1px solid rgba(1, 28, 100, 0.5);
    border-radius: 20px;
    padding: 40px 36px 36px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.form-card-header {
    margin-bottom: 30px;
}

.form-step-badge {
    display: inline-block;
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: #003DE1;
    background: rgba(0, 61, 225, 0.1);
    border: 1px solid rgba(0, 61, 225, 0.2);
    border-radius: 6px;
    padding: 4px 12px;
    margin-bottom: 16px;
    letter-spacing: 1px;
}

.form-card-title {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: clamp(22px, 4vw, 28px);
    font-weight: 600;
    color: #ffffff;
    line-height: 1.2;
    margin-bottom: 10px;
}

.form-card-desc {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.55;
}

/* ══════════════════════════════════════════════════════════════
   FORM FIELDS (Text Inputs)
   ══════════════════════════════════════════════════════════════ */

.form-fields {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-label {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.65);
    letter-spacing: 0.3px;
}

.form-input {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 400;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 15px 18px;
    outline: none;
    transition: border-color 0.3s, background 0.3s, box-shadow 0.3s;
    width: 100%;
    -webkit-appearance: none;
}

.form-input::placeholder {
    color: rgba(255, 255, 255, 0.2);
}

.form-input:focus {
    border-color: #003DE1;
    background: rgba(0, 61, 225, 0.05);
    box-shadow: 0 0 0 3px rgba(0, 61, 225, 0.1);
}

.form-input.has-error {
    border-color: #e53e3e;
    background: rgba(229, 62, 62, 0.04);
}

.form-input.has-error:focus {
    box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 80px;
}

/* ─── Error Messages ─── */
.form-error {
    font-size: 13px;
    color: #e53e3e;
    min-height: 0;
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity 0.25s, transform 0.25s, min-height 0.25s;
    display: block;
}

.form-error.visible {
    opacity: 1;
    transform: translateY(0);
    min-height: 18px;
}

.form-error-center {
    text-align: center;
    margin-top: 12px;
}

/* ─── Conditional field animation ─── */
.form-field-conditional {
    margin-top: 16px;
    animation: condFieldIn 0.35s cubic-bezier(0.4, 0, 0.2, 1) both;
}

@keyframes condFieldIn {
    from {
        opacity: 0;
        max-height: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        max-height: 200px;
        transform: translateY(0);
    }
}

/* ══════════════════════════════════════════════════════════════
   OPTION CARDS (Radio Selections)
   ══════════════════════════════════════════════════════════════ */

.form-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.form-option-card {
    position: relative;
    display: block;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-option-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.form-option-content {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-option-card:hover .form-option-content {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.14);
}

/* ─── Custom Radio Indicator ─── */
.form-option-indicator {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.form-option-indicator::after {
    content: '';
    position: absolute;
    inset: 3px;
    border-radius: 50%;
    background: #003DE1;
    transform: scale(0);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─── Selected State ─── */
.form-option-card input[type="radio"]:checked+.form-option-content {
    background: rgba(0, 61, 225, 0.08);
    border-color: #003DE1;
    box-shadow: 0 0 0 1px rgba(0, 61, 225, 0.25), 0 4px 20px rgba(0, 61, 225, 0.08);
}

.form-option-card input[type="radio"]:checked+.form-option-content .form-option-indicator {
    border-color: #003DE1;
}

.form-option-card input[type="radio"]:checked+.form-option-content .form-option-indicator::after {
    transform: scale(1);
}

.form-option-card input[type="radio"]:checked+.form-option-content .form-option-text {
    color: #ffffff;
}

/* ─── Option Text ─── */
.form-option-text {
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.4;
    transition: color 0.25s;
}

.form-option-text-block {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* ══════════════════════════════════════════════════════════════
   NAVIGATION
   ══════════════════════════════════════════════════════════════ */

.form-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 24px;
    gap: 12px;
}

/* ─── Back Button ─── */
.form-btn-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.4);
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px 6px;
    transition: color 0.3s;
}

.form-btn-back:hover {
    color: rgba(255, 255, 255, 0.8);
}

.form-btn-back svg {
    flex-shrink: 0;
}

/* ─── Next Button ─── */
.form-btn-next {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: 15px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #ffffff;
    background-image: linear-gradient(45deg, #021547, #003DE1, #021547, #003DE1);
    background-size: 400% 200%;
    animation: btnGradient 5s cubic-bezier(0.2, 0.5, 0.9, 0.6) 2s infinite;
    border: none;
    border-radius: 10px;
    padding: 15px 32px;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s, opacity 0.3s;
    margin-left: auto;
}

.form-btn-next:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(0, 61, 225, 0.3);
}

.form-btn-next:active {
    transform: translateY(0);
}

.form-btn-next:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.form-btn-next svg {
    flex-shrink: 0;
}

/* ─── Submit Button ─── */
.form-btn-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #ffffff;
    background-image: linear-gradient(45deg, #021547, #003DE1, #021547, #003DE1);
    background-size: 400% 200%;
    animation: btnGradient 5s cubic-bezier(0.2, 0.5, 0.9, 0.6) 2s infinite;
    border: none;
    border-radius: 10px;
    padding: 17px 40px;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s, opacity 0.3s;
    margin-left: auto;
    width: auto;
    min-width: 260px;
}

.form-btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(0, 61, 225, 0.3);
}

.form-btn-submit:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.form-btn-submit-text,
.form-btn-submit-loader {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* ─── Spinner ─── */
.form-spinner {
    animation: formSpin 0.8s linear infinite;
}

@keyframes formSpin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes btnGradient {
    0% {
        background-position: 0 0;
    }

    100% {
        background-position: 100% 0;
    }
}

/* ══════════════════════════════════════════════════════════════
   SUCCESS SCREEN
   ══════════════════════════════════════════════════════════════ */

.form-success {
    animation: formSuccessIn 0.6s cubic-bezier(0.4, 0, 0.2, 1) both;
}

@keyframes formSuccessIn {
    from {
        opacity: 0;
        transform: scale(0.96) translateY(16px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.form-success-inner {
    text-align: center;
    background: linear-gradient(145deg, rgba(2, 16, 56, 0.6) 0%, rgba(2, 16, 56, 0.35) 100%);
    border: 1px solid rgba(1, 28, 100, 0.5);
    border-radius: 20px;
    padding: 56px 40px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.form-success-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(0, 61, 225, 0.12);
    border: 2px solid rgba(0, 61, 225, 0.3);
    color: #003DE1;
    margin-bottom: 24px;
    animation: successPulse 2s ease infinite;
}

@keyframes successPulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(0, 61, 225, 0.15);
    }

    50% {
        box-shadow: 0 0 0 16px rgba(0, 61, 225, 0);
    }
}

.form-success-title {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: clamp(24px, 5vw, 30px);
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 16px;
}

.form-success-desc {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.6;
    max-width: 440px;
    margin: 0 auto 12px;
}

.form-success-sub {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #003DE1;
    margin-bottom: 32px;
}

.form-btn-home {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 12px 24px;
    text-decoration: none;
    transition: all 0.3s;
}

.form-btn-home:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

/* ─── Footer ─── */
.form-footer {
    text-align: center;
    padding: 32px 0 0;
}

.form-footer-text {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.2);
    letter-spacing: 0.3px;
}

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE — Mobile (max-width: 640px)
   ══════════════════════════════════════════════════════════════ */

@media (max-width: 640px) {

    .form-page {
        padding: 24px 16px 40px;
    }

    .form-header {
        margin-bottom: 24px;
    }

    .form-logo {
        width: 140px;
    }

    .form-header-tagline {
        font-size: 11px;
        letter-spacing: 2px;
    }

    .form-progress {
        margin-bottom: 20px;
    }

    .form-card {
        padding: 28px 22px 24px;
        border-radius: 16px;
    }

    .form-card-title {
        font-size: 22px;
    }

    .form-card-desc {
        font-size: 14px;
    }

    .form-input {
        padding: 14px 16px;
        font-size: 16px;
        /* Prevents iOS zoom */
    }

    .form-option-content {
        padding: 14px 16px;
        gap: 12px;
    }

    .form-option-text {
        font-size: 14px;
    }

    .form-option-indicator {
        width: 20px;
        height: 20px;
    }

    .form-nav {
        margin-top: 20px;
    }

    .form-btn-next,
    .form-btn-submit {
        padding: 15px 24px;
        font-size: 14px;
    }

    .form-btn-submit {
        min-width: auto;
        width: 100%;
    }

    .form-btn-back {
        font-size: 13px;
    }

    .form-success-inner {
        padding: 40px 24px;
    }

    .form-success-title {
        font-size: 24px;
    }

    .form-success-desc {
        font-size: 15px;
    }
}

/* ─── Extra small screens ─── */
@media (max-width: 380px) {

    .form-card {
        padding: 24px 18px 20px;
    }

    .form-card-title {
        font-size: 20px;
    }

    .form-option-content {
        padding: 12px 14px;
    }
}

/* ══════════════════════════════════════════════════════════════
   FOOTER (Replicado do style.css para o form)
   ══════════════════════════════════════════════════════════════ */
.footer {
    padding: 20px 0;
    background: #181818;
    text-align: center;
    width: 100%;
}

.footer-text {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: #8C8C8C;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
}

.footer-link {
    color: #8C8C8C;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-link:hover {
    color: #fff;
}

.footer-divider {
    color: #555;
    margin: 0 4px;
}

@media (max-width: 768px) {
    .footer-text {
        flex-direction: column;
        gap: 16px;
    }

    .footer-divider-main {
        display: none;
    }

    .footer-links {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%;
        gap: 0;
    }
}

/* ══════════════════════════════════════════════════════════════
 FORM NAV FINAL
 ══════════════════════════════════════════════════════════════ */
.form-nav-final {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    width: 100%;
}

.form-nav-final .form-btn-back {
    flex: 0 0 auto;
}

.form-nav-final #btnSubmit {
    flex: 0 0 430px;
    max-width: 430px;
}

/* ══════════════════════════════════════════════════════════════
 FORM CONSENT --- bloco independente abaixo do CTA
 ══════════════════════════════════════════════════════════════ */
.form-consent {
    display: none;
    max-width: 820px;
    margin: 28px auto 0;
    padding: 0 32px;
    font-size: 11.5px;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.48);
    text-align: center;
}

.form-consent a {
    color: rgba(255, 255, 255, 0.72);
    text-decoration: underline;
    text-decoration-color: rgba(255, 255, 255, 0.22);
    text-underline-offset: 3px;
    transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.form-consent a:hover {
    color: #ffffff;
    text-decoration-color: rgba(255, 255, 255, 0.85);
}

/* Exibir consentimento somente na etapa final por herança estrutural robusta */
.is-final-step + .form-consent,
.form-nav-final.is-final-step + .form-consent {
    display: block;
    animation: fadeInConsent 0.35s ease forwards;
}

@keyframes fadeInConsent {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ══════════════════════════════════════════════════════════════
 MOBILE FINAL NAVBAR
 ══════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    .form-consent {
        max-width: 100%;
        margin: 24px auto 0;
        padding: 0 24px;
        font-size: 11px;
        line-height: 1.6;
    }

    .form-nav-final {
        gap: 18px;
    }

    .form-nav-final #btnSubmit {
        flex: 0 1 auto;
        max-width: none;
    }
}