/* Renta 4 Banco: estilos de marca compartidos (tokens, tipografía, header,
   footer, botones, formularios y layout base). Ver docs/manual-marca-renta4.md.
   Lo específico de cada página queda inline en su <style>. */
:root {
  --r4-burdeos: #851A2E;
  --r4-burdeos-oscuro: #75162B;
  --r4-oscuro: #1E242B;
  --r4-crema: #FAE6D4;
  --r4-crema-oscuro: #F3C59F;
  --r4-gris-claro: #F3F3F3;
  --r4-gris-form: #F5F5F5;
  --r4-blanco: #FFFFFF;
  --r4-btn: #8C2F3F;
  --r4-btn-hover: #752E3B;
  --r4-texto: #3B3B3B;
  --r4-texto-1: #000000;
  --r4-texto-2: #343434;
  --r4-texto-3: #C8C8C8;
  --r4-borde: #3B3B3B;
  --r4-separador: #E0E0E0;
  --r4-error: #B00020;
  --r4-ok: #177561;
  --r4-ocre-5: #FAF0E5;
  --r4-font-title: 'Exo 2', 'Open Sans', Arial, sans-serif;
  --r4-font-body: 'Open Sans', Arial, sans-serif;
  --r4-max-width: 1140px;
  --r4-touch: 44px;
}


*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

body {
  margin: 0;
  font-family: var(--r4-font-body);
  font-size: 14px;
  line-height: 1.55;
  color: var(--r4-texto);
  background: var(--r4-blanco);
}
@media (min-width: 768px) { body { font-size: 16px; } }

h1, h2, h3, h4 { font-family: var(--r4-font-title); color: var(--r4-texto-1); }
a { color: var(--r4-btn); }
:focus-visible { outline: 2px solid var(--r4-btn); outline-offset: 2px; }
.on-dark :focus-visible, .on-dark:focus-visible { outline-color: #fff; }

.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: 16px; top: -100px; z-index: 100;
  background: #fff; color: var(--r4-btn); padding: 10px 16px; font-weight: 700;
}
.skip-link:focus { top: 8px; }

.container { max-width: var(--r4-max-width); margin: 0 auto; padding: 0 16px; }
@media (min-width: 768px) { .container { padding: 0 24px; } }

/* ---------- Header ---------- */
.site-header { background: var(--r4-oscuro); color: #fff; position: sticky; top: 0; z-index: 50; }
.site-header .container { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 16px; }
.logo { display: inline-flex; align-items: center; min-height: 44px; padding: 6px 0; }
.logo img { display: block; height: 30px; width: auto; }
@media (min-width: 768px) { .logo img { height: 38px; } }
.nav-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; padding: 0; border: 0; border-radius: 0;
  background: var(--r4-burdeos); color: #fff; cursor: pointer;
}
.nav-toggle:hover { background: var(--r4-btn-hover); }
.nav-toggle svg { width: 24px; height: 24px; }
.site-nav { display: none; }
.site-nav.open {
  display: block; position: absolute; left: 0; right: 0; top: 100%;
  background: var(--r4-oscuro); border-top: 1px solid rgba(255,255,255,0.2);
}
.site-nav ul { list-style: none; margin: 0; padding: 8px 16px 16px; }
.site-nav a {
  display: flex; align-items: center; min-height: 44px; padding: 0 4px;
  color: #fff; text-decoration: none; font-weight: 600; font-size: 15px;
}
.site-nav a:hover { text-decoration: underline; text-underline-offset: 4px; }
@media (min-width: 900px) {
  .nav-toggle { display: none; }
  .site-nav, .site-nav.open { display: block; position: static; border: 0; }
  .site-nav ul { display: flex; gap: 28px; padding: 0; }
  .site-nav a { font-size: 16px; }
}


/* ---------- Botón primario ---------- */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px;
  padding: 10px 25px; border: 0; border-radius: 0;
  background: var(--r4-btn); color: #fff; text-decoration: none;
  font-family: var(--r4-font-body); font-weight: 700; font-size: 13px; letter-spacing: 0.04em; text-transform: uppercase;
  transition: background-color 150ms ease-out;
}
.btn-primary:hover { background: var(--r4-btn-hover); }
@media (min-width: 768px) { .btn-primary { font-size: 16px; } }

/* ---------- Botones secundario y de texto ---------- */
.btn-primary { cursor: pointer; }
.btn-primary:disabled { opacity: 0.6; cursor: progress; }
.btn-block { display: flex; width: 100%; }
.btn-secondary {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px;
  padding: 10px 15px; border: 1px solid var(--r4-btn); border-radius: 0;
  background: var(--r4-blanco); color: var(--r4-btn); cursor: pointer; text-decoration: none;
  font-family: var(--r4-font-body); font-weight: 700; font-size: 14px; letter-spacing: 0.03em; text-transform: uppercase;
  transition: background-color 150ms ease-out, color 150ms ease-out;
}
.btn-secondary:hover { background: var(--r4-btn-hover); color: #fff; }
.btn-text {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px;
  border: 0; background: none; color: var(--r4-btn); cursor: pointer; text-decoration: none;
  font-family: var(--r4-font-body); font-weight: 700; font-size: 14px; letter-spacing: 0.03em; text-transform: uppercase;
}
.btn-text:hover { text-decoration: underline; text-underline-offset: 4px; }
.on-dark .btn-text { color: #fff; }
@media (min-width: 768px) { .btn-secondary, .btn-text { font-size: 16px; } }

/* ---------- Formularios ---------- */
.form-box { background: var(--r4-gris-form); padding: 20px 16px; }
.field { margin: 0 0 16px; }
.field label, .label {
  display: block; margin: 0 0 6px; font-family: var(--r4-font-body); font-weight: 600;
  font-size: 14px; letter-spacing: 1px; text-transform: uppercase; color: var(--r4-texto);
}
.input, .select {
  display: block; width: 100%; min-height: 44px; padding: 11px 8px;
  border: 1px solid var(--r4-borde); border-radius: 0; background: var(--r4-blanco);
  font-family: var(--r4-font-body); font-size: 16px; color: var(--r4-texto-1);
}
.input[aria-invalid="true"], .select[aria-invalid="true"] { border-color: var(--r4-error); box-shadow: inset 0 0 0 1px var(--r4-error); }
.input:disabled, .select:disabled { background: var(--r4-gris-claro); color: var(--r4-texto-2); }
.field-error {
  display: flex; gap: 6px; align-items: flex-start; margin: 6px 0 0;
  color: var(--r4-error); font-size: 13px; line-height: 1.4;
}
.field-error svg { flex: 0 0 16px; width: 16px; height: 16px; margin-top: 1px; }
.field-error:empty { display: none; }
input[type="checkbox"].check {
  appearance: none; -webkit-appearance: none; width: 25px; height: 25px; margin: 0;
  border: 1px solid var(--r4-borde); border-radius: 0; background: #fff; cursor: pointer; flex: 0 0 25px;
}
input[type="checkbox"].check:checked {
  background: var(--r4-btn-hover) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center/18px no-repeat;
  border-color: var(--r4-btn-hover);
}
@media (min-width: 768px) {
  .form-box { padding: 24px; }
  .field label, .label { font-size: 16px; }
}

/* ---------- Sections ---------- */
.section { padding: 48px 0; }
.section.alt { background: var(--r4-gris-claro); }
.section h2 { font-weight: 800; font-size: 32px; line-height: 1; margin: 0 0 14px; }
.section-intro { margin: 0 0 30px; color: var(--r4-texto-2); max-width: 720px; }
h3.upper { font-weight: 800; font-size: 20px; line-height: 26px; text-transform: uppercase; margin: 0 0 15px; }
@media (min-width: 768px) {
  .section { padding: 60px 0; }
  .section h2 { font-size: 40px; margin-bottom: 16px; }
  .section-intro { margin-bottom: 50px; }
  h3.upper { font-size: 24px; line-height: 32px; }
}
@media (min-width: 1024px) { .section { padding: 80px 0; } }

.status-msg { margin: 0; padding: 24px; background: var(--r4-blanco); border-left: 4px solid var(--r4-burdeos); }
.section.alt .status-msg { background: var(--r4-blanco); }
.section:not(.alt) .status-msg { background: var(--r4-gris-claro); }

/* ---------- Footer ---------- */
.site-footer { background: var(--r4-burdeos-oscuro); color: #fff; padding: 32px 0; font-size: 14px; }
.site-footer .container { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 24px; }
.site-footer p { margin: 0; }
.site-footer a { color: #fff; display: inline-flex; align-items: center; min-height: 44px; }
.site-footer a:focus-visible { outline-color: #fff; }
