/* =========================================================
   1. ROOT VARIABLES & RESET
   ========================================================= */
:root {
  --bg-body:        #090c14;
  --bg-section-alt: #0c1019;
  --bg-card:        #121729;
  --bg-card-soft:   #10141f;
  --border-soft:    rgba(255, 255, 255, 0.08);
  --border-softer:  rgba(255, 255, 255, 0.06);

  --text-primary:   #f5f6fa;
  --text-secondary: #9aa1b8;
  --text-muted:     #6b7280;

  --green:          #22c55e;
  --green-dark:     #16a34a;
  --green-tint:     rgba(34, 197, 94, 0.12);

  --blue:           #6366f1;
  --blue-dark:      #4f46e5;
  --blue-tint:      rgba(99, 102, 241, 0.14);

  --purple:         #a855f7;
  --purple-tint:    rgba(168, 85, 247, 0.14);

  --indigo:         #818cf8;
  --indigo-tint:    rgba(129, 140, 248, 0.14);

  --font-display: 'Plus Jakarta Sans', 'Inter', sans-serif;
  --font-body:    'Inter', sans-serif;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 999px;

  --container-w: 1200px;
}

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

html {
  scroll-behavior: smooth;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  background: var(--bg-body);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

/* Prevent any element (images, flex/grid children, long words) from
   forcing the viewport wider than the screen */
*, *::before, *::after { min-width: 0; }
img, svg, video, canvas { max-width: 100%; height: auto; }

img, svg { display: block; max-width: 100%; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 800; letter-spacing: -0.02em; color: var(--text-primary); }
button { font-family: inherit; cursor: pointer; }

.container {
  width: 100%;
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 32px;
}

/* =========================================================
   2. SHARED COMPONENTS (buttons, badges)
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  white-space: nowrap;
  transition: transform 0.15s ease, opacity 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }

.btn-sm { padding: 9px 20px; font-size: 0.85rem; }
.btn-lg { padding: 14px 28px; font-size: 0.95rem; }

.btn-green {
  background: var(--green);
  color: #06210f;
}
.btn-green:hover { background: var(--green-dark); }

.btn-blue {
  background: var(--blue);
  color: #ffffff;
}
.btn-blue:hover { background: var(--blue-dark); }

.btn-outline {
  background: transparent;
  border-color: var(--border-soft);
  color: var(--text-primary);
}
.btn-outline:hover { background: rgba(255,255,255,0.05); }

.btn-outline-light {
  background: transparent;
  border-color: rgba(255,255,255,0.25);
  color: var(--text-primary);
}
.btn-outline-light:hover { background: rgba(255,255,255,0.08); }

.badge {
  display: inline-flex;
  align-items: center;
  padding: 7px 16px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.badge-outline {
  border: 1px solid var(--border-soft);
  color: var(--text-secondary);
  background: rgba(255,255,255,0.02);
}

.badge-fill {
  background: var(--blue-tint);
  color: #a5b4fc;
}

.badge-green { background: var(--green-tint); color: #86efac; }
.badge-purple { background: var(--purple-tint); color: #d8b4fe; }
.badge-blue { background: var(--blue-tint); color: #a5b4fc; }
.badge-indigo { background: var(--indigo-tint); color: #c7d2fe; }

.gradient-text {
  background: linear-gradient(90deg, #6366f1 0%, #a855f7 60%, #ec4899 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* =========================================================
   3. HEADER
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(9, 12, 20, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-softer);
}

.site-header .container {
  max-width: 1360px;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  gap: 16px;
  flex-wrap: nowrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.brand-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, #6366f1, #a855f7);
  display: flex;
  align-items: center;
  justify-content: center;
}
.brand-icon svg { width: 18px; height: 18px; }

.brand-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--text-primary);
}
.brand-name span { color: var(--text-secondary); font-weight: 600; }

.main-nav {
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.6vw, 22px);
  flex-wrap: nowrap;
  flex-shrink: 1;
  min-width: 0;
}
.main-nav a {
  font-size: 0.84rem;
  color: var(--text-secondary);
  font-weight: 500;
  white-space: nowrap;
  transition: color 0.15s ease;
}
.main-nav a:hover { color: var(--text-primary); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

/* =========================================================
   4. HERO
   ========================================================= */
.hero {
  padding: 88px 0 100px;
  background:
    radial-gradient(ellipse 900px 500px at 15% 0%, rgba(99,102,241,0.10), transparent 60%),
    radial-gradient(ellipse 700px 500px at 100% 20%, rgba(168,85,247,0.08), transparent 60%);
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 60px;
  align-items: center;
}

.hero-title {
  font-size: 3.2rem;
  line-height: 1.08;
  margin: 22px 0 22px;
}

.hero-text {
  color: var(--text-secondary);
  font-size: 1.02rem;
  max-width: 480px;
  margin-bottom: 34px;
}

.hero-buttons {
  display: flex;
  gap: 14px;
  margin-bottom: 46px;
  flex-wrap: wrap;
}

.trust-row { display: flex; flex-direction: column; gap: 14px; }
.trust-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}
.trust-logos {
  display: flex;
  gap: 26px;
  flex-wrap: wrap;
}
.trust-logos span {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #4b5266;
}

/* --- Hero visual --- */
.hero-visual { position: relative; }

.dashboard-card {
  background: linear-gradient(160deg, #141a2e 0%, #0f2a24 100%);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 30px;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,0.55);
}

.dashboard-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 26px;
}

.dashboard-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.dashboard-amount {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-primary);
}

.dashboard-badge {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.dashboard-badge svg { width: 16px; height: 16px; }

.bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  height: 110px;
  background: rgba(255,255,255,0.03);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 22px;
}
.bar-chart span {
  flex: 1;
  border-radius: 6px 6px 0 0;
  background: linear-gradient(180deg, #818cf8, #6366f1);
}

.progress-row {
  display: flex;
  gap: 14px;
}
.progress-track {
  flex: 1;
  height: 7px;
  border-radius: var(--radius-full);
  background: rgba(255,255,255,0.08);
  overflow: hidden;
}
.progress-fill { height: 100%; border-radius: var(--radius-full); }
.fill-green { width: 42%; background: var(--green); }
.fill-blue  { width: 68%; background: linear-gradient(90deg, #6366f1, #a855f7); }

.testimonial-card {
  position: absolute;
  bottom: -30px;
  left: -24px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 12px 18px 12px 12px;
  box-shadow: 0 20px 40px -14px rgba(0,0,0,0.6);
}
.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #a855f7);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.avatar svg { width: 20px; height: 20px; }
.testimonial-text { display: flex; flex-direction: column; }
.testimonial-text strong { font-size: 0.88rem; font-weight: 700; color: var(--text-primary); }
.testimonial-text em { font-style: normal; font-size: 0.76rem; color: var(--text-secondary); }

/* =========================================================
   5. CONCEPTOS FINANCIEROS
   ========================================================= */
.concepts {
  padding: 90px 0;
  background: var(--bg-section-alt);
  border-top: 1px solid var(--border-softer);
  border-bottom: 1px solid var(--border-softer);
}

.section-heading {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 56px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}
.section-heading h2 { font-size: 2.1rem; }
.section-heading p { color: var(--text-secondary); font-size: 1rem; }

.concepts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.concept-card {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 30px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.concept-card:hover {
  transform: translateY(-4px);
  border-color: rgba(99,102,241,0.35);
}

.concept-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--blue-tint);
  color: #a5b4fc;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}
.concept-icon svg { width: 22px; height: 22px; }

.concept-card h3 {
  font-size: 1.08rem;
  margin-bottom: 10px;
}
.concept-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* =========================================================
   6. PRÉSTAMOS
   ========================================================= */
.loans { padding: 100px 0; }

.loans-inner {
  display: grid;
  grid-template-columns: 0.85fr 1.6fr;
  gap: 56px;
}

.loans-intro h2 {
  font-size: 2rem;
  margin: 18px 0 16px;
}
.loans-intro > p {
  color: var(--text-secondary);
  font-size: 0.96rem;
  margin-bottom: 34px;
}

.feature-list { display: flex; flex-direction: column; gap: 24px; }
.feature-list li { display: flex; gap: 14px; align-items: flex-start; }
.feature-list .dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--green-tint);
  position: relative;
  flex-shrink: 0;
  margin-top: 3px;
}
.feature-list .dot::after {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  background: var(--green);
}
.feature-list strong {
  display: block;
  font-size: 0.94rem;
  margin-bottom: 3px;
  color: var(--text-primary);
}
.feature-list p { color: var(--text-secondary); font-size: 0.86rem; }

.loans-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.loan-card {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 28px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.loan-card::before {
  content: "";
  position: absolute;
  top: 0; left: 24px; right: 24px;
  height: 3px;
  border-radius: 0 0 4px 4px;
}
.loan-card.accent-purple::before { background: linear-gradient(90deg, #a855f7, #6366f1); }
.loan-card.accent-blue::before   { background: linear-gradient(90deg, #6366f1, #38bdf8); }
.loan-card.accent-green::before  { background: linear-gradient(90deg, #22c55e, #16a34a); }
.loan-card.accent-indigo::before { background: linear-gradient(90deg, #818cf8, #6366f1); }

.loan-card .badge { align-self: flex-start; }
.loan-card h3 { font-size: 1.2rem; }
.loan-card > p { color: var(--text-secondary); font-size: 0.88rem; }

.check-list { display: flex; flex-direction: column; gap: 9px; margin: 4px 0 6px; }
.check-list li {
  font-size: 0.86rem;
  color: var(--text-secondary);
  padding-left: 24px;
  position: relative;
}
.check-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 3px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--green-tint);
}
.check-list li::after {
  content: "✓";
  position: absolute;
  left: 3px; top: 1.5px;
  font-size: 0.62rem;
  color: var(--green);
  font-weight: 700;
}

.link-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 12px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-full);
  padding: 11px 20px;
  justify-content: center;
  transition: background 0.15s ease;
}
.link-btn svg { width: 15px; height: 15px; }
.link-btn:hover { background: rgba(255,255,255,0.05); }

/* =========================================================
   7. CTA + STATS
   ========================================================= */
.cta-section { padding: 0 0 100px; }

.cta-card {
  background: linear-gradient(135deg, #141a2e 0%, #171331 100%);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 64px 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
  margin-bottom: 72px;
}
.cta-text { max-width: 520px; }
.cta-text h2 { font-size: 2rem; margin-bottom: 16px; }
.cta-text p { color: var(--text-secondary); font-size: 0.98rem; }

.cta-buttons { display: flex; gap: 14px; flex-shrink: 0; flex-wrap: wrap; }

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  text-align: center;
}
.stat { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.stat-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--green-tint);
  color: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
}
.stat-icon svg { width: 22px; height: 22px; }
.stat-number {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
}
.stat-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

/* =========================================================
   8. FOOTER
   ========================================================= */
.site-footer {
  background: var(--bg-section-alt);
  border-top: 1px solid var(--border-softer);
  padding-top: 70px;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 40px;
  padding-bottom: 56px;
}

.footer-brand p {
  color: var(--text-secondary);
  font-size: 0.88rem;
  margin-top: 16px;
  max-width: 280px;
}

.footer-col h4 {
  font-size: 0.92rem;
  margin-bottom: 20px;
  color: var(--text-primary);
}
.footer-col a {
  display: block;
  color: var(--text-secondary);
  font-size: 0.86rem;
  margin-bottom: 14px;
  transition: color 0.15s ease;
}
.footer-col a:hover { color: var(--text-primary); }

.footer-contact {
  display: flex !important;
  align-items: center;
  gap: 9px;
}
.footer-contact svg { width: 16px; height: 16px; flex-shrink: 0; }

.social-row { display: flex; gap: 12px; margin-top: 18px; }
.social-row a {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: color 0.15s ease, border-color 0.15s ease;
}
.social-row a svg { width: 15px; height: 15px; }
.social-row a:hover { color: var(--text-primary); border-color: rgba(255,255,255,0.3); }

.footer-bottom {
  border-top: 1px solid var(--border-softer);
  padding: 26px 0;
}
.footer-bottom p {
  text-align: center;
  font-size: 0.76rem;
  color: var(--text-muted);
  letter-spacing: 0.01em;
}

/* =========================================================
   9. RESPONSIVE — TABLET (<= 1024px)
   ========================================================= */
@media (max-width: 1024px) {
  .container { padding: 0 24px; }

  .main-nav { display: none; }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 70px;
  }
  .hero-title { font-size: 2.6rem; }
  .hero-visual { max-width: 520px; }
  .testimonial-card { left: 10px; }

  .concepts-grid { grid-template-columns: repeat(2, 1fr); }

  .loans-inner { grid-template-columns: 1fr; gap: 48px; }
  .loans-grid { grid-template-columns: 1fr 1fr; }

  .footer-top { grid-template-columns: 1fr 1fr; row-gap: 40px; }

  .cta-card { padding: 48px 36px; }
}

/* =========================================================
   10. RESPONSIVE — MOBILE (<= 640px)
   ========================================================= */
@media (max-width: 640px) {
  .container { padding: 0 20px; }

  .header-inner { height: 66px; gap: 10px; }
  .header-actions .btn-outline.btn-sm { display: none; }
  .header-actions { gap: 8px; min-width: 0; }
  .brand { min-width: 0; }
  .brand-name {
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .header-actions .btn-green.btn-sm {
    padding: 8px 16px;
    font-size: 0.8rem;
    white-space: nowrap;
  }

  .hero { padding: 48px 0 90px; }
  .hero-title { font-size: 2.1rem; }
  .hero-buttons { flex-direction: column; align-items: stretch; }
  .hero-buttons .btn { width: 100%; }
  .trust-logos { gap: 16px; }

  .dashboard-card { padding: 22px; }
  .testimonial-card {
    position: static;
    margin-top: 20px;
    width: fit-content;
  }

  .section-heading h2 { font-size: 1.65rem; }
  .concepts { padding: 64px 0; }
  .concepts-grid { grid-template-columns: 1fr; }

  .loans { padding: 64px 0; }
  .loans-intro h2 { font-size: 1.65rem; }
  .loans-grid { grid-template-columns: 1fr; }

  .cta-card { flex-direction: column; align-items: flex-start; padding: 36px 26px; }
  .cta-text h2 { font-size: 1.6rem; }
  .cta-buttons { width: 100%; }
  .cta-buttons .btn { flex: 1; }

  .stats-row { grid-template-columns: 1fr; gap: 32px; }

  .footer-top { grid-template-columns: 1fr; gap: 36px; padding-bottom: 40px; }
}

/* =========================================================
   11. RESPONSIVE — SMALL PHONES (<= 380px)
   ========================================================= */
@media (max-width: 380px) {
  .container { padding: 0 16px; }
  .header-inner { gap: 8px; }
  .brand-name { font-size: 0.92rem; max-width: 110px; }
  .brand-name span { display: none; }
  .header-actions .btn-green.btn-sm { padding: 8px 13px; font-size: 0.74rem; }
}
