/* ------------------------------------------------------------------
   yohual · recolector de conversaciones
   Noche, una trayectoria y poco más. Un solo momento memorable:
   la conversación que aparece como constelación.
------------------------------------------------------------------- */

@font-face { font-family: "Spectral"; font-weight: 300; font-style: normal; font-display: swap;
  src: url("fonts/spectral-latin-300-normal.woff2") format("woff2"); }
@font-face { font-family: "Spectral"; font-weight: 400; font-style: normal; font-display: swap;
  src: url("fonts/spectral-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Spectral"; font-weight: 400; font-style: italic; font-display: swap;
  src: url("fonts/spectral-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: "Spectral"; font-weight: 500; font-style: normal; font-display: swap;
  src: url("fonts/spectral-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Hanken Grotesk"; font-weight: 400; font-style: normal; font-display: swap;
  src: url("fonts/hanken-grotesk-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Hanken Grotesk"; font-weight: 500; font-style: normal; font-display: swap;
  src: url("fonts/hanken-grotesk-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Hanken Grotesk"; font-weight: 600; font-style: normal; font-display: swap;
  src: url("fonts/hanken-grotesk-latin-600-normal.woff2") format("woff2"); }

:root {
  --noche: #0b1020;
  --niebla: #98a3c7;
  --luna: #eef0f8;
  --texto-suave: #c9cfe6;
  --linea: rgba(238, 240, 248, 0.16);
  --persona: #f0b574;       /* turnos de la persona */
  --asistente: #7db6e3;     /* turnos del asistente */
  --foco: #bfd7ff;
  --error: #ff9c8f;

  --serif: "Spectral", Georgia, "Times New Roman", serif;
  --sans: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radio: 6px;
  --columna: 36rem;
}

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

[hidden] { display: none !important; }

html { color-scheme: dark; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--noche);
  color: var(--luna);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

#cielo {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.aviso-demo,
.barra,
.escenario,
.trayecto { position: relative; z-index: 1; }

a { color: inherit; }

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

/* ---------- Barra superior ---------- */

.aviso-demo {
  margin: 0;
  padding: 0.45rem 1rem;
  background: var(--persona);
  color: var(--noche);
  font-family: var(--sans);
  font-size: 0.8125rem;
  font-weight: 500;
  text-align: center;
}

.barra {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 1.25rem clamp(1.25rem, 4vw, 3rem);
}

.marca {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.5rem;
  text-decoration: none;
  letter-spacing: 0.01em;
}

.volver {
  font-family: var(--sans);
  font-size: 0.875rem;
  color: var(--niebla);
  text-underline-offset: 4px;
}
.volver:hover { color: var(--luna); }

/* ---------- Escenario ---------- */

.escenario {
  flex: 1;
  width: min(100% - 2.5rem, 46rem);
  margin-inline: auto;
  padding-block: clamp(1.5rem, 8vh, 5rem) 3rem;
}

.paso > * { max-width: var(--columna); }
.paso > .sitio,
.paso > .servicios { max-width: none; }

.paso:not([hidden]) { animation: entra 0.35s ease-out; }
@keyframes entra { from { opacity: 0; } to { opacity: 1; } }

.titulo {
  margin: 0 0 1.25rem;
  font-weight: 300;
  font-size: clamp(2rem, 1.3rem + 3vw, 3.1rem);
  line-height: 1.12;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
.titulo--medio { font-size: clamp(1.7rem, 1.2rem + 2vw, 2.4rem); }
.titulo:focus { outline: none; }

.subtitulo {
  margin: 2.75rem 0 0.5rem;
  font-weight: 400;
  font-style: italic;
  font-size: 1.25rem;
}

.texto {
  margin: 0 0 2rem;
  color: var(--texto-suave);
}
.texto strong { color: var(--luna); font-weight: 500; overflow-wrap: anywhere; }

/* ---------- Formularios ---------- */

.formulario { display: grid; gap: 0.5rem; }

.campo {
  font-family: var(--sans);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--niebla);
}

.entrada {
  width: 100%;
  padding: 0.5rem 0;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--niebla);
  border-radius: 0;
  color: var(--luna);
  font-family: var(--serif);
  font-size: 1.4rem;
  line-height: 1.3;
}
.entrada::placeholder { color: rgba(152, 163, 199, 0.55); }
.entrada:focus-visible {
  outline: 2px solid var(--foco);
  outline-offset: 4px;
  border-bottom-color: var(--luna);
}
.entrada--codigo {
  font-size: 2rem;
  letter-spacing: 0.35em;
  font-variant-numeric: tabular-nums;
}

.ayuda,
.error {
  margin: 0.25rem 0 0;
  font-family: var(--sans);
  font-size: 0.875rem;
}
.ayuda { color: var(--niebla); }
.ayuda--ok { color: var(--asistente); }
.error { color: var(--error); font-size: 0.9375rem; }
.error--info { color: var(--texto-suave); }

.acciones {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.5rem;
  margin-top: 1.5rem;
}

.boton {
  display: inline-block;
  padding: 0.8rem 1.5rem;
  background: var(--luna);
  color: var(--noche);
  border: 0;
  border-radius: var(--radio);
  font-family: var(--sans);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s;
}
.boton:hover { background: #ffffff; }
.boton:disabled { opacity: 0.4; cursor: not-allowed; }

.enlace-boton {
  padding: 0.5rem 0;
  background: none;
  border: 0;
  color: var(--niebla);
  font-family: var(--sans);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}
.enlace-boton:hover { color: var(--luna); }
.enlace-boton:disabled { opacity: 0.5; cursor: default; text-decoration: none; }

.casilla {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-top: 0.5rem;
  cursor: pointer;
}
.casilla input {
  flex: none;
  width: 1.25rem;
  height: 1.25rem;
  margin: 0.3rem 0 0;
  accent-color: var(--luna);
}

/* ---------- Consentimiento e instrucciones ---------- */

.consentimiento { margin: 0 0 1.75rem; }
.consentimiento > div {
  display: grid;
  gap: 0.25rem 1.5rem;
  padding: 0.9rem 0;
  border-top: 1px solid var(--linea);
}
.consentimiento > div:last-child { border-bottom: 1px solid var(--linea); }
.consentimiento dt {
  font-family: var(--sans);
  font-size: 0.875rem;
  font-weight: 600;
}
.consentimiento dd {
  margin: 0;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--texto-suave);
}
@media (min-width: 40rem) {
  .consentimiento > div { grid-template-columns: 9rem 1fr; }
}

.instrucciones {
  margin: 0 0 1.75rem;
  padding-left: 1.25rem;
  color: var(--texto-suave);
}
.instrucciones li { margin: 0.35rem 0; padding-left: 0.25rem; }
.instrucciones li::marker { color: var(--niebla); }

/* ---------- Extracción ---------- */

.estado {
  min-height: 1.6em;
  margin: 0.75rem 0 0;
  font-family: var(--sans);
  font-size: 0.9375rem;
  color: var(--niebla);
  font-variant-numeric: tabular-nums;
}

/* ---------- Trayectoria (constelación) ---------- */

.trayectoria { margin: 1.5rem 0 0.25rem; }
.trayectoria svg { display: block; width: 100%; height: auto; overflow: visible; }

.camino {
  fill: none;
  stroke: var(--linea);
  stroke-width: 1.25;
  stroke-dasharray: 2 7;
  stroke-linecap: round;
}
.camino--trazo {
  stroke: rgba(238, 240, 248, 0.5);
  stroke-width: 1.5;
  stroke-dasharray: var(--largo, 1000);
  stroke-dashoffset: var(--largo, 1000);
}
.trayectoria.revelada .camino--trazo {
  stroke-dashoffset: 0;
  transition: stroke-dashoffset var(--dur-trazo, 2s) linear;
}

.pulso { fill: var(--luna); filter: drop-shadow(0 0 6px rgba(238, 240, 248, 0.8)); }

.estrella {
  opacity: 0;
  transform: scale(0.3);
  transform-box: fill-box;
  transform-origin: center;
  transition: opacity 0.4s ease-out, transform 0.4s ease-out;
}
.estrella.encendida { opacity: 1; transform: scale(1); }
.estrella--persona { fill: var(--persona); filter: drop-shadow(0 0 5px rgba(240, 181, 116, 0.7)); }
.estrella--asistente { fill: var(--asistente); filter: drop-shadow(0 0 5px rgba(125, 182, 227, 0.7)); }

.leyenda {
  display: flex;
  gap: 1.25rem;
  margin-top: 0.5rem;
  font-family: var(--sans);
  font-size: 0.8125rem;
  color: var(--niebla);
}
.leyenda__item { display: inline-flex; align-items: center; gap: 0.4rem; }
.punto { display: inline-block; width: 0.55rem; height: 0.55rem; border-radius: 50%; }
.punto--persona { background: var(--persona); }
.punto--asistente { background: var(--asistente); }

/* ---------- Invitaciones ---------- */

.servicios { list-style: none; margin: 0 0 1rem; padding: 0; }
.servicio {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.15rem 1.5rem;
  padding: 1rem 0;
  border-top: 1px solid var(--linea);
  color: inherit;
  text-decoration: none;
}
.servicio:last-child { border-bottom: 1px solid var(--linea); }
.servicio__nombre { font-size: 1.2rem; }
.servicio__desc { grid-column: 1; font-size: 0.975rem; color: var(--texto-suave); }
.servicio__estado {
  grid-column: 2;
  grid-row: 1;
  align-self: center;
  font-family: var(--sans);
  font-size: 0.875rem;
  color: var(--niebla);
}
a.servicio:hover .servicio__nombre { text-decoration: underline; text-underline-offset: 5px; }
a.servicio:hover .servicio__estado { color: var(--luna); }

/* ---------- Progreso ---------- */

.trayecto {
  width: min(100% - 2.5rem, 46rem);
  margin: 0 auto;
  padding: 0.5rem 0 1.75rem;
}
.trayecto ol {
  display: flex;
  align-items: center;
  max-width: var(--columna);
  margin: 0;
  padding: 0;
  list-style: none;
}
.trayecto li { display: flex; align-items: center; }
.trayecto li + li { flex: 1; }
.trayecto li + li::before {
  content: "";
  flex: 1;
  min-width: 0.75rem;
  height: 1px;
  margin-inline: 0.6rem;
  background: var(--linea);
}
.nodo {
  flex: none;
  width: 0.5625rem;
  height: 0.5625rem;
  border: 1px solid var(--niebla);
  border-radius: 50%;
}
.nodo-texto {
  margin-left: 0.5rem;
  font-family: var(--sans);
  font-size: 0.8125rem;
  color: var(--niebla);
  white-space: nowrap;
}
.trayecto li.hecho::before,
.trayecto li[aria-current="step"]::before { background: var(--niebla); }
.trayecto li.hecho .nodo { background: var(--niebla); }
.trayecto li[aria-current="step"] .nodo {
  background: var(--luna);
  border-color: var(--luna);
  box-shadow: 0 0 0 4px rgba(238, 240, 248, 0.15);
}
.trayecto li[aria-current="step"] .nodo-texto { color: var(--luna); }

@media (max-width: 36rem) {
  .nodo-texto { display: none; }
  .trayecto li[aria-current="step"] .nodo-texto { display: inline; }
}

/* ---------- Movimiento reducido ---------- */

@media (prefers-reduced-motion: reduce) {
  .paso:not([hidden]) { animation: none; }
  .estrella, .boton, .trayectoria.revelada .camino--trazo { transition: none; }
}
