/* =========================================================
   Ricardo Porto Advogados — Direito Imobiliário do Consumidor
   Design tokens: ink navy + antique gold + warm paper,
   Libre Baskerville (display) / IBM Plex Sans (body) / IBM Plex Mono (labels)
   ========================================================= */

:root {
  --ink: #0a0f1c;
  --ink-2: #131b30;
  --ink-3: #1c2740;
  --gold: #c9a15c;
  --gold-light: #e4c384;
  --gold-dark: #a67f3f;
  --paper: #faf7f2;
  --bone: #f1e9db;
  --text: #14182a;
  --text-muted: #5a5f70;
  --text-on-dark: #f4f1ea;
  --text-on-dark-muted: #b7bccb;
  --border: #e2dbca;
  --border-dark: rgba(244, 241, 234, 0.14);
  --card-bg: #ffffff;

  --font-display: "Libre Baskerville", Georgia, serif;
  --font-body: "IBM Plex Sans", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, monospace;

  --container: 1180px;
  --radius: 3px;
  --shadow-soft: 0 20px 50px -25px rgba(10, 15, 28, 0.35);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { 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(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 0.5em;
  text-wrap: balance;
  color: inherit;
}

p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; }
fieldset { border: none; margin: 0; padding: 0; min-width: 0; }
legend { padding: 0; width: 100%; }

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--gold);
  color: var(--ink);
  padding: 0.75rem 1.25rem;
  z-index: 999;
  font-weight: 600;
}
.skip-link:focus { left: 1rem; top: 1rem; }

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

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

section[id], .hero-form-wrap[id] { scroll-margin-top: 84px; }

/* ---------- Type helpers ---------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin: 0 0 0.9em;
}
.eyebrow-on-dark { color: var(--gold-light); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.85em 1.6em;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-gold {
  background: var(--gold);
  color: var(--ink);
}
.btn-gold:hover { background: var(--gold-light); }
.btn-ghost-dark {
  background: transparent;
  color: var(--text-on-dark);
  border-color: var(--border-dark);
}
.btn-ghost-dark:hover { border-color: var(--gold-light); color: var(--gold-light); }
.btn-lg { padding: 1em 2em; font-size: 1rem; }
.btn-sm { padding: 0.6em 1.2em; font-size: 0.85rem; }
.btn-block { width: 100%; }

/* =========================================================
   Header
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--ink);
  border-bottom: 1px solid var(--border-dark);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  padding-top: 14px;
  padding-bottom: 14px;
}
.brand { flex-shrink: 0; line-height: 0; }
.brand-logo { height: 34px; width: auto; }

.main-nav {
  display: flex;
  gap: 28px;
  margin-right: auto;
  flex-wrap: wrap;
}
.main-nav a {
  font-size: 0.9rem;
  color: var(--text-on-dark-muted);
  transition: color 0.15s ease;
}
.main-nav a:hover { color: var(--gold-light); }

.header-cta { flex-shrink: 0; }

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: transparent;
  border: 1px solid var(--border-dark);
  border-radius: var(--radius);
  cursor: pointer;
  margin-left: auto;
}
.menu-toggle span {
  display: block;
  height: 2px;
  width: 18px;
  margin: 0 auto;
  background: var(--text-on-dark);
}

.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 8px 24px 20px;
  background: var(--ink);
  border-top: 1px solid var(--border-dark);
}
.mobile-nav a {
  padding: 12px 4px;
  color: var(--text-on-dark-muted);
  border-bottom: 1px solid var(--border-dark);
  font-size: 0.95rem;
}
.mobile-nav .btn { margin-top: 14px; }
.site-header.nav-open .mobile-nav { display: flex; }

/* =========================================================
   Hero
   ========================================================= */
.hero {
  position: relative;
  color: var(--text-on-dark);
  overflow: hidden;
}
.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}
.hero-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(10,15,28,0.9) 0%, rgba(10,15,28,0.86) 45%, rgba(10,15,28,0.96) 100%),
    rgba(10, 15, 28, 0.35);
}
.hero-grid {
  position: relative;
  z-index: 1;
  padding: 76px 24px 72px;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
}
.hero-copy { max-width: 620px; }
.hero h1 {
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  margin-bottom: 0.5em;
}
.hero-lead {
  font-size: 1.05rem;
  color: var(--text-on-dark-muted);
  max-width: 54ch;
}
.hero-lead strong { color: var(--gold-light); font-weight: 600; }
.hero-scroll-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  margin-top: 0.6em;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-on-dark-muted);
  border-bottom: 1px solid var(--border-dark);
  padding-bottom: 2px;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.hero-scroll-link:hover { color: var(--gold-light); border-color: var(--gold-light); }

.hero-form-wrap { position: relative; }
.hero-form-wrap .form-card { max-width: 480px; margin-left: auto; }
.hero-form-wrap .eyebrow { margin-bottom: 0.5em; }
.hero-form-wrap h2 {
  font-size: 1.5rem;
  margin-bottom: 0.3em;
}
.form-card-lead {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 1.4em;
}

/* =========================================================
   Trust bar
   ========================================================= */
.trust-bar {
  background: var(--bone);
  border-bottom: 1px solid var(--border);
}
.trust-bar-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 32px;
  justify-content: space-between;
  padding: 16px 24px;
  font-size: 0.88rem;
  color: var(--text-muted);
}
.trust-mark { color: var(--gold-dark); font-weight: 600; }

/* =========================================================
   Sections (generic)
   ========================================================= */
.section { padding: 96px 0; }
.section-bone { background: var(--bone); }
.section-ink { background: var(--ink); color: var(--text-on-dark); }
.section-ink h2, .section-ink h3 { color: var(--text-on-dark); }
.section-ink p { color: var(--text-on-dark-muted); }

.section-head { max-width: 680px; margin-bottom: 48px; }
.section-head h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); }
.section-lead { font-size: 1.08rem; color: var(--text-muted); margin-top: 0.6em; }

/* =========================================================
   Issue cards
   ========================================================= */
.card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}
.issue-card {
  background: var(--card-bg);
  padding: 36px;
  position: relative;
}
.issue-card::before {
  content: "";
  display: block;
  width: 34px;
  height: 3px;
  background: var(--gold);
  margin-bottom: 20px;
}
.issue-card h3 {
  font-size: 1.18rem;
  margin-bottom: 0.5em;
}
.issue-card p { color: var(--text-muted); margin: 0; font-size: 0.98rem; }

/* =========================================================
   Estudo de caso (dossier)
   ========================================================= */
.dossier-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 64px;
  align-items: center;
}
.dossier-copy h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); }
.dossier-copy p { max-width: 52ch; }
.dossier-copy .btn { margin-top: 1.6em; }

.dossier-checklist {
  list-style: none;
  margin: 1.6em 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.dossier-checklist li {
  position: relative;
  padding-left: 30px;
  color: var(--text-on-dark);
  font-size: 0.98rem;
}
.dossier-checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.35em;
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--gold);
  border-radius: 2px;
}
.dossier-checklist li::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 0.55em;
  width: 8px;
  height: 4px;
  border-left: 1.5px solid var(--gold);
  border-bottom: 1.5px solid var(--gold);
  transform: rotate(-45deg);
}

.dossier-visual {
  position: relative;
}
.dossier-visual img {
  width: 100%;
  height: auto;
  border: 1px solid var(--border-dark);
  filter: sepia(8%) saturate(92%);
}
.dossier-stamp {
  position: absolute;
  bottom: 20px;
  right: 20px;
  border: 2px solid var(--gold);
  color: var(--gold-light);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: center;
  line-height: 1.4;
  padding: 10px 14px;
  transform: rotate(-6deg);
  background: rgba(10, 15, 28, 0.55);
  backdrop-filter: blur(2px);
}

/* =========================================================
   Como atuamos (process)
   ========================================================= */
.process-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}
.process-list li {
  border-top: 2px solid var(--gold);
  padding-top: 18px;
}
.process-index {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--gold-dark);
  margin-bottom: 10px;
  letter-spacing: 0.05em;
}
.process-list h3 { font-size: 1.05rem; margin-bottom: 0.4em; }
.process-list p { color: var(--text-muted); font-size: 0.95rem; margin: 0; }

/* =========================================================
   Sobre / about
   ========================================================= */
.about-grid {
  display: grid;
  grid-template-columns: 0.75fr 1.25fr;
  gap: 64px;
  align-items: start;
}
.about-visual img {
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}
.about-copy h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); }
.about-copy p { color: var(--text-muted); max-width: 62ch; }
.about-copy strong { color: var(--text); }

.pillar-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
  margin-top: 2.2em;
}
.pillar h3 {
  font-size: 1.02rem;
  margin-bottom: 0.4em;
  position: relative;
  padding-left: 18px;
}
.pillar h3::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.3em;
  width: 8px;
  height: 8px;
  background: var(--gold);
  border-radius: 50%;
}
.pillar p { color: var(--text-muted); font-size: 0.94rem; margin: 0; }

/* =========================================================
   Formulário
   ========================================================= */
.form-card {
  background: var(--paper);
  color: var(--text);
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: var(--shadow-soft);
  position: relative;
}
.form-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold-light));
}

#leadForm { display: flex; flex-direction: column; gap: 26px; }
#leadForm[hidden] { display: none; }

.field-group { display: flex; flex-direction: column; gap: 8px; }
.field-group legend, .field-group > label {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--text);
}
.field-group legend { padding: 0; margin: 0 0 4px; }
.req { color: var(--gold-dark); }

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

input[type="text"],
input[type="tel"],
input[type="email"] {
  font-family: var(--font-body);
  font-size: 0.98rem;
  padding: 0.75em 0.9em;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  color: var(--text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input:focus {
  border-color: var(--gold-dark);
  box-shadow: 0 0 0 3px rgba(201, 161, 92, 0.18);
  outline: none;
}

.radio-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.radio-pill {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0.65em 1.1em;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  cursor: pointer;
  font-size: 0.9rem;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.radio-pill input {
  position: absolute;
  opacity: 0;
  width: 1px; height: 1px;
}
.radio-pill:has(input:checked) {
  border-color: var(--gold-dark);
  background: rgba(201, 161, 92, 0.12);
}
.radio-pill:has(input:focus-visible) {
  outline: 2px solid var(--gold-dark);
  outline-offset: 2px;
}

.field-error {
  display: none;
  color: #a4373a;
  font-size: 0.82rem;
  margin: 0;
}
.field-group.error .field-error { display: block; }
.field-group.error input:not([type="radio"]),
.field-group.error .radio-row { outline: 1.5px solid #a4373a; outline-offset: 3px; border-radius: var(--radius); }

.form-fineprint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0;
}

.form-success {
  text-align: center;
  padding: 40px 10px;
}
.success-icon { width: 52px; height: 52px; color: var(--gold-dark); margin-bottom: 18px; }
.form-success h3 { font-size: 1.3rem; margin-bottom: 0.4em; }
.form-success p { color: var(--text-muted); max-width: 40ch; margin: 0 auto; }

/* =========================================================
   FAQ
   ========================================================= */
.accordion {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--border);
}
.accordion-item {
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
}
.accordion-item summary {
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 700;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.accordion-item summary::-webkit-details-marker { display: none; }
.accordion-item summary::after {
  content: "+";
  font-family: var(--font-body);
  font-size: 1.4rem;
  color: var(--gold-dark);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}
.accordion-item[open] summary::after { transform: rotate(45deg); }
.accordion-item p {
  margin: 14px 0 0;
  color: var(--text-muted);
  max-width: 70ch;
}

/* =========================================================
   Final CTA
   ========================================================= */
.final-cta {
  background: var(--bone);
  border-top: 1px solid var(--border);
}
.final-cta-inner {
  padding: 56px 24px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}
.final-cta-inner p {
  font-family: var(--font-display);
  font-size: 1.3rem;
  margin: 0;
  max-width: 34ch;
}

/* =========================================================
   Footer
   ========================================================= */
.site-footer { background: var(--ink); color: var(--text-on-dark-muted); }
.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  padding: 64px 24px 40px;
}
.footer-brand img { margin-bottom: 18px; }
.footer-brand p { font-size: 0.9rem; margin: 0 0 6px; }
.footer-brand a:hover { color: var(--gold-light); }

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-end;
}
.footer-nav a { font-size: 0.9rem; }
.footer-nav a:hover { color: var(--gold-light); }

.footer-bottom {
  border-top: 1px solid var(--border-dark);
  padding: 22px 24px 32px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.78rem;
}
.footer-bottom p { margin: 0; }

/* =========================================================
   Mobile sticky CTA
   ========================================================= */
.mobile-sticky-cta {
  display: none;
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 60;
  background: var(--gold);
  color: var(--ink);
  text-align: center;
  font-weight: 600;
  padding: 14px;
  border-radius: 999px;
  box-shadow: 0 12px 30px -8px rgba(10, 15, 28, 0.5);
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 960px) {
  .main-nav { display: none; }
  .header-cta { display: none; }
  .menu-toggle { display: flex; }

  .dossier-grid,
  .about-grid,
  .hero-grid { grid-template-columns: 1fr; }
  .about-visual img { max-width: 320px; }
  .hero-form-wrap .form-card { margin-left: 0; max-width: 100%; }

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

  .footer-grid { grid-template-columns: 1fr; }
  .footer-nav { align-items: flex-start; }

  .mobile-sticky-cta { display: block; }
  body { padding-bottom: 76px; }
}

@media (max-width: 640px) {
  .section { padding: 64px 0; }
  .hero-grid { padding: 40px 20px 48px; }
  .card-grid { grid-template-columns: 1fr; }
  .process-list { grid-template-columns: 1fr; }
  .pillar-grid { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .form-card { padding: 28px 22px; }
  .trust-bar-inner { flex-direction: column; gap: 6px; }
  .final-cta-inner { flex-direction: column; align-items: flex-start; }
}
