* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: #8FD98A;
  font-family: Inter, "SF Pro Display", -apple-system, system-ui, sans-serif;
}

a, a:visited { color: #1B5CEB; text-decoration: none; }
a:hover { color: #0E9E68; }
input, select, textarea, button { font-family: inherit; }
::placeholder { color: #9BA5B5; }

.page {
  position: relative;
  min-height: 100vh;
  background: #8FD98A;
  overflow-x: hidden;
}

.bg-fade {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(143,217,138,0.55) 0%, rgba(143,217,138,0.93) 46%, #8FD98A 62%);
  pointer-events: none;
  transform: translateZ(0);
  will-change: transform;
}

.blob {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
  transform: translateZ(0);
  will-change: transform;
  contain: paint;
}
.blob-tl {
  width: 1200px; height: 1200px; left: -380px; top: -420px;
  background: radial-gradient(closest-side, rgba(27,92,235,0.09), rgba(27,92,235,0));
}
.blob-br {
  width: 1100px; height: 1100px; right: -360px; bottom: -380px;
  background: radial-gradient(closest-side, rgba(14,158,104,0.10), rgba(14,158,104,0));
}

/* Nav */
.nav {
  position: relative;
  z-index: 2;
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 24px 12px;
  min-height: 140px;
  flex-wrap: wrap;
}

.nav-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  flex: 0 0 auto;
}

.badge {
  display: inline-flex;
  padding: 9px 18px;
  border-radius: 999px;
  background: linear-gradient(180deg,#2E9E52,#1E6E38);
  color: #fff;
  font: 600 13px Inter;
  letter-spacing: -0.01em;
  box-shadow: 0 4px 0 #14522A, 0 6px 10px -2px rgba(0,0,0,0.35);
  border: 1px solid #1E6E38;
  white-space: nowrap;
}

.whatsapp-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  padding: 8px 14px 8px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.85);
  box-shadow: 0 8px 18px -10px rgba(12,26,60,0.3);
}
.whatsapp-icon {
  width: 30px; height: 30px; border-radius: 15px;
  background: #25D366;
  display: flex; align-items: center; justify-content: center;
  flex: 0 0 auto;
}
.whatsapp-label { font: 600 13px Inter; color: #232B3B; }

.nav-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex: 0 0 auto;
}
.wordmark {
  font: 800 20px Poppins, Inter;
  color: #0A1020;
  letter-spacing: -0.01em;
}
.wordmark span { font-weight: 600; color: #1E6E38; }
.agent-id { font: 500 11px Inter; color: #5D6779; letter-spacing: 0.03em; white-space: nowrap; }
.store-btn {
  margin-top: 2px;
  display: inline-flex;
  padding: 7px 16px;
  border-radius: 999px;
  background: linear-gradient(180deg,#2E9E52,#1E6E38);
  color: #fff;
  font: 600 12px Inter;
  white-space: nowrap;
  box-shadow: 0 4px 0 #14522A, 0 6px 10px -2px rgba(0,0,0,0.35);
  border: 1px solid #1E6E38;
}
.store-btn:visited { color: #fff; }
.store-btn:hover { color: #fff; opacity: 0.92; }

/* Hero */
.hero {
  position: relative;
  z-index: 2;
  max-width: 920px;
  margin: 32px auto 0;
  padding: 20px 24px 0;
  text-align: center;
}
.hero h1 {
  font: 600 58px/1.12 Poppins, Inter;
  color: #0A1020;
  letter-spacing: -0.02em;
  margin: 0;
}
.hero-sub {
  margin-top: 16px;
  font: 500 19px/1.5 Inter;
  color: #232B3B;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}
.hero-cta {
  margin-top: 14px;
  font: 700 18px/1.25 Inter;
  color: #0A1020;
  letter-spacing: -0.01em;
}

/* Services */
.services {
  position: relative;
  z-index: 2;
  max-width: 1000px;
  margin: 32px auto 0;
  padding: 0 24px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.service-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 0;
  min-height: 260px;
  padding: 26px 22px;
  border-radius: 20px;
  border: none;
  overflow: hidden;
  box-shadow: 0 20px 40px -20px rgba(12,26,60,0.25);
  cursor: pointer;
  text-align: left;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.service-card:hover { transform: translateY(-3px); box-shadow: 0 24px 48px -20px rgba(12,26,60,0.32); }
.service-card.active { outline: 3px solid #1B5CEB; outline-offset: -3px; }

.service-card--energia {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.06) 0%, rgba(255,255,255,0.86) 78%),
    url("assets/servicio-1-energia.jpg") center 30% / cover no-repeat;
}
.service-card--hipoteca {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.06) 0%, rgba(255,255,255,0.86) 78%),
    url("assets/servicio-2-hipoteca.jpg") center / cover no-repeat;
}
.service-card--seguros {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.06) 0%, rgba(255,255,255,0.86) 78%),
    url("assets/servicio-3-seguros.jpg") center 25% / cover no-repeat;
}

.service-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 68px;
  height: 68px;
  border-radius: 18px;
  background: rgba(255,255,255,0.75);
  box-shadow: 0 8px 20px -10px rgba(12,26,60,0.2);
}
.service-icon { width: 38px; height: 38px; }
.service-label {
  margin-top: 18px;
  font: 700 22px/1.2 Inter;
  color: #0A1020;
}

/* Forms */
.forms {
  position: relative;
  z-index: 2;
  max-width: 620px;
  margin: 32px auto 60px;
  padding: 0 24px;
}
.lead-form {
  background: #fff;
  border-radius: 28px;
  padding: 36px 32px;
  box-shadow: 0 30px 70px -34px rgba(12,26,60,0.3);
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  background: none;
  padding: 0;
  margin-bottom: 18px;
  font: 600 14px Inter;
  color: #1B5CEB;
  cursor: pointer;
}
.back-link:hover { color: #0E9E68; }

.lead-form h2 {
  font: 700 26px/1.3 Inter;
  color: #0A1020;
  letter-spacing: -0.01em;
  margin: 0;
}
.field-label {
  font: 700 15px Inter;
  color: #0A1020;
  margin-top: 24px;
}
.contact-title { font-size: 17px; margin-top: 28px; }
.radio-row {
  display: flex;
  gap: 20px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.radio-row label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font: 400 15px Inter;
  color: #232B3B;
}
.radio-row input[type="radio"] { width: 18px; height: 18px; accent-color: #1B5CEB; }

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 14px;
}
.grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 14px;
  margin-top: 14px;
}
.grid-3--sm { max-width: 320px; gap: 10px; }
.sub-label { font: 500 13px Inter; color: #5D6779; margin-bottom: 6px; }
.field-block { margin-top: 14px; }

input[type="tel"], input[type="text"], input[type="email"], input[type="number"] {
  width: 100%;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid #C7D2E3;
  font: 500 16px Inter;
  color: #0A1020;
  outline: none;
}
input.input-sm {
  padding: 9px 10px;
  border-radius: 10px;
  font-size: 14px;
  text-align: center;
}
input.input-factura {
  width: auto;
  max-width: 110px;
}
input[type="tel"]:focus, input[type="text"]:focus, input[type="email"]:focus, input[type="number"]:focus,
textarea:focus {
  border-color: #1B5CEB;
}
textarea {
  width: 100%;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid #C7D2E3;
  font: 500 15px Inter;
  color: #0A1020;
  outline: none;
  resize: vertical;
}

.consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  margin-top: 20px;
}
.consent input[type="checkbox"] {
  margin-top: 3px;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  accent-color: #1B5CEB;
}
.consent span { font: 400 14px/1.4 Inter; color: #5D6779; }

.divider { height: 1px; background: #EEF1F6; margin: 24px 0; }

.submit-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  border: none;
  border-radius: 999px;
  background: #0E9E68;
  color: #fff;
  font: 700 17px Inter;
  cursor: pointer;
  transition: background 0.15s ease;
}
.submit-btn:hover { background: #0C8A5A; }

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(10,16,32,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal-overlay[hidden],
.modal-icon[hidden] {
  display: none;
}
.modal {
  background: #fff;
  border-radius: 24px;
  padding: 40px 36px;
  max-width: 420px;
  width: 100%;
  text-align: center;
  box-shadow: 0 40px 80px -30px rgba(12,26,60,0.4);
}
.modal-icon {
  width: 64px; height: 64px; border-radius: 32px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px;
}
.modal-icon-error { background: #FDE8E8; color: #C0392B; font: 700 30px Inter; }
.modal-icon-success { background: #E4F6EE; color: #0E9E68; }
.modal-title { font: 700 22px Inter; color: #0A1020; }
.modal-text { margin-top: 10px; font: 400 15px/1.5 Inter; color: #5D6779; }
.modal-close {
  margin-top: 26px;
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 999px;
  background: #1B5CEB;
  color: #fff;
  font: 600 15px Inter;
  cursor: pointer;
}
.modal-close:hover { background: #164BC2; }

.about-modal {
  max-width: 560px;
  max-height: 85vh;
  overflow-y: auto;
  text-align: left;
  position: relative;
  padding: 44px 36px 36px;
}
.about-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: #F1F3F7;
  color: #5D6779;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.about-close:hover { background: #E6EAF1; color: #0A1020; }
.about-title { font: 800 24px Poppins, Inter; color: #0A1020; margin-bottom: 12px; }
.about-lead { font: 700 17px/1.4 Inter; color: #1E6E38; margin: 0 0 16px; }
.about-modal p { font: 400 15px/1.6 Inter; color: #384153; margin: 0 0 14px; }
.about-subhead { font: 700 17px Inter; color: #0A1020; margin: 22px 0 10px !important; }
.about-list { margin: 0 0 16px; padding-left: 20px; }
.about-list li { font: 400 15px/1.6 Inter; color: #384153; margin-bottom: 6px; }
.about-tagline { font: 700 15px/1.6 Inter; color: #0A1020; }
.about-modal .submit-btn { margin-top: 8px; }

.about-link {
  display: inline-flex;
  margin-top: 16px;
  padding: 10px 20px;
  border-radius: 999px;
  border: 1px solid rgba(10,16,32,0.18);
  background: rgba(255,255,255,0.6);
  color: #0A1020;
  font: 600 14px Inter;
  cursor: pointer;
}
.about-link:hover { background: rgba(255,255,255,0.85); }

/* Responsive */
@media (max-width: 720px) {
  .hero h1 { font-size: 32px; white-space: normal; }
  .hero-sub { font-size: 15px; }
  .services { grid-template-columns: 1fr; }
  .nav {
    padding: 16px 16px 6px;
    min-height: auto;
    gap: 8px;
    align-items: flex-start;
  }
  .nav-left { flex: 1 1 0; min-width: 0; gap: 8px; }
  .nav-right { flex: 1 1 0; min-width: 0; gap: 3px; }
  .badge { padding: 6px 11px; font-size: 11px; white-space: normal; }
  .whatsapp-btn { padding: 5px 10px 5px 5px; gap: 6px; }
  .whatsapp-icon { width: 22px; height: 22px; border-radius: 11px; }
  .whatsapp-label { font-size: 11px; }
  .wordmark { font-size: 15px; }
  .agent-id { font-size: 7.5px; white-space: nowrap; letter-spacing: 0; }
  .store-btn { padding: 6px 12px; font-size: 11px; }
  .hero { margin-top: 12px; padding-top: 4px; }
  .lead-form { padding: 28px 20px; }
  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
}
