/*
 * Site do QQPega. Cores da logo: chao petroleo escuro, ciano para informar e
 * pink para agir. Fontes do sistema (nada carregado de fora: a Politica diz que
 * o site nao fala com terceiros).
 */
:root {
    --bg: #041b22;
    --bg-alt: #06222a;
    --surface: #092a33;
    --surface-raised: #0f3a45;
    --stroke: #1b5a67;
    --ink: #f2fbfc;
    --ink-muted: #9cc2c8;
    --cyan: #4ee4e5;
    --pink: #ff6aa6;          /* texto e link sobre o escuro */
    --pink-action: #db1268;   /* fundo de botao: branco por cima passa de 4,5:1 */
    --pink-neon: #fe1e7e;     /* so brilho */
    --ok: #3ddc97;
    --danger: #ff7355;
    --radius: 18px;
    --wrap: 1080px;
    color-scheme: dark;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background:
        radial-gradient(1100px 600px at 8% -10%, rgba(1, 123, 146, 0.45), transparent 60%),
        radial-gradient(900px 500px at 105% 105%, rgba(11, 110, 126, 0.35), transparent 60%),
        var(--bg);
    background-attachment: fixed;
    color: var(--ink);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 17px;
    line-height: 1.65;
}

a { color: var(--cyan); text-underline-offset: 3px; }
a:hover { color: #9feff5; }
:focus-visible { outline: 3px solid var(--pink); outline-offset: 3px; border-radius: 6px; }

img { max-width: 100%; height: auto; }
code { background: var(--surface-raised); padding: 1px 6px; border-radius: 6px; font-size: 0.92em; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.muted { color: var(--ink-muted); }
.small { font-size: 0.88rem; }
.accent-pink { color: var(--pink); }

.skip {
    position: absolute; left: -999px; top: 8px; z-index: 10;
    background: var(--pink-action); color: #fff; padding: 8px 14px; border-radius: 10px;
}
.skip:focus { left: 12px; }

/* ---------- topo ---------- */
.topbar {
    position: sticky; top: 0; z-index: 5;
    background: rgba(4, 27, 34, 0.86);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(27, 90, 103, 0.6);
}
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 800; font-size: 1.15rem; }
.brand img { border-radius: 10px; }
.nav { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; margin: 0; padding: 0; }
.nav a {
    display: inline-block; padding: 8px 12px; border-radius: 999px;
    color: var(--ink-muted); text-decoration: none; font-weight: 600; font-size: 0.95rem;
}
.nav a:hover { color: var(--ink); background: var(--surface); }
.nav a[aria-current="page"] { color: var(--ink); background: var(--surface-raised); box-shadow: inset 0 0 0 1px var(--stroke); }

/* ---------- inicio ---------- */
.hero { padding: 56px 0 40px; }
.hero-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 32px; align-items: center; }
.hero h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); line-height: 1.12; margin: 8px 0 16px; letter-spacing: -0.5px; }
.lead { font-size: 1.15rem; color: var(--ink-muted); max-width: 34em; }
.eyebrow { text-transform: uppercase; letter-spacing: 1.6px; font-size: 0.78rem; font-weight: 800; color: var(--cyan); margin: 0; }
.hero-art { text-align: center; }
.hero-art img {
    width: min(320px, 70vw);
    filter: drop-shadow(-10px 0 30px rgba(78, 228, 229, 0.35)) drop-shadow(10px 0 30px rgba(254, 30, 126, 0.30));
}
.stores { display: flex; flex-wrap: wrap; gap: 12px; margin: 22px 0 10px; }
.store-btn {
    display: inline-flex; flex-direction: column; justify-content: center;
    min-width: 170px; min-height: 56px; padding: 6px 18px; border-radius: 14px;
    background: var(--pink-action); color: #fff; text-decoration: none; line-height: 1.2;
    box-shadow: 0 8px 24px rgba(219, 18, 104, 0.35);
}
.store-btn:hover { color: #fff; filter: brightness(1.08); }
.store-btn--soon { background: var(--surface); color: var(--ink-muted); box-shadow: inset 0 0 0 1px var(--stroke); cursor: default; }
.store-small { font-size: 0.75rem; }
.store-big { font-size: 1.1rem; font-weight: 800; }

.section { padding: 44px 0; }
.section--alt { background: rgba(6, 34, 42, 0.65); border-top: 1px solid rgba(27, 90, 103, 0.5); border-bottom: 1px solid rgba(27, 90, 103, 0.5); }
.section-title { font-size: 1.6rem; margin: 0 0 20px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.cards--two { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.card {
    background: linear-gradient(180deg, rgba(15, 58, 69, 0.9), rgba(9, 42, 51, 0.9));
    border: 1px solid var(--stroke);
    border-radius: var(--radius);
    padding: 20px;
}
.card h3 { margin: 0 0 6px; font-size: 1.12rem; }
.card p { margin: 0; color: var(--ink-muted); }

/* ---------- documentos ---------- */
.doc { max-width: 820px; padding-top: 40px; padding-bottom: 56px; }
.doc h1 { font-size: clamp(1.9rem, 4.5vw, 2.6rem); line-height: 1.15; margin: 6px 0 8px; }
.doc h2 { font-size: 1.35rem; margin: 36px 0 10px; padding-top: 8px; }
.doc section { scroll-margin-top: 80px; }
.doc ul, .doc ol { padding-left: 1.3em; }
.doc li { margin: 6px 0; }
.doc-head { border-bottom: 1px solid var(--stroke); padding-bottom: 18px; }

.toc {
    margin: 22px 0 8px; padding: 14px 20px;
    background: var(--surface); border: 1px solid var(--stroke); border-radius: var(--radius);
}
.toc ol { margin: 0; columns: 2; column-gap: 28px; }
.toc li { margin: 4px 0; break-inside: avoid; }

.table-wrap { overflow-x: auto; border: 1px solid var(--stroke); border-radius: var(--radius); margin: 14px 0; }
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; min-width: 560px; }
th, td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid rgba(27, 90, 103, 0.6); }
th { background: var(--surface-raised); font-weight: 800; }
tr:last-child td { border-bottom: none; }
td:first-child { font-weight: 700; white-space: nowrap; }

details {
    background: var(--surface); border: 1px solid var(--stroke); border-radius: 14px;
    padding: 4px 16px; margin: 10px 0;
}
summary { cursor: pointer; font-weight: 700; padding: 10px 0; }
details[open] summary { color: var(--cyan); }
details p { margin-top: 0; color: var(--ink-muted); }

/* ---------- formulario ---------- */
.form {
    display: grid; gap: 8px;
    background: var(--surface); border: 1px solid var(--stroke); border-radius: var(--radius);
    padding: 20px; margin: 14px 0 8px;
}
.form label { font-weight: 700; margin-top: 8px; }
.form input[type="email"], .form input[type="text"], .form textarea {
    width: 100%; font: inherit; color: var(--ink);
    background: var(--bg-alt); border: 1px solid var(--stroke); border-radius: 12px; padding: 12px 14px;
}
.form input:focus, .form textarea:focus { border-color: var(--cyan); outline: none; box-shadow: 0 0 0 3px rgba(78, 228, 229, 0.25); }
.form fieldset { border: 1px solid var(--stroke); border-radius: 12px; padding: 10px 14px; margin: 10px 0 0; }
.form legend { font-weight: 700; padding: 0 6px; }
.form .radio, .form .check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; margin: 6px 0; }
.form .radio input, .form .check input { width: 20px; height: 20px; margin-top: 4px; accent-color: var(--pink-action); flex: none; }
.req { color: var(--pink); font-weight: 600; font-size: 0.9em; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.btn {
    justify-self: start; margin-top: 12px; min-height: 48px; padding: 0 26px;
    font: inherit; font-weight: 800; color: #fff; cursor: pointer;
    background: var(--pink-action); border: none; border-radius: 999px;
    box-shadow: 0 8px 22px rgba(219, 18, 104, 0.35);
}
.btn:hover { filter: brightness(1.08); }

.notice { border-radius: var(--radius); padding: 16px 20px; margin: 20px 0; border: 1px solid; }
.notice h2 { margin: 0 0 6px; font-size: 1.15rem; }
.notice p, .notice ul { margin: 0; }
.notice--ok { background: rgba(61, 220, 151, 0.10); border-color: rgba(61, 220, 151, 0.55); }
.notice--error { background: rgba(255, 115, 85, 0.10); border-color: rgba(255, 115, 85, 0.6); }

/* ---------- rodape ---------- */
.footer { border-top: 1px solid var(--stroke); background: rgba(4, 27, 34, 0.92); padding: 36px 0 24px; margin-top: 24px; }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 24px; }
.footer-title { font-size: 0.95rem; margin: 0 0 8px; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin: 6px 0; }
.footer-legal { margin-top: 20px; border-top: 1px solid rgba(27, 90, 103, 0.5); padding-top: 14px; }
.footer-legal p { margin: 4px 0; }

@media (max-width: 760px) {
    body { font-size: 16px; }
    .hero { padding-top: 32px; }
    .hero-grid { grid-template-columns: 1fr; }
    .hero-art { order: -1; }
    .hero-art img { width: 180px; }
    .toc ol { columns: 1; }
    .footer-grid { grid-template-columns: 1fr; }

    /* Tabelas viram blocos empilhados: no celular, colunas lado a lado
       obrigavam a rolar de lado para ler cada linha. */
    .table-wrap { border: none; overflow: visible; }
    table { min-width: 0; }
    table, tbody, tr, td { display: block; width: 100%; }
    thead { display: none; }
    tr { border: 1px solid var(--stroke); border-radius: var(--radius); margin: 0 0 12px; background: var(--surface); overflow: hidden; }
    td { border-bottom: none; padding: 6px 16px; }
    td:first-child { white-space: normal; background: var(--surface-raised); padding: 12px 16px; }
    td:not(:first-child)::before { display: block; font-size: 0.78rem; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: var(--cyan); }
    td:last-child { padding-bottom: 14px; }
    .t-dados td:nth-child(2)::before { content: "O que é"; }
    .t-dados td:nth-child(3)::before { content: "Quando"; }
    .t-bases td:nth-child(2)::before { content: "Base legal"; }
    .topbar-inner { padding-top: 8px; padding-bottom: 8px; }
    /* O topo fixo ocupa duas linhas no celular: o titulo da secao nao pode
       ficar escondido atras dele ao seguir um link do indice. */
    .doc section { scroll-margin-top: 130px; }
}

/* Celulares estreitos (360dp): o menu inteiro numa linha. */
@media (max-width: 400px) {
    .brand { font-size: 1.05rem; }
    .nav { gap: 0; }
    .nav a { padding: 8px 8px; font-size: 0.88rem; }
}
