/* ===========================================================
   Somar Assessoria Contábil — Design System
   Verde petróleo + latão. Sora (display) / Manrope (texto) /
   JetBrains Mono (dados tabulares — números com espírito de razão contábil).
   =========================================================== */

@import url("https://fonts.googleapis.com/css2?family=Sora:wght@500;600;700;800&family=Manrope:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap");

:root {
  --ink: #0c2622;
  --petrol: #0e3f39;
  --petrol-2: #145048;
  --petrol-3: #1c635a;
  --paper: #f7f4ee;
  --paper-dim: #efe9dc;
  --paper-line: #ddd5c1;
  --brass: #b8894f;
  --brass-light: #d7b077;
  --brass-dark: #8f6a3a;
  --white: #ffffff;
  --good: #3f7a5c;
  --font-display: "Sora", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Manrope", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --radius: 14px;
  --radius-sm: 8px;
  --container: 1160px;
  --shadow-card: 0 1px 2px rgba(12, 38, 34, 0.06), 0 12px 28px -16px rgba(12, 38, 34, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--petrol);
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.1rem, 4.4vw, 3.4rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 2.8vw, 2.25rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 600; }
h4 { font-size: 1.05rem; font-weight: 600; }

p { margin: 0 0 1em; color: #35473f; }

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

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--brass-dark);
  font-weight: 600;
}

.eyebrow::before {
  content: "";
  width: 18px;
  height: 1px;
  background: var(--brass);
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(247, 244, 238, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--paper-line);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--petrol);
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: linear-gradient(155deg, var(--petrol) 0%, var(--petrol-3) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brass-light);
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 1rem;
  flex: none;
}

.brand small {
  display: block;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  color: var(--brass-dark);
  text-transform: uppercase;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.main-nav a {
  padding: 9px 14px;
  border-radius: 8px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--petrol-2);
  transition: background 0.15s ease, color 0.15s ease;
}

.main-nav a:hover,
.main-nav a[aria-current="page"] {
  background: var(--paper-dim);
  color: var(--petrol);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--paper-line);
  border-radius: 8px;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--petrol);
  position: relative;
  transition: transform 0.2s ease;
}

.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.92rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--brass);
  color: #241705;
}

.btn-primary:hover {
  background: var(--brass-light);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  border-color: var(--petrol-2);
  color: var(--petrol);
}

.btn-ghost:hover {
  background: var(--petrol);
  color: var(--paper);
  border-color: var(--petrol);
}

.btn-on-dark {
  background: var(--paper);
  color: var(--petrol);
}

.btn-on-dark:hover {
  background: var(--brass-light);
  transform: translateY(-1px);
}

.btn-outline-dark {
  border-color: rgba(247, 244, 238, 0.4);
  color: var(--paper);
}

.btn-outline-dark:hover {
  border-color: var(--paper);
  background: rgba(247, 244, 238, 0.08);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.82rem;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  background: radial-gradient(120% 140% at 85% -10%, var(--petrol-3) 0%, var(--petrol) 45%, var(--ink) 100%);
  color: var(--paper);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    to bottom,
    rgba(247, 244, 238, 0.05) 0,
    rgba(247, 244, 238, 0.05) 1px,
    transparent 1px,
    transparent 42px
  );
  pointer-events: none;
}

.hero-inner {
  position: relative;
  padding: 76px 0 40px;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}

.hero h1 { color: var(--paper); }

.hero .lede {
  font-size: 1.12rem;
  color: rgba(247, 244, 238, 0.82);
  max-width: 46ch;
}

.hero-actions {
  display: flex;
  gap: 12px;
  margin-top: 28px;
  flex-wrap: wrap;
}

.hero-card {
  background: rgba(247, 244, 238, 0.06);
  border: 1px solid rgba(247, 244, 238, 0.16);
  border-radius: var(--radius);
  padding: 26px;
  backdrop-filter: blur(4px);
}

.hero-card dl {
  margin: 0;
  display: grid;
  gap: 16px;
}

.hero-card .row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-bottom: 14px;
  border-bottom: 1px dashed rgba(247, 244, 238, 0.2);
}

.hero-card .row:last-child { border-bottom: none; padding-bottom: 0; }

.hero-card dt {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: rgba(247, 244, 238, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.hero-card dd {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
}

/* ---------- Ticker (elemento de assinatura) ---------- */

.ledger-ticker {
  position: relative;
  border-top: 1px solid rgba(247, 244, 238, 0.14);
  background: rgba(9, 30, 27, 0.55);
  overflow: hidden;
}

.ledger-ticker .track {
  display: flex;
  width: max-content;
  animation: scroll-ticker 38s linear infinite;
}

.ledger-ticker:hover .track {
  animation-play-state: paused;
}

@keyframes scroll-ticker {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.ticker-item {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 12px 28px;
  border-right: 1px solid rgba(247, 244, 238, 0.1);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: rgba(247, 244, 238, 0.85);
  white-space: nowrap;
}

.ticker-item .tk-label {
  color: var(--brass-light);
  font-weight: 600;
}

.ticker-item .tk-value {
  font-weight: 600;
  color: var(--paper);
}

.ticker-note {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: rgba(247, 244, 238, 0.45);
  padding: 5px 0 6px;
  letter-spacing: 0.03em;
}

/* ---------- Sections ---------- */

.section {
  padding: 84px 0;
  border-bottom: 1px solid var(--paper-line);
}

.section-alt {
  background: var(--paper-dim);
}

.section-dark {
  background: var(--petrol);
  color: var(--paper);
  border-bottom: none;
}

.section-dark h2 { color: var(--paper); }
.section-dark p { color: rgba(247, 244, 238, 0.78); }

.section-head {
  max-width: 640px;
  margin-bottom: 44px;
}

.section-head.center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

/* ---------- Cards / Grids ---------- */

.grid {
  display: grid;
  gap: 20px;
}

.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--white);
  border: 1px solid var(--paper-line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-card);
}

.card .tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--brass-dark);
  background: rgba(184, 137, 79, 0.12);
  padding: 4px 9px;
  border-radius: 6px;
  margin-bottom: 14px;
}

.card ul {
  margin: 14px 0 0;
  padding-left: 0;
  list-style: none;
}

.card ul li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 8px;
  font-size: 0.94rem;
  color: #45564d;
}

.card ul li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--brass);
}

.service-card {
  background: var(--white);
  border: 1px solid var(--paper-line);
  border-radius: var(--radius);
  padding: 30px 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.service-card:hover {
  box-shadow: var(--shadow-card);
  transform: translateY(-3px);
}

.service-card .code {
  font-family: var(--font-mono);
  color: var(--brass-dark);
  font-size: 0.78rem;
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.stat {
  border-left: 2px solid var(--brass);
  padding-left: 16px;
}

.stat .num {
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 600;
  color: var(--petrol);
  display: block;
}

.stat .label {
  font-size: 0.85rem;
  color: #5a695f;
}

.section-dark .stat { border-left-color: var(--brass-light); }
.section-dark .stat .num { color: var(--paper); }
.section-dark .stat .label { color: rgba(247, 244, 238, 0.65); }

/* ---------- Timeline (processo) ---------- */

.ledger-list {
  border-top: 1px solid var(--paper-line);
}

.ledger-row {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 24px;
  padding: 26px 0;
  border-bottom: 1px solid var(--paper-line);
}

.ledger-row .idx {
  font-family: var(--font-mono);
  color: var(--brass-dark);
  font-weight: 600;
  font-size: 0.95rem;
}

/* ---------- Table (índices) ---------- */

.table-wrap {
  border: 1px solid var(--paper-line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--white);
}

table.indices {
  width: 100%;
  border-collapse: collapse;
}

table.indices thead th {
  text-align: left;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--brass-dark);
  background: var(--paper-dim);
  padding: 12px 18px;
  border-bottom: 1px solid var(--paper-line);
}

table.indices td {
  padding: 15px 18px;
  border-bottom: 1px solid var(--paper-line);
  font-size: 0.93rem;
}

table.indices tbody tr:last-child td { border-bottom: none; }
table.indices tbody tr:hover { background: rgba(184, 137, 79, 0.06); }

table.indices td.value {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--petrol);
}

table.indices td.date {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: #67766c;
}

.badge-group {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(14, 63, 57, 0.08);
  color: var(--petrol-2);
}

/* ---------- News ---------- */

.news-item {
  padding: 22px 0;
  border-bottom: 1px solid var(--paper-line);
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 20px;
}

.news-item .src {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--brass-dark);
}

.news-item .date {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: #7c8b81;
  margin-top: 4px;
}

.news-item h3 {
  font-size: 1.02rem;
  margin-bottom: 6px;
}

.news-item p {
  font-size: 0.9rem;
  margin-bottom: 0;
}

.state-msg {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: #6a7a70;
  padding: 30px 0;
  text-align: center;
}

/* ---------- Forms ---------- */

.form-grid {
  display: grid;
  gap: 16px;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--petrol-2);
  margin-bottom: 6px;
}

input, select, textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 12px 14px;
  border: 1px solid var(--paper-line);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--ink);
}

input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--brass);
  outline-offset: 1px;
  border-color: var(--brass);
}

textarea { resize: vertical; min-height: 120px; }

.form-note {
  font-size: 0.8rem;
  color: #7c8b81;
}

.alert {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  margin-bottom: 18px;
}

.alert-success {
  background: rgba(63, 122, 92, 0.12);
  color: var(--good);
  border: 1px solid rgba(63, 122, 92, 0.3);
}

.alert-error {
  background: rgba(178, 58, 46, 0.1);
  color: #a4392a;
  border: 1px solid rgba(178, 58, 46, 0.28);
}

/* ---------- Contact strip ---------- */

.contact-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.contact-strip .item {
  padding: 22px;
  border: 1px solid var(--paper-line);
  border-radius: var(--radius);
  background: var(--white);
}

.contact-strip .item .k {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  color: var(--brass-dark);
  letter-spacing: 0.05em;
  display: block;
  margin-bottom: 8px;
}

.contact-strip .item a,
.contact-strip .item span.v {
  font-weight: 700;
  color: var(--petrol);
}

/* ---------- CTA band ---------- */

.cta-band {
  background: linear-gradient(120deg, var(--petrol) 0%, var(--petrol-3) 100%);
  color: var(--paper);
  border-radius: 20px;
  padding: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.cta-band h2 { color: var(--paper); margin-bottom: 6px; }
.cta-band p { color: rgba(247, 244, 238, 0.78); margin-bottom: 0; }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--ink);
  color: rgba(247, 244, 238, 0.72);
  padding: 56px 0 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(247, 244, 238, 0.1);
}

.footer-grid h4 {
  color: var(--brass-light);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-family: var(--font-mono);
  font-weight: 600;
  margin-bottom: 14px;
}

.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 9px; font-size: 0.9rem; }
.footer-grid a:hover { color: var(--paper); }

.footer-grid p { color: rgba(247, 244, 238, 0.6); font-size: 0.9rem; }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 22px;
  font-size: 0.78rem;
  color: rgba(247, 244, 238, 0.45);
  flex-wrap: wrap;
  gap: 10px;
}

/* ---------- Page header (páginas internas) ---------- */

.page-hero {
  background: var(--petrol);
  color: var(--paper);
  padding: 56px 0 44px;
}

.page-hero h1 { color: var(--paper); margin-bottom: 10px; }
.page-hero p { color: rgba(247, 244, 238, 0.78); max-width: 60ch; margin-bottom: 0; }

.breadcrumb {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: rgba(247, 244, 238, 0.5);
  margin-bottom: 16px;
}

.breadcrumb a:hover { color: var(--brass-light); }

/* ---------- WhatsApp FAB ---------- */

.wa-fab {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #1f7a5c;
  color: #fff;
  padding: 13px 18px 13px 14px;
  border-radius: 999px;
  box-shadow: 0 10px 24px -8px rgba(12, 38, 34, 0.45);
  font-weight: 700;
  font-size: 0.88rem;
  transition: transform 0.15s ease;
}

.wa-fab:hover { transform: translateY(-2px); }

.wa-fab svg { width: 20px; height: 20px; flex: none; }

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; padding-top: 40px; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .contact-strip { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .main-nav { display: none; }
  .nav-toggle { display: flex; }
  .site-header.nav-open .main-nav {
    display: flex;
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    background: var(--paper);
    flex-direction: column;
    padding: 12px;
    border-bottom: 1px solid var(--paper-line);
    gap: 2px;
  }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .form-row-2 { grid-template-columns: 1fr; }
  .news-item { grid-template-columns: 1fr; }
  .cta-band { flex-direction: column; align-items: flex-start; }
  .ledger-row { grid-template-columns: 50px 1fr; }
  .section { padding: 56px 0; }
  .hero-inner { padding-bottom: 30px; }
}
