/* Base Frog Summit: cores, fonte, marca, botão, dica e tela final.
   Editada em shared/css/ e copiada pelo build.sh para css/base.css de cada criativo.
   A fonte Poppins vem do Google Fonts pelo <link> no index.html (o Google Ads não aceita fonte no zip). */

* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

:root {
  --floresta: #123133;
  --floresta-escura: #0b2224;
  --floresta-clara: #1d4a4c;
  --verde: #52b55a;
  --verde-vivo: #6fd277;
  --verde-claro: #c3ebc6;
  --creme: #f4f7f1;
  --branco: #fff;
  --erro: #ff6b6b;
  --texto: "Poppins", Arial, Helvetica, sans-serif;
  /* Montanhas do logo, para fundos de abertura e tela final */
  --montanhas: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 90' preserveAspectRatio='none'%3E%3Cpath d='M0 90V58l38-30 30 24 42-44 40 40 34-28 44 36 34-22 38 26v30z' fill='%231d4a4c'/%3E%3Cpath d='M0 90V72l50-26 36 22 46-36 44 32 40-20 44 24 40-16v38z' fill='%23173e40'/%3E%3C/svg%3E");
}

/* Cada pasta fixa a largura e a altura do html/body */
html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--floresta);
  font-family: var(--texto);
}

.anuncio {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  color: var(--branco);
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

/* ---------- Marca: logo redondo + nome ---------- */

.marca {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.01em;
  color: var(--branco);
}

.marca img {
  width: 24px;
  height: 24px;
}

/* Versão em pílula, para ficar sobre imagens */
.marca-pilula {
  padding: 4px 10px 4px 4px;
  border-radius: 999px;
  background: rgba(11, 34, 36, 0.78);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

/* ---------- Botão (CTA) ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border: 0;
  border-radius: 999px;
  font-family: var(--texto);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  color: var(--floresta);
  text-decoration: none;
  white-space: nowrap;
  background: var(--verde);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  transition:
    background 0.2s ease,
    transform 0.2s ease;
}

.btn:hover {
  background: var(--verde-vivo);
  transform: translateY(-1px);
}

.btn::after {
  content: "";
  width: 6px;
  height: 6px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(45deg);
}

/* ---------- Dica de interação (pílula que "respira") ---------- */

.dica {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.1;
  color: var(--floresta);
  background: var(--creme);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  animation: respirar 1.6s ease-in-out infinite;
  transition: opacity 0.3s ease;
}

.dica.sumiu {
  opacity: 0;
  pointer-events: none;
}

/* ---------- Tela final (link para o clickTag) ---------- */

.final {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px 20px 28px;
  text-align: center;
  color: var(--branco);
  text-decoration: none;
  background:
    var(--montanhas) bottom / 100% 70px no-repeat,
    radial-gradient(circle at 50% 30%, var(--floresta-clara), var(--floresta) 70%);
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
  z-index: 20;
}

.fim .final {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.final-logo {
  width: 64px;
  height: 64px;
}

.final-titulo {
  margin-top: 10px;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.1;
}

.final-texto {
  margin-top: 6px;
  max-width: 240px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--verde-claro);
}

.final .btn {
  margin-top: 12px;
}

.fim .final > * {
  animation: surgir 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) backwards;
}

.fim .final > :nth-child(1) {
  animation-name: surgir-logo;
  animation-delay: 0.15s;
}

.fim .final > :nth-child(2) {
  animation-delay: 0.3s;
}

.fim .final > :nth-child(3) {
  animation-delay: 0.42s;
}

.fim .final > :nth-child(4) {
  animation-delay: 0.55s;
}

/* ---------- Animações compartilhadas ---------- */

@keyframes respirar {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.06);
  }
}

@keyframes surgir {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

@keyframes surgir-logo {
  from {
    opacity: 0;
    transform: scale(0.6) rotate(-20deg);
  }
}

@keyframes tremer {
  20%,
  60% {
    transform: translateX(-4px);
  }
  40%,
  80% {
    transform: translateX(4px);
  }
}

/* Google Ads não permite animação em loop depois de 30s: o JS de cada criativo adiciona .parado
   no .anuncio e os loops terminam no estado de repouso. Animações curtas disparadas pelo usuário
   (iteração única) continuam funcionando. */
.parado *,
.parado *::before,
.parado *::after {
  animation-iteration-count: 1 !important;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-iteration-count: 1 !important;
  }
}
