/* ==========================================================================
   Tema: ESCURO é o padrão (:root). O claro entra com <html data-theme="light">.
   O botão do topo alterna e guarda a escolha no navegador (localStorage).
   ========================================================================== */
:root {
    color-scheme: dark;

    --brand: #3b82f6;
    --brand-hover: #2f6fdb;
    --link: #7db2ff;
    --accent: #f5a623;

    --bg: #0f1626;
    --bg-alt: #121b2e;
    --surface: #172033;
    --text: #e6eaf2;
    --heading: #f2f5fa;
    --muted: #9aa7bd;
    --border: #2b3650;

    --field-bg: #0f1626;
    --field-border: #34415e;
    --field-hover: #4d5f87;
    --placeholder: #7d8ba3;
    --focus-ring: rgba(59, 130, 246, .28);

    --file-bg: #121b2e;
    --file-hover-bg: #16223a;
    --file-btn-bg: #26324a;
    --file-btn-hover: #31405f;

    --hero-from: #15233f;
    --hero-to: #0f1626;
    --cta-bg: #1d3a78;
    --footer-bg: #0a1020;
    --footer-text: #b8c3d8;

    --ok: #34d399;
    --err: #f5766f;
    --ok-bg: rgba(52, 211, 153, .12);
    --ok-border: rgba(52, 211, 153, .38);
    --err-bg: rgba(240, 98, 90, .12);
    --err-border: rgba(240, 98, 90, .42);

    --chevron: %239aa7bd;
    --shadow: 0 6px 20px rgba(0, 0, 0, .35);
    --radius: 10px;
}

:root[data-theme="light"] {
    color-scheme: light;

    --brand: #0b3d91;
    --brand-hover: #082b66;
    --link: #0b3d91;

    --bg: #ffffff;
    --bg-alt: #f3f6fb;
    --surface: #ffffff;
    --text: #1b2430;
    --heading: #082b66;
    --muted: #5a6677;
    --border: #d9e0ea;

    --field-bg: #ffffff;
    --field-border: #c3cedd;
    --field-hover: #9fb0c8;
    --placeholder: #8a96a8;
    --focus-ring: rgba(11, 61, 145, .14);

    --file-bg: #f8fafd;
    --file-hover-bg: #f1f6ff;
    --file-btn-bg: #e4eaf5;
    --file-btn-hover: #d6e0f3;

    --hero-from: #eaf1ff;
    --hero-to: #ffffff;
    --cta-bg: #0b3d91;
    --footer-bg: #0c1a33;
    --footer-text: #cdd7e6;

    --ok: #137a3b;
    --err: #b3261e;
    --ok-bg: #e8f6ee;
    --ok-border: #a5d9ba;
    --err-bg: #fdecea;
    --err-border: #f3b4ae;

    --chevron: %235a6677;
    --shadow: 0 4px 14px rgba(0, 0, 0, .12);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
}

a { color: var(--link); }
h1, h2, h3 { line-height: 1.25; color: var(--heading); }

/* O Blazor foca o <h1> a cada navegacao (acessibilidade p/ leitores de tela); sem contorno visivel */
h1:focus, h1:focus-visible, [tabindex="-1"]:focus, [tabindex="-1"]:focus-visible { outline: none; }
h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 0 0 .6em; }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); margin: 0 0 .6em; }
h3 { font-size: 1.1rem; margin: 0 0 .4em; }

.container { max-width: 1060px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 720px; }
.center { text-align: center; }

/* Topo */
.topbar { background: var(--bg); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 10; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; flex-wrap: wrap; }
.brand { font-weight: 700; font-size: 1.25rem; color: var(--heading); text-decoration: none; }
.brand-text > span { color: var(--accent); }
.nav { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.nav a { text-decoration: none; color: var(--text); font-size: .95rem; }
.nav a:hover { color: var(--link); }
.nav a.btn { color: #fff; }

/* botao de tema (sol/lua) */
.theme-toggle {
    display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px;
    padding: 0; border: 1px solid var(--border); border-radius: 12px; background: var(--surface);
    color: var(--text); font-size: 1.15rem; line-height: 1; cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease;
}
.theme-toggle:hover { border-color: var(--field-hover); }
.theme-toggle .icon-sun { display: inline; }
.theme-toggle .icon-moon { display: none; }
:root[data-theme="light"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="light"] .theme-toggle .icon-moon { display: inline; }

/* Botoes */
.btn {
    display: inline-block; background: var(--brand); color: #fff !important; border: 0; border-radius: 12px;
    padding: 12px 22px; font-size: 1rem; font-weight: 600; text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--brand-hover); }
.btn-small { padding: 8px 14px; font-size: .9rem; }
.btn-ghost { background: transparent; color: var(--link) !important; border: 2px solid var(--brand); }
.btn-ghost:hover { background: var(--bg-alt); }
.btn-light { background: #fff; color: #082b66 !important; }
.btn-light:hover { background: #e9effa; }

/* Hero */
.hero { background: linear-gradient(135deg, var(--hero-from) 0%, var(--hero-to) 70%); padding: 56px 0 44px; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 680px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 24px 0; }
.hero-points { list-style: none; padding: 0; margin: 0; display: flex; gap: 8px 22px; flex-wrap: wrap; color: var(--muted); }
.hero-points li::before { content: "\2713  "; color: var(--ok); font-weight: 700; }

/* Secoes */
.section { padding: 48px 0; }
.section-alt { background: var(--bg-alt); }
.section-sub { color: var(--muted); margin-top: -.2em; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-top: 20px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.card p { margin: 0; color: var(--muted); }

.steps { padding-left: 1.2em; }
.steps li { margin-bottom: 12px; }

details { border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 10px; background: var(--surface); }
summary { cursor: pointer; font-weight: 600; }
details p { margin: 10px 0 0; color: var(--muted); }

.cta { background: var(--cta-bg); color: #fff; text-align: center; padding: 44px 0; }
.cta h2 { color: #fff; }

/* Formularios */
form { margin-top: 20px; }

fieldset {
    border: 1px solid var(--border); border-radius: 16px; background: var(--surface);
    padding: 22px 24px 10px; margin: 0 0 22px;
}
legend { font-weight: 700; padding: 0 10px; color: var(--heading); font-size: 1.02rem; }

label { display: block; margin-bottom: 18px; font-weight: 600; font-size: .95rem; color: var(--text); }

/* TODOS os campos com o mesmo visual (o InputText do Blazor nao tem type="text", por isso o seletor por :not) */
input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=hidden]):not([type=submit]),
select,
textarea {
    display: block; width: 100%; min-height: 50px; margin-top: 8px; padding: 12px 16px;
    font: inherit; font-weight: 400; color: var(--text); background-color: var(--field-bg);
    border: 1px solid var(--field-border); border-radius: 12px;
    transition: border-color .15s ease, box-shadow .15s ease;
}
input::placeholder, textarea::placeholder { color: var(--placeholder); }
input:not([type=checkbox]):not([type=radio]):not([type=file]):hover, select:hover, textarea:hover { border-color: var(--field-hover); }
input:not([type=checkbox]):not([type=radio]):not([type=file]):focus, select:focus, textarea:focus {
    outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--focus-ring);
}

textarea { min-height: 160px; resize: vertical; line-height: 1.5; }

select {
    -webkit-appearance: none; appearance: none; cursor: pointer; padding-right: 46px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%239aa7bd' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 8l5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 16px center; background-size: 16px;
}
:root[data-theme="light"] select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%235a6677' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 8l5 5 5-5'/%3E%3C/svg%3E");
}
select option { background: var(--field-bg); color: var(--text); }

/* campo de arquivos */
input[type=file] {
    display: block; width: 100%; margin-top: 8px; padding: 14px 16px; font: inherit; font-weight: 400;
    color: var(--muted); background: var(--file-bg); border: 2px dashed var(--field-border); border-radius: 12px; cursor: pointer;
}
input[type=file]:hover { border-color: var(--brand); background: var(--file-hover-bg); }
input[type=file]::file-selector-button {
    margin-right: 14px; padding: 9px 16px; font: inherit; font-weight: 600; cursor: pointer;
    color: var(--text); background: var(--file-btn-bg); border: 0; border-radius: 10px;
}
input[type=file]::file-selector-button:hover { background: var(--file-btn-hover); }

/* caixa de aceite */
.check { display: flex; gap: 12px; align-items: flex-start; font-weight: 400; margin: 8px 0 22px; }
.check input { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--brand); flex: none; }

.hint { color: var(--muted); font-size: .9rem; margin: 0 0 14px; }
.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }

button.btn { padding: 14px 30px; font-size: 1.02rem; border: 0; }

.alert { border-radius: var(--radius); padding: 14px 16px; margin: 14px 0; }
.alert-ok { background: var(--ok-bg); border: 1px solid var(--ok-border); }
.alert-ok h2 { color: var(--ok); margin-top: 0; }
.alert-error { background: var(--err-bg); border: 1px solid var(--err-border); color: var(--err); }
.validation-message { color: var(--err); font-size: .88rem; }
.validation-errors { margin: 0; padding-left: 1.1em; }
input.invalid, select.invalid, textarea.invalid { border-color: var(--err) !important; box-shadow: 0 0 0 4px var(--err-bg) !important; }

/* Rodape */
.footer { background: var(--footer-bg); color: var(--footer-text); padding: 28px 0; }
.footer a { color: var(--footer-text); }
.footer-inner { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }

.whats {
    position: fixed; right: 16px; bottom: 16px; background: #1fa855; color: #fff; text-decoration: none;
    padding: 12px 18px; border-radius: 999px; font-weight: 600; box-shadow: var(--shadow); z-index: 20;
}

.prose h2 { margin-top: 1.6em; }

/* ==========================================================================
   ANIMACOES E ACABAMENTO
   Tudo aqui e opcional: se o navegador pedir "reduzir movimento" (ver o fim do
   arquivo) ou o JavaScript nao carregar, o site continua completo e legivel.
   ========================================================================== */
:root {
    --ease-out: cubic-bezier(.2, .7, .2, 1);
    --glow: rgba(59, 130, 246, .35);
    --grad-a: #60a5fa;
    --grad-b: #a78bfa;
    --orb-a: rgba(59, 130, 246, .22);
    --orb-b: rgba(167, 139, 250, .16);
}
:root[data-theme="light"] {
    --glow: rgba(11, 61, 145, .22);
    --grad-a: #0b3d91;
    --grad-b: #6d4aff;
    --orb-a: rgba(11, 61, 145, .10);
    --orb-b: rgba(109, 74, 255, .10);
}

/* barra de progresso de rolagem (criada pelo script) */
.scroll-progress {
    position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 50; pointer-events: none;
    background: linear-gradient(90deg, var(--grad-a), var(--grad-b), var(--accent));
    transform: scaleX(0); transform-origin: 0 50%;
}

/* topo: ganha sombra e vidro ao rolar */
.topbar { transition: box-shadow .3s ease, background-color .3s ease; }
.topbar.scrolled { box-shadow: 0 8px 28px rgba(0, 0, 0, .22); }
@supports (backdrop-filter: blur(8px)) {
    .topbar.scrolled { background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(12px) saturate(140%); }
}
.brand { transition: transform .25s var(--ease-out); display: inline-block; }
.brand:hover { transform: scale(1.04); }
.brand-text > span { background: linear-gradient(90deg, var(--accent), #ffd27a); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* links do menu: sublinhado que cresce */
.nav a:not(.btn) { position: relative; padding: 4px 0; transition: color .2s ease; }
.nav a:not(.btn)::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; border-radius: 2px;
    background: linear-gradient(90deg, var(--grad-a), var(--grad-b));
    transform: scaleX(0); transform-origin: 0 50%; transition: transform .3s var(--ease-out);
}
.nav a:not(.btn):hover::after { transform: scaleX(1); }

/* botao de tema: gira ao passar o mouse */
.theme-toggle { transition: background-color .2s ease, border-color .2s ease, transform .3s var(--ease-out), box-shadow .3s ease; }
.theme-toggle:hover { transform: rotate(18deg) scale(1.08); box-shadow: 0 0 0 4px var(--focus-ring); }
.theme-toggle:active { transform: scale(.92); }

/* botoes: elevam, brilham e "afundam" ao clicar */
.btn {
    position: relative; overflow: hidden; isolation: isolate;
    background-image: linear-gradient(135deg, var(--brand), color-mix(in srgb, var(--brand) 70%, #8b5cf6));
    transition: transform .25s var(--ease-out), box-shadow .25s ease, background-color .2s ease, border-color .2s ease;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .18);
}
.btn::before {
    content: ""; position: absolute; top: 0; bottom: 0; left: -80%; width: 55%; z-index: -1;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .38), transparent);
    transform: skewX(-20deg); transition: left .6s var(--ease-out);
}
.btn:hover { transform: translateY(-3px); box-shadow: 0 12px 26px var(--glow); }
.btn:hover::before { left: 130%; }
.btn:active { transform: translateY(0) scale(.97); box-shadow: 0 3px 10px var(--glow); }
.btn:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 3px; }
.btn-ghost { background-image: none; box-shadow: none; }
.btn-ghost:hover { border-color: var(--link); box-shadow: 0 10px 24px var(--glow); }
.btn-light { background-image: none; }

/* Hero: fundo vivo com "orbes" flutuando + entrada em cascata */
.hero { position: relative; overflow: hidden; padding: 84px 0 64px; }
.hero::before, .hero::after {
    content: ""; position: absolute; border-radius: 50%; filter: blur(70px); pointer-events: none; z-index: 0;
}
.hero::before { width: 420px; height: 420px; background: var(--orb-a); top: -140px; right: -80px; animation: float-a 14s ease-in-out infinite; }
.hero::after  { width: 360px; height: 360px; background: var(--orb-b); bottom: -160px; left: -100px; animation: float-b 17s ease-in-out infinite; }
.hero .container { position: relative; z-index: 1; }
.hero h1 {
    font-size: clamp(2rem, 5vw, 3.2rem); letter-spacing: -.02em;
    background: linear-gradient(100deg, var(--heading) 30%, var(--grad-a) 65%, var(--grad-b));
    background-size: 200% auto; -webkit-background-clip: text; background-clip: text; color: transparent;
    animation: rise .8s var(--ease-out) both, shimmer 8s linear 1s infinite;
}
.hero .lead { animation: rise .8s var(--ease-out) .12s both; }
.hero-actions { animation: rise .8s var(--ease-out) .24s both; }
.hero-points { animation: rise .8s var(--ease-out) .36s both; }
.hero-points li::before { display: inline-block; animation: pop .5s var(--ease-out) both; }
.hero-points li:nth-child(1)::before { animation-delay: .7s; }
.hero-points li:nth-child(2)::before { animation-delay: .85s; }
.hero-points li:nth-child(3)::before { animation-delay: 1s; }

@keyframes rise { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: scale(0) rotate(-40deg); } to { opacity: 1; transform: none; } }
@keyframes shimmer { to { background-position: 200% center; } }
@keyframes float-a { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(-50px, 40px); } }
@keyframes float-b { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(60px, -30px); } }
@keyframes page-in { from { opacity: 0; } to { opacity: 1; } }

/* toda pagina entra suave */
main { animation: page-in .45s ease both; }

/* titulos de secao com "marca" colorida embaixo */
.section h2 { position: relative; padding-bottom: 12px; }
.section h2::after {
    content: ""; position: absolute; left: 0; bottom: 0; width: 56px; height: 4px; border-radius: 4px;
    background: linear-gradient(90deg, var(--grad-a), var(--grad-b));
}

/* cards: sobem, ganham brilho e uma barra colorida no topo */
.card {
    position: relative; overflow: hidden;
    transition: transform .3s var(--ease-out), box-shadow .3s ease, border-color .3s ease;
}
.card::before {
    content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px;
    background: linear-gradient(90deg, var(--grad-a), var(--grad-b));
    transform: scaleX(0); transform-origin: 0 50%; transition: transform .45s var(--ease-out);
}
.card::after {
    content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .35s ease;
    background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), var(--glow), transparent 55%);
}
.card:hover { transform: translateY(-8px); border-color: var(--grad-a); box-shadow: 0 18px 40px rgba(0, 0, 0, .28); }
.card:hover::before { transform: scaleX(1); }
.card:hover::after { opacity: .55; }
.card > * { position: relative; z-index: 1; }
.card-icon {
    display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px; margin-bottom: 14px;
    font-size: 1.6rem; border-radius: 14px; background: var(--bg-alt); border: 1px solid var(--border);
    transition: transform .4s var(--ease-out), background-color .3s ease;
}
.card:hover .card-icon { transform: rotate(-8deg) scale(1.15); background: var(--file-btn-bg); }

/* passos: numeros em circulo e destaque ao passar o mouse */
.steps { list-style: none; counter-reset: passo; padding: 0; margin: 24px 0; display: grid; gap: 14px; }
.steps li {
    counter-increment: passo; position: relative; margin: 0; padding: 18px 20px 18px 74px;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    transition: transform .3s var(--ease-out), border-color .3s ease, box-shadow .3s ease;
}
.steps li::before {
    content: counter(passo); position: absolute; left: 18px; top: 50%; transform: translateY(-50%);
    width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
    font-weight: 700; color: #fff; border-radius: 50%;
    background: linear-gradient(135deg, var(--grad-a), var(--grad-b)); box-shadow: 0 4px 14px var(--glow);
    transition: transform .35s var(--ease-out);
}
.steps li:hover { transform: translateX(8px); border-color: var(--grad-a); box-shadow: 0 10px 26px rgba(0, 0, 0, .2); }
.steps li:hover::before { transform: translateY(-50%) scale(1.15) rotate(8deg); }

/* perguntas: reagem ao mouse e abrem com animacao */
details { transition: border-color .25s ease, box-shadow .25s ease, transform .25s var(--ease-out); }
details:hover { border-color: var(--grad-a); transform: translateX(4px); }
details[open] { border-color: var(--grad-a); box-shadow: 0 8px 22px rgba(0, 0, 0, .18); }
summary { list-style: none; position: relative; padding-right: 30px; }
summary::-webkit-details-marker { display: none; }
summary::after {
    content: "+"; position: absolute; right: 2px; top: 50%; transform: translateY(-50%);
    font-size: 1.4rem; font-weight: 400; color: var(--link); transition: transform .3s var(--ease-out);
}
details[open] > summary::after { transform: translateY(-50%) rotate(45deg); }
details[open] > p { animation: rise .35s var(--ease-out) both; }

/* chamada final: fundo com brilho que se move */
.cta {
    background-image: linear-gradient(120deg, var(--cta-bg), color-mix(in srgb, var(--cta-bg) 55%, #6d4aff), var(--cta-bg));
    background-size: 200% 100%; animation: cta-move 12s ease-in-out infinite alternate;
}
@keyframes cta-move { from { background-position: 0 0; } to { background-position: 100% 0; } }

/* formularios: blocos reagem ao foco, avisos aparecem com movimento */
fieldset { transition: border-color .3s ease, box-shadow .3s ease; }
fieldset:hover, fieldset:focus-within { border-color: var(--grad-a); box-shadow: 0 10px 30px rgba(0, 0, 0, .16); }
label { transition: color .2s ease; }
label:focus-within { color: var(--link); }
.alert-ok { animation: rise .6s var(--ease-out) both; }
.alert-error { animation: shake .45s ease both; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.check input { transition: transform .2s var(--ease-out); }
.check input:hover { transform: scale(1.15); }
.check:focus-within { color: var(--text); }

/* rodape */
.footer a { text-decoration: none; transition: color .2s ease, padding-left .25s var(--ease-out); }
.footer a:hover { color: #fff; padding-left: 6px; }

/* botao do WhatsApp: entra e pulsa de leve chamando atencao */
.whats { transition: transform .25s var(--ease-out), box-shadow .25s ease; animation: whats-in .6s var(--ease-out) 1s both, whats-pulse 2.6s ease-out 2s infinite; }
.whats:hover { transform: translateY(-4px) scale(1.05); box-shadow: 0 14px 30px rgba(31, 168, 85, .45); }
@keyframes whats-in { from { opacity: 0; transform: translateY(30px) scale(.8); } to { opacity: 1; transform: none; } }
@keyframes whats-pulse { 0% { box-shadow: 0 0 0 0 rgba(31, 168, 85, .55); } 70%, 100% { box-shadow: 0 0 0 16px rgba(31, 168, 85, 0); } }

/* aparecer ao rolar (so ativa se o script marcar <html class="js">) */
.js .reveal { opacity: 0; transform: translateY(30px); transition: opacity .7s ease, transform .7s var(--ease-out); transition-delay: var(--d, 0ms); }
.js .reveal.in { opacity: 1; transform: none; }

/* quem prefere menos movimento recebe o site sem animacoes */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
    .js .reveal { opacity: 1; transform: none; }
    .scroll-progress { display: none; }
}

/* ==========================================================================
   RESPONSIVO: celular, tablet e telas grandes
   ========================================================================== */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { overflow-x: hidden; -webkit-tap-highlight-color: transparent; }
main { overflow-wrap: anywhere; }
img, video, svg { max-width: 100%; height: auto; }
.container { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
.footer { padding-bottom: max(28px, env(safe-area-inset-bottom)); }
.whats { right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); }

/* agrupa menu + botoes do topo */
.topbar-right { display: flex; align-items: center; gap: 14px; }
.nav-toggle { display: none; }

/* campos com 16px no minimo: evita o zoom automatico do iPhone ao tocar */
input:not([type=checkbox]):not([type=radio]):not([type=file]), select, textarea { font-size: 16px; }

/* ---- Tablet (ate 1024px) ---- */
@media (max-width: 1024px) {
    .cards { grid-template-columns: repeat(2, 1fr); }
    .hero { padding: 68px 0 52px; }
    .section { padding: 42px 0; }
}

/* ---- Celular (ate 760px): menu vira "hamburguer" ---- */
@media (max-width: 760px) {
    .topbar-inner { flex-wrap: nowrap; min-height: 58px; }
    .topbar-right { gap: 10px; }

    .nav-toggle {
        display: inline-flex; flex-direction: column; justify-content: center; align-items: center; gap: 5px;
        width: 40px; height: 40px; padding: 0; border: 1px solid var(--border); border-radius: 12px;
        background: var(--surface); cursor: pointer; transition: background-color .2s ease, border-color .2s ease, transform .2s var(--ease-out);
    }
    .nav-toggle:active { transform: scale(.92); }
    .nav-toggle span { display: block; width: 18px; height: 2px; border-radius: 2px; background: var(--text); transition: transform .3s var(--ease-out), opacity .2s ease; }
    .nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
    .nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

    .nav {
        position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0;
        padding: 8px 16px 16px; background: var(--bg); border-bottom: 1px solid var(--border);
        box-shadow: 0 18px 30px rgba(0, 0, 0, .3);
        opacity: 0; visibility: hidden; transform: translateY(-10px); pointer-events: none;
        transition: opacity .25s ease, transform .3s var(--ease-out), visibility 0s linear .3s;
    }
    .nav-open .nav { opacity: 1; visibility: visible; transform: none; pointer-events: auto; transition-delay: 0s; }
    .nav a:not(.btn) { padding: 14px 4px; font-size: 1.05rem; border-bottom: 1px solid var(--border); }
    .nav a:not(.btn)::after { display: none; }
    .nav a.btn { margin-top: 14px; text-align: center; padding: 14px 22px; font-size: 1rem; }
    .nav > * { opacity: 0; transform: translateY(8px); transition: opacity .3s ease, transform .35s var(--ease-out); }
    .nav-open .nav > * { opacity: 1; transform: none; }
    .nav-open .nav > *:nth-child(2) { transition-delay: .04s; }
    .nav-open .nav > *:nth-child(3) { transition-delay: .08s; }
    .nav-open .nav > *:nth-child(4) { transition-delay: .12s; }
    .nav-open .nav > *:nth-child(5) { transition-delay: .16s; }

    .hero { padding: 44px 0 40px; }
    .hero::before { width: 260px; height: 260px; top: -90px; right: -90px; }
    .hero::after { width: 240px; height: 240px; bottom: -110px; left: -90px; }
    .lead { font-size: 1.05rem; }
    .hero-actions { flex-direction: column; margin: 22px 0; }
    .hero-actions .btn { text-align: center; width: 100%; }
    .hero-points { flex-direction: column; gap: 8px; }

    .section { padding: 34px 0; }
    .cards { grid-template-columns: 1fr; gap: 14px; }
    .card { padding: 18px; }
    .steps li { padding: 16px 16px 16px 66px; }
    .steps li::before { left: 14px; width: 36px; height: 36px; }

    fieldset { padding: 18px 16px 6px; border-radius: 14px; }
    button.btn { width: 100%; }
    .cta { padding: 36px 0; }
    .cta .btn { width: 100%; max-width: 360px; }

    .footer-inner { flex-direction: column; gap: 16px; }
    .whats { padding: 12px 16px; font-size: .95rem; }
}

/* ---- Celulares bem pequenos ---- */
@media (max-width: 360px) {
    h1 { font-size: 1.6rem; }
    .brand { font-size: 1.1rem; }
    .btn { padding: 12px 16px; }
}

/* ---- Aparelhos de toque: sem "hover" preso; reacao ao toque no lugar ---- */
@media (hover: none) {
    .card:hover, .steps li:hover, details:hover, .btn:hover, .theme-toggle:hover, .brand:hover, .whats:hover { transform: none; }
    .card:hover::before { transform: scaleX(0); }
    .card:hover::after { opacity: 0; }
    .card:hover { box-shadow: none; border-color: var(--border); }
    .steps li:hover { box-shadow: none; border-color: var(--border); }
    .btn:hover::before { left: -80%; }
    .btn:hover { box-shadow: 0 4px 14px rgba(0, 0, 0, .18); }
    .card:active { transform: scale(.97); border-color: var(--grad-a); }
    .card:active::before { transform: scaleX(1); }
    .steps li:active { transform: translateX(6px); border-color: var(--grad-a); }
    details:active { border-color: var(--grad-a); }
    .btn:active { transform: scale(.96); }
    .btn:active::before { left: 130%; }
}

/* telas muito largas */
@media (min-width: 1500px) {
    .container { max-width: 1180px; }
}

/* quem usa "reduzir movimento" tambem fica sem a animacao do menu */
@media (prefers-reduced-motion: reduce) {
    .nav, .nav > * { transition: none !important; }
}

/* ==========================================================================
   CONTA: login, perfil, meus orcamentos e meus suportes
   ========================================================================== */
.avatar {
    display: inline-flex; align-items: center; justify-content: center; flex: none; overflow: hidden;
    width: 30px; height: 30px; border-radius: 50%; font-weight: 700; font-size: .85rem; color: #fff;
    background: linear-gradient(135deg, var(--grad-a), var(--grad-b));
}
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-lg { width: 72px; height: 72px; font-size: 1.8rem; box-shadow: 0 6px 22px var(--glow); }

.user-chip {
    display: inline-flex; align-items: center; gap: 10px; padding: 5px 18px 5px 8px; border-radius: 999px; max-width: 100%;
    border: 1px solid var(--border); background: var(--surface); color: var(--text); text-decoration: none;
    font-size: .92rem; font-weight: 600; transition: border-color .2s ease, box-shadow .2s ease, transform .25s var(--ease-out);
}
.nav a.user-chip::after { display: none; }
.user-chip:hover { border-color: var(--grad-a); box-shadow: 0 6px 18px var(--glow); transform: translateY(-2px); }
.nav a.user-chip { padding: 5px 18px 5px 8px; }
.user-chip .avatar { flex: none; }
.user-chip-name { min-width: 0; max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.login-link {
    padding: 8px 16px !important; border: 1px solid var(--border); border-radius: 999px; font-weight: 600;
    transition: border-color .2s ease, background-color .2s ease;
}
.nav a.login-link::after { display: none; }
.login-link:hover { border-color: var(--grad-a); background: var(--surface); }

/* tela de entrar */
.login-card {
    text-align: center; background: var(--surface); border: 1px solid var(--border); border-radius: 20px;
    padding: 36px 28px; box-shadow: var(--shadow); animation: rise .6s var(--ease-out) both;
}
.login-card h1 { margin-bottom: .3em; }
.login-icon { font-size: 2.4rem; margin-bottom: 8px; animation: pop .6s var(--ease-out) .2s both; }
.btn-google {
    display: inline-flex; align-items: center; justify-content: center; gap: 12px; width: 100%; max-width: 340px;
    margin: 18px auto 10px; padding: 13px 20px; font-size: 1.02rem; font-weight: 600; text-decoration: none;
    color: #1f2937; background: #fff; border: 1px solid #dadce0; border-radius: 12px;
    transition: transform .25s var(--ease-out), box-shadow .25s ease;
}
.btn-google:hover { transform: translateY(-3px); box-shadow: 0 12px 26px rgba(0, 0, 0, .28); }
.btn-google:active { transform: scale(.97); }
.login-card .btn-ghost { margin-top: 6px; }
.login-note { margin: 20px 0 0; }

/* perfil */
.profile-head { display: flex; align-items: center; gap: 18px; margin: 18px 0 8px; animation: rise .5s var(--ease-out) both; }
.profile-name { font-size: 1.3rem; font-weight: 700; color: var(--heading); }
.profile-mail { color: var(--muted); overflow-wrap: anywhere; }
.card-link { display: block; text-decoration: none; color: inherit; }
.card-link h3 { color: var(--heading); }
.profile-actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 26px 0 8px; }
.logout-form { margin: 10px 0 0; }
.btn-link { background: none; border: 0; padding: 8px 0; color: var(--muted); font: inherit; cursor: pointer; text-decoration: underline; transition: color .2s ease; }
.btn-link:hover { color: var(--err); }
.crumb { margin: 0 0 6px; }
.crumb a { text-decoration: none; color: var(--muted); transition: color .2s ease; }
.crumb a:hover { color: var(--link); }

/* listas (meus orcamentos / meus suportes) */
.list { display: grid; gap: 14px; margin-top: 22px; }
.item h3 { margin: 6px 0 6px; }
.item-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.item-code { font-weight: 700; font-size: .85rem; letter-spacing: .02em; color: var(--muted); margin-right: auto; }
.item-desc { margin: 0 0 10px; color: var(--muted); }
.item-meta { margin: 0 0 6px; color: var(--text) !important; }
.item-date { margin: 0; font-size: .85rem; color: var(--muted); }
.badge {
    display: inline-block; padding: 3px 11px; border-radius: 999px; font-size: .78rem; font-weight: 700;
    border: 1px solid transparent; white-space: nowrap;
}
.badge-info  { color: var(--link); background: color-mix(in srgb, var(--link) 14%, transparent); border-color: color-mix(in srgb, var(--link) 35%, transparent); }
.badge-brand { color: var(--grad-b); background: color-mix(in srgb, var(--grad-b) 15%, transparent); border-color: color-mix(in srgb, var(--grad-b) 38%, transparent); }
.badge-warn  { color: var(--accent); background: color-mix(in srgb, var(--accent) 15%, transparent); border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.badge-ok    { color: var(--ok); background: var(--ok-bg); border-color: var(--ok-border); }
.badge-err   { color: var(--err); background: var(--err-bg); border-color: var(--err-border); }

.empty {
    text-align: center; margin-top: 24px; padding: 40px 20px; background: var(--surface);
    border: 2px dashed var(--field-border); border-radius: 16px;
}
.empty-icon { font-size: 2.2rem; }
.empty p { color: var(--muted); margin: 0 0 16px; }

@media (max-width: 760px) {
    .user-chip, .nav a.user-chip { justify-content: flex-start; margin-top: 14px; padding: 8px 18px 8px 10px; }
    .user-chip-name { max-width: 70vw; }
    .login-link { margin-top: 14px; text-align: center; padding: 13px 16px !important; }
    .login-card { padding: 28px 18px; }
    .profile-actions .btn { width: 100%; text-align: center; }
}

/* WhatsApp: so o icone redondo; ao passar o mouse aparece "Conversar no WhatsApp" */
.whats {
    display: block; width: 60px; height: 60px; padding: 0; background: none; border-radius: 50%; line-height: 0;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .35);
}
.whats img { display: block; width: 100%; height: 100%; border-radius: 50%; transition: transform .35s var(--ease-out); }
.whats:hover img { transform: rotate(-10deg) scale(1.06); }
.whats-label {
    position: absolute; right: calc(100% + 12px); top: 50%; white-space: nowrap; line-height: 1.2;
    padding: 10px 16px; border-radius: 999px; font-size: .92rem; font-weight: 600; color: #fff; background: #1f2937;
    box-shadow: 0 8px 22px rgba(0, 0, 0, .35); opacity: 0; pointer-events: none;
    transform: translate(10px, -50%); transition: opacity .25s ease, transform .3s var(--ease-out);
}
.whats-label::after {
    content: ""; position: absolute; left: 100%; top: 50%; margin-top: -6px;
    border: 6px solid transparent; border-left-color: #1f2937;
}
.whats:hover .whats-label, .whats:focus-visible .whats-label { opacity: 1; transform: translate(0, -50%); }
.whats:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 3px; }
@media (hover: none) { .whats-label { display: none; } }
@media (max-width: 760px) { .whats { width: 56px; height: 56px; } }
@keyframes whats-pulse { 0% { box-shadow: 0 0 0 0 rgba(15, 191, 69, .55); } 70%, 100% { box-shadow: 0 0 0 16px rgba(15, 191, 69, 0); } }

/* chamada final: orcamento ou WhatsApp, lado a lado */
.cta-actions { display: flex; justify-content: center; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 8px; }
.btn-whats {
    display: inline-flex; align-items: center; gap: 10px; background-image: none; background-color: #0f7a3d;
    color: #fff !important;
}
.btn-whats:hover { background-color: #0b6330; box-shadow: 0 12px 26px rgba(15, 122, 61, .45); }
.btn-whats img { display: block; width: 24px; height: 24px; border-radius: 50%; background: #fff; }
@media (max-width: 760px) {
    .cta-actions { flex-direction: column; }
    .cta-actions .btn { width: 100%; max-width: 360px; justify-content: center; text-align: center; }
}

/* logo no topo, ao lado do nome */
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-logo { display: block; width: 38px; height: 38px; border-radius: 50%; box-shadow: 0 0 0 1px var(--border), 0 4px 14px var(--glow); transition: transform .5s var(--ease-out), box-shadow .3s ease; }
.brand:hover .brand-logo { transform: rotate(-12deg) scale(1.08); box-shadow: 0 0 0 1px var(--grad-a), 0 6px 20px var(--glow); }
@media (max-width: 360px) { .brand-logo { width: 32px; height: 32px; } }

/* ==========================================================================
   ANEXOS: miniaturas, lista de arquivos e imagem ampliada
   ========================================================================== */
.file-field { margin-bottom: 8px; }
.file-previews { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 10px; }
.file-previews:empty { display: none; }

.file-item {
    position: relative; animation: pop-in .35s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 50ms);
}
@keyframes pop-in { from { opacity: 0; transform: scale(.7) translateY(8px); } to { opacity: 1; transform: none; } }

.file-thumb {
    display: block; width: 92px; height: 92px; padding: 0; overflow: hidden; cursor: zoom-in;
    border: 2px solid var(--field-border); border-radius: 14px; background: var(--file-bg);
    transition: transform .25s var(--ease-out), border-color .2s ease, box-shadow .25s ease;
}
.file-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .35s var(--ease-out); }
.file-thumb:hover { transform: translateY(-4px); border-color: var(--grad-a); box-shadow: 0 10px 22px var(--glow); }
.file-thumb:hover img { transform: scale(1.1); }
.file-thumb:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }

.file-remove {
    position: absolute; top: -8px; right: -8px; width: 26px; height: 26px; padding: 0; border-radius: 50%;
    border: 2px solid var(--bg); background: var(--err); color: #fff; font-size: 1rem; line-height: 1; cursor: pointer;
    display: flex; align-items: center; justify-content: center; transition: transform .2s var(--ease-out);
}
.file-remove:hover { transform: scale(1.18) rotate(90deg); }

.file-previews-files { flex-direction: column; gap: 8px; }
.file-item:not(.is-image) {
    display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 40px 10px 12px;
    background: var(--file-bg); border: 1px solid var(--field-border); border-radius: 12px;
    transition: border-color .2s ease, transform .25s var(--ease-out);
}
.file-item:not(.is-image):hover { border-color: var(--grad-a); transform: translateX(4px); }
.file-item:not(.is-image) .file-remove { top: 50%; right: 8px; margin-top: -13px; border-color: transparent; }
.file-ext {
    flex: none; min-width: 46px; padding: 8px 6px; text-align: center; border-radius: 10px;
    font-size: .72rem; font-weight: 800; letter-spacing: .03em; color: #fff;
    background: linear-gradient(135deg, var(--grad-a), var(--grad-b));
}
.file-info { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.file-name { font-weight: 600; font-size: .92rem; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-size { font-size: .8rem; color: var(--muted); }

.file-msg { margin: 0 0 12px; font-size: .88rem; min-height: 0; }
.file-msg:empty { display: none; }
.file-msg.is-error { color: var(--err); }
.file-msg.is-ok { color: var(--ok); }

/* imagem ampliada */
.lightbox { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 24px; }
.lightbox[hidden] { display: none; }
.lb-backdrop { position: absolute; inset: 0; background: rgba(5, 9, 20, .82); opacity: 0; transition: opacity .25s ease; backdrop-filter: blur(4px); }
.lightbox.open .lb-backdrop { opacity: 1; }
.lb-fig { position: relative; z-index: 1; margin: 0; max-width: min(92vw, 1100px); text-align: center; opacity: 0; transform: scale(.88); transition: opacity .25s ease, transform .35s var(--ease-out); }
.lightbox.open .lb-fig { opacity: 1; transform: none; }
.lb-fig img { display: block; max-width: 100%; max-height: 78vh; margin: 0 auto; border-radius: 14px; box-shadow: 0 24px 70px rgba(0, 0, 0, .6); background: #0f1626; }
.lb-fig img.lb-in { animation: lb-swap .35s var(--ease-out) both; }
@keyframes lb-swap { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: none; } }
.lb-fig figcaption { margin-top: 12px; color: #dbe3f3; font-size: .9rem; overflow-wrap: anywhere; }
.lb-btn {
    position: absolute; z-index: 2; width: 46px; height: 46px; padding: 0; border: 0; border-radius: 50%;
    background: rgba(255, 255, 255, .14); color: #fff; font-size: 1.7rem; line-height: 1; cursor: pointer;
    display: flex; align-items: center; justify-content: center; transition: background-color .2s ease, transform .25s var(--ease-out);
}
.lb-btn:hover { background: rgba(255, 255, 255, .28); transform: scale(1.1); }
.lb-close { top: 18px; right: 18px; }
.lb-prev { left: 18px; top: 50%; margin-top: -23px; }
.lb-next { right: 18px; top: 50%; margin-top: -23px; }
.lightbox.single .lb-prev, .lightbox.single .lb-next { display: none; }
html.lb-open { overflow: hidden; }

@media (max-width: 760px) {
    .file-thumb { width: 78px; height: 78px; }
    .lightbox { padding: 12px; }
    .lb-prev { left: 8px; } .lb-next { right: 8px; } .lb-close { top: 10px; right: 10px; }
}
@media (prefers-reduced-motion: reduce) {
    .file-item, .lb-fig, .lb-backdrop, .lb-fig img { animation: none !important; transition: none !important; }
}

/* aprovar orcamento (Meus orcamentos) */
.item-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 4px 0 12px; }
.btn-approve { background-image: none; background-color: #1fa855; }
.btn-approve:hover { background-color: #17934a; box-shadow: 0 12px 26px rgba(31, 168, 85, .45); }
.item-hint { font-size: .82rem; color: var(--muted); }
@media (max-width: 760px) { .btn-approve { width: 100%; text-align: center; } }


/* ==========================================================================
   ENVIANDO: tela bloqueada com carregamento animado e mensagens alternando
   ========================================================================== */
.busy { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; padding: 24px;
        background: rgba(5, 9, 20, .78); backdrop-filter: blur(6px); opacity: 0; transition: opacity .25s ease; }
.busy[hidden] { display: none; }
.busy.open { opacity: 1; }
.busy-card {
    width: min(92vw, 400px); text-align: center; padding: 34px 26px 28px; border-radius: 20px;
    background: var(--surface); border: 1px solid var(--border); box-shadow: 0 30px 80px rgba(0, 0, 0, .55);
    transform: scale(.92); transition: transform .35s var(--ease-out);
}
.busy.open .busy-card { transform: none; }
.busy-spinner { position: relative; width: 96px; height: 96px; margin: 0 auto 20px; display: flex; align-items: center; justify-content: center; }
.busy-spinner img { width: 64px; height: 64px; border-radius: 50%; animation: busy-pulse 1.6s ease-in-out infinite; }
.busy-ring {
    position: absolute; inset: 0; border-radius: 50%;
    background: conic-gradient(from 0deg, transparent 0 20%, var(--grad-a) 60%, var(--grad-b) 100%);
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 4px));
            mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 4px));
    animation: busy-spin 1.1s linear infinite;
}
.busy-msg { margin: 0 0 6px; min-height: 1.6em; font-size: 1.12rem; font-weight: 700; color: var(--heading); }
.busy-msg.swap { animation: busy-swap .45s var(--ease-out) both; }
.busy-sub { margin: 0 0 18px; font-size: .88rem; color: var(--muted); }
.busy-bar { height: 5px; border-radius: 5px; overflow: hidden; background: var(--border); }
.busy-bar span { display: block; width: 40%; height: 100%; border-radius: 5px; background: linear-gradient(90deg, var(--grad-a), var(--grad-b));
                 animation: busy-slide 1.3s ease-in-out infinite; }
html.is-busy { overflow: hidden; }
@keyframes busy-spin { to { transform: rotate(360deg); } }
@keyframes busy-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08); } }
@keyframes busy-swap { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes busy-slide { 0% { transform: translateX(-100%); } 100% { transform: translateX(250%); } }
@media (prefers-reduced-motion: reduce) {
    .busy-ring { animation: busy-spin 2.4s linear infinite !important; }
    .busy-bar span { animation: busy-slide 2.4s ease-in-out infinite !important; }
}


/* erros por campo: mensagem logo abaixo e destaque na borda */
.validation-message { display: block; margin-top: 6px; font-weight: 600; font-size: .86rem; color: var(--err); animation: rise .3s var(--ease-out) both; }
label:has(.validation-message) { color: var(--err); }
label:has(.validation-message) select,
label:has(.validation-message) input:not([type=file]):not([type=checkbox]),
label:has(.validation-message) textarea { border-color: var(--err); box-shadow: 0 0 0 3px var(--err-bg); }
.check + .validation-message { margin: -14px 0 18px; }

/* ==========================================================================
   MEUS PROJETOS: andamento e pagamentos
   ========================================================================== */
.project { padding: 22px; }
.timeline { list-style: none; display: flex; margin: 18px 0 8px; padding: 0; }
.timeline li { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.timeline li:not(:first-child)::before {
    content: ""; position: absolute; top: 17px; right: 50%; width: 100%; height: 3px; border-radius: 3px;
    background: var(--border); z-index: 0;
}
.timeline li.done:not(:first-child)::before, .timeline li.current:not(:first-child)::before {
    background: linear-gradient(90deg, var(--grad-a), var(--grad-b)); transform-origin: 0 50%; animation: tl-grow .8s var(--ease-out) both;
}
@keyframes tl-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.tl-dot {
    position: relative; z-index: 1; width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: .95rem; color: var(--muted); background: var(--surface); border: 3px solid var(--border);
}
.timeline li.done .tl-dot { color: #fff; background: linear-gradient(135deg, var(--grad-a), var(--grad-b)); border-color: transparent; }
.timeline li.current .tl-dot { color: #fff; background: linear-gradient(135deg, var(--grad-a), var(--grad-b)); border-color: transparent; animation: tl-pulse 2s ease-out infinite; }
@keyframes tl-pulse { 0% { box-shadow: 0 0 0 0 var(--glow); } 70%, 100% { box-shadow: 0 0 0 12px transparent; } }
.tl-label { font-size: .82rem; font-weight: 600; color: var(--muted); }
.timeline li.done .tl-label, .timeline li.current .tl-label { color: var(--heading); }

.facts { display: flex; flex-wrap: wrap; gap: 10px 28px; margin: 16px 0 6px; }
.facts div { display: flex; flex-direction: column; }
.facts dt { font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.facts dd { margin: 0; font-weight: 700; color: var(--heading); }
.facts:empty { display: none; }

.pay { margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--border); }
.pay-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; color: var(--heading); }
.pay-pct { font-size: .85rem; font-weight: 700; color: var(--ok); }
.pay-bar { height: 12px; border-radius: 12px; background: var(--border); overflow: hidden; }
.pay-bar span {
    display: block; height: 100%; width: var(--pct); border-radius: 12px;
    background: linear-gradient(90deg, var(--ok), var(--grad-a)); transform-origin: 0 50%; animation: tl-grow 1s var(--ease-out) .2s both;
}
.pay-sum { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 14px 0; }
.pay-sum small { display: block; font-size: .76rem; color: var(--muted); }
.pay-sum b { font-size: 1.05rem; color: var(--heading); }
.pay-sum b.ok { color: var(--ok); }
.pay-sum b.warn { color: var(--accent); }
.pay-empty { margin: 10px 0 0; color: var(--muted); font-size: .92rem; }
.pay-list { list-style: none; margin: 6px 0 0; padding: 0; }
.pay-list li {
    display: grid; grid-template-columns: 96px 1fr auto; gap: 12px; align-items: center; padding: 10px 4px;
    border-bottom: 1px solid var(--border); transition: background-color .2s ease, transform .25s var(--ease-out);
}
.pay-list li:last-child { border-bottom: 0; }
.pay-list li:hover { background: var(--bg-alt); transform: translateX(4px); }
.pay-date { font-size: .85rem; color: var(--muted); }
.pay-note { overflow-wrap: anywhere; }
.pay-amount { font-weight: 800; color: var(--ok); white-space: nowrap; }
@media (max-width: 760px) {
    .tl-label { font-size: .74rem; }
    .pay-sum { grid-template-columns: 1fr; gap: 6px; }
    .pay-sum div { display: flex; justify-content: space-between; align-items: baseline; }
    .pay-list li { grid-template-columns: 1fr auto; }
    .pay-list .pay-date { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) { .timeline li::before, .pay-bar span, .tl-dot { animation: none !important; } }

/* ==========================================================================
   ACESSIBILIDADE, PAGINAS LEGAIS E AVISOS
   ========================================================================== */
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* link "Pular para o conteudo": so aparece ao navegar pelo teclado */
.skip-link {
    position: fixed; left: 12px; top: -80px; z-index: 1000; padding: 10px 16px; border-radius: 10px;
    background: #1d4ed8; color: #fff; font-weight: 700; text-decoration: none; transition: top .15s ease;
}
.skip-link:focus { top: 12px; outline: 3px solid #fff; outline-offset: 2px; box-shadow: 0 0 0 5px var(--brand); }
main:focus, main:focus-visible { outline: none; }

/* foco bem visivel para quem navega pelo teclado */
:is(a, button, summary, [role="tab"], input[type="range"], input[type="checkbox"], input[type="file"], select, .btn):focus-visible {
    outline: 3px solid var(--link) !important; outline-offset: 3px !important;
}
.footer :is(a, button):focus-visible { outline-color: #fff !important; }

.legal-date { color: var(--muted); font-size: .9rem; margin-top: -.4em; }
.legal-contact { list-style: none; padding: 14px 18px; margin: 12px 0; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.legal-contact li { margin: 4px 0; }
.legal-table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: .92rem; display: block; overflow-x: auto; }
.legal-table th, .legal-table td { text-align: left; vertical-align: top; padding: 10px 12px; border: 1px solid var(--border); }
.legal-table th { background: var(--surface); color: var(--heading); }
.prose code { font-size: .9em; padding: 1px 6px; border-radius: 6px; background: var(--surface); border: 1px solid var(--border); }
.form-notice { font-size: .88rem; color: var(--muted); margin: 6px 0 14px; }
.footer-legal { opacity: .9; }
.footer-link { background: none; border: 0; padding: 0; margin: 0; font: inherit; color: var(--footer-text); cursor: pointer; text-decoration: underline; }
.footer-link:hover { color: #fff; }
.stats-note { text-align: center; margin: 18px auto 0; font-size: .8rem; color: #c9d4ee; max-width: 640px; }

.cookie-note {
    position: fixed; left: 16px; right: 96px; bottom: 16px; z-index: 900; max-width: 640px; margin: 0;
    display: flex; align-items: center; gap: 16px; padding: 14px 18px; border-radius: 14px;
    background: var(--surface); color: var(--text); border: 1px solid var(--border); box-shadow: 0 14px 40px rgba(0, 0, 0, .35);
}
.cookie-note[hidden] { display: none; }
.cookie-note p { margin: 0; font-size: .9rem; }
.cookie-note .btn { flex: none; }
@media (max-width: 560px) { .cookie-note { flex-direction: column; align-items: stretch; right: 16px; bottom: 84px; } }

/* "Pausar animacoes" (botao do rodape): mesmo efeito de quem prefere menos movimento */
html[data-motion="off"] *, html[data-motion="off"] *::before, html[data-motion="off"] *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
html[data-motion="off"] .js .reveal { opacity: 1; transform: none; }
html[data-motion="off"] .toast { opacity: 1 !important; }
html[data-motion="off"] .scroll-progress { display: none; }

/* Paginas por assunto (/servicos) */
.crumbs { font-size: .9rem; color: var(--muted); margin-bottom: 14px; }
.crumbs a { color: var(--link); }
.for-list { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 10px; }
.for-list li { position: relative; padding-left: 28px; }
.for-list li::before { content: "\2713"; position: absolute; left: 0; top: 0; color: var(--ok); font-weight: 700; }
.card-link h2.card-title { color: var(--heading); font-size: 1.1rem; margin: 0 0 6px; }
.footer-col-title { font-weight: 700; display: block; margin-bottom: 4px; }
.card .card-more { margin-top: 10px; font-weight: 600; }
.card .card-more a { color: var(--link); }
.card-more-all { margin-top: 22px; color: var(--muted); }
.card-more-all a { color: var(--link); }
