/* =========================== ML BASE =========================== */
/* tokens + reset + chassis compartilhado entre as rotas Mercado Libre.
   herda-se via <link rel="stylesheet" href="../css/ml-base.css">.
   cada página mantém no <style> inline só o que lhe é específico.          */

:root {
    /* === Mercado Libre tokens === */
    --ml-yellow: #FFE600;
    --ml-yellow-soft: #fff159;
    --ml-yellow-dark: #e6cf00;
    --ml-yellow-border: #aa9900;
    --ml-yellow-tint: rgba(174, 159, 0, .15);
    --ml-yellow-grad-a: #efa000;
    --ml-yellow-grad-b: #FFE600;
    --ml-blue: #3483FA;
    --ml-blue-dark: #2968C8;
    --ml-blue-navy: #2D3277;
    --ml-blue-soft: #EBF2FE;
    --ml-blue-border: #C4DAFB;

    /* aliases legados */
    --brand-primary: #3483FA;
    --brand-primary-dark: #2968C8;
    --brand-primary-soft: #C4DAFB;
    --brand-primary-tint: #EBF2FE;

    /* hero */
    --hero-stop-1: #FFF8B0;
    --hero-stop-2: #FFF066;
    --hero-stop-3: #FFE600;
    --hero-stop-4: #FFE600;
    --hero-highlight: #3483FA;
    --hero-amount: #3483FA;
    --hero-decoration: #aa9900;

    /* neutros */
    --bg: #F4F5F7;
    --card: #FFFFFF;
    --text: #1b1f24;
    --text-mid: #374151;
    --text-light: #6B7280;
    --text-faint: #9CA3AF;
    --border: #E5E7EB;
    --border-strong: #e4e6ea;
    --border-light: #F3F4F6;

    /* estados */
    --success: #16A34A;
    --success-soft: #DCFCE7;
    --warning-bg: #fdf6e3;
    --warning-border: #f0e0ae;
    --warning-text: #6b5314;
    --danger: #D93025;
    --danger-soft: #FDECEB;
    --danger-border: #F3C2BF;

    /* raios */
    --radius-xs: 5px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-card: 12px;
    --radius-lg: 14px;
    --radius-xl: 16px;
    --radius-2xl: 20px;
    --radius-3xl: 22px;
    --radius-pill: 999px;

    /* sombras */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, .04);
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, .1);
    --shadow-base: 0 2px 10px rgba(0, 0, 0, .1);
    --shadow-card: 0 4px 20px rgba(0, 0, 0, .06);
    --shadow-main-card: 0 10px 30px rgba(0, 0, 0, .12), 0 4px 12px rgba(0, 0, 0, .06);
    --shadow-cta: 0 4px 8px rgba(0, 0, 0, .2);
    --shadow-cta-hover: 0 6px 14px rgba(0, 0, 0, .25);
    --shadow-header-cta: 0 2px 8px rgba(52, 131, 250, .3);
    --shadow-icon: 0 2px 10px rgba(52, 131, 250, .25);

    /* tipografia */
    --font-display: 'Sora', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    --font-logo: 'Sora', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    --font-body: 'Sora', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
}

/* =============================== RESET =============================== */

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

html, body { margin: 0; padding: 0; }

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
}

img, svg { display: block; max-width: 100%; }
button, input { font-family: inherit; }
button { cursor: pointer; }
a { color: var(--ml-blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* =============================== HEADER =============================== */

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: var(--ml-yellow);
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--ml-yellow-border);
    transition: box-shadow .3s ease;
}

.header.scrolled { box-shadow: 0 2px 12px rgba(0, 0, 0, .08); }

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font: 800 20px/1 var(--font-logo);
    letter-spacing: -.5px;
    color: var(--text);
    text-decoration: none;
}

.logo-mark {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--ml-blue), var(--ml-blue-dark));
    display: grid;
    place-items: center;
    color: #fff;
    font: 800 18px/1 var(--font-logo);
    box-shadow: var(--shadow-icon);
}

.logo-img {
    height: 32px;
    width: auto;
    display: block;
}

.step-pill {
    background: var(--ml-blue-soft);
    color: var(--ml-blue-dark);
    padding: 6px 12px;
    border-radius: 100px;
    font: 700 11px var(--font-body);
    text-transform: uppercase;
    letter-spacing: .4px;
    display: flex;
    align-items: center;
    gap: 6px;
    border: 1px solid var(--ml-blue-border);
}

.step-pill svg {
    width: 12px;
    height: 12px;
    stroke-width: 2.5;
}

/* =============================== SHELL =============================== */

.shell {
    max-width: 500px;
    margin: 0 auto;
    padding: 92px 16px 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* =============================== INTRO =============================== */

.intro {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    opacity: 0;
    transform: translateY(30px);
    animation: slideUpAnim .6s ease forwards;
    animation-delay: .1s;
}

.intro-mark {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--ml-blue), var(--ml-blue-dark));
    box-shadow: var(--shadow-icon);
    display: grid;
    place-items: center;
    margin-bottom: 4px;
}

.intro-mark svg {
    width: 32px;
    height: 32px;
    color: #fff;
    stroke-width: 2;
}

.intro h1 {
    margin: 0;
    font: 700 24px/1.2 var(--font-display);
    letter-spacing: -.3px;
    color: var(--text);
}

.intro p {
    margin: 0;
    max-width: 380px;
    font: 400 15px/1.6 var(--font-body);
    color: var(--text-mid);
}

/* ============================= MAIN CARD ============================= */

.main-card {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, .04);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-main-card);
    padding: 28px 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    opacity: 0;
    transform: translateY(30px);
    animation: slideUpAnim .7s ease forwards;
    animation-delay: .3s;
}

/* ============================= BUTTON CTA ============================= */

.btn-cta {
    width: 100%;
    padding: 20px;
    border: none;
    border-radius: 10px;
    background: var(--ml-blue);
    color: #fff;
    font: 700 17px/1 var(--font-body);
    box-shadow: var(--shadow-cta);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    animation: pulseazul 2s infinite;
    transition: background .25s ease, transform .25s ease, box-shadow .25s ease, opacity .25s ease;
    text-decoration: none;
}

.btn-cta:hover:not(.disabled):not(.loading) {
    background: var(--ml-blue-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-cta-hover);
    text-decoration: none;
}

.btn-cta:active:not(.disabled):not(.loading) { transform: translateY(0); }

.btn-cta.disabled {
    opacity: .5;
    cursor: not-allowed;
    box-shadow: none;
    background: #9BBEF9;
    animation: none;
}

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

.btn-cta.loading {
    opacity: .9;
    cursor: not-allowed;
    animation: none;
    background: var(--ml-blue-dark);
}

.btn-cta.loading::before { display: none; }

.btn-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .25), transparent);
    animation: shimmer 3s infinite;
    pointer-events: none;
}

.btn-cta svg {
    width: 20px;
    height: 20px;
    color: #fff;
    stroke-width: 2;
}

.cta-hint {
    margin: 10px 0 0;
    text-align: center;
    font: 400 12px/1.5 var(--font-body);
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.cta-hint svg {
    width: 14px;
    height: 14px;
    color: var(--ml-blue);
    stroke-width: 2;
}

/* ============================= SPINNER ============================= */

.spinner {
    width: 20px;
    height: 20px;
    border: 2.5px solid rgba(255, 255, 255, .3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* ============================ FOOTER LOCAL ============================ */

.footer {
    max-width: 500px;
    margin: 16px auto 0;
    padding: 24px 20px 48px;
    text-align: center;
}

.footer-logo {
    font: 800 16px var(--font-logo);
    color: var(--ml-blue);
    letter-spacing: -.5px;
    margin-bottom: 10px;
}

.footer-logo-img {
    height: 26px;
    width: auto;
    display: block;
    margin: 0 auto 10px;
}

.footer p {
    font: 400 11px/1.6 var(--font-body);
    color: var(--text-faint);
    margin: 0 0 4px;
}

/* ============================ SITE FOOTER ============================ */

footer.site-footer {
    margin-top: 48px;
    padding: 32px 20px 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: transparent;
    color: #6B7280;
    border-top: none;
}

footer.site-footer .footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: 100%;
    max-width: 500px;
}

footer.site-footer .footer-logo {
    display: flex;
    align-items: center;
}

footer.site-footer .nu-lockup {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

footer.site-footer .footer-logo .logo-img {
    height: 26px;
    width: auto;
    display: block;
}

footer.site-footer small {
    display: block;
    font-size: 11px;
    line-height: 1.6;
    color: #9CA3AF;
}

footer.site-footer small strong {
    color: var(--ml-blue-navy);
    font-weight: 700;
}

footer.site-footer .footer-badges {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 4px;
}

footer.site-footer .footer-badges span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-light);
}

footer.site-footer .footer-badges svg {
    width: 16px;
    height: 16px;
    color: var(--text-faint);
    stroke-width: 2;
}

@media (max-width: 520px) {
    footer.site-footer { padding: 24px 16px 40px; }
    footer.site-footer .footer-badges { gap: 16px; }
}

/* ============================ KEYFRAMES ============================ */

@keyframes slideUpAnim {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes shimmer {
    0%   { left: -100%; }
    100% { left: 100%; }
}

@keyframes pulseazul {
    0%   { box-shadow: 0 0 0 0 rgba(52, 131, 250, .7), 0 4px 8px rgba(0, 0, 0, .2); }
    70%  { box-shadow: 0 0 0 12px rgba(52, 131, 250, 0), 0 4px 8px rgba(0, 0, 0, .2); }
    100% { box-shadow: 0 0 0 0 rgba(52, 131, 250, 0), 0 4px 8px rgba(0, 0, 0, .2); }
}

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

@keyframes popIn {
    0%   { transform: scale(0); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* ============================= MEDIA ============================= */

@media (max-width: 520px) {
    .header { padding: 10px 16px; }
    .shell { padding: 88px 12px 24px; gap: 16px; }
    .main-card { padding: 24px 20px; }
    .intro h1 { font-size: 22px; }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }
}
