/* ================================================================
   JOÃO MARTINS — GESTOR DE TRÁFEGO PAGO
   style.css — Estilos principais
   Organização: variáveis → reset → base → layout → componentes → seções
   ================================================================ */

/* ----------------------------------------------------------------
   1. VARIÁVEIS DE MARCA
   ---------------------------------------------------------------- */
:root {
  /* Paleta monocromática (manual de marca) */
  --cor-grafite:        #1A1A1A; /* fundos escuros, texto principal */
  --cor-off-white:      #F2F0EB; /* fundos claros, texto sobre grafite */
  --cor-cinza-medio:    #6E6E6E; /* textos de apoio, legendas */
  --cor-grafite-suave:  #3A3A38; /* cards em fundo escuro */

  /* Tipografia */
  --fonte-base: 'DM Sans', sans-serif;

  /* Espaçamentos */
  --espaco-xs:   0.5rem;
  --espaco-sm:   1rem;
  --espaco-md:   2rem;
  --espaco-lg:   4rem;
  --espaco-xl:   6rem;

  /* Bordas */
  --raio-sm:   8px;
  --raio-md:   16px;
  --raio-lg:   24px;
  --raio-pill: 9999px;

  /* Transições */
  --transicao: 0.25s ease;

  /* Container */
  --container-max: 1200px;
  --container-px:  clamp(1rem, 5vw, 2.5rem);
}

/* ----------------------------------------------------------------
   2. RESET & BASE
   ---------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px; /* compensa o header fixo */
  font-size: 16px;
}

body {
  font-family: var(--fonte-base);
  font-weight: 400;
  color: var(--cor-grafite);
  background-color: var(--cor-off-white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

button {
  cursor: pointer;
  font-family: inherit;
  border: none;
  background: none;
}

/* Foco visível para acessibilidade */
:focus-visible {
  outline: 3px solid var(--cor-grafite);
  outline-offset: 3px;
  border-radius: var(--raio-sm);
}

/* ----------------------------------------------------------------
   3. TIPOGRAFIA FLUIDA
   ---------------------------------------------------------------- */
h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.2;
}

h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.75rem); }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.375rem); }

p {
  font-size: clamp(0.9375rem, 1.5vw, 1.0625rem);
  line-height: 1.7;
}

strong {
  font-weight: 700;
}

/* ----------------------------------------------------------------
   4. LAYOUT — CONTAINER
   ---------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-px);
}

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

/* ----------------------------------------------------------------
   5. SEÇÕES
   ---------------------------------------------------------------- */
.section {
  padding-block: clamp(4rem, 10vw, 7rem);
  background-color: var(--cor-off-white);
  color: var(--cor-grafite);
}

.section--dark {
  background-color: var(--cor-grafite);
  color: var(--cor-off-white);
}

.section__header {
  text-align: center;
  margin-bottom: clamp(2.5rem, 6vw, 4rem);
}

.section__title {
  margin-bottom: 1rem;
}

.section__subtitle {
  max-width: 620px;
  margin-inline: auto;
  color: var(--cor-cinza-medio);
  font-size: clamp(0.9375rem, 1.5vw, 1.0625rem);
}

.section--dark .section__subtitle {
  color: #a0a09a;
}

.section__cta {
  margin-top: clamp(2rem, 5vw, 3.5rem);
  text-align: center;
}

/* ----------------------------------------------------------------
   6. BOTÕES
   ---------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  border-radius: var(--raio-pill);
  font-family: var(--fonte-base);
  font-weight: 500;
  font-size: 1rem;
  min-height: 52px;
  transition: opacity var(--transicao), transform var(--transicao);
  white-space: nowrap;
}

.btn:hover {
  opacity: 0.85;
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn--primary {
  background-color: var(--cor-grafite);
  color: var(--cor-off-white);
}

.btn--outline {
  background-color: transparent;
  color: var(--cor-off-white);
  border: 2px solid var(--cor-off-white);
}

.btn--outline:hover {
  background-color: rgba(242, 240, 235, 0.1);
}

/* ----------------------------------------------------------------
   7. CABEÇALHO / NAVEGAÇÃO
   ---------------------------------------------------------------- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background-color: var(--cor-off-white);
  border-bottom: 1px solid rgba(26, 26, 26, 0.08);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-px);
}

.nav__logo img {
  height: 32px;
  width: auto;
}

/* Pílula de navegação */
.nav__menu {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  background-color: rgba(26, 26, 26, 0.05);
  border-radius: var(--raio-pill);
  padding: 0.375rem;
}

.nav__link {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  border-radius: var(--raio-pill);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--cor-cinza-medio);
  transition: background-color var(--transicao), color var(--transicao);
  min-height: 44px;
  white-space: nowrap;
}

.nav__link:hover {
  color: var(--cor-grafite);
  background-color: rgba(26, 26, 26, 0.07);
}

.nav__link.active,
.nav__link[aria-current="page"] {
  background-color: var(--cor-grafite);
  color: var(--cor-off-white);
}

.nav__link--cta {
  background-color: var(--cor-grafite);
  color: var(--cor-off-white) !important;
  margin-left: 0.25rem;
}

.nav__link--cta:hover {
  background-color: #333;
}

/* Hambúrguer mobile */
.nav__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 8px;
  border-radius: var(--raio-sm);
  transition: background-color var(--transicao);
}

.nav__toggle:hover {
  background-color: rgba(26, 26, 26, 0.06);
}

.nav__toggle-bar {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--cor-grafite);
  border-radius: 2px;
  transition: transform var(--transicao), opacity var(--transicao);
}

/* Animação hambúrguer → X */
.nav__toggle[aria-expanded="true"] .nav__toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav__toggle[aria-expanded="true"] .nav__toggle-bar:nth-child(2) {
  opacity: 0;
}
.nav__toggle[aria-expanded="true"] .nav__toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ----------------------------------------------------------------
   8. HERO
   ---------------------------------------------------------------- */
.hero {
  padding-top: calc(72px + clamp(3rem, 8vw, 6rem));
  padding-bottom: clamp(4rem, 10vw, 7rem);
  min-height: 100svh;
  display: flex;
  align-items: center;
}

.hero__container {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}

/* Eyebrow badge */
.badge {
  display: inline-block;
  padding: 0.5rem 1.25rem;
  background-color: rgba(26, 26, 26, 0.06);
  border-radius: var(--raio-pill);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--cor-cinza-medio);
  letter-spacing: 0.02em;
  margin-bottom: 1.5rem;
}

.hero__headline {
  margin-bottom: 1.5rem;
}

.hero__subtitle {
  max-width: 520px;
  color: var(--cor-cinza-medio);
  margin-bottom: 2rem;
}

.hero__cta {
  margin-bottom: clamp(2rem, 5vw, 3rem);
}

/* Cards de credibilidade */
.hero__stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.stat-card {
  background-color: rgba(26, 26, 26, 0.04);
  border-radius: var(--raio-md);
  padding: 1.25rem 1.5rem;
  border: 1px solid rgba(26, 26, 26, 0.07);
}

.stat-card__number {
  display: block;
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.stat-card__label {
  font-size: 0.8125rem;
  color: var(--cor-cinza-medio);
  line-height: 1.4;
}

/* Foto do hero */
.hero__photo-wrap {
  display: flex;
  justify-content: center;
}

.hero__photo {
  width: 100%;
  max-width: 420px;
  height: auto;
  aspect-ratio: 2/3;
  object-fit: cover;
  border-radius: var(--raio-lg);

  /* Tratamento monocromático: dessaturação + leve escurecimento */
  filter: grayscale(100%) contrast(1.05) brightness(0.97);
  -webkit-filter: grayscale(100%) contrast(1.05) brightness(0.97);
}

/* ----------------------------------------------------------------
   9. CARDS (dores)
   ---------------------------------------------------------------- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.card {
  padding: 2rem;
  border-radius: var(--raio-md);
}

.card--dark {
  background-color: var(--cor-grafite-suave);
  color: var(--cor-off-white);
}

.card__title {
  font-size: 1.0625rem;
  margin-bottom: 0.75rem;
  color: var(--cor-off-white);
  line-height: 1.4;
}

.card__text {
  font-size: 0.9375rem;
  color: #a0a09a;
  line-height: 1.65;
}

/* ----------------------------------------------------------------
   10. NICHOS
   ---------------------------------------------------------------- */
.nichos-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-bottom: 2rem;
}

.niche-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.625rem 1.5rem;
  border-radius: var(--raio-pill);
  border: 1.5px solid var(--cor-grafite);
  font-size: 0.9375rem;
  font-weight: 500;
  min-height: 44px;
  transition: background-color var(--transicao), color var(--transicao);
}

.niche-badge:hover {
  background-color: var(--cor-grafite);
  color: var(--cor-off-white);
}

.nichos__footnote {
  text-align: center;
  color: var(--cor-cinza-medio);
  max-width: 560px;
  margin-inline: auto;
  font-size: 0.9375rem;
}

/* ----------------------------------------------------------------
   11. SERVIÇOS
   ---------------------------------------------------------------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.card--service {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.card__service-title {
  font-size: 1.25rem;
  color: var(--cor-off-white);
}

.card__service-sub {
  font-size: 0.875rem;
  color: #a0a09a;
  margin-top: -0.5rem;
}

.deliverables {
  list-style: none;
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid rgba(242, 240, 235, 0.12);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.deliverables li {
  font-size: 0.875rem;
  color: #b8b5ae;
  padding-left: 1.25rem;
  position: relative;
  line-height: 1.5;
}

.deliverables li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--cor-cinza-medio);
}

/* ----------------------------------------------------------------
   12. COMO FUNCIONA — TIMELINE
   ---------------------------------------------------------------- */
.steps {
  counter-reset: step;
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: 760px;
  margin-inline: auto;
}

.step {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 1.5rem;
  padding-block: 2rem;
  position: relative;
}

.step:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 35px;
  top: calc(2rem + 44px);
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, rgba(26,26,26,0.12), rgba(26,26,26,0.04));
}

.step__number {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: var(--cor-grafite);
  color: var(--cor-off-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}

.step__title {
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
}

.step__text {
  color: var(--cor-cinza-medio);
  font-size: 0.9375rem;
}

/* ----------------------------------------------------------------
   13. FAQ — ACORDEÃO
   ---------------------------------------------------------------- */
.accordion {
  max-width: 760px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.accordion__item {
  border-bottom: 1px solid rgba(242, 240, 235, 0.12);
}

.accordion__item:first-child {
  border-top: 1px solid rgba(242, 240, 235, 0.12);
}

.accordion__trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem 0;
  text-align: left;
  font-size: 1rem;
  font-weight: 500;
  color: var(--cor-off-white);
  min-height: 56px;
  transition: color var(--transicao);
}

.accordion__trigger:hover {
  color: #c8c5be;
}

.accordion__icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  position: relative;
}

.accordion__icon::before,
.accordion__icon::after {
  content: '';
  position: absolute;
  background-color: currentColor;
  border-radius: 2px;
  transition: transform var(--transicao), opacity var(--transicao);
}

.accordion__icon::before {
  width: 14px;
  height: 2px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.accordion__icon::after {
  width: 2px;
  height: 14px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.accordion__trigger[aria-expanded="true"] .accordion__icon::after {
  transform: translate(-50%, -50%) rotate(90deg);
  opacity: 0;
}

.accordion__panel {
  padding-bottom: 1.5rem;
}

.accordion__panel p {
  color: #a0a09a;
  font-size: 0.9375rem;
}

/* ----------------------------------------------------------------
   14. FORMULÁRIO
   ---------------------------------------------------------------- */
.form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Honeypot — invisível para humanos, armadilha para bots */
.form__honeypot {
  position: absolute;
  left: -9999px;
  opacity: 0;
  pointer-events: none;
  tabindex: -1;
}

.form__group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form__label {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--cor-grafite);
}

.form__label span {
  color: var(--cor-cinza-medio);
}

.form__input,
.form__select,
.form__textarea {
  width: 100%;
  padding: 0.875rem 1.25rem;
  border: 1.5px solid rgba(26, 26, 26, 0.15);
  border-radius: var(--raio-md);
  font-family: var(--fonte-base);
  font-size: 1rem;
  color: var(--cor-grafite);
  background-color: var(--cor-off-white);
  transition: border-color var(--transicao), box-shadow var(--transicao);
  min-height: 52px;
  appearance: none;
  -webkit-appearance: none;
}

.form__input::placeholder,
.form__textarea::placeholder {
  color: var(--cor-cinza-medio);
}

.form__input:focus,
.form__select:focus,
.form__textarea:focus {
  outline: none;
  border-color: var(--cor-grafite);
  box-shadow: 0 0 0 3px rgba(26, 26, 26, 0.1);
}

/* Ícone seta para select */
.form__select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236E6E6E' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 3rem;
}

.form__textarea {
  resize: vertical;
  min-height: 120px;
}

.form__error {
  font-size: 0.8125rem;
  color: #c0392b;
  min-height: 1rem;
}

.form__input.is-error,
.form__select.is-error,
.form__textarea.is-error {
  border-color: #c0392b;
}

.form__submit {
  width: 100%;
  justify-content: center;
}

.form__submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.form__disclaimer {
  text-align: center;
  font-size: 0.875rem;
  color: var(--cor-cinza-medio);
  margin-top: -0.5rem;
}

.form__message {
  padding: 1rem 1.25rem;
  border-radius: var(--raio-md);
  font-size: 0.9375rem;
}

.form__message--success {
  background-color: rgba(26, 26, 26, 0.06);
  border-left: 3px solid var(--cor-grafite);
  color: var(--cor-grafite);
}

.form__message--error {
  background-color: rgba(192, 57, 43, 0.08);
  border-left: 3px solid #c0392b;
  color: #8b1e15;
}

/* ----------------------------------------------------------------
   15. RODAPÉ
   ---------------------------------------------------------------- */
.footer {
  background-color: var(--cor-grafite);
  color: var(--cor-off-white);
  padding-block: clamp(3rem, 6vw, 4.5rem);
}

.footer__container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2rem;
  justify-content: space-between;
}

.footer__logo img {
  height: 48px;
  width: auto;
}

.footer__nav {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer__link {
  font-size: 0.9375rem;
  color: #a0a09a;
  transition: color var(--transicao);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.footer__link:hover {
  color: var(--cor-off-white);
}

.footer__copy {
  width: 100%;
  font-size: 0.8125rem;
  color: var(--cor-cinza-medio);
  border-top: 1px solid rgba(242, 240, 235, 0.1);
  padding-top: 1.5rem;
  margin-top: 0.5rem;
}

/* ----------------------------------------------------------------
   16. BOTÃO FLUTUANTE WHATSAPP
   ---------------------------------------------------------------- */
.whatsapp-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 90;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  transition: transform var(--transicao), box-shadow var(--transicao);

  /* Anel off-white para contraste em qualquer seção */
  outline: 2.5px solid var(--cor-off-white);
  outline-offset: 2px;
}

.whatsapp-btn:hover {
  transform: scale(1.08) translateY(-2px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.3);
}

.whatsapp-btn img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
}

/* ----------------------------------------------------------------
   17. RESPONSIVO — TABLET (max 900px)
   ---------------------------------------------------------------- */
@media (max-width: 900px) {
  /* Hero: 1 coluna, foto acima do texto em mobile */
  .hero__container {
    grid-template-columns: 1fr;
  }

  /* Foto sobe para cima do texto em mobile */
  .hero__photo-wrap {
    order: -1;
  }

  .hero__photo {
    max-width: 280px;
    margin-inline: auto;
  }

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

  /* Serviços: 1 coluna */
  .services-grid {
    grid-template-columns: 1fr;
  }

  /* Cards dores: 1 coluna */
  .cards-grid {
    grid-template-columns: 1fr;
  }
}

/* ----------------------------------------------------------------
   18. RESPONSIVO — MOBILE (max 680px)
   ---------------------------------------------------------------- */
@media (max-width: 680px) {
  /* Esconde menu desktop, mostra hambúrguer */
  .nav__menu {
    display: none;
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background-color: var(--cor-off-white);
    flex-direction: column;
    padding: 1rem;
    gap: 0.5rem;
    border-bottom: 1px solid rgba(26, 26, 26, 0.08);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    border-radius: 0;
    z-index: 99;
  }

  .nav__menu.is-open {
    display: flex;
  }

  .nav__link {
    width: 100%;
    justify-content: center;
    padding: 0.875rem 1rem;
  }

  .nav__toggle {
    display: flex;
  }

  /* Hero mobile */
  .hero {
    min-height: auto;
    padding-top: calc(72px + 2.5rem);
    padding-bottom: 3rem;
  }

  .hero__photo {
    max-width: 220px;
    border-radius: var(--raio-md);
  }

  .hero__stats {
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
  }

  .stat-card {
    padding: 1rem;
  }

  /* Steps: 1 coluna mobile */
  .step {
    grid-template-columns: 44px 1fr;
    gap: 1rem;
  }

  .step:not(:last-child)::after {
    left: 21px;
  }

  /* Nichos: centraliza */
  .nichos-grid {
    justify-content: flex-start;
  }

  /* Footer: coluna */
  .footer__container {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
  }

  /* WhatsApp btn menor no mobile */
  .whatsapp-btn {
    bottom: 1.25rem;
    right: 1.25rem;
    width: 52px;
    height: 52px;
  }

  .whatsapp-btn img {
    width: 52px;
    height: 52px;
  }
}

/* ----------------------------------------------------------------
   19. RESPONSIVO — TELAS MUITO PEQUENAS (max 360px)
   ---------------------------------------------------------------- */
@media (max-width: 360px) {
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.5rem; }

  .hero__stats {
    grid-template-columns: 1fr;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }
}
