/* ===========================================================
   Jaque Mate Marketing — estilos compartidos
   =========================================================== */

:root {
  /* Tema oscuro: negro, blanco y rojo, colores planos */
  --negro: #0a0909;
  --negro-2: #151313;
  --fondo: #0a0909;
  --papel: #141212;
  --papel-2: #1d1a1a;
  --linea: #2b2726;
  --linea-fuerte: #3e3937;
  --texto: #f7f4f1;
  --suave: #b9b1ab;
  --tenue: #8a827c;
  --rojo: #b3161f;
  --rojo-hover: #cc1f29;
  --rojo-texto: #f0646b;
  --rojo-suave: rgba(179, 22, 31, .16);
  --ok: #4cbb6d;
  --ok-suave: rgba(76, 187, 109, .14);
  --ambar: #e2a640;
  --ambar-suave: rgba(226, 166, 64, .14);
  --azul: #8db4e3;
  --azul-suave: rgba(141, 180, 227, .14);

  --serif: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  --sans: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;

  --radio: 14px;
  --radio-sm: 10px;
  --sombra: none;
  --sombra-alta: 0 20px 60px rgba(0, 0, 0, .7);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--fondo);
  color: var(--texto);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--rojo-texto); }
[hidden] { display: none !important; }

:focus-visible { outline: 2px solid var(--rojo); outline-offset: 2px; }

.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;
}

/* ---------- Marca ---------- */

.marca {
  display: inline-flex; align-items: center; gap: 12px;
  text-decoration: none; color: inherit;
}
.marca img { height: 36px; width: auto; }
.marca-texto { display: inline-flex; flex-direction: column; line-height: 1; }
.marca-texto b {
  font-family: var(--sans); font-weight: 800; letter-spacing: .28em;
  font-size: 15px; text-transform: uppercase;
}
.marca-texto small {
  font-size: 9.5px; letter-spacing: .5em; text-transform: uppercase;
  color: var(--rojo-texto); margin-top: 5px; font-weight: 700;
}
.marca-pieza {
  width: 30px; height: 30px; border-radius: 8px; background: var(--rojo);
  display: grid; place-items: center; flex: none;
}
.marca-pieza svg { width: 18px; height: 18px; fill: #fff; }

/* ---------- Botones ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: 999px;
  border: 1px solid transparent; cursor: pointer;
  font-weight: 700; font-size: 15px; letter-spacing: .01em;
  transition: background .15s, border-color .15s, color .15s, transform .1s;
  text-decoration: none; white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }
.btn svg { width: 18px; height: 18px; flex: none; }

.btn-primario { background: var(--rojo); color: #fff; }
.btn-primario:hover:not([disabled]) { background: var(--rojo-hover); }
.btn-rojo { background: var(--rojo); color: #fff; }
.btn-rojo:hover:not([disabled]) { background: var(--rojo-hover); }
.btn-borde { background: transparent; border-color: var(--linea-fuerte); color: var(--texto); }
.btn-borde:hover:not([disabled]) { border-color: var(--texto); }
.btn-texto { background: transparent; color: var(--suave); padding: 0 12px; }
.btn-texto:hover { color: var(--texto); }
.btn-peligro { background: transparent; color: var(--rojo-texto); border-color: rgba(240,100,107,.45); }
.btn-peligro:hover { background: var(--rojo-suave); }
.btn-sm { min-height: 38px; padding: 0 16px; font-size: 14px; }

/* ---------- Campos ---------- */

.campo { display: flex; flex-direction: column; gap: 6px; margin-bottom: 22px; }
.campo > label, .campo > .etiqueta {
  font-weight: 700; font-size: 14px; color: var(--texto);
}
.campo .ayuda { font-size: 13px; color: var(--suave); margin-top: -2px; }
.req { color: var(--rojo-texto); margin-left: 2px; }
.opc { color: var(--tenue); font-weight: 500; font-size: 12.5px; margin-left: 4px; }

.input, select.input, textarea.input {
  width: 100%; min-height: 50px; padding: 12px 14px;
  border: 1px solid var(--linea-fuerte); border-radius: var(--radio-sm);
  background: var(--papel-2); font-size: 16px;
  transition: border-color .15s, box-shadow .15s;
  -webkit-appearance: none; appearance: none;
}
select.input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23b9b1ab' stroke-width='1.6' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 38px;
}
textarea.input { min-height: 100px; resize: vertical; }
.input:focus { outline: none; border-color: var(--texto); box-shadow: 0 0 0 3px rgba(255,255,255,.08); }
.input::placeholder { color: var(--tenue); }

.prefijo { position: relative; }
.prefijo > span {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: var(--suave); pointer-events: none; font-weight: 600;
}
.prefijo .input { padding-left: 32px; }

.campo.con-error .input { border-color: var(--rojo); }
.error-msg { color: var(--rojo-texto); font-size: 13px; font-weight: 600; min-height: 0; }
.error-msg:empty { display: none; }

.fila { display: grid; gap: 0 16px; grid-template-columns: 1fr; }
@media (min-width: 560px) {
  .fila-2 { grid-template-columns: 1fr 1fr; }
  .fila-3 { grid-template-columns: 1fr 1fr 1fr; }
}

/* Chips (casillas y opciones con forma de píldora) */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; margin: 0; }
.chip span {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; min-width: 48px; padding: 0 16px;
  border: 1px solid var(--linea-fuerte); border-radius: 999px; background: var(--papel-2);
  font-weight: 600; font-size: 14.5px; user-select: none;
  transition: background .15s, color .15s, border-color .15s;
}
.chip input:checked + span { background: var(--rojo); color: #fff; border-color: var(--rojo); }
.chip input:focus-visible + span { outline: 2px solid var(--rojo); outline-offset: 2px; }
.chip:hover span { border-color: var(--texto); }

/* Tarjetas de opción (tipo de trabajo, experiencia) */
.opciones { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .opciones-3 { grid-template-columns: repeat(3, 1fr); } }
.opcion { position: relative; }
.opcion input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.opcion > div {
  border: 1px solid var(--linea-fuerte); border-radius: var(--radio-sm);
  padding: 14px 16px; background: var(--papel-2); height: 100%;
  display: flex; gap: 12px; align-items: center;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.opcion svg { width: 22px; height: 22px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.6; }
.opcion strong { display: block; font-size: 15px; }
.opcion small { color: var(--suave); font-size: 12.5px; }
.opcion input:checked + div { border-color: var(--rojo); box-shadow: inset 0 0 0 1px var(--rojo); background: var(--rojo-suave); }
.opcion input:checked + div svg { color: var(--rojo-texto); }
.opcion input:focus-visible + div { outline: 2px solid var(--rojo); outline-offset: 2px; }

.casilla {
  display: flex; gap: 12px; align-items: flex-start; cursor: pointer;
  padding: 14px 16px; border: 1px solid var(--linea-fuerte); border-radius: var(--radio-sm);
  background: var(--papel-2); margin-bottom: 10px; font-size: 15px;
}
.casilla input {
  width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--rojo); flex: none;
}
.campo.con-error .casilla { border-color: var(--rojo); }

/* ---------- Avisos ---------- */

.aviso {
  border-radius: var(--radio-sm); padding: 14px 16px; font-size: 14.5px;
  background: var(--ambar-suave); color: var(--ambar); border: 1px solid rgba(226,166,64,.35);
}
.aviso-error { background: var(--rojo-suave); color: var(--rojo-texto); border-color: rgba(240,100,107,.4); }
.aviso code { font-size: 13px; background: rgba(255,255,255,.08); padding: 1px 5px; border-radius: 4px; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px);
  background: var(--papel-2); color: var(--texto); border: 1px solid var(--linea-fuerte); padding: 12px 18px; border-radius: 12px;
  font-size: 14px; font-weight: 600; box-shadow: var(--sombra-alta);
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
  z-index: 200; max-width: calc(100% - 32px); text-align: center;
}
.toast.visible { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: var(--rojo); border-color: var(--rojo); color: #fff; }

.spinner {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.35); border-top-color: #fff;
  animation: girar .8s linear infinite; flex: none;
}
.spinner.oscuro { border-color: rgba(255,255,255,.15); border-top-color: var(--texto); }
@keyframes girar { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation-duration: 1.5s !important; }
}

/* Títulos con Poppins */
h1, h2, h3 { letter-spacing: -.02em; }

/* Logotipo */
.marca .logo-img { height: 40px; width: auto; display: block; }
