/*
 * Design compartilhado das páginas secundárias da landing (#622): delete_account.html,
 * privacy_policy.html e terms_of_use.html. A referência visual é o index.html.
 *
 * Os tokens do :root são CÓPIA dos do index.html (o test_landing_secondary_pages.py falha se
 * divergirem). Ao mudar este arquivo, suba o ?v= de <link href="site.css?v=N"> nas três páginas
 * para o navegador não usar a cópia em cache.
 */
:root {
    --ink:        #0b1014;
    --ink-2:      #11171b;
    --ink-3:      #161d22;
    --surface:    #1a2228;
    --surface-2:  #212a31;
    --paper:      #ece4d3;
    --paper-2:    #d8cfba;
    --paper-dim:  #b6ad99;
    --muted:      #7a766c;
    --rule:       rgba(201, 163, 106, 0.16);
    --rule-strong:rgba(201, 163, 106, 0.38);
    --gold:       #c9a36a;
    --gold-soft:  #b89366;
    --gold-glow:  #e2c188;
    --positive:   #6fa784;
    --negative:   #c97070;
    --whatsapp:   #25d366;

    --serif:  'Fraunces', 'Times New Roman', serif;
    --sans:   'Manrope', system-ui, -apple-system, sans-serif;
    --mono:   'JetBrains Mono', ui-monospace, 'SF Mono', monospace;

    --container: 1240px;
}

:root { --nav-offset: 88px; --reading: 46rem; }

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

/* Header fixo: o alvo de uma âncora (ex.: privacy_policy.html#cookies) não fica escondido atrás dele. */
[id] { scroll-margin-top: var(--nav-offset); }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
    font-family: var(--sans);
    background: var(--ink);
    color: var(--paper);
    line-height: 1.55;
    font-size: 16px;
    font-weight: 400;
    overflow-x: hidden;
    background-image:
        radial-gradient(ellipse 80% 50% at 50% -10%, rgba(201, 163, 106, 0.07), transparent 70%),
        linear-gradient(var(--ink), var(--ink));
}

/* Mesmo grão de papel da home */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    opacity: 0.035;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.92 0 0 0 0 0.84 0 0 0 0 0.7 0 0 0 0.6 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
::selection { background: var(--gold); color: var(--ink); }
a:focus-visible { outline: 2px solid var(--gold-glow); outline-offset: 2px; }

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 2;
}
.container-reading { max-width: calc(var(--reading) + 4rem); }

.eyebrow {
    font-family: var(--mono);
    font-size: 0.72rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--gold);
    font-weight: 500;
}

/* ─── NAVEGAÇÃO (mesma marca da home; volta para a home) ─── */
nav {
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 1.1rem 0;
    background: rgba(11, 16, 20, 0.92);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    border-bottom: 1px solid var(--rule);
}
nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}
.brand {
    display: flex; align-items: center; gap: 0.7rem;
    font-family: var(--serif);
    font-weight: 500;
    font-variation-settings: "opsz" 24, "WONK" 0;
    font-size: 1.45rem;
    letter-spacing: -0.015em;
    color: var(--paper);
}
.brand-mark {
    width: 34px; height: 34px;
    border-radius: 6px;
    background: var(--paper);
    padding: 4px;
    object-fit: contain;
    box-shadow: 0 0 0 1px var(--rule-strong), 0 4px 14px rgba(0,0,0,.4);
}
.brand-text { display: inline-flex; align-items: baseline; }
.brand-text::after { content: '.'; color: var(--gold); margin-left: 1px; }
.nav-links {
    display: flex;
    gap: 2.4rem;
    align-items: center;
    list-style: none;
}
.nav-links a {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--paper-2);
    transition: color 0.25s;
}
.nav-links a:hover { color: var(--paper); }
.nav-back {
    font-family: var(--mono);
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.55rem 1.1rem;
    border: 1px solid var(--rule-strong);
    border-radius: 2px;
    white-space: nowrap;
    transition: all 0.3s;
}
.nav-links a.nav-back { color: var(--paper); }
.nav-back:hover {
    background: var(--gold);
    color: var(--ink) !important;
    border-color: var(--gold);
}

/* ─── CABEÇALHO DA PÁGINA ─── */
.page-head {
    padding: 4.5rem 0 2.5rem;
    border-bottom: 1px solid var(--rule);
    margin-bottom: 3rem;
}
.page-head .eyebrow {
    display: flex; align-items: center; gap: 0.8rem;
    margin: 0 0 1.6rem;
    font-size: 0.72rem;
    line-height: 1.4;
    color: var(--gold);
    max-width: none;
}
.page-head .eyebrow::before { content: ''; width: 48px; height: 1px; background: var(--gold); }
.page-head h1 {
    font-family: var(--serif);
    font-weight: 400;
    font-variation-settings: "opsz" 96, "SOFT" 0, "WONK" 0;
    font-size: clamp(2.4rem, 7vw, 4rem);
    letter-spacing: -0.025em;
    line-height: 1.05;
    color: var(--paper);
}
.page-head p {
    margin-top: 1.2rem;
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--paper-2);
    max-width: 50ch;
}
.page-head .last-updated {
    margin-top: 1.4rem;
    font-family: var(--mono);
    font-size: 0.74rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

/* ─── TEXTO DE LEITURA (políticas, termos e instruções) ─── */
main { position: relative; z-index: 2; padding-bottom: 5rem; }
.prose { max-width: var(--reading); }
.prose h2 {
    font-family: var(--serif);
    font-weight: 400;
    font-variation-settings: "opsz" 24, "WONK" 0;
    font-size: clamp(1.5rem, 3.2vw, 1.95rem);
    line-height: 1.15;
    letter-spacing: -0.015em;
    color: var(--paper);
    margin: 3.2rem 0 1.2rem;
    padding-bottom: 0.7rem;
    border-bottom: 1px solid var(--rule);
}
.prose > h2:first-child, .prose > :first-child h2:first-child { margin-top: 0; }
.prose h3 {
    font-size: 1.08rem;
    font-weight: 600;
    color: var(--paper);
    margin: 2rem 0 0.7rem;
}
.prose h4 {
    font-size: 0.98rem;
    font-weight: 600;
    color: var(--paper);
    margin: 0 0 0.5rem;
}
.prose p, .prose li { color: var(--paper-2); line-height: 1.75; }
.prose p { margin-bottom: 1rem; }
.prose strong { color: var(--paper); font-weight: 600; }
.prose ul, .prose ol { margin: 0 0 1.1rem; padding-left: 1.4rem; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li { margin-bottom: 0.45rem; }
.prose li::marker { color: var(--gold); }
.prose a {
    color: var(--gold-glow);
    text-decoration: underline;
    text-decoration-color: var(--rule-strong);
    text-underline-offset: 3px;
    /* URL longa como texto do link (ex.: myaccount.google.com/permissions) não estoura 320 px */
    overflow-wrap: anywhere;
}
.prose a:hover { text-decoration-color: var(--gold-glow); }
.prose code {
    font-family: var(--mono);
    font-size: 0.86em;
    padding: 0.1rem 0.4rem;
    background: var(--surface);
    border: 1px solid var(--rule);
    border-radius: 3px;
    color: var(--paper);
    overflow-wrap: anywhere;
}
.prose table {
    width: 100%;
    border-collapse: collapse;
    margin: 0.4rem 0 1.4rem;
    font-size: 0.92rem;
}
.prose th, .prose td {
    text-align: left;
    vertical-align: top;
    padding: 0.7rem 0.8rem;
    border: 1px solid var(--rule);
    color: var(--paper-2);
    line-height: 1.55;
    overflow-wrap: anywhere;
}
.prose th {
    background: var(--ink-3);
    color: var(--gold);
    font-family: var(--mono);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

/* Quadros de destaque: painel escuro com fio lateral na cor do significado */
.highlight-box, .info-box, .warning-box, .danger-box, .contact-box {
    margin: 1.6rem 0;
    padding: 1.2rem 1.4rem;
    background: var(--ink-3);
    border: 1px solid var(--rule);
    border-left: 3px solid var(--gold);
    border-radius: 3px;
}
.highlight-box, .success-box { border-left-color: var(--positive); }
.warning-box { border-left-color: var(--gold-glow); }
.danger-box { border-left-color: var(--negative); }
.contact-box { border-left-color: var(--rule-strong); }
.highlight-box h3, .highlight-box h4, .success-box h3 { color: var(--positive); }
.warning-box h3, .warning-box h4 { color: var(--gold-glow); }
.danger-box h3, .danger-box h4 { color: var(--negative); }
.info-box h3, .info-box h4 { color: var(--gold); }
.prose .highlight-box h3, .prose .info-box h3, .prose .warning-box h3, .prose .danger-box h3 { margin-top: 0; }
.highlight-box > :last-child, .info-box > :last-child, .warning-box > :last-child,
.danger-box > :last-child, .contact-box > :last-child { margin-bottom: 0; }

/* delete_account.html: passos da exclusão pelo WhatsApp */
.steps { margin-top: 2.4rem; }
.step {
    display: flex;
    gap: 1.2rem;
    align-items: flex-start;
    margin-bottom: 1.8rem;
}
.step-number {
    flex-shrink: 0;
    width: 2.4rem; height: 2.4rem;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid var(--gold);
    border-radius: 50%;
    font-family: var(--mono);
    font-size: 0.9rem;
    color: var(--gold-glow);
}
.step-content { flex: 1; min-width: 0; }
.step-content h4 { font-size: 1.02rem; margin-top: 0.4rem; }
.step-content p { margin-bottom: 0.4rem; }
.command-box {
    margin: 0.7rem 0 0.4rem;
    padding: 0.85rem 1rem;
    background: var(--surface);
    border: 1px solid var(--rule-strong);
    border-radius: 3px;
    font-family: var(--mono);
    font-size: 1rem;
    color: var(--gold-glow);
}
.prose .command-hint { font-size: 0.88rem; color: var(--paper-dim); }

/* ─── RODAPÉ (o mesmo da home) ─── */
footer {
    position: relative;
    z-index: 2;
    border-top: 1px solid var(--rule);
    padding: 4rem 0 2rem;
    background: var(--ink-2);
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}
.footer-brand-block .brand { margin-bottom: 1rem; font-size: 1.3rem; }
.footer-brand-block p {
    font-size: 0.9rem;
    color: var(--paper-dim);
    max-width: 38ch;
    line-height: 1.65;
}
.footer-col h2 {
    font-family: var(--mono);
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 1.2rem;
    font-weight: 500;
}
.footer-col ul { display: flex; flex-direction: column; gap: 0.7rem; list-style: none; }
.footer-col a {
    font-size: 0.92rem;
    color: var(--paper-dim);
    transition: color 0.25s;
}
.footer-col a:hover, .footer-col a[aria-current="page"] { color: var(--gold-glow); }
.footer-bottom {
    display: flex;
    justify-content: space-between;
    padding-top: 2rem;
    border-top: 1px solid var(--rule);
    font-family: var(--mono);
    font-size: 0.74rem;
    letter-spacing: 0.04em;
    color: var(--muted);
    flex-wrap: wrap;
    gap: 1rem;
}
.footer-bottom .heart { color: var(--negative); }
/* Identificação da pessoa jurídica que opera o FinanBot: fica em todas as páginas. */
.footer-legal {
    margin-top: 1.1rem;
    font-family: var(--mono);
    font-size: 0.7rem;
    line-height: 1.7;
    letter-spacing: 0.03em;
    color: var(--muted);
}
.footer-legal a { color: var(--paper-dim); text-decoration: underline; text-underline-offset: 2px; }
.footer-legal a:hover { color: var(--gold-glow); }

/* ─── RESPONSIVO ─── */
@media (max-width: 1024px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
    .container { padding: 0 1.4rem; }
    .nav-links li:not(:last-child) { display: none; }
    .page-head { padding: 3rem 0 2rem; margin-bottom: 2.2rem; }
    .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
    .highlight-box, .info-box, .warning-box, .danger-box, .contact-box { padding: 1rem 1.1rem; }
    .step { gap: 0.9rem; }
    .step-number { width: 2rem; height: 2rem; font-size: 0.8rem; }
}
@media (max-width: 360px) {
    .brand { font-size: 1.3rem; gap: 0.55rem; }
    .nav-back { padding: 0.5rem 0.8rem; }
    .prose th, .prose td { padding: 0.55rem 0.5rem; font-size: 0.85rem; }
}
