/* ════════════════════════════════════════════════
   PlenaPsi — sistema de design
   Neutros quentes (linho, papel), marrom da marca no texto,
   verde-sálvia como único acento.
   ════════════════════════════════════════════════ */
:root {
  /* Superfícies claras */
  --bg:          #f7f3ec;
  --bg-alt:      #f0e9de;
  --surface:     #fdfbf7;
  --raised:      #e9e1d4;
  --line:        rgba(44, 31, 20, 0.09);
  --line-strong: rgba(44, 31, 20, 0.16);

  /* Texto */
  --text:   #2c1f14;
  --text-2: #5f5146;
  --text-3: #74665a;
  --brand:  #5c3a1e;

  /* Acento */
  --accent:       #3d6b35;
  --accent-hover: #2e5228;

  /* Seção escura (perícia) */
  --dark:        #2c1f14;
  --dark-raised: rgba(239, 233, 222, 0.05);
  --dark-line:   rgba(239, 233, 222, 0.10);
  --dark-text:   #efe9de;
  --dark-text-2: #c2b6a7;
  --dark-text-3: #9b8e7f;
  --paper:       #f5efe4;

  /* Raios */
  --r-tag:   6px;
  --r-ctl:   10px;
  --r-card:  16px;
  --r-panel: 20px;

  /* Tipografia */
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans:  'DM Sans', system-ui, sans-serif;

  /* Movimento */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --fast: 160ms;

  --nav-h: 72px;
}

/* ── RESET ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }
body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }
a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3, h4, h5 { font-weight: 500; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ── Assinatura: numeração de laudo ── */
.index-num {
  font-family: var(--sans);
  font-size: 13px;
  line-height: 20px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--text-3);
}

/* ════════════════════════════════════════════════
   LAYOUT GLOBAL
   ════════════════════════════════════════════════ */
.container {
  max-width: 1184px;
  margin: 0 auto;
  padding: 0 32px;
}

section { padding: 112px 0; }

.section-head { max-width: 640px; margin-bottom: 48px; }
.section-head-split {
  max-width: none;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 64px;
  align-items: end;
}
.section-head-split .section-title { margin-bottom: 0; }

.section-label {
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
  color: var(--text-3);
  margin-bottom: 12px;
}

.section-title {
  font-family: var(--serif);
  font-size: 44px;
  line-height: 1.1;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--text);
  margin-bottom: 16px;
}

.section-subtitle {
  font-size: 17px;
  line-height: 28px;
  color: var(--text-2);
  max-width: 34rem;
}

.sub-title {
  font-family: var(--sans);
  font-size: 15px;
  line-height: 20px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 12px;
}

/* ════════════════════════════════════════════════
   BOTÕES
   ════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 20px;
  border-radius: var(--r-ctl);
  border: 1px solid transparent;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--fast) var(--ease), border-color var(--fast) var(--ease), color var(--fast) var(--ease), transform var(--fast) var(--ease);
}
.btn:active { transform: scale(0.98); }

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }

.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--line-strong); }
.btn-secondary:hover { background: #fff; border-color: rgba(44, 31, 20, 0.24); }

.btn-light { background: var(--dark-text); color: var(--dark); }
.btn-light:hover { background: #fff; }

/* ════════════════════════════════════════════════
   NAV
   ════════════════════════════════════════════════ */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  background: var(--bg);
  border-bottom: 1px solid transparent;
  transition: border-color var(--fast) var(--ease);
}
nav.scrolled { border-bottom-color: var(--line); }

.nav-inner {
  max-width: 1184px;
  height: 100%;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--serif);
  font-size: 38px;
  line-height: 1;
  font-weight: 500;
  letter-spacing: 0.005em;
  color: var(--brand);
  text-decoration: none;
}

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

.nav-links a {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 15px;
  color: var(--text-2);
  text-decoration: none;
  transition: color var(--fast) var(--ease), background-color var(--fast) var(--ease);
}
.nav-links a:hover { color: var(--text); background: var(--bg-alt); }

.nav-links .nav-cta {
  margin-left: 12px;
  padding: 0 16px;
  background: var(--accent);
  color: #fff;
  font-weight: 500;
}
.nav-links .nav-cta:hover { background: var(--accent-hover); color: #fff; }

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 40px;
  height: 40px;
  padding: 0 9px;
  border: none;
  border-radius: 8px;
  background: none;
  cursor: pointer;
}
.hamburger span { display: block; height: 1.5px; background: var(--text); border-radius: 1px; }

/* ════════════════════════════════════════════════
   HERO
   ════════════════════════════════════════════════ */
#home {
  min-height: 100svh;
  padding: calc(var(--nav-h) + 48px) 0 64px;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  background: var(--bg);
}

/* Ondas decorativas atrás do conteúdo */
.hero-waves {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 200px, #000 calc(100% - 120px), transparent 100%);
          mask-image: linear-gradient(to bottom, transparent 0, #000 200px, #000 calc(100% - 120px), transparent 100%);
}
.hero-waves svg {
  position: absolute;
  top: 0;
  left: -30%;
  width: 160%;
  height: 100%;
}

.hero-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 64px;
  align-items: center;
}

.hero-title {
  font-family: var(--serif);
  font-size: 68px;
  line-height: 1.04;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--text);
  max-width: 11em;
  margin-bottom: 24px;
}

.hero-subtitle {
  font-size: 19px;
  line-height: 30px;
  color: var(--text-2);
  max-width: 32rem;
  margin-bottom: 40px;
}

.hero-btns { display: flex; gap: 12px; flex-wrap: wrap; }

.hero-visual {
  position: relative;
  justify-self: end;
  width: 100%;
  max-width: 480px;
}

.hero-photo {
  width: 100%;
  aspect-ratio: 4 / 5;
  max-height: calc(100svh - var(--nav-h) - 112px);
  min-height: 420px;
  object-fit: cover;
  object-position: center 30%;
  border-radius: var(--r-panel);
}

.credential {
  position: absolute;
  left: -48px;
  bottom: 32px;
  width: 264px;
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(44, 31, 20, 0.08);
}
.credential-name { font-family: var(--serif); font-size: 22px; line-height: 28px; font-weight: 500; }
.credential-role { font-size: 13px; line-height: 20px; color: var(--text-2); margin-bottom: 12px; }
.credential-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
  font-size: 13px;
  line-height: 20px;
}
.credential-list div:last-child { padding-bottom: 0; }
.credential-list dt { color: var(--text-3); }
.credential-list dd { font-weight: 500; font-variant-numeric: tabular-nums; }

/* Entrada única ao carregar */
@media (prefers-reduced-motion: no-preference) {
  .hero-text, .hero-visual { animation: rise 480ms var(--ease) both; }
  .hero-visual { animation-delay: 60ms; }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

/* ════════════════════════════════════════════════
   SERVIÇOS
   ════════════════════════════════════════════════ */
#servicos { background: var(--bg-alt); }

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.service-card {
  display: flex;
  flex-direction: column;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  transition: border-color var(--fast) var(--ease);
}
.service-card:hover { border-color: var(--line-strong); }
.service-card .index-num { margin-bottom: 40px; }
.service-card h3 { font-size: 18px; line-height: 24px; margin-bottom: 8px; }
.service-card p { font-size: 15px; line-height: 24px; color: var(--text-2); }

/* ════════════════════════════════════════════════
   SOBRE
   ════════════════════════════════════════════════ */
#sobre { background: var(--bg); }

.sobre-inner {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 64px;
  align-items: start;
}

.sobre-photo {
  position: sticky;
  top: calc(var(--nav-h) + 32px);
}
.sobre-photo img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--r-panel);
}

.sobre-content .section-title { margin-bottom: 4px; }
.sobre-role { font-size: 15px; color: var(--text-3); font-variant-numeric: tabular-nums; margin-bottom: 24px; }

.sobre-bio {
  font-size: 17px;
  line-height: 28px;
  color: var(--text-2);
  max-width: 36rem;
}
.sobre-bio + .sobre-bio { margin-top: 16px; }

.formacoes { margin-top: 40px; }
.formacao-list li {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  align-items: baseline;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  font-size: 15px;
  line-height: 20px;
}
.formacao-list li:last-child { border-bottom: 1px solid var(--line); }

.mvv-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-top: 40px;
}
.mvv-item p { font-size: 15px; line-height: 24px; color: var(--text-2); }

/* ════════════════════════════════════════════════
   PALESTRAS
   ════════════════════════════════════════════════ */
#palestras { background: var(--bg-alt); }

.palestras-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 48px;
  align-items: start;
}

.palestras-content { display: flex; flex-direction: column; gap: 40px; }

.format-list {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
}
.format-row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 16px;
  padding: 20px 24px;
}
.format-row + .format-row { border-top: 1px solid var(--line); }
.format-row h4 { font-size: 16px; line-height: 24px; margin-bottom: 4px; }
.format-row p { font-size: 15px; line-height: 24px; color: var(--text-2); }

.icon-box {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-ctl);
  background: var(--bg-alt);
  color: var(--text-2);
}

.tag-row { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 12px;
  border-radius: var(--r-tag);
  background: var(--raised);
  font-size: 14px;
  color: var(--text-2);
}
.tag-line { background: transparent; border: 1px solid var(--line-strong); }

.topics-box {
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
}
.topics-box h3 {
  font-family: var(--serif);
  font-size: 28px;
  line-height: 32px;
  margin-bottom: 20px;
}
.topics-note {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 15px;
  line-height: 24px;
  color: var(--text-2);
}
.check-list { margin-top: 16px; display: grid; gap: 8px; }
.check-list li { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text-2); }
.check-list .icon { width: 16px; height: 16px; color: var(--accent); }

/* ════════════════════════════════════════════════
   PERÍCIA — o dossiê
   ════════════════════════════════════════════════ */
#pericia { background: var(--dark); color: var(--dark-text); }
#pericia .section-label { color: var(--dark-text-3); }
#pericia .section-title { color: var(--dark-text); }
#pericia .section-subtitle { color: var(--dark-text-2); margin-bottom: 40px; }

.pericia-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 64px;
  align-items: center;
}

.laudo {
  background: var(--paper);
  color: var(--text);
  border-radius: 6px;
  padding: 32px 36px 28px;
  transform: rotate(-1deg);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset, 0 24px 48px rgba(0, 0, 0, 0.32), 0 2px 6px rgba(0, 0, 0, 0.2);
}
.laudo-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 3px double var(--line-strong);
}
.laudo-title { font-family: var(--serif); font-size: 24px; line-height: 28px; font-weight: 500; }
.laudo-meta { font-size: 13px; color: var(--text-3); }
.laudo-list li {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: baseline;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
  line-height: 22px;
}
.laudo-sign {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  font-size: 13px;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}
.laudo-sign-line { width: 200px; height: 1px; background: var(--line-strong); }

.pericia-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 80px;
}
.pericia-info-card {
  padding: 24px;
  background: var(--dark-raised);
  border: 1px solid var(--dark-line);
  border-radius: var(--r-card);
}
.pericia-info-card h4 { font-size: 17px; line-height: 24px; color: var(--dark-text); margin-bottom: 8px; }
.pericia-info-card p { font-size: 15px; line-height: 24px; color: var(--dark-text-2); }

/* ════════════════════════════════════════════════
   FAQ
   ════════════════════════════════════════════════ */
#faq { background: var(--bg); }

.faq-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 48px;
  align-items: start;
}

.faq-list {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
}
.faq-item + .faq-item { border-top: 1px solid var(--line); }

.faq-q {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  min-height: 64px;
  padding: 20px 24px;
  border: none;
  background: none;
  text-align: left;
  font-size: 16px;
  line-height: 24px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
}
.faq-item:first-child .faq-q { border-radius: var(--r-card) var(--r-card) 0 0; }
.faq-item:last-child .faq-q { border-radius: 0 0 var(--r-card) var(--r-card); }
.faq-q:hover { color: var(--brand); }
.faq-arrow { color: var(--text-3); transition: transform 200ms var(--ease); }
.faq-item.open .faq-arrow { transform: rotate(180deg); }

.faq-a {
  display: none;
  padding: 0 64px 24px 24px;
  font-size: 15px;
  line-height: 24px;
  color: var(--text-2);
}
.faq-item.open .faq-a { display: block; animation: fade 200ms var(--ease); }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.faq-cta {
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
}
.faq-cta h3 { font-family: var(--serif); font-size: 28px; line-height: 32px; margin-bottom: 12px; }
.faq-cta p { font-size: 15px; line-height: 24px; color: var(--text-2); margin-bottom: 24px; }
.faq-values { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--line); }

/* ════════════════════════════════════════════════
   CONTATO
   ════════════════════════════════════════════════ */
#contato { background: var(--bg-alt); }

.contato-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 64px;
  align-items: center;
}
.contato-text p { font-size: 17px; line-height: 28px; color: var(--text-2); max-width: 30rem; }

.contato-options { display: grid; gap: 12px; }

.contato-btn {
  width: 100%;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 16px;
  min-height: 72px;
  padding: 12px 20px 12px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: border-color var(--fast) var(--ease), background-color var(--fast) var(--ease);
}
.contato-btn:hover { background: #fff; border-color: var(--line-strong); }
.contato-btn:active { transform: scale(0.99); }

.contato-label { display: flex; flex-direction: column; min-width: 0; }
.contato-label span { font-size: 15px; line-height: 20px; font-weight: 500; color: var(--text); }
.contato-label small { font-size: 14px; line-height: 20px; color: var(--text-2); overflow-wrap: anywhere; }
.contato-trail { color: var(--text-3); }

.email-btn-wrap { position: relative; }
.email-tooltip {
  position: absolute;
  right: 16px;
  top: -12px;
  padding: 4px 10px;
  border-radius: var(--r-tag);
  background: var(--text);
  color: var(--bg);
  font-size: 13px;
  line-height: 20px;
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 180ms var(--ease), transform 180ms var(--ease);
}
.email-tooltip.show { opacity: 1; transform: none; }

/* ════════════════════════════════════════════════
   FOOTER
   ════════════════════════════════════════════════ */
footer {
  background: var(--bg);
  border-top: 1px solid var(--line);
  padding: 64px 0 32px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr 1fr 2fr;
  gap: 48px;
  align-items: start;
  padding-bottom: 40px;
}

.footer-nav-title { font-size: 14px; line-height: 20px; color: var(--text); margin-bottom: 12px; }
.footer-links { display: grid; gap: 8px; }
.footer-links a {
  font-size: 15px;
  color: var(--text-2);
  text-decoration: none;
  transition: color var(--fast) var(--ease);
}
.footer-links a:hover { color: var(--text); }

.footer-brand { justify-self: end; }
.footer-brand img { width: 160px; height: auto; mix-blend-mode: multiply; }

.footer-bottom {
  font-size: 13px;
  color: var(--text-3);
}
.footer-bottom span { display: block; padding-top: 24px; border-top: 1px solid var(--line); }

/* ════════════════════════════════════════════════
   RESPONSIVO
   ════════════════════════════════════════════════ */
@media (max-width: 1080px) {
  .hero-title { font-size: 56px; }
  .credential { left: -24px; }
  .services-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pericia-cards { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  :root { --nav-h: 64px; }
  .container, .nav-inner { padding: 0 20px; }
  section { padding: 72px 0; }

  .nav-logo { font-size: 32px; }
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .hero-waves svg { left: -60%; width: 260%; }
  nav.menu-open { border-bottom-color: var(--line); }
  nav.menu-open .nav-links {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    position: fixed;
    top: var(--nav-h); left: 0; right: 0;
    padding: 12px 20px 20px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
  }
  nav.menu-open .nav-links a { height: 44px; }
  nav.menu-open .nav-links .nav-cta { margin: 8px 0 0; justify-content: center; }

  #home { min-height: 0; padding: calc(var(--nav-h) + 48px) 0 64px; }
  .hero-inner { grid-template-columns: 1fr; gap: 48px; }
  .hero-title { font-size: 42px; line-height: 1.08; }
  .hero-subtitle { font-size: 17px; line-height: 28px; margin-bottom: 32px; }
  .hero-visual { justify-self: stretch; max-width: none; }
  .hero-photo { aspect-ratio: 4 / 5; max-height: none; min-height: 0; }
  .credential { left: 16px; right: 16px; bottom: 16px; width: auto; }

  .section-title { font-size: 36px; }
  .section-head-split { grid-template-columns: 1fr; gap: 16px; }
  .services-grid { grid-template-columns: 1fr; gap: 12px; }
  .service-card .index-num { margin-bottom: 16px; }

  .sobre-inner,
  .palestras-grid,
  .pericia-inner,
  .faq-grid,
  .contato-inner,
  .mvv-grid { grid-template-columns: 1fr; }
  .sobre-inner, .pericia-inner, .contato-inner { gap: 40px; }
  .sobre-photo { position: static; }

  .format-row { padding: 16px 20px; }
  .topics-box, .faq-cta { padding: 24px; }
  .laudo { padding: 24px 20px 20px; transform: none; }
  .pericia-cards { margin-top: 48px; gap: 12px; }

  .faq-q { padding: 16px 20px; }
  .faq-a { padding: 0 20px 20px; }

  .footer-inner { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-brand { grid-column: 1 / -1; justify-self: start; }
  .footer-brand img { width: 128px; }
}
