/* ==========================================================================
   Guella Advocacia — Design System Mobile-First para Areas Especializadas
   Paleta institucional: Navy #1a3a5c | Gold #c8a84b | Light #f5f7fa
   Zero dependencias de jQuery / FontAwesome para maximo desempenho mobile.
   ========================================================================== */

:root {
  --navy: #1a3a5c;
  --navy-dark: #0f2339;
  --navy-deeper: #0a1828;
  --navy-light: #2a5282;
  --gold: #c8a84b;
  --gold-hover: #b8973b;
  --gold-text: #7a5c12;
  --bg: #ffffff;
  --bg-alt: #f5f7fa;
  --bg-subtle: #eef2f7;
  --text: #1f2937;
  --text-strong: #0f2339;
  --muted: #4b5563;
  --border: #d8e0eb;
  --ok: #1b653e;
  --ok-bg: #eefbf3;
  --err: #b91c1c;
  --err-bg: #fef2f2;
  --radius: 10px;
  --shadow-sm: 0 2px 10px rgba(15, 35, 57, 0.06);
  --shadow-md: 0 8px 28px rgba(15, 35, 57, 0.12);
  --ease: 0.22s ease;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Lora', Georgia, 'Times New Roman', serif;
  font-size: clamp(1rem, 0.96rem + 0.25vw, 1.09rem);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
.btn,
.eyebrow,
.brand,
.topbar-nav,
.mobile-nav,
.breadcrumb,
.pill,
label,
summary {
  font-family: 'Raleway', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
}

h1,
h2,
h3,
h4 {
  color: var(--navy-dark);
  line-height: 1.24;
  margin: 0 0 0.65em;
  font-weight: 700;
}

h1 {
  font-size: clamp(1.65rem, 1.15rem + 2.2vw, 2.65rem);
  text-wrap: balance;
}

h2 {
  font-size: clamp(1.35rem, 1.1rem + 1.15vw, 1.9rem);
  padding-bottom: 0.45em;
  border-bottom: 2px solid var(--gold);
  display: inline-block;
}

h3 {
  font-size: clamp(1.08rem, 1rem + 0.35vw, 1.25rem);
}

p {
  margin: 0 0 1.05em;
}

a {
  color: var(--navy);
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--gold-text);
}

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

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

/* Acessibilidade: oculto visualmente, mantido para leitores de tela */
.visually-hidden:where(:not(:focus-within, :active)) {
  position: absolute !important;
  clip-path: inset(50%) !important;
  overflow: hidden !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  border: 0 !important;
  white-space: nowrap !important;
}

.skip-link:focus {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 1000;
  background: var(--gold);
  color: var(--navy-dark);
  font-family: 'Raleway', sans-serif;
  font-weight: 700;
  padding: 0.75rem 1.15rem;
  border-radius: 6px;
  text-decoration: none;
  box-shadow: var(--shadow-md);
}

.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1rem;
}

.narrow {
  max-width: 820px;
}

.small {
  font-size: 0.88rem;
  color: var(--muted);
}

.lead {
  font-size: clamp(1.02rem, 0.96rem + 0.35vw, 1.18rem);
  line-height: 1.65;
}

.section-intro {
  max-width: 760px;
  margin-bottom: 1.75rem;
  color: var(--muted);
}

/* =================== TOPBAR & NAVEGACAO =================== */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  gap: 0.75rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--navy-dark);
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  min-height: 44px;
}

.brand img {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
}

.topbar-nav {
  display: none;
  align-items: center;
  gap: 1.25rem;
}

.topbar-nav a {
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--navy-dark);
  padding: 0.5rem 0.25rem;
}

.topbar-nav a:hover {
  color: var(--gold-text);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  min-height: 48px;
  padding: 0.5rem;
  background: transparent;
  color: var(--navy-dark);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
}

.nav-toggle:hover {
  border-color: var(--navy);
}

.mobile-nav {
  background: var(--navy-dark);
  border-bottom: 2px solid var(--gold);
  padding: 0.75rem 1rem 1.25rem;
}

.mobile-nav[hidden] {
  display: none;
}

.mobile-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.mobile-nav a {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0.5rem 0.75rem;
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  border-radius: 6px;
}

.mobile-nav a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--gold);
}

/* =================== BOTOES =================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.75rem 1.35rem;
  background: var(--gold);
  color: var(--navy-dark);
  border: 2px solid var(--gold);
  border-radius: 6px;
  font-size: 0.94rem;
  font-weight: 700;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: background-color var(--ease), border-color var(--ease), transform var(--ease);
}

.btn:hover {
  background: var(--gold-hover);
  border-color: var(--gold-hover);
  color: var(--navy-dark);
  transform: translateY(-1px);
}

.btn:disabled {
  opacity: 0.65;
  cursor: wait;
  transform: none;
}

.btn-small {
  min-height: 44px;
  padding: 0.45rem 0.95rem;
  font-size: 0.85rem;
}

.btn-ghost {
  background: transparent;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.65);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: #ffffff;
  color: #ffffff;
}

.btn-block {
  width: 100%;
  min-height: 52px;
}

/* =================== BREADCRUMB & HERO =================== */

.breadcrumb-bar {
  background: var(--navy-deeper);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.55rem 0;
}

.breadcrumb ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.72);
}

.breadcrumb a {
  color: rgba(255, 255, 255, 0.86);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--gold);
  text-decoration: underline;
}

.breadcrumb li + li::before {
  content: '›';
  margin-right: 0.4rem;
  color: var(--gold);
}

.hero {
  background: linear-gradient(135deg, var(--navy-deeper) 0%, var(--navy) 100%);
  color: #edf2f7;
  padding: 2rem 0 2.75rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
  align-items: center;
}

.eyebrow {
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.11em;
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 0.65rem;
}

.hero h1 {
  color: #ffffff;
  margin-bottom: 0.7rem;
}

.hero .lead {
  color: rgba(255, 255, 255, 0.88);
  margin-bottom: 1.35rem;
}

.hero-cta {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.4rem;
}

.trust-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.pill {
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(200, 168, 75, 0.42);
  border-radius: 999px;
  padding: 0.35rem 0.8rem;
}

.hero-media {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(200, 168, 75, 0.45);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.32);
  aspect-ratio: 16 / 9;
  background: var(--navy-dark);
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* =================== BLOCOS DE CONTEUDO =================== */

.block {
  padding: 2.75rem 0;
}

.block.alt {
  background: var(--bg-alt);
}

/* Defer de renderizacao somente em secoes estritamente abaixo da dobra */
.lp-deferred {
  content-visibility: auto;
  contain-intrinsic-size: auto none auto 540px;
}

.anchor-target {
  scroll-margin-top: 5.5rem;
}

.anchor-target:target h2 {
  animation: anchor-flash 2s ease-out;
}

@keyframes anchor-flash {
  0% {
    background-color: rgba(200, 168, 75, 0.25);
  }
  100% {
    background-color: transparent;
  }
}

.callout {
  background: var(--bg-subtle);
  border-left: 4px solid var(--gold);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.15rem 1.3rem;
  margin: 1.5rem 0;
}

.callout h3 {
  margin-bottom: 0.4rem;
}

.callout p:last-child {
  margin-bottom: 0;
}

.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.1rem;
  margin-top: 1.35rem;
}

.card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-top: 3px solid var(--navy);
  border-radius: var(--radius);
  padding: 1.35rem;
  box-shadow: var(--shadow-sm);
}

.card-gold {
  border-top-color: var(--gold);
}

.card h3 {
  color: var(--navy-dark);
  margin-bottom: 0.55rem;
}

.card p:last-child,
.card ul:last-child {
  margin-bottom: 0;
}

.card ul {
  padding-left: 1.15rem;
  margin: 0.5rem 0;
}

.card li + li {
  margin-top: 0.35rem;
}

.checklist {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem 1.4rem;
  box-shadow: var(--shadow-sm);
}

.check-list {
  padding-left: 1.25rem;
  margin: 0.5rem 0 0;
}

.check-list li + li {
  margin-top: 0.55rem;
}

.steps-list {
  padding-left: 1.35rem;
  margin: 0.75rem 0 0;
}

.steps-list li + li {
  margin-top: 0.75rem;
}

.sc-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.1rem;
  margin-top: 1.25rem;
}

.article-links {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: 1.25rem;
}

.article-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: #ffffff;
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius);
  padding: 1.2rem;
  box-shadow: var(--shadow-sm);
}

.article-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.45rem;
}

.article-card p {
  font-size: 0.94rem;
  color: var(--muted);
  margin-bottom: 0.85rem;
}

.article-card a.link-more {
  font-family: 'Raleway', sans-serif;
  font-weight: 700;
  font-size: 0.88rem;
  text-decoration: none;
  color: var(--navy);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.article-card a.link-more:hover {
  color: var(--gold-text);
  text-decoration: underline;
}

/* =================== ACCORDION NATIVO (<details>) =================== */

.accordion {
  max-width: 820px;
  margin-top: 1.35rem;
}

.accordion details {
  background: #ffffff;
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.accordion summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  min-height: 48px;
  padding: 0.95rem 1.2rem;
  font-weight: 700;
  font-size: 0.98rem;
  line-height: 1.4;
  color: var(--navy-dark);
}

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

/* Marcador customizado proximo ao texto para facilitar leitura vertical */
.accordion summary::before {
  content: '';
  inline-size: 1.05rem;
  block-size: 1.05rem;
  flex-shrink: 0;
  background-color: var(--gold-text);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' fill='none' stroke='%23000' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / contain;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' fill='none' stroke='%23000' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / contain;
  rotate: -90deg;
}

.accordion details[open] > summary::before {
  rotate: 0deg;
}

.accordion summary:hover {
  color: var(--gold-text);
}

.accordion details > .faq-body {
  padding: 0 1.2rem 1.15rem 2.95rem;
  color: var(--text);
  font-size: 0.96rem;
}

.accordion details > .faq-body p:last-child {
  margin-bottom: 0;
}

.accordion details::details-content {
  interpolate-size: allow-keywords;
  overflow: clip;
  contain: layout;
}

.accordion details:not([open])::details-content {
  block-size: 0;
}

@media (prefers-reduced-motion: no-preference) {
  .accordion summary::before {
    transition: rotate 0.2s ease;
  }

  .accordion details::details-content {
    transition: block-size 0.28s ease-in-out, content-visibility 0.28s ease-in-out, display 0.28s ease-in-out;
    transition-behavior: allow-discrete;
  }
}

/* =================== CONTATO & FORMULARIO =================== */

.contact {
  background: var(--navy-dark);
  color: #e5ebf3;
}

.contact h2 {
  color: #ffffff;
}

.contact h3 {
  color: #ffffff;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: start;
}

.direct-list {
  list-style: none;
  margin: 1.25rem 0;
  padding: 0;
}

.direct-list li + li {
  margin-top: 0.7rem;
}

.direct-list a {
  color: var(--gold);
  font-family: 'Raleway', sans-serif;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.direct-list a:hover {
  color: #ffffff;
  text-decoration: underline;
}

.form-card {
  background: #ffffff;
  color: var(--text);
  border-radius: var(--radius);
  padding: 1.4rem;
  box-shadow: var(--shadow-md);
}

.form-card h3 {
  color: var(--navy-dark);
  margin-bottom: 0.45rem;
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0 1rem;
}

.field {
  display: flex;
  flex-direction: column;
  margin-bottom: 1.1rem;
}

.field label {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--navy-dark);
  margin-bottom: 0.25rem;
}

.field-hint {
  display: block;
  color: var(--muted);
  font-family: 'Raleway', sans-serif;
  font-size: 0.8rem;
  margin-bottom: 0.35rem;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 0.7rem 0.85rem;
  border: 1px solid #8a99ad;
  border-radius: 6px;
  font: inherit;
  font-size: max(1rem, 1em);
  line-height: 1.45;
  background: #ffffff;
  color: var(--text);
  transition: border-color var(--ease), box-shadow var(--ease), background-color var(--ease);
}

.field textarea {
  min-height: 7.5rem;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(200, 168, 75, 0.28);
}

.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 1px;
}

.field-error {
  display: none;
  margin-top: 0.35rem;
  font-family: 'Raleway', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--err);
}

:is(input, select, textarea):is(:user-invalid, .user-invalid-fallback) {
  border-color: var(--err);
  background-color: var(--err-bg);
}

:is(input, select, textarea):is(:user-invalid, .user-invalid-fallback) + .field-error {
  display: block;
}

:is(input, select, textarea):is(:user-valid, .user-valid-fallback) {
  border-color: var(--ok);
}

.hp-wrap {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

#form-feedback {
  padding: 0.85rem 1rem;
  border-radius: 6px;
  margin-bottom: 1rem;
  font-family: 'Raleway', sans-serif;
  font-size: 0.92rem;
  font-weight: 600;
  background: var(--bg-subtle);
  color: var(--navy-dark);
}

#form-feedback.success {
  background: var(--ok-bg);
  color: var(--ok);
  border: 1px solid #9ae6b4;
}

#form-feedback.error {
  background: var(--err-bg);
  color: var(--err);
  border: 1px solid #feb2b2;
}

.consent {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 1rem;
}

@media (pointer: coarse) {
  .field input,
  .field select {
    min-height: 52px;
  }
}

/* =================== FOOTER & WHATSAPP =================== */

.footer {
  background: var(--navy-deeper);
  color: #b7c3d3;
  padding: 2.25rem 0 calc(5.5rem + env(safe-area-inset-bottom, 0px));
  font-size: 0.9rem;
}

.footer strong {
  color: #ffffff;
}

.footer a {
  color: var(--gold);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.25rem;
  list-style: none;
  margin: 1rem 0;
  padding: 0;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
  font-family: 'Raleway', sans-serif;
  font-weight: 600;
}

.footer-links a:hover {
  text-decoration: underline;
}

.wa-float {
  position: fixed;
  right: 1rem;
  bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  z-index: 40;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #1ebe5d;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
  transition: transform var(--ease);
}

.wa-float:hover {
  transform: scale(1.06);
  color: #ffffff;
}

/* =================== BREAKPOINTS PROGRESSIVOS (MOBILE-FIRST) =================== */

@media (min-width: 640px) {
  .wrap {
    padding: 0 1.5rem;
  }

  .hero-cta {
    flex-direction: row;
    flex-wrap: wrap;
  }

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

  .sc-grid,
  .article-links,
  .field-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .form-card {
    padding: 1.85rem;
  }
}

@media (min-width: 900px) {
  .nav-toggle,
  .mobile-nav {
    display: none !important;
  }

  .topbar-nav {
    display: flex;
  }

  .hero {
    padding: 3.5rem 0 3.75rem;
  }

  .hero-grid {
    grid-template-columns: 1.15fr 0.85fr;
    gap: 2.5rem;
  }

  .block {
    padding: 3.75rem 0;
  }

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

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

  .contact-grid {
    grid-template-columns: 0.9fr 1.1fr;
    gap: 2.75rem;
  }
}

@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;
  }
}

@media print {
  .topbar,
  .mobile-nav,
  .wa-float {
    display: none !important;
  }

  .hero {
    background: #ffffff;
    color: #000000;
  }

  .hero h1,
  .hero .lead {
    color: #000000;
  }
}
