/* ============================================================
   Tiago Bessa Advocacia - Landing page trabalhista
   Mobile-first · sem dependências externas
   ============================================================ */

:root {
  --bg-base: #FAF7F2;
  --bg-alt: #F1ECE4;
  --bg-card: #FFFFFF;
  --border: #E2DAD0;
  --text: #2B2E33;
  --text-soft: #6B7076;
  --accent: #8C7355;
  --cta: #2B2E33;
  --whatsapp: #25D366;

  /* Topo escuro (header + hero), no estilo do site institucional */
  --dark-bg: #141518;
  --dark-text: #F5F1EA;
  --dark-soft: #B9BBBE;
  --gold: #C4A170;

  --font-heading: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", -apple-system, "Segoe UI", Roboto, sans-serif;

  --radius: 8px;
  --shadow: 0 1px 3px rgba(43, 46, 51, 0.06), 0 4px 12px rgba(43, 46, 51, 0.05);
  --section-gap: 56px;
  --header-height: 68px;
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 16px);
}

body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg-base);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
}

/* ---------- Tipografia ---------- */
h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.25;
  color: var(--text);
}

h1 { font-size: clamp(1.75rem, 5.5vw, 2.75rem); }
h2 { font-size: clamp(1.5rem, 4.5vw, 2.125rem); margin-bottom: 0.75rem; }
h3 { font-size: 1.125rem; }

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: 20px;
}

.container--narrow { max-width: 760px; }

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

.section__intro {
  color: var(--text-soft);
  margin-bottom: 1.75rem;
  max-width: 56ch;
}

/* ---------- Botões ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 22px;
  border: 0;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.15s ease;
}

.btn--primary {
  background: var(--cta);
  color: #FFFFFF;
}

.btn--primary:hover { background: #43474e; }

.btn--whatsapp {
  background: var(--whatsapp);
  color: #FFFFFF;
}

.btn--whatsapp:hover { background: #1fb457; }

.btn--sm { padding: 10px 16px; font-size: 0.9375rem; }
.btn--lg { padding: 15px 26px; font-size: 1.0625rem; }
.btn--block { width: 100%; }

.btn:active { transform: scale(0.98); }

.icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

/* ---------- Header ---------- */
.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-height);
  background: rgba(20, 21, 24, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(245, 241, 234, 0.08);
}

/* Botão do header: contornado em dourado sobre o fundo escuro */
.header .btn--primary {
  background: transparent;
  border: 1px solid rgba(196, 161, 112, 0.55);
  color: var(--gold);
}

.header .btn--primary:hover {
  background: rgba(196, 161, 112, 0.12);
}

.header__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.header__logo {
  width: auto;
  height: 40px;
}

/* ---------- Hero (escuro, texto à esquerda, respiro à direita) ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--dark-bg);
  padding-top: calc(var(--header-height) + 48px);
  padding-bottom: calc(var(--section-gap) + 16px);
}

/* Marca d'água "TB" ocupando o espaço à direita */
.hero::after {
  content: "TB";
  position: absolute;
  right: -4rem;
  bottom: -8rem;
  font-family: var(--font-heading);
  font-size: clamp(18rem, 40vw, 34rem);
  line-height: 1;
  color: rgba(245, 241, 234, 0.04);
  pointer-events: none;
  user-select: none;
}

.hero__grid { position: relative; z-index: 1; }

.hero__content { max-width: 620px; }

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

.hero__kicker {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 1.25rem;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}

.hero__kicker::before {
  content: "";
  width: 40px;
  height: 1px;
  background: var(--gold);
  flex-shrink: 0;
}

.hero__sub {
  margin-top: 1.25rem;
  color: var(--dark-soft);
  max-width: 54ch;
}

.hero__actions {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}

/* CTA primário do hero: dourado com texto escuro, como na referência */
.hero .btn--primary {
  background: var(--gold);
  color: #17181B;
}

.hero .btn--primary:hover { background: #d1b183; }

.hero__form-link {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  color: var(--dark-soft);
  font-size: 0.9375rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.hero__form-link:hover { color: var(--dark-text); }

.about__photo {
  width: 100%;
  max-width: 420px;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

/* ---------- Barra de credibilidade ---------- */
.cred {
  background: var(--bg-alt);
  border-block: 1px solid var(--border);
  padding-block: 28px;
}

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

.cred__item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.cred__item .icon { color: var(--accent); margin-top: 2px; }

.cred__item p {
  font-size: 0.875rem;
  line-height: 1.4;
  color: var(--text);
}

/* ---------- Cards de problemas ---------- */
.problems__grid {
  display: grid;
  gap: 16px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

.card--link {
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-decoration: none;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.card--link:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.card--link h3 { font-size: 1.0625rem; }

.card--link p {
  font-size: 0.9375rem;
  color: var(--text-soft);
  flex-grow: 1;
}

.card__cta {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
}

/* ---------- Como funciona ---------- */
.steps__list {
  list-style: none;
  display: grid;
  gap: 28px;
  margin-top: 2rem;
  counter-reset: step;
}

.steps__item { max-width: 40ch; }

.steps__number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 12px;
}

.steps__item h3 { margin-bottom: 6px; }
.steps__item p { color: var(--text-soft); font-size: 0.9375rem; }

/* ---------- Sobre ---------- */
.about__grid {
  display: grid;
  gap: 32px;
}

.about__media { justify-self: center; }

.about__content h2 { margin-bottom: 1.25rem; }
.about__content p + p { margin-top: 1rem; }

.about__list {
  list-style: none;
  margin: 1.5rem 0 1.75rem;
  display: grid;
  gap: 10px;
}

.about__list li {
  position: relative;
  padding-left: 26px;
  font-size: 0.9375rem;
}

.about__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 12px;
  height: 7px;
  border-left: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
}

/* ---------- Diferenciais ---------- */
.diffs__grid {
  display: grid;
  gap: 20px;
  margin-top: 1.75rem;
}

.diffs__item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.diffs__item h3 { margin-bottom: 8px; color: var(--accent); }
.diffs__item p { font-size: 0.9375rem; color: var(--text-soft); }

/* ---------- FAQ ---------- */
.faq h2 { margin-bottom: 1.5rem; }

.faq__item {
  border-bottom: 1px solid var(--border);
}

.faq__item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 48px;
  padding-block: 16px;
  font-family: var(--font-heading);
  font-size: 1.0625rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

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

.faq__item summary::after {
  content: "";
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}

.faq__item[open] summary::after { transform: rotate(-135deg); }

.faq__item p {
  padding-bottom: 20px;
  color: var(--text-soft);
}

/* ---------- CTA final / formulário ---------- */
.cta-final__grid {
  display: grid;
  gap: 40px;
}

.form {
  display: grid;
  gap: 18px;
}

.form__field {
  display: grid;
  gap: 6px;
}

.form__field label {
  font-size: 0.9375rem;
  font-weight: 600;
}

.form__optional {
  font-weight: 400;
  color: var(--text-soft);
}

.form__field input,
.form__field select,
.form__field textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.form__field textarea {
  resize: vertical;
  min-height: 110px;
}

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

.form__consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.form__consent input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-top: 3px;
  accent-color: var(--accent);
  flex-shrink: 0;
}

.form__consent label {
  font-size: 0.875rem;
  color: var(--text-soft);
}

.form__consent a {
  color: var(--accent);
  text-underline-offset: 2px;
}

.form__error {
  font-size: 0.9375rem;
  color: #9C3B2E;
}

.form__success {
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  font-size: 0.9375rem;
}

.cta-final__aside {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  height: fit-content;
}

.cta-final__aside h3 { margin-bottom: 8px; }

.cta-final__aside p {
  font-size: 0.9375rem;
  color: var(--text-soft);
  margin-bottom: 18px;
}

/* ---------- Rodapé ---------- */
.footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding-block: 48px 0;
}

.footer__grid {
  display: grid;
  gap: 28px;
  padding-bottom: 40px;
}

.footer__brand img { height: 40px; width: auto; margin-bottom: 12px; }

.footer__brand p {
  font-size: 0.9375rem;
  color: var(--text-soft);
  max-width: 32ch;
}

.footer__col h3 {
  font-size: 0.9375rem;
  margin-bottom: 8px;
  color: var(--accent);
}

.footer__col p {
  font-size: 0.9375rem;
  color: var(--text-soft);
}

.footer__col p + p { margin-top: 6px; }

.footer__col a {
  color: var(--text-soft);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  min-height: 32px;
}

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

.footer__bottom {
  border-top: 1px solid var(--border);
  padding-block: 20px;
}

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
}

.footer__bottom p {
  font-size: 0.8125rem;
  color: var(--text-soft);
}

.footer__credit a {
  color: var(--text-soft);
  text-underline-offset: 2px;
}

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

/* ---------- Botão flutuante WhatsApp (mobile) ---------- */
.wa-float {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--whatsapp);
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.4);
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.wa-float .icon { width: 28px; height: 28px; }

.wa-float.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* ---------- Acessibilidade ---------- */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

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

/* ============================================================
   Desktop (≥ 768px)
   ============================================================ */
@media (min-width: 768px) {
  :root { --section-gap: 80px; }

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

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

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

  .about__grid {
    grid-template-columns: 0.8fr 1.2fr;
    gap: 56px;
    align-items: start;
  }

  .about__media {
    justify-self: start;
    position: sticky;
    top: calc(var(--header-height) + 24px);
  }

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

  .cta-final__grid {
    grid-template-columns: 1.2fr 0.8fr;
    gap: 56px;
    align-items: start;
  }

  .footer__grid { grid-template-columns: 1.3fr 1fr 1fr 1fr; }

  /* Botão flutuante: apenas no mobile */
  .wa-float { display: none; }
}

@media (min-width: 1024px) {
  .problems__grid { grid-template-columns: repeat(3, 1fr); }
}
