/* ==================== Variáveis e estilos globais ==================== */
:root {
  /* Paleta única do site: modo escuro. */
  color-scheme: dark;
  --escuro: #edf3ff;
  --amarelo: #f7c765;
  --amarelo-forte: #ffb52b;
  --amarelo-claro: #ffe8ad;
  --amarelo-escuro: #121a2b;
  --claro: #0e1724;
  --texto: #d7dfec;
  --borda: rgba(148, 163, 184, 0.2);
  --superficie: #0b1320;
  --superficie-2: #121e2f;
  --painel-forte: #182537;
  --texto-em-painel: #edf6ff;
  --texto-em-destaque: #0f1724;
  --acento-2: #ff9d74;
  --acento-3: #9bbdff;
  --sombra-cartao: rgba(247, 199, 101, 0.18);
  --sombra-flutuante: rgba(2, 6, 23, 0.42);
  --fundo-sobreposto: rgba(2, 6, 23, 0.72);
  --glow-amarelo: rgba(247, 199, 101, 0.14);
  --glow-azul: rgba(155, 189, 255, 0.12);
  --glow-laranja: rgba(255, 157, 116, 0.12);
}

/* Faz largura e altura incluírem bordas e preenchimentos. */
* { box-sizing: border-box; }

/* Ativa a navegação suave pelos links internos da página. */
html { scroll-behavior: smooth; }

body {
  position: relative;
  margin: 0;
  color: var(--escuro);
  background:
    radial-gradient(circle at 10% 0%, var(--glow-amarelo), transparent 22%),
    radial-gradient(circle at 100% 100%, var(--glow-azul), transparent 18%),
    linear-gradient(180deg, var(--superficie) 0%, var(--superficie) 100%);
  font-family: "DM Sans", sans-serif;
  isolation: isolate;
}

/* Partículas douradas animadas, exibidas atrás de todo o conteúdo interativo. */
.particulas-fundo {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.82;
}

body > main,
body > footer {
  position: relative;
  z-index: 1;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(circle at center, black 35%, transparent 100%);
  opacity: 0.6;
}

@media (prefers-reduced-motion: reduce) {
  .particulas-fundo { opacity: 0.48; }
}

/* Remove a margem superior padrão dos textos para um espaçamento controlado. */
h1, h2, p { margin-top: 0; }

h1, h2, .logo { font-family: "Space Grotesk", sans-serif; }

h1, h2, h3 {
  font-weight: 700;
  letter-spacing: -0.06em;
  text-wrap: balance;
}

h2 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  letter-spacing: -0.07rem;
}

p, li, label, input, textarea, button, a {
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Faz botões herdarem a fonte e exibirem o cursor de ação. */
button { font: inherit; cursor: pointer; }

button, a { -webkit-tap-highlight-color: transparent; }

.sobretitulo {
  color: var(--amarelo-forte);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14rem;
  text-transform: uppercase;
}

/* ==================== Componentes reutilizáveis ==================== */
.botao-principal {
  /* Botão-base reutilizado em chamadas para ação e no formulário. */
  display: inline-flex;
  justify-content: center;
  gap: 20px;
  padding: 15px 22px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--amarelo) 0%, var(--amarelo-forte) 100%);
  color: var(--texto-em-destaque);
  text-decoration: none;
  font-weight: 700;
  box-shadow: 0 16px 28px rgba(246, 181, 58, 0.26);
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.botao-principal span {
  font-size: 1.2rem;
  line-height: 0.9;
  transition: transform 0.2s ease;
}

.botao-principal:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 30px rgba(246, 181, 58, 0.3);
  filter: saturate(1.08);
}

.botao-principal:hover span {
  transform: translateX(4px);
}

.botao-principal:active {
  transform: translateY(1px) scale(0.98);
  box-shadow: none;
}

/* ==================== Cabeçalho ==================== */
.cabecalho {
  /* Mantém os elementos do cabeçalho alinhados e limitados à largura do site. */
  position: sticky;
  top: 18px;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1180px, calc(100% - 32px));
  height: 78px;
  margin: 16px auto 0;
  padding: 0 22px 0 18px;
  background: rgba(17, 24, 39, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  box-shadow: 0 18px 35px rgba(17, 24, 39, 0.14);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.acoes-cabecalho {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo {
  display: grid;
  color: var(--escuro);
  text-decoration: none;
  line-height: 1;
  min-width: 180px;
}

.nome-logo {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.06em;
}

.nome-logo span { color: var(--amarelo-forte); }

.logo small {
  margin-top: 4px;
  color: var(--amarelo-forte);
  font-family: "DM Sans", sans-serif;
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.08rem;
  text-transform: uppercase;
}

nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  flex: 1;
}

nav a {
  position: relative;
  color: var(--texto);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: color 0.2s ease;
}

nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 100%;
  height: 2px;
  border-radius: 99px;
  background: var(--amarelo-forte);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.2s ease;
}

nav a:hover {
  color: var(--amarelo-forte);
}

nav a:hover::after {
  transform: scaleX(1);
}

.botao-carrinho {
  padding: 11px 18px 11px 16px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
  color: var(--texto-em-painel);
  font-weight: 600;
  transition: transform 0.18s ease, filter 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08);
}

.botao-carrinho:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
  background: linear-gradient(135deg, var(--amarelo), var(--amarelo-forte));
  color: var(--texto-em-destaque);
  box-shadow: 0 12px 22px rgba(245, 184, 64, 0.22);
}
.botao-carrinho:active { transform: translateY(1px) scale(0.97); }

#contador-carrinho {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  margin-left: 6px;
  border-radius: 50%;
  background: var(--texto-em-painel);
  color: var(--painel-forte);
  font-size: 0.75rem;
  font-weight: 700;
}

/* ==================== Seção principal ==================== */
.hero {
  /* Organiza a introdução em duas colunas: texto e cartão animado. */
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 90px;
  min-height: 620px;
  padding: 96px max(28px, calc((100vw - 1124px) / 2));
  background:
    radial-gradient(circle at 18% 15%, var(--glow-amarelo), transparent 20%),
    radial-gradient(circle at 85% 30%, var(--glow-azul), transparent 22%),
    linear-gradient(135deg, var(--superficie-2) 0%, var(--superficie) 55%, var(--superficie) 100%);
  border-bottom: 1px solid rgba(245, 184, 64, 0.12);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 7% 7% auto auto;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 184, 64, 0.22), rgba(245, 184, 64, 0.08) 42%, transparent 72%);
  filter: blur(18px);
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto auto 8% 7%;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(126, 169, 255, 0.14), rgba(126, 169, 255, 0.04) 45%, transparent 70%);
  filter: blur(18px);
  pointer-events: none;
}

.hero h1 {
  position: relative;
  z-index: 1;
  max-width: 650px;
  margin-bottom: 26px;
  font-size: clamp(3.2rem, 6vw, 5.8rem);
  line-height: 0.94;
  letter-spacing: -0.22rem;
  text-shadow: 0 10px 30px rgba(23, 23, 23, 0.08);
}

.texto-hero {
  position: relative;
  z-index: 1;
  max-width: 520px;
  margin-bottom: 34px;
  color: var(--texto);
  font-size: 1.12rem;
  line-height: 1.75;
  letter-spacing: -0.01em;
}

.hero .sobretitulo {
  position: relative;
  z-index: 1;
  display: inline-block;
  letter-spacing: 0.14rem;
}

.hero .botao-principal {
  position: relative;
  z-index: 1;
  padding: 17px 26px;
  box-shadow: 0 14px 30px rgba(246, 197, 21, 0.23);
}

.hero .sobretitulo,
.hero h1,
.texto-hero,
.hero .botao-principal {
  opacity: 0;
  animation: entrada-abertura 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.hero h1 { animation-delay: 0.12s; }
.texto-hero { animation-delay: 0.24s; }
.hero .botao-principal { animation-delay: 0.36s; }

.cartao-hero {
  position: relative;
  z-index: 1;
  min-height: 310px;
  perspective: 1000px;
  -webkit-perspective: 1000px;
  filter: drop-shadow(0 30px 35px rgba(23, 23, 23, 0.12));
}

.cartao-interior {
  /* Elemento 3D que recebe a animação de rotação contínua. */
  position: relative;
  width: 100%;
  min-height: 310px;
  transform-style: preserve-3d;
  -webkit-transform-style: preserve-3d;
  will-change: transform;
  animation: girar-cartao 12s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
}

.face-cartao {
  position: absolute;
  inset: 0;
  padding: 38px;
  border-radius: 10px;
  background: var(--painel-forte);
  color: var(--texto-em-painel);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  box-shadow: 16px 16px 0 var(--sombra-cartao);
}

.frente-cartao {
  transform: translateZ(1px);
  -webkit-transform: translateZ(1px);
  animation: visibilidade-frente 12s linear infinite;
}

.face-cartao p { opacity: 0.6; }

.face-cartao strong {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.8rem;
}

.verso-cartao {
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--amarelo);
  color: var(--texto-em-destaque);
  transform: rotateY(180deg) translateZ(1px);
  -webkit-transform: rotateY(180deg) translateZ(1px);
  animation: visibilidade-verso 12s linear infinite;
}

.verso-cartao p { margin-bottom: 14px; font-size: 0.72rem; letter-spacing: 0.1rem; }
.verso-cartao strong { max-width: 275px; font-size: 2.25rem; line-height: 1.02; }
.verso-cartao span { margin-top: 34px; font-size: 0.85rem; font-weight: 700; }

.linhas-codigo {
  display: grid;
  gap: 12px;
  margin: 48px 0;
}

.linhas-codigo i {
  height: 9px;
  border-radius: 20px;
  background: var(--amarelo);
  transform-origin: left;
  animation: pulsar-linha 2.5s ease-in-out infinite;
}

.linhas-codigo i:nth-child(2) { width: 70%; background: var(--amarelo-claro); animation-delay: 0.2s; }
.linhas-codigo i:nth-child(3) { width: 85%; background: var(--texto-em-painel); animation-delay: 0.4s; }
.linhas-codigo i:nth-child(4) { width: 45%; animation-delay: 0.6s; }
.linhas-codigo i:nth-child(5) { width: 64%; background: var(--amarelo-claro); animation-delay: 0.8s; }

/* ==================== Seções e serviços ==================== */
.secao {
  max-width: 1124px;
  margin: auto;
  padding: 110px 0;
}

#servicos {
  max-width: none;
  padding-inline: 0;
}

#servicos > .titulo-secao {
  width: min(1124px, calc(100% - 56px));
  margin-inline: auto;
}

.titulo-secao {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 45px;
}

.titulo-secao h2 { margin-bottom: 0; }

.titulo-secao > p {
  max-width: 355px;
  margin-bottom: 8px;
  color: var(--texto);
  line-height: 1.55;
}

.grade-servicos {
  position: relative;
  min-height: 460px;
  overflow: visible;
}

.carrossel-servicos {
  position: relative;
  isolation: isolate;
  touch-action: pan-y;
}

.navegar-servicos {
  position: absolute;
  z-index: 7;
  top: 50%;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  background: rgba(11, 19, 32, 0.94);
  color: var(--amarelo);
  box-shadow: 0 12px 30px rgba(2, 6, 23, 0.38);
  font-size: 1.5rem;
  line-height: 1;
  transform: translateY(-50%);
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.navegar-servicos.anterior { left: 12px; }
.navegar-servicos.proximo { right: 12px; }

.navegar-servicos:hover {
  background: var(--amarelo);
  color: var(--texto-em-destaque);
  transform: translateY(-50%) scale(1.06);
}

.servico {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 22px;
  left: 50%;
  z-index: var(--camada);
  width: min(440px, calc(100% - 110px));
  min-height: 390px;
  padding: 32px;
  border: 1px solid rgba(247, 199, 101, 0.26);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(24, 37, 55, 0.96), rgba(15, 25, 39, 0.9));
  box-shadow: 0 20px 42px rgba(2, 6, 23, 0.36);
  opacity: var(--opacidade);
  transform: translateX(-50%) translateX(var(--deslocamento)) rotate(var(--rotacao)) scale(var(--escala));
  transform-origin: center bottom;
  transition: transform 0.62s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.42s ease, box-shadow 0.35s ease, border-color 0.35s ease;
  overflow: hidden;
  cursor: pointer;
}

.servico.servico-ativo {
  border-color: rgba(247, 199, 101, 0.46);
  box-shadow: 0 22px 46px rgba(2, 6, 23, 0.46), 0 0 45px rgba(247, 199, 101, 0.1);
}

.imagem-servico {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.56;
}

.servico.com-imagem::after {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0;
  background: linear-gradient(180deg, rgba(11, 19, 32, 0.2), rgba(11, 19, 32, 0.94) 78%);
  pointer-events: none;
}

.servico > :not(.imagem-servico) {
  position: relative;
  z-index: 1;
}

.servico::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--amarelo), var(--acento-2), transparent);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.icone {
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(245, 184, 64, 0.16), rgba(126, 169, 255, 0.12));
  color: var(--amarelo-forte);
  font-size: 1.45rem;
  font-weight: 700;
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

@media (hover: hover) {
  .servico:hover {
    box-shadow: 0 18px 32px var(--sombra-flutuante);
    border-color: rgba(245, 184, 64, 0.36);
  }

  .servico.servico-ativo:hover {
    box-shadow: 0 26px 50px rgba(2, 6, 23, 0.5), 0 0 45px rgba(247, 199, 101, 0.15);
  }

  .servico:hover::before { opacity: 1; }

  .servico:hover .icone {
    transform: translateY(-2px) rotate(-4deg) scale(1.04);
    box-shadow: 0 10px 18px rgba(245, 184, 64, 0.18);
  }
}

.servico h3 {
  margin: 28px 0 10px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.35rem;
  line-height: 1.2;
}

.servico p {
  color: var(--texto);
  font-size: 0.93rem;
  line-height: 1.6;
}

.servico.servico-ativo h3 { font-size: 1.7rem; }
.servico.servico-ativo p { font-size: 1rem; }

.preco {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: auto;
  padding-top: 18px;
  font-weight: 700;
  border-top: 1px solid rgba(18, 26, 43, 0.06);
}

.preco span {
  color: var(--escuro);
  font-size: 0.9rem;
}

.adicionar {
  padding: 9px 12px;
  border: 1px solid rgba(18, 26, 43, 0.12);
  border-radius: 999px;
  background: var(--superficie);
  color: var(--escuro);
  font-size: 0.8rem;
  font-weight: 700;
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.adicionar:hover {
  background: linear-gradient(135deg, var(--amarelo), var(--amarelo-forte));
  color: var(--texto-em-destaque);
  box-shadow: 0 12px 20px rgba(245, 184, 64, 0.2);
}
.adicionar:active { transform: translateY(2px) scale(0.96); }

.adicionar:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

/* ==================== Sobre, contato e rodapé ==================== */
.sobre {
  max-width: 760px;
  margin-left: max(28px, calc((100vw - 1124px) / 2));
  padding-top: 15px;
}

.sobre p:last-child {
  max-width: 610px;
  color: var(--texto);
  font-size: 1.1rem;
  line-height: 1.65;
}

.contato {
  /* Faixa de destaque com informações e ações de contato. */
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
  padding: 64px max(28px, calc((100vw - 1124px) / 2));
  background: linear-gradient(135deg, #1f2431 0%, #29354a 100%);
  color: var(--escuro);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.2);
}

.contato .sobretitulo { color: var(--amarelo); }

.contato h2 { margin: 0; }

.contato .botao-principal,
.botao-contato {
  background: rgba(12, 19, 32, 0.82);
  color: var(--escuro);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 999px;
  box-shadow: 0 12px 22px rgba(2, 6, 23, 0.22);
}

.contato .botao-principal:hover,
.botao-contato:hover {
  background: rgba(17, 24, 39, 0.95);
  box-shadow: 0 16px 28px rgba(2, 6, 23, 0.22);
}

.contato-acoes {
  display: grid;
  justify-items: center;
  row-gap: 28px;
}

.redes-sociais {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}

.redes-sociais a {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 50%;
  background: rgba(15, 23, 36, 0.9);
  color: var(--escuro);
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.26);
}

.redes-sociais a:hover {
  transform: translateY(-2px);
  border-color: rgba(255,255,255,0.2);
  background: rgba(23, 33, 47, 1);
}

.redes-sociais img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  display: block;
  transition: transform 0.2s ease;
}

.redes-sociais a:hover img {
  transform: scale(1.12);
}

footer {
  padding: 28px;
  color: var(--texto);
  text-align: center;
  font-size: 0.85rem;
}

/* ==================== Páginas de status do pagamento ==================== */
.pagina-status {
  /* Centraliza o cartão de confirmação ou de erro do pagamento. */
  display: grid;
  place-items: center;
  min-height: calc(100vh - 76px);
  padding: 28px;
  background: var(--claro);
}

.cartao-status {
  max-width: 620px;
  padding: 55px;
  border: 1px solid var(--borda);
  border-radius: 12px;
  background: var(--superficie);
  text-align: center;
  box-shadow: 0 18px 45px var(--sombra-flutuante);
}

.cartao-status h1 {
  margin-bottom: 18px;
  font-size: clamp(2.1rem, 5vw, 3.7rem);
  line-height: 1;
  letter-spacing: -0.13rem;
}

.cartao-status > p:not(.sobretitulo) {
  margin-bottom: 30px;
  color: var(--texto);
  line-height: 1.6;
}

.icone-status {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin: 0 auto 22px;
  border-radius: 50%;
  color: var(--texto-em-painel);
  font-size: 1.9rem;
  font-weight: 700;
}

.sucesso .icone-status,
.erro .icone-status {
  background: var(--amarelo);
  color: var(--texto-em-destaque);
}

.erro .sobretitulo { color: var(--amarelo); }

/* ==================== Painel de orçamento ==================== */
.fundo-painel {
  /* Sobreposição que bloqueia a página enquanto o painel está aberto. */
  position: fixed;
  z-index: 20;
  inset: 0;
  background: var(--fundo-sobreposto);
  opacity: 0;
  pointer-events: none;
  transition: 0.25s;
}

.painel-carrinho {
  /* Painel lateral que entra pela direita da tela. */
  position: fixed;
  z-index: 30;
  top: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  width: min(430px, 100%);
  height: 100vh;
  padding: 28px;
  background: var(--superficie);
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.painel-carrinho.aberto { transform: none; }
.fundo-painel.visivel { opacity: 1; pointer-events: auto; }

.fundo-modal {
  position: fixed;
  z-index: 40;
  inset: 0;
  background: var(--fundo-sobreposto);
  opacity: 0;
  pointer-events: none;
  transition: 0.25s;
}

.fundo-modal.visivel { opacity: 1; pointer-events: auto; }

.topo-painel {
  display: flex;
  justify-content: space-between;
}

.topo-painel h2 { margin-bottom: 0; }

.fechar {
  border: 0;
  background: transparent;
  font-size: 2rem;
  line-height: 1;
}

.itens-carrinho {
  flex: 1;
  margin-top: 32px;
  overflow: auto;
}

.item-carrinho {
  display: flex;
  justify-content: space-between;
  padding: 16px 0;
  border-bottom: 1px solid var(--borda);
}

.item-carrinho button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--amarelo);
}

.vazio { color: var(--texto); }

.mensagem-carrinho,
.mensagem-sucesso {
  min-height: 1.4em;
  margin: 15px 0 0;
  color: #16794a;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.45;
}

.mensagem-carrinho:empty,
.mensagem-sucesso:empty { display: none; }

.mensagem-erro { color: #b42318; }
.mensagem-aviso { color: #9a6700; }

.mensagem-carrinho,
.mensagem-sucesso { color: #8ef0ba; }
.mensagem-erro { color: #ffb4ab; }
.mensagem-aviso { color: #ffd98a; }

.rodape-painel {
  padding-top: 18px;
  border-top: 1px solid var(--borda);
}

.rodape-painel p {
  display: flex;
  justify-content: space-between;
}

.rodape-painel .botao-principal { width: 100%; }

.rodape-painel .botao-principal:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* ==================== Modal e formulário ==================== */
dialog {
  /* Janela modal usada para solicitar os dados do orçamento. */
  position: fixed;
  z-index: 50;
  inset: 50% auto auto 50%;
  width: min(540px, calc(100% - 32px));
  max-height: calc(100vh - 32px);
  margin: 0;
  padding: 34px;
  border: 0;
  border-radius: 10px;
  background: var(--superficie);
  color: var(--escuro);
  box-shadow: 0 20px 55px var(--sombra-flutuante);
  overflow: auto;
  transform: translate(-50%, -50%);
}

.fechar-modal {
  position: absolute;
  top: 18px;
  right: 18px;
}

dialog h2 { font-size: 2rem; }

.resumo-selecao {
  margin-bottom: 20px;
  color: var(--texto);
  line-height: 1.5;
}

.resumo-selecao strong { color: var(--escuro); }

form { display: grid; gap: 16px; }

.h-captcha { min-height: 78px; }

label {
  display: grid;
  gap: 7px;
  font-size: 0.9rem;
  font-weight: 700;
}

input, textarea {
  width: 100%;
  padding: 12px 13px;
  border: 1px solid var(--borda);
  border-radius: 10px;
  background: var(--superficie);
  color: var(--escuro);
  font: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus, textarea:focus {
  outline: none;
  border-color: rgba(245, 184, 64, 0.65);
  box-shadow: 0 0 0 4px rgba(245, 184, 64, 0.12);
}

textarea { resize: vertical; }

.campo-antispam {
  /* Mantém o campo anti-spam acessível ao formulário, porém invisível ao visitante. */
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  border: 0;
}

.mensagem-sucesso {
  margin: 15px 0 0;
}

/* ==================== Textos animados pela rolagem ==================== */
.revelar-scroll {
  /* Estado inicial dos elementos animados antes de entrarem na tela. */
  --scroll-shift: 0px;
  opacity: 0;
  color: inherit;
  transform: translate3d(0, calc(var(--scroll-shift) + 30px), 0);
  will-change: transform, opacity;
  transition: opacity 0.72s ease, transform 0.72s cubic-bezier(0.22, 1, 0.36, 1);
}

.revelar-scroll.visivel {
  /* Estado aplicado pelo JavaScript enquanto o elemento estiver visível. */
  opacity: 1;
  transform: translate3d(0, var(--scroll-shift), 0);
}

/* Os cards revelam suavemente, mas não acompanham o deslocamento do scroll. */
.servico.revelar-scroll,
.servico.revelar-scroll.visivel {
  opacity: var(--opacidade);
  transform: translateX(-50%) translateX(var(--deslocamento)) rotate(var(--rotacao)) scale(var(--escala));
}

/* ==================== Animações ==================== */
@keyframes entrada-abertura {
  /* Entrada gradual dos elementos da primeira seção. */
  from {
    opacity: 0;
    transform: translateY(32px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes girar-cartao {
  /* Sequência de rotação do cartão tridimensional. */
  0%, 28% {
    transform: translateY(0) rotateX(7deg) rotateY(-8deg) rotateZ(3deg);
  }
  38%, 58% {
    transform: translateY(-10px) rotateX(4deg) rotateY(180deg) rotateZ(-3deg);
  }
  68% {
    transform: translateY(-4px) rotateX(6deg) rotateY(198deg) rotateZ(-2deg);
  }
  100% {
    transform: translateY(0) rotateX(7deg) rotateY(352deg) rotateZ(3deg);
  }
}

@keyframes pulsar-linha {
  /* Pulso decorativo das linhas que simulam código. */
  0%, 100% { transform: scaleX(1); opacity: 1; }
  50% { transform: scaleX(0.82); opacity: 0.65; }
}

/* Evita o vazamento da face oposta no Safari do iOS durante o giro 3D. */
@keyframes visibilidade-frente {
  0%, 30% { opacity: 1; }
  35%, 80% { opacity: 0; }
  86%, 100% { opacity: 1; }
}

@keyframes visibilidade-verso {
  0%, 30% { opacity: 0; }
  35%, 80% { opacity: 1; }
  86%, 100% { opacity: 0; }
}

@keyframes piscar {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.2; }
}

/* ==================== Responsividade ==================== */
@media (max-width: 960px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 64px;
    min-height: 0;
  }

  .cartao-hero {
    width: min(100%, 540px);
    justify-self: center;
  }

  .titulo-secao {
    align-items: start;
    flex-direction: column;
    gap: 16px;
  }

  .titulo-secao > p { margin: 0; }
}

@media (max-width: 800px) {
  .contato {
    flex-direction: column;
    align-items: start;
  }

  .contato-acoes,
  .redes-sociais {
    justify-items: start;
    justify-content: start;
  }
}

@media (max-width: 720px) {
  /* Ajustes para telas de celular e tablets menores. */
  .cabecalho {
    top: 10px;
    width: calc(100% - 24px);
    height: 68px;
    margin-top: 10px;
    padding: 0 12px;
    border-radius: 16px;
  }

  .logo { min-width: 0; }
  .logo small { display: none; }
  .nome-logo { font-size: 1.15rem; }
  .acoes-cabecalho { gap: 8px; }
  .botao-carrinho { padding: 10px 12px; font-size: 0.85rem; }
  nav { display: none; }

  .hero {
    grid-template-columns: 1fr;
    gap: 50px;
    min-height: 0;
    padding: 68px 28px;
  }

  .hero h1 { letter-spacing: -0.14rem; }
  .cartao-hero, .cartao-interior { min-height: 280px; }

  .face-cartao { padding: 28px; }
  .face-cartao strong { font-size: 1.55rem; line-height: 1.12; }
  .linhas-codigo { margin: 34px 0; }
  .verso-cartao strong { font-size: 1.85rem; }

  .secao { padding: 75px 28px; }

  .grade-servicos {
    min-height: 390px;
  }

  .servico { top: 18px; width: min(340px, calc(100% - 52px)); min-height: 340px; padding: 26px; }
  .navegar-servicos { width: 44px; height: 44px; font-size: 1.2rem; }
  .sobre { margin: 0; }

  .contato { padding: 55px 28px; }
  .contato h2 { font-size: 2.3rem; }
  .contato-acoes { justify-items: start; }
  .redes-sociais { justify-content: start; }

  .cartao-status { padding: 38px 24px; }

  dialog {
    width: calc(100% - 24px);
    max-height: calc(100vh - 24px);
    padding: 30px 22px;
  }
}

@media (max-width: 480px) {
  .hero { padding: 56px 22px; gap: 42px; }
  .hero h1 { font-size: clamp(2.7rem, 13vw, 3.5rem); }
  .secao { padding: 64px 22px; }
  #servicos > .titulo-secao { width: calc(100% - 44px); }
  .contato { padding: 48px 22px; }
  .contato h2 { font-size: 2rem; }

  .cartao-hero, .cartao-interior { min-height: 250px; }
  .face-cartao { padding: 24px; }
  .linhas-codigo { margin: 28px 0; }

  .botao-principal { gap: 14px; }

  .grade-servicos { min-height: 370px; }
  .servico { top: 14px; width: calc(100% - 40px); min-height: 320px; padding: 22px; }
  .servico h3, .servico.servico-ativo h3 { font-size: 1.4rem; }
}

@media (max-width: 380px) {
  /* Compacta o cartão para telas muito estreitas. */
  .cartao-hero, .cartao-interior { min-height: 260px; }
  .face-cartao { padding: 24px; }
  .linhas-codigo { margin: 28px 0; }
}

@media (prefers-reduced-motion: reduce) {
  /* Respeita visitantes que optaram por reduzir movimentos no sistema. */
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
