/* Variaveis */
:root {
    --color-bg-main: #0B0B0E;
    --color-bg-card: #131215;
    --color-bg-elevated: #232026;
    --color-border-soft: #37343A;
    --color-border-lavender: #624D84;
    --color-text-main: #F2EEE8;
    --color-text-secondary: #AFA9A6;
    --color-text-muted: #716D6B;
    --color-lavender-light: #B793E5;
    --color-lavender-main: #9A77D1;
    --color-lavender-deep: #624D84;
    --color-success: #A6EFA2;
    --color-warning: #F0C45A;
    --color-danger: #FF5B6B;
    --font-title: Georgia, "Times New Roman", serif;
    --font-text: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --radius: 8px;
    --shadow-soft: 0 24px 80px rgba(0, 0, 0, 0.45);
}

/* Reset e base */
* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--color-bg-main);
}

body {
    min-height: 100%;
    margin: 0;
    color: var(--color-text-main);
    background:
        radial-gradient(circle at 50% 22%, rgba(98, 77, 132, 0.24), transparent 31rem),
        linear-gradient(180deg, #050506 0%, var(--color-bg-main) 48%, #08080A 100%);
    font-family: var(--font-text);
    line-height: 1.5;
}

a {
    color: inherit;
}

button,
input {
    font: inherit;
}

button {
    border: 0;
}

img {
    display: block;
    max-width: 100%;
}

/* Tipografia */
h1,
h2,
h3,
p {
    margin-top: 0;
}

h1,
h2,
h3 {
    color: var(--color-text-main);
    font-family: var(--font-title);
    font-weight: 400;
    letter-spacing: 0;
}

h1 {
    max-width: 11ch;
    margin-bottom: 14px;
    font-size: clamp(2.6rem, 13vw, 4.85rem);
    line-height: 0.98;
}

h2 {
    margin-bottom: 8px;
    font-size: 1.5rem;
    line-height: 1.12;
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--color-lavender-light);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.section-copy,
.lead-copy,
.card-body,
.content-card p {
    color: var(--color-text-secondary);
}

.section-copy {
    max-width: 34rem;
    margin-bottom: 24px;
    font-size: 1rem;
}

.lead-copy {
    max-width: 23rem;
    margin: 28px auto;
    color: var(--color-text-main);
    font-size: 1.28rem;
    line-height: 1.35;
}

/* Layout mobile first */
.app-shell {
    width: min(100%, 540px);
    min-height: 100vh;
    margin: 0 auto;
    padding: 24px 20px 18px;
    display: flex;
    flex-direction: column;
}

.app-main {
    flex: 1;
    display: flex;
    align-items: stretch;
}

.hero-section,
.screen-section {
    position: relative;
    width: 100%;
    padding: 22px 0 8px;
}

.hero-section {
    text-align: center;
}

.hero-section .page-header {
    display: grid;
    justify-items: center;
}

.screen-section {
    text-align: left;
}

.screen-section .page-header h1 {
    max-width: 12ch;
}

.action-stack {
    display: grid;
    gap: 14px;
}

/* Header */
.app-header {
    min-height: 72px;
    display: grid;
    place-items: center;
    gap: 12px;
}

.app-footer {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    padding-top: 22px;
    color: var(--color-text-muted);
    font-size: 0.82rem;
}

.app-footer span + span::before {
    content: "•";
    margin-right: 10px;
}

.app-footer a {
    color: var(--color-text-muted);
    text-decoration-color: rgba(183, 147, 229, 0.28);
    text-underline-offset: 4px;
}

.header-nav {
    display: flex;
    justify-content: center;
    gap: 12px;
    color: var(--color-text-muted);
    font-size: 0.82rem;
}

.header-nav a {
    color: var(--color-text-secondary);
    text-decoration-color: rgba(183, 147, 229, 0.38);
    text-underline-offset: 4px;
}

/* Logo */
.brand-mark {
    width: 74px;
    height: 74px;
    padding: 16px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(183, 147, 229, 0.28);
    border-radius: 50%;
    background: rgba(19, 18, 21, 0.72);
    box-shadow: 0 0 36px rgba(183, 147, 229, 0.12);
    text-decoration: none;
}

.brand-mark img {
    width: 46px;
    opacity: 0.92;
}

.brand-mark-text {
    width: auto;
    min-width: 74px;
    padding-inline: 18px;
    border-radius: var(--radius);
    color: var(--color-text-main);
    font-family: var(--font-title);
    font-size: 1rem;
}

/* Cards */
.form-card,
.content-card,
.trail-card {
    border: 1px solid rgba(55, 52, 58, 0.9);
    border-radius: var(--radius);
    background:
        linear-gradient(180deg, rgba(35, 32, 38, 0.38), rgba(19, 18, 21, 0.82)),
        var(--color-bg-card);
    box-shadow: var(--shadow-soft);
}

.content-card {
    position: relative;
    margin-bottom: 22px;
    padding: 22px;
}

.content-card.with-icon::before {
    content: "✦";
    width: 44px;
    height: 44px;
    margin-bottom: 16px;
    display: grid;
    place-items: center;
    color: var(--color-lavender-light);
    border: 1px solid rgba(183, 147, 229, 0.45);
    border-radius: 50%;
}

.content-card h2 {
    font-size: 1.42rem;
}

.card-body p:last-child {
    margin-bottom: 0;
}

/* Botoes */
.button {
    width: 100%;
    min-height: 58px;
    padding: 16px 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    border-radius: var(--radius);
    text-align: center;
    text-decoration: none;
    font-size: 1.04rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.button-primary {
    color: #161019;
    background: linear-gradient(180deg, var(--color-lavender-light), var(--color-lavender-main));
    box-shadow: 0 14px 34px rgba(154, 119, 209, 0.26);
}

.button-secondary {
    color: var(--color-text-main);
    border-color: rgba(183, 147, 229, 0.55);
    background: rgba(98, 77, 132, 0.22);
}

.button-ghost {
    min-height: 48px;
    color: var(--color-lavender-light);
    background: transparent;
    text-decoration: underline;
    text-decoration-color: rgba(183, 147, 229, 0.55);
    text-underline-offset: 5px;
}

.button:hover {
    transform: translateY(-1px);
}

.button:focus-visible,
.back-link:focus-visible,
input:focus-visible,
.option-card:focus-within {
    outline: 2px solid var(--color-lavender-light);
    outline-offset: 3px;
}

.back-link {
    width: 44px;
    height: 44px;
    margin-bottom: 18px;
    display: grid;
    place-items: center;
    color: var(--color-text-main);
    border: 1px solid var(--color-border-soft);
    border-radius: 50%;
    background: rgba(35, 32, 38, 0.65);
    text-decoration: none;
    font-size: 2rem;
    line-height: 1;
}

/* Formularios */
.form-card {
    display: grid;
    gap: 16px;
    padding: 18px;
}

label,
legend {
    color: var(--color-text-secondary);
    font-size: 0.94rem;
}

label {
    display: grid;
    gap: 8px;
}

input {
    width: 100%;
    min-height: 52px;
    padding: 14px 15px;
    color: var(--color-text-main);
    border: 1px solid var(--color-border-soft);
    border-radius: var(--radius);
    background: rgba(11, 11, 14, 0.72);
}

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

.option-group {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.option-group legend {
    margin-bottom: 10px;
}

.option-list {
    display: grid;
    gap: 10px;
}

.option-card {
    min-height: 50px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--color-border-soft);
    border-radius: var(--radius);
    background: rgba(11, 11, 14, 0.56);
    cursor: pointer;
}

.option-card input {
    width: 18px;
    min-height: 18px;
    accent-color: var(--color-lavender-main);
}

.option-card span {
    color: var(--color-text-main);
}

/* Badges */
.badge {
    width: fit-content;
    padding: 6px 10px;
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--color-border-soft);
    border-radius: 999px;
    color: var(--color-text-secondary);
    background: rgba(35, 32, 38, 0.72);
    font-size: 0.78rem;
    font-weight: 700;
}

.badge-success {
    color: #152313;
    border-color: rgba(166, 239, 162, 0.35);
    background: var(--color-success);
}

.badge-warning {
    color: #2A1F04;
    border-color: rgba(240, 196, 90, 0.4);
    background: var(--color-warning);
}

.badge-danger {
    color: #2B050A;
    border-color: rgba(255, 91, 107, 0.42);
    background: var(--color-danger);
}

.badge-lavender {
    color: var(--color-text-main);
    border-color: rgba(183, 147, 229, 0.5);
    background: rgba(98, 77, 132, 0.55);
}

/* Barra de progresso */
.progress-block {
    margin-bottom: 22px;
}

.progress-summary {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 8px;
    color: var(--color-text-secondary);
    font-size: 0.9rem;
}

.progress-bar {
    height: 10px;
    border: 1px solid var(--color-border-soft);
    border-radius: 999px;
    background: var(--color-bg-card);
    overflow: hidden;
}

.progress-bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--color-lavender-main), var(--color-lavender-light));
}

/* Jornada/cards de trilha */
.timeline {
    display: grid;
    gap: 14px;
    margin-bottom: 22px;
}

.trail-card {
    display: grid;
    grid-template-columns: 46px 1fr;
    gap: 14px;
    padding: 18px;
}

.trail-card.is-open {
    border-color: rgba(183, 147, 229, 0.74);
}

.trail-step {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    color: var(--color-lavender-light);
    border: 1px solid rgba(183, 147, 229, 0.55);
    border-radius: 50%;
    font-weight: 700;
}

.trail-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.trail-card p,
.trail-card span {
    margin: 0;
    color: var(--color-text-secondary);
}

.trail-card h2 {
    font-size: 1.35rem;
}

/* Estados de feedback */
.feedback {
    padding: 14px;
    border: 1px solid var(--color-border-soft);
    border-radius: var(--radius);
    color: var(--color-text-secondary);
    background: var(--color-bg-card);
}

.feedback-success {
    border-color: rgba(166, 239, 162, 0.42);
}

.feedback-info {
    border-color: rgba(183, 147, 229, 0.42);
}

.feedback-warning {
    border-color: rgba(240, 196, 90, 0.42);
}

.feedback-danger {
    border-color: rgba(255, 91, 107, 0.42);
}

.flash-stack {
    margin: 6px 0 18px;
}

.flash {
    padding: 13px 15px;
    border: 1px solid var(--color-border-soft);
    border-radius: var(--radius);
    color: var(--color-text-main);
    background: rgba(19, 18, 21, 0.92);
    font-size: 0.94rem;
}

.flash-success {
    border-color: rgba(166, 239, 162, 0.42);
}

.flash-error {
    border-color: rgba(255, 91, 107, 0.42);
}

.flash-warning {
    border-color: rgba(240, 196, 90, 0.42);
}

.flash-info {
    border-color: rgba(183, 147, 229, 0.42);
}

.access-placeholder {
    margin-bottom: 18px;
}

/* Questionario diagnostico */
.diagnostic-screen .back-link {
    margin-bottom: 12px;
}

.question-progress {
    margin-bottom: 16px;
}

.question-card {
    padding: 22px;
    border: 1px solid rgba(183, 147, 229, 0.34);
    border-radius: var(--radius);
    background:
        radial-gradient(circle at 50% 0, rgba(183, 147, 229, 0.12), transparent 16rem),
        rgba(19, 18, 21, 0.88);
    box-shadow: var(--shadow-soft);
}

.question-card h1 {
    max-width: 100%;
    margin-bottom: 22px;
    font-size: clamp(2rem, 10vw, 3.5rem);
    line-height: 1.08;
}

.answer-form {
    display: grid;
    gap: 16px;
}

.answer-options {
    display: grid;
    gap: 12px;
}

.answer-option {
    min-height: 58px;
    padding: 15px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--color-border-soft);
    border-radius: var(--radius);
    background: rgba(11, 11, 14, 0.68);
    cursor: pointer;
}

.answer-option input {
    width: 20px;
    min-height: 20px;
    accent-color: var(--color-lavender-main);
}

.answer-option span {
    color: var(--color-text-main);
    font-size: 1.02rem;
    font-weight: 700;
}

.answer-option.is-selected,
.answer-option:focus-within {
    border-color: var(--color-lavender-light);
    background: rgba(98, 77, 132, 0.28);
}

/* Resultado diagnostico */
.diagnosis-highlight,
.result-grid {
    display: grid;
    gap: 14px;
    margin-bottom: 22px;
}

.diagnosis-name {
    margin: 0;
    color: var(--color-text-main);
    font-family: var(--font-title);
    font-size: 1.9rem;
    line-height: 1.08;
}

.score-card {
    min-height: 96px;
    padding: 16px;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 14px;
    border: 1px solid var(--color-border-soft);
    border-radius: var(--radius);
    background: rgba(19, 18, 21, 0.84);
}

.score-card h2 {
    margin-bottom: 5px;
    font-size: 1.25rem;
}

.score-card p {
    margin: 0;
    color: var(--color-text-secondary);
}

.score-card strong {
    color: var(--color-text-main);
    font-size: 1.4rem;
}

.risk-green {
    border-color: rgba(166, 239, 162, 0.36);
}

.risk-yellow {
    border-color: rgba(240, 196, 90, 0.46);
}

.risk-red {
    border-color: rgba(255, 91, 107, 0.46);
}

/* Devolutiva e trilhas */
.devolutive-screen .page-header .section-copy {
    color: var(--color-text-muted);
}

.devolutive-hero,
.trail-recommendation,
.lesson-card {
    border: 1px solid rgba(183, 147, 229, 0.34);
    border-radius: var(--radius);
    background:
        linear-gradient(180deg, rgba(98, 77, 132, 0.18), rgba(19, 18, 21, 0.86)),
        var(--color-bg-card);
    box-shadow: var(--shadow-soft);
}

.devolutive-hero {
    margin-bottom: 16px;
    padding: 22px;
}

.devolutive-hero h2 {
    margin-bottom: 12px;
    font-size: clamp(2rem, 10vw, 3.2rem);
}

.devolutive-hero p:last-child,
.trail-recommendation p:last-child {
    margin-bottom: 0;
    color: var(--color-text-secondary);
}

.keyword-pill {
    width: fit-content;
    margin-bottom: 16px;
    padding: 8px 12px;
    color: #161019;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--color-lavender-light), var(--color-lavender-main));
    font-weight: 800;
}

.devolutive-pair,
.devolutive-blocks,
.recommended-trails,
.lesson-list {
    display: grid;
    gap: 14px;
    margin-bottom: 22px;
}

.step-list {
    margin: 0;
    padding-left: 22px;
    color: var(--color-text-secondary);
}

.step-list li + li {
    margin-top: 10px;
}

.trail-recommendation {
    padding: 18px;
}

.trail-recommendation.is-primary {
    border-color: rgba(183, 147, 229, 0.68);
}

.final-message {
    border-color: rgba(183, 147, 229, 0.44);
}

.lesson-card {
    min-height: 92px;
    padding: 16px;
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 14px;
    align-items: start;
    text-decoration: none;
}

.lesson-card > span {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    color: var(--color-lavender-light);
    border: 1px solid rgba(183, 147, 229, 0.5);
    border-radius: 50%;
    font-weight: 800;
}

.lesson-card p {
    margin-bottom: 4px;
    color: var(--color-text-muted);
    font-size: 0.84rem;
    font-weight: 700;
    text-transform: uppercase;
}

.lesson-card h2 {
    margin: 0;
    font-size: 1.26rem;
}

.lesson-card.is-completed {
    border-color: rgba(166, 239, 162, 0.42);
}

.lesson-card.is-completed > span {
    color: #152313;
    border-color: transparent;
    background: var(--color-success);
}

.lesson-reader {
    margin-bottom: 18px;
    padding: 22px;
    border: 1px solid rgba(183, 147, 229, 0.34);
    border-radius: var(--radius);
    background:
        radial-gradient(circle at 50% 0, rgba(183, 147, 229, 0.12), transparent 16rem),
        rgba(19, 18, 21, 0.9);
    box-shadow: var(--shadow-soft);
}

.lesson-reader h1 {
    max-width: 100%;
    margin-bottom: 20px;
    font-size: clamp(2.1rem, 10vw, 3.6rem);
    line-height: 1.05;
}

.lesson-content {
    display: grid;
    gap: 12px;
    margin-bottom: 20px;
}

.lesson-content p {
    margin: 0;
    color: var(--color-text-secondary);
}

.reflection-box {
    padding: 16px;
    border: 1px solid rgba(183, 147, 229, 0.4);
    border-radius: var(--radius);
    background: rgba(98, 77, 132, 0.18);
}

.exercise-box {
    margin-bottom: 16px;
    padding: 16px;
    border: 1px solid rgba(240, 196, 90, 0.35);
    border-radius: var(--radius);
    background: rgba(240, 196, 90, 0.08);
}

.exercise-box h2 {
    margin-bottom: 8px;
    font-size: 1.35rem;
}

.exercise-box p:last-child {
    margin-bottom: 0;
    color: var(--color-text-secondary);
}

.reflection-box p:last-child {
    margin-bottom: 0;
    color: var(--color-text-main);
    font-family: var(--font-title);
    font-size: 1.35rem;
    line-height: 1.2;
}

.completion-form {
    display: grid;
    gap: 12px;
}

.personal-trail-screen .trail-recommendation {
    margin-bottom: 18px;
}

.access-card,
.access-status-card {
    margin-bottom: 22px;
}

.access-status-card {
    padding: 18px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    border: 1px solid rgba(166, 239, 162, 0.34);
    border-radius: var(--radius);
    background: rgba(19, 18, 21, 0.88);
    box-shadow: var(--shadow-soft);
}

.access-status-card h2 {
    margin-bottom: 4px;
    font-size: 1.35rem;
}

.access-status-card span {
    color: var(--color-text-secondary);
}

.future-payment-slot {
    margin-top: 16px;
    padding: 14px;
    border: 1px dashed rgba(183, 147, 229, 0.45);
    border-radius: var(--radius);
    background: rgba(98, 77, 132, 0.12);
}

.future-payment-slot span {
    color: var(--color-text-main);
    font-weight: 800;
}

.access-grant-form .feedback {
    margin-bottom: 0;
}

.product-grid {
    display: grid;
    gap: 14px;
}

.product-card {
    padding: 18px;
    display: grid;
    gap: 16px;
    border: 1px solid var(--color-border-soft);
    border-radius: var(--radius);
    background: rgba(19, 18, 21, 0.88);
    box-shadow: var(--shadow-soft);
}

.product-card.is-featured {
    border-color: rgba(183, 147, 229, 0.68);
}

.product-card h2 {
    margin-bottom: 8px;
    font-size: 1.45rem;
}

.product-card p {
    color: var(--color-text-secondary);
}

.product-card strong {
    display: block;
    color: var(--color-text-main);
    font-size: 1.45rem;
}

.checkout-screen .feedback,
.payment-screen .content-card {
    margin-bottom: 18px;
}

.completion-grid {
    display: grid;
    gap: 14px;
    margin-bottom: 22px;
}

.completion-card {
    border-color: rgba(166, 239, 162, 0.38);
}

.journey-complete-screen .final-message {
    margin-bottom: 22px;
}

/* Elementos visuais */
.ornament {
    width: 180px;
    margin: 0 auto 18px;
    color: var(--color-text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.ornament::before,
.ornament::after {
    content: "";
    height: 1px;
    flex: 1;
    background: var(--color-border-soft);
}

.ornament::before {
    margin-right: 12px;
}

.ornament::after {
    margin-left: 12px;
}

.map-visual {
    position: relative;
    min-height: 178px;
    margin: 28px 0 10px;
    border-radius: var(--radius);
    overflow: hidden;
    background:
        linear-gradient(160deg, transparent 0 45%, rgba(183, 147, 229, 0.22) 45.5%, transparent 46% 100%),
        repeating-radial-gradient(ellipse at 50% 90%, rgba(183, 147, 229, 0.13) 0 1px, transparent 1px 22px);
}

.map-visual::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent, var(--color-bg-main));
}

.map-point {
    position: absolute;
    z-index: 1;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    color: var(--color-lavender-light);
    border: 1px solid rgba(183, 147, 229, 0.45);
    border-radius: 50%;
    background: rgba(19, 18, 21, 0.8);
    box-shadow: 0 0 22px rgba(183, 147, 229, 0.28);
}

.point-one {
    left: 12%;
    bottom: 34%;
}

.point-two {
    right: 14%;
    bottom: 18%;
}

.point-three {
    left: 48%;
    top: 18%;
}

/* Responsividade tablet/desktop */
@media (min-width: 760px) {
    .app-shell {
        width: min(100%, 680px);
        padding: 30px 36px 22px;
    }

    .hero-section,
    .screen-section {
        padding-top: 34px;
    }

    .form-card,
    .content-card {
        padding: 26px;
    }

    .option-list {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Utilitarios */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
