/* Desafio Dakota — mobile-first, tema escuro */
:root {
    --bg: #0a0a0a;
    --surface: #141414;
    --text: #f5f5f5;
    --muted: #a3a3a3;
    --accent: #c41e1e;
    --btn: #d4d4d4;
    --btn-text: #262626;
    --radius: 14px;
    --font-display: "Barlow Condensed", system-ui, sans-serif;
    --font-body: "Barlow", system-ui, sans-serif;
    --max: 440px;
}

@font-face {
    font-family: "Neue Kabel";
    src: url("../font/neue-kabel-medium.otf") format("opentype");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Neue Plak";
    src: url("../font/neue-plak-text-black.otf") format("opentype");
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Neue Plak";
    src: url("../font/neue-plak-text-calilight.otf") format("opentype");
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Neue Plak";
    src: url("../font/neue-plak-text-light.otf") format("opentype");
    font-weight: 200;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Neue Plak";
    src: url("../font/neue-plak-thin.otf") format("opentype");
    font-weight: 100;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "DIN Next LT Pro";
    src: url("../font/DINNextLTPro-MediumCond.woff2") format("woff2");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body.desafio-body {
    margin: 0;
    min-height: 100dvh;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.45;
    -webkit-font-smoothing: antialiased;
}

body.desafio-body.desafio-body--flash-modal {
    overflow: hidden;
}

.neue-kabel {
    font-family: "Neue Kabel", system-ui, sans-serif;
}

.neue-plak {
    font-family: "Neue Plak", system-ui, sans-serif;
}

.neue-plak-thin {
    font-family: "Neue Plak", system-ui, sans-serif;
    font-weight: 100;
}

.neue-plak-light {
    font-family: "Neue Plak", system-ui, sans-serif;
    font-weight: 200;
}

.neue-plak-regular {
    font-family: "Neue Plak", system-ui, sans-serif;
    font-weight: 400;
}

.neue-plak-medium {
    font-family: "Neue Plak", system-ui, sans-serif;
    font-weight: 500;
}

.neue-plak-bold {
    font-family: "Neue Plak", system-ui, sans-serif;
    font-weight: 700;
}

.neue-plak-black {
    font-family: "Neue Plak", system-ui, sans-serif;
    font-weight: 900;
}

p {
    margin: 0;
}

.desafio {
    max-width: var(--max);
    margin: 0 auto;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

.desafio-flash .message {
    margin: 0.75rem 1rem 0;
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    font-size: 0.9rem;
    background: #292524;
    border: 1px solid #44403c;
}

.desafio-flash .error {
    border-color: #7f1d1d;
    background: #1c0a0a;
    color: #fecaca;
}

.desafio-flash .success {
    border-color: #14532d;
    background: #052e16;
    color: #bbf7d0;
}

/* Modal de flash (erro / sucesso) — alinhado ao formulário Desafio */
.desafio-flash-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.desafio-flash-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    cursor: pointer;
}

.desafio-flash-modal__panel {
    position: relative;
    z-index: 1;
    width: min(calc(100vw - 2rem), 22rem);
    padding: 1.5rem 1.35rem 1.35rem;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid #333;
    text-align: center;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.55);
}

.desafio-flash-modal--error .desafio-flash-modal__panel {
    border-color: #7f1d1d;
    box-shadow:
        0 0 0 1px rgba(127, 29, 29, 0.35),
        0 16px 48px rgba(0, 0, 0, 0.55);
}

.desafio-flash-modal--success .desafio-flash-modal__panel {
    border-color: #14532d;
    box-shadow:
        0 0 0 1px rgba(20, 83, 45, 0.35),
        0 16px 48px rgba(0, 0, 0, 0.55);
}

.desafio-flash-modal__text {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.5;
    color: var(--text);
    margin: 0 0 1.25rem;
}

.desafio-flash-modal--error .desafio-flash-modal__text {
    color: #fecaca;
}

.desafio-flash-modal--success .desafio-flash-modal__text {
    color: #bbf7d0;
}

.desafio-flash-modal__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 3rem;
    width: 100%;
    max-width: 14rem;
    margin: 0 auto;
    padding: 0 1.5rem;
    border: none;
    border-radius: 10px;
    text-transform: uppercase;
    font-family: "DIN Next LT Pro", var(--font-display), system-ui, sans-serif;
    font-size: 1rem;
    letter-spacing: 0.04em;
    cursor: pointer;
    background: #fafafa;
    color: #171717;
}

.desafio-flash-modal__btn:active {
    transform: scale(0.98);
}

.desafio-hero {
    position: relative;
    flex-shrink: 0;
    max-height: 28rem;
    overflow: hidden;
    display: flex;
}

.desafio-hero__overlay {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 1.25rem;
    margin-top: 1rem;
    z-index: 2;
    text-align: center;
    text-shadow: 0 2px 14px rgba(0, 0, 0, 0.75);
    pointer-events: none;
}

.desafio-hero__overlay .desafio-brand-dakota,
.desafio-hero__overlay .desafio-tagline {
    color: #fafafa;
}

.desafio-hero__img {
    position: relative;
    z-index: 0;
    width: 100%;
    height: 100%;
    min-height: 38vh;
    object-fit: cover;
    object-position: center 35%;
    display: block;
}

.desafio-hero__logo {
    width: 90%;
    height: 100%;
    object-fit: contain;
    object-position: center center;
    display: block;
}
.desafio-hero--aerial .desafio-hero__img {
    object-position: center 20%;
}

.desafio-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(
        to bottom,
        rgba(10, 10, 10, 0.15) 0%,
        rgba(10, 10, 10, 0.55) 55%,
        var(--bg) 100%
    );
    pointer-events: none;
}

.desafio-hero--no-img {
    min-height: 28vh;
    background: radial-gradient(
        ellipse 120% 80% at 50% 0%,
        #2a1510 0%,
        var(--bg) 65%
    );
}

.desafio-panel {
    flex: 1;
    padding: 1.25rem 1.25rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: -12rem;
    z-index: 1;
}

.desafio-brand-dakota {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(2.5rem, 12vw, 3.4rem);
    letter-spacing: 0.08em;
    line-height: 0.95;
    text-transform: uppercase;
    margin: 0;
}

.desafio-tagline {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.78rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
    margin: 0.35rem 0 0;
}

.desafio-ram-logo {
    display: flex;
    align-items: center;
    width: 60%;
}

.desafio-ram-lockup {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.desafio-ram-mark {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--text);
    display: grid;
    place-items: center;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 0.65rem;
    letter-spacing: 0.05em;
}

.desafio-ram-word {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.35rem;
    letter-spacing: 0.25em;
}

.desafio-lead {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.15rem;
    line-height: 1.25;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    margin: 0.75rem 0 0;
}

.desafio-copy {
    color: #d6d6d6;
    font-size: 0.95rem;
    margin: 0;
}

.desafio-copy + .desafio-copy {
    margin-top: 0.65rem;
}

.desafio-qr {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    margin-top: auto;
    padding-top: 1.5rem;
}

.desafio-qr img {
    width: 10rem;
    height: 10rem;
    display: block;
    background: transparent;
    padding: 0;
}

.desafio-qr-caption {
    font-size: 1.4rem;
    text-align: center;
    text-transform: uppercase;
    max-width: 18rem;
    margin: 0;
}

.text-justify {
    text-align: justify;
}

.desafio-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    /* margin-top: 1rem; */
}

.desafio-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    /* min-height: 5rem; */
    width: fit-content;
    padding: 0 4rem;
    padding-top: 0.2rem;
    border: none;
    border-radius: 10px;
    text-transform: uppercase;
    font-family: "DIN Next LT Pro", system-ui, sans-serif;
    font-size: 1.8rem;
    cursor: pointer;
    background: #d4d4d4;
    color: #2b361f;
}

.desafio-btn:active {
    transform: scale(0.98);
}

.desafio-btn--ghost {
    background: transparent;
    color: var(--text);
    border: 1px solid #404040;
}

.desafio-form {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.desafio-form-title {
    font-size: 1.2rem;
    text-transform: uppercase;
    text-align: center;
    margin: 0 0 1rem;
}

.desafio-field {
    width: 100%;
    margin-bottom: .8rem;
}

.desafio-field label {
    display: block;
    font-size: 1rem;
    text-align: center;
    color: white;
    margin-bottom: 0.35rem;
}

.desafio-field input,
.desafio-field select {
    width: 100%;
    min-height: 48px;
    padding: 0 0.85rem;
    border-radius: 10px;
    border: 1px solid #333;
    background: #fafafa;
    color: #171717;
    font-family: var(--font-body);
    font-size: 1rem;
    text-align: center;
}

.desafio-field select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23444' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
}

.desafio-field .error-message {
    color: #fca5a5;
    font-size: 0.8rem;
    margin-top: 0.35rem;
}

.desafio-headline-stack {
    width: 100%;
    margin: 0 auto;
}

.desafio-headline-stack h2 {
    font-size: 1.2rem;
    text-transform: uppercase;
    text-align: center;
    margin-bottom: 1rem;
}

.desafio-headline-stack h2:last-child {
    margin-bottom: 0;
}

.desafio-headline-stack h2.sm {
    font-size: 1rem;
}

.desafio-hint {
    font-family: "Neue Kabel", system-ui, sans-serif;
    font-size: 1rem;
    color: white;
    margin: 1rem 0 1rem;
    text-align: center;
}

.desafio-weight {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: fit-content;
    gap: 1rem;
    background: #fafafa;
    color: #171717;
    border-radius: var(--radius);
    padding: 0.55rem 1rem;
    /* margin-top: 1rem; */
    /* margin-bottom: 1rem; */
    position: relative;
    margin-right: 4rem;
}

.desafio-weight__controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
}

.desafio-weight__controls .input {
    margin: 0;
}

/* Caixa do número: centraliza o input e o texto dentro dele (métricas de fonte + UA). */
.desafio-weight__controls .input.number {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: fit-content;
    min-height: 5.5rem;
    padding: 0.35rem 0.65rem;
    box-sizing: border-box;
    border: 1px solid #0a0a0a;
    border-radius: 10px;
    background: #fff;
}

.desafio-weight__btn {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    border: 1px solid #ccc;
    background: #fff;
    font-size: 1.35rem;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    color: #262626;
}

.desafio-weight__value {
    display: block;
    width: 6ch;
    min-width: 4.5ch;
    margin: 0;
    padding: 0;
    text-align: center;
    font-family: "Neue Plak", system-ui, sans-serif;
    font-weight: 900;
    font-size: 2.5rem;
    line-height: 1;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
    color: var(--accent);
    border: none;
    background: transparent;
    box-sizing: border-box;
    outline: none;
    transform: translateY(-0.1em);
    -moz-appearance: textfield;
    appearance: textfield;
}

.desafio-weight__value::placeholder {
    color: var(--accent);
}

.desafio-weight__value::-webkit-outer-spin-button,
.desafio-weight__value::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.desafio-weight__unit {
    width: 6rem;
    height: 6rem;
    position: absolute;
    right: -45%;
    /* top: -24%; */
}

.desafio-weight__icon {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center center;
    display: block;
}

.desafio-success-title {
    font-family: "Neue Plak", system-ui, sans-serif;
    font-weight: 900;
    font-size: 1.6rem;
    text-transform: uppercase;
    text-align: center;
    margin: 0.5rem 0 0;
}

.desafio-success-sub {
    font-family: "Neue Plak", system-ui, sans-serif;
    font-weight: 200;
    font-size: 2rem;
    margin-top: auto;
    text-transform: uppercase;
    color: white;
    text-align: center;
}

.desafio-finale {
    margin-top: auto;
    padding-top: 2.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.desafio-finale__mark {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: linear-gradient(145deg, #e8e8e8, #9ca3af 45%, #d1d5db);
    box-shadow:
        inset 0 2px 6px rgba(255, 255, 255, 0.75),
        0 12px 28px rgba(0, 0, 0, 0.45);
    display: grid;
    place-items: center;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 0.7rem;
    letter-spacing: 0.06em;
    color: #374151;
}

.desafio-finale__logo {
    width: 60%;
    object-fit: contain;
    object-position: center center;
    display: block;
}

.desafio-finale__word {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 2rem;
    letter-spacing: 0.35em;
}

.desafio-skip-link {
    position: absolute;
    left: -9999px;
}

.desafio-skip-link:focus {
    left: 1rem;
    top: 1rem;
    z-index: 10;
    padding: 0.5rem 1rem;
    background: #fff;
    color: #000;
}

.flash {
    max-width: var(--max);
    margin: 0 auto;
    padding: 0.65rem 1rem 0;
}

.flash .message {
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    margin-bottom: 0.35rem;
}

.flash .message.error,
.flash .error {
    background: #1c0a0a;
    border: 1px solid #7f1d1d;
    color: #fecaca;
}

.flash .message.success,
.flash .success {
    background: #052e16;
    border: 1px solid #14532d;
    color: #bbf7d0;
}

.desafio-actions--spaced {
    margin-top: 2rem;
}
