/* ==========================================================================
   DIDI Inversiones — estilos base
   Paleta: azul marino / dorado (acento) / crema · Tipografías: Fraunces (títulos) + Hanken Grotesk (texto)
   ========================================================================== */

:root {
  /* Color */
  --navy: #102A57;
  --navy-deep: #0A1F3D;
  --gray: #6E7580;
  --gray-soft: rgba(110, 117, 128, 0.65);
  --gold: #C4953C;
  --gold-light: #D9B36C;
  --gold-dark: #96702A;
  --cream: #FAF8F3;
  --cream-dark: #F1ECE0;
  --white: #ffffff;
  --border: rgba(16, 42, 87, 0.12);
  --border-on-dark: rgba(250, 248, 243, 0.16);

  /* Tipografía */
  --font-heading: "Fraunces", Georgia, serif;
  --font-body: "Hanken Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Layout */
  --container: 1180px;
  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --shadow-card: 0 20px 45px -20px rgba(16, 42, 87, 0.35);
  --shadow-soft: 0 10px 30px -18px rgba(16, 42, 87, 0.25);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body, h1, h2, h3, h4, p, figure, blockquote, ul, ol { margin: 0; }
ul[class], ol[class] { list-style: none; padding: 0; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
input, textarea { font: inherit; }

body {
  font-family: var(--font-body);
  color: var(--navy);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.01em;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 20px;
}

@media (min-width: 640px) {
  .container { padding-inline: 32px; }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-dark);
}

.section {
  padding: 72px 0;
}

@media (min-width: 900px) {
  .section { padding: 112px 0; }
}

.section-head {
  max-width: 640px;
  margin: 0 auto 40px;
  text-align: center;
}

.section-head h2 {
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  margin-top: 10px;
}

.section-head p {
  margin-top: 14px;
  color: var(--gray);
  font-size: 1.05rem;
}

.section--tint {
  background: var(--cream-dark);
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.98rem;
  white-space: nowrap;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease;
}
.btn:active { transform: translateY(1px); }

/* El dorado queda como acento (íconos, hover, detalles) — los botones sólidos usan azul marino */
.btn--primary {
  background: var(--navy);
  color: var(--cream);
  box-shadow: 0 12px 24px -10px rgba(16, 42, 87, 0.4);
}
.btn--primary:hover { background: var(--navy-deep); }

.btn--dark {
  background: var(--navy);
  color: var(--cream);
}
.btn--dark:hover { background: var(--navy-deep); }

.btn--outline {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--navy);
}
.btn--outline:hover { border-color: var(--navy); }

.btn--sm { padding: 10px 18px; font-size: 0.88rem; }

.btn svg { width: 18px; height: 18px; flex-shrink: 0; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(250, 248, 243, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-block: 14px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon { width: 30px; height: auto; }

.logo-text { display: flex; flex-direction: column; line-height: 1; }

.logo-word {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.01em;
}

.logo-word .dot { color: var(--gold); }

.logo-sub {
  font-size: 0.56rem;
  font-weight: 600;
  letter-spacing: 0.32em;
  color: var(--gray-soft);
  text-transform: uppercase;
  margin-top: 2px;
}

.nav-links {
  display: none;
  align-items: center;
  gap: 32px;
  font-size: 0.95rem;
  font-weight: 600;
}

.nav-links a { color: var(--gray); transition: color 0.15s ease; }
.nav-links a:hover { color: var(--navy); }

.nav-cta { display: none; }

.nav-toggle {
  display: inline-flex;
  padding: 8px;
}
.nav-toggle svg { width: 26px; height: 26px; }

@media (min-width: 900px) {
  .nav-links { display: flex; }
  .nav-cta { display: inline-flex; }
  .nav-toggle { display: none; }
}

.mobile-menu {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 10px 0 20px;
  border-top: 1px solid var(--border);
}
.mobile-menu.is-open { display: flex; }
.mobile-menu a {
  padding: 12px 4px;
  font-weight: 600;
  border-bottom: 1px solid var(--border);
}
.mobile-menu .btn { margin-top: 14px; }

@media (min-width: 900px) {
  .mobile-menu { display: none !important; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding-top: 64px;
  padding-bottom: 80px;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 640px;
  background: radial-gradient(60% 60% at 50% 20%, rgba(196, 149, 60, 0.22), transparent 70%);
  pointer-events: none;
}

.hero-centered {
  position: relative;
  max-width: 780px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--white);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gray);
}

.hero-badge .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
  flex-shrink: 0;
}

.hero-centered h1 {
  font-size: clamp(2.2rem, 5.2vw, 3.6rem);
  margin-top: 22px;
  max-width: 18ch;
}

.hero-sub {
  margin-top: 22px;
  font-size: 1.1rem;
  color: var(--gray);
  max-width: 52ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

.hero-actions--center { justify-content: center; }

.hero-social-proof {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 32px;
  font-size: 0.92rem;
  color: var(--gray);
}

.hero-social-proof .stars {
  color: var(--gold);
  letter-spacing: 2px;
  font-size: 1rem;
}

.hero-social-proof strong { color: var(--navy); }

/* ---------- Barra de credibilidad ---------- */
.stats {
  background: var(--cream-dark);
  border-block: 1px solid var(--border);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  padding-block: 48px;
}

@media (min-width: 760px) {
  .stats-grid { grid-template-columns: repeat(4, 1fr); padding-block: 56px; }
}

.stat-item { text-align: center; }

.stat-value {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
  color: var(--navy);
}

.stat-label {
  margin-top: 8px;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  color: var(--gray);
}

/* ---------- Especialización (nicho) ---------- */
.specialty-head {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.specialty-head h2 .accent {
  color: var(--gold-dark);
  font-style: italic;
}

.specialty-head p {
  margin: 16px auto 0;
  font-size: 1.05rem;
  color: var(--gray);
  max-width: 56ch;
}

.specialty-grid {
  display: grid;
  gap: 18px;
  margin-top: 40px;
}

@media (min-width: 640px) {
  .specialty-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1000px) {
  .specialty-grid { grid-template-columns: repeat(4, 1fr); }
}

.specialty-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 26px 22px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.specialty-card:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
}

.specialty-card .specialty-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.specialty-card .specialty-icon svg { width: 22px; height: 22px; color: var(--navy); }

.specialty-card h3 { font-size: 1.02rem; }
.specialty-card p { margin-top: 8px; font-size: 0.88rem; color: var(--gray); }

/* ---------- Simulador de crédito ---------- */
.simulator-card {
  margin-top: 40px;
  display: grid;
  gap: 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

@media (min-width: 860px) {
  .simulator-card { grid-template-columns: 1.1fr 0.9fr; }
}

.simulator-inputs {
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.sim-field label,
.sim-field > label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--navy);
}

.sim-field-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 10px;
}

.sim-field-value {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--gold-dark);
}

.sim-field input[type="range"] {
  width: 100%;
  accent-color: var(--gold);
}

.sim-term-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.sim-term-btn {
  padding: 9px 16px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  font-weight: 700;
  font-size: 0.86rem;
  color: var(--gray);
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.sim-term-btn:hover { border-color: var(--gold); }
.sim-term-btn.is-active {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--cream);
}

.sim-toggle {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
}

.sim-toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }

.sim-toggle-track {
  flex-shrink: 0;
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: var(--cream-dark);
  border: 1px solid var(--border);
  position: relative;
  margin-top: 2px;
  transition: background 0.15s ease;
}
.sim-toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--white);
  box-shadow: 0 1px 3px rgba(16, 42, 87, 0.3);
  transition: transform 0.15s ease;
}
.sim-toggle input:checked + .sim-toggle-track {
  background: var(--gold);
  border-color: var(--gold);
}
.sim-toggle input:checked + .sim-toggle-track .sim-toggle-thumb {
  transform: translateX(18px);
}
.sim-toggle input:focus-visible + .sim-toggle-track {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.sim-toggle-copy { font-size: 0.88rem; color: var(--gray); display: flex; flex-direction: column; gap: 2px; }
.sim-toggle-copy strong { color: var(--navy); font-size: 0.92rem; }

.sim-toggle.is-disabled { cursor: not-allowed; }
.sim-toggle.is-disabled .sim-toggle-track { opacity: 0.5; }
.sim-toggle.is-disabled .sim-toggle-copy strong { color: var(--gray); }
.sim-toggle.is-disabled .sim-toggle-copy small { color: var(--gold-dark); }

.simulator-result {
  background: var(--navy);
  color: var(--cream);
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.sim-result-label {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold-light);
}

.sim-result-value {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 5vw, 2.8rem);
  font-weight: 600;
  margin-top: 8px;
}

.sim-result-detail {
  margin-top: 8px;
  font-size: 0.88rem;
  color: rgba(250, 248, 243, 0.7);
}

.sim-disclaimer {
  margin-top: 20px;
  font-size: 0.72rem;
  line-height: 1.5;
  color: rgba(250, 248, 243, 0.55);
}
.sim-disclaimer a { color: var(--gold-light); text-decoration: underline; }

/* ---------- Aliados (logos) ---------- */
.allies-heading {
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray-soft);
}

.allies-tabs {
  display: flex;
  width: fit-content;
  gap: 4px;
  padding: 6px;
  margin: 0 auto 40px;
  background: var(--cream-dark);
  border-radius: 999px;
}

.allies-tab {
  padding: 10px 22px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--gray);
  transition: background 0.15s ease, color 0.15s ease;
}

.allies-tab.is-active {
  background: var(--navy);
  color: var(--cream);
}

.allies-panel { display: none; }
.allies-panel.is-active { display: block; }

.marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

/* Inmobiliarias y bancos parten corridos hacia la derecha para que el primer
   nombre (el más relevante) no quede pegado al borde difuminado del marquee */
.marquee-track--offset {
  padding-left: 168px;
}

.marquee-track {
  display: flex;
  align-items: center;
  gap: 20px;
  width: max-content;
  animation: marquee 32s linear infinite;
}

.marquee:hover .marquee-track { animation-play-state: paused; }

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.ally-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 80px;
  padding: 0 30px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.ally-logo img {
  max-height: 46px;
  max-width: 170px;
  width: auto;
  object-fit: contain;
}

/* Logos cuadrados/tipo ícono (ej. Imagina) quedan chicos con el mismo max-height
   que los wordmark anchos — se les da un poco más de aire para que se vean
   igual de grandes que el resto */
.ally-logo--square img { max-height: 56px; max-width: 56px; }

/* Un par de logos (Siena, Delabase) son blancos puros — necesitan fondo oscuro para verse */
.ally-logo--dark { background: var(--navy); }

/* ---------- Cómo funciona (timeline horizontal en desktop) ---------- */
.process {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px;
  counter-reset: step;
}

@media (min-width: 640px) {
  .process { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 960px) {
  .process {
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
  }

  .process::before {
    content: "";
    position: absolute;
    top: 23px;
    left: 9%;
    right: 9%;
    height: 2px;
    background: var(--border);
  }
}

.process-step {
  position: relative;
  counter-increment: step;
  text-align: center;
}

.process-step .step-number {
  position: relative;
  width: 46px;
  height: 46px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--white);
  border: 2px solid var(--gold);
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy);
}

.process-step h3 {
  font-size: 1.05rem;
  margin-top: 16px;
}

.process-step p {
  margin-top: 8px;
  font-size: 0.92rem;
  color: var(--gray);
}

/* ---------- Testimonios ---------- */
.testimonials-grid {
  display: grid;
  gap: 22px;
}

@media (min-width: 760px) {
  .testimonials-grid { grid-template-columns: repeat(3, 1fr); }
}

.testimonial-card {
  background: var(--cream-dark);
  border-radius: var(--radius-md);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.testimonial-card .quote-mark {
  font-family: var(--font-heading);
  font-size: 2.6rem;
  color: var(--gold);
  line-height: 1;
}

.testimonial-card p.quote {
  font-size: 0.98rem;
  color: var(--gray);
  flex-grow: 1;
}

.testimonial-person {
  display: flex;
  align-items: center;
  gap: 12px;
}

.testimonial-person .avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(140deg, var(--gold-light), var(--gold-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--navy);
}

.testimonial-person .name { font-weight: 700; font-size: 0.95rem; }
.testimonial-person .role { font-size: 0.8rem; color: var(--gray-soft); }

/* ---------- CTA final ---------- */
.cta-band {
  position: relative;
  overflow: hidden;
  background: var(--cream-dark);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 44px 32px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  align-items: flex-start;
  color: var(--navy);
}

.cta-band::after {
  content: "";
  position: absolute;
  inset: auto -15% -60% auto;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(196, 149, 60, 0.28), transparent);
  pointer-events: none;
}

@media (min-width: 760px) {
  .cta-band {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 48px 52px;
  }
}

.cta-band h2 { font-size: clamp(1.5rem, 3vw, 2rem); max-width: 26ch; position: relative; }
.cta-band .btn { position: relative; flex-shrink: 0; }

/* ---------- Formulario de contacto ---------- */
.contact-card {
  max-width: 520px;
  margin: 40px auto 0;
  background: var(--cream-dark);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-field { display: flex; flex-direction: column; gap: 8px; }

.form-field label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--navy);
}

.form-field input,
.form-field select {
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--navy);
  font-size: 0.95rem;
}

.form-field input::placeholder { color: var(--gray-soft); }

.form-field input:focus,
.form-field select:focus {
  outline: 2px solid var(--gold);
  outline-offset: 1px;
}

.form-field select { appearance: none; cursor: pointer; }

.contact-submit { width: 100%; justify-content: center; margin-top: 4px; }

.form-note {
  font-size: 0.76rem;
  color: var(--gray-soft);
  text-align: center;
}

.contact-card.is-sent {
  align-items: center;
  text-align: center;
  gap: 10px;
  padding: 52px 32px;
}
.contact-card.is-sent .form-field,
.contact-card.is-sent .contact-submit { display: none; }
.contact-card .sent-message { display: none; }
.contact-card.is-sent .sent-message { display: block; }
.contact-card .sent-message h3 { font-family: var(--font-heading); font-size: 1.3rem; }
.contact-card .sent-message p { margin-top: 8px; color: var(--gray); font-size: 0.92rem; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--cream-dark);
  color: var(--navy);
  border-top: 1px solid var(--border);
  padding-top: 64px;
}

.footer-grid {
  display: grid;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--border);
}

@media (min-width: 760px) {
  .footer-grid { grid-template-columns: 1.3fr 1fr 1fr 1fr; }
}

.footer-brand p {
  margin-top: 16px;
  font-size: 0.92rem;
  color: var(--gray);
  max-width: 32ch;
}

.footer-social {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.footer-social a {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.footer-social a svg { width: 17px; height: 17px; }
.footer-social a:hover { background: var(--gold); border-color: var(--gold); color: var(--navy); }

.footer-col h4 {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gray-soft);
  margin-bottom: 16px;
}

.footer-col ul { display: flex; flex-direction: column; gap: 12px; }
.footer-col a, .footer-col li {
  font-size: 0.92rem;
  color: var(--gray);
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.footer-col a:hover { color: var(--gold-dark); }
.footer-col svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 3px; color: var(--gold-dark); }

.footer-bottom {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-block: 24px;
  font-size: 0.8rem;
  color: var(--gray-soft);
}

@media (min-width: 760px) {
  .footer-bottom { flex-direction: row; justify-content: space-between; }
}

.footer-bottom a:hover { color: var(--gold-dark); }

/* ---------- Utilidades ---------- */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
  html {
    scroll-behavior: auto;
  }
  .marquee-track {
    animation: none;
  }
}
