/* ============================================
   DIAGNÓSTICO DE MATURIDADE EM IA
   Usa os tokens do design system (styles.css).
   Os nomes .di-* são gerados por diagnostico.js.
   ============================================ */

/* ---- Página ---- */
.diag-body {
    background: var(--bg-secondary);
}

/* ---- Seção da página ---- */
.diag-section {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 100vh;
    padding: 64px 0 80px;
    overflow: hidden;
    background: var(--bg-secondary);
}

.diag-section > .container {
    position: relative;
    z-index: 1;
    width: 100%;
}

.diag-mesh {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 65% 45% at 50% 0%, rgba(45, 91, 255, 0.1) 0%, transparent 60%),
        radial-gradient(ellipse 45% 40% at 85% 80%, rgba(108, 59, 255, 0.07) 0%, transparent 55%);
    pointer-events: none;
}

.diag-header {
    position: relative;
    z-index: 1;
    text-align: center;
    margin-bottom: 40px;
}

/* block + width fit: senão o logo e o .section-tag caem na mesma linha
   e o par inteiro é que fica centralizado (cada um sai do eixo). */
.diag-brand {
    display: block;
    width: fit-content;
    margin: 0 auto 28px;
    transition: opacity 0.3s;
}

.diag-brand img {
    height: 30px;
    width: auto;
    display: block;
}

.diag-brand:hover {
    opacity: 0.7;
}

.diag-meta {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.diag-meta span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 100px;
    padding: 7px 16px;
    box-shadow: var(--shadow-sm);
}

.diag-meta i {
    color: var(--accent);
    font-size: 12px;
}

.diag-shell {
    position: relative;
    z-index: 1;
}

/* Entrada suave (a página não carrega o script.js do site) */
.diag-header,
.diag-shell {
    animation: diag-in 0.7s var(--ease-out-expo) both;
}

.diag-shell {
    animation-delay: 0.12s;
}

@keyframes diag-in {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

/* ---- Ponte de tokens: as variáveis usadas inline pelo diagnostico.js ---- */
.di-root {
    --ink: var(--text-primary);
    --ink2: var(--text-secondary);
    --line: var(--border);
    --surf: var(--bg-card);
    --opp: var(--accent-warm);
    --ready: var(--accent);
    display: flex;
    justify-content: center;
    font-family: var(--font-body);
    color: var(--text-primary);
}

.di-wrap {
    width: 100%;
    max-width: 640px;
}

/* Números tabulares com a tipografia da marca (sem monoespaçada) */
.di-mono {
    font-family: var(--font-display);
    font-variant-numeric: tabular-nums;
}

/* ---- Superfícies ---- */
.di-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: clamp(24px, 4vw, 40px);
    box-shadow: var(--shadow-lg);
}

.di-panel {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px;
}

/* ---- Tipografia ---- */
.di-eyebrow {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    color: var(--accent);
}

.di-h1 {
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 3vw, 2.1rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.15;
    color: var(--text-primary);
    margin: 16px 0;
}

.di-h1-sm {
    font-size: clamp(1.2rem, 2.4vw, 1.45rem);
    letter-spacing: -0.02em;
    line-height: 1.3;
    margin: 0 0 22px;
}

.di-lead {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-secondary);
    font-weight: 400;
}

.di-bt {
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ---- Botões ---- */
.di-btn {
    appearance: none;
    border: none;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.3px;
    background: var(--accent);
    color: #ffffff;
    padding: 15px 28px;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 16px rgba(45, 91, 255, 0.25);
    transition: transform 0.4s var(--ease-out-expo), box-shadow 0.4s var(--ease-out-expo), opacity 0.3s;
}

.di-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(45, 91, 255, 0.35);
}

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

.di-btn[disabled] {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.di-ghost {
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 4px;
    transition: color 0.3s;
}

.di-ghost:hover {
    color: var(--accent);
}

/* ---- Opções do quiz ---- */
.di-opt {
    display: block;
    width: 100%;
    text-align: left;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 500;
    line-height: 1.45;
    color: var(--text-primary);
    cursor: pointer;
    margin-bottom: 10px;
    transition: all 0.35s var(--ease-out-expo);
}

.di-opt:hover {
    border-color: rgba(45, 91, 255, 0.35);
    background: var(--accent-ultra-light);
    transform: translateX(3px);
    box-shadow: var(--shadow-sm);
}

.di-opt[data-sel="true"] {
    border-color: var(--accent);
    background: var(--accent);
    color: #ffffff;
    box-shadow: 0 6px 20px rgba(45, 91, 255, 0.28);
}

/* ---- Progresso ---- */
.di-bar {
    height: 5px;
    background: rgba(12, 15, 26, 0.07);
    border-radius: 100px;
    overflow: hidden;
}

.di-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 100px;
    transition: width 0.5s var(--ease-out-expo);
}

.di-step {
    font-family: var(--font-display);
    font-variant-numeric: tabular-nums;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
}

.di-pilar-tag {
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--accent);
}

/* ---- Formulário ---- */
.di-field {
    margin-bottom: 16px;
}

.di-label {
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--text-muted);
}

.di-label span {
    text-transform: none;
    letter-spacing: 0;
    font-weight: 400;
}

.di-input {
    width: 100%;
    font-family: var(--font-body);
    font-size: 15px;
    color: var(--text-primary);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    margin-top: 8px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.di-input::placeholder {
    color: var(--text-muted);
}

.di-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-glow);
}

.di-phone {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.di-ddi {
    flex: 0 0 auto;
    width: 108px;
    font-family: var(--font-body);
    font-size: 15px;
    color: var(--text-primary);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px 10px;
    margin-top: 8px;
    cursor: pointer;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.di-ddi:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-glow);
}

.di-phone .di-phone-num {
    flex: 1 1 auto;
    min-width: 0;
}

.di-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.di-row > div {
    flex: 1 1 55%;
    min-width: 180px;
}

.di-row > div + div {
    flex: 1 1 35%;
    min-width: 150px;
}

.di-consent {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-bottom: 12px;
    cursor: pointer;
}

.di-consent input {
    margin-top: 3px;
    flex: none;
    accent-color: var(--accent);
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.di-consent span {
    font-size: 12.5px;
    line-height: 1.55;
    color: var(--text-secondary);
}

.di-fineprint {
    font-size: 11.5px;
    line-height: 1.6;
    color: var(--text-muted);
    margin-bottom: 18px;
}

.di-fineprint a {
    color: var(--text-secondary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.di-fineprint a:hover {
    color: var(--accent);
}

.di-error {
    font-size: 13.5px;
    font-weight: 500;
    color: #c0392b;
    background: rgba(192, 57, 43, 0.07);
    border: 1px solid rgba(192, 57, 43, 0.18);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    margin-bottom: 14px;
}

/* ---- Lista de benefícios (intro) ---- */
.di-perks {
    list-style: none;
    margin: 22px 0 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.di-perks li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.5;
    color: var(--text-secondary);
}

.di-perks li i {
    color: var(--accent);
    font-size: 11px;
    margin-top: 5px;
    flex: none;
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--accent-ultra-light);
}

/* ---- Resultado ---- */
.di-pill {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.6px;
    padding: 6px 14px;
    border-radius: 100px;
}

.di-score {
    display: flex;
    align-items: center;
    gap: 22px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.di-score-n {
    font-family: var(--font-display);
    font-size: clamp(3rem, 8vw, 4rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1;
}

.di-score-n span {
    font-size: 0.38em;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: -0.02em;
}

.di-mirror {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--text-primary);
    margin: 22px 0;
}

.di-pilar {
    margin-bottom: 16px;
}

.di-pilar:last-child {
    margin-bottom: 0;
}

.di-pilar .pi-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 8px;
}

.di-pilar .pi-nome {
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.di-pilar .pi-num {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
}

.di-pilar .pi-tag {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--accent);
    background: var(--accent-ultra-light);
    border: 1px solid rgba(45, 91, 255, 0.18);
    border-radius: 100px;
    padding: 3px 9px;
    margin-left: 8px;
    vertical-align: 1px;
}

.di-pilar .pi-bar {
    height: 7px;
}

.di-pilar .pi-fill {
    transition: width 0.9s var(--ease-out-expo);
}

.di-block {
    border-left: 3px solid var(--border);
    padding: 2px 0 2px 18px;
    margin: 22px 0;
}

.di-block .bt {
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.di-block p {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-secondary);
}

.di-action {
    border: none;
    margin-top: 20px;
}

.di-action p {
    font-size: 15px;
    line-height: 1.65;
    color: var(--text-primary);
}

.di-footer-actions {
    margin-top: 28px;
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}

/* ---- Estados de foco ---- */
.di-opt:focus-visible,
.di-btn:focus-visible,
.di-ghost:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

/* ---- Responsivo ---- */
@media (max-width: 768px) {
    .diag-section {
        padding: 44px 0 64px;
    }

    .diag-header {
        margin-bottom: 30px;
    }
}

@media (max-width: 520px) {
    .di-card {
        padding: 22px 18px;
    }

    .di-panel {
        padding: 18px;
    }

    .di-footer-actions .di-btn {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .diag-header,
    .diag-shell {
        animation: none;
    }

    .di-fill,
    .pi-fill,
    .di-opt,
    .di-btn,
    .di-ghost {
        transition: none !important;
    }

    .di-opt:hover {
        transform: none;
    }

    .di-btn:hover {
        transform: none;
    }
}