/* Layout: página acadêmica limpa; a "folha ABNT" anotada é a assinatura visual da marca.
   Cores em tokens; tema escuro via prefers-color-scheme e data-theme. */
:root {
  --paper: #f6f8fa;
  --surface: #ffffff;
  --ink: #13263a;
  --ink-soft: #46586b;
  --line: #d9e1e8;
  --teal: #1d6b73;
  --teal-strong: #14545b;
  --mark: #ffb21a;          /* marca-texto */
  --mark-ink: #13263a;
  --wa: #1f8f4e;
  --wa-ink: #ffffff;
  --danger: #b42318;
  --shadow: 0 1px 2px rgba(19, 38, 58, .06), 0 8px 24px rgba(19, 38, 58, .06);
  --font-display: "Newsreader", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-body: "Instrument Sans", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --radius: 10px;
  --wrap: 1120px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0e1924; --surface: #142332; --ink: #e6edf3; --ink-soft: #a7b6c4;
    --line: #26394b; --teal: #5fb7bf; --teal-strong: #8fd0d6; --mark: #f5a623; --mark-ink: #13263a;
    --wa: #25a35a; --wa-ink: #ffffff; --danger: #ff8a7a; --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0e1924; --surface: #142332; --ink: #e6edf3; --ink-soft: #a7b6c4;
  --line: #26394b; --teal: #5fb7bf; --teal-strong: #8fd0d6; --mark: #f5a623; --mark-ink: #13263a;
  --wa: #25a35a; --wa-ink: #ffffff; --danger: #ff8a7a; --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--font-body); font-size: 1.0625rem; line-height: 1.65;
}
img { max-width: 100%; height: auto; }
a { color: var(--teal); text-underline-offset: .18em; }
a:hover { color: var(--teal-strong); }
:focus-visible { outline: 3px solid var(--mark); outline-offset: 2px; border-radius: 4px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--mark); color: var(--mark-ink); padding: .5rem 1rem; z-index: 50; }
.skip:focus { left: 1rem; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: 20px; }
.prose { max-width: 68ch; }
.prose > * + * { margin-top: 1rem; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.15; text-wrap: balance; margin: 0; letter-spacing: -.01em; }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); }
h3 { font-size: 1.3rem; }
p { margin: 0; }
.eyebrow { font-size: .78rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--teal); }
.lead { font-size: 1.2rem; color: var(--ink-soft); max-width: 60ch; }
mark, .hl { background: linear-gradient(transparent 62%, var(--mark) 62%, var(--mark) 94%, transparent 94%); color: inherit; padding: 0 .1em; }

/* Header */
.site-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 68px; }
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--ink); }
.brand img { height: 40px; width: auto; }
.brand-name { font-family: var(--font-display); font-size: 1.3rem; font-weight: 600; line-height: 1; }
.brand-name em { font-style: italic; color: var(--teal); }
.nav { display: flex; align-items: center; gap: 1.4rem; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 500; font-size: .98rem; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--teal); }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 8px; padding: .45rem .7rem; color: var(--ink); font: inherit; cursor: pointer; }
@media (max-width: 880px) {
  .nav-toggle { display: inline-flex; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 0; background: var(--surface); border-bottom: 1px solid var(--line); padding: .5rem 20px 1rem; }
  .nav.open { display: flex; }
  .nav a { padding: .7rem 0; border-bottom: 1px solid var(--line); }
  .nav .btn { margin-top: .8rem; justify-content: center; }
}

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: .5rem; padding: .8rem 1.25rem; border-radius: 999px; font-weight: 600; text-decoration: none; border: 1.5px solid transparent; cursor: pointer; font: inherit; font-weight: 600; line-height: 1.2; }
.btn-primary, .nav .btn-primary { background: var(--teal); color: var(--surface); }
.btn-primary:hover, .nav .btn-primary:hover { background: var(--teal-strong); color: var(--surface); }
.btn-wa { background: var(--wa); color: var(--wa-ink); }
.btn-wa:hover { filter: brightness(1.08); color: var(--wa-ink); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: var(--surface); }
.btn-ghost:hover { border-color: var(--teal); color: var(--teal); }
.btn svg { width: 1.15em; height: 1.15em; flex: none; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; }

/* Sections */
.section { padding-block: clamp(3rem, 7vw, 5.5rem); }
.section-alt { background: var(--surface); border-block: 1px solid var(--line); }
.section-head { display: grid; gap: .75rem; margin-bottom: 2.25rem; max-width: 62ch; }

/* Hero */
.hero { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.hero .wrap { display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero-copy { display: grid; gap: 1.4rem; min-width: 0; }
.hero-proof { display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; color: var(--ink-soft); font-size: .95rem; padding: 0; margin: 0; list-style: none; }
.hero-proof li::before { content: "✓"; color: var(--teal); font-weight: 700; margin-right: .4rem; }
@media (max-width: 880px) { .hero .wrap { grid-template-columns: 1fr; } }

/* Painel com todos os serviços (topo da home) */
.svc-panel { --pfg: var(--paper); background: var(--ink); color: var(--pfg); border-radius: 18px; padding: clamp(1.4rem, 3vw, 2rem); display: grid; gap: 1.1rem; box-shadow: var(--shadow); min-width: 0; }
.svc-panel-title { font-size: clamp(1.25rem, 2.2vw, 1.55rem); color: var(--pfg); }
.svc-group { display: grid; gap: .55rem; }
.svc-group h3 { font-family: var(--font-body); font-size: .74rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--mark); }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .45rem; }
.chips a { display: inline-block; padding: .45rem .85rem; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--pfg) 28%, transparent); color: var(--pfg); text-decoration: none; font-weight: 500; font-size: .93rem; line-height: 1.2; transition: background .15s, border-color .15s, color .15s; }
.chips a:hover, .chips a:focus-visible { background: var(--mark); border-color: var(--mark); color: var(--mark-ink); }
.svc-panel-note { font-size: .85rem; color: color-mix(in srgb, var(--pfg) 72%, transparent); }
:root[data-theme="dark"] .svc-panel { --pfg: var(--ink); background: var(--surface); border: 1px solid var(--line); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .svc-panel { --pfg: var(--ink); background: var(--surface); border: 1px solid var(--line); } }

/* Cards de serviço */
.grid { display: grid; gap: 1.25rem; }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 900px) { .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; display: grid; gap: .6rem; align-content: start; min-width: 0; }
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a:hover { color: var(--teal); }
.card p { color: var(--ink-soft); }
.card .more { font-weight: 600; text-decoration: none; margin-top: .3rem; }
.card-icon { width: 40px; height: 40px; color: var(--teal); }

/* Etapas */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.25rem; counter-reset: s; }
.steps li { align-content: start; counter-increment: s; border-top: 2px solid var(--ink); padding-top: 1rem; display: grid; gap: .4rem; min-width: 0; }
.steps li::before { content: "Etapa " counter(s); font-size: .78rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--teal); }
.steps p { color: var(--ink-soft); font-size: .98rem; }
@media (max-width: 880px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }

/* Compromisso */
.pledge { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
.pledge ul { margin: 0; padding-left: 1.2rem; display: grid; gap: .55rem; }
@media (max-width: 760px) { .pledge { grid-template-columns: 1fr; } }

/* FAQ */
.faq { display: grid; gap: .6rem; max-width: 820px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.25rem; }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--teal); font-weight: 700; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin-top: .6rem; color: var(--ink-soft); }

/* CTA */
.cta { background: var(--ink); color: var(--paper); border-radius: 16px; padding: clamp(2rem, 5vw, 3.25rem); display: grid; grid-template-columns: 1.4fr auto; gap: 1.5rem; align-items: center; }
.cta h2 { color: var(--paper); }
.cta p { color: color-mix(in srgb, var(--paper) 80%, transparent); margin-top: .5rem; }
@media (max-width: 760px) { .cta { grid-template-columns: 1fr; } }

/* Páginas internas */
.page-head { padding-block: clamp(2.25rem, 5vw, 3.5rem) 1.5rem; display: grid; gap: 1rem; }
.crumbs { font-size: .88rem; color: var(--ink-soft); display: flex; flex-wrap: wrap; gap: .35rem; }
.crumbs a { color: var(--ink-soft); }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: clamp(2rem, 5vw, 3.5rem); align-items: start; padding-bottom: 4rem; }
@media (max-width: 900px) { .layout { grid-template-columns: 1fr; } }
.aside { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 88px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; display: grid; gap: .9rem; }
.aside p { color: var(--ink-soft); font-size: .95rem; }
.article h2 { margin-top: 2.2rem; }
.article h3 { margin-top: 1.6rem; }
.article ul, .article ol { padding-left: 1.3rem; display: grid; gap: .4rem; }
.article table { border-collapse: collapse; width: 100%; font-size: .95rem; }
.table-scroll { overflow-x: auto; }
.article th, .article td { text-align: left; padding: .6rem .75rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.article th { font-weight: 600; }
.ref { font-family: var(--font-body); background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--teal); padding: .8rem 1rem; border-radius: 6px; font-size: .97rem; }
.meta { color: var(--ink-soft); font-size: .92rem; }

/* Blog */
.posts { display: grid; gap: 1.25rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 700px) { .posts { grid-template-columns: 1fr; } }
.post-card { border-top: 2px solid var(--ink); padding-top: 1rem; display: grid; gap: .5rem; min-width: 0; }
.post-card h2, .post-card h3 { font-size: 1.35rem; }
.post-card h2 a, .post-card h3 a { color: var(--ink); text-decoration: none; }
.post-card h2 a:hover, .post-card h3 a:hover { color: var(--teal); }
.post-card p { color: var(--ink-soft); }

/* Temas */
.toc { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.toc a { border: 1px solid var(--line); border-radius: 999px; padding: .35rem .85rem; text-decoration: none; color: var(--ink); background: var(--surface); font-size: .92rem; }
.toc a:hover { border-color: var(--teal); color: var(--teal); }
.area-block { scroll-margin-top: 90px; }

/* Formulário */
.form { display: grid; gap: 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.25rem, 3vw, 2rem); }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 620px) { .form .row { grid-template-columns: 1fr; } }
.field { display: grid; gap: .35rem; min-width: 0; }
.field label { font-weight: 600; font-size: .95rem; }
.field input, .field select, .field textarea { font: inherit; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: .7rem .8rem; width: 100%; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--teal); outline-offset: 0; border-color: var(--teal); }
.field small { color: var(--ink-soft); }
.check { display: flex; gap: .6rem; align-items: flex-start; font-size: .93rem; color: var(--ink-soft); }
.check input { margin-top: .3rem; }
.form-result { border: 1px solid var(--teal); background: color-mix(in srgb, var(--teal) 8%, var(--surface)); border-radius: var(--radius); padding: 1.25rem; display: grid; gap: .8rem; }
.form-error { color: var(--danger); font-weight: 600; }
.contact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .8rem; }
.contact-list strong { display: block; font-size: .85rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); }

/* Rodapé */
.site-footer { background: var(--surface); border-top: 1px solid var(--line); padding-block: 3rem 6rem; font-size: .95rem; color: var(--ink-soft); }
.site-footer .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2rem; }
@media (max-width: 820px) { .site-footer .cols { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .site-footer .cols { grid-template-columns: 1fr; } }
.site-footer h4 { margin: 0 0 .6rem; color: var(--ink); font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .4rem; }
.site-footer a { color: var(--ink-soft); text-decoration: none; }
.site-footer a:hover { color: var(--teal); }
.legal { border-top: 1px solid var(--line); margin-top: 2rem; padding-top: 1.25rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: .75rem; font-size: .88rem; }

/* Integridade acadêmica e aviso de cookies */
.integrity { margin: 2rem 0 0; padding: 1rem 1.25rem; border: 1px solid var(--line); border-radius: var(--radius); font-size: .9rem; max-width: 80ch; }
.cookie { position: fixed; left: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 40; max-width: 460px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1rem 1.1rem; display: grid; gap: .8rem; font-size: .92rem; }
.cookie .btn { padding: .55rem 1rem; }
@media (max-width: 620px) { .cookie { right: 16px; max-width: none; bottom: calc(86px + env(safe-area-inset-bottom, 0px)); } }

/* WhatsApp flutuante */
.wa-float { position: fixed; right: 18px; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); z-index: 30; display: inline-flex; align-items: center; gap: .5rem; background: var(--wa); color: var(--wa-ink); text-decoration: none; font-weight: 600; padding: .85rem 1.1rem; border-radius: 999px; box-shadow: 0 6px 20px rgba(0,0,0,.2); }
.wa-float:hover { color: var(--wa-ink); filter: brightness(1.08); }
.wa-float svg { width: 24px; height: 24px; }
@media (max-width: 520px) { .wa-float span { display: none; } .wa-float { padding: .9rem; } }

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