/* =========================================================
   PONTE FINANCEIRA — Design tokens
   Paleta: tinta quase-preta + papel quase-branco + UM único acento
   (bronze/latão envelhecido) — alto contraste, editorial, sóbrio.
   Tipografia: Fraunces (display, editorial, peso forte) + Inter (texto/UI)
   Motivo assinatura: o arco da "ponte" ligando dívida -> liberdade,
   agora desenhado como traço técnico monocromático.
   ========================================================= */
:root {
    --ink:        #0B1520;
    --ink-2:      #14202C;
    --paper:      #FAFAF8;
    --paper-2:    #F1EEE7;
    --card:       #FFFFFF;
    --accent:       #8A6D3B;
    --accent-dark:  #6E5730;
    --accent-light: #C9B27E;
    /* Compatibilidade: o restante das regras abaixo usa --green/--gold —
       apontamos os dois para o único acento da marca, em vez de duas
       cores concorrentes. */
    --green:      var(--accent);
    --green-dark: var(--accent-dark);
    --gold:       var(--accent);
    --text:       #14181C;
    --text-muted: #5C5952;
    --line:       #E1DDD3;
    --on-dark:        #F5F1EA;
    --on-dark-muted:  #A9A499;
    --on-dark-faint:  #6E6A61;
    --on-dark-line:   rgba(245,241,234,.14);
    --radius:     2px;
    --shadow:     none;
    --font-display: 'Fraunces', Georgia, serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--text);
    background: var(--paper);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; border-radius: var(--radius); }
picture { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { padding: 0; margin: 0; list-style: none; }
.container { max-width: 1140px; margin: 0 auto; padding: 0 24px; }

.skip-link {
    position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--on-dark);
    padding: 10px 16px; z-index: 999;
}
.skip-link:focus { left: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

h1, h2, h3, h4 { font-family: var(--font-display); color: var(--ink); line-height: 1.1; margin: 0 0 .5em; }
h1 { font-size: clamp(2.6rem, 5.2vw, 4.2rem); font-weight: 800; letter-spacing: -.025em; }
h2 { font-size: clamp(1.6rem, 2.8vw, 2.1rem); font-weight: 700; letter-spacing: -.01em; }
h3 { font-size: 1.15rem; font-weight: 600; }
p { margin: 0 0 1em; color: var(--text); }
.lede { font-size: 1.15rem; color: var(--text-muted); max-width: 60ch; }

.eyebrow {
    display: inline-flex; align-items: center;
    font-size: .74rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
    color: var(--accent-dark);
}

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 14px 26px; border-radius: 2px; font-weight: 600; font-size: .92rem;
    letter-spacing: .01em;
    border: 1px solid transparent; cursor: pointer; transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.btn-primary { background: var(--accent); color: #FAFAF8; border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--on-dark); }
.btn-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.4); }
.btn-light:hover { background: #fff; color: var(--ink); border-color: #fff; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(250,250,248,.94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 16px 24px; }
.logo { display: flex; align-items: center; gap: 8px; color: var(--ink); }
.logo-img { display: block; height: 40px; width: auto; }

.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav ul { display: flex; gap: 26px; }
.site-nav a { font-size: .92rem; font-weight: 500; color: var(--text-muted); padding: 6px 0; border-bottom: 2px solid transparent; }
.site-nav a:hover, .site-nav a.active { border-color: var(--accent); color: var(--ink); }
.nav-cta { padding: 10px 20px; font-size: .86rem; }

.nav-toggle { display: none; flex-direction: column; justify-content: center; gap: 5px; width: 44px; height: 44px; background: none; border: none; cursor: pointer; }
.nav-toggle span { width: 22px; height: 2px; background: var(--ink); }

/* ---------- Hero / bridge motif ---------- */
.hero {
    position: relative; overflow: hidden;
    background: linear-gradient(180deg, var(--ink) 0%, var(--ink-2) 100%);
    color: var(--on-dark); padding: 96px 0 0;
}
.hero-inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; padding-bottom: 64px; }
.hero .eyebrow { color: var(--accent-light); }
.hero h1 { color: var(--on-dark); }
.hero h1 em { color: var(--accent-light); font-style: normal; }
.hero p.lede { color: var(--on-dark-muted); }
.hero-actions { display: flex; gap: 14px; margin-top: 28px; flex-wrap: wrap; }

.bridge-graphic { width: 100%; }
.bridge-graphic svg { width: 100%; height: auto; }

.bridge-divider { height: 1px; background: var(--on-dark-line); }

/* ---------- Pillars ---------- */
.section { padding: 88px 0; }
.section-head { max-width: 640px; margin-bottom: 48px; }
.pillars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); overflow: hidden; }
.pillar { background: var(--card); padding: 32px 26px; }
.pillar .num { font-family: var(--font-display); font-size: .85rem; color: var(--accent); font-weight: 700; }
.pillar h3 { margin-top: 10px; }
.pillar p { color: var(--text-muted); font-size: .95rem; margin: 0; }

/* ---------- Feature / simulator promo ---------- */
.feature { background: var(--card); border: 1px solid var(--line); padding: 56px; display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.feature img { border-radius: var(--radius); }

/* ---------- Cards de artigo ---------- */
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.post-card { position: relative; background: var(--card); border: 1px solid var(--line); overflow: hidden; display: flex; flex-direction: column; transition: border-color .15s ease; }
.post-card:hover { border-color: var(--accent); }
.post-card .thumb { aspect-ratio: 16/10; background: var(--paper-2); overflow: hidden; }
.post-card .thumb picture { width: 100%; height: 100%; }
.post-card .thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 0; }
.post-card-thumb-link { display: block; }
.post-card-body { padding: 20px 22px 24px; display: flex; flex-direction: column; flex: 1; }
/* "Stretched link": clicar em qualquer área vazia do card navega pelo
   título, sem precisar envolver o card inteiro num <a> (que quebraria
   com os pills de categoria, que também são <a>). */
.post-card-title-link { color: inherit; }
.post-card-title-link::after { content: ''; position: absolute; inset: 0; z-index: 1; }
.post-card-title-link:hover { color: var(--accent-dark); }
.post-cats { position: relative; z-index: 2; display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.post-cat { font-size: .68rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted); background: none; padding: 0; white-space: nowrap; transition: color .15s ease; }
a.post-cat:hover { color: var(--accent-dark); }
.post-card h3 { font-size: 1.08rem; margin-bottom: 8px; }
.post-card p { color: var(--text-muted); font-size: .92rem; flex: 1; }
.post-meta { display: flex; gap: 10px; font-size: .78rem; color: var(--text-muted); margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); letter-spacing: .02em; }

/* ---------- Paginação ---------- */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 48px; flex-wrap: wrap; }
.pagination a, .pagination span { min-width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border-radius: var(--radius); font-weight: 600; font-size: .9rem; border: 1px solid var(--line); background: var(--card); color: var(--text-muted); }
.pagination a:hover { border-color: var(--accent); color: var(--accent-dark); }
.pagination .current { background: var(--ink); color: var(--on-dark); border-color: var(--ink); }

/* ---------- Artigo individual ---------- */
.article-hero-img { width: 100%; max-height: 420px; object-fit: cover; border-radius: 0; }
.image-credit { font-size: .74rem; color: var(--text-muted); margin: 6px 0 0; letter-spacing: .01em; }
.image-credit a { color: var(--text-muted); text-decoration: underline; }
.article-header { background: var(--card); border-bottom: 1px solid var(--line); padding: 56px 0 32px; }
.breadcrumbs { font-size: .8rem; color: var(--text-muted); margin-bottom: 18px; letter-spacing: .02em; }
.breadcrumbs a { color: var(--accent-dark); }
.breadcrumbs span { margin: 0 6px; }
.breadcrumbs-light { color: var(--on-dark-muted); }
.breadcrumbs-light a { color: var(--accent-light); }
.article-header h1 { max-width: 38ch; font-size: clamp(2.1rem, 3.6vw, 3.1rem); }
.article-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; color: var(--text-muted); font-size: .86rem; margin-top: 18px; }
.article-byline { display: flex; align-items: center; gap: 10px; margin-top: 18px; font-size: .86rem; color: var(--text-muted); }
.article-byline a { color: var(--accent-dark); font-weight: 600; }
.author-avatar { border-radius: 50%; display: block; object-fit: cover; }
.author-avatar-placeholder { display: flex; align-items: center; justify-content: center; background: var(--ink); color: var(--on-dark); font-family: var(--font-display); font-weight: 600; }
.article-byline .author-avatar { width: 36px; height: 36px; font-size: .95rem; }
.author-avatar-lg { width: 56px; height: 56px; font-size: 1.4rem; flex-shrink: 0; }
.article-body { max-width: 680px; margin: 0 auto; padding: 56px 24px 40px; font-size: 1.05rem; }
.article-body h2 { margin-top: 1.9em; scroll-margin-top: 96px; }
.article-body h3 { margin-top: 1.5em; scroll-margin-top: 96px; }
.article-body ul { list-style: disc; padding-left: 1.3em; margin-bottom: 1em; }
.article-body ul li { margin-bottom: .4em; }
.article-body .callout { background: var(--paper-2); border: 1px solid var(--line); border-left: 3px solid var(--accent); padding: 18px 22px; margin: 1.6em 0; font-size: .92rem; }
.article-body table { width: 100%; border-collapse: collapse; margin: 1.4em 0; font-size: .92rem; }
.article-body table th, .article-body table td { text-align: left; padding: 10px 14px; border: 1px solid var(--line); }
.article-body table th { background: var(--paper-2); color: var(--ink); font-family: var(--font-body); font-weight: 600; }
.article-body table td:first-child { font-weight: 500; color: var(--ink); }
.article-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); }
.article-tags a { font-size: .76rem; letter-spacing: .04em; color: var(--text-muted); border: 1px solid var(--line); padding: 6px 13px; transition: border-color .15s ease, color .15s ease; }
.article-tags a:hover { border-color: var(--accent); color: var(--accent-dark); }
.author-box { display: flex; gap: 16px; align-items: center; margin-top: 40px; padding: 20px; background: var(--paper-2); border: 1px solid var(--line); }
.author-box-name { margin: 0 0 4px; font-weight: 600; color: var(--ink); font-size: .95rem; }
.author-box-name a { color: var(--accent-dark); }
.author-box-bio { margin: 0; font-size: .85rem; color: var(--text-muted); }
.article-cta { max-width: 680px; margin: 0 auto 32px; padding: 0 24px; }
.article-cta-newsletter { margin-bottom: 64px; }
.article-cta .box { background: var(--ink); color: var(--on-dark); padding: 34px; display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.article-cta h3 { color: var(--on-dark); margin: 0 0 4px; }
.article-cta p { color: var(--on-dark-muted); margin: 0; }

/* ---------- Autor (página /autor/[slug]) ---------- */
.author-bio-card { display: flex; gap: 24px; align-items: flex-start; background: var(--card); border: 1px solid var(--line); padding: 32px; margin-bottom: 8px; }
.author-photo { border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.author-photo-placeholder { display: flex; align-items: center; justify-content: center; width: 88px; height: 88px; background: var(--ink); color: var(--on-dark); font-family: var(--font-display); font-size: 2rem; font-weight: 600; }
.author-credentials { font-size: .85rem; color: var(--text-muted); margin-top: 8px; }

/* ---------- Newsletter ---------- */
.newsletter-box { background: var(--ink); color: var(--on-dark); padding: 40px; display: flex; justify-content: space-between; align-items: center; gap: 32px; flex-wrap: wrap; }
.newsletter-box h3 { color: var(--on-dark); margin: 8px 0 6px; }
.newsletter-box p { color: var(--on-dark-muted); margin: 0; max-width: 46ch; }
.newsletter-copy { flex: 1; min-width: 240px; }
.newsletter-form { display: flex; gap: 10px; flex-wrap: wrap; }
.newsletter-form input[type="email"] { padding: 13px 16px; border-radius: var(--radius); border: 1px solid var(--on-dark-line); background: rgba(255,255,255,.06); color: var(--on-dark); font-family: var(--font-body); font-size: .92rem; min-width: 220px; }
.newsletter-form input[type="email"]::placeholder { color: var(--on-dark-faint); }
.newsletter-success { color: var(--accent-light); font-weight: 600; margin: 0; }
.newsletter-error { color: #E8A79A; font-size: .85rem; width: 100%; margin: 8px 0 0; }

/* ---------- Alternância de fundo entre seções (respiro visual) ---------- */
.section-tinted { background: var(--paper-2); }

/* ---------- Listas de páginas simples (sobre, contato, calculadoras, downloads) ---------- */
.page-header { background: var(--ink); color: var(--on-dark); padding: 72px 0 60px; text-align: center; }
.page-header .eyebrow { color: var(--accent-light); justify-content: center; }
.page-header h1 { color: var(--on-dark); }
.page-header p { color: var(--on-dark-muted); max-width: 56ch; margin: 12px auto 0; }

.tool-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.tool-card { background: var(--card); border: 1px solid var(--line); padding: 30px; }
.tool-card .icon { width: 44px; height: 44px; border: 1px solid var(--line); color: var(--accent-dark); display: flex; align-items: center; justify-content: center; margin-bottom: 18px; }
.tool-card h3 { margin-bottom: 8px; }
.tool-card p { color: var(--text-muted); font-size: .92rem; margin-bottom: 18px; }

.download-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-bottom: 64px; }
.download-card { display: flex; align-items: center; gap: 18px; background: var(--card); border: 1px solid var(--line); padding: 24px; }
.download-card .file-icon { width: 44px; height: 44px; border: 1px solid var(--line); color: var(--accent-dark); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.download-card h3 { margin: 0 0 4px; font-size: 1rem; }
.download-card p { margin: 0; font-size: .85rem; color: var(--text-muted); }

.faq { max-width: 760px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid var(--line); padding: 20px 0; }
.faq-item summary { cursor: pointer; font-weight: 600; color: var(--ink); list-style: none; display: flex; justify-content: space-between; align-items: center; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; font-size: 1.4rem; color: var(--accent); }
.faq-item[open] summary::after { content: '−'; }
.faq-item p { margin-top: 12px; color: var(--text-muted); }

.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-bottom: 56px; }
.about-card { background: var(--card); border: 1px solid var(--line); padding: 34px; }
.about-card h2 { font-size: 1.3rem; }

.contact-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.contact-form { background: var(--card); border: 1px solid var(--line); padding: 34px; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 6px; color: var(--ink); }
.form-group input, .form-group textarea {
    width: 100%; padding: 12px 14px; border-radius: var(--radius); border: 1px solid var(--line);
    font-family: var(--font-body); font-size: .95rem; background: var(--paper);
}
.form-group textarea { min-height: 130px; resize: vertical; }
.form-note { font-size: .8rem; color: var(--text-muted); margin-top: 14px; }
.contact-points { display: flex; flex-direction: column; gap: 22px; }
.contact-point { display: flex; gap: 14px; align-items: flex-start; }
.contact-point .icon { width: 40px; height: 40px; border: 1px solid var(--line); color: var(--accent-dark); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.contact-point h3 { font-size: 1rem; margin-bottom: 4px; }
.contact-point p { color: var(--text-muted); font-size: .92rem; margin: 0; }
.form-success { background: var(--paper-2); border: 1px solid var(--accent-light); color: var(--accent-dark); padding: 16px 18px; border-radius: var(--radius); margin-bottom: 20px; font-size: .92rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: var(--on-dark-muted); padding-top: 64px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding-bottom: 48px; }
.footer-brand .logo { margin-bottom: 14px; }
.footer-brand .logo-img-footer { height: 48px; background: #fff; padding: 6px 10px; border-radius: var(--radius); }
.footer-brand p { color: var(--on-dark-muted); max-width: 34ch; }
.footer-disclaimer { font-size: .82rem; color: var(--on-dark-faint); margin-top: 16px; }
.footer-col h3 { color: var(--on-dark); font-family: var(--font-body); font-size: .76rem; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 16px; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col a { color: var(--on-dark-muted); font-size: .9rem; }
.footer-col a:hover { color: var(--on-dark); }
.footer-fineprint { font-size: .8rem; color: var(--on-dark-faint); margin-top: 14px; }
.footer-bottom { border-top: 1px solid var(--on-dark-line); padding: 20px 0; }
.footer-bottom-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-size: .8rem; color: var(--on-dark-faint); }
.footer-motto { letter-spacing: .12em; }
.footer-legal-links { display: flex; gap: 10px; align-items: center; font-size: .78rem; color: var(--on-dark-faint); padding-top: 10px; }
.footer-legal-links a { color: var(--on-dark-muted); }
.footer-legal-links a:hover { color: var(--on-dark); }

/* ---------- Banner de cookies ---------- */
.cookie-banner {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 200;
    background: var(--ink); color: var(--on-dark);
    border-top: 1px solid var(--on-dark-line);
}
.cookie-banner-inner {
    max-width: 1180px; margin: 0 auto; padding: 16px 24px;
    display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
}
.cookie-banner-inner p { margin: 0; font-size: .88rem; color: var(--on-dark-muted); max-width: 70ch; }
.cookie-banner-inner a { color: var(--on-dark); text-decoration: underline; }
.cookie-banner-inner .btn { flex-shrink: 0; }

/* ---------- Responsivo ---------- */
@media (max-width: 900px) {
    .hero-inner { grid-template-columns: 1fr; padding-bottom: 40px; }
    .pillars { grid-template-columns: repeat(2, 1fr); }
    .feature { grid-template-columns: 1fr; padding: 34px; }
    .post-grid { grid-template-columns: repeat(2, 1fr); }
    .tool-grid { grid-template-columns: repeat(2, 1fr); }
    .about-grid, .contact-wrap { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .author-bio-card { flex-direction: column; }
    .newsletter-box { padding: 32px; }
    .newsletter-form { width: 100%; }
    .newsletter-form input[type="email"] { flex: 1; }
}
@media (max-width: 640px) {
    .site-nav { position: fixed; inset: 72px 0 0 0; background: var(--paper); flex-direction: column; align-items: stretch; padding: 24px; transform: translateX(100%); transition: transform .25s ease; }
    .site-nav.open { transform: translateX(0); }
    .site-nav ul { flex-direction: column; gap: 4px; }
    .site-nav ul a { display: block; padding: 12px 4px; }
    .nav-toggle { display: flex; }
    .nav-cta { margin-top: 16px; }
    .post-grid { grid-template-columns: 1fr; }
    .tool-grid { grid-template-columns: 1fr; }
    .download-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .footer-bottom-inner { flex-direction: column; }
    .cookie-banner-inner { flex-direction: column; align-items: stretch; text-align: center; }
}

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