/* Base de NuestraFiesta2026 ("Tablero"): tokens, controles y el layout partido (hero + panel) que usan el registro y los logins. */
:root {
  --noche: #0d0d0b;
  --noche-2: #1a1a16;
  --celda: #1d1d19;
  --panel: #f2efe8;
  --superficie: #ffffff;
  --crema: #f2efe8;
  --ink: #0d0d0b;
  --ink-soft: #5b584f;
  --line: #d6d1c4;
  --oro: #ffb81c;
  --oro-hover: #ffc94d;
  --coral: #ff4b3e;
  --menta: #a7ff9c;
  --foco: #c25e00;
  --error: #b3261e;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --body: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { color-scheme: light; }

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--noche);
  color: var(--crema);
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.5;
  caret-color: var(--oro);
  overflow-x: hidden;
}
::selection { background: var(--oro); color: var(--ink); }
a { color: inherit; }

h1, h2, h3 { font-family: var(--display); margin: 0; text-wrap: balance; }
h2 { font-weight: 700; font-size: 1.75rem; line-height: 1.1; letter-spacing: 0.01em; }

/* ---------- Controles ---------- */
label, legend { display: block; margin: 1.15rem 0 0.4rem; font-weight: 600; font-size: 0.95rem; }
label:first-child { margin-top: 0; }
fieldset { border: 0; padding: 0; margin: 1.6rem 0 0; min-width: 0; }
legend { padding: 0; margin: 0 0 0.6rem; }

input:is(:not([type]), [type="text"], [type="tel"], [type="email"], [type="password"], [type="search"], [type="number"]),
select {
  width: 100%;
  min-height: 3.25rem;
  padding: 0.75rem 0.9rem;
  font: inherit;
  font-size: 1.0625rem;
  color: var(--ink);
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 2px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
input::placeholder { color: #66625a; }
input:hover, select:hover { border-color: #aaa498; }
input:focus-visible, select:focus-visible { border-color: var(--foco); outline: 3px solid var(--foco); outline-offset: 0; }
input[aria-invalid="true"] { border-color: var(--error); }

.btn, .btn-sec, .btn-link, .btn-tabla { font: inherit; cursor: pointer; }
.btn {
  display: block;
  width: 100%;
  min-height: 3.5rem;
  margin-top: 1.5rem;
  padding: 0.7rem 1rem;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.4rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--oro);
  border: 0;
  border-radius: 2px;
  transition: background 0.2s, transform 0.15s var(--ease);
}
.btn:hover { background: var(--oro-hover); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.55; cursor: progress; }

.btn-sec {
  min-height: 3rem;
  padding: 0.55rem 1.1rem;
  font-weight: 600;
  color: var(--ink);
  background: #fff;
  border: 1.5px solid var(--ink);
  border-radius: 2px;
  transition: background 0.2s;
}
.btn-sec:hover { background: #ffe9b0; }
.btn-sec:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-link {
  display: block;
  margin: 0.9rem auto 0;
  padding: 0.5rem;
  font-size: 0.95rem;
  color: var(--ink-soft);
  background: none;
  border: 0;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}
.btn-link:hover { color: var(--ink); }

.btn-tabla {
  padding: 0.35rem 0.7rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--error);
  background: #fff;
  border: 1.5px solid var(--error);
  border-radius: 2px;
  white-space: nowrap;
}
.btn-tabla:hover { background: #ffe1dc; }
.btn-tabla:disabled { opacity: 0.6; cursor: progress; }

.btn:focus-visible, .btn-sec:focus-visible, .btn-link:focus-visible, .btn-tabla:focus-visible,
.opcion input:focus-visible + span {
  outline: 3px solid var(--foco);
  outline-offset: 2px;
}

.ayuda { margin: 0.4rem 0 0; font-size: 0.9rem; color: var(--ink-soft); }
.ayuda[hidden] { display: none; }
.error { margin: 0.75rem 0 0; color: var(--error); font-weight: 600; }
.aviso { margin: 0 0 1.25rem; padding: 0.65rem 0.85rem; background: #ffe9b0; color: var(--ink); border-radius: 2px; font-size: 0.95rem; }

/* ---------- Layout partido: hero + panel ---------- */
.split { min-height: 100dvh; display: grid; grid-template-rows: auto 1fr; }

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 1.5rem 1.25rem 5.5rem;
  background: var(--noche);
}
.hero-in { position: relative; }
.marca {
  font-weight: 700;
  font-size: clamp(3.5rem, 17vw, 6.25rem);
  line-height: 0.86;
  letter-spacing: 0;
  text-transform: uppercase;
}
.marca span { display: block; }
.marca .acento { color: var(--oro); }
.lede { margin: 1rem 0 0; color: #e4e0d3; font-size: 1.125rem; max-width: 30ch; text-wrap: balance; }

/* Encabezado, titular y tablero de salidas del registro */
.hero-top {
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap;
  margin: 0 0 1rem;
  font-family: var(--display); font-weight: 600; font-size: 1.05rem; letter-spacing: 0.08em; text-transform: uppercase;
}
.hero-top b { font-weight: 600; color: var(--oro); }
.hero-sub { color: var(--oro); }
.titular { font-weight: 700; font-size: clamp(2.9rem, 14.5vw, 6rem); white-space: nowrap; line-height: 0.86; text-transform: uppercase; color: var(--oro); }
.tagline { margin: 1.25rem 0 0; max-width: 32ch; font-size: 1.125rem; color: #e4e0d3; text-wrap: balance; }
.sub { margin: -0.5rem 0 1.25rem; color: var(--ink-soft); }

.tablero {
  --cw: min(26px, calc((100vw - 2.5rem - 1.5rem - 4px - 38px) / 20));
  list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.55rem;
}
.salida { display: grid; grid-template-columns: auto auto; justify-content: space-between; row-gap: 2px; min-width: 0; }
.salida .a { grid-area: 1 / 1; }
.salida .c { grid-area: 1 / 2; justify-self: end; }
.salida .b { grid-area: 2 / 1 / 3 / 3; }
.celdas { display: flex; gap: 2px; }
.celda {
  position: relative;
  width: var(--cw); height: calc(var(--cw) * 1.55);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--display); font-weight: 600; font-size: calc(var(--cw) * 1.15);
  color: var(--crema); background: linear-gradient(to bottom, #262622 0 50%, var(--celda) 50% 100%); border-radius: 2px;
  font-variant-numeric: tabular-nums;
}
.celda::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--noche); } /* la bisagra de la letra */
.salida.activa .c .celda { color: var(--ink); background: linear-gradient(to bottom, #ffc23a 0 50%, var(--oro) 50% 100%); }
.salida.activa .c .celda::after { background: #b27a00; }

/* Marco del tablero, con su luz de estado y el sello de la fiesta */
.bisel { position: relative; margin-top: 1.5rem; padding: 0.7rem 0.75rem 0.85rem; background: #141411; border: 2px solid #2b2b26; border-radius: 6px; }
.bisel .tablero { margin-top: 0.65rem; }
.bisel-cab { display: flex; justify-content: space-between; margin: 0; font-family: var(--display); font-weight: 600; font-size: 0.95rem; letter-spacing: 0.14em; text-transform: uppercase; color: #cfcabb; }
.led { display: inline-block; width: 0.55rem; height: 0.55rem; margin-right: 0.55rem; border-radius: 50%; background: var(--oro); animation: parpadeo 1.6s steps(2, jump-none) infinite; }
@keyframes parpadeo { 50% { opacity: 0.25; } }
.sello { position: absolute; right: 0; bottom: -4.95rem; width: 5.75rem; height: 5.75rem; transform: rotate(-12deg); animation: gira 40s linear infinite; }
@keyframes gira { to { transform: rotate(348deg); } }
.sello-texto { font-family: var(--display); font-weight: 700; font-size: 11.5px; letter-spacing: 0.12em; fill: var(--ink); }
.sello-num { font-family: var(--display); font-weight: 700; font-size: 44px; fill: var(--ink); }
.hero .tagline { max-width: 24ch; }

/* Cinta que corre al pie del hero */
.cinta { position: absolute; z-index: 0; left: 0; right: 0; bottom: 0; overflow: hidden; background: var(--oro); color: var(--ink); }
.cinta-pista { display: flex; gap: 1.5rem; width: max-content; padding: 0.55rem 0; white-space: nowrap; font-family: var(--display); font-weight: 700; font-size: 1.05rem; letter-spacing: 0.12em; text-transform: uppercase; animation: corre 36s linear infinite; }
.cinta-pista b { color: var(--coral); }
@keyframes corre { to { transform: translateX(-50%); } }

.panel-form {
  position: relative;
  z-index: 1;
  padding: 1.75rem 1.25rem 3rem;
  background: var(--noche-2);
  color: var(--crema);
  animation: sube 0.6s var(--ease) both;
  /* sobre fondo oscuro: textos de apoyo, bordes, foco y errores se aclaran */
  --ink-soft: #cfcabb;
  --line: #3a3a32;
  --foco: #ffb81c;
  --error: #ff8a7a;
}
.panel-form .error { color: var(--error); }
.panel-form input:is(:not([type]), [type="text"], [type="tel"], [type="email"], [type="password"], [type="search"], [type="number"]),
.panel-form select { background: var(--crema); border-color: transparent; }
.panel-form input:hover, .panel-form select:hover { border-color: var(--oro); }
.panel-form input::placeholder { color: #66625a; }
.panel-form .btn-link:hover { color: var(--crema); }
.panel-form .btn-sec { color: var(--ink); }
.form-inner { width: 100%; max-width: 28rem; margin-inline: auto; }
.form-inner h2 { margin-bottom: 1.1rem; font-size: clamp(2.1rem, 8vw, 2.75rem); line-height: 0.95; text-transform: uppercase; color: var(--oro); }
.paso[hidden] { display: none; }
.paso:not([hidden]) { animation: entra 0.45s var(--ease) both; }

/* ---------- Progreso y pasos del registro ---------- */
.progreso { display: flex; gap: 0.4rem; margin: 0 0 1.5rem; padding: 0; list-style: none; }
.progreso li { flex: 1; border-top: 0.3rem solid #3a3a32; padding-top: 0.35rem; transition: border-color 0.3s, color 0.3s; font-family: var(--display); font-weight: 600; font-size: 0.95rem; letter-spacing: 0.12em; text-transform: uppercase; color: #8a857a; }
.progreso[data-paso="1"] li:nth-child(-n + 1),
.progreso[data-paso="2"] li:nth-child(-n + 2),
.progreso[data-paso="3"] li { border-color: var(--oro); color: var(--crema); }

#dni { font-variant-numeric: tabular-nums; letter-spacing: 0.04em; }

.opciones { display: grid; gap: 0.5rem; }
.opcion { margin: 0; position: relative; font-weight: 500; }
.opcion input { position: absolute; opacity: 0; inset: 0; }
.opcion span {
  display: flex;
  align-items: center;
  min-height: 3.25rem;
  padding: 0.75rem 0.9rem 0.75rem 2.75rem;
  position: relative;
  color: var(--crema);
  background: var(--celda);
  border: 2px solid transparent;
  border-radius: 2px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}
.opcion span::before {
  content: "";
  position: absolute;
  left: 0.95rem;
  width: 1.15rem;
  height: 1.15rem;
  border: 2px solid #8a857a;
  border-radius: 50%;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.opcion:hover span { border-color: #5b584f; }
.opcion input:checked + span { color: var(--ink); background: var(--oro); border-color: var(--oro); }
.opcion input:checked + span::before { border-color: var(--ink); background: var(--ink); box-shadow: inset 0 0 0 3px var(--oro); }

.opcion.casilla span::before { border-radius: 2px; }
.opcion.casilla input:checked + span::before { box-shadow: none; }
.opcion.casilla span::after {
  content: "";
  position: absolute;
  left: 1.34rem;
  top: calc(50% - 0.32rem);
  width: 0.32rem;
  height: 0.6rem;
  border: solid var(--oro);
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg) scale(0);
  transition: transform 0.15s var(--ease);
}
.opcion.casilla input:checked + span::after { transform: rotate(45deg) scale(1); }

.opcion.compromiso { margin-top: 1.6rem; font-weight: 600; }
.opcion.compromiso span { padding-block: 0.9rem; line-height: 1.35; }
#btn-confirmar:disabled { cursor: not-allowed; }

.enlace-fotos a { color: var(--oro); font-weight: 700; text-underline-offset: 0.2em; }
.enlace-fotos a:focus-visible { outline: 3px solid var(--foco); outline-offset: 2px; }

/* Pasaje de la pantalla final */
.pase { position: relative; margin: 1.5rem 0 0.5rem; max-width: 24rem; color: var(--ink); filter: drop-shadow(0 14px 22px rgba(0, 0, 0, 0.45)); animation: sube 0.7s var(--ease) 0.2s both; }
.pase-cuerpo { position: relative; padding: 1.1rem 1.25rem 1.25rem; background: var(--crema); border-radius: 12px 12px 0 0; }
.pase-sello { position: absolute; right: 1rem; top: 1rem; margin: 0 !important; padding: 0.2rem 0.6rem; border: 3px solid #d6322a; border-radius: 4px; color: #d6322a; font-family: var(--display); font-weight: 700; font-size: 1.15rem; letter-spacing: 0.12em; text-transform: uppercase; transform: rotate(-9deg); animation: sella 0.45s var(--ease) 0.7s both; }
@keyframes sella { from { opacity: 0; transform: rotate(-9deg) scale(2.2); } to { opacity: 0.9; transform: rotate(-9deg) scale(1); } }
.pase-et { margin: 0 !important; font-family: var(--display); font-weight: 600; font-size: 0.95rem; letter-spacing: 0.16em; text-transform: uppercase; color: #6b675c; }
.pase-nombre { margin: 0.1rem 0 0.75rem !important; font-family: var(--display); font-weight: 700; font-size: 2rem; line-height: 1; text-transform: uppercase; }
.pase-datos { display: grid; grid-template-columns: auto 1fr; gap: 1.5rem; margin: 0; }
.pase-datos dt { font-family: var(--display); font-weight: 600; font-size: 0.85rem; letter-spacing: 0.14em; text-transform: uppercase; color: #6b675c; }
.pase-datos dd { margin: 0; font-weight: 600; line-height: 1.25; }
.pase-talon { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.25rem; background: var(--oro); border-radius: 0 0 12px 12px; }
.pase-talon::before { content: ""; position: absolute; left: 1.1rem; right: 1.1rem; top: 0; border-top: 2px dashed rgba(13, 13, 11, 0.45); }
.pase-talon::after { content: ""; position: absolute; left: -0.6rem; right: -0.6rem; top: -0.6rem; height: 1.2rem; background:
  radial-gradient(circle 0.6rem at 0 50%, var(--noche-2) 98%, #0000) left / 51% 100% no-repeat,
  radial-gradient(circle 0.6rem at 100% 50%, var(--noche-2) 98%, #0000) right / 51% 100% no-repeat; }
.pase-marca { margin: 0 !important; font-family: var(--display); font-weight: 700; font-size: 1.2rem; letter-spacing: 0.04em; text-transform: uppercase; }
.pase-marca b { font-weight: 700; }
.pase-barras { width: 7rem; height: 2.4rem; fill: var(--ink); }
.pie { margin: 2rem 0 0; font-size: 0.875rem; color: #a8a396; max-width: 34ch; }
#paso-listo p { margin: 0.75rem 0 0; max-width: 36ch; }

@keyframes entra { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes sube { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

/* ---------- Escritorio: mitad hero, mitad panel, ocupa todo el alto ---------- */
@media (min-width: 60rem) {
  .split { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); grid-template-rows: 1fr; align-items: start; }
  .hero { position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; justify-content: center; padding: 3rem clamp(3rem, 6vw, 6rem); }
  .marca { font-size: clamp(5rem, 10vw, 8rem); }
  .lede { font-size: 1.375rem; margin-top: 1.5rem; }
  .hero-top { font-size: 1.25rem; margin-bottom: 1.5rem; }
  .titular { font-size: clamp(3.5rem, 6.4vw, 7rem); }
  .tagline { font-size: 1.375rem; }
  .tablero { --cw: min(26px, calc((55vw - 2 * clamp(3rem, 6vw, 6rem) - 38px - 1.5rem) / 20)); }
  .bisel { margin-top: 2rem; }
  .sello { width: 7.5rem; height: 7.5rem; bottom: -6.7rem; right: 0.5rem; }
  .cinta-pista { font-size: 1.2rem; padding: 0.7rem 0; }
  .hero { padding-bottom: 5rem; }
  .panel-form { display: flex; flex-direction: column; justify-content: center; min-height: 100dvh; margin: 0; padding: 4rem clamp(2.5rem, 5vw, 5rem); animation-name: entra; }
}

@media (prefers-reduced-motion: reduce) {
  .sello, .cinta-pista, .led, .pase, .pase-sello { animation: none; }
  .panel-form, .paso:not([hidden]) { animation: none; }
  * { transition: none !important; }
}

/* Dónde, cuándo y hasta cuándo se puede confirmar */
.donde { margin: 1rem 0 0; max-width: 46ch; font-size: 1rem; line-height: 1.45; color: #e4e0d3; }
.donde b { color: var(--oro); font-weight: 600; }
.limite { margin: -0.25rem 0 1.25rem; padding: 0.5rem 0.8rem; font-size: 0.95rem; color: var(--ink); background: var(--oro); border-radius: 2px; }
.limite b { font-family: var(--display); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }

@media (min-width: 60rem) and (max-height: 960px) {
  .hero { padding-top: 2rem; padding-bottom: 4.5rem; }
  .hero-top { margin-bottom: 0.75rem; }
  .titular { font-size: min(clamp(3.5rem, 6.4vw, 7rem), 9.5vh); }
  .bisel { margin-top: 1.25rem; }
  .tablero { margin-top: 0.5rem; gap: 0.4rem; }
  .tagline { margin-top: 1rem; font-size: 1.2rem; }
  .donde { margin-top: 0.5rem; }
}
