/* ===========================
   VARIABLES
=========================== */
:root {
  --blue: #00529B;
  --blue-dark: #003F7A;
  --orange: #FF6B00;
  --orange-dark: #CC5500;
  --whatsapp: #25D366;
  --white: #FFFFFF;
  --gray-50: #F8F9FA;
  --gray-100: #F1F3F5;
  --gray-200: #E9ECEF;
  --gray-300: #DEE2E6;
  --gray-600: #6C757D;
  --gray-900: #212529;
  --font: 'Inter', sans-serif;
  --radius: 8px;
  --radius-lg: 16px;
  --shadow: 0 4px 24px rgba(0,0,0,0.10);
  --shadow-lg: 0 8px 48px rgba(0,0,0,0.15);
  --transition: 0.25s ease;
}

/* ===========================
   RESET
=========================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { font-family: var(--font); color: var(--gray-900); line-height: 1.6; background: var(--white); }
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
button { cursor: pointer; font-family: var(--font); border: none; background: none; }
input, select, textarea { font-family: var(--font); }
blockquote { font-style: normal; }

/* ===========================
   LAYOUT
=========================== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.container--narrow { max-width: 720px; }
.section { padding: 80px 0; }
.section--light { background: var(--gray-50); }
.section--white { background: var(--white); }
.section--blue { background: var(--blue); }
.section--orange { background: var(--orange); }
.cta-final { text-align: center; }

.section__title { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; text-align: center; margin-bottom: 12px; }
.section__title--white { color: var(--white); }
.section__subtitle { font-size: 1.05rem; text-align: center; color: var(--gray-600); margin-bottom: 48px; }
.section__subtitle--white { color: rgba(255,255,255,0.85); }

/* ===========================
   BUTTONS
=========================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 28px; border-radius: var(--radius); font-size: 1rem; font-weight: 700;
  transition: var(--transition); min-height: 48px; white-space: nowrap;
}
.btn--primary { background: var(--blue); color: var(--white); box-shadow: 0 4px 16px rgba(0,82,155,0.30); }
.btn--primary:hover { background: var(--blue-dark); transform: translateY(-2px); }
.btn--whatsapp { background: var(--whatsapp); color: var(--white); box-shadow: 0 4px 16px rgba(37,211,102,0.30); }
.btn--whatsapp:hover { background: #1da851; transform: translateY(-2px); }
.btn--white { background: var(--white); color: var(--blue); }
.btn--white:hover { background: var(--gray-100); }
.btn--outline { background: transparent; border: 2px solid var(--blue); color: var(--blue); }
.btn--outline:hover { background: var(--blue); color: var(--white); }
.btn--full { width: 100%; margin-top: 8px; }
.btn--payment {
  flex: 1; padding: 16px; border: 2px solid var(--gray-300);
  border-radius: var(--radius); font-size: 0.95rem; font-weight: 600; color: var(--gray-900);
  transition: var(--transition);
}
.btn--payment:hover, .btn--payment.active { border-color: var(--blue); background: rgba(0,82,155,0.06); color: var(--blue); }
.btn--copy { background: var(--blue); color: var(--white); padding: 10px 16px; border-radius: var(--radius); font-size: 0.9rem; font-weight: 600; margin-top: 10px; width: 100%; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none !important; }

/* ===========================
   HERO
=========================== */
.hero {
  position: relative; min-height: 100vh; display: flex; align-items: center;
  background: url('https://images.unsplash.com/photo-1529156069898-49953e39b3ac?auto=format&fit=crop&w=1920&q=80') center/cover no-repeat;
  background-color: var(--blue);
}
.hero__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(0,20,60,0.82) 0%, rgba(0,82,155,0.68) 55%, rgba(0,40,100,0.75) 100%);
}
.hero__content { position: relative; z-index: 1; max-width: 1200px; margin: 0 auto; padding: 80px 24px; color: var(--white); }
.hero__badge {
  display: inline-flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,0.15); border: 1px solid rgba(255,255,255,0.30);
  border-radius: 100px; padding: 8px 18px; font-size: 0.85rem; font-weight: 600;
  margin-bottom: 28px; backdrop-filter: blur(4px);
}
.hero__title { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 800; line-height: 1.15; max-width: 700px; margin-bottom: 20px; }
.hero__subtitle { font-size: clamp(1rem, 2vw, 1.2rem); max-width: 540px; opacity: 0.90; margin-bottom: 40px; line-height: 1.65; }
.hero__ctas { display: flex; gap: 16px; flex-wrap: wrap; }

/* ===========================
   STEPS (Como Funciona)
=========================== */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 32px; }
.step { background: var(--white); border-radius: var(--radius-lg); padding: 36px 28px; text-align: center; box-shadow: var(--shadow); transition: transform var(--transition), box-shadow var(--transition); }
.step:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.step__icon { width: 56px; height: 56px; background: var(--blue); color: var(--white); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; font-weight: 800; margin: 0 auto 16px; }
.step__title { font-size: 1.05rem; font-weight: 700; margin-bottom: 10px; color: var(--blue); }
.step__desc { font-size: 0.9rem; color: var(--gray-600); line-height: 1.6; }

/* ===========================
   FEATURE CARDS (Por que SulAmerica)
=========================== */
.cards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; }
.card-feature { background: rgba(255,255,255,0.10); border: 1px solid rgba(255,255,255,0.20); border-radius: var(--radius-lg); padding: 32px 24px; color: var(--white); transition: transform var(--transition); text-align: center; }
.card-feature:hover { transform: translateY(-4px); background: rgba(255,255,255,0.16); }
.card-feature__icon { width: 56px; height: 56px; background: rgba(255,255,255,0.18); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; }
.card-feature h3 { font-size: 1rem; font-weight: 700; margin-bottom: 10px; }
.card-feature p { font-size: 0.9rem; opacity: 0.85; line-height: 1.55; }

/* ===========================
   TESTIMONIALS
=========================== */
.testimonials { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.testimonial { background: var(--white); border-radius: var(--radius-lg); padding: 28px 24px; box-shadow: var(--shadow); border-top: 4px solid var(--orange); }
.testimonial blockquote { display: flex; flex-direction: column; gap: 12px; }
.testimonial__avatar { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; border: 3px solid var(--blue); margin-bottom: 8px; }
.testimonial p { font-size: 0.95rem; color: var(--gray-600); font-style: italic; line-height: 1.65; }
.testimonial footer strong { font-size: 0.875rem; color: var(--blue); }

/* ===========================
   FOOTER
=========================== */
.footer { background: var(--gray-900); color: rgba(255,255,255,0.75); padding: 48px 0 32px; }
.footer__top { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-bottom: 32px; }
.footer__logo { filter: brightness(0) invert(1); }
.footer__tagline { font-size: 0.9rem; text-align: center; }
.footer__bottom { border-top: 1px solid rgba(255,255,255,0.10); padding-top: 24px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; font-size: 0.85rem; }
.footer__links { display: flex; gap: 24px; }
.footer__links a { opacity: 0.75; transition: opacity var(--transition); }
.footer__links a:hover { opacity: 1; }

/* ===========================
   WHATSAPP FLOAT
=========================== */
.whatsapp-float {
  position: fixed; bottom: 28px; right: 28px; width: 60px; height: 60px;
  background: var(--whatsapp); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px rgba(37,211,102,0.45); z-index: 999;
  transition: transform var(--transition), box-shadow var(--transition);
  font-size: 0;
  color: transparent;
}
.whatsapp-float::after {
  content: '';
  display: block;
  width: 28px;
  height: 28px;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"><path d="M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413z"/></svg>') center/contain no-repeat;
}
.whatsapp-float:hover { transform: scale(1.10); box-shadow: 0 8px 28px rgba(37,211,102,0.55); }

/* ===========================
   FORM WRAPPER
=========================== */
.form-wrapper { background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 48px; margin-top: 16px; }
.form-progress { display: flex; align-items: center; justify-content: center; margin-bottom: 40px; }
.form-progress__step {
  width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--gray-300);
  background: var(--white); color: var(--gray-600); font-size: 0.85rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center; transition: var(--transition); flex-shrink: 0;
}
.form-progress__step.active { background: var(--blue); border-color: var(--blue); color: var(--white); }
.form-progress__step.done { background: var(--whatsapp); border-color: var(--whatsapp); color: var(--white); }
.form-progress__line { flex: 1; height: 2px; background: var(--gray-300); max-width: 80px; }
.form-step--hidden { display: none !important; }
.form-step__title { font-size: 1.2rem; font-weight: 700; color: var(--blue); margin-bottom: 24px; }

/* Form fields */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 0.875rem; font-weight: 600; margin-bottom: 6px; }
.form-group input, .form-group select {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--gray-300);
  border-radius: var(--radius); font-size: 1rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  background: var(--white); color: var(--gray-900);
}
.form-group input:focus, .form-group select:focus {
  outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0,82,155,0.12);
}
.form-group input.error { border-color: #dc3545; }
.form-group input[readonly] { background: var(--gray-100); color: var(--gray-600); cursor: default; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group--small { max-width: 120px; }
.form-error { display: block; font-size: 0.8rem; color: #dc3545; margin-top: 4px; min-height: 18px; }

/* Loading */
.loading-state { text-align: center; padding: 48px 0; }
.loading-bar { width: 100%; height: 6px; background: var(--gray-200); border-radius: 100px; overflow: hidden; margin-bottom: 24px; }
.loading-bar__fill { height: 100%; background: linear-gradient(90deg, var(--blue), var(--orange)); border-radius: 100px; animation: loadingSlide 1.8s ease-in-out infinite; }
@keyframes loadingSlide {
  0%   { width: 10%; margin-left: 0; }
  50%  { width: 50%; margin-left: 25%; }
  100% { width: 10%; margin-left: 90%; }
}
.loading-text { font-size: 1rem; font-weight: 600; color: var(--blue); margin-bottom: 8px; }
.loading-subtext { font-size: 0.875rem; color: var(--gray-600); }

/* Plans (step 2) */
.planos-container { display: flex; flex-direction: column; gap: 16px; }
.plano-raw-text { white-space: pre-wrap; font-size: 0.9rem; color: var(--gray-600); line-height: 1.7; margin-bottom: 16px; }
.plano-input { width: 100%; padding: 12px 14px; border: 1.5px solid var(--gray-300); border-radius: var(--radius); font-size: 1rem; margin-bottom: 8px; }
.plano-input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0,82,155,0.12); }

/* Payment */
.payment-options { display: flex; gap: 12px; margin: 24px 0; flex-wrap: wrap; }
.card-fields { margin-top: 8px; padding-top: 24px; border-top: 1px solid var(--gray-300); }
.pdf-link { margin-bottom: 20px; }

/* Result cards */
.result-card { border-radius: var(--radius-lg); padding: 40px 32px; text-align: center; }
.result-card h3 { font-size: 1.25rem; font-weight: 700; margin-bottom: 12px; }
.result-card p { color: var(--gray-600); margin-bottom: 20px; line-height: 1.6; }
.result-icon { font-size: 1rem; font-weight: 900; width: 64px; height: 64px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; }

.result-card--pix { background: var(--gray-50); border: 2px dashed var(--blue); }
.result-card--pix h3 { color: var(--blue); }
.result-price { font-size: 1.6rem; font-weight: 800; color: var(--orange); margin-bottom: 20px; }
.pix-qr { width: 160px; height: 160px; margin: 0 auto 16px; border-radius: var(--radius); border: 1px solid var(--gray-200); }
.pix-instructions { font-size: 0.9rem; color: var(--gray-600); margin-bottom: 12px; }
.pix-code-box { background: var(--white); border: 1px solid var(--gray-300); border-radius: var(--radius); padding: 14px; margin-bottom: 16px; }
.pix-code-box code { display: block; font-size: 0.78rem; word-break: break-all; color: var(--gray-600); margin-bottom: 4px; font-family: 'Courier New', monospace; }
.pix-note { font-size: 0.85rem; color: var(--gray-600); margin-top: 8px; }

.result-card--success { background: #f0fff4; border: 2px solid var(--whatsapp); }
.result-card--success .result-icon { background: var(--whatsapp); color: var(--white); }
.result-card--error { background: #fff8f0; border: 2px solid var(--orange); }
.result-card--error .result-icon { background: var(--orange); color: var(--white); }

/* ===========================
   FADE-IN (Intersection Observer)
=========================== */
.fade-in { opacity: 0; transform: translateY(28px); transition: opacity 0.6s ease, transform 0.6s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ===========================
   MOBILE RESPONSIVE
=========================== */
@media (max-width: 768px) {
  .section { padding: 56px 0; }
  .hero__content { padding: 100px 24px 60px; }
  .hero__ctas { flex-direction: column; align-items: stretch; }
  .hero__ctas .btn { justify-content: center; }
  .steps { grid-template-columns: 1fr; gap: 20px; }
  .cards-grid { grid-template-columns: 1fr 1fr; }
  .testimonials { grid-template-columns: 1fr; }
  .form-wrapper { padding: 28px 20px; }
  .form-row { grid-template-columns: 1fr; }
  .form-group--small { max-width: 100%; }
  .payment-options { flex-direction: column; }
  .footer__bottom { flex-direction: column; text-align: center; }
  .footer__links { justify-content: center; }
  .whatsapp-float { bottom: 20px; right: 16px; width: 52px; height: 52px; }
  .form-progress__line { max-width: 40px; }
}

@media (max-width: 480px) {
  .cards-grid { grid-template-columns: 1fr; }
  .pix-qr { width: 140px; height: 140px; }
  .result-card { padding: 28px 20px; }
}
