/* ===================================================================
   PROGRAMA DE AFILIADOS — landing publica (/afiliado, visitante deslogado)
   DAGOBERTO STYLE — "editorial premium": tinta escura + teal da marca,
   com acentos que SIGNIFICAM alguma coisa (ver bloco de variaveis).
   Tudo escopado em .afp-* (nao depende de Tailwind: nao precisa rebuild).
   A central do afiliado logado usa .afl-* e vive noutro arquivo.
   =================================================================== */

/* ================================================================= */
/* VARIAVEIS — cada acento tem um papel                              */
/* ================================================================= */
:root {
    --afp-ink: #06181c;          /* tinta — fundo escuro do hero */
    --afp-ink-2: #0b2a2e;
    --afp-teal: #14b8a6;         /* a marca / o LINK do afiliado */
    --afp-teal-deep: #0d9488;
    --afp-mint: #5eead4;         /* a marca sobre fundo escuro */
    --afp-money: #34d399;        /* o DINHEIRO: comissao, saldo, PIX */
    --afp-money-deep: #059669;
    --afp-amber: #f59e0b;        /* o TEMPO: cookie de 365 dias */
    --afp-amber-soft: #fcd34d;
    --afp-violet: #8b5cf6;       /* as FERRAMENTAS: painel, API, webhook */
    --afp-sky: #38bdf8;          /* o ALCANCE: cliques, catalogo, audiencia */
    --afp-rose: #fb7185;         /* as REGRAS: anti-fraude, o que e proibido */
    --afp-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.4'/%3E%3C/svg%3E");
}

/* ================================================================= */
/* BASE                                                              */
/* ================================================================= */
.afp-wrap {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 1.25rem;
}
.afp-sec { padding: 5rem 0; }
.afp-sec--tight { padding: 3.5rem 0; }
.afp-sec--bg { background: var(--bg); }
.afp-sec--surface { background: var(--surface); }

.afp-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-size: .8125rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--afp-teal-deep);
    margin-bottom: 1rem;
}
[data-theme="dark"] .afp-eyebrow { color: var(--afp-mint); }
.afp-eyebrow::before {
    content: "";
    width: 1.75rem;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    opacity: .5;
}

.afp-h2 {
    font-size: clamp(1.75rem, 1.1rem + 2.6vw, 2.75rem);
    line-height: 1.12;
    letter-spacing: -.025em;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 1rem;
    text-wrap: balance;
}
.afp-h3 {
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 .4rem;
    line-height: 1.3;
}
.afp-lead {
    font-size: clamp(1rem, .95rem + .35vw, 1.1875rem);
    line-height: 1.65;
    color: var(--muted);
    max-width: 42rem;
    margin: 0 0 3rem;
    text-wrap: pretty;
}
.afp-center { text-align: center; }
.afp-center .afp-lead { margin-left: auto; margin-right: auto; }

/* numeros grandes usam tabular pra nao "dancar" quando mudam */
.afp-num { font-variant-numeric: tabular-nums; }

/* ================================================================= */
/* REVELACAO NO SCROLL (so aplica quando o JS esta vivo)             */
/* ================================================================= */
.afp-js .afp-rv {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity .7s cubic-bezier(.16, 1, .3, 1), transform .7s cubic-bezier(.16, 1, .3, 1);
    transition-delay: var(--rv-delay, 0s);
}
.afp-js .afp-rv.is-in { opacity: 1; transform: none; }

/* ================================================================= */
/* BOTOES                                                            */
/* ================================================================= */
.afp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .625rem;
    min-height: 3rem;
    padding: 1rem 1.75rem;
    border-radius: 999px;
    font-size: 1.0625rem;
    font-weight: 700;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform .2s cubic-bezier(.16, 1, .3, 1), box-shadow .2s ease, background .2s ease, color .2s ease;
    will-change: transform;
}
.afp-btn svg { width: 1.25rem; height: 1.25rem; flex-shrink: 0; }
.afp-btn--primary {
    background: linear-gradient(135deg, var(--afp-mint), var(--afp-money) 50%, var(--afp-money-deep));
    color: #04211e;
    box-shadow: 0 10px 30px -8px rgba(52, 211, 153, .6), inset 0 1px 0 rgba(255, 255, 255, .45);
}
.afp-btn--primary:hover { transform: translateY(-2px); box-shadow: 0 18px 40px -10px rgba(52, 211, 153, .72), inset 0 1px 0 rgba(255, 255, 255, .45); }
.afp-btn--ghost {
    background: rgba(255, 255, 255, .06);
    border-color: rgba(255, 255, 255, .22);
    color: #fff;
    backdrop-filter: blur(8px);
}
.afp-btn--ghost:hover { background: rgba(255, 255, 255, .13); transform: translateY(-2px); }
.afp-btn--solid {
    background: var(--primary);
    color: var(--primary-contrast);
    box-shadow: 0 12px 28px -10px rgba(13, 148, 136, .7);
}
.afp-btn--solid:hover { transform: translateY(-2px); }

/* ================================================================= */
/* HERO                                                              */
/* ================================================================= */
.afp-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    background:
        radial-gradient(58rem 38rem at 84% 6%, rgba(52, 211, 153, .26), transparent 60%),
        radial-gradient(46rem 32rem at 6% 94%, rgba(20, 184, 166, .28), transparent 62%),
        radial-gradient(36rem 24rem at 46% -12%, rgba(245, 158, 11, .14), transparent 60%),
        linear-gradient(158deg, var(--afp-ink-2), var(--afp-ink) 56%, #03100f);
    color: #fff;
    padding: 4.5rem 0 5rem;
}
.afp-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--afp-grain);
    opacity: .26;
    mix-blend-mode: overlay;
    pointer-events: none;
    z-index: -1;
}
.afp-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: radial-gradient(46rem 30rem at 28% 38%, #000, transparent 75%);
    -webkit-mask-image: radial-gradient(46rem 30rem at 28% 38%, #000, transparent 75%);
    pointer-events: none;
    z-index: -1;
}
.afp-hero__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr);
    gap: 3rem;
    align-items: center;
}
.afp-badge {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .5rem 1rem;
    border-radius: 999px;
    font-size: .875rem;
    font-weight: 600;
    color: #d7fff1;
    background: rgba(52, 211, 153, .14);
    border: 1px solid rgba(94, 234, 212, .3);
    backdrop-filter: blur(6px);
}
.afp-badge svg { width: 1.05rem; height: 1.05rem; }

/* a coluna do hero tem ~490px (o menu lateral come 382px da viewport):
   passar de ~3.3rem faz o H1 quebrar em 4 linhas e perder o impacto */
.afp-hero h1 {
    font-size: clamp(2.25rem, 1.55rem + 2.1vw, 3.375rem);
    line-height: 1.05;
    letter-spacing: -.035em;
    font-weight: 700;
    margin: 1.5rem 0 1.25rem;
    text-wrap: balance;
}
.afp-grad {
    background: linear-gradient(100deg, var(--afp-mint), var(--afp-money) 48%, var(--afp-sky));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.afp-grad--amber {
    background: linear-gradient(100deg, var(--afp-amber-soft), var(--afp-amber));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.afp-hero__sub {
    font-size: clamp(1.0625rem, 1rem + .45vw, 1.3125rem);
    line-height: 1.6;
    color: rgba(255, 255, 255, .78);
    max-width: 34rem;
    margin: 0 0 2rem;
    text-wrap: pretty;
}
.afp-hero__sub strong { color: #fff; font-weight: 700; }
.afp-hero__acoes { display: flex; flex-wrap: wrap; gap: .875rem; align-items: center; }
.afp-hero__nota { margin-top: 1.25rem; font-size: .875rem; color: rgba(255, 255, 255, .55); }
.afp-hero__nota a { color: var(--afp-mint); text-decoration: underline; text-underline-offset: 3px; }

.afp-pills { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 2rem; }
.afp-pill {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .4rem .8rem;
    border-radius: 999px;
    font-size: .8125rem;
    font-weight: 600;
    color: rgba(255, 255, 255, .85);
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .12);
}
.afp-pill i {
    width: .5rem;
    height: .5rem;
    border-radius: 999px;
    background: var(--afp-money);
    box-shadow: 0 0 0 3px rgba(52, 211, 153, .18);
}
.afp-pill--amber i { background: var(--afp-amber-soft); box-shadow: 0 0 0 3px rgba(252, 211, 77, .18); }
.afp-pill--sky i { background: var(--afp-sky); box-shadow: 0 0 0 3px rgba(56, 189, 248, .2); }
.afp-pill--violet i { background: var(--afp-violet); box-shadow: 0 0 0 3px rgba(139, 92, 246, .22); }

/* ================================================================= */
/* O PALCO DO HERO — o link vira comissao (SVG/CSS, 0 KB de imagem)  */
/* ================================================================= */
.afp-stage {
    position: relative;
    height: 27rem;
    width: 100%;
}

/* --- o cartao do link do afiliado --- */
.afp-linkcard {
    position: absolute;
    left: 0;
    top: 0;
    width: min(100%, 22.5rem);
    padding: 1.125rem 1.25rem 1.25rem;
    border-radius: 1.125rem;
    background: linear-gradient(150deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, .04));
    border: 1px solid rgba(255, 255, 255, .16);
    box-shadow: 0 30px 60px -24px rgba(0, 0, 0, .75);
    backdrop-filter: blur(10px);
    z-index: 2;
}
.afp-linkcard__topo {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .6875rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .55);
    margin-bottom: .75rem;
}
.afp-linkcard__topo i {
    width: .45rem;
    height: .45rem;
    border-radius: 999px;
    background: var(--afp-money);
    box-shadow: 0 0 0 3px rgba(52, 211, 153, .2);
    animation: afpPulso 2.6s ease-in-out infinite;
}
.afp-linkurl {
    display: flex;
    align-items: center;
    gap: .625rem;
    padding: .75rem .875rem;
    border-radius: .75rem;
    background: rgba(4, 22, 20, .55);
    border: 1px solid rgba(94, 234, 212, .25);
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
    font-size: .875rem;
    color: #eafff9;
    overflow: hidden;
}
.afp-linkurl svg { width: 1rem; height: 1rem; flex-shrink: 0; color: var(--afp-mint); }
.afp-linkurl span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.afp-linkurl b { color: var(--afp-mint); font-weight: 700; }
.afp-linkcard__pe {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    margin-top: .875rem;
}
.afp-mini {
    display: flex;
    flex-direction: column;
    gap: .15rem;
}
.afp-mini b {
    font-size: 1.125rem;
    font-weight: 700;
    color: #fff;
    line-height: 1;
}
.afp-mini span {
    font-size: .6875rem;
    color: rgba(255, 255, 255, .5);
}
.afp-copiar {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .4rem .7rem;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 700;
    color: #04211e;
    background: var(--afp-mint);
}
.afp-copiar svg { width: .85rem; height: .85rem; }

/* --- o grafico de cliques --- */
.afp-graf {
    position: absolute;
    left: 0;
    top: 11.75rem;
    width: min(100%, 15.5rem);
    padding: 1rem 1.125rem 1.125rem;
    border-radius: 1rem;
    background: linear-gradient(150deg, rgba(56, 189, 248, .16), rgba(255, 255, 255, .04));
    border: 1px solid rgba(56, 189, 248, .28);
    box-shadow: 0 26px 50px -22px rgba(0, 0, 0, .7);
    backdrop-filter: blur(10px);
    z-index: 1;
    animation: afpFlutua 8s ease-in-out infinite;
}
.afp-graf__tit {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    font-size: .75rem;
    color: rgba(255, 255, 255, .6);
    margin-bottom: .75rem;
}
.afp-graf__tit b { font-size: 1rem; color: #fff; }
.afp-barras {
    display: flex;
    align-items: flex-end;
    gap: .375rem;
    height: 4.25rem;
}
.afp-barras i {
    flex: 1;
    border-radius: .25rem .25rem 0 0;
    background: linear-gradient(180deg, var(--afp-sky), rgba(56, 189, 248, .25));
    height: var(--h, 40%);
    transform-origin: bottom;
    animation: afpCresce .9s cubic-bezier(.16, 1, .3, 1) both;
    animation-delay: var(--d, 0s);
}
.afp-barras i:last-child { background: linear-gradient(180deg, var(--afp-money), rgba(52, 211, 153, .3)); }

/* --- o recibo do PIX que cai --- */
.afp-recibo {
    position: absolute;
    right: 0;
    top: 10.75rem;
    width: min(100%, 14rem);
    padding: 1rem 1.125rem;
    border-radius: 1rem;
    background: linear-gradient(150deg, rgba(52, 211, 153, .22), rgba(5, 150, 105, .1));
    border: 1px solid rgba(52, 211, 153, .38);
    box-shadow: 0 26px 50px -20px rgba(0, 0, 0, .7);
    backdrop-filter: blur(10px);
    z-index: 3;
    animation: afpFlutua 7s ease-in-out infinite reverse;
}
.afp-recibo__ic {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: .7rem;
    display: grid;
    place-items: center;
    background: rgba(52, 211, 153, .2);
    border: 1px solid rgba(52, 211, 153, .35);
    margin-bottom: .625rem;
}
.afp-recibo__ic svg { width: 1.15rem; height: 1.15rem; color: var(--afp-money); }
.afp-recibo__val {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    line-height: 1;
    letter-spacing: -.02em;
}
.afp-recibo__leg {
    margin-top: .35rem;
    font-size: .75rem;
    color: rgba(255, 255, 255, .62);
    line-height: 1.4;
}
.afp-recibo__tag {
    display: inline-block;
    margin-top: .625rem;
    padding: .2rem .55rem;
    border-radius: 999px;
    font-size: .6875rem;
    font-weight: 700;
    color: #04211e;
    background: var(--afp-money);
}

/* --- o selo do cookie de 365 dias --- */
.afp-cookie {
    position: absolute;
    right: 1.25rem;
    bottom: 1rem;
    display: flex;
    align-items: center;
    gap: .625rem;
    padding: .7rem .95rem;
    border-radius: 999px;
    background: rgba(245, 158, 11, .16);
    border: 1px solid rgba(252, 211, 77, .35);
    backdrop-filter: blur(8px);
    z-index: 4;
}
.afp-cookie svg { width: 1.15rem; height: 1.15rem; color: var(--afp-amber-soft); }
.afp-cookie b { font-size: .9375rem; color: #fff; }
.afp-cookie span { display: block; font-size: .6875rem; color: rgba(255, 255, 255, .6); }

/* ================================================================= */
/* FAIXA DE NUMEROS                                                  */
/* ================================================================= */
.afp-faixa {
    background: var(--surface);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 2.25rem 0;
}
.afp-faixa__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.5rem;
}
.afp-faixa__item { text-align: center; }
.afp-faixa__n {
    display: block;
    font-size: clamp(1.75rem, 1.2rem + 1.8vw, 2.5rem);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -.03em;
    color: var(--c, var(--primary));
}
.afp-faixa__l {
    display: block;
    margin-top: .35rem;
    font-size: .8125rem;
    color: var(--muted);
    line-height: 1.35;
}

/* ================================================================= */
/* PASSOS                                                            */
/* ================================================================= */
.afp-passos {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem;
    position: relative;
}
.afp-passos::before {
    content: "";
    position: absolute;
    left: 12%;
    right: 12%;
    top: 1.6rem;
    height: 2px;
    background: repeating-linear-gradient(90deg, var(--border) 0 8px, transparent 8px 16px);
}
.afp-passo { position: relative; }
.afp-passo__n {
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 999px;
    display: grid;
    place-items: center;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--c);
    background: var(--bg);
    border: 2px solid color-mix(in srgb, var(--c) 45%, transparent);
    box-shadow: 0 0 0 6px var(--bg);
    margin-bottom: 1.125rem;
    position: relative;
    z-index: 1;
}
.afp-passo p {
    color: var(--muted);
    font-size: .9375rem;
    line-height: 1.6;
    margin: 0;
}
.afp-passo p strong { color: var(--text); }

/* ================================================================= */
/* CALCULADORA                                                       */
/* ================================================================= */
.afp-calc {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, .85fr);
    gap: 2.5rem;
    align-items: center;
    padding: 2.25rem;
    border-radius: 1.5rem;
    background: var(--bg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}
.afp-campo { margin-bottom: 1.75rem; }
.afp-campo:last-child { margin-bottom: 0; }
.afp-campo__top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: .75rem;
}
.afp-campo__lab {
    font-size: .9375rem;
    font-weight: 600;
    color: var(--text);
}
.afp-campo__val {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--primary);
}
.afp-range {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: .5rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--primary) 16%, var(--border));
    outline: none;
}
.afp-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 999px;
    background: var(--primary);
    border: 3px solid var(--bg);
    box-shadow: 0 2px 10px -2px rgba(13, 148, 136, .8);
    cursor: pointer;
}
.afp-range::-moz-range-thumb {
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 999px;
    background: var(--primary);
    border: 3px solid var(--bg);
    cursor: pointer;
}
.afp-range:focus-visible { box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 35%, transparent); }
.afp-calc__escala {
    display: flex;
    justify-content: space-between;
    margin-top: .5rem;
    font-size: .75rem;
    color: var(--muted);
}

.afp-resultado {
    padding: 1.75rem;
    border-radius: 1.25rem;
    text-align: center;
    background:
        radial-gradient(24rem 14rem at 50% 0%, rgba(52, 211, 153, .18), transparent 70%),
        linear-gradient(160deg, var(--afp-ink-2), var(--afp-ink));
    border: 1px solid rgba(52, 211, 153, .3);
    color: #fff;
}
.afp-resultado__lab {
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .55);
}
.afp-resultado__n {
    display: block;
    margin: .5rem 0 .25rem;
    font-size: clamp(2.25rem, 1.6rem + 2.4vw, 3.25rem);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -.035em;
    background: linear-gradient(100deg, var(--afp-mint), var(--afp-money));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.afp-resultado__sub { font-size: .875rem; color: rgba(255, 255, 255, .62); margin: 0; }
.afp-resultado__ano {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, .12);
    font-size: .875rem;
    color: rgba(255, 255, 255, .75);
}
.afp-resultado__ano b { color: var(--afp-mint); font-size: 1.0625rem; }
.afp-calc__nota {
    margin-top: 1rem;
    font-size: .8125rem;
    color: var(--muted);
    text-align: center;
}

/* ================================================================= */
/* NIVEIS (tiers)                                                    */
/* ================================================================= */
.afp-tiers {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
}
.afp-tier {
    position: relative;
    padding: 1.75rem 1.5rem;
    border-radius: 1.25rem;
    background: var(--bg);
    border: 1px solid var(--border);
    transition: transform .2s cubic-bezier(.16, 1, .3, 1), box-shadow .2s ease, border-color .2s ease;
}
.afp-tier:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: color-mix(in srgb, var(--c) 40%, var(--border)); }
.afp-tier__sel {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .3rem .7rem;
    border-radius: 999px;
    font-size: .6875rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--c);
    background: color-mix(in srgb, var(--c) 14%, transparent);
    border: 1px solid color-mix(in srgb, var(--c) 28%, transparent);
}
.afp-tier__pct {
    display: block;
    margin: 1rem 0 .25rem;
    font-size: 2.75rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -.04em;
    color: var(--c);
}
.afp-tier__req { font-size: .875rem; color: var(--muted); margin: 0 0 1rem; }
.afp-tier__ex {
    padding-top: 1rem;
    border-top: 1px dashed var(--border);
    font-size: .875rem;
    color: var(--text-2, var(--muted));
}
.afp-tier__ex b { color: var(--c); }

/* ================================================================= */
/* CARDS GENERICOS (ferramentas, catalogo, regras)                   */
/* ================================================================= */
.afp-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
}
.afp-card {
    padding: 1.75rem 1.5rem;
    border-radius: 1.25rem;
    background: var(--surface);
    border: 1px solid var(--border);
    transition: transform .2s cubic-bezier(.16, 1, .3, 1), box-shadow .2s ease;
}
.afp-sec--surface .afp-card { background: var(--bg); }
.afp-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.afp-card__ic {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: .875rem;
    display: grid;
    place-items: center;
    color: var(--c);
    background: color-mix(in srgb, var(--c) 14%, transparent);
    border: 1px solid color-mix(in srgb, var(--c) 28%, transparent);
    margin-bottom: 1.125rem;
}
.afp-card__ic svg { width: 1.35rem; height: 1.35rem; }
.afp-card p {
    margin: 0;
    font-size: .9375rem;
    line-height: 1.6;
    color: var(--muted);
}

/* ================================================================= */
/* CATALOGO — as categorias que o afiliado divulga                   */
/* ================================================================= */
.afp-cats {
    display: flex;
    flex-wrap: wrap;
    gap: .625rem;
    justify-content: center;
    max-width: 52rem;
    margin: 0 auto 2rem;
}
.afp-cat {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .6rem 1rem;
    border-radius: 999px;
    background: var(--surface);
    border: 1px solid var(--border);
    font-size: .875rem;
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
    transition: transform .2s ease, border-color .2s ease, color .2s ease;
}
.afp-sec--surface .afp-cat { background: var(--bg); }
.afp-cat:hover { transform: translateY(-2px); border-color: var(--primary); color: var(--primary); }
.afp-cat b {
    font-size: .75rem;
    font-weight: 700;
    color: var(--muted);
    background: color-mix(in srgb, var(--primary) 10%, transparent);
    border-radius: 999px;
    padding: .1rem .45rem;
}

/* ================================================================= */
/* REGRAS (o que vale e o que nao vale)                              */
/* ================================================================= */
.afp-regras {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
    max-width: 60rem;
    margin: 0 auto;
}
.afp-lista {
    padding: 1.75rem;
    border-radius: 1.25rem;
    background: var(--bg);
    border: 1px solid var(--border);
}
.afp-lista h3 {
    display: flex;
    align-items: center;
    gap: .625rem;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 1rem;
}
.afp-lista h3 svg { width: 1.25rem; height: 1.25rem; color: var(--c); }
.afp-lista ul { list-style: none; margin: 0; padding: 0; }
.afp-lista li {
    display: flex;
    gap: .625rem;
    font-size: .9375rem;
    line-height: 1.55;
    color: var(--muted);
    padding: .5rem 0;
    border-bottom: 1px solid var(--border);
}
.afp-lista li:last-child { border-bottom: 0; }
.afp-lista li::before {
    content: "";
    flex-shrink: 0;
    width: 1.15rem;
    height: 1.15rem;
    margin-top: .15rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--c) 16%, transparent);
    border: 1px solid color-mix(in srgb, var(--c) 32%, transparent);
}

/* ================================================================= */
/* CTA FINAL                                                         */
/* ================================================================= */
.afp-cta {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding: 5rem 0;
    text-align: center;
    color: #fff;
    background:
        radial-gradient(46rem 30rem at 50% 0%, rgba(52, 211, 153, .28), transparent 62%),
        radial-gradient(38rem 26rem at 10% 100%, rgba(20, 184, 166, .24), transparent 64%),
        linear-gradient(160deg, var(--afp-ink-2), var(--afp-ink) 60%, #03100f);
}
.afp-cta::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--afp-grain);
    opacity: .24;
    mix-blend-mode: overlay;
    pointer-events: none;
    z-index: -1;
}
.afp-cta h2 {
    font-size: clamp(1.875rem, 1.2rem + 2.6vw, 2.875rem);
    line-height: 1.1;
    letter-spacing: -.03em;
    font-weight: 700;
    margin: 0 0 1rem;
    text-wrap: balance;
}
.afp-cta p {
    font-size: 1.0625rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, .74);
    max-width: 36rem;
    margin: 0 auto 2rem;
    text-wrap: pretty;
}

/* ================================================================= */
/* FAQ                                                               */
/* ================================================================= */
.afp-faq { max-width: 46rem; margin: 0 auto; }
.afp-faq details {
    border: 1px solid var(--border);
    border-radius: 1rem;
    background: var(--bg);
    margin-bottom: .75rem;
    overflow: hidden;
    transition: border-color .2s ease, box-shadow .2s ease;
}
.afp-sec--bg .afp-faq details { background: var(--surface); }
.afp-faq details[open] { border-color: color-mix(in srgb, var(--primary) 35%, var(--border)); box-shadow: var(--shadow); }
.afp-faq summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.125rem 1.25rem;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    color: var(--text);
    list-style: none;
}
.afp-faq summary::-webkit-details-marker { display: none; }
.afp-faq summary:hover { color: var(--primary); }
.afp-faq__mais {
    position: relative;
    width: 1.5rem;
    height: 1.5rem;
    flex-shrink: 0;
    border-radius: 999px;
    background: color-mix(in srgb, var(--primary) 12%, transparent);
    transition: transform .25s ease;
}
.afp-faq__mais::before,
.afp-faq__mais::after {
    content: "";
    position: absolute;
    left: 50%; top: 50%;
    width: .625rem;
    height: 2px;
    border-radius: 2px;
    background: var(--primary);
    transform: translate(-50%, -50%);
    transition: opacity .2s ease;
}
.afp-faq__mais::after { transform: translate(-50%, -50%) rotate(90deg); }
.afp-faq details[open] .afp-faq__mais { transform: rotate(90deg); }
.afp-faq details[open] .afp-faq__mais::after { opacity: 0; }
.afp-faq__resp {
    padding: 0 1.25rem 1.25rem;
    font-size: .9375rem;
    line-height: 1.7;
    color: var(--muted);
    animation: afpAbre .28s ease-out;
}
.afp-faq__resp a { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }

/* ================================================================= */
/* CTA GRUDADO NO MOBILE                                             */
/* ================================================================= */
.afp-sticky {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 40;
    padding: .75rem 1rem calc(.75rem + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    border-top: 1px solid var(--border);
    backdrop-filter: blur(12px);
    transform: translateY(110%);
    transition: transform .3s cubic-bezier(.16, 1, .3, 1);
    display: none;
}
.afp-sticky.is-in { transform: none; }
.afp-sticky .afp-btn { width: 100%; padding: .875rem 1.25rem; font-size: 1rem; }

/* ================================================================= */
/* ANIMACOES                                                         */
/* ================================================================= */
@keyframes afpFlutua {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-14px); }
}
@keyframes afpPulso {
    0%, 100% { box-shadow: 0 0 0 3px rgba(52, 211, 153, .2); }
    50%      { box-shadow: 0 0 0 7px rgba(52, 211, 153, .04); }
}
@keyframes afpCresce {
    from { transform: scaleY(.15); opacity: .35; }
    to   { transform: scaleY(1); opacity: 1; }
}
@keyframes afpAbre {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: none; }
}

/* ================================================================= */
/* RESPONSIVO                                                        */
/* ================================================================= */
@media (max-width: 1100px) {
    .afp-hero__grid { grid-template-columns: minmax(0, 1fr); gap: 2.5rem; }
    .afp-stage { max-width: 34rem; }
    .afp-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .afp-calc { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
}
@media (max-width: 900px) {
    .afp-passos { grid-template-columns: minmax(0, 1fr); gap: 1.75rem; }
    .afp-passos::before { display: none; }
    .afp-tiers { grid-template-columns: minmax(0, 1fr); }
    .afp-faixa__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.75rem 1rem; }
    .afp-regras { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
    .afp-sec { padding: 3.5rem 0; }
    .afp-hero { padding: 3rem 0 3.5rem; }
    .afp-cta { padding: 3.5rem 0; }
    .afp-cards { grid-template-columns: minmax(0, 1fr); }
    .afp-btn { font-size: .9375rem; padding: .9375rem 1.25rem; }
    .afp-hero__acoes .afp-btn { width: 100%; }
    .afp-calc { padding: 1.5rem; }
    .afp-sticky { display: block; }
    /* o palco mantem a composicao do desktop e so encolhe junto (sem quebrar) */
    .afp-stage { width: 30rem; height: 27rem; transform: scale(.82); transform-origin: top left; margin-bottom: -4.9rem; }
}
@media (max-width: 430px) {
    .afp-stage { transform: scale(.66); margin-bottom: -9.2rem; }
}

/* ================================================================= */
/* MOVIMENTO REDUZIDO — desliga tudo e deixa o estado FINAL legivel  */
/* ================================================================= */
@media (prefers-reduced-motion: reduce) {
    .afp-graf,
    .afp-recibo,
    .afp-linkcard__topo i { animation: none; }
    .afp-barras i { animation: none; }
    .afp-js .afp-rv { opacity: 1; transform: none; transition: none; }
    .afp-faq__resp { animation: none; }
    .afp-btn:hover,
    .afp-card:hover,
    .afp-tier:hover,
    .afp-cat:hover { transform: none; }
}
