/* Kipu — sitio comercial
   Un solo archivo de estilos. Tokens en :root, modo oscuro con prefers-color-scheme.
   Orden: fuentes · tokens · base · utilidades · componentes · secciones · media queries. */

/* ---------- Fuentes (Bricolage Grotesque, SIL OFL — ver assets/OFL-bricolage.txt) ---------- */
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("bricolage-500.woff") format("woff");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("bricolage-700.woff") format("woff");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  color-scheme: light dark;

  --bg: #f7f5f2;
  --bg-alt: #efece7;
  --surface: #ffffff;
  --ink: #1c1a22;
  --ink-2: #5f5a66;
  --line: #e6e2dd;
  --line-strong: #d4cfc8;
  --accent: #4a3fc4;
  --accent-hover: #3d33a8;
  --accent-ink: #4a3fc4;          /* acento usado como texto */
  --on-accent: #ffffff;
  --accent-soft: #ecebfa;         /* fondos suaves con tinte índigo */
  --amber: #f2a93b;
  --amber-soft: #fdf1dc;
  --chat-bg: #f1eee9;
  --bubble-me: #e3e0fb;
  --bubble-them: #ffffff;
  --chart-muted: #8a8491;
  --shadow: 0 1px 2px rgb(28 26 34 / 6%), 0 8px 24px rgb(28 26 34 / 6%);

  --font-display: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Escala tipográfica fluida (360px → 1280px) */
  --fs-sm: 0.875rem;
  --fs-base: 1rem;
  --fs-lead: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);
  --fs-h3: clamp(1.125rem, 1.05rem + 0.35vw, 1.3125rem);
  --fs-h2: clamp(1.75rem, 1.35rem + 1.8vw, 2.75rem);
  --fs-h1: clamp(2.25rem, 1.6rem + 3vw, 4rem);

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: clamp(4rem, 3rem + 4vw, 6.5rem);

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --wrap: 1160px;
  --gutter: clamp(1rem, 0.6rem + 2vw, 2rem);
  --header-h: 64px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16141c;
    --bg-alt: #1a1822;
    --surface: #1e1b26;
    --ink: #f5f3f7;
    --ink-2: #b7b1c0;
    --line: #2e2a38;
    --line-strong: #3d3849;
    --accent: #8b82f0;
    --accent-hover: #a39cf4;
    --accent-ink: #a39cf4;
    --on-accent: #16141c;
    --accent-soft: #26223a;
    --amber-soft: #2e2618;
    --chat-bg: #121017;
    --bubble-me: #322c5c;
    --bubble-them: #24212d;
    --chart-muted: #8f899a;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 8px 24px rgb(0 0 0 / 25%);
  }
}

/* ---------- Base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); line-height: 1.25; letter-spacing: -0.01em; }

p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; }
img, svg { display: block; max-width: 100%; }

a { color: var(--accent-ink); text-underline-offset: 0.18em; }
a:hover { color: var(--accent-hover); }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

strong { font-weight: 650; }

/* ---------- Utilidades ---------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute;
  left: var(--space-4);
  top: -100px;
  z-index: 100;
  background: var(--surface);
  color: var(--ink);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  font-weight: 600;
}
.skip-link:focus { top: var(--space-3); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--fs-sm);
  letter-spacing: 0.02em;
  color: var(--accent-ink);
  margin-bottom: var(--space-3);
}
.eyebrow::before {
  /* nudo ámbar: pequeño guiño al quipu */
  content: "";
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--amber);
  flex: none;
}

.lead { font-size: var(--fs-lead); color: var(--ink-2); line-height: 1.55; }
.muted { color: var(--ink-2); }
.small { font-size: var(--fs-sm); }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 48px;
  padding: 0.75rem 1.25rem;
  border-radius: 999px;
  border: 1.5px solid transparent;
  font: 600 1rem/1.2 var(--font-body);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}
.btn svg { width: 20px; height: 20px; flex: none; }

.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); color: var(--on-accent); }

.btn-secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn-secondary:hover { border-color: var(--ink); color: var(--ink); }

.btn-sm { min-height: 44px; padding: 0.5rem 1rem; font-size: 0.9375rem; }

.cta-row { display: flex; flex-wrap: wrap; gap: var(--space-3); }

/* ---------- Logo ---------- */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  border-radius: 10px;
}
.logo:hover { color: var(--ink); }
.logo-mark { width: 34px; height: 34px; flex: none; }
/* Altura de la K ≈ 60% de la marca. La palabra tiene descendente (p):
   se baja 1.5px para que la K quede centrada con la marca. */
.logo-word { height: 26px; width: auto; position: relative; top: 1.5px; fill: currentColor; }

/* Íconos de línea (sprite en index.html) */
svg.i {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-height: var(--header-h);
}
.main-nav ul {
  display: flex;
  gap: var(--space-1);
  list-style: none;
}
.main-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 var(--space-3);
  border-radius: 999px;
  color: var(--ink-2);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
}
.main-nav a:hover { color: var(--ink); background: var(--bg-alt); }

.header-actions { display: flex; align-items: center; gap: var(--space-2); }
.header-login {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9375rem;
  padding: 0 var(--space-3);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
}
.header-login:hover { color: var(--accent-ink); }

/* Menú móvil (sin JS: <details>) */
.menu { position: relative; }
.menu > summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  cursor: pointer;
  color: var(--ink);
}
.menu > summary::-webkit-details-marker { display: none; }
.menu > summary svg { width: 22px; height: 22px; }
.menu[open] > summary { background: var(--bg-alt); }
.menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: min(280px, calc(100vw - 2 * var(--gutter)));
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: var(--space-2);
}
.menu-panel ul { list-style: none; }
.menu-panel a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 var(--space-3);
  border-radius: var(--radius-sm);
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
}
.menu-panel a:hover { background: var(--bg-alt); }
.menu-panel hr { border: 0; border-top: 1px solid var(--line); margin: var(--space-2) 0; }

.main-nav, .header-login, .header-cta { display: none; }

/* ---------- Secciones genéricas ---------- */
.section { padding-block: var(--space-8); }
.section-alt { background: var(--bg-alt); border-block: 1px solid var(--line); }
.section-head { max-width: 46rem; margin-bottom: var(--space-7); }
.section-head .lead { margin-top: var(--space-4); }

/* ---------- Hero ---------- */
.hero { padding-block: clamp(2.5rem, 1.5rem + 5vw, 5.5rem) var(--space-8); }
.hero-grid {
  display: grid;
  gap: var(--space-7);
  align-items: center;
}
.hero h1 { max-width: 15ch; }
.hero h1 .accent { color: var(--accent-ink); }
.hero .lead { margin-top: var(--space-5); max-width: 36rem; }
.hero .cta-row { margin-top: var(--space-6); }
.hero-note {
  margin-top: var(--space-4);
  font-size: var(--fs-sm);
  color: var(--ink-2);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-4);
  list-style: none;
}
.hero-note li { display: inline-flex; align-items: center; gap: 6px; }
.hero-note svg { width: 16px; height: 16px; color: var(--accent-ink); flex: none; }

/* Simulación de chat */
.phone {
  width: 100%;
  max-width: 380px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 10px;
  box-shadow: var(--shadow);
}
.chat {
  border-radius: 20px;
  overflow: hidden;
  background: var(--chat-bg);
}
.chat-head {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 12px 14px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.chat-head .logo-mark { width: 36px; height: 36px; }
.chat-name { font-weight: 650; line-height: 1.2; }
.chat-status { font-size: 0.8125rem; color: var(--ink-2); line-height: 1.2; }
.chat-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px 12px 22px;
  min-height: 360px;
  /* cordones muy tenues de fondo */
  background-image: repeating-linear-gradient(90deg, transparent 0 38px, color-mix(in srgb, var(--line) 55%, transparent) 38px 39px);
}
.chat-day {
  align-self: center;
  font-size: 0.75rem;
  color: var(--ink-2);
  background: var(--surface);
  padding: 2px 10px;
  border-radius: 999px;
  margin-bottom: 4px;
}
.bubble {
  max-width: 82%;
  padding: 8px 12px 6px;
  border-radius: 14px;
  font-size: 0.9375rem;
  line-height: 1.4;
  box-shadow: 0 1px 1px rgb(0 0 0 / 6%);
}
.bubble .time {
  display: block;
  text-align: right;
  font-size: 0.6875rem;
  color: var(--ink-2);
  margin-top: 2px;
}
.bubble.me {
  align-self: flex-end;
  background: var(--bubble-me);
  border-bottom-right-radius: 4px;
}
.bubble.them {
  align-self: flex-start;
  background: var(--bubble-them);
  border-bottom-left-radius: 4px;
}
.bubble .meter {
  margin-top: 8px;
  height: 6px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}
.bubble .meter span {
  display: block;
  height: 100%;
  width: 68.7%;           /* 412 de 600 */
  background: var(--accent);
  border-radius: 999px;
}
.voice {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 190px;
}
.voice .play {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  display: grid;
  place-items: center;
  flex: none;
}
.voice .play svg { width: 12px; height: 12px; }
.voice .wave { flex: 1; height: 22px; color: var(--ink-2); }
.voice .dur { font-size: 0.75rem; color: var(--ink-2); }

/* ---------- Cómo funciona ---------- */
.steps {
  list-style: none;
  display: grid;
  gap: var(--space-5);
  counter-reset: paso;
}
.step {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--space-6) var(--space-5) var(--space-5);
}
.step-num {
  display: inline-grid;
  place-items: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.125rem;
  margin-bottom: var(--space-4);
}
.step p { margin-top: var(--space-2); color: var(--ink-2); }
.step .examples {
  margin-top: var(--space-4);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  list-style: none;
}
.chip {
  display: inline-flex;
  align-items: center;
  font-size: 0.8125rem;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  color: var(--ink);
  white-space: nowrap;
}

/* ---------- Funcionalidades ---------- */
.feature-groups { display: grid; gap: var(--space-7); }
.feature-group > h3 {
  font-size: var(--fs-sm);
  font-family: var(--font-display);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-2);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--line);
  margin-bottom: var(--space-5);
}
.feature-grid {
  list-style: none;
  display: grid;
  gap: var(--space-4);
}
.feature {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-5);
}
.feature h4 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.125rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: var(--space-4) 0 var(--space-2);
}
.feature p { color: var(--ink-2); font-size: 0.9375rem; }
.feature p + p { margin-top: var(--space-2); }
.icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  display: grid;
  place-items: center;
}
.icon svg {
  width: 22px; height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.banks {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  margin-top: var(--space-3);
}

/* ---------- Deudas ---------- */
.debt-grid { display: grid; gap: var(--space-7); align-items: start; }
.checklist { list-style: none; display: grid; gap: var(--space-4); margin-top: var(--space-6); }
.checklist li {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: var(--space-3);
}
.checklist li::before {
  content: "";
  width: 12px; height: 12px;
  margin-top: 0.45em;
  margin-left: 5px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 4px var(--amber-soft);
}
.checklist strong { color: var(--ink); }
.checklist span { color: var(--ink-2); }

.example-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow);
}
.example-tag {
  display: inline-flex;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-2);
  border: 1px dashed var(--line-strong);
  border-radius: 999px;
  padding: 2px 10px;
}
.example-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}
.example-head h3 { font-size: 1.0625rem; }
.loan-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-3);
  margin: 0 0 var(--space-5);
}
.loan-facts div {
  background: var(--bg-alt);
  border-radius: var(--radius-sm);
  padding: var(--space-3);
  min-width: 0;
}
.loan-facts dt { font-size: 0.75rem; color: var(--ink-2); }
.loan-facts dd {
  margin: 2px 0 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(0.95rem, 0.85rem + 0.5vw, 1.125rem);
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.result {
  display: grid;
  gap: var(--space-1);
  padding: var(--space-4);
  border-radius: var(--radius);
  background: var(--accent-soft);
  margin-bottom: var(--space-5);
}
.result-big {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.375rem, 1.1rem + 1.2vw, 1.75rem);
  line-height: 1.15;
  letter-spacing: -0.015em;
}
.result-big em { font-style: normal; color: var(--accent-ink); }
.result p { color: var(--ink-2); font-size: 0.9375rem; }

.chart figcaption {
  font-size: var(--fs-sm);
  color: var(--ink-2);
  margin-top: var(--space-2);
}
.chart-title {
  font-weight: 650;
  font-size: 0.9375rem;
  margin-bottom: var(--space-2);
}
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-4);
  list-style: none;
  font-size: 0.8125rem;
  color: var(--ink-2);
  margin-bottom: var(--space-2);
}
.legend li { display: inline-flex; align-items: center; gap: 6px; }
.legend .swatch { width: 18px; height: 0; border-top: 2.5px solid var(--accent); }
.legend .swatch.dashed { border-top: 2px dashed var(--chart-muted); }
.chart { margin: 0; }
.chart svg { width: 100%; height: auto; overflow: visible; }
.chart .chart-lg { display: none; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .axis-label { fill: var(--ink-2); font-size: 13px; font-family: var(--font-body); }
.chart .line-plan { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.chart .line-base { fill: none; stroke: var(--chart-muted); stroke-width: 2; stroke-dasharray: 6 5; stroke-linejoin: round; }
.chart .dot-plan { fill: var(--accent); stroke: var(--surface); stroke-width: 2; }
.chart .dot-base { fill: var(--chart-muted); stroke: var(--surface); stroke-width: 2; }
.chart .label-strong { fill: var(--ink); font-size: 14px; font-weight: 650; font-family: var(--font-body); }
.chart .label { fill: var(--ink-2); font-size: 14px; font-family: var(--font-body); }

.disclaimer {
  margin-top: var(--space-5);
  font-size: var(--fs-sm);
  color: var(--ink-2);
  border-left: 3px solid var(--line-strong);
  padding-left: var(--space-3);
}

/* ---------- Familia ---------- */
.split { display: grid; gap: var(--space-7); align-items: center; }
.family-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow);
}
.family-card h3 { font-size: 1.0625rem; margin-bottom: var(--space-4); }
.members { list-style: none; display: grid; gap: var(--space-3); }
.member {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  align-items: center;
  gap: var(--space-3);
}
.avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  background: var(--accent-soft);
  color: var(--accent-ink);
}
.avatar.amber { background: var(--amber-soft); color: var(--ink); }
.member-name { font-weight: 600; line-height: 1.25; }
.member-role { font-size: 0.8125rem; color: var(--ink-2); }
.badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  color: var(--ink-2);
  white-space: nowrap;
}
.split-bar { margin-top: var(--space-5); }
.split-bar .bar {
  display: flex;
  gap: 2px;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--line);
}
.split-bar .bar span:first-child { background: var(--accent); width: 62%; }
.split-bar .bar span:last-child { background: var(--chart-muted); flex: 1; }
.split-bar dl {
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  margin: var(--space-2) 0 0;
  font-size: 0.8125rem;
}
.split-bar dt { color: var(--ink-2); }
.split-bar dd { margin: 0; font-weight: 650; font-variant-numeric: tabular-nums; }
.split-bar .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; background: var(--accent); }
.split-bar .dot.muted-dot { background: var(--chart-muted); }

.bullets { list-style: none; display: grid; gap: var(--space-3); margin-top: var(--space-5); }
.bullets li { display: grid; grid-template-columns: 24px 1fr; gap: var(--space-2); color: var(--ink-2); }
.bullets svg { width: 20px; height: 20px; margin-top: 2px; color: var(--accent-ink); }
.bullets strong { color: var(--ink); }

/* ---------- Tus datos ---------- */
.trust-grid { list-style: none; display: grid; gap: var(--space-4); }
.trust-item {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: var(--space-4);
  padding: var(--space-5);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.trust-item h3 { font-size: 1.0625rem; }
.trust-item p { margin-top: var(--space-1); color: var(--ink-2); font-size: 0.9375rem; }

/* ---------- Precios ---------- */
.billing {
  display: inline-flex;
  padding: 4px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  margin: 0 0 var(--space-6);
}
.billing legend { padding: 0; }
.billing input { position: absolute; opacity: 0; pointer-events: none; }
.billing label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 var(--space-4);
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9375rem;
  cursor: pointer;
  color: var(--ink-2);
}
.billing input:checked + label { background: var(--accent); color: var(--on-accent); }
.billing input:focus-visible + label { outline: 3px solid var(--accent); outline-offset: 2px; }
.billing .save { font-size: 0.75rem; font-weight: 600; opacity: 0.9; }

.plans { display: grid; gap: var(--space-5); align-items: stretch; }
.plan {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--space-6) var(--space-5);
}
.plan-premium { border: 2px solid var(--accent); }
.plan-top { display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); }
.plan h3 { font-size: 1.375rem; }
.plan-flag {
  font-size: 0.75rem;
  font-weight: 650;
  color: var(--ink);
  background: var(--amber-soft);
  border: 1px solid color-mix(in srgb, var(--amber) 55%, transparent);
  padding: 2px 10px;
  border-radius: 999px;
}
.price { margin-top: var(--space-4); display: flex; align-items: baseline; gap: var(--space-2); flex-wrap: wrap; }
.price .amount {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.25rem, 1.8rem + 2vw, 3rem);
  letter-spacing: -0.03em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.price .per { color: var(--ink-2); }
.price-note { margin-top: var(--space-2); color: var(--ink-2); font-size: 0.9375rem; min-height: 1.6em; }
.price-annual { display: none; }
.pricing:has(#cobro-anual:checked) .price-annual { display: block; }
.pricing:has(#cobro-anual:checked) .price.price-annual { display: flex; }
.pricing:has(#cobro-anual:checked) .price-monthly { display: none; }
.plan ul { list-style: none; display: grid; gap: var(--space-3); margin: var(--space-5) 0 var(--space-6); }
.plan li { display: grid; grid-template-columns: 22px 1fr; gap: var(--space-2); font-size: 0.9375rem; }
.plan li svg { width: 18px; height: 18px; margin-top: 3px; color: var(--accent-ink); }
.plan li.limit svg { color: var(--ink-2); }
.plan .btn { margin-top: auto; width: 100%; }
.plan-sub { font-size: var(--fs-sm); color: var(--ink-2); margin-top: var(--space-3); text-align: center; }
.trial {
  margin-top: var(--space-6);
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: var(--space-4);
  align-items: center;
  padding: var(--space-5);
  border-radius: var(--radius);
  background: var(--accent-soft);
}
.trial p { color: var(--ink); }

/* ---------- FAQ ---------- */
.faq { max-width: 50rem; }
.faq details {
  border-bottom: 1px solid var(--line);
}
.faq details:first-of-type { border-top: 1px solid var(--line); }
.faq summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-5) 0;
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-h3);
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  flex: none;
  width: 12px; height: 12px;
  border-right: 2px solid var(--ink-2);
  border-bottom: 2px solid var(--ink-2);
  transform: translateY(-3px) rotate(45deg);
  transition: transform 0.2s ease;
}
.faq details[open] summary::after { transform: translateY(2px) rotate(-135deg); }
.faq summary:hover { color: var(--accent-ink); }
.faq .answer { padding: 0 0 var(--space-5); color: var(--ink-2); max-width: 44rem; }
.faq .answer p + p { margin-top: var(--space-3); }

/* ---------- CTA final ---------- */
.final-cta {
  background: var(--accent);
  color: var(--on-accent);
  border-radius: var(--radius-lg);
  padding: clamp(2rem, 1.2rem + 4vw, 4rem) clamp(1.25rem, 0.8rem + 3vw, 4rem);
  display: grid;
  gap: var(--space-6);
  align-items: center;
  position: relative;
  overflow: hidden;
}
.final-cta h2 { max-width: 18ch; }
.final-cta p { margin-top: var(--space-3); opacity: 0.92; max-width: 34rem; }
.final-cta .btn-light { background: var(--on-accent); color: var(--accent); }
.final-cta .btn-light:hover { background: color-mix(in srgb, var(--on-accent) 88%, var(--accent)); color: var(--accent-hover); }
.final-cta .btn-outline-light { color: var(--on-accent); border-color: color-mix(in srgb, var(--on-accent) 55%, transparent); }
.final-cta .btn-outline-light:hover { border-color: var(--on-accent); color: var(--on-accent); }
.final-cta :focus-visible { outline-color: var(--on-accent); }
.final-cta .cords {
  position: absolute;
  right: -10px;
  top: 0;
  width: 220px;
  height: 100%;
  color: #ffffff;
  pointer-events: none;
  display: none;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding-block: var(--space-7) var(--space-6);
}
.footer-grid { display: grid; gap: var(--space-6); }
.footer-about p { margin-top: var(--space-4); color: var(--ink-2); max-width: 26rem; font-size: 0.9375rem; }
.footer-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-5); }
.footer-links h2 {
  font-size: var(--fs-sm);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin-bottom: var(--space-3);
}
.footer-links ul { list-style: none; display: grid; gap: var(--space-1); }
.footer-links a {
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  min-height: 36px;
  align-items: center;
}
.footer-links a:hover { color: var(--accent-ink); text-decoration: underline; }
.footer-bottom {
  margin-top: var(--space-7);
  padding-top: var(--space-5);
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-3);
  font-size: var(--fs-sm);
  color: var(--ink-2);
}

/* ---------- 404 ---------- */
.notfound {
  min-height: 100vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: var(--space-6) var(--gutter);
}
.notfound .logo { margin-bottom: var(--space-7); }
.notfound h1 { font-size: var(--fs-h2); }
.notfound p { margin-top: var(--space-4); color: var(--ink-2); }
.notfound .cta-row { justify-content: center; margin-top: var(--space-6); }

/* ---------- Breakpoints ---------- */
@media (min-width: 560px) {
  .chart .chart-sm { display: none; }
  .chart .chart-lg { display: block; }
  .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-links { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 760px) {
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .trust-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 52rem; }
  .final-cta { padding-right: 240px; }
  .final-cta .cords { display: block; }
  .final-cta > div { position: relative; }
}

@media (min-width: 960px) {
  .hero-grid { grid-template-columns: 1.15fr 0.85fr; }
  .debt-grid { grid-template-columns: 0.9fr 1.1fr; }
  .split { grid-template-columns: 1fr 1fr; }
  .feature-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr 1.4fr; }
}

@media (min-width: 1040px) {
  .main-nav, .header-login, .header-cta { display: inline-flex; }
  .menu { display: none; }
}

@media (min-width: 420px) and (max-width: 1039px) {
  .header-cta { display: inline-flex; }
}

@media (max-width: 380px) {
  .loan-facts { grid-template-columns: 1fr 1fr; }
  .loan-facts div:last-child { grid-column: 1 / -1; }
}

@media (forced-colors: active) {
  .btn, .plan, .feature, .step { border: 1px solid CanvasText; }
  .chart .line-plan, .chart .line-base { stroke: CanvasText; }
}
