/* ============================================
   PoupaPlus - Estilos Globais (Tema Tecnológico)
   Inspirado em templates modernos (Kelyvex-like)
   ============================================ */

/* --- Reset e Variáveis --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

:root {
  /* Cores Primárias (Tema Tech + Energy) */
  --primary: #0a2a66;
  --primary-light: #1a4fa0;
  --primary-dark: #051a40;
  --secondary: #00d084;
  --secondary-dark: #00a86b;
  --accent: #ff6b35;
  --blue: #2563eb;
  --blue-hover: #1d4ed8;
  --green: #25D366;
  
  /* Cores Neutras */
  --text: #1a1a2e;
  --text-light: #5a5a7a;
  --text-lighter: #8a8aaa;
  --bg: #ffffff;
  --bg-white: #ffffff;
  --bg-light: #f8f9fc;
  --bg-dark: #0f172a;
  --border: #eef0f6;
  
  /* Status */
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  
  /* Espaçamento e Bordas */
  --radius: 12px;
  --radius-lg: 20px;
  --radius-sm: 8px;
  
  /* Sombras */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.12);
  --shadow-glow: 0 0 20px rgba(0, 208, 132, 0.3);
  
  /* Transições */
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: 0.15s ease;
  
  /* Fontes */
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-size-sm: 0.875rem;
  --font-size-md: 1rem;
  --font-size-lg: 1.25rem;
  --font-size-xl: 1.5rem;
  --font-size-2xl: 2rem;
  --font-size-3xl: 2.5rem;
}

/* --- Tipografia --- */
body {
  font-family: var(--font);
  font-size: var(--font-size-md);
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
}

h1 { font-size: var(--font-size-3xl); }
h2 { font-size: var(--font-size-2xl); }
h3 { font-size: var(--font-size-xl); }

p {
  margin-bottom: 1rem;
  color: var(--text-light);
}

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition);
}

/* --- Header (Index Style) --- */
header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
}

header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.5rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
}

.logo-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.logo-text {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.5px;
}

.logo-text span {
  color: var(--blue);
}

#mainNav {
  display: flex;
  gap: 2rem;
  align-items: center;
}

#mainNav a {
  color: var(--text-light);
  font-weight: 500;
  font-size: 0.9rem;
  transition: color var(--transition);
  position: relative;
}

#mainNav a:hover {
  color: var(--blue);
}

/* Sublinhado animado + estado ativo nos links de navegação */
#mainNav a.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -5px;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--blue), var(--secondary));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
}

#mainNav a.nav-link:hover::after,
#mainNav a.nav-link.active::after {
  transform: scaleX(1);
}

#mainNav a.nav-link.active {
  color: var(--blue);
  font-weight: 600;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}

.hamburger span {
  width: 24px;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
  transition: var(--transition);
}

/* --- Botões --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  box-shadow: var(--shadow);
  border: none;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
}

.btn-secondary {
  background: var(--secondary);
  color: white;
  box-shadow: var(--shadow);
  border: none;
}

.btn-secondary:hover {
  background: var(--secondary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-whatsapp {
  background: var(--green);
  color: #fff;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.3);
  border-radius: var(--radius-sm);
}

.btn-whatsapp:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: white;
}

/* Brilho do logo (tema tech) */
.logo-circle {
  box-shadow: 0 4px 16px rgba(26, 79, 160, 0.35);
}

/* Efeito "shine" nos botões primários */
.btn-primary,
.btn-whatsapp,
.btn-secondary {
  position: relative;
  overflow: hidden;
}

.btn-primary::before,
.btn-whatsapp::before,
.btn-secondary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -75%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    105deg,
    transparent,
    rgba(255, 255, 255, 0.35),
    transparent
  );
  transform: skewX(-20deg);
  transition: left 0.6s ease;
}

.btn-primary:hover::before,
.btn-whatsapp:hover::before,
.btn-secondary:hover::before {
  left: 125%;
}

/* Pulso suave no botão WhatsApp */
.btn-whatsapp {
  animation: whatsappPulse 2.5s infinite;
}

@keyframes whatsappPulse {
  0%,
  100% {
    box-shadow: 0 4px 14px rgba(37, 211, 102, 0.3);
  }
  50% {
    box-shadow: 0 4px 24px rgba(37, 211, 102, 0.55);
  }
}

/* --- Hero Section --- */
.hero {
  padding: 8rem 1rem 4rem;
  min-height: 44vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary), var(--primary-light));
  color: white;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Grelha tech pulsante */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse at center, black 35%, transparent 78%);
  mask-image: radial-gradient(ellipse at center, black 35%, transparent 78%);
  animation: gridPulse 5s ease-in-out infinite;
  pointer-events: none;
}

/* Blobs aurora (mesh) em movimento */
.hero::after {
  content: '';
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(560px circle at 18% 30%, rgba(0, 208, 132, 0.22), transparent 45%),
    radial-gradient(680px circle at 82% 18%, rgba(37, 99, 235, 0.45), transparent 50%),
    radial-gradient(520px circle at 55% 105%, rgba(0, 208, 132, 0.18), transparent 45%);
  filter: blur(10px);
  animation: auroraShift 16s ease-in-out infinite alternate;
  pointer-events: none;
}

.hero .container {
  width: 100%;
  position: relative;
  z-index: 1;
}

/* Eyebrow (rótulo acima do título) */
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.1rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.8);
}

.hero-eyebrow::before,
.hero-eyebrow::after {
  content: '';
  width: 30px;
  height: 2px;
  background: linear-gradient(90deg, var(--secondary), transparent);
}

.hero-eyebrow::before {
  background: linear-gradient(90deg, transparent, var(--secondary));
}

.hero h1 {
  font-size: clamp(2.25rem, 5.5vw, 3.75rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
  margin-bottom: 1.25rem;
  text-shadow: 0 8px 32px rgba(5, 26, 64, 0.45);
}

/* Barra de destaque sob o título */
.hero h1::after {
  content: '';
  display: block;
  width: 76px;
  height: 4px;
  margin: 1.25rem auto 0;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--secondary), #22d3ee);
}

/* Palavra em destaque: texto em gradiente verde→ciano */
.hero h1 .highlight {
  background: linear-gradient(90deg, var(--secondary), #22d3ee);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: none;
}

.hero p {
  font-size: var(--font-size-lg);
  max-width: 700px;
  margin: 0 auto 2rem;
  color: rgba(255, 255, 255, 0.9);
}

.hero p.highlight {
  color: var(--secondary);
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: 0.02em;
}

.hero .highlight {
  color: var(--secondary);
}

/* --- Seções --- */
.section {
  padding: 4rem 1rem;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin-bottom: 1rem;
  position: relative;
  display: inline-block;
}

.section-header h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 2px;
}

.section-header p {
  max-width: 600px;
  margin: 0 auto;
  color: var(--text-light);
  font-size: var(--font-size-lg);
}

/* --- Container --- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* --- Grid --- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

/* --- Cards --- */
.card {
  background: var(--bg);
  padding: 2rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  border: 1px solid var(--border);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.card-icon {
  width: 60px;
  height: 60px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  font-size: var(--font-size-2xl);
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.1), rgba(0, 208, 132, 0.1));
  color: var(--primary);
}

.card-icon.green {
  background: linear-gradient(135deg, rgba(0, 208, 132, 0.1), rgba(6, 182, 212, 0.1));
  color: var(--secondary);
}

/* Avatar da equipa (iniciais, sem imagens externas) */
.team-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #00d084);
  color: #fff;
  font-size: 1.3rem;
  font-weight: 700;
  box-shadow: 0 6px 20px rgba(10, 42, 102, 0.3);
  overflow: hidden;
}

.team-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  border-radius: 50%;
}

/* Avatar de depoimentos (iniciais, sem imagens externas) */
.avatar {
  width: 50px;
  height: 50px;
  min-width: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #00d084);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(10, 42, 102, 0.25);
}

/* Badge de parceiro (texto, sem imagens externas) */
.partner-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-light);
  letter-spacing: 0.04em;
  padding: 0.5rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-light);
}

.card h3 {
  margin-bottom: 0.75rem;
  font-size: var(--font-size-lg);
}

.card p {
  color: var(--text-light);
  margin-bottom: 0;
}

/* --- Formulários --- */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: var(--font-size-md);
  transition: all var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 208, 132, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

/* --- Footer (padrão idêntico ao index.html) --- */
footer {
  background: linear-gradient(180deg, #0f0f23, #0a0a1a);
  color: var(--text-lighter);
  padding: 4rem 0 2rem;
}

footer .container {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
}

footer h4 {
  color: #fff;
  font-size: 0.95rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

footer p,
footer a {
  font-size: 0.85rem;
  color: var(--text-lighter);
  line-height: 2;
  display: block;
}

footer a {
  transition: color var(--transition-fast);
}

footer a:hover {
  color: #fff;
}

footer .social {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

footer .social a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  line-height: 1;
  transition: all var(--transition);
}

footer .social a:hover {
  background: var(--blue);
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.4);
}

footer .bottom {
  grid-column: 1 / -1;
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  margin-top: 2rem;
  font-size: 0.82rem;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

/* --- Utility Classes --- */
.divider {
  height: 1px;
  background: var(--border);
  margin: 2rem 0;
}

.divider-dark {
  background: rgba(255, 255, 255, 0.1);
}

.text-center { text-align: center; }
.text-primary { color: var(--primary); }
.text-secondary { color: var(--secondary); }
.text-white { color: white; }
.text-light { color: var(--text-light); }

.bg-primary { background: var(--primary); }
.bg-secondary { background: var(--secondary); }
.bg-light { background: var(--bg-light); }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

/* --- WhatsApp Float Button --- */
.whatsapp-float {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  transition: all var(--transition);
}

.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: var(--shadow-glow);
}

.whatsapp-float i {
  color: white;
  font-size: 1.75rem;
}

/* --- Animations --- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in-up {
  animation: fadeInUp 0.6s ease-out forwards;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.spinner {
  animation: spin 1s linear infinite;
}

/* Reveal on scroll */
.reveal-hidden {
  opacity: 0;
  transform: translateY(28px);
}

.reveal-hidden.revealed,
.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

.reveal,
.reveal-hidden {
  transition: opacity 0.6s ease, transform 0.6s ease;
}

/* --- Header Responsive --- */
@media (max-width: 768px) {
  #mainNav {
    display: none;
  }
  
  .hamburger {
    display: flex;
  }
  
  #mainNav.active {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: #fff;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    gap: 1rem;
    z-index: 99;
  }
  
  .hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  
  .hamburger.active span:nth-child(2) {
    opacity: 0;
  }
  
  .hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }
  
  .hero { padding: 7rem 1rem 3rem; min-height: 50vh; }
  .hero h1 { font-size: var(--font-size-2xl); }
  .hero-eyebrow { letter-spacing: 0.22em; }
  .section { padding: 3rem 1rem; }
  .grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.5rem; }
  footer .container { grid-template-columns: 1fr; gap: 2rem; text-align: left; }
  footer .social { justify-content: flex-start; }
}

@media (max-width: 576px) {
  header .container { padding: 0.75rem 1rem; }
  .hero h1 { font-size: var(--font-size-2xl); }
  .btn { padding: 0.625rem 1.25rem; font-size: var(--font-size-sm); }
}

/* ── Gradiente dinâmico do hero ─────────────────────────── */
@keyframes gridPulse {
  0%, 100% { opacity: 0.45; }
  50% { opacity: 1; }
}

@keyframes auroraShift {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  33% { transform: translate3d(4%, -3%, 0) scale(1.08); }
  66% { transform: translate3d(-4%, 2%, 0) scale(0.96); }
  100% { transform: translate3d(2%, 4%, 0) scale(1.05); }
}

@media (prefers-reduced-motion: reduce) {
  .hero::before,
  .hero::after {
    animation: none;
  }
  .hero::before {
    opacity: 0.6;
  }
  .hero::after {
    opacity: 0.8;
  }
}
