/* ============================================================
   BIANCA RIBEIRO — Obrigado / Thank You 2026
   Fonts: Lora + DM Sans
   Palette: Forest Green · Warm Cream · Gold · WhatsApp Green
   ============================================================ */

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
img { display: block; max-width: 100%; height: auto; }
a   { text-decoration: none; }

/* ---------- Tokens ---------- */
:root {
  --forest:   #0F1B10;
  --forest-2: #182A1A;
  --cream:    #FAF7F0;
  --gold:     #C8943F;
  --gold-l:   #E5B86A;
  --gold-xl:  #F5CA7A;
  --text:     #1C1208;
  --white:    #FFFFFF;
  --wpp:      #25D366;

  --serif: 'Lora', Georgia, serif;
  --sans:  'DM Sans', system-ui, sans-serif;

  --ease:   cubic-bezier(0.4, 0, 0.2, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ---------- Base ---------- */
html { scroll-behavior: smooth; font-size: 17.5px; }

body {
  font-family: var(--sans);
  background: var(--forest);
  color: var(--white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  transition: padding-top 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- Partículas ---------- */
.particles-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* ============================================================
   BANNER STICKY (aparece após 60s)
   ============================================================ */
.sticky-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 500;
  background: linear-gradient(90deg, #7B2D00, #A83800);
  border-bottom: 1px solid rgba(255, 140, 50, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 0.75rem 1.25rem;
  flex-wrap: wrap;
  transform: translateY(-100%);
  transition: transform 0.4s var(--ease);
}
.sticky-banner[hidden] { display: none; }
.sticky-banner.is-visible { transform: translateY(0); }

.sticky-banner__pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #FFB347;
  flex-shrink: 0;
  animation: blink 1s ease infinite;
}

.sticky-banner__text {
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.9);
}
.sticky-banner__text strong {
  color: #FFD580;
}

.sticky-banner__btn {
  background: var(--wpp);
  color: var(--forest);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.45rem 1.1rem;
  border-radius: 6px;
  white-space: nowrap;
  transition: background 0.2s, transform 0.2s var(--spring);
  flex-shrink: 0;
}
.sticky-banner__btn:hover {
  background: #1ebe5a;
  transform: scale(1.04);
}

.sticky-banner__close {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 0.25rem;
  flex-shrink: 0;
  transition: color 0.2s;
}
.sticky-banner__close:hover { color: var(--white); }

/* ============================================================
   MAIN
   ============================================================ */
.main {
  position: relative;
  z-index: 10;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 3rem 1.5rem 5rem;
  width: min(680px, 100%);
  margin-inline: auto;
}

/* ---------- Saudação personalizada ---------- */
.page-greet {
  font-family: var(--serif);
  font-size: clamp(1.1rem, 2.2vw, 1.45rem);
  font-weight: 500;
  font-style: italic;
  color: var(--gold-l);
  margin-bottom: 0.75rem;
}
.page-greet[hidden] { display: none; }
.page-greet #user-name {
  font-weight: 700;
  font-style: normal;
  color: var(--gold);
}

/* ---------- Título principal ---------- */
.page-title {
  font-family: var(--serif);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  white-space: nowrap;
  font-weight: 600;
  color: var(--gold);
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin-bottom: 1.25rem;
}

.title-emoji {
  font-style: normal;
}

.page-title em {
  font-style: italic;
  color: var(--gold-xl);
}

.page-sub {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: var(--white);
  line-height: 1.72;
  margin-bottom: 2.75rem;
  max-width: 520px;
}

.page-sub strong {
  color: var(--gold-l);
  font-weight: 600;
}

/* ---------- Keyframes reutilizados ---------- */
@keyframes pulse-ring {
  0%   { transform: scale(1);   opacity: 0.9; }
  100% { transform: scale(2.8); opacity: 0;   }
}

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

/* ============================================================
   SHAKE DO BOTÃO
   ============================================================ */
@keyframes btn-shake {
  0%,100% { transform: translateX(0); }
  15%     { transform: translateX(-6px) rotate(-1deg); }
  30%     { transform: translateX(6px)  rotate(1deg);  }
  45%     { transform: translateX(-5px) rotate(-1deg); }
  60%     { transform: translateX(5px)  rotate(1deg);  }
  75%     { transform: translateX(-3px); }
  90%     { transform: translateX(3px);  }
}

.btn-whatsapp.shake {
  animation: btn-shake 0.55s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}

/* ============================================================
   FLECHA PULSANTE
   ============================================================ */
.arrow-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  margin-bottom: 0.5rem;
}

.arrow-cta svg {
  color: var(--wpp);
  opacity: 0;
  animation: arrow-wave 1.5s ease-in-out infinite;
}
.arrow-cta svg:nth-child(1) { animation-delay: 0s; }
.arrow-cta svg:nth-child(2) { animation-delay: 0.2s; }
.arrow-cta svg:nth-child(3) { animation-delay: 0.4s; }

@keyframes arrow-wave {
  0%        { opacity: 0;    transform: translateY(-6px); }
  50%       { opacity: 0.9;  transform: translateY(0);    }
  100%      { opacity: 0;    transform: translateY(6px);  }
}

/* ============================================================
   BOTÃO WHATSAPP
   ============================================================ */
.btn-whatsapp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  gap: 0.75rem;
  background: var(--wpp);
  color: var(--forest);
  font-family: var(--sans);
  font-size: clamp(1rem, 2vw, 1.1rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 8px;
  padding: 1.2rem 2.75rem;
  width: 100%;
  max-width: 480px;
  transition:
    background 0.2s var(--ease),
    transform   0.2s var(--spring),
    box-shadow  0.2s var(--ease);
  box-shadow: 0 8px 40px rgba(37, 211, 102, 0.35);
  position: relative;
  overflow: hidden;
}

.btn-whatsapp::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, transparent 60%);
  pointer-events: none;
}

.btn-whatsapp:hover {
  background: #1ebe5a;
  transform: translateY(-3px) scale(1.01);
  box-shadow: 0 16px 56px rgba(37, 211, 102, 0.5);
}

.btn-whatsapp:active { transform: scale(0.97) !important; }

.btn-whatsapp__arrow {
  flex-shrink: 0;
  transition: transform 0.2s var(--spring);
}
.btn-whatsapp:hover .btn-whatsapp__arrow { transform: translateX(4px); }

/* ============================================================
   BARRA DE VAGAS RESTANTES
   ============================================================ */
.spots-urgency {
  width: 100%;
  max-width: 480px;
  margin-top: 2.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.spots-urgency__header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
}

.spots-urgency__pulse {
  position: relative;
  display: inline-block;
  width: 10px;
  height: 10px;
  flex-shrink: 0;
}
.spots-urgency__pulse::before,
.spots-urgency__pulse::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #F04040;
}
.spots-urgency__pulse::before {
  animation: pulse-ring 1.6s ease-out infinite;
  background: rgba(240, 64, 64, 0.4);
}
.spots-urgency__pulse::after { inset: 2px; }

.spots-urgency__label {
  font-size: 0.95rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.65);
}

.spots-urgency__label strong {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: #FF6B6B;
  transition: transform 0.2s var(--spring), color 0.3s;
  display: inline-block;
}

.spots-urgency__label strong.bump {
  transform: scale(1.35);
  color: #FF3333;
}

.spots-urgency__track {
  width: 100%;
  height: 12px;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 100px;
  overflow: hidden;
  border: 1px solid rgba(255, 80, 80, 0.15);
}

.spots-urgency__fill {
  height: 100%;
  border-radius: 100px;
  background: linear-gradient(90deg, #C8401A 0%, #E85020 50%, #FF6B3D 100%);
  transition: width 0.9s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.spots-urgency__fill::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.2) 50%, transparent 100%);
  animation: shimmer 2s linear infinite;
}

@keyframes shimmer {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(200%); }
}

.spots-urgency__note {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.25);
  text-align: center;
  letter-spacing: 0.02em;
}

/* ============================================================
   POPUP EXIT INTENT
   ============================================================ */
.exit-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 12, 6, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.25s var(--ease);
}
.exit-overlay[hidden] { display: none; }
.exit-overlay.is-open { opacity: 1; }

.exit-box {
  background: linear-gradient(155deg, #162419 0%, #0F1B10 100%);
  border: 1px solid rgba(200, 148, 63, 0.35);
  border-radius: 14px;
  padding: 2.75rem 2.25rem 2.25rem;
  width: 100%;
  max-width: 420px;
  text-align: center;
  position: relative;
  box-shadow: 0 40px 100px rgba(0,0,0,0.6), 0 0 60px rgba(200,148,63,0.06);
  transform: translateY(24px) scale(0.96);
  transition: transform 0.3s var(--spring);
}
.exit-overlay.is-open .exit-box { transform: translateY(0) scale(1); }

.exit-box__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(255,255,255,0.06);
  border: none;
  border-radius: 50%;
  width: 2rem;
  height: 2rem;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  color: rgba(255,255,255,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
}
.exit-box__close:hover { background: rgba(255,255,255,0.12); color: var(--white); }

.exit-box__emoji {
  font-size: 2.75rem;
  margin-bottom: 1rem;
  line-height: 1;
}

.exit-box__title {
  font-family: var(--serif);
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 600;
  color: var(--gold);
  line-height: 1.15;
  margin-bottom: 1rem;
}

.exit-box__text {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.7;
  margin-bottom: 1.75rem;
}
.exit-box__text strong {
  color: #F0A050;
  font-weight: 600;
}

.exit-box__dismiss {
  background: none;
  border: none;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.2);
  cursor: pointer;
  margin-top: 1rem;
  display: block;
  width: 100%;
  text-align: center;
  transition: color 0.2s;
  letter-spacing: 0.02em;
}
.exit-box__dismiss:hover { color: rgba(255,255,255,0.45); }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  position: relative;
  z-index: 10;
  background: var(--forest-2);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding: 2.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  text-align: center;
}

.footer__logo {
  height: 36px;
  width: auto;
  opacity: 0.35;
  margin-bottom: 0.25rem;
}

.footer__email {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.3);
  letter-spacing: 0.03em;
  transition: color 0.2s;
}
.footer__email:hover { color: var(--gold); }

.footer p {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.15);
  letter-spacing: 0.04em;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 600px) {
  .page-title { font-size: 2.4rem; white-space: normal; }

  .urgency-card { padding: 1.5rem 1.25rem; gap: 1.25rem; }

  .urgency-top-row { flex-direction: column; }

  .online-counter { flex-direction: row; min-width: unset; gap: 0.5rem; }
  #online-count { font-size: 1.2rem; }

  .countdown { gap: 0.3rem; }
  .countdown__block { min-width: 56px; padding: 0.6rem 0.65rem; }
  .countdown__num   { font-size: 1.85rem; }
  .countdown__sep   { font-size: 1.6rem; }

  .btn-whatsapp { padding: 1.1rem 1.5rem; font-size: 0.95rem; gap: 0.6rem; }

  .sticky-banner { gap: 0.5rem; }
  .sticky-banner__text { font-size: 0.78rem; text-align: center; }
}

@media (max-width: 380px) {
  .countdown__block { min-width: 48px; padding: 0.5rem; }
  .countdown__num   { font-size: 1.6rem; }
}
