/* DorsalYa · estilo neobrutalista. Sin framework: carga instantánea. */
:root {
  /* Paleta "Energía y velocidad" */
  --naranja: #FF5A1F; --azul-noche: #14213D; --lima: #C6F432; --hueso: #F2F2EE; --blanco: #FFFFFF;
  /* Apoyo (contraste accesible) */
  --gris: #4A5468; --naranja-suave: #FFE6DB;
  --rojo: #A11A0C; --rojo-bg: #FFE1DA; --ambar: #6B3E00; --ambar-bg: #FFE7B8;
  /* Nombres anteriores, conservados para estilos en línea existentes */
  --tinta: var(--azul-noche); --fondo: var(--hueso); --borde: var(--azul-noche); --borde-fuerte: var(--azul-noche);
  --verde: var(--naranja); --verde-osc: var(--azul-noche); --verde-claro: var(--lima);
  /* Forma */
  --linea: 3px solid var(--azul-noche);
  --sombra: 6px 6px 0 var(--azul-noche);
  --sombra-sm: 4px 4px 0 var(--azul-noche);
  --radio: 8px;
  /* Tipografía */
  --sans: 'Space Grotesk', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --display: 'Archivo', 'Arial Black', var(--sans);
  --mono: 'Space Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--hueso); color: var(--azul-noche); font: 16px/1.55 var(--sans); }
a { color: var(--azul-noche); font-weight: 700; text-decoration: underline; text-decoration-color: var(--naranja); text-decoration-thickness: 3px; text-underline-offset: 3px; }
a:hover { background: var(--lima); color: var(--azul-noche); }
h1, h2, h3 { font-family: var(--display); font-style: italic; font-weight: 900; letter-spacing: -0.02em; line-height: 1.05; margin: 0; }
h1 { font-size: clamp(34px, 7vw, 60px); }
h2 { font-size: clamp(22px, 3.5vw, 26px); }
code { font-family: var(--mono); font-weight: 700; background: var(--lima); padding: 1px 6px; border: 2px solid var(--azul-noche); border-radius: 4px; }
.skip { position: absolute; left: -9999px; } .skip:focus { left: 16px; top: 16px; background: var(--lima); border: var(--linea); padding: 8px 12px; z-index: 10; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid #1D4ED8; outline-offset: 3px; }

/* Encabezado y logo */
.cabecera { background: var(--blanco); border-bottom: var(--linea); }
.contenedor { max-width: 1200px; margin: 0 auto; padding: 14px 24px; }
.cabecera .contenedor { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.marca { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--azul-noche); }
.marca:hover { background: none; }
.marca-icono { width: 54px; height: 40px; flex: none; }
.marca-txt { font-family: var(--display); font-style: italic; font-weight: 900; font-size: 30px; letter-spacing: -0.03em; line-height: 1; }
.marca-txt span { color: var(--naranja); -webkit-text-stroke: 1px var(--azul-noche); }

.pasos { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 18px; }
.pasos li { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; color: var(--gris); }
.pasos li span { width: 32px; height: 32px; border-radius: 6px; border: var(--linea); display: grid; place-items: center; font-family: var(--mono); font-size: 14px; font-weight: 700; background: var(--blanco); color: var(--azul-noche); }
.pasos li[aria-current="step"] { color: var(--azul-noche); }
.pasos li[aria-current="step"] span { background: var(--naranja); box-shadow: 3px 3px 0 var(--azul-noche); }
.pasos li.hecho span { background: var(--lima); }

/* Página y hero tipo dorsal */
.pagina { max-width: 1200px; margin: 0 auto; padding: 32px 24px 64px; display: flex; flex-direction: column; gap: 28px; }
.hero {
  position: relative; background-color: var(--blanco); color: var(--azul-noche);
  border: var(--linea); border-radius: var(--radio); box-shadow: var(--sombra);
  padding: 72px 40px 40px;
  background-image:
    radial-gradient(circle at 22px 22px, var(--hueso) 7px, var(--azul-noche) 8px, var(--azul-noche) 10px, transparent 11px),
    radial-gradient(circle at calc(100% - 22px) 22px, var(--hueso) 7px, var(--azul-noche) 8px, var(--azul-noche) 10px, transparent 11px),
    radial-gradient(circle at 22px calc(100% - 22px), var(--hueso) 7px, var(--azul-noche) 8px, var(--azul-noche) 10px, transparent 11px),
    radial-gradient(circle at calc(100% - 22px) calc(100% - 22px), var(--hueso) 7px, var(--azul-noche) 8px, var(--azul-noche) 10px, transparent 11px),
    linear-gradient(var(--naranja), var(--naranja));
  background-repeat: no-repeat;
  background-size: auto, auto, auto, auto, 100% 44px;
}
.hero::after { content: ""; position: absolute; left: 0; right: 0; top: 44px; border-top: var(--linea); }
.hero .antetitulo {
  display: inline-block; margin: 0 0 14px; padding: 4px 12px; transform: rotate(-2deg);
  background: var(--lima); color: var(--azul-noche); border: var(--linea); border-radius: 6px; box-shadow: 3px 3px 0 var(--azul-noche);
  font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
}
.hero h1 { max-width: 18ch; }
.hero p { margin: 14px 0 0; color: var(--azul-noche); font-size: 17px; font-weight: 700; }

.columnas { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; }
.principal { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 28px; }
.lateral { flex: 1 1 320px; min-width: 0; position: sticky; top: 16px; }

/* Tarjetas */
.tarjeta { background: var(--blanco); border: var(--linea) !important; border-radius: var(--radio); box-shadow: var(--sombra); padding: 26px; display: flex; flex-direction: column; gap: 18px; }
.lateral .tarjeta { background: var(--azul-noche); color: var(--blanco); }
.lateral .tarjeta h2 { color: var(--lima); }
.lateral .resumen-linea span:first-child, .lateral .pequeno { color: #D5DAE6; }
.lateral .total { border-top-color: var(--lima); }
.nota { margin: 0; font-size: 14px; color: var(--gris); }

/* Formulario */
.fila { display: flex; flex-wrap: wrap; gap: 16px; }
.campo { flex: 1 1 220px; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.campo.angosto { flex-basis: 160px; }
.campo label { font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
input[type=text], input[type=email], input[type=tel], input[type=date], select {
  height: 52px; padding: 0 14px; border: var(--linea); border-radius: 6px;
  font: inherit; font-size: 16px; color: var(--azul-noche); background: var(--blanco); width: 100%;
  transition: box-shadow .12s, transform .12s;
}
input[type=text]:focus, input[type=email]:focus, input[type=tel]:focus, input[type=date]:focus, select:focus { box-shadow: var(--sombra-sm); transform: translate(-2px, -2px); background: #FFFDF5; }
::placeholder { color: #6B7385; }
[aria-invalid="true"] { border-color: var(--rojo) !important; box-shadow: 4px 4px 0 var(--rojo) !important; }
.err { margin: 0; font-size: 13px; font-weight: 700; color: var(--rojo); }
.err:empty { display: none; }

/* Categorías */
.opciones { display: flex; flex-direction: column; gap: 14px; }
.opcion { display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 16px 18px; border-radius: var(--radio); border: var(--linea); background: var(--blanco); box-shadow: var(--sombra-sm); cursor: pointer; transition: transform .12s, box-shadow .12s; }
.opcion:hover { transform: translate(-2px, -2px); box-shadow: var(--sombra); }
.opcion:has(input:checked) { background: var(--lima); box-shadow: var(--sombra); }
.opcion:has(input:disabled) { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; text-decoration: line-through; }
.opcion input { width: 22px; height: 22px; margin: 0; accent-color: var(--azul-noche); }
.opcion .txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.opcion .nom { font-family: var(--display); font-style: italic; font-weight: 900; font-size: 20px; letter-spacing: -0.01em; }
.opcion .sub { font-size: 14px; font-weight: 700; color: var(--gris); }
.opcion:has(input:checked) .sub { color: var(--azul-noche); }
.opcion .precio { font-family: var(--mono); font-weight: 700; font-size: 17px; }
.esqueleto { height: 64px; border-radius: var(--radio); border: 3px dashed var(--azul-noche); background: var(--blanco); animation: parpadeo 1s steps(2, end) infinite; }
@keyframes parpadeo { 50% { background: var(--naranja-suave); } }

.check { display: flex; align-items: flex-start; gap: 12px; font-size: 15px; line-height: 1.45; }
.check input { width: 24px; height: 24px; margin: 0; flex: none; accent-color: var(--naranja); }

/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 56px; padding: 0 32px;
  border: var(--linea); border-radius: var(--radio); background: var(--naranja); color: var(--azul-noche); box-shadow: var(--sombra);
  font-family: var(--display); font-style: italic; font-weight: 900; font-size: 20px; letter-spacing: -0.01em;
  cursor: pointer; text-decoration: none; transition: transform .1s, box-shadow .1s;
}
.btn:hover { background: var(--naranja); color: var(--azul-noche); transform: translate(2px, 2px); box-shadow: var(--sombra-sm); }
.btn:active { transform: translate(6px, 6px); box-shadow: 0 0 0 var(--azul-noche); }
.btn[disabled] { opacity: .65; cursor: progress; transform: none; box-shadow: var(--sombra-sm); }
.btn.sec { background: var(--blanco); color: var(--azul-noche); min-height: 46px; padding: 0 18px; font-family: var(--sans); font-style: normal; font-weight: 700; font-size: 15px; box-shadow: var(--sombra-sm); }
.btn.sec:hover { background: var(--lima); transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--azul-noche); }
.btn.sec:active { transform: translate(4px, 4px); box-shadow: 0 0 0 var(--azul-noche); }
.acciones { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; }

/* Resumen y totales */
.resumen-linea { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; }
.resumen-linea span:first-child { color: var(--gris); } .resumen-linea span:last-child { font-weight: 700; font-family: var(--mono); text-align: right; }
.total { border-top: var(--linea); padding-top: 16px; display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.total strong { font-family: var(--mono); font-size: 28px; font-weight: 700; }
.pequeno { margin: 0; font-size: 13px; line-height: 1.5; color: var(--gris); }

/* Avisos y etiquetas */
.aviso { border: var(--linea); border-radius: var(--radio); box-shadow: var(--sombra-sm); padding: 14px 16px; font-size: 15px; font-weight: 700; }
.aviso.error { background: var(--rojo-bg); color: var(--rojo); border-color: var(--rojo); box-shadow: 4px 4px 0 var(--rojo); }
.aviso.ok { background: var(--lima); color: var(--azul-noche); }
.aviso.espera { background: var(--ambar-bg); color: var(--ambar); }
.pill { display: inline-block; padding: 3px 10px; border: 2px solid var(--azul-noche); border-radius: 6px; font-size: 13px; font-weight: 700; }
.pill.pagado { background: var(--lima); color: var(--azul-noche); }
.pill.pendiente { background: var(--ambar-bg); color: var(--ambar); border-color: var(--ambar); }
.pill.fallido, .pill.anulado, .pill.expirado { background: var(--rojo-bg); color: var(--rojo); border-color: var(--rojo); }

/* Pie */
.pie { max-width: 1200px; margin: 0 auto; padding: 20px 24px 40px; border-top: var(--linea); font-size: 13px; color: var(--gris); display: flex; flex-wrap: wrap; gap: 16px; }

@media (max-width: 640px) {
  :root { --sombra: 4px 4px 0 var(--azul-noche); --sombra-sm: 3px 3px 0 var(--azul-noche); }
  .contenedor { padding: 12px 16px; }
  .pagina { padding: 20px 16px 48px; }
  .hero { padding: 64px 22px 28px; }
  .tarjeta { padding: 18px; }
  .lateral { position: static; }
  .marca-icono { width: 44px; height: 33px; }
  .marca-txt { font-size: 24px; }
  .pasos { gap: 10px; } .pasos li { font-size: 13px; }
  .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .esqueleto { animation: none; }
  .btn, .opcion, input, select { transition: none; }
}

/* v3: cupones y descripción del evento */
.ev-desc { max-width: 70ch; font-weight: 400 !important; white-space: pre-line; }
.cupon { display: flex; flex-direction: column; gap: 6px; padding-top: 14px; border-top: 2px dashed var(--azul-noche); }
.cupon label { font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.cupon-fila { display: flex; gap: 10px; }
.cupon-fila input { flex: 1; min-width: 0; }
.cupon-fila .btn.sec { min-height: 52px; width: auto; }
textarea, input[type=password], input[type=number], input[type=datetime-local], input[type=search] {
  padding: 12px 14px; border: var(--linea); border-radius: 6px; font: inherit; font-size: 16px; color: var(--azul-noche); background: var(--blanco); width: 100%;
}
input[type=password], input[type=number], input[type=datetime-local], input[type=search] { height: 52px; padding: 0 14px; }
textarea { min-height: 110px; resize: vertical; }
textarea:focus, input[type=password]:focus, input[type=number]:focus, input[type=datetime-local]:focus, input[type=search]:focus { box-shadow: var(--sombra-sm); transform: translate(-2px, -2px); background: #FFFDF5; }
/* Un .campo suelto dentro de un contenedor en columna no debe tomar 220px de alto. */
.tarjeta > .campo, form > .campo { flex: 0 0 auto; }
