/* ========== VARIÁVEIS BASE ========== */
:root {
    --primary: #10b981;
    --primary-deep: #059669;
    --primary-soft: #ecfdf5;
    --primary-glow: rgba(16, 185, 129, 0.15);
    --ink: #1C1B1A;
    --ink-soft: #6B6864;
    --line: #ECE7E1;
    --bg: #FFFDF9;
    --white: #ffffff;
    --shadow-sm: 0 2px 8px -2px rgba(0,0,0,0.08);
    --shadow-md: 0 8px 24px -8px rgba(0,0,0,0.12);
}

/* ========== RESET & BASE ========== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    height: 100%;
    -webkit-text-size-adjust: 100%;
}

body {
    height: 100%;
    background: var(--bg);
    font-family: 'Manrope', sans-serif;
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    display: flex;
    justify-content: center;
    min-height: 100vh;
    min-height: -webkit-fill-available;
}

/* ========== CONTAINER PRINCIPAL ========== */
.phone {
    width: 100%;
    max-width: 430px;
    min-height: 100vh;
    min-height: -webkit-fill-available;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
}

/* ========== BARRA DE PROGRESSO ========== */
.progress-track {
    height: 5px;
    background: var(--line);
    width: 100%;
    flex-shrink: 0;
}

.progress-fill {
    height: 100%;
    width: 25%;
    background: linear-gradient(90deg, var(--primary-deep), var(--primary));
    border-radius: 0 5px 5px 0;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========== STEPS ========== */
.step {
    display: none;
    flex: 1;
    flex-direction: column;
}

.step.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

/* ========== CONTEÚDO ========== */
.content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 0 24px;
}

.content.center-content {
    justify-content: center;
    align-items: center;
    text-align: center;
}

/* ========== BRAND BADGE ========== */
.brand-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 0 8px;
    animation: fadeUp 0.4s ease both;
}

.brand-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-deep) 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Baloo 2', sans-serif;
    font-weight: 700;
    font-size: 14px;
    color: var(--white);
}

.brand-name {
    font-family: 'Baloo 2', sans-serif;
    font-weight: 600;
    font-size: 14px;
    color: var(--ink);
}

/* ========== STEP INDICATOR ========== */
.step-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 20px 0 12px;
    animation: fadeUp 0.4s ease both;
}

.step-num {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-deep) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Baloo 2', sans-serif;
    font-weight: 700;
    font-size: 14px;
    color: var(--white);
}

.step-text {
    font-size: 13px;
    color: var(--ink-soft);
    font-weight: 500;
}

/* ========== ILUSTRAÇÃO ========== */
.illus-wrap {
    position: relative;
    padding: 20px 0 16px;
    display: flex;
    justify-content: center;
    animation: fadeUp 0.5s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.illus-icon {
    font-size: 80px;
    position: relative;
    z-index: 2;
    filter: drop-shadow(0 8px 24px rgba(0,0,0,0.08));
}

.illus-img {
    width: 100%;
    max-width: 280px;
    height: auto;
    position: relative;
    z-index: 2;
    filter: drop-shadow(0 8px 24px rgba(0,0,0,0.08));
}

.blob {
    position: absolute;
    top: 50%;
    right: 15%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, var(--primary-soft), #fff, var(--primary-soft));
    border: 8px solid var(--primary-soft);
    animation: spin 18s linear infinite;
    opacity: 0.5;
    z-index: 1;
}

/* ========== HEADER ========== */
.header {
    margin-bottom: 20px;
    animation: fadeUp 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0.05s both;
}

h1 {
    font-family: 'Baloo 2', sans-serif;
    font-weight: 700;
    font-size: 26px;
    line-height: 1.2;
    letter-spacing: -0.5px;
    color: var(--ink);
    margin-bottom: 6px;
}

h2 {
    font-family: 'Baloo 2', sans-serif;
    font-weight: 700;
    font-size: 22px;
    line-height: 1.3;
    color: var(--ink);
    margin-bottom: 8px;
}

.subtitle {
    font-size: 14px;
    color: var(--ink-soft);
    line-height: 1.4;
}

/* ========== OPÇÕES ========== */
.options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.opt {
    position: relative;
    border: 2px solid var(--line);
    background: var(--white);
    border-radius: 16px;
    padding: 18px 20px;
    font-family: 'Baloo 2', sans-serif;
    font-weight: 600;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fadeUp 0.5s cubic-bezier(0.4, 0, 0.2, 1) both;
    -webkit-tap-highlight-color: transparent;
    box-shadow: var(--shadow-sm);
}

.opt:nth-child(1) { animation-delay: 0.1s; }
.opt:nth-child(2) { animation-delay: 0.15s; }
.opt:nth-child(3) { animation-delay: 0.2s; }
.opt:nth-child(4) { animation-delay: 0.25s; }

.opt:hover {
    border-color: var(--primary);
    background: linear-gradient(135deg, #fff 0%, var(--primary-soft) 100%);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.opt .label {
    display: flex;
    align-items: center;
    gap: 12px;
}

.opt .emoji {
    font-size: 20px;
    line-height: 1;
}

.opt .radio {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid #D0CAC3;
    flex-shrink: 0;
    position: relative;
    transition: all 0.2s ease;
    background: var(--white);
}

.opt .radio::after {
    content: '';
    position: absolute;
    inset: 4px;
    border-radius: 50%;
    background: var(--white);
    transform: scale(0);
    transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.opt.selected {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-deep) 100%);
    border-color: var(--primary-deep);
    color: var(--white);
    box-shadow: 0 8px 24px -6px var(--primary-glow);
    transform: translateY(-2px);
}

.opt.selected:hover {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-deep) 100%);
}

.opt.selected .radio {
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.2);
}

.opt.selected .radio::after {
    transform: scale(1);
    background: var(--white);
}

.opt:active {
    transform: scale(0.98) !important;
}

/* ========== ESPAÇADOR ========== */
.spacer {
    flex: 1;
    min-height: 24px;
}

/* ========== BOTÃO CTA ========== */
.cta-wrap {
    padding: 8px 0 16px;
    animation: fadeUp 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0.2s both;
}

.cta {
    display: block;
    width: 100%;
    border: none;
    border-radius: 16px;
    padding: 18px 24px;
    font-family: 'Baloo 2', sans-serif;
    font-weight: 700;
    font-size: 17px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-deep) 100%);
    color: var(--white);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.3px;
    text-align: center;
    text-decoration: none;
    box-shadow: 0 12px 28px -8px var(--primary-glow);
    -webkit-tap-highlight-color: transparent;
    position: relative;
    overflow: hidden;
}

.cta::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.cta:hover::before {
    opacity: 1;
}

.cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 32px -8px var(--primary-glow);
}

.cta:active {
    transform: scale(0.98) translateY(0);
}

.cta.disabled {
    background: var(--line);
    color: #B7B0A6;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

.cta.disabled::before {
    display: none;
}

.cta.disabled:hover {
    transform: none;
    box-shadow: none;
}

/* ========== LINHA DE CONFIANÇA ========== */
.trust-line {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 500;
    color: var(--ink-soft);
    padding: 16px 0;
}

.trust-line svg {
    width: 14px;
    height: 14px;
    stroke: var(--primary);
    stroke-width: 2.5;
}

/* ========== FOOTER ========== */
footer {
    text-align: center;
    font-size: 11px;
    color: #C5BFB8;
    padding: 8px 0 20px;
    flex-shrink: 0;
}

.back-link {
    color: var(--ink-soft);
    cursor: pointer;
    transition: color 0.2s ease;
}

.back-link:hover {
    color: var(--primary);
}

/* ========== LOADING ========== */
.loading-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin-bottom: 32px;
    animation: fadeUp 0.5s ease both;
}

.spinner {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 4px solid var(--primary-soft);
    border-top-color: var(--primary);
    animation: spin2 0.8s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.loading-sub {
    font-size: 14px;
    color: var(--ink-soft);
}

/* ========== INFO CARDS ========== */
.loading-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    max-width: 320px;
    animation: fadeUp 0.5s ease 0.2s both;
}

.info-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 14px 16px;
    text-align: left;
}

.info-icon {
    font-size: 24px;
}

.info-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.info-text strong {
    font-size: 12px;
    color: var(--ink-soft);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-text span {
    font-size: 14px;
    color: var(--ink);
    font-weight: 500;
}

.info-text .small {
    font-size: 11px;
    color: var(--ink-soft);
}

/* ========== LOADING FOOTER ========== */
.loading-footer {
    padding: 24px;
}

.loading-footer p {
    font-size: 11px;
    color: #C5BFB8;
    margin-bottom: 4px;
}

.loading-footer .small {
    margin-top: 8px;
    font-size: 10px;
}

/* ========== ANIMAÇÕES ========== */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes spin {
    to { transform: translateY(-50%) rotate(360deg); }
}

@keyframes spin2 {
    to { transform: rotate(360deg); }
}

/* ========== RESPONSIVO - TELAS PEQUENAS ========== */
@media (max-width: 380px) {
    .content {
        padding: 0 20px;
    }

    .illus-wrap {
        padding: 16px 0 12px;
    }

    .illus-icon {
        font-size: 64px;
    }

    .blob {
        width: 45px;
        height: 45px;
        border-width: 6px;
        right: 10%;
    }

    h1 {
        font-size: 24px;
    }

    .subtitle {
        font-size: 13px;
    }

    .opt {
        padding: 16px 18px;
        font-size: 15px;
        border-radius: 14px;
    }

    .opt .emoji {
        font-size: 18px;
    }

    .opt .radio {
        width: 22px;
        height: 22px;
    }

    .cta {
        padding: 16px 20px;
        font-size: 16px;
        border-radius: 14px;
    }

    .trust-line {
        font-size: 11px;
    }
}

/* ========== RESPONSIVO - TELAS GRANDES ========== */
@media (min-width: 431px) {
    .phone {
        min-height: 100vh;
        border-left: 1px solid var(--line);
        border-right: 1px solid var(--line);
        box-shadow: 0 0 60px -20px rgba(0,0,0,0.1);
    }
}

/* ========== ACESSIBILIDADE ========== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ========== FOCUS STATES ========== */
.opt:focus-visible,
.cta:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}

/* ========== PAGE WRAPPER ========== */
.page-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: -webkit-fill-available;
}

/* ========== STEP BACK ========== */
.step-back {
    text-align: center;
    padding: 8px 0 4px;
}

/* ========== SITE FOOTER (Completo) ========== */
.site-footer {
    background: var(--bg);
    border-top: 1px solid var(--line);
    padding: 0;
    flex-shrink: 0;
    width: 100%;
    max-width: 430px;
    margin: 0 auto;
}

.footer-content {
    padding: 20px 24px;
}

.footer-main {
    text-align: center;
    margin-bottom: 16px;
}

.footer-brand {
    font-family: 'Baloo 2', sans-serif;
    font-weight: 600;
    font-size: 14px;
    color: var(--ink);
    display: block;
    margin-bottom: 2px;
}

.footer-cnpj {
    font-size: 11px;
    color: #B0A99F;
}

/* ========== REGULATORY BOX (Expansível) ========== */
.regulatory-box {
    margin-bottom: 16px;
}

.regulatory-box summary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 16px;
    background: transparent;
    border: none;
    border-radius: 0;
    cursor: pointer;
    list-style: none;
    transition: opacity 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.regulatory-box summary::-webkit-details-marker {
    display: none;
}

.regulatory-box summary:hover {
    opacity: 0.7;
}

.summary-text {
    font-size: 12px;
    font-weight: 500;
    color: var(--primary);
}

.summary-icon {
    font-size: 8px;
    color: var(--primary);
    transition: transform 0.3s ease;
}

.regulatory-box[open] .summary-icon {
    transform: rotate(180deg);
}

.regulatory-content {
    padding: 20px 0 0;
    animation: fadeIn 0.25s ease;
}

/* ========== REG SECTIONS ========== */
.reg-section {
    margin-bottom: 20px;
}

.reg-section:last-of-type {
    margin-bottom: 0;
}

.reg-section h4 {
    font-size: 10px;
    font-weight: 700;
    color: #B0A99F;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.reg-name {
    font-family: 'Baloo 2', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 6px;
}

.reg-detail {
    font-size: 12px;
    color: var(--ink-soft);
    margin-bottom: 3px;
    line-height: 1.5;
}

.reg-detail a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.reg-detail a:hover {
    text-decoration: underline;
}

.reg-role {
    font-size: 11px;
    color: #B0A99F;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--line);
}

/* ========== NOTICE BOXES ========== */
.reg-notices {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
}

.notice-box {
    padding: 14px 16px;
    border-radius: 10px;
    font-size: 11px;
    line-height: 1.6;
    margin-bottom: 12px;
    color: var(--ink-soft);
    background: var(--white);
    border: 1px solid var(--line);
}

.notice-box:last-child {
    margin-bottom: 0;
}

.notice-box strong {
    display: block;
    margin-bottom: 6px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.notice-security strong {
    color: #b91c1c;
}

.notice-risk strong {
    color: #a16207;
}

/* ========== REG LINKS ========== */
.reg-links {
    margin-top: 24px;
    text-align: center;
    font-size: 11px;
}

.reg-links a {
    color: var(--ink-soft);
    text-decoration: none;
    transition: color 0.2s ease;
}

.reg-links a:hover {
    color: var(--primary);
}

.link-sep {
    color: #D0CAC3;
    margin: 0 10px;
}

/* ========== FOOTER COPY ========== */
.footer-copy {
    text-align: center;
    font-size: 10px;
    color: #C5BFB8;
}

/* ========== RESPONSIVO FOOTER ========== */
@media (max-width: 380px) {
    .footer-content {
        padding: 14px 16px;
    }

    .footer-brand {
        font-size: 12px;
    }

    .regulatory-content {
        padding: 12px;
    }

    .notice-box {
        padding: 10px;
        font-size: 9px;
    }
}
