:root {
  --bg: #f7f5f1;
  --card: #fdfcfb;
  --primary: #213e4c;
  --accent: #b29b78;
  --text: #213e4c;
  --muted: #65717a;
  --border: #dedbd5;
  --radius: 20px;
  --shadow: 0 14px 28px #243b4a0c;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.6 "Figtree", "Segoe UI", sans-serif;
}

[hidden] {
  display: none !important;
}

a {
  color: inherit;
  text-decoration: none;
}

button, input, select, textarea {
  font: inherit;
}

button, summary {
  cursor: pointer;
}

button {
  color: inherit;
}

img {
  max-width: 100%;
  height: auto;
}

figure {
  margin: 0;
}

h1, h2, h3, h4 {
  line-height: 1.2;
  overflow-wrap: anywhere;
}

h1, .section-head h2 {
  margin: 0 0 24px;
  font: 400 clamp(36px, 4vw, 60px)/1.1 Georgia, serif;
  letter-spacing: -.025em;
}

p {
  margin: 0 0 16px;
}

:focus-visible {
  outline: 3px solid #927849;
  outline-offset: 4px;
}

.container {
  width: min(1320px, 90%);
  margin-inline: auto;
}

body > main {
  padding-top: calc(var(--home-header-height, 60px) + 56px);
  padding-bottom: 64px;
  min-height: 65vh;
}

.section {
  padding: 56px 0;
}

main > .section {
  padding-top: 0;
}

.section-head {
  margin-bottom: 40px;
}

.section-head p, .rj-head p {
  color: var(--muted);
}

.section-alt {
  background: var(--bg);
}

.grid-cards, .lawyers-grid, .top-numbers-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.card, .card-surface, .lawyer-card, .notfound-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.card:not(.article-card), .card-surface, .lawyer-card, .notfound-card {
  box-shadow: var(--shadow);
}

.card:not(.article-card), .notfound-card {
  padding: 28px;
}

.top-number-card {
  padding: 24px;
  text-align: center;
}

.top-number-value {
  display: block;
  font: 400 clamp(32px, 4vw, 56px)/1.2 Georgia, serif;
}

.top-number-label {
  color: var(--muted);
}

.top-numbers-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.icon-badge {
  font-size: 28px;
}

.article-card {
  display: flex;
  flex-direction: column;
}

.article-media {
  position: relative;
  height: 230px;
}

.article-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-content {
  padding: 24px;
}

.article-date {
  color: var(--muted);
  font-size: 13px;
}

.article-card h3 {
  margin: 0 0 14px;
  font-size: 24px;
}

.article-excerpt {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  color: var(--muted);
}

.article-topic {
  position: absolute;
  top: 20px;
  left: 20px;
  padding: 6px 14px;
  border-radius: 30px;
  background: #efddb6;
  font-size: 12px;
}

.article-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--accent);
}

.article-link svg, .articles-all-btn svg {
  width: 18px;
  height: 18px;
}

.articles-all-btn, .notfound-btn, .lawyer-card-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 22px;
  border: 0;
  border-radius: 30px;
  background: var(--primary);
  color: #fff;
  font-weight: 600;
}

.article-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 2.5fr) minmax(240px, 1fr);
  gap: 32px;
  align-items: start;
}

.article-detail-content {
  min-width: 0;
}

.article-title-block {
  margin-bottom: 24px;
}

.article-title-block h1 {
  max-width: 100%;
  margin: 0;
  font: 400 clamp(28px, 4.2vw, 44px)/1.15 Georgia, serif;
  letter-spacing: -.025em;
  text-wrap: wrap;
}

.article-detail-meta, .article-detail-facts, .article-share {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.article-detail-meta {
  justify-content: space-between;
  gap: 12px 20px;
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 13px;
}

.article-detail-facts {
  gap: 10px 18px;
}

.article-detail-fact {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.article-detail-fact svg {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  color: var(--primary);
}

.article-share {
  position: relative;
  gap: 2px;
}

.article-share > a, .article-share > button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 44px;
  padding: 10px 4px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--primary);
  cursor: pointer;
}

.article-detail-fact svg, .article-share svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.article-share svg {
  width: 22px;
  height: 22px;
}

.article-share-status {
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 1;
  background: var(--bg);
  font-size: 12px;
}

.article-detail-image {
  display: block;
  width: 100%;
  height: auto;
  border: 0;
  border-radius: 10px;
  margin-bottom: 24px;
}

.article-detail-body {
  font: 400 clamp(17px, 1.25vw, 18px)/1.65 "Source Sans 3", "Figtree", "Segoe UI", sans-serif;
  color: #425661;
  text-align: left;
}

.article-detail-body p {
  margin: 0 0 .9em;
}

.article-detail-body > p:has(+ :is(h2, h3)) {
  padding-bottom: .9em;
  border-bottom: 1px solid var(--border);
}

.article-detail-body > p:first-child, .article-detail-body strong {
  color: var(--primary);
  font-weight: 600;
}

.article-detail-body :is(h2, h3) {
  margin: 1.25em 0 .5em;
  color: var(--primary);
  font-family: inherit;
  font-weight: 600;
  line-height: 1.3;
  text-wrap: balance;
}

.article-detail-body h2 {
  font-size: clamp(23px, 2vw, 28px);
}

.article-detail-body > :last-child {
  margin-bottom: 0;
}

.article-detail-body li {
  margin-bottom: .6em;
}

.article-detail-sidebar {
  min-width: 0;
  font-family: Georgia, serif;
}

.article-detail-sidebar h2 {
  margin: 0 0 20px;
  font-size: 24px;
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -.025em;
}

.article-detail-body, .empresa-description, .lawyer-detail-bio {
  overflow-wrap: anywhere;
}

.article-detail-body a, .empresa-description a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.article-detail-body iframe, .article-detail-body video {
  max-width: 100%;
}

.article-detail-sidebar ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.article-detail-sidebar li + li {
  border-top: 1px solid var(--border);
}

.article-related-link {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 16px;
  padding-block: 18px;
  border-radius: 4px;
}

.article-detail-sidebar li:first-child .article-related-link {
  padding-top: 0;
}

.article-related-image {
  display: block;
  width: 100%;
  height: 96px;
  object-fit: cover;
  border-radius: 6px;
  background: #eae5dc;
}

.article-related-text {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.article-related-category, .article-related-date {
  color: var(--muted);
  font-family: "Source Sans 3", "Figtree", "Segoe UI", sans-serif;
}

.article-related-category {
  font-size: 10px;
  line-height: 1.4;
  text-transform: uppercase;
}

.article-related-title {
  font-size: 17px;
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: -.025em;
  overflow-wrap: anywhere;
}

.article-related-date {
  font-size: 12px;
  line-height: 1.5;
}

.article-related-arrow {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .2s ease;
}

.article-related-link:is(:hover, :focus-visible) .article-related-arrow {
  transform: translateX(4px);
}

.lawyer-card {
  display: block;
}

.lawyer-card-image {
  display: block;
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
  object-position: top;
}

.lawyer-card-overlay {
  padding: 24px;
}

.lawyer-card-overlay h3 {
  margin-top: 0;
}

.lawyer-card-role, .lawyer-card-oab, .lawyer-detail-role, .lawyer-detail-oab {
  color: var(--muted);
}

.lawyer-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 32px;
}

.lawyer-detail-image-wrap img {
  width: 100%;
  border-radius: var(--radius);
}

.lawyer-detail-block, .lawyer-detail-bio, .lawyer-others-section {
  margin-top: 32px;
}

.home-lawyers-slider {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 16px;
}

.home-lawyers-viewport {
  overflow-x: auto;
  scroll-snap-type: x mandatory;
}

.home-lawyers-track {
  display: flex;
  gap: 24px;
}

.home-lawyers-track .lawyer-card {
  flex: 0 0 calc((100% - 48px) / 3);
  scroll-snap-align: start;
}

.home-lawyers-arrow {
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--card);
  font-size: 24px;
}

.home-lawyers-arrow:disabled {
  opacity: .4;
  cursor: default;
}

.rj-kicker {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: 13px;
}

:is(.rj-head, .empresa-head) {
  text-align: center;
  margin-bottom: 24px;
}

:is(.rj-head, .empresa-head) h1 {
  margin: 8px 0 0;
  font-family: inherit;
  font-size: clamp(2rem, 3.2vw, 3.2rem);
  font-weight: 600;
  text-transform: uppercase;
}

:is(.rj-head, .empresa-head) h1::after {
  content: "";
  display: block;
  width: 100px;
  height: 2px;
  margin: 14px auto 0;
  background: linear-gradient(90deg, transparent, var(--accent) 30%, var(--accent) 70%, transparent);
}

.rj-head p {
  max-width: 70ch;
  margin: 16px auto 0;
}

.rj-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) 220px;
  gap: 14px;
  margin-bottom: 18px;
}

input, select, textarea {
  min-width: 0;
  width: 100%;
  min-height: 46px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card);
  color: var(--text);
}

.rj-filters > :is(input, select, button), .rj-search input {
  height: 44px;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
}

.rj-search {
  position: relative;
  min-width: 0;
}

.rj-search svg {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

.rj-search input {
  padding-left: 46px;
}

.rj-filters :is(input, select, summary):focus {
  outline: none;
}

.rj-page-main :is(a[href], select) {
  cursor: pointer;
}

.rj-filters > button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .14em;
}

.rj-filter-menu {
  position: relative;
  min-width: 0;
}

.rj-filter-menu summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 44px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--card);
  color: #646676;
  list-style: none;
}

.rj-filter-menu summary::-webkit-details-marker {
  display: none;
}

.rj-filter-menu summary::after {
  content: "";
  flex: 0 0 8px;
  height: 8px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: rotate(45deg);
}

.rj-filter-menu[open] {
  z-index: 5;
}

.rj-filter-menu[open] summary {
  border-radius: 6px 6px 0 0;
}

.rj-filter-menu[open] summary::after {
  transform: rotate(225deg);
}

.rj-filter-options {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: 280px;
  overflow-y: auto;
  padding: 8px;
  border-radius: 0 0 12px 12px;
  background: var(--card);
  box-shadow: 0 10px 20px #213e4c10;
}

.rj-filter-options button {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 10px 16px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #646676;
  text-align: left;
  overflow-wrap: anywhere;
  transition: color .3s ease, transform .55s cubic-bezier(.45, 0, .2, 1);
}

.rj-filter-options button:is(:hover, :focus-visible) {
  color: var(--primary);
  transform: translateX(4px);
  outline: none;
}

.rj-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
}

.rj-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.rj-table th, .rj-table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--border);
}

.rj-table th {
  background: #eeebe5;
}

.rj-company-link {
  --process-icon: url("../img/process-folder.svg");
  --icon-color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  transition: transform .25s ease;
}

:is(.rj-company-link, .empresa-tab, .empresa-file-title, .empresa-file-download)::before {
  content: "";
  width: var(--icon-size, 16px);
  height: var(--icon-size, 16px);
  flex: 0 0 var(--icon-size, 16px);
  background-color: var(--icon-color, currentColor);
  mask: var(--process-icon) center / contain no-repeat;
}

.rj-company-link:hover {
  transform: translateX(4px);
}

.empresa-logo-wrap {
  display: grid;
  justify-items: center;
  margin: 8px 0 20px;
}

.empresa-logo-wrap img {
  max-width: min(560px, 100%);
  max-height: 230px;
  object-fit: contain;
}

.empresa-description {
  max-width: 900px;
  margin: 0 auto 14px;
  line-height: 1.75;
  color: var(--muted);
}

.empresa-meta {
  display: grid;
  gap: 8px;
  max-width: 900px;
  margin: 0 auto 24px;
}

.empresa-meta p {
  margin: 0;
  line-height: 1.35;
  font-size: 1.05rem;
  overflow-wrap: anywhere;
}

.empresa-meta a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.empresa-files-board {
  max-width: 900px;
  margin-inline: auto;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: var(--card);
}

.empresa-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px;
  background: var(--primary);
}

.empresa-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 13px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: #ffffff12;
  color: #fff;
  font-weight: 600;
  transition: background-color .2s ease, transform .2s ease;
}

.empresa-tab[data-tab="documentos"] {
  --process-icon: url("../img/folder.svg");
}

.empresa-tab[data-tab="relatorios"] {
  --process-icon: url("../img/report.svg");
}

.empresa-tab:hover {
  background: #ffffff24;
  transform: translateY(-1px);
}

.empresa-tab.is-active {
  color: var(--primary);
  background: #e6d7bd;
}

.empresa-files-list {
  padding: 10px 14px 14px;
}

.empresa-file-head, .empresa-file-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--border);
}

.empresa-file-head {
  padding: 8px 8px 10px;
  margin-bottom: 6px;
  font-weight: 700;
}

.empresa-file-row {
  padding: 11px 8px;
  border-radius: 10px;
  transition: background-color .2s ease;
}

.empresa-file-title {
  --process-icon: url("../img/document.svg");
  --icon-color: var(--accent);
  --icon-size: 17px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.empresa-file-download {
  --process-icon: url("../img/download.svg");
  --icon-size: 15px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 8px;
  border-radius: 8px;
}

.empresa-file-download:hover {
  transform: translateX(4px);
}

.empresa-files-list > p {
  margin: 6px 8px 2px;
  color: var(--muted);
}

body > main.privacy-page-main {
  padding: calc(var(--home-header-height, 60px) + 100px) 80px 120px;
  background: var(--bg);
}

.privacy-section > .container {
  width: 100%;
  max-width: 800px;
}

.privacy-card {
  color: #646676;
  font-size: clamp(1rem, 1vw, 1.2rem);
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.privacy-card h1 {
  margin: 0;
  color: var(--primary);
  font: 700 clamp(2.5rem, 1vw, 3.5rem)/1.2 "Figtree", "Segoe UI", sans-serif;
  letter-spacing: normal;
}

.privacy-card h2 {
  margin: 30px 0 10px;
  color: var(--primary);
  font-size: inherit;
  font-weight: 700;
  line-height: 1.5;
}

.privacy-card p {
  margin: 20px 0 0;
}

.privacy-card a {
  color: var(--primary);
}

.notfound-card {
  max-width: 760px;
}

.notfound-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
  margin-bottom: 0;
}

.hero-arrow {
  display: grid;
  place-items: center;
  color: #fff;
}

.hero-arrow svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.hero-dot {
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #ffffff80;
  cursor: pointer;
}

.floating-whatsapp {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 90;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #27863e;
  color: #fff;
  box-shadow: 0 4px 18px #213e4c30;
}

.floating-whatsapp svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

@media (min-width: 1001px) {
  .article-detail-body > h2:first-child {
    white-space: nowrap;
  }

  .article-detail-image {
    aspect-ratio: 17 / 9;
    object-fit: cover;
    object-position: center;
  }

  .article-detail-sidebar {
    margin-top: 68px;
  }
}

@media (max-width: 1000px) {
  .article-detail-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .lawyer-detail-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr);
  }

  .lawyer-detail-side {
    grid-column: 1 / -1;
  }

  .rj-filters {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 700px) {
  .article-detail-image {
    aspect-ratio: 4 / 3;
    object-fit: cover;
    object-position: center;
    border-radius: 14px;
  }

  .article-detail-facts {
    width: 100%;
    flex-wrap: nowrap;
    justify-content: space-between;
    gap: 4px;
    font-size: clamp(8px, 2.5vw, 12px);
  }

  .article-detail-fact {
    gap: 4px;
    white-space: nowrap;
  }

  .article-detail-fact svg {
    width: 12px;
    height: 12px;
    flex-basis: 12px;
  }

  body > main {
    padding-top: calc(var(--home-header-height, 60px) + 32px);
    padding-bottom: 40px;
  }

  .section {
    padding: 36px 0;
  }

  .grid-cards, .lawyers-grid, .top-numbers-grid, .lawyer-detail-grid, .rj-filters {
    grid-template-columns: minmax(0, 1fr);
  }

  .lawyer-detail-image-wrap {
    max-width: 360px;
  }

  .home-lawyers-track .lawyer-card {
    flex-basis: 100%;
  }

  .home-lawyers-slider {
    gap: 8px;
    grid-template-columns: 36px minmax(0, 1fr) 36px;
  }

  .home-lawyers-arrow {
    width: 36px;
    height: 36px;
  }

  .rj-table th, .rj-table td {
    padding: 10px 6px;
    font-size: .95rem;
  }

  .floating-whatsapp {
    right: 16px;
    bottom: 16px;
  }
}

@media (max-width: 768px) {
  body > main.privacy-page-main {
    padding: calc(var(--home-header-height, 60px) + 80px) 20px 100px;
  }

  .privacy-card {
    font-size: clamp(.8rem, 1vw, 1rem);
  }

  .privacy-card h1 {
    font-size: clamp(1.5rem, 1vw, 2rem);
  }

  .privacy-card h2 {
    font-size: clamp(1rem, 1vw, 1.2rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *, *::before, *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}
