/* ============================================================
   Marcelo Esteves Advocacia — CSS estático (sem frameworks)
   Direção: sobriedade editorial. Verde-escuro, latão, papel marfim.
   ============================================================ */

:root {
  --background: oklch(0.985 0.008 92);
  --foreground: oklch(0.24 0.022 160);
  --paper: oklch(0.965 0.013 92);
  --card: oklch(1 0.004 92);
  --primary: oklch(0.315 0.045 163);
  --primary-foreground: oklch(0.975 0.012 92);
  --ink: oklch(0.215 0.032 164);
  --ink-foreground: oklch(0.965 0.013 92);
  --brass: oklch(0.7 0.098 76);
  --brass-foreground: oklch(0.22 0.03 70);
  --muted: oklch(0.945 0.016 92);
  --muted-foreground: oklch(0.475 0.022 160);
  --accent: oklch(0.925 0.028 90);
  --destructive: oklch(0.52 0.18 27);
  --border: oklch(0.885 0.018 92);
  --radius: 0.375rem;
  --font-display: "Fraunces", ui-serif, Georgia, serif;
  --font-sans: "Karla", ui-sans-serif, system-ui, sans-serif;
  --shadow-plate: 0 1px 2px oklch(0.25 0.03 160 / 0.06), 0 12px 32px -12px oklch(0.25 0.03 160 / 0.18);
  --shadow-lift: 0 2px 4px oklch(0.25 0.03 160 / 0.08), 0 24px 48px -16px oklch(0.25 0.03 160 / 0.28);
  --max: 72rem;
}

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

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

body {
  margin: 0;
  background-color: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  font-feature-settings: "kern", "liga";
  -webkit-font-smoothing: antialiased;
  display: flex;
  min-height: 100vh;
  flex-direction: column;
}

main {
  flex: 1;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.015em;
  margin: 0;
  line-height: 1.15;
}

p {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

::selection {
  background-color: var(--brass);
  color: var(--brass-foreground);
}

:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 2px;
}

/* ---------- utilitários de layout ---------- */
.wrap {
  margin-inline: auto;
  max-width: var(--max);
  padding-inline: 1.25rem;
}

@media (min-width: 1024px) {
  .wrap {
    padding-inline: 2rem;
  }
}

.section {
  padding-block: 4rem;
}

@media (min-width: 1024px) {
  .section {
    padding-block: 6rem;
  }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}

.eyebrow::before {
  content: "";
  display: block;
  width: 2rem;
  height: 1px;
  background-color: var(--brass);
}

.eyebrow.on-ink {
  color: var(--brass);
}

.muted {
  color: var(--muted-foreground);
}

.lead {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--muted-foreground);
  max-width: 42rem;
}

.pre-line {
  white-space: pre-line;
}

.skip-link {
  position: absolute;
  left: -9999px;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  z-index: 100;
  background: var(--card);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
}

/* ---------- botões ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 700;
  padding: 0.75rem 1.4rem;
  cursor: pointer;
  transition: background-color 0.18s ease, transform 0.18s ease, color 0.18s ease;
}

.btn-brass {
  background-color: var(--brass);
  color: var(--brass-foreground);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.75rem;
}

.btn-brass:hover {
  transform: translateY(-1px);
}

.btn-ink {
  background-color: var(--primary);
  color: var(--primary-foreground);
}

.btn-quiet {
  border-color: var(--border);
  background-color: transparent;
  color: var(--foreground);
}

.btn-quiet:hover {
  background-color: var(--accent);
}

.btn-quiet.on-ink {
  border-color: oklch(1 0 0 / 25%);
  color: var(--ink-foreground);
}

.btn-quiet.on-ink:hover {
  background-color: oklch(1 0 0 / 10%);
}

.btn-sm {
  padding: 0.5rem 0.9rem;
}

.btn-lg {
  padding: 0.9rem 1.6rem;
}

.btn[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.arrow {
  font-size: 1rem;
  line-height: 1;
}

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border);
  background-color: oklch(0.985 0.008 92 / 0.92);
  backdrop-filter: blur(8px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 1rem;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.125rem;
  display: block;
}

.brand-sub {
  display: block;
  margin-top: 0.125rem;
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  color: var(--muted-foreground);
}

.nav-desktop {
  display: none;
  align-items: center;
  gap: 2rem;
}

.nav-desktop a {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.nav-desktop a:hover,
.nav-desktop a[aria-current="page"] {
  color: var(--foreground);
}

.nav-desktop a[aria-current="page"] {
  font-weight: 700;
}

.nav-desktop .btn {
  color: var(--brass-foreground);
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: transparent;
  cursor: pointer;
  color: var(--foreground);
}

.nav-mobile {
  display: none;
  border-top: 1px solid var(--border);
  background-color: var(--background);
  padding: 0.5rem 1.25rem 1.25rem;
}

.nav-mobile.open {
  display: block;
}

.nav-mobile a {
  display: block;
  border-bottom: 1px solid var(--border);
  padding-block: 0.75rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.nav-mobile a[aria-current="page"] {
  color: var(--foreground);
  font-weight: 700;
}

.nav-mobile .btn {
  margin-top: 1rem;
  width: 100%;
}

@media (min-width: 768px) {
  .nav-desktop {
    display: flex;
  }
  .nav-toggle,
  .nav-mobile,
  .nav-mobile.open {
    display: none;
  }
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background-color: var(--ink);
  color: var(--ink-foreground);
}

.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.3;
}

.hero-veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, var(--ink), oklch(0.215 0.032 164 / 0.9) 45%, oklch(0.215 0.032 164 / 0.4));
}

.hero-inner {
  position: relative;
  padding-block: 6rem;
}

.hero h1 {
  margin-top: 1.5rem;
  max-width: 48rem;
  font-size: clamp(2.25rem, 6vw, 3.75rem);
  line-height: 1.08;
}

.hero .lead {
  margin-top: 1.5rem;
  color: oklch(0.965 0.013 92 / 0.78);
  max-width: 36rem;
}

.hero-actions {
  margin-top: 2.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero-stats {
  margin-top: 3.5rem;
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  max-width: 44rem;
  border-top: 1px solid oklch(1 0 0 / 15%);
  padding-top: 2rem;
}

.hero-stats dt {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--brass);
}

.hero-stats dd {
  margin: 0.25rem 0 0;
  font-size: 0.75rem;
  line-height: 1.6;
  color: oklch(0.965 0.013 92 / 0.65);
}

/* ---------- páginas internas ---------- */
.page-header {
  border-bottom: 1px solid var(--border);
  background-color: var(--paper);
}

.page-header .wrap {
  padding-block: 4rem;
}

.page-header h1 {
  margin-top: 1.25rem;
  max-width: 48rem;
  font-size: clamp(1.875rem, 4.5vw, 3rem);
  line-height: 1.12;
}

.page-header .lead {
  margin-top: 1.5rem;
}

.crumb {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted-foreground);
}

.crumb:hover {
  color: var(--foreground);
}

.section-head {
  max-width: 40rem;
}

.section-head h2 {
  margin-top: 1rem;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
}

.section-head p {
  margin-top: 1rem;
  color: var(--muted-foreground);
}

/* ---------- grade de áreas ---------- */
.area-grid {
  margin-top: 3rem;
  display: grid;
  gap: 1px;
  background-color: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
}

.area-card {
  display: flex;
  flex-direction: column;
  background-color: var(--card);
  padding: 2rem;
  transition: background-color 0.18s ease;
}

.area-card:hover {
  background-color: oklch(0.925 0.028 90 / 0.5);
}

.area-card h3 {
  margin-top: 1.25rem;
  font-size: 1.25rem;
}

.area-card p {
  margin-top: 0.75rem;
  flex: 1;
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--muted-foreground);
}

.area-card .more {
  margin-top: 1.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--primary);
}

.area-card.cta {
  background-color: var(--paper);
  justify-content: center;
}

.mark {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--brass);
  line-height: 1;
}

/* lista de áreas (/areas) */
.area-list {
  border-block: 1px solid var(--border);
}

.area-list li + li {
  border-top: 1px solid var(--border);
}

.area-list a {
  display: grid;
  gap: 1.5rem;
  padding-block: 2.5rem;
  transition: background-color 0.18s ease;
}

.area-list a:hover {
  background-color: oklch(0.925 0.028 90 / 0.4);
}

.area-list h2 {
  font-size: 1.5rem;
}

.area-list .count {
  margin-top: 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--brass);
}

.area-list p {
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--muted-foreground);
  max-width: 42rem;
}

.area-list .more {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--primary);
}

@media (min-width: 1024px) {
  .area-list a {
    grid-template-columns: 16rem 1fr auto;
    align-items: start;
    padding-inline: 1rem;
  }
}

/* ---------- conteúdo de área ---------- */
.content-grid {
  display: grid;
  gap: 4rem;
  padding-block: 4rem;
}

@media (min-width: 1024px) {
  .content-grid {
    grid-template-columns: 1fr 20rem;
  }
}

.prose {
  max-width: 42rem;
}

.prose section {
  margin-bottom: 3rem;
}

.prose h2 {
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.prose p {
  margin-bottom: 1rem;
  line-height: 1.75;
  color: var(--muted-foreground);
}

.checklist {
  margin-top: 1.25rem;
  display: grid;
  gap: 0.75rem;
}

.checklist li {
  display: flex;
  gap: 0.75rem;
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--muted-foreground);
}

.checklist li::before {
  content: "";
  margin-top: 0.55rem;
  width: 0.375rem;
  height: 0.375rem;
  flex: 0 0 auto;
  border-radius: 999px;
  background-color: var(--brass);
}

/* FAQ */
.faq {
  border-top: 1px solid var(--border);
}

.faq details {
  border-bottom: 1px solid var(--border);
}

.faq summary {
  cursor: pointer;
  list-style: none;
  padding-block: 1rem;
  font-family: var(--font-display);
  font-size: 1rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  color: var(--brass);
  font-family: var(--font-sans);
  font-size: 1.25rem;
}

.faq details[open] summary::after {
  content: "–";
}

.faq details p {
  margin: 0 0 1rem;
  padding-right: 2rem;
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--muted-foreground);
}

/* ---------- cards / aside ---------- */
.card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background-color: var(--card);
  padding: 1.5rem;
  box-shadow: var(--shadow-plate);
}

.card-paper {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background-color: var(--paper);
  padding: 2rem;
}

.aside-stack {
  display: grid;
  gap: 2rem;
  align-content: start;
}

@media (min-width: 1024px) {
  .aside-stack {
    position: sticky;
    top: 6rem;
  }
}

.link-list {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
  font-size: 0.875rem;
}

.link-list a {
  color: var(--muted-foreground);
}

.link-list a:hover {
  color: var(--foreground);
}

.kicker {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--brass);
}

/* ---------- passos / colunas ---------- */
.cols {
  margin-top: 3rem;
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}

.step h3 {
  margin-top: 0.75rem;
  font-size: 1.125rem;
}

.step p {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--muted-foreground);
}

.band {
  background-color: var(--paper);
  border-block: 1px solid var(--border);
}

/* ---------- formulário ---------- */
.form {
  display: grid;
  gap: 1.25rem;
  position: relative;
}

.form-row {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .form-row.two {
    grid-template-columns: 1fr 1fr;
  }
}

.field {
  display: grid;
  gap: 0.5rem;
}

.field label {
  font-size: 0.875rem;
  font-weight: 500;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  font-family: inherit;
  font-size: 0.875rem;
  color: var(--foreground);
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.5rem 0.75rem;
  min-height: 2.25rem;
}

.field textarea {
  min-height: 8rem;
  line-height: 1.7;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--brass);
  box-shadow: 0 0 0 1px var(--brass);
}

.field.invalid input,
.field.invalid select,
.field.invalid textarea {
  border-color: var(--destructive);
}

.error {
  font-size: 0.75rem;
  color: var(--destructive);
}

.hp {
  position: absolute;
  left: -9999px;
  opacity: 0;
  pointer-events: none;
}

.form-note {
  font-size: 0.75rem;
  line-height: 1.7;
  color: var(--muted-foreground);
}

fieldset {
  border: 0;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.25rem;
}

/* ---------- diálogo de confirmação ---------- */
dialog.confirm {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background-color: var(--card);
  color: var(--foreground);
  padding: 1.5rem;
  max-width: 30rem;
  width: calc(100% - 2rem);
  box-shadow: var(--shadow-lift);
}

dialog.confirm::backdrop {
  background: oklch(0.215 0.032 164 / 0.55);
}

dialog.confirm h2 {
  font-size: 1.25rem;
}

dialog.confirm > p {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.summary {
  margin-top: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background-color: var(--paper);
  padding: 1rem;
  font-size: 0.875rem;
  display: grid;
  gap: 0.5rem;
}

.summary div {
  display: flex;
  gap: 0.5rem;
}

.summary dt {
  width: 6rem;
  flex: 0 0 auto;
  color: var(--muted-foreground);
}

.summary dd {
  margin: 0;
}

.dialog-actions {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
}

/* ---------- toast ---------- */
.toast-stack {
  position: fixed;
  bottom: 5.5rem;
  right: 1.25rem;
  z-index: 80;
  display: grid;
  gap: 0.5rem;
  max-width: 20rem;
}

.toast {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background-color: var(--card);
  box-shadow: var(--shadow-lift);
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
}

.toast.error {
  border-color: var(--destructive);
  color: var(--destructive);
}

/* ---------- botão flutuante ---------- */
.wa-float {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 60;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: 999px;
  background-color: var(--brass);
  color: var(--brass-foreground);
  padding: 0.75rem 1.25rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  box-shadow: var(--shadow-lift);
  transition: transform 0.18s ease;
}

.wa-float:hover {
  transform: scale(1.03);
}

.wa-float svg {
  width: 1.25rem;
  height: 1.25rem;
}

@media (max-width: 480px) {
  .wa-float span {
    display: none;
  }
}

/* ---------- rodapé ---------- */
.site-footer {
  margin-top: 6rem;
  border-top: 1px solid var(--border);
  background-color: var(--ink);
  color: var(--ink-foreground);
}

.footer-grid {
  display: grid;
  gap: 3rem;
  padding-block: 4rem;
}

@media (min-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1.2fr 1fr 1fr;
  }
}

.footer-grid p,
.footer-grid li {
  font-size: 0.875rem;
  line-height: 1.7;
  color: oklch(0.965 0.013 92 / 0.7);
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--ink-foreground) !important;
}

.footer-grid ul {
  margin-top: 1rem;
  display: grid;
  gap: 0.625rem;
}

.footer-grid a:hover {
  color: var(--ink-foreground);
}

.footer-legal {
  border-top: 1px solid oklch(1 0 0 / 10%);
}

.footer-legal .wrap {
  padding-block: 1.5rem;
  display: grid;
  gap: 0.5rem;
}

.footer-legal p {
  font-size: 0.75rem;
  line-height: 1.6;
  color: oklch(0.965 0.013 92 / 0.5);
  max-width: 56rem;
}

/* ---------- painel ---------- */
.panel-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-top: 2rem;
}

.metrics {
  margin-top: 2rem;
  display: grid;
  gap: 1px;
  background-color: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
}

.metric {
  background-color: var(--card);
  padding: 1.25rem;
}

.metric dt {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted-foreground);
}

.metric dd {
  margin: 0.35rem 0 0;
  font-family: var(--font-display);
  font-size: 1.5rem;
}

.lead-list {
  margin-top: 2rem;
  display: grid;
  gap: 1rem;
}

.lead-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background-color: var(--card);
  padding: 1.25rem;
}

.lead-card header {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  justify-content: space-between;
  align-items: baseline;
}

.lead-card h3 {
  font-size: 1.125rem;
}

.lead-card time {
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.lead-meta {
  margin-top: 0.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.15rem 0.6rem;
  font-size: 0.7rem;
  color: var(--muted-foreground);
}

.lead-card p.resumo {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--muted-foreground);
}

.empty {
  margin-top: 2rem;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 2.5rem;
  text-align: center;
  color: var(--muted-foreground);
  font-size: 0.875rem;
}

/* ---------- 404 ---------- */
.notfound {
  display: flex;
  min-height: 60vh;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem 1.25rem;
}

.notfound h1 {
  margin-top: 1rem;
  font-size: 1.875rem;
}

.notfound p {
  margin-top: 0.75rem;
  color: var(--muted-foreground);
  font-size: 0.875rem;
}

.notfound .actions {
  margin-top: 1.5rem;
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}
