/* =========================================================================
   Base compartida — reset, escala, superficies del navegador y componentes
   comunes. Cada propuesta define su mundo visual en a/b/c/d/e.css
   ========================================================================= */

*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  /* Escala tipográfica */
  --fs-xs: 0.75rem;    /* 12px — piso de texto funcional */
  --fs-sm: 0.875rem;   /* 14px */
  --fs-md: 1rem;       /* 16px */
  --fs-lg: 1.125rem;   /* 18px */
  --fs-xl: 1.5rem;     /* 24px */
  --fs-2xl: 2rem;      /* 32px */
  --fs-3xl: 2.75rem;   /* 44px */
  --fs-4xl: 3.5rem;    /* 56px */

  /* Escala de espaciado */
  --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: 4rem;
  --space-9: 6rem;
  --gap-inline: var(--space-4);
  --pad-block: var(--space-5);

  /* Elevacion unica del sistema (desplazamiento + blur, nunca halo) */
  --cf-elev: box-shadow: 0 1px 2px rgba(0,0,0,.05), 0 10px 30px -24px rgba(0,0,0,.45);

  /* Movimiento: exponencial de salida, nunca rebote */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-1: 180ms;
  --dur-2: 420ms;
  --dur-3: 900ms;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  font-family: var(--cf-body, "Archivo", system-ui, sans-serif);
  font-size: 17px;
  line-height: 1.6;
  color: var(--cf-ink);
  background: var(--cf-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  caret-color: var(--cf-accent);
}

/* --- Superficies del navegador: se dibujan desde la paleta --- */
::selection {
  background: var(--cf-accent);
  color: var(--cf-on-accent, #fff);
}

* {
  scrollbar-color: var(--cf-accent) transparent;
  scrollbar-width: thin;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--cf-line-strong, var(--cf-line));
  border-radius: 999px;
  border: 2px solid var(--cf-bg);
}

a {
  color: inherit;
  text-decoration: none;
  text-underline-offset: 0.22em;
  text-decoration-thickness: 1px;
}

a:hover {
  text-decoration: underline;
}

h1,
h2,
h3,
h4,
p,
figure,
blockquote,
ul,
ol {
  margin: 0;
  text-wrap: pretty;
}

h1,
h2,
h3 {
  text-wrap: balance;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

img,
svg {
  display: block;
  max-width: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--cf-focus, var(--cf-accent));
  outline-offset: 3px;
  border-radius: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.wrap {
  width: min(100% - 2.5rem, var(--cf-max, 1140px));
  margin-inline: auto;
}

.wrap--narrow {
  width: min(100% - 2.5rem, 720px);
  margin-inline: auto;
}

/* ---------- Marca ---------- */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.brand .mark {
  width: var(--cf-mark, 40px);
  height: var(--cf-mark, 40px);
  flex: 0 0 auto;
}

.brand__txt {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.brand__name {
  font-size: 1.06rem;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.brand__sub {
  font-size: 0.75rem; /* 12px — piso de legibilidad */
  letter-spacing: 0.06em;
  opacity: 0.82;
  font-weight: 500;
}

/* ---------- Botones ---------- */
.btn {
  --btn-bg: var(--cf-accent);
  --btn-fg: var(--cf-on-accent, #fff);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 52px;
  padding: var(--space-3) var(--space-5);
  border: 1.5px solid transparent;
  border-radius: var(--cf-radius, 12px);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-weight: 650;
  font-size: 1rem;
  letter-spacing: -0.005em;
  cursor: pointer;
  transition: transform var(--dur-1) var(--ease-out),
    background var(--dur-1) var(--ease-out),
    border-color var(--dur-1) var(--ease-out),
    color var(--dur-1) var(--ease-out);
}

.btn:hover {
  transform: translateY(-2px);
  text-decoration: none;
}

.btn:active {
  transform: translateY(0);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.btn--ghost {
  background: transparent;
  color: var(--cf-ink);
  border-color: var(--cf-line-strong, var(--cf-line));
}

.btn--ghost:hover {
  border-color: var(--cf-accent);
  color: var(--cf-accent);
}

.btn--wa {
  --btn-bg: #15703b;
  --btn-fg: #ffffff;
}

.btn--full {
  width: 100%;
}

/* ---------- Chips (solo datos, nunca sobre un titular) ---------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-3);
  border-radius: 999px;
  border: 1px solid var(--cf-line-strong, var(--cf-line));
  font-size: var(--fs-xs);
  font-weight: 550;
  color: var(--cf-ink-2, var(--cf-ink));
}

/* ---------- Formularios ---------- */
.field {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.field label {
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--cf-ink-2, var(--cf-ink));
}

.field input,
.field select {
  min-height: 52px;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--cf-radius-sm, 10px);
  border: 1.5px solid var(--cf-line-strong, var(--cf-line));
  background: var(--cf-field, rgba(255, 255, 255, 0.06));
  color: var(--cf-ink);
  transition: border-color var(--dur-1) var(--ease-out);
}

.field input:focus,
.field select:focus {
  border-color: var(--cf-accent);
  outline: none;
}

.field input::placeholder {
  color: var(--cf-ink-2, var(--cf-ink));
  opacity: 0.75;
}

.consent {
  display: flex;
  gap: var(--space-2);
  align-items: flex-start;
  font-size: var(--fs-xs);
  line-height: 1.55;
  color: var(--cf-ink-2, var(--cf-ink));
}

.consent input {
  width: 20px;
  height: 20px;
  margin-top: 0.15rem;
  flex: 0 0 auto;
  accent-color: var(--cf-accent);
}

.form-msg {
  font-size: var(--fs-sm);
  font-weight: 600;
  min-height: 1.2em;
}

.form-msg[data-tipo="error"] {
  color: var(--cf-error, #b3261e);
}

.form-msg[data-tipo="ok"] {
  color: var(--cf-ok, var(--cf-accent));
}

/* ---------- Selects: el desplegable nativo se dibuja con fondo del sistema ----------
   Sin esto, el texto claro del tema oscuro queda invisible sobre el blanco del
   menu hasta que el cursor lo resalta. Bug reportado por el operador. */
select option,
select optgroup {
  color: #101010;
  background-color: #ffffff;
}

select {
  /* el control cerrado si respeta el tema, pero el texto debe tener contraste */
  color: var(--cf-ink);
}

select:invalid,
select option[value=""] {
  color: var(--cf-ink-2, var(--cf-ink));
}

/* ---------- Reveal ---------- */
.js .reveal {
  opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
  .js .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ---------- Skip link ---------- */
.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 999;
  padding: var(--space-3) var(--space-5);
  background: var(--cf-accent);
  color: var(--cf-on-accent, #fff);
}

.skip:focus {
  left: 0;
}

/* ---------- Cifras ---------- */
.num,
.tabular {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}


/* ---------- Barra de CTA fija (movil) ---------- */
.ctabar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 34px;
  z-index: 70;
  display: none;
  gap: 0.4rem;
  padding: 0.5rem 0.75rem;
  background: var(--cf-bg);
  border-top: 1px solid var(--cf-line-strong, var(--cf-line));
  box-shadow: 0 -6px 24px -18px rgba(0, 0, 0, 0.5);
  transform: translateY(120%);
  transition: transform var(--dur-2) var(--ease-out);
}

.ctabar.is-on {
  transform: translateY(0);
}

.ctabar__primary {
  flex: 1;
  min-height: 48px;
  font-size: 0.95rem;
}

.ctabar__wa {
  min-height: 48px;
  width: 52px;
  padding: 0;
  flex: 0 0 auto;
}

@media (max-width: 900px) {
  .ctabar {
    display: flex;
  }

  body {
    padding-bottom: 96px;
  }
}

/* ---------- Que pasa despues ---------- */
.despues {
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--cf-line);
}

/* el texto del formulario vive sobre la superficie de la tarjeta, no sobre la
   seccion oscura que la contiene: se ancla al ancestro .leadform */
.leadform .despues__t,
.leadform .despues__d,
.leadform .leadform__micro,
.leadform .consent {
  color: var(--cf-ink-2, var(--cf-ink));
}

.leadform .despues__d strong {
  color: var(--cf-ink);
}

.leadform .despues {
  border-bottom-color: var(--cf-line);
}

.despues__t {
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--cf-ink-2, var(--cf-ink));
  margin-bottom: var(--space-3);
}

.despues__list {
  display: grid;
  gap: 0.55rem;
}

.despues__list li {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  font-size: var(--fs-sm);
  color: var(--cf-ink-2, var(--cf-ink));
  line-height: 1.45;
}

.despues__n {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--cf-accent);
  color: var(--cf-on-accent, #fff);
  font-size: 0.72rem;
  font-weight: 700;
}

.despues__d strong {
  color: var(--cf-ink);
  font-weight: 650;
}

.leadform__micro {
  font-size: var(--fs-xs);
  color: var(--cf-ink-2, var(--cf-ink));
  text-align: center;
  margin-top: -0.2rem;
}

/* ---------- Barra de revisión (neutral: no contamina la paleta) ---------- */
.demobar {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 80;
  display: flex;
  gap: 0.4rem;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  padding: 0.5rem 1rem;
  font-size: var(--fs-xs);
  font-weight: 600;
  background: rgba(18, 18, 18, 0.92);
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  color: #efefef;
}

.demobar a {
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  text-decoration: none;
}

.demobar a[aria-current="true"] {
  background: #ffffff;
  color: #171717;
  border-color: #ffffff;
}

.demobar span {
  opacity: 0.7;
  font-weight: 500;
}

@media (max-width: 700px) {
  .demobar {
    gap: 0.3rem;
    padding: 0.45rem 0.6rem;
  }
  .demobar span {
    display: none;
  }
}
