/* ==========================================================================
   Correcciones de la auditoría UX/UI del 27/10 (ver AUDITORIA-UX-UI.md, Etapa 18)
   Se carga última: solo ajusta, no redefine el sistema.
   ========================================================================== */

/* A-01 · «Pausar movimiento» vuelve al header (WCAG 2.2.2).
   La lógica ya estaba en app.js; faltaba el botón desde que el video del hero
   pasó a ser la caminata. */
.site-header .motion-toggle {
  display: inline-flex; align-items: center; gap: 8px; margin: 0;
  min-height: 44px; padding: 0 16px 0 12px; border: 0; border-radius: 999px;
  background: rgb(var(--cream-rgb) / .07); color: var(--cream);
  font: 400 13px/1 var(--heading); letter-spacing: 0; white-space: nowrap; cursor: pointer;
  transition: background-color .2s ease;
}
.site-header .motion-toggle:hover { background: rgb(var(--cream-rgb) / .14); }
.site-header .motion-toggle[aria-pressed="true"] { background: var(--cream); color: var(--black); }
.site-header .motion-toggle .ui-icon { width: 18px; height: 18px; flex: none; }
.site-header .motion-toggle::after { content: none; }
@media (max-width: 760px) {
  /* En celular, solo el ícono: el nombre sigue disponible para lectores de pantalla */
  .site-header .motion-toggle {
    position: absolute; top: 50%; translate: 0 -50%; right: calc(var(--gutter) + 112px);
    width: 44px; min-width: 44px; height: 44px; padding: 0; justify-content: center; font-size: 13px;
  }
  .site-header .motion-toggle span {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
  }
}

/* A-02 · Hero: indicador de scroll. Antes no había nada que invitara a bajar
   y los botones no aparecen hasta que termina la caminata. */
.hero.hero-scroll .hero-cue { flex-direction: column; gap: 10px; }
.walk-cue {
  display: inline-flex; align-items: center; gap: 8px;
  font: 400 13px/1 var(--heading); color: var(--cream);
  opacity: calc(var(--cue, 1) * .85); translate: 0 calc((1 - var(--cue, 1)) * 8px);
  transition: opacity .25s linear;
}
.walk-cue .ui-icon { width: 16px; height: 16px; rotate: 180deg; animation: walk-cue-bob 2.4s ease-in-out infinite; }
@keyframes walk-cue-bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 4px; } }
html.paused-user .walk-cue { display: none; }
@media (prefers-reduced-motion: reduce) { .walk-cue .ui-icon { animation: none; } }

/* A-03 · Botón del ojo (Tu espacio): invisible = fuera del foco y de los clics.
   En celular baja a la esquina para no tapar la ayuda del campo ni el cierre. */
.words-toggle:not(.is-visible) { visibility: hidden; transition: opacity .3s ease, translate .3s ease, visibility 0s linear .3s; }
.words-toggle.is-visible { visibility: visible; }
@media (max-width: 760px) {
  .words-toggle { top: auto; bottom: max(16px, env(safe-area-inset-bottom)); translate: 0 12px; }
  .words-toggle.is-visible { translate: 0 0; }
}

/* A-04 · Foco visible en el campo de la frase (antes solo cambiaba el fondo un 10 %) */
.release-form:has(input:focus-visible) { outline: 2px solid var(--cream); outline-offset: 4px; }

/* A-05 · Foco visible en el wordmark del footer (tenía outline: none) */
.site-footer .footer-wordmark:focus-visible { outline: 3px solid var(--cream); outline-offset: 8px; border-radius: 12px; }
/* Tablet apaisada / notebook chica: con los cinco links no entra el rótulo, queda el ícono */
@media (min-width: 761px) and (max-width: 1260px) {
  .site-header .motion-toggle { width: 44px; min-width: 44px; padding: 0; justify-content: center; }
  .site-header .motion-toggle span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
/* Con el botón sumado, el logo absoluto quedaba debajo del menú en tablet: vuelve al flujo */
@media (min-width: 761px) and (max-width: 1260px) {
  .site-header { justify-content: space-between; gap: 16px; }
  .site-header .brand { position: static; margin-right: 0; }
  .site-header nav { gap: clamp(10px, 1.8vw, 22px); }
  .site-header nav a:last-child { margin-left: 0; }
}

/* ==========================================================================
   Footer · hover del nombre (Etapa 20)
   La trama vive en el propio nombre (background-clip: text), así el contorno es exacto.
   Al pasar el mouse, el crema se funde al amarillo y aparecen los íconos al 20 %:
   se leen como textura, sin competir con «Luasó». Se desliza muy despacio; sin saltos
   ni movimiento extra. En pantallas táctiles se enciende sola una vez al llegar al footer.
   ========================================================================== */
.site-footer .footer-wordmark .wm-trama { display: none; }
.site-footer .footer-wordmark {
  --wm-cell: .3em;
  padding: .26em .04em .14em; margin: -.26em -.04em 0;    /* lugar para el acento de la ó */
  background:
    url(assets/trama-iconos-suave.webp) var(--wm-x, 0px) var(--wm-y, 0px) / var(--wm-cell) var(--wm-cell) repeat,
    linear-gradient(var(--yellow), var(--yellow));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: var(--cream);
  transition: -webkit-text-fill-color .7s cubic-bezier(.25, .1, .25, 1);
}
.site-footer .footer-wordmark:is(:hover, :focus-visible),
.site-footer .footer-wordmark.is-lit { -webkit-text-fill-color: transparent; }
@media (prefers-reduced-motion: reduce) { .site-footer .footer-wordmark { transition-duration: .01s; } }

/* ==========================================================================
   De este lado del escenario · portadas de los videos (Etapa 20, diseños del equipo)
   Las portadas ya traen la trama y su color: solo un degradé negro arriba y abajo
   para que se lean el rótulo y el texto.
   ========================================================================== */
.encounters .stage { isolation: isolate; }
.encounters .stage:has(.stage-cover) { background: var(--black); }
.encounters .stage-cover {
  position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 45%;
}
#panel-detras .stage-cover { object-position: 45% 50%; }
.encounters .stage:has(.stage-cover)::before {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgb(var(--black-rgb) / .5) 0%, transparent 24%, transparent 44%, rgb(var(--black-rgb) / .88) 100%);
}
.encounters .stage .play-button { box-shadow: 0 10px 30px rgb(var(--black-rgb) / .45); }
.encounters .stage-bottom .tag.subtle { background: rgb(var(--black-rgb) / .55); backdrop-filter: blur(6px); }

/* Scroll con peso (scroll-suave.js): Lenis mueve la página cuadro a cuadro, así que el
   scroll suave nativo tiene que estar apagado mientras está activo. */
html.lenis, html.lenis body { height: auto; }
html.lenis { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: clip; }
.lenis.lenis-smooth iframe { pointer-events: none; }
/* Encuadre de las portadas: que el botón de play no tape a Luasó */
#panel-vivo .stage-cover { object-position: 50% 68%; }
@media (max-width: 760px) { #panel-vivo .stage-cover { object-position: 18% 50%; } #panel-detras .stage-cover { object-position: 30% 50%; } }

/* ==========================================================================
   Gira «Punto de fuga» (Etapa 20)
   Botón del header: la píldora del sistema con el degradé amarillo → naranja del sol
   de la gira. Abre el diálogo con fechas, criterios y entradas.
   ========================================================================== */
.site-header .tour-pill {
  position: relative; display: inline-flex; align-items: center; gap: 8px; margin: 0;
  min-height: 44px; padding: 0 18px 0 12px; border: 0; border-radius: 999px; cursor: pointer;
  background: linear-gradient(100deg, var(--yellow) 0%, var(--orange) 100%);
  background-size: 160% 100%; background-position: 0% 50%;
  color: #000; font: 400 14px/1 var(--heading); white-space: nowrap;
  box-shadow: 0 0 0 0 rgb(var(--orange-rgb) / .55), 0 8px 24px rgb(var(--orange-rgb) / .28);
  transition: background-position .5s ease, translate .25s ease, box-shadow .25s ease;
  animation: tour-glow 3.2s ease-in-out infinite;
}
.site-header .tour-pill:hover { background-position: 100% 50%; translate: 0 -1px; }
.site-header .tour-pill:focus-visible { outline: 3px solid var(--cream); outline-offset: 3px; }
.tour-pill-sun {                            /* el sol de la gira, con su órbita punteada */
  position: relative; width: 16px; height: 16px; border-radius: 50%; flex: none;
  background: radial-gradient(circle at 35% 35%, var(--yellow), var(--red) 85%);
}
.tour-pill-sun::after {
  content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 1.5px dashed rgb(0 0 0 / .55);
  animation: tour-orbit 9s linear infinite;
}
@keyframes tour-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgb(var(--orange-rgb) / .45), 0 8px 24px rgb(var(--orange-rgb) / .25); }
  50% { box-shadow: 0 0 0 7px rgb(var(--orange-rgb) / 0), 0 8px 28px rgb(var(--orange-rgb) / .4); }
}
@keyframes tour-orbit { to { rotate: 1turn; } }
html.paused-user .site-header .tour-pill, html.paused-user .tour-pill-sun::after { animation: none; }
@media (prefers-reduced-motion: reduce) { .site-header .tour-pill, .tour-pill-sun::after { animation: none; } }
@media (max-width: 760px) {
  .site-header .tour-pill {
    position: absolute; top: 50%; translate: 0 -50%; right: calc(var(--gutter) + 166px);
    min-height: 40px; padding: 0 12px 0 10px; font-size: 12px; gap: 6px;
  }
  .site-header .tour-pill:hover { translate: 0 -50%; }
  .tour-pill-sun { width: 12px; height: 12px; }
}
@media (max-width: 400px) {   /* teléfonos angostos: solo el sol, el nombre queda para lectores de pantalla */
  .site-header .tour-pill { width: 40px; padding: 0; justify-content: center; }
  .site-header .tour-pill .tour-pill-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .tour-pill-sun { width: 16px; height: 16px; }
}
@media (min-width: 761px) and (max-width: 1260px) {
  .site-header .tour-pill { padding: 0 14px 0 10px; font-size: 13px; }
}

/* Diálogo de la gira */
.next-show strong { color: var(--cream); font-weight: 400; font-family: var(--heading); }
dialog.gira-dialog { width: min(920px, calc(100% - 32px)); padding: 0; border-radius: 28px; overflow: auto; }
.gira-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
.gira-poster { margin: 0; background: var(--red); }
.gira-poster img { display: block; width: 100%; height: 100%; object-fit: cover; }
.gira-info { padding: 44px 40px 36px; }
.gira-dialog .eyebrow { color: var(--orange); }
.gira-dialog h2 { margin: 8px 0 12px; font-family: var(--heading); font-weight: 400; font-size: clamp(36px, 4.4vw, 52px); line-height: 1; color: var(--cream); }
.gira-dialog .gira-lede { margin: 0 0 22px; font-size: 16px; line-height: 1.55; color: var(--muted); }
.gira-sub { margin: 22px 0 6px; font: 400 15px/1.3 var(--heading); color: var(--cream); }
.gira-stops { list-style: none; margin: 0; padding: 0; }
.gira-stops li {
  position: relative; display: grid; grid-template-columns: 1fr auto; column-gap: 14px; align-items: center;
  padding: 10px 0 10px 28px;
}
.gira-stops li::before {
  content: ''; position: absolute; left: 3px; top: 50%; translate: 0 -50%; width: 10px; height: 10px; border-radius: 50%; background: var(--cream);
}
.gira-stops li:last-child::before { left: 0; width: 16px; height: 16px; background: radial-gradient(circle at 35% 35%, var(--yellow), var(--red) 85%); }
.gira-stops li:not(:last-child)::after {   /* tramo punteado de la ruta */
  content: ''; position: absolute; left: 7px; top: calc(50% + 9px); height: calc(100% - 18px);
  border-left: 2px dashed rgb(var(--cream-rgb) / .4);
}
.stop-city { font: 400 18px/1.2 var(--heading); color: var(--cream); }
.stop-region { grid-column: 1; font-size: 14px; color: var(--faint); }
.stop-date { grid-column: 2; grid-row: 1 / span 2; font-size: 13px; color: var(--cream); padding: 7px 12px; border-radius: 999px; background: rgb(var(--cream-rgb) / .08); white-space: nowrap; }
.gira-tips { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.gira-tips li { font-size: 14px; line-height: 1.3; color: var(--cream); padding: 8px 13px; border-radius: 999px; border: 1px solid rgb(var(--cream-rgb) / .22); }
.gira-dialog .gira-cta {
  display: flex; width: 100%; margin-top: 26px; min-height: 52px; font: 400 17px/1 var(--heading);
  background: linear-gradient(100deg, var(--yellow), var(--orange)); color: #000; border: 0;
}
.gira-dialog .gira-cta:hover { filter: brightness(1.06); }
.gira-dialog .dialog-close { z-index: 2; background: rgb(var(--black-rgb) / .6); }
@media (max-width: 760px) {
  .gira-grid { grid-template-columns: 1fr; }
  .gira-poster { aspect-ratio: 16 / 10; }
  .gira-poster img { object-position: 50% 42%; }
  .gira-info { padding: 26px 22px 24px; }
}

/* Header con el botón de la gira: logo, menú, gira y pausa, en fila y sin pisarse */
@media (min-width: 761px) {
  .site-header { justify-content: space-between; gap: clamp(10px, 1.4vw, 20px); }
  .site-header .brand { position: static; margin-right: 0; }
  .site-header nav { gap: clamp(2px, 1.2vw, 22px); }
  .site-header nav a:last-child { margin-left: 0; }
}
@media (min-width: 761px) and (max-width: 1100px) {
  .site-header nav a { padding-inline: 9px; }
  .site-header .brand { font-size: 28px; }
}
@media (max-width: 760px) {
  /* el menú queda como ícono (con su nombre para lectores de pantalla) y le deja lugar a la gira */
  .site-header .menu-toggle { width: 44px; min-width: 44px; padding: 0; justify-content: center; gap: 0; }
  .site-header .menu-toggle .menu-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .site-header .motion-toggle { right: calc(var(--gutter) + 52px); }
  .site-header .tour-pill { right: calc(var(--gutter) + 104px); }
}
@media (max-width: 400px) {
  .site-header .tour-pill { width: auto; padding: 0 11px 0 9px; justify-content: flex-start; }
  .site-header .tour-pill .tour-pill-text { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
  .tour-pill-sun { width: 12px; height: 12px; }
}
@media (max-width: 352px) {   /* solo los teléfonos más angostos: el sol solo */
  .site-header .tour-pill { width: 40px; padding: 0; justify-content: center; }
  .site-header .tour-pill .tour-pill-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
}
@media (max-width: 400px) { .site-header .brand { font-size: 27px; } .site-header .tour-pill { font-size: 11.5px; } }
@media (min-width: 761px) { .site-header nav a { white-space: nowrap; } }
@media (min-width: 761px) and (max-width: 900px) {
  .site-header nav a { padding-inline: 7px; font-size: 11.5px; }
  .site-header .tour-pill { padding: 0 12px 0 9px; font-size: 12px; }
  .site-header { gap: 8px; }
}
/* Mínimos del sistema: texto de 12 px y zonas táctiles de 44 px */
@media (max-width: 760px) { .site-header .tour-pill { min-height: 44px; font-size: 12px; } }
@media (max-width: 400px) { .site-header .tour-pill { font-size: 12px; padding: 0 10px 0 8px; gap: 5px; } }
@media (min-width: 761px) and (max-width: 900px) {
  .site-header nav a { font-size: 12px; padding-inline: 6px; min-height: 44px; display: inline-flex; align-items: center; }
  .site-header nav { gap: 0; }
}
