/* =====================================================================
   TAKARA KAI — ANIME IMMERSIVE EXPERIENCE
   css/experiencia.css · v1.2.0
   Capa visual nueva. Se carga DESPUÉS de css/style.css y no modifica
   ese archivo: si se quita esta hoja (y js/experiencia.js), la página
   vuelve a verse como antes.
   ===================================================================== */

:root {
  --tk-noche: #101018;
  --tk-azul: #19182A;
  --tk-dorado: #F6C34A;
  --tk-rojo: #B80032;
  --tk-blanco: #F5F2EC;
  --tk-sakura: #F7B6C8;
  --tk-curva: cubic-bezier(0.65, 0, 0.35, 1);
}

html {
  scroll-behavior: smooth;
}

/* El fondo pasa a una capa fija: misma imagen y degradado de style.css,
   sin repintar la pantalla en cada cuadro (antes se animaba
   background-position) y con fondo fijo también en iPhone. */
body {
  overflow-x: hidden;            /* nada decorativo puede crear desplazamiento lateral */
  background: #0d0d1a;
  animation: none;
}

body::before {
  content: "";
  position: fixed;
  left: 0;
  right: 0;
  top: -4vh;
  bottom: -4vh;
  z-index: -4;                   /* capas del fondo: ver "Fondos detrás del reflejo" */
  pointer-events: none;
  background-image: var(--bg-imagen), linear-gradient(160deg, #1a1a2e, #0d0d1a 60%, #1a1a2e);
  background-size: cover, cover;
  background-position: center, center;
  background-repeat: no-repeat, no-repeat;
}

/* Texto solo para lectores de pantalla */
.tk-sr {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------------------------------------------------------------------
   Ambiente: luces, pétalos de sakura y partículas doradas
   (detrás del contenido, sin clics). Todo se mueve con transform y
   opacity: lo anima la GPU sin trabajo de JavaScript en cada cuadro.
   --------------------------------------------------------------------- */
.tk-luces,
.tk-ambiente {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -3;
  pointer-events: none;
  overflow: hidden;
}

.tk-ambiente i {
  position: absolute;
  top: 0;
  left: var(--x);
  display: block;
  width: var(--s);
  height: var(--s);
}

/* pétalo: cae meciéndose de lado a lado mientras gira */
.tk-ambiente .tk-p {
  border-radius: 100% 0 100% 0;
  background: linear-gradient(135deg, #ffe3ec, var(--tk-sakura) 60%, #e98aa6);
  opacity: var(--o);
  animation: tk-caer var(--t) ease-in-out var(--d) infinite;
}

/* chispa dorada que titila y sube un poco */
.tk-ambiente .tk-c {
  top: var(--y);
  border-radius: 50%;
  background: var(--tk-dorado);
  box-shadow: 0 0 6px 1px rgba(246, 195, 74, 0.7);
  opacity: 0;
  animation: tk-titilar var(--t) ease-in-out var(--d) infinite;
}

@keyframes tk-caer {
  0% { transform: translate3d(0, -6vh, 0) rotate(0deg); }
  25% { transform: translate3d(calc(var(--dx) * 0.25 + 16px), 22vh, 0) rotate(80deg); }
  50% { transform: translate3d(calc(var(--dx) * 0.5 - 16px), 50vh, 0) rotate(170deg); }
  75% { transform: translate3d(calc(var(--dx) * 0.75 + 16px), 78vh, 0) rotate(260deg); }
  100% { transform: translate3d(var(--dx), 106vh, 0) rotate(340deg); }
}

@keyframes tk-titilar {
  0%, 100% { opacity: 0; transform: translateY(0) scale(0.5); }
  50% { opacity: 0.75; transform: translateY(-18px) scale(1); }
}

.tk-luces i {
  position: absolute;
  width: 70vmax;
  height: 70vmax;
  border-radius: 50%;
  opacity: 0.5;
  will-change: transform;
}

.tk-luces i:first-child {
  top: -30vmax;
  left: -25vmax;
  background: radial-gradient(circle, rgba(246, 195, 74, 0.16), transparent 62%);
  animation: tk-luz-a 26s ease-in-out infinite alternate;
}

.tk-luces i:last-child {
  bottom: -35vmax;
  right: -30vmax;
  background: radial-gradient(circle, rgba(184, 0, 50, 0.2), transparent 62%);
  animation: tk-luz-b 32s ease-in-out infinite alternate;
}

@keyframes tk-luz-a {
  to { transform: translate(18vw, 22vh) scale(1.15); }
}

@keyframes tk-luz-b {
  to { transform: translate(-16vw, -18vh) scale(1.1); }
}

/* ---------------------------------------------------------------------
   Reflejo de la ilustración de los dueños (maneki "coming soon")
   La imagen está escondida, como detrás del vidrio de la pantalla:
   - en computador, una luz suave sigue al mouse y deja ver el pedazo de
     la ilustración que hay justo ahí; si el mouse se queda quieto, se
     apaga sola;
   - de vez en cuando (y al llegar a "Nosotros") se refleja unos
     segundos, en todos los equipos.
   La ilustración ocupa todo el ancho de la pantalla. En el computador
   (pantalla horizontal) es más alta que la pantalla: se ve una franja que
   va recorriendo la imagen a medida que se baja por la página (arriba el
   maneki y el letrero, en "Nosotros" los cuatro dueños, al final el
   golden y el gatito). En el celular cabe entera y queda centrada.
   Se refleja sobre los fondos de la página, pero siempre DETRÁS del
   contenido: textos, botones, íconos, imágenes y tarjetas se ven limpios.
   Son capas fijas que no reciben clics, creadas por js/experiencia.js
   cuando la página ya terminó de cargar. Solo se mueven con transform y
   opacity (GPU).
   --------------------------------------------------------------------- */
.tk-reflejo-luz,
.tk-reflejo-brillo {
  position: fixed;
  top: 0;
  left: 0;
  z-index: -1;                   /* sobre los fondos (-2) y debajo de todo el contenido */
  pointer-events: none;
}

/* La ilustración (2:3), del ancho de la pantalla, con los bordes difuminados.
   Su posición vertical la pone js/experiencia.js. */
.tk-reflejo__foto {
  position: absolute;
  top: 0;
  left: 0;
  width: var(--tk-ancho, 100vw);
  height: calc(var(--tk-ancho, 100vw) * 1.5);
  background-position: center;
  background-size: 100% 100%;
  background-repeat: no-repeat;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 9%, #000 91%, transparent), linear-gradient(to bottom, transparent, #000 6%, #000 94%, transparent);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, transparent, #000 9%, #000 91%, transparent), linear-gradient(to bottom, transparent, #000 6%, #000 94%, transparent);
  mask-composite: intersect;
}

/* Luz que sigue al mouse (solo computador). La caja se mueve hacia el
   mouse y la ilustración de adentro se mueve al revés lo mismo: así la
   imagen queda quieta y la luz "descubre" lo que hay en ese punto. */
.tk-reflejo-luz {
  width: clamp(240px, 24vw, 360px);
  height: clamp(240px, 24vw, 360px);
  border-radius: 50%;
  overflow: hidden;
  /* un poco de luz dorada: donde no hay ilustración también se nota */
  background: radial-gradient(closest-side, rgba(246, 195, 74, 0.2), rgba(246, 195, 74, 0.07) 60%, transparent);
  opacity: 0;
  transform: translate3d(-200vw, 0, 0);
  transition: opacity 0.9s ease;
  will-change: transform, opacity;
  -webkit-mask-image: radial-gradient(closest-side, #000 28%, rgba(0, 0, 0, 0.55) 62%, transparent);
  mask-image: radial-gradient(closest-side, #000 28%, rgba(0, 0, 0, 0.55) 62%, transparent);
}

.tk-reflejo-luz.es-visible {
  opacity: 0.45;
  transition-duration: 0.35s;
}

.tk-reflejo-luz .tk-reflejo__foto {
  will-change: transform;
}

/* Reflejo: la ilustración aparece suave unos segundos y se va. Una sola
   capa (la parte de la pantalla que cubre la imagen) que solo cambia de
   opacidad; su alto y posición los pone js/experiencia.js. */
.tk-reflejo-brillo {
  right: 0;
  height: 100%;
  overflow: hidden;
  opacity: 0;
  will-change: opacity;          /* capa propia: al aparecer no repinta la página */
}

.tk-reflejo-brillo[hidden] {
  display: none;
}

.tk-reflejo-brillo.es-reflejo {
  animation: tk-reflejo 3.8s ease-in-out both;
}

/* como mucho 0,11: un reflejo sutil que se reconoce sin recargar la vista */
@keyframes tk-reflejo {
  0% { opacity: 0; }
  32% { opacity: 0.11; }
  52% { opacity: 0.11; }
  100% { opacity: 0; }
}

@media print, (forced-colors: active) {
  .tk-reflejo-luz,
  .tk-reflejo-brillo {
    display: none !important;
  }
}

/* ---------------------------------------------------------------------
   Fondos detrás del reflejo
   Los fondos de la cabecera, las secciones y el pie pasan a una capa
   propia (::before), para que el reflejo quede encima de ellos pero
   debajo de todo el contenido. Se ven igual que antes.
   De atrás hacia adelante:
     -4 degradado de la página · -3 luces y partículas ·
     -2 fondos de cabecera, secciones y pie · -1 reflejo · contenido
   --------------------------------------------------------------------- */
header,
main > section,
footer {
  position: relative;
}

header,
main > section,
footer {
  background: none;
}

header::before,
main > section::before,
footer::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  border-radius: inherit;
  pointer-events: none;
}

header::before {
  background: linear-gradient(180deg, var(--tk-noche), var(--tk-azul));
}

main > section::before {
  background: rgba(26, 26, 46, 0.78);       /* el mismo color de style.css */
}

footer::before {
  background: rgba(22, 33, 62, 0.85);       /* el mismo color de style.css */
}

/* ---------------------------------------------------------------------
   Cabecera con logotipo animado
   (el logo no gira: giran los aros dorados que lo rodean)
   --------------------------------------------------------------------- */
/* (el fondo de la cabecera está en header::before, ver "Fondos detrás del reflejo") */

.tk-logo {
  --tam: min(352px, calc(100vw - 40px));
  --logo: calc(var(--tam) * 0.852);
  --r-chispas: calc(var(--tam) * 0.48);
  position: relative;
  width: var(--tam);
  height: var(--tam);
  margin: 0 auto 10px;
  perspective: 900px;
  animation: tk-logo-flotar 7s ease-in-out 1.2s infinite;
}

.tk-logo__escena {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transform-style: preserve-3d;
  transition: transform 0.35s ease-out;
}

.tk-logo__escena > * {
  grid-area: 1 / 1;
}

.tk-logo .logo-marco {
  width: var(--logo);
  height: var(--logo);
  margin: 0;
  position: relative;
  z-index: 2;
  background: var(--tk-noche);
  translate: 0 0 24px;
  box-shadow: 0 0 18px rgba(246, 195, 74, 0.45), 0 18px 40px rgba(0, 0, 0, 0.55);
  /* entrada: el logo es visible desde el primer instante (no retrasa el LCP);
     solo crece un poco mientras los aros se abren a su alrededor */
  animation: tk-logo-entrada 1.1s cubic-bezier(0.2, 0.8, 0.2, 1) backwards;
}

.tk-logo__brillo {
  width: 118%;
  height: 118%;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, rgba(246, 195, 74, 0.3) 0%, rgba(184, 0, 50, 0.18) 42%, transparent 68%);
  translate: 0 0 -40px;
  animation: tk-latido 4.5s ease-in-out infinite;
}

/* El aro gira dentro de un <span>: la animación de un <svg> no se puede
   pasar a la GPU y obligaría a recalcular estilos en cada cuadro. */
.tk-logo__aro {
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
  translate: 0 0 -16px;
  filter: drop-shadow(0 0 5px rgba(246, 195, 74, 0.6));
  animation: tk-aro-entrada 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) backwards,
             tk-girar 40s linear infinite;
}

.tk-logo__aro svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.tk-logo__aro--interno {
  width: 93%;
  height: 93%;
  opacity: 0.7;
  translate: 0 0 -6px;
  animation: tk-aro-entrada 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) 0.15s backwards,
             tk-girar 26s linear infinite reverse;
}

.tk-logo__chispas,
.tk-logo__petalos {
  position: relative;
  width: 100%;
  height: 100%;
  pointer-events: none;
  translate: 0 0 40px;
}

.tk-logo__chispas i {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 5px;
  height: 5px;
  margin: -2.5px;
  border-radius: 50%;
  background: var(--tk-dorado);
  box-shadow: 0 0 8px 2px rgba(246, 195, 74, 0.8);
  opacity: 0;
  transform: rotate(var(--a)) translateY(calc(var(--r-chispas) * -1));
  animation: tk-chispa 3.4s ease-in-out var(--d) infinite;
}

.tk-logo__petalos i {
  position: absolute;
  left: var(--x);
  top: -4%;
  width: 11px;
  height: 11px;
  border-radius: 100% 0 100% 0;
  background: linear-gradient(135deg, #ffd6e2, var(--tk-sakura) 60%, #e98aa6);
  opacity: 0;
  animation: tk-petalo var(--t) linear var(--d) infinite;
}

/* sin keyframe "to": cada capa termina en su propio estilo (p. ej. opacidad 0.7 del aro interno) */
@keyframes tk-logo-entrada {
  from { scale: 0.9; }
}

@keyframes tk-aro-entrada {
  from { opacity: 0; scale: 0.72; }
}

@keyframes tk-logo-flotar {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}

@keyframes tk-girar {
  to { rotate: 360deg; }
}

@keyframes tk-latido {
  0%, 100% { opacity: 0.7; scale: 0.94; }
  50% { opacity: 1; scale: 1.04; }
}

@keyframes tk-chispa {
  0%, 100% { opacity: 0; transform: rotate(var(--a)) translateY(calc(var(--r-chispas) * -1)) scale(0.4); }
  50% { opacity: 1; transform: rotate(var(--a)) translateY(calc(var(--r-chispas) * -1 - 10px)) scale(1); }
}

@keyframes tk-petalo {
  0% { opacity: 0; transform: translate(0, 0) rotate(0deg); }
  12% { opacity: 0.95; }
  85% { opacity: 0.8; }
  100% { opacity: 0; transform: translate(var(--dx), calc(var(--tam) * 1.05)) rotate(300deg); }
}

/* ---------------------------------------------------------------------
   Navegación: "Explora" pasa a ser el botón "Sumérgete en el mundo geek",
   que lleva al menú orbital (el desplegable antiguo queda oculto).
   --------------------------------------------------------------------- */
.nav-dropdown .submenu {
  display: none !important;
}

nav .nav-dropdown > a.tk-nav-sumergete {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 26px;
  border: 2px solid var(--tk-dorado);
  border-radius: 999px;
  background: linear-gradient(135deg, #8e0026, var(--tk-rojo) 55%, #d4134a);
  color: var(--tk-blanco);
  font-family: "Righteous", cursive;
  font-size: 1.05rem;
  letter-spacing: 0.5px;
  overflow: hidden;
  isolation: isolate;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
  transition: transform 0.25s ease, box-shadow 0.25s ease, color 0.25s ease;
}

nav .nav-dropdown > a.tk-nav-sumergete::after {
  content: none;                   /* sin la línea de los otros enlaces */
}

/* destello que cruza el botón cada pocos segundos */
nav .nav-dropdown > a.tk-nav-sumergete .tk-destello {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 45%;
  z-index: -1;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transform: translateX(-120%) skewX(-18deg);
  animation: tk-destello 5s ease-in-out 2s infinite;
}

nav .nav-dropdown > a.tk-nav-sumergete i {
  color: var(--tk-dorado);
  transform: none !important;
  animation: tk-rebote 2.4s ease-in-out infinite;
}

nav .nav-dropdown > a.tk-nav-sumergete:hover,
nav .nav-dropdown > a.tk-nav-sumergete:focus-visible {
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 0 20px rgba(246, 195, 74, 0.5), 0 8px 20px rgba(0, 0, 0, 0.5);
  outline: none;
}

@keyframes tk-destello {
  0% { transform: translateX(-120%) skewX(-18deg); }
  35%, 100% { transform: translateX(330%) skewX(-18deg); }
}

@keyframes tk-rebote {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 3px; }
}

/* Inicio, Productos, Nosotros y Contacto: íconos redondos (opción C en
   versión circular, como los nodos del menú orbital y el aro del logo) */
header nav > ul {
  gap: 14px;
  flex-wrap: nowrap;
}

header nav > ul > li > a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  width: 92px;
  color: var(--tk-dorado);
  font-family: "Righteous", cursive;
  font-size: 0.92rem;
  line-height: 1.2;
  transition: color 0.25s ease;
}

header nav > ul > li > a::after {
  content: none;                   /* sin la línea de antes */
}

/* (más específico que .fa-solid de Font Awesome, que si no impone inline-block) */
header nav > ul > li > a > i.fa-solid {
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 2px solid rgba(246, 195, 74, 0.55);
  background: radial-gradient(circle at 50% 30%, rgba(184, 0, 50, 0.6), rgba(25, 24, 42, 0.95) 72%);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45);
  color: var(--tk-dorado);
  font-size: 1.35rem;
  transition: transform 0.3s var(--tk-curva), border-color 0.3s ease, box-shadow 0.3s ease;
}

header nav > ul > li > a:hover,
header nav > ul > li > a:focus-visible {
  color: #ffffff;
  outline: none;
}

header nav > ul > li > a:hover > i.fa-solid,
header nav > ul > li > a:focus-visible > i.fa-solid {
  transform: translateY(-3px) scale(1.08);
  border-color: var(--tk-dorado);
  box-shadow: 0 0 0 4px rgba(184, 0, 50, 0.25), 0 0 20px rgba(246, 195, 74, 0.5);
}

header nav > ul > li > a:focus-visible > i.fa-solid {
  outline: 2px solid var(--tk-blanco);
  outline-offset: 3px;
}

/* ---------------------------------------------------------------------
   Menú orbital "Sumérgete en el mundo geek"
   --------------------------------------------------------------------- */
.tk-orbita {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(246, 195, 74, 0.25);
}

.tk-orbita::before {               /* su fondo, detrás del reflejo */
  background:
    radial-gradient(circle at 50% 42%, rgba(184, 0, 50, 0.16), transparent 55%),
    linear-gradient(180deg, rgba(16, 16, 24, 0.92), rgba(25, 24, 42, 0.92));
}

.tk-orbita__titulo {
  margin: 0 0 8px;
}

.tk-orbita__intro {
  max-width: 560px;
  margin: 0 auto 6px;
  font-size: 1rem;
  color: rgba(245, 242, 236, 0.8);
}

.tk-orbita__escena {
  --n: 5;
  --giro: 180deg;
  --radio: 37cqw;
  --nodo: clamp(42px, 13.5cqw, 62px);
  --centro: 46cqw;
  position: relative;
  width: min(440px, 100%);
  aspect-ratio: 1 / 1;
  margin: 8px auto 0;
  container-type: inline-size;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}

/* Girar con el dedo o arrastrando con el mouse: mientras se arrastra, la
   órbita sigue el movimiento sin transición; al soltar se acomoda sola. */
.tk-orbita__escena {
  cursor: grab;
}

.tk-orbita__escena.tk-arrastrando {
  cursor: grabbing;
}

.tk-orbita__escena.tk-arrastrando .tk-orbita__nodos,
.tk-orbita__escena.tk-arrastrando .tk-orbita__nodos li {
  transition: none;
}

.tk-orbita__escena a {
  -webkit-user-drag: none;
}

.tk-orbita__anillo {
  position: absolute;
  inset: 13%;
  border-radius: 50%;
  border: 2px dashed rgba(246, 195, 74, 0.55);
  animation: tk-girar 60s linear infinite;
}

.tk-orbita__anillo::after {
  content: "";
  position: absolute;
  inset: -9%;
  border-radius: 50%;
  border: 1px solid rgba(246, 195, 74, 0.12);
}

.tk-orbita__centro {
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--centro);
  height: var(--centro);
  translate: -50% -50%;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 3px solid var(--tk-dorado);
  background: radial-gradient(circle at 50% 40%, #3a1022, #22101a 55%, var(--tk-noche));
  box-shadow: 0 0 0 8px rgba(16, 16, 24, 0.9), 0 0 18px rgba(246, 195, 74, 0.2);
  font-family: "Righteous", cursive;
  color: var(--tk-dorado);
  line-height: 1.05;
}

/* resplandor que "respira" (solo cambia la opacidad) */
.tk-orbita__halo {
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  box-shadow: 0 0 42px rgba(246, 195, 74, 0.5);
  opacity: 0.35;
  pointer-events: none;
  animation: tk-centro 4.5s ease-in-out infinite;
}

.tk-orbita__centro span {
  font-size: calc(var(--centro) * 0.135);
  letter-spacing: 1px;
}

.tk-orbita__centro strong {
  font-size: calc(var(--centro) * 0.2);
  font-weight: 400;
}

.tk-orbita__centro small {
  margin-top: calc(var(--centro) * 0.035);
  font-family: "Poppins", sans-serif;
  font-size: calc(var(--centro) * 0.075);
  letter-spacing: 2px;
  color: rgba(245, 242, 236, 0.85);
}

@keyframes tk-centro {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 1; }
}

/* El giro es una transición CSS: el JS solo cambia --giro una vez por paso
   y la GPU hace el resto. Cada nodo gira al revés para que su ícono quede
   siempre derecho. */
.tk-orbita__nodos {
  position: absolute;
  inset: 0;
  list-style: none;
  margin: 0;
  padding: 0;
  z-index: 2;
  transform: rotate(var(--giro));
  transition: transform 0.95s var(--tk-curva);
}

.tk-orbita__nodos li {
  --angulo: calc(var(--i) * 360deg / var(--n));
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--nodo);
  height: var(--nodo);
  margin: calc(var(--nodo) / -2) 0 0 calc(var(--nodo) / -2);
  transform: rotate(var(--angulo)) translateY(calc(var(--radio) * -1)) rotate(calc(var(--angulo) * -1 - var(--giro)));
  transition: transform 0.95s var(--tk-curva);
}

.tk-orbita__nodo {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid rgba(246, 195, 74, 0.45);
  background: var(--tk-azul);
  color: var(--tk-dorado);
  font-size: calc(var(--nodo) * 0.36);
  text-decoration: none;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45);
  transition: transform 0.55s var(--tk-curva), background-color 0.4s ease, border-color 0.4s ease,
              box-shadow 0.4s ease, color 0.4s ease;
}

.tk-orbita__nodo::after {
  content: none !important;
}

.tk-orbita__nodo:hover,
.tk-orbita__nodo:focus-visible {
  border-color: var(--tk-dorado);
  box-shadow: 0 0 16px rgba(246, 195, 74, 0.45);
  outline: none;
}

.tk-orbita__nodo:focus-visible {
  outline: 2px solid var(--tk-blanco);
  outline-offset: 3px;
}

.tk-orbita__nodo.es-activo {
  transform: scale(1.3);
  background: var(--tk-rojo);
  border-color: var(--tk-dorado);
  border-width: 3px;
  color: var(--tk-blanco);
  box-shadow: 0 0 0 4px rgba(184, 0, 50, 0.25), 0 0 24px rgba(246, 195, 74, 0.55);
}

.tk-orbita__info {
  min-height: 132px;
  margin-top: 6px;
}

.tk-orbita__info.es-cambio {
  animation: tk-info 0.6s ease both;
}

@keyframes tk-info {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

.tk-orbita__nombre {
  font-family: "Righteous", cursive;
  font-weight: 400;
  font-size: 1.7rem;
  color: var(--tk-dorado);
  margin: 0 0 6px;
}

.tk-orbita__desc {
  max-width: 460px;
  margin: 0 auto 14px;
  font-size: 1rem;
  color: rgba(245, 242, 236, 0.85);
}

.tk-orbita__ir {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 22px;
  border-radius: 999px;
  border: 1px solid var(--tk-dorado);
  color: var(--tk-dorado);
  font-family: "Righteous", cursive;
  text-decoration: none;
  transition: background-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.tk-orbita__ir:hover,
.tk-orbita__ir:focus-visible {
  background: var(--tk-dorado);
  color: var(--tk-noche);
  transform: translateY(-2px);
  outline: none;
}

.tk-orbita__ir i {
  transition: transform 0.25s ease;
}

.tk-orbita__ir:hover i {
  transform: translateX(3px);
}

.tk-orbita__pie {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  margin-top: 16px;
}

/* Puntos indicadores (órbita y carruseles) */
.tk-orbita__puntos,
.tk-carrusel__puntos {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.tk-orbita__puntos button,
.tk-carrusel__puntos button {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(245, 242, 236, 0.35);
  cursor: pointer;
  transition: width 0.35s var(--tk-curva), background-color 0.35s ease;
}

.tk-orbita__puntos button.es-activo,
.tk-carrusel__puntos button.es-actual {
  width: 30px;
  background: var(--tk-dorado);
}

.tk-orbita__puntos button:focus-visible,
.tk-carrusel__puntos button:focus-visible,
.tk-pausa:focus-visible {
  outline: 2px solid var(--tk-dorado);
  outline-offset: 3px;
}

/* Botón para detener / reanudar el avance automático */
.tk-pausa {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(246, 195, 74, 0.55);
  background: transparent;
  color: rgba(245, 242, 236, 0.85);
  font-size: 0.75rem;
  cursor: pointer;
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.tk-pausa:hover,
.tk-pausa.es-detenido {
  border-color: var(--tk-dorado);
  color: var(--tk-dorado);
}

/* ---------------------------------------------------------------------
   Carruseles (deslizables con el dedo, avance automático)
   El diseño de carrusel solo se aplica cuando el JS activa el carrusel
   (.tk-carrusel--activo); si no, la cuadrícula original sigue igual.
   --------------------------------------------------------------------- */
.tk-carrusel--activo.tk-carrusel__pista {
  position: relative;
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 18px;
  max-width: none;
  margin: 10px 0 0;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 14px calc(50% - var(--ancho-slide) / 2) 18px;
  scroll-padding-inline: calc(50% - var(--ancho-slide) / 2);
}

.tk-carrusel--activo.tk-carrusel__pista::-webkit-scrollbar {
  display: none;
}

.tk-carrusel--activo.tk-carrusel__pista:focus-visible {
  outline: 2px solid rgba(246, 195, 74, 0.6);
  outline-offset: 4px;
  border-radius: 12px;
}

/* Con el mouse también se puede arrastrar la fila (en el celular ya la mueve el dedo) */
@media (hover: hover) and (pointer: fine) {
  .tk-carrusel--activo.tk-carrusel__pista {
    cursor: grab;
  }
}

.tk-carrusel--activo.tk-carrusel__pista.tk-arrastrando {
  cursor: grabbing;
  scroll-snap-type: none;
  user-select: none;
  -webkit-user-select: none;
}

.tk-carrusel--activo.tk-carrusel__pista a,
.tk-carrusel--activo.tk-carrusel__pista img {
  -webkit-user-drag: none;
}

.tk-carrusel--activo .tk-carrusel__slide {
  flex: 0 0 var(--ancho-slide);
  width: var(--ancho-slide);
  max-width: none;
  margin: 0;
  scroll-snap-align: center;
}

.tk-carrusel__controles {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
}

.tk-carrusel__controles[hidden] {
  display: none;
}

.tk-carrusel__puntos {
  max-width: 62%;
}

.tk-carrusel__flecha {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(246, 195, 74, 0.7);
  background: rgba(16, 16, 24, 0.85);
  color: var(--tk-dorado);
  font-size: 0.95rem;
  cursor: pointer;
  transition: background-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.tk-carrusel__flecha:hover,
.tk-carrusel__flecha:focus-visible {
  background: var(--tk-dorado);
  color: var(--tk-noche);
  transform: scale(1.06);
  outline: none;
}

/* Contador para carruseles con muchas tarjetas (p. ej. 17 personajes) */
.tk-carrusel__contador {
  min-width: 110px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-family: "Righteous", cursive;
  font-size: 0.95rem;
  color: var(--tk-dorado);
}

.tk-carrusel__barra {
  display: block;
  width: 100%;
  height: 3px;
  border-radius: 3px;
  background: rgba(245, 242, 236, 0.2);
  overflow: hidden;
}

.tk-carrusel__barra span {
  display: block;
  height: 100%;
  background: var(--tk-dorado);
  transform-origin: left center;
  transform: scaleX(0);
  transition: transform 0.5s var(--tk-curva);
}

/* Profundidad: la tarjeta del centro al frente, las demás atrás.
   (cada tarjeta lleva su propia perspectiva: se ve igual en todos los
   navegadores aunque la fila esté desplazada) */
.tk-carrusel--profundo.tk-carrusel--activo .tk-carrusel__slide {
  opacity: 0.55;
  transform: perspective(900px) rotateY(0deg) scale(0.88);
  transition: transform 0.6s var(--tk-curva), opacity 0.6s ease, box-shadow 0.6s ease;
}

.tk-carrusel--profundo.tk-carrusel--activo .tk-carrusel__slide.es-antes {
  transform: perspective(900px) rotateY(14deg) scale(0.88);
}

.tk-carrusel--profundo.tk-carrusel--activo .tk-carrusel__slide.es-despues {
  transform: perspective(900px) rotateY(-14deg) scale(0.88);
}

.tk-carrusel--profundo.tk-carrusel--activo .tk-carrusel__slide.es-actual {
  opacity: 1;
  transform: perspective(900px) rotateY(0deg) scale(1);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(246, 195, 74, 0.6), 0 0 26px rgba(246, 195, 74, 0.18);
}

/* Giro continuo: cada tarjeta gira y se acerca según su distancia al
   centro, siguiendo el dedo cuadro a cuadro (como un globo que gira).
   Lo calcula el navegador con la posición de la fila, sin JavaScript;
   donde no hay soporte queda el efecto de profundidad de arriba. */
@keyframes tk-cubierta {
  0% { opacity: 0.45; transform: perspective(900px) rotateY(-40deg) scale(0.8); }
  50% { opacity: 1; transform: perspective(900px) rotateY(0deg) scale(1); }
  100% { opacity: 0.45; transform: perspective(900px) rotateY(40deg) scale(0.8); }
}

@supports (animation-timeline: view()) {
  .tk-carrusel--activo .tk-carrusel__slide,
  .tk-carrusel--profundo.tk-carrusel--activo .tk-carrusel__slide {
    animation: tk-cubierta linear both;
    animation-timeline: view(inline 0px);
    transition: box-shadow 0.6s ease;
  }

  /* fuera de la pantalla no gasta nada */
  .tk-carrusel__pista.tk-fuera .tk-carrusel__slide {
    animation-play-state: paused;
  }
}

/* Tamaño de cada tarjeta según el carrusel */
#personajes .tk-carrusel__pista {
  --ancho-slide: min(300px, 74vw);
}

.tk-carrusel--movil {
  --ancho-slide: min(250px, 70vw);
}

#novedades .tk-carrusel--movil {
  --ancho-slide: min(320px, 82vw);
}

/* ---------------------------------------------------------------------
   Apariciones al desplazarse
   --------------------------------------------------------------------- */
.tk-revelar {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s ease var(--retraso, 0ms), transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) var(--retraso, 0ms);
}

.tk-revelar.es-visible {
  opacity: 1;
  transform: none;
}

/* Zona fuera de la pantalla (cabecera o menú orbital): sus animaciones
   decorativas se pausan y no gastan nada mientras no se ven */
.tk-quieto,
.tk-quieto * {
  animation-play-state: paused !important;
}

/* Pestaña inactiva: se pausan las animaciones decorativas */
.tk-pausado .tk-logo,
.tk-pausado .tk-logo *,
.tk-pausado .tk-luces i,
.tk-pausado .tk-orbita__anillo,
.tk-pausado .tk-orbita__halo,
.tk-pausado .tk-destello,
.tk-pausado .tk-nav-sumergete i,
.tk-pausado .tk-ambiente i,
.tk-pausado .tk-reflejo-brillo {
  animation-play-state: paused !important;
}

/* ---------------------------------------------------------------------
   Celular
   --------------------------------------------------------------------- */
@media (max-width: 600px) {
  header {
    padding: 14px 12px;
  }

  .tk-logo {
    --tam: min(236px, calc(100vw - 40px));
  }

  header h1 {
    font-size: 2.3rem;
  }

  header nav > ul {
    gap: 6px;
  }

  header nav > ul > li {
    flex: 1 1 0;
    min-width: 0;
    max-width: 84px;
  }

  header nav > ul > li > a {
    width: auto;
    gap: 5px;
    font-size: clamp(0.68rem, 3.2vw, 0.78rem);
  }

  header nav > ul > li > a > i.fa-solid {
    width: 50px;
    height: 50px;
    font-size: 1.15rem;
  }

  nav .nav-dropdown > a.tk-nav-sumergete {
    padding: 10px 20px;
    font-size: 1rem;
  }

  .tk-logo__petalos i:nth-child(n + 4),
  .tk-logo__chispas i:nth-child(even) {
    display: none;
  }

  main {
    padding: 16px 10px;
  }

  main > section {
    padding: 26px 14px;
  }

  .seccion-explora {
    padding: 16px 12px;
  }

  .tk-orbita__nombre {
    font-size: 1.4rem;
  }

  .tk-carrusel__controles {
    gap: 10px;
  }

  .tk-carrusel__flecha {
    width: 36px;
    height: 36px;
  }
}

/* ---------------------------------------------------------------------
   Movimiento reducido (preferencia del sistema o ?movimiento=reducido)
   html.tk-movimiento = vista previa con ?movimiento=completo
   --------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html:not(.tk-movimiento) {
    scroll-behavior: auto;
  }

  html:not(.tk-movimiento) .tk-logo,
  html:not(.tk-movimiento) .tk-logo *,
  html:not(.tk-movimiento) .tk-luces i,
  html:not(.tk-movimiento) .tk-orbita__anillo,
  html:not(.tk-movimiento) .tk-orbita__halo,
  html:not(.tk-movimiento) .tk-orbita__info.es-cambio,
  html:not(.tk-movimiento) .tk-destello,
  html:not(.tk-movimiento) nav .nav-dropdown > a.tk-nav-sumergete i {
    animation: none !important;
  }

  html:not(.tk-movimiento) .tk-logo__chispas,
  html:not(.tk-movimiento) .tk-logo__petalos,
  html:not(.tk-movimiento) .tk-ambiente,
  html:not(.tk-movimiento) .tk-reflejo-luz,
  html:not(.tk-movimiento) .tk-reflejo-brillo {
    display: none;
  }

  html:not(.tk-movimiento) .tk-carrusel__slide {
    animation: none !important;
  }

  html:not(.tk-movimiento) header nav > ul > li > a,
  html:not(.tk-movimiento) header nav > ul > li > a > i.fa-solid,
  html:not(.tk-movimiento) .tk-orbita__nodos,
  html:not(.tk-movimiento) .tk-orbita__nodos li,
  html:not(.tk-movimiento) .tk-orbita__nodo,
  html:not(.tk-movimiento) .tk-carrusel--profundo .tk-carrusel__slide,
  html:not(.tk-movimiento) .tk-carrusel__barra span,
  html:not(.tk-movimiento) .tk-revelar {
    transition: none !important;
  }
}

html.tk-reducido {
  scroll-behavior: auto;
}

.tk-reducido .tk-logo,
.tk-reducido .tk-logo *,
.tk-reducido .tk-luces i,
.tk-reducido .tk-orbita__anillo,
.tk-reducido .tk-orbita__halo,
.tk-reducido .tk-orbita__info.es-cambio,
.tk-reducido .tk-destello,
.tk-reducido nav .nav-dropdown > a.tk-nav-sumergete i {
  animation: none !important;
}

.tk-reducido .tk-logo__chispas,
.tk-reducido .tk-logo__petalos,
.tk-reducido .tk-ambiente,
.tk-reducido .tk-reflejo-luz,
.tk-reducido .tk-reflejo-brillo {
  display: none;
}

.tk-reducido .tk-carrusel__slide {
  animation: none !important;
}

.tk-reducido header nav > ul > li > a,
.tk-reducido header nav > ul > li > a > i.fa-solid,
.tk-reducido .tk-orbita__nodos,
.tk-reducido .tk-orbita__nodos li,
.tk-reducido .tk-orbita__nodo,
.tk-reducido .tk-carrusel--profundo .tk-carrusel__slide,
.tk-reducido .tk-carrusel__barra span,
.tk-reducido .tk-revelar {
  transition: none !important;
}
