/* ══════════════════════════════════════════
   BRAZIL CELEBRATION —
   Ackaia Corp.
══════════════════════════════════════════ */

/* ── Duas vuvuzelas discretas atrás do logo */
.brand {
  position: relative;
  isolation: isolate;
  overflow: visible;
}

.brand img {
  position: relative;
  z-index: 2;
  display: block;
}

#brazil-vuvuzelas {
  position: absolute;
  left: 0;
  right: 0;
  top: -4px;
  height: 22px;
  pointer-events: none;
  z-index: 1;
  overflow: visible;
}

.brazil-vuvuzela {
  position: absolute;
  width: 30px;
  height: 5px;
  border-radius: 999px;
  background: linear-gradient(90deg, #009C3B 0%, #009C3B 34%, #FFDF00 34%, #FFDF00 68%, #002776 68%, #002776 100%);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.10);
  opacity: 0;
  will-change: transform, opacity;
}

.brazil-vuvuzela::before,
.brazil-vuvuzela::after {
  content: '';
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}

/* bocal */
.brazil-vuvuzela::before {
  left: -4px;
  width: 6px;
  height: 8px;
  border-radius: 4px;
  background: #0B8F43;
}

/* abertura */
.brazil-vuvuzela::after {
  right: -7px;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-left: 8px solid #FFDF00;
}

.brazil-vuvuzela.is-left {
  left: 10px;
  top: 6px;
  transform: translate(8px, 5px) rotate(-14deg) scale(0.84) scaleX(-1);
  transform-origin: 80% 50%;
}

.brazil-vuvuzela.is-right {
  right: 10px;
  top: 6px;
  transform: translate(-8px, 5px) rotate(14deg) scale(0.84);
  transform-origin: 20% 50%;
}

#brazil-vuvuzelas.is-animated .brazil-vuvuzela.is-left {
  animation: vuvuzela-left-in 0.54s cubic-bezier(0.2, 0.82, 0.22, 1) 0.05s forwards;
}

#brazil-vuvuzelas.is-animated .brazil-vuvuzela.is-right {
  animation: vuvuzela-right-in 0.54s cubic-bezier(0.2, 0.82, 0.22, 1) 0.14s forwards;
}

@keyframes vuvuzela-left-in {
  0% {
    opacity: 0;
    transform: translate(14px, 8px) rotate(-7deg) scale(0.62) scaleX(-1);
  }
  72% {
    opacity: 1;
    transform: translate(-2px, 0) rotate(-16deg) scale(1.03) scaleX(-1);
  }
  100% {
    opacity: 1;
    transform: translate(0, 0) rotate(-14deg) scale(1) scaleX(-1);
  }
}

@keyframes vuvuzela-right-in {
  0% {
    opacity: 0;
    transform: translate(-14px, 8px) rotate(7deg) scale(0.62);
  }
  72% {
    opacity: 1;
    transform: translate(2px, 0) rotate(16deg) scale(1.03);
  }
  100% {
    opacity: 1;
    transform: translate(0, 0) rotate(14deg) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .brazil-vuvuzela {
    opacity: 1;
  }

  .brazil-vuvuzela.is-left {
    transform: rotate(-14deg) scale(1) scaleX(-1);
  }

  .brazil-vuvuzela.is-right {
    transform: rotate(14deg) scale(1);
  }
}

/* ── Canvas de confetes (fixo, tela inteira, acima da serpentina) */
#confetti-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
}

/* ══════════════════════════════════════════
   POPUP GO BRAZIL!
══════════════════════════════════════════ */
#go-brazil-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;

  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1),
              visibility 0s linear 0.35s;
}

#go-brazil-overlay.active {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1),
              visibility 0s linear 0s;
}

/* Backdrop blur suave */
#go-brazil-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  cursor: pointer;
}

/* Painel principal */
#go-brazil-panel {
  position: relative;
  z-index: 1;
  background: #fff;
  border-radius: 24px;
  padding: 56px 64px 48px;
  text-align: center;
  max-width: 480px;
  width: calc(100vw - 48px);
  box-shadow:
    0 32px 80px rgba(0,0,0,0.22),
    0 4px 16px rgba(0,0,0,0.10);

  transform: scale(0.82) translateY(24px);
  transition: transform 0.42s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#go-brazil-overlay.active #go-brazil-panel {
  transform: scale(1) translateY(0);
}

/* Botão fechar */
#go-brazil-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border: none;
  background: #f3f4f6;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  line-height: 1;
  color: #6b7280;
  transition: background 0.18s, transform 0.18s;
}

#go-brazil-close:hover {
  background: #e5e7eb;
  transform: scale(1.08);
}

/* Bandeira animada */
#go-brazil-flag {
  font-size: 72px;
  display: block;
  margin-bottom: 20px;
  animation: flag-wave 1.6s ease-in-out infinite;
  transform-origin: bottom center;
}

@keyframes flag-wave {
  0%,100% { transform: rotate(-4deg) scale(1);   }
  25%      { transform: rotate( 4deg) scale(1.04); }
  50%      { transform: rotate(-2deg) scale(1.02); }
  75%      { transform: rotate( 3deg) scale(1.05); }
}

/* Título Go Brazil! */
#go-brazil-panel h2 {
  font-family: 'Inter', sans-serif;
  font-size: clamp(2rem, 8vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  margin: 0 0 10px;

  background: linear-gradient(135deg, #009C3B 0%, #FFDF00 50%, #009C3B 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% 200%;
  animation: shimmer-text 2.4s linear infinite;
}

@keyframes shimmer-text {
  0%   { background-position: 0%   50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0%   50%; }
}

/* Subtítulo */
#go-brazil-panel p {
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  color: #4b5563;
  margin: 0 0 32px;
}

/* Barra de cores BR */
#go-brazil-colorbar {
  height: 5px;
  border-radius: 0 0 24px 24px;
  background: linear-gradient(90deg,
    #009C3B 0%,
    #009C3B 33.3%,
    #FFDF00 33.3%,
    #FFDF00 66.6%,
    #002776 66.6%,
    #002776 100%
  );
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
}

/* Stars */
.gbr-star {
  position: absolute;
  opacity: 0;
  animation: star-pop 0.6s ease forwards;
  font-size: 18px;
  pointer-events: none;
}

@keyframes star-pop {
  0%   { opacity: 0; transform: scale(0) rotate(0deg); }
  60%  { opacity: 1; transform: scale(1.3) rotate(20deg); }
  100% { opacity: 1; transform: scale(1) rotate(0deg); }
}

/* Responsivo */
@media (max-width: 480px) {
  #go-brazil-panel {
    padding: 44px 28px 38px;
  }
}