:root {
    color-scheme: dark;
    --bg: #0a0f14;
    --surface: #101820;
    --surface-raised: #151f29;
    --text: #e8edf2;
    --muted: #9aa7b4;
    --dim: #64717d;
    --line: rgba(210, 227, 239, 0.13);
    --accent: #6ee7d1;
    --accent-strong: #9af3e2;
    --danger: #ff8f91;
    --success: #6ee7d1;
    --sans: "Space Grotesk", "Segoe UI", sans-serif;
    --mono: "IBM Plex Mono", "Cascadia Code", monospace;
    --radius: 12px;
    --ease: 180ms ease;
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    background: var(--bg);
}

body {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    background:
        radial-gradient(ellipse at 50% -18%, rgba(110, 231, 209, 0.09), transparent 44rem),
        var(--bg);
    color: var(--text);
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

button,
input,
select {
    font: inherit;
}

a {
    color: inherit;
}

.site-shell {
    width: min(100% - 40px, 1080px);
    margin: 0 auto;
}

.topbar {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--line);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--text);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.02em;
    text-decoration: none;
}

.brand-mark {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border: 1px solid rgba(110, 231, 209, 0.38);
    border-radius: 9px;
    color: var(--accent);
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: -0.08em;
}

.topbar-note,
.eyebrow,
.step-label,
.field-label,
.field-hint,
.page-footer,
.success-label {
    font-family: var(--mono);
}

.topbar-note {
    color: var(--muted);
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.page-main {
    padding: clamp(48px, 8vw, 92px) 0 72px;
}

.intro {
    max-width: 710px;
    margin: 0 auto 36px;
    text-align: center;
}

.eyebrow,
.step-label {
    color: var(--accent);
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.intro h1 {
    margin: 16px 0;
    font-size: clamp(34px, 6vw, 56px);
    font-weight: 500;
    letter-spacing: -0.055em;
    line-height: 1.08;
}

.intro h1 span {
    color: var(--muted);
}

.intro-copy {
    max-width: 540px;
    margin: 0 auto;
    color: var(--muted);
    font-size: 15px;
}

.form-card,
.success-card {
    width: min(100%, 740px);
    margin: 0 auto;
    padding: clamp(22px, 5vw, 38px);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(145deg, rgba(21, 31, 41, 0.94), rgba(16, 24, 32, 0.96));
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.22);
}

.card-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 28px;
}

.card-heading h2,
.success-card h1 {
    margin: 6px 0 0;
    font-size: 22px;
    font-weight: 500;
    letter-spacing: -0.03em;
}

.step-label {
    color: var(--dim);
    font-size: 10px;
    white-space: nowrap;
}

.form-section + .form-section {
    margin-top: 30px;
    padding-top: 26px;
    border-top: 1px solid var(--line);
}

.form-section h3 {
    margin: 0 0 17px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.01em;
}

.field-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 16px;
}

.field {
    min-width: 0;
}

.field--wide {
    grid-column: 1 / -1;
}

.field-label {
    display: block;
    margin-bottom: 7px;
    color: var(--muted);
    font-size: 10px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.field-control {
    width: 100%;
    min-height: 48px;
    padding: 11px 14px;
    border: 1px solid rgba(210, 227, 239, 0.17);
    border-radius: 8px;
    outline: none;
    background: rgba(10, 15, 20, 0.55);
    color: var(--text);
    transition: border-color var(--ease), box-shadow var(--ease), background var(--ease);
}

.field-control::placeholder {
    color: var(--dim);
    opacity: 1;
}

.field-control:hover {
    border-color: rgba(210, 227, 239, 0.32);
}

.field-control:focus-visible {
    border-color: var(--accent);
    background: rgba(10, 15, 20, 0.8);
    box-shadow: 0 0 0 3px rgba(110, 231, 209, 0.13);
}

.field-control[aria-invalid="true"] {
    border-color: var(--danger);
}

.field-hint {
    display: block;
    margin-top: 7px;
    color: var(--dim);
    font-size: 10px;
    line-height: 1.5;
}

.cep-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 12px;
}

.cep-row .field {
    flex: 1;
}

.cep-feedback {
    min-height: 22px;
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.cep-feedback[data-state="loading"] {
    color: var(--accent);
}

.cep-feedback[data-state="success"] {
    color: var(--success);
}

.cep-feedback[data-state="error"] {
    color: var(--danger);
}

.button {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0 18px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: background var(--ease), border-color var(--ease), color var(--ease), transform var(--ease);
}

.button-primary {
    background: var(--accent);
    color: #0a1716;
    cursor: pointer;
}

.button-primary:hover:not(:disabled) {
    background: var(--accent-strong);
    transform: translateY(-1px);
}

.button-primary:focus-visible,
.button-secondary:focus-visible {
    outline: 3px solid rgba(110, 231, 209, 0.35);
    outline-offset: 3px;
}

.button-primary:disabled {
    cursor: wait;
    opacity: 0.65;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 28px;
}

.privacy-note {
    margin: 18px 0 0;
    color: var(--dim);
    font-size: 11px;
    text-align: center;
}

.page-footer {
    padding: 22px 0 28px;
    border-top: 1px solid var(--line);
    color: var(--dim);
    font-size: 10px;
    letter-spacing: 0.04em;
    text-align: center;
}

.success-card {
    max-width: 600px;
    text-align: center;
}

.success-mark {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    margin: 0 auto 18px;
    border: 1px solid rgba(110, 231, 209, 0.38);
    border-radius: 50%;
    color: var(--accent);
    font-size: 22px;
}

.success-card p:not(.success-label) {
    max-width: 420px;
    margin: 12px auto 24px;
    color: var(--muted);
}

.button-secondary {
    border-color: var(--line);
    color: var(--text);
}

.button-secondary:hover {
    border-color: rgba(110, 231, 209, 0.45);
    color: var(--accent);
}

@media (max-width: 560px) {
    .site-shell {
        width: min(100% - 28px, 1080px);
    }

    .topbar {
        min-height: 64px;
    }

    .topbar-note {
        font-size: 9px;
    }

    .page-main {
        padding: 52px 0 50px;
    }

    .intro {
        margin-bottom: 26px;
        text-align: left;
    }

    .intro-copy {
        margin: 0;
        font-size: 14px;
    }

    .form-card,
    .success-card {
        padding: 22px 18px;
    }

    .field-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 15px;
    }

    .field--wide {
        grid-column: auto;
    }

    .cep-row {
        grid-template-columns: minmax(0, 1fr);
    }

    .cep-row .button {
        width: 100%;
    }

    .form-actions .button {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}