/* ===== Variables ===== */
:root {
  --color-primary: #142C5C;
  --color-primary-light: #1E3E7A;
  --color-accent: #2E8BC9;
  --color-hero-bg: #EAF1FB;
  --color-bg: #FFFFFF;
  --color-bg-alt: #FFFFFF;
  --color-text: #142C5C;
  --color-text-muted: #5C6B7A;
  --color-border: #E2E8F2;
  --font-heading: 'Poppins', sans-serif;
  --font-body: 'Inter', sans-serif;
  --radius: 12px;
  --radius-pill: 999px;
  --shadow: 0 12px 30px rgba(14, 43, 34, 0.12);
  --container-width: 1140px;
}

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

html { scroll-behavior: smooth; }

html, body { overflow-x: hidden; }

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
}

img { max-width: 100%; display: block; }

h1, h2, h3 { font-family: var(--font-heading); line-height: 1.2; color: var(--color-primary); }

a { text-decoration: none; color: inherit; }

ul, ol { list-style: none; }

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Botones ===== */
.btn {
  display: inline-block;
  font-family: var(--font-heading);
  font-weight: 600;
  border-radius: var(--radius-pill);
  border: 1.5px solid transparent;
  cursor: pointer;
  text-align: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn--primary {
  background: var(--color-primary);
  color: #fff;
}

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

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

.btn--small { padding: 10px 20px; font-size: 0.9rem; }
.btn--large { padding: 16px 34px; font-size: 1.05rem; }

/* ===== Header ===== */
.header {
  position: sticky;
  top: 0;
  background: var(--color-hero-bg);
  z-index: 100;
}

.header__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  padding-block: 16px;
}

.logo-link { display: inline-flex; align-items: center; }

.logo-img { height: 40px; width: auto; }

.logo-img--footer { height: 48px; filter: brightness(0) invert(1); }

@media (max-width: 380px) {
  .logo-img { height: 32px; }
}

/* ===== Hero ===== */
.hero {
  padding-block: 64px;
  background: var(--color-hero-bg);
}

.hero__inner {
  display: grid;
  gap: 40px;
  align-items: center;
}

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 12px;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.hero__subtitle {
  font-size: 1.05rem;
  color: var(--color-text-muted);
  margin-bottom: 28px;
  max-width: 48ch;
}

.hero__ctas { display: flex; flex-wrap: wrap; gap: 14px; }

.hero__rating {
  margin-top: 22px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--color-text);
}

.hero__rating-label { font-weight: 700; }
.hero__rating-score { font-weight: 700; }
.hero__rating-stars { color: var(--color-accent); letter-spacing: 1px; }
.hero__rating-source { color: var(--color-text-muted); }

/* Gráfico abstracto de cintas, estilo decorativo del hero */
.hero__visual { display: flex; justify-content: center; }

.ribbon {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  max-width: 380px;
}

.ribbon__bar {
  height: 28px;
  border-radius: var(--radius-pill);
  background: var(--color-primary);
}

.ribbon__bar:nth-child(1) { width: 70%; }
.ribbon__bar:nth-child(2) { width: 100%; align-self: flex-end; }
.ribbon__bar:nth-child(3) { width: 85%; }
.ribbon__bar:nth-child(4) { width: 100%; align-self: flex-end; }
.ribbon__bar:nth-child(5) { width: 60%; }

/* ===== Trust bar: logos de bancos ===== */
.trust { background: var(--color-bg-alt); padding-block: 48px; }

.trust__eyebrow {
  text-align: center;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-bottom: 24px;
}

.trust__logos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
}

.trust__logo {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 18px 12px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--color-text);
  text-align: center;
}

/* ===== Why ===== */
.why { padding-block: 72px; }

.why h2, .process h2, .form-section__intro h2, .faq h2 {
  text-align: center;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  margin-bottom: 12px;
}

.why__grid {
  display: grid;
  gap: 24px;
  margin-top: 40px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.why__card {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 28px;
}

.why__card h3 { font-size: 1.1rem; margin-bottom: 10px; }
.why__card p { color: var(--color-text-muted); font-size: 0.95rem; }

/* ===== Process ===== */
.process { padding-block: 72px; background: var(--color-bg-alt); }

.process__subtitle {
  text-align: center;
  color: var(--color-text-muted);
  margin-bottom: 40px;
}

.process__list {
  display: grid;
  gap: 24px;
  max-width: 760px;
  margin: 0 auto;
}

.process__step {
  display: flex;
  gap: 18px;
  align-items: flex-start;
}

.process__number {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary);
  color: var(--color-accent);
  font-family: var(--font-heading);
  font-weight: 700;
  border-radius: 50%;
}

.process__step h3 { font-size: 1.05rem; margin-bottom: 4px; }
.process__step p { color: var(--color-text-muted); font-size: 0.95rem; }

/* ===== Formulario ===== */
.form-section { padding-block: 72px; }

.form-section__inner { max-width: 640px; margin: 0 auto; }

.form-section__intro { text-align: center; margin-bottom: 32px; }

.form-section__intro p { color: var(--color-text-muted); }

.lead-form {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
}

.lead-form__progress {
  width: 100%;
  height: 6px;
  background: var(--color-border);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 28px;
}

.lead-form__progress-bar {
  height: 100%;
  width: 20%;
  background: var(--color-accent);
  transition: width 0.3s ease;
}

.form-step legend {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--color-primary);
  margin-bottom: 18px;
}

.options { display: grid; gap: 12px; margin-bottom: 24px; }
.options--inline { grid-template-columns: repeat(2, 1fr); }

.option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.option:has(input:checked) {
  border-color: var(--color-accent);
  background: rgba(201, 162, 75, 0.08);
}

.field { margin-bottom: 18px; }

.field label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--color-text);
}

.field input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 1rem;
}

.field input:focus-visible,
.option input:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.form-disclaimer {
  margin-top: 14px;
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.form-step--success { text-align: center; padding-block: 20px; }
.form-step--success h3 { margin-bottom: 10px; }

/* ===== Instagram / social ===== */
.social { padding-block: 64px; background: var(--color-hero-bg); }

.social__inner { display: flex; justify-content: center; }

.social__copy { max-width: 560px; text-align: center; }

.social__copy h2 { font-size: clamp(1.6rem, 4vw, 2rem); margin-bottom: 12px; }

.social__copy p { color: var(--color-text-muted); margin-bottom: 18px; }

.social__points {
  list-style: disc;
  display: inline-block;
  text-align: left;
  margin: 0 auto 24px;
  padding-left: 20px;
  color: var(--color-text-muted);
}

.social__points li { margin-bottom: 6px; }

/* ===== FAQ ===== */
.faq { padding-block: 72px; }

.faq__list { max-width: 700px; margin: 32px auto 0; display: grid; gap: 12px; }

.faq__item {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 16px 20px;
}

.faq__item summary {
  cursor: pointer;
  font-weight: 600;
  font-family: var(--font-heading);
  color: var(--color-primary);
}

.faq__item p { margin-top: 10px; color: var(--color-text-muted); font-size: 0.95rem; }

/* ===== Footer ===== */
.footer { background: var(--color-primary); color: #fff; padding-block: 32px; }

.footer__inner { text-align: center; }

.footer p { color: rgba(255,255,255,0.7); font-size: 0.85rem; margin-top: 10px; }

.footer__ig {
  display: inline-block;
  margin-top: 10px;
  color: #fff;
  font-weight: 600;
  font-size: 0.85rem;
  text-decoration: underline;
}

/* ===== Responsive ===== */
@media (min-width: 768px) {
  .hero__inner { grid-template-columns: 1.1fr 0.9fr; }
}

/* ===== Panel Broker ===== */
.broker-panel {
  display: none;
  background: #f0f4fa;
  border-top: 3px solid var(--color-accent);
  padding: 64px 0;
}

.broker-panel:target {
  display: block;
}

.broker-panel__inner {
  text-align: center;
}

.broker-panel__eyebrow {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 8px;
}

.broker-panel__desc {
  color: var(--color-text-muted);
  margin: 12px 0 40px;
}

.broker-panel__actions {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 480px;
  margin: 0 auto;
}

@media (min-width: 600px) {
  .broker-panel__actions { flex-direction: row; }
}

.broker-btn {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 20px 24px;
  text-align: left;
  cursor: pointer;
  font-family: var(--font-body);
  transition: background 0.2s, transform 0.15s;
  box-shadow: var(--shadow);
}

.broker-btn:hover {
  background: var(--color-primary-light);
  transform: translateY(-2px);
}

.broker-btn__icon {
  font-size: 1.8rem;
  line-height: 1;
  flex-shrink: 0;
}

.broker-btn__content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.broker-btn__content strong {
  font-size: 0.95rem;
  font-family: var(--font-heading);
}

.broker-btn__content small {
  font-size: 0.78rem;
  opacity: 0.75;
}

/* ===== Planillas de referencia (panel broker) ===== */
.broker-panel__links {
  margin-top: 40px;
}

.broker-panel__links-title {
  font-size: 1rem;
  font-family: var(--font-heading);
  color: var(--color-primary);
  margin-bottom: 12px;
}

.broker-panel__links-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}

.broker-link {
  color: var(--color-accent);
  font-size: 0.95rem;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.15s;
}

.broker-link:hover {
  color: var(--color-primary);
}

/* ===== Modal formulario n8n ===== */
.n8n-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.n8n-modal[hidden] { display: none; }

.n8n-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  cursor: pointer;
}

.n8n-modal__box {
  position: relative;
  z-index: 1;
  background: #fff;
  border-radius: var(--radius);
  width: min(640px, 95vw);
  height: min(520px, 90vh);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
}

.n8n-modal__close {
  position: absolute;
  top: 10px;
  right: 12px;
  background: none;
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  color: #666;
  padding: 4px 8px;
  line-height: 1;
  z-index: 2;
  border-radius: 4px;
  transition: background 0.15s;
}

.n8n-modal__close:hover { background: #f0f0f0; }

.n8n-modal__frame {
  width: 100%;
  flex: 1;
  border: none;
}
