/* ============================================
   BaixaFatura - Landing Page v2.0
   - Mais objetiva, focada na captura
   - Animações: reveal, counter, marquee, pulse, shake, pop
   ============================================ */

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

:root {
  --bg: #070707;
  --bg-alt: #0f0f0f;
  --hl: #D4FF00;
  --hl-dim: #b8d900;
  --red: #E53935;
  --white: #FFFFFF;
  --gray: #B0B0B0;
  --gray-dim: #6b6b6b;
  --radius: 18px;
  --radius-sm: 10px;
}

html, body {
  background: var(--bg);
  color: var(--white);
  font-family: 'Montserrat', system-ui, -apple-system, sans-serif;
  font-weight: 400;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.landing {
  max-width: 560px;
  margin: 0 auto;
  padding: 28px 18px 40px;
  position: relative;
  z-index: 2;
}

.hl { color: var(--hl); }

/* Watermark € com pulse */
.bg-watermark {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 1;
  font-family: 'Montserrat', sans-serif;
  font-weight: 900;
  color: rgba(255,255,255,0.04);
  font-size: 80px;
}
.bg-watermark span {
  position: absolute;
  animation: pulse-wm 4s ease-in-out infinite;
}
@keyframes pulse-wm {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50% { opacity: 0.9; transform: scale(1.08); }
}

.bg-glow {
  position: fixed;
  top: -120px; right: -120px;
  width: 480px; height: 480px;
  background: radial-gradient(circle, rgba(212,255,0,0.18), rgba(212,255,0,0) 60%);
  pointer-events: none;
  z-index: 1;
  animation: drift 12s ease-in-out infinite alternate;
}
@keyframes drift {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-30px, 40px) scale(1.1); }
}

/* HERO */
.hero { text-align: center; margin-bottom: 24px; }
.hero-title {
  font-size: clamp(32px, 8.5vw, 48px);
  font-weight: 900;
  text-transform: uppercase;
  line-height: 1.05;
  letter-spacing: -1px;
  margin-bottom: 14px;
}
.bolt {
  display: inline-block;
  animation: bolt-flash 2.4s ease-in-out infinite;
}
@keyframes bolt-flash {
  0%, 100% { transform: rotate(0); filter: drop-shadow(0 0 0 transparent); }
  20%      { transform: rotate(-8deg); filter: drop-shadow(0 0 14px rgba(212,255,0,0.85)); }
  40%      { transform: rotate(6deg); filter: drop-shadow(0 0 18px rgba(212,255,0,0.95)); }
  60%      { transform: rotate(-3deg); filter: drop-shadow(0 0 8px rgba(212,255,0,0.6)); }
}
.hero-sub {
  font-size: clamp(20px, 6vw, 28px);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.5px;
  margin-bottom: 18px;
}
.counter {
  display: inline-block;
  font-variant-numeric: tabular-nums;
  font-size: 1.3em;
  font-weight: 900;
  vertical-align: middle;
  text-shadow: 0 0 24px rgba(212,255,0,0.55);
}

.trust-row {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.trust-item {
  font-size: 12px;
  font-weight: 700;
  color: var(--gray);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.trust-item span { color: var(--hl); margin-right: 4px; }

/* Logos das comercializadoras (imagem única) - responsiva */
.logos-section {
  margin: 22px 0;
  width: 100%;
}
.logos-title {
  font-size: clamp(9px, 2.5vw, 11px);
  color: var(--gray);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 10px;
  font-weight: 700;
  text-align: center;
}
.logos-image-wrap {
  background: #fff;
  border-radius: clamp(10px, 3vw, 14px);
  padding: clamp(8px, 2vw, 14px);
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  width: 100%;
  box-sizing: border-box;
}
.logos-image {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: clamp(6px, 1.5vw, 8px);
  transition: transform .4s ease;
}
.logos-image-wrap:hover .logos-image {
  transform: scale(1.02);
}
/* Em ecrãs muito pequenos, reduzir padding para maximizar largura */
@media (max-width: 480px) {
  .logos-image-wrap { padding: 6px; }
  .logos-section { margin: 16px 0; }
}
/* Em ecrãs grandes, limitar largura máxima */
@media (min-width: 768px) {
  .logos-image-wrap { max-width: 100%; }
}

/* Form section */
.form-section {
  background: var(--bg-alt);
  border: 2px solid var(--hl);
  border-radius: var(--radius);
  padding: 26px 18px;
  margin: 26px 0;
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 50px rgba(212,255,0,0.08);
}
.form-pulse {
  position: absolute;
  inset: -2px;
  border-radius: var(--radius);
  pointer-events: none;
  box-shadow: 0 0 0 0 rgba(212,255,0,0.5);
  animation: ring-pulse 2.4s ease-out infinite;
}
@keyframes ring-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(212,255,0,0.5); }
  70%  { box-shadow: 0 0 0 14px rgba(212,255,0,0); }
  100% { box-shadow: 0 0 0 0 rgba(212,255,0,0); }
}
.form-title {
  font-size: clamp(22px, 6.5vw, 28px);
  font-weight: 900;
  text-transform: uppercase;
  text-align: center;
  letter-spacing: -0.5px;
  margin-bottom: 6px;
  position: relative;
  z-index: 1;
}
.form-sub {
  text-align: center;
  color: var(--gray);
  font-size: 13px;
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
}
.form-sub strong { color: var(--hl); }

.lead-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  z-index: 1;
}
.form-row.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-group label {
  font-size: 12px; font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--hl);
}
.form-group input,
.form-group select {
  background: #1a1a1a;
  border: 1.5px solid #2a2a2a;
  color: var(--white);
  padding: 11px 12px;
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
  font-weight: 500;
  transition: border-color .15s, box-shadow .15s, transform .15s;
  width: 100%;
}
.form-group input::placeholder { color: #5a5a5a; }
.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--hl);
  box-shadow: 0 0 0 3px rgba(212,255,0,0.18);
  transform: translateY(-1px);
}
.form-group select option { background: #1a1a1a; }
.hint { font-size: 11px; color: var(--gray-dim); margin-top: 2px; }
.hint.warn { color: var(--hl); font-weight: 700; animation: hint-in .3s ease; }
@keyframes hint-in {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.btn-submit {
  background: var(--hl);
  color: #000;
  border: none;
  padding: 16px 18px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 6px;
  transition: transform .12s, box-shadow .15s;
  font-family: inherit;
  position: relative;
  overflow: hidden;
}
.btn-submit::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  transform: translateX(-100%);
  transition: transform .6s;
}
.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(212,255,0,0.45);
}
.btn-submit:hover::after { transform: translateX(100%); }
.btn-submit:active { transform: translateY(0); }
.btn-icon {
  font-size: 20px;
  display: inline-block;
  animation: bolt-icon 1.6s ease-in-out infinite;
}
@keyframes bolt-icon {
  0%, 100% { transform: rotate(0); }
  50%      { transform: rotate(-12deg) scale(1.15); }
}

.btn-secondary {
  background: transparent;
  color: var(--hl);
  border: 2px solid var(--hl);
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 800;
  text-transform: uppercase;
  font-size: 12px;
  cursor: pointer;
  margin-top: 12px;
  font-family: inherit;
}

.form-footer {
  text-align: center;
  font-size: 11px;
  color: var(--gray-dim);
  margin-top: 10px;
}

/* Alerts */
.alert {
  padding: 14px 16px;
  border-radius: 12px;
  margin-bottom: 18px;
  font-size: 14px;
  position: relative;
  z-index: 1;
}
.alert-success {
  background: rgba(16,185,129,0.12);
  border: 1.5px solid #10B981;
  color: #d4f7e8;
}
.alert-success h3 { color: #10B981; margin-bottom: 8px; font-size: 17px; }
.alert-success p { margin-bottom: 6px; line-height: 1.55; }
.alert-error {
  background: rgba(229,57,53,0.12);
  border: 1.5px solid var(--red);
  color: #ffd4d3;
}
.alert-error ul { margin-left: 18px; }

/* WhatsApp CTA */
.wa-cta {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-alt);
  border: 2px solid var(--hl);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin: 20px 0;
  text-decoration: none;
  color: var(--white);
  transition: transform .15s, box-shadow .15s;
}
.wa-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(212,255,0,0.18);
}
.wa-icon {
  flex: 0 0 64px;
  width: 64px; height: 64px;
  background: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  animation: wa-bounce 2.2s ease-in-out infinite;
}
@keyframes wa-bounce {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-4px); }
}
.wa-text { display: flex; flex-direction: column; }
.wa-top { font-size: 12px; font-weight: 700; color: var(--white); text-transform: uppercase; }
.wa-number { font-size: 22px; font-weight: 900; color: var(--hl); line-height: 1.1; letter-spacing: -0.5px; }
.wa-sub { font-size: 10px; color: var(--gray); margin-top: 4px; text-transform: uppercase; }

/* Footer */
.footer {
  text-align: center;
  padding: 24px 0 12px;
  border-top: 1px solid rgba(255,255,255,0.08);
  margin-top: 20px;
}
.footer-logo {
  font-size: 16px;
  font-weight: 900;
  color: var(--hl);
  margin-bottom: 4px;
}
.footer-text {
  font-size: 11px;
  color: var(--gray-dim);
  letter-spacing: 0.3px;
}

/* === Animations: scroll reveal === */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .6s ease-out, transform .6s ease-out;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.animate-pop {
  animation: pop-in .5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes pop-in {
  0%   { opacity: 0; transform: scale(0.85); }
  100% { opacity: 1; transform: scale(1); }
}

.animate-shake {
  animation: shake .4s ease-in-out;
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

/* Responsive */
@media (max-width: 380px) {
  .form-row.two { grid-template-columns: 1fr; }
  .trust-row { gap: 8px; }
  .trust-item { font-size: 11px; }
}

@media (min-width: 768px) {
  .landing { padding-top: 40px; }
  .hero-title { font-size: 52px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* Touch-friendly: desabilitar hover effects em dispositivos touch */
@media (hover: none) {
  .logos-image-wrap:hover .logos-image { transform: none; }
  .btn-submit:hover { transform: none; }
  .wa-cta:hover { transform: none; }
}
