@font-face {
  font-family: 'Inlanders';
  src: url('./fonts/Inlanders Demo (1).otf') format('opentype');
  font-weight: normal;
  font-style: normal;
}

:root {
  --bg: #000;
  --text: #fff;
  --verde: #74d643;
  --amarillo: #f0cf3c;
  --azul: #3c6ed4;
  --rojo: #d23434;
  --pad: 32px;
  --cols: 4;
  --rows: 3;
  --grid-line: rgba(255, 255, 255, 0.3);
}

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

html {
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-family: 'Poppins', sans-serif;
}

main {
  position: relative;
  z-index: 1;
}

#s1 {
  isolation: isolate;
}

#hero-title,
.hero-sq,
.dot {
  position: absolute;
}

.screen {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

.sep-row {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.sep-dot {
  position: absolute;
  z-index: 2;
  display: block;
}

.t-title {
  position: absolute;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-family: 'Inlanders', sans-serif;
  text-transform: uppercase;
  color: #fff;
  line-height: 1;
  user-select: none;
}
.t-body {
  position: absolute;
  z-index: 2;
  margin: 0;
  color: #fff;
  display: block;
  font-family: 'Poppins', sans-serif;
  font-size: clamp(0.95rem, 1.2vw, 1.35rem);
  font-weight: 500;
  line-height: 1.5;
}

.hero-title {
  pointer-events: none;
}

.hero-letter {
  position: relative;
  display: inline-block;
  z-index: 4;
  pointer-events: auto;
  color: #fff;
  transition: color 0.18s ease, transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: center bottom;
  will-change: transform;
}

.section-title {
  z-index: 3;
}

.bg-black {
  background: #000;
  padding: 12px 16px;
}

#desc2 {
  text-align: right;
}

.dot,
.hero-sq,
.cuad-block {
  position: absolute;
}

@keyframes float-dot {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-24px);
  }
}

.dot,
.sep-dot {
  animation: float-dot 3.5s ease-in-out infinite;
}

.dot:nth-child(2n),
.sep-dot:nth-child(2n) {
  animation-duration: 4s;
  animation-delay: -1s;
}

.dot:nth-child(3n),
.sep-dot:nth-child(3n) {
  animation-duration: 4.5s;
  animation-delay: -2s;
}

.dot:nth-child(4n),
.sep-dot:nth-child(4n) {
  animation-duration: 5s;
  animation-delay: -3s;
}

.dot {
  z-index: 2;
}

.hero-sq,
.cuad-block {
  z-index: 3;
}

.dot-verde,
.sq-verde,
.cuad-block[data-color="verde"] {
  background: var(--verde);
}

.dot-amarillo,
.sq-amarillo,
.cuad-block[data-color="amarillo"] {
  background: var(--amarillo);
}

.dot-azul,
.sq-azul,
.cuad-block[data-color="azul"] {
  background: var(--azul);
}

.dot-rojo,
.sq-rojo,
.cuad-block[data-color="rojo"] {
  background: var(--rojo);
}

.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 20px;
  z-index: 3;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  opacity: 0.3;
  animation: bounce 2s ease-in-out infinite;
}

.scroll-hint span {
  font-family: 'Black Han Sans', sans-serif;
  font-size: 0.6rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
}

@keyframes bounce {
  0%, 100% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(5px);
  }
}

.cuad-text {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  font-size: clamp(0.9rem, 1.1vw, 1.25rem);
  opacity: 0;
  filter: blur(8px);
  transition: opacity 0.12s ease-out, filter 0.12s ease-out;
}

.interactive-title {
  flex-direction: column;
  cursor: pointer;
}

.interactive-title .text-hover {
  display: none;
}

.interactive-title:hover .text-default {
  display: none;
}

.interactive-title:hover .text-hover {
  display: block;
}

.title-arrow {
  position: absolute;
  z-index: 2;
  width: 100%;
  color: #fff;
  pointer-events: none;
  display: flex;
  justify-content: center;
  align-items: center;
}

#grid-overlay {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

#cursor-sq {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  width: 30px;
  height: 30px;
  background: #fff;
  pointer-events: none;
  transform: translate(-50%, -50%);
  mix-blend-mode: difference;
}

@media (hover: none), (pointer: coarse) {
  #cursor-sq {
    display: none;
  }
}

.hero-letter {
  display: inline-block;
  transform-origin: center bottom;
  will-change: transform;
}

.hero-letter:hover {
  transform: translateY(-4px) scale(1.08);
}

/* ===================== HERO BUILD ===================== */

#s1 {
  isolation: isolate;
}
.hero-title {
  pointer-events: none;
  letter-spacing: 0;
}

#hero-title {
  letter-spacing: 0;
}

.hover-verde:hover {
  color: var(--verde);
}

.hover-amarillo:hover {
  color: var(--amarillo);
}

.hover-azul:hover {
  color: var(--azul);
}

.hover-rojo:hover {
  color: var(--rojo);
}

.hero-sq,
.sq-extra {
  position: absolute;
  z-index: 3;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

/* ===================== GALERÍA ===================== */

/* Sección GALERÍA con sistema de 3 filas como las demás */
#s-gallery.section-blocks {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

/* Elementos posicionados por data-row/data-col dentro de la galería */
#s-gallery [data-row][data-col] {
  position: absolute;
}

/* Título GALERÍA: fila superior, alineado a la derecha */
/* Título GALERÍA: fila superior, alineado a la derecha */
#s-gallery .section-title.right-title {
  top: 10vh;           /* misma fila superior que el resto de secciones */
  left: auto;
  right: var(--pad);   /* se apoya en el padding derecho global */
}
/* Carrusel ocupando filas 2 y 3 (zona central) */
.carousel-wrap {
  position: absolute;
  z-index: 3;
  left: 10%;
  right: 10%;
  top: 22%;    /* sube un poco para dar más alto */
  bottom: 8%;  /* baja un poco para usar casi dos filas completas */
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Track: imágenes grandes que llenan las filas 2–3 */
.gallery-track {
  width: 100%;
  height: 100%;                 /* ocupa todo el alto disponible */
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(340px, 1fr);  /* un poco más anchas */
  align-items: center;
  gap: 24px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0 24px;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.gallery-track::-webkit-scrollbar {
  display: none;
}

.gallery-slide {
  position: relative;
  width: 100%;
  height: 100%;       /* usa todo el alto del carrusel */
  scroll-snap-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #111;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

/* Para que no se vean cortadas verticalmente */
.gallery-slide img {
  width: auto;
  height: 100%;       /* manda el alto */
  max-width: none;
  object-fit: contain;   /* muestra completa la foto */
  object-position: center;
  display: block;
  background: #111;
  transition: transform 0.25s ease;
}

.gallery-slide:hover {
  transform: scale(1.04);
  z-index: 10;
}

.gallery-slide:hover img {
  transform: scale(1.03);
}

.gallery-slide.is-missing {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02));
  color: rgba(255,255,255,0.55);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Botones de navegación */
.gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255,255,255,0.3);
  background: rgba(0,0,0,0.25);
  color: #fff;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-arrow:hover {
  border-color: #fff;
  background: rgba(0, 0, 0, 0.0);
}

#gallery-prev {
  left: -52px;
}

#gallery-next {
  right: -52px;
}

/* Bandas de puntos alrededor del carrusel */
.gallery-band {
  position: absolute;
  left: 0;
  width: 100%;
  height: 18px;
  z-index: 2;
  pointer-events: none;
}

.gallery-band-top {
  top: 18%;
}

.gallery-band-bottom {
  bottom: 12%;
}

.gallery-band-dot {
  position: absolute;
  width: 14px;
  height: 14px;
}

.gallery-band-top .gallery-band-dot:nth-child(1) {
  left: 18%;
  top: 2px;
}

.gallery-band-top .gallery-band-dot:nth-child(2) {
  right: 22%;
  top: 2px;
}

.gallery-band-bottom .gallery-band-dot:nth-child(1) {
  left: 28%;
  bottom: 2px;
}

.gallery-band-bottom .gallery-band-dot:nth-child(2) {
  right: 16%;
  bottom: 2px;
}

/* =================== FIN GALERÍA =================== */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.5);
}

.lightbox-content {
  position: relative;
  z-index: 2;
  width: min(88vw, 1100px);
  height: min(88vh, 1100px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  background: #111;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 24px;
  z-index: 3;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.lightbox-close:hover {
  background: rgba(0, 0, 0, 0.85);
  border-color: rgba(0, 0, 0, 0.85);
  transform: scale(1.04);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 900px) {
  .gallery-track {
    grid-auto-columns: minmax(260px, 1fr);
    gap: 18px;
    padding: 0 16px;
  }

  .carousel-wrap {
    left: 8%;
    right: 8%;
    top: 30%;
    bottom: 12%;
  }

  #gallery-prev {
    left: -40px;
  }

  #gallery-next {
    right: -40px;
  }
}

@media (max-width: 640px) {
  .gallery-track {
    grid-auto-columns: minmax(220px, 1fr);
    gap: 14px;
    padding: 0 10px;
  }

  .carousel-wrap {
    left: 4%;
    right: 4%;
    top: 32%;
    bottom: 10%;
  }

  #gallery-prev {
    left: 0;
  }

  #gallery-next {
    right: 0;
  }

  .lightbox-content {
    width: 92vw;
    height: 82vh;
    padding: 12px;
  }

  .lightbox-close {
    top: 12px;
    right: 12px;
    width: 44px;
    height: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lightbox,
  .lightbox-close {
    transition: none;
  }
}

.screen-centered {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
}

.center-copy {
  width: min(900px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  text-align: center;
}

.center-title {
  position: static;
  display: block;
  width: 100%;
  font-size: clamp(2.2rem, 5vw, 5rem);
  text-align: center;
  justify-content: center;
}

.center-text {
  position: static;
  display: block;
  width: min(720px, 100%);
  margin: 0 auto;
  font-size: clamp(1rem, 1.3vw, 1.35rem);
  line-height: 1.6;
  text-align: center;
}

.site-colophon {
  position: relative;
  width: 100%;
  background: #000;
  color: #fff;
  padding: 96px 32px 72px;
  border-top: 1px solid rgba(255,255,255,0.14);
}

.colophon-inner {
  width: min(920px, 100%);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}

.colophon-kicker {
  margin: 0;
  font-family: 'Black Han Sans', sans-serif;
  font-size: 0.90rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  opacity: 0.55;
}

.colophon-title {
  margin: 0;
  font-family: 'Inlanders', sans-serif;
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 1;
  text-transform: uppercase;
  color: #fff;
}

.colophon-text,
.colophon-meta {
  margin: 0;
  max-width: 60ch;
  font-family: 'Poppins', sans-serif;
  color: #fff;
}

.colophon-text {
  font-size: clamp(1rem, 1.2vw, 1.25rem);
  line-height: 1.6;
}

.colophon-meta {
  font-size: 0.95rem;
  line-height: 1.5;
  opacity: 0.7;
}

@media (max-width: 640px) {
  .site-colophon {
    padding: 72px 20px 56px;
  }

  .colophon-inner {
    gap: 14px;
  }
}

/* ==========================================================================
   VIDEO SECTION
   ========================================================================== */
.video-section {
  min-height: 100vh;
  height: auto;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 32px;
  overflow: visible;
}

.video-wrap {
  width: min(800px, 100%);
  margin: 0 auto;
  background: transparent;
  color: #fff;
}

.video-container {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
  height: 0;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 30px rgba(255, 255, 255, 0.05);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.video-container:hover {
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7), 0 0 40px rgba(255, 255, 255, 0.08);
}

.video-container iframe,
.video-container video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: contain;
  background: #000;
}

.pix-section {
  min-height: 100vh;
  height: auto;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 32px;
  overflow: visible;
}

.pix-wrap {
  width: min(1200px, 95%);
  height: 520px;
  margin: 0 auto;
  background: transparent;
  color: #fff;
  overflow: hidden;
}

.pix-wrap iframe {
  width: 125%;
  max-width: 125%;
  height: 650px;
  transform: scale(0.8);
  transform-origin: top left;
  border: 0;
  background: #000;
}

.pix-wrap,
.pix-wrap * {
  color: #fff;
}

.pix-wrap [class*="card"],
.pix-wrap [class*="panel"],
.pix-wrap [class*="step"],
.pix-wrap [class*="container"],
.pix-wrap [class*="box"] {
  background: #000 !important;
  color: #fff !important;
  border-color: rgba(255,255,255,0.18) !important;
}

.pix-wrap small,
.pix-wrap .note,
.pix-wrap [class*="note"],
.pix-wrap [class*="meta"],
.pix-wrap [class*="description"] {
  color: rgba(255,255,255,0.75) !important;
}

.pix-wrap button,
.pix-wrap [role="button"],
.pix-wrap .button,
.pix-wrap [class*="btn"] {
  background: #111 !important;
  color: #fff !important;
  border: 1px solid rgba(255,255,255,0.2) !important;
}

.pix-wrap input,
.pix-wrap textarea,
.pix-wrap select {
  background: #111 !important;
  color: #fff !important;
  border: 1px solid rgba(255,255,255,0.2) !important;
}

.pix-wrap svg {
  color: #fff;
  fill: currentColor;
}

pix-wrap a {
  color: #fff !important;
}


.side-index {
  position: fixed;
  left: 24px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.side-index__btn {
  width: 18px;
  height: 18px;
  display: block;
  background: #111;
  border: 1px solid rgba(255,255,255,0.35);
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.side-index__btn:hover,
.side-index__btn:focus-visible {
  background: #fff;
  border-color: #fff;
  transform: scale(1.08);
}

html {
  scroll-behavior: smooth;
}

.side-index {
  position: fixed;
  left: 24px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.side-index__btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #fff;
  transition: transform 0.2s ease, gap 0.2s ease;
}

.side-index__btn::before {
  content: "";
  width: 18px;
  height: 18px;
  display: block;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.35);
  flex-shrink: 0;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.side-index__label {
  font-family: 'Poppins', sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: 0;
  transform: translateX(-4px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.side-index__btn.is-active .side-index__label {
  opacity: 1;
  transform: translateX(0);
}

.side-index__btn:hover .side-index__label {
  opacity: 1;
  transform: translateX(0);
}

.side-index__btn.c-verde.is-active::before { background: #74d643; border-color: #74d643; }
.side-index__btn.c-amarillo.is-active::before { background: #f0cf3c; border-color: #f0cf3c; }
.side-index__btn.c-azul.is-active::before { background: #3c6ed4; border-color: #3c6ed4; }
.side-index__btn.c-rojo.is-active::before { background: #d23434; border-color: #d23434; }

.side-index__btn:hover::before {
  background: rgba(255,255,255,0.15);
  border-color: #fff;
}

@media (max-width: 900px) {
  .side-index { left: 8px; gap: 6px; }
  .side-index__btn::before { width: 14px; height: 14px; }
  .side-index__label { display: none; }
}

.subtitle {
  margin-top: 12px;
  font-family: 'Poppins', sans-serif;
  font-size: clamp(0.95rem, 1.4vw, 1.2rem);
  line-height: 1.4;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #ffffff;
}

/* Sección S7 / Gestualidad & Experiencia Combinada */
#sG,
#s6 {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8vh 32px;
  margin: 0;
}

#sG #sG-title,
#s6 #s-experimental-title {
  position: static;
  display: block;
  width: 100%;
  font-size: clamp(2.2rem, 5vw, 5rem);
  text-align: center;
  margin-bottom: 6vh;
}

#sG .center-text,
#s6 .center-text {
  position: static;
  display: block;
  width: min(720px, 100%);
  margin: 0 auto;
  font-size: clamp(1rem, 1.3vw, 1.35rem);
  line-height: 1.6;
  text-align: center;
}

#s6 #s6-title {
  position: static;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: auto;
  font-size: clamp(1.8rem, 3.2vw, 3.2rem);
  margin-top: clamp(40px, 12vh, 120px);
  margin-bottom: 2vh;
  line-height: 1.2;
}

#s6 #s6-arrow {
  position: static;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: auto;
  margin-top: 10px;
}

#sG .botones-container {
  display: flex;
  gap: 3rem;
  justify-content: center;
  flex-wrap: wrap;
  margin: 6vh 0;
}

#sG .enlace-accion {
  font-family: 'Inlanders', sans-serif;
  font-size: 1.05rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.3s ease, opacity 0.3s ease;
  opacity: 0.8;
}

#sG .enlace-accion:visited {
  color: #fff;
}

#sG .enlace-accion:hover {
  color: #00d9ff;
  opacity: 1;
}

/* Tarjetas y diagramas de Gestualidad */
.gesto-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  width: 180px;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.gesto-card:hover {
  transform: translateY(-4px);
}

.gesto-diagrama {
  position: relative;
  width: 140px;
  height: 140px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  overflow: hidden;
  transition: border-color 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
}

.gesto-card:hover .gesto-diagrama {
  border-color: rgba(0, 217, 255, 0.3);
  background-color: rgba(255, 255, 255, 0.04);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 217, 255, 0.1);
}

.gesto-card:hover .enlace-accion {
  color: #00d9ff;
  opacity: 1;
}

/* Animaciones del diagrama de Cuadrícula */
.grid-fill-cell {
  fill: rgba(255, 255, 255, 0.04);
  stroke: rgba(255, 255, 255, 0.12);
  stroke-width: 1.2;
  transform-box: fill-box;
  transform-origin: center;
  animation: cell-fill-anim 4.5s infinite ease-in-out;
}

@keyframes cell-fill-anim {
  0%, 8% {
    fill: rgba(255, 255, 255, 0.04);
    stroke: rgba(255, 255, 255, 0.12);
    transform: scale(0.85);
  }
  18%, 78% {
    fill: var(--azul);
    stroke: var(--azul);
    transform: scale(1);
    filter: drop-shadow(0 0 2px rgba(60, 110, 212, 0.5));
  }
  88%, 100% {
    fill: rgba(255, 255, 255, 0.04);
    stroke: rgba(255, 255, 255, 0.12);
    transform: scale(0.85);
  }
}

/* Animaciones del diagrama de Descifra */
.paleta-deslizable {
  transform-box: view-box;
  transform-origin: center;
  animation: paleta-slide-anim 4.5s infinite cubic-bezier(0.25, 1, 0.5, 1);
}

@keyframes paleta-slide-anim {
  0%, 15% {
    transform: translateX(0);
  }
  40%, 75% {
    transform: translateX(106px);
  }
  90%, 100% {
    transform: translateX(0);
  }
}

/* Animaciones del diagrama de Ataca */
.board-grid-cell {
  fill: #141414;
  stroke: rgba(255, 255, 255, 0.1);
  stroke-width: 1.2;
}

.cross-piece {
  transform-box: fill-box;
  transform-origin: center;
  opacity: 0;
}

.cross-piece-1 {
  animation: cross-anim-1 5s infinite cubic-bezier(0.34, 1.56, 0.64, 1);
}

.cross-piece-2 {
  animation: cross-anim-2 5s infinite cubic-bezier(0.34, 1.56, 0.64, 1);
}

.cross-piece-3 {
  animation: cross-anim-3 5s infinite cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes cross-anim-1 {
  0%, 8% {
    opacity: 0;
    transform: scale(1.8);
  }
  14%, 80% {
    opacity: 1;
    transform: scale(1);
  }
  86%, 100% {
    opacity: 0;
    transform: scale(0.85);
  }
}

@keyframes cross-anim-2 {
  0%, 20% {
    opacity: 0;
    transform: scale(1.8);
  }
  26%, 80% {
    opacity: 1;
    transform: scale(1);
  }
  86%, 100% {
    opacity: 0;
    transform: scale(0.85);
  }
}

@keyframes cross-anim-3 {
  0%, 32% {
    opacity: 0;
    transform: scale(1.8);
  }
  38%, 80% {
    opacity: 1;
    transform: scale(1);
  }
  86%, 100% {
    opacity: 0;
    transform: scale(0.85);
  }
}

/* ==========================================================================
   MOBILE RESPONSIVE & MOBILE CARDS (CUADRICULANDO)
   ========================================================================== */

/* Desktop defaults: the wrapper has no effect on layout calculations */
.mobile-card {
  display: contents;
}

.hero-sq-container {
  display: contents;
}

/* ===================== TABLERO 3D ===================== */
.lightbox-content .controls-3d {
  bottom: 50px;
  background: rgba(0, 0, 0, 0.85);
  border-radius: 4px;
}

.lightbox-content .hint-3d {
  bottom: 16px;
  color: rgba(0, 0, 0, 0.7);
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

#canvas-3d,
#canvas-box3d,
#canvas-cards3d,
#canvas-ruleta3d,
#canvas-cuadriculas3d,
#canvas-pieces3d,
#canvas-acrylic3d {
  position: absolute;
  inset: 0;
  z-index: 1;
  outline: none;
}

.controls-3d {
  position: absolute;
  bottom: 72px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  gap: 12px;
  background: rgba(0, 0, 0, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 8px 12px;
  box-sizing: border-box;
}

.btn-3d {
  font-family: 'Poppins', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
  background: transparent;
  border: 1px solid transparent;
  padding: 8px 14px;
  cursor: pointer;
  transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.btn-3d:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.06);
}

.btn-3d.is-active {
  color: #000;
  background: #fff;
  border-color: #fff;
}

.hint-3d {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  color: rgba(255, 255, 255, 0.4);
  font-family: 'Poppins', sans-serif;
  font-size: 0.70rem;
  font-weight: 500;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  pointer-events: none;
  text-align: center;
  width: 90%;
}

@media (max-width: 768px) {
  /* Disable absolute grid and let page scroll naturally */
  body {
    overflow-x: hidden;
    overflow-y: auto;
  }

  /* Hide cursor, background grid overlay, small background dots, and separators */
  #cursor-sq,
  #grid-overlay,
  .dot,
  .sep-row {
    display: none !important;
  }

  /* Reset all sections with grid-block styles */
  .screen {
    height: auto !important;
    min-height: 100vh;
    padding: 80px 24px 40px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  /* s1: Hero adjustments */
  #s1 {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    height: 100vh !important;
  }

  #hero-title {
    position: static !important;
    font-size: 2.4rem !important;
    width: 100% !important;
    height: auto !important;
    text-align: center;
    display: block !important;
    margin-bottom: 24px;
    line-height: 1.2;
    
  }

  .hero-sq-container {
    display: flex !important;
    justify-content: center;
    gap: 16px;
    margin-top: 16px;
    width: 100%;
  }

  .hero-sq {
    position: static !important;
    display: block !important;
    width: 32px !important;
    height: 32px !important;
    opacity: 1 !important;
  }

  /* s2: Presentation adjustments */
  #s2 {
    display: flex;
    flex-direction: column;
    gap: 24px;
    justify-content: center;
  }

  #s2 .t-body {
    position: static !important;
    width: 100% !important;
    text-align: left !important;
    margin: 0 !important;
  }

  #s2 #desc2 {
    text-align: right !important;
  }

  /* s3, s4, s5: Section titles and layouts */
  .screen.section-blocks {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
  }

  .section-title {
    position: static !important;
    width: 100% !important;
    height: auto !important;
    margin-bottom: 28px;
    font-size: 2.2rem !important;
    text-align: left !important;
    display: block !important;
  }

  .section-title.right-title {
    text-align: right !important;
  }

  /* Mobile cards click-toggle mechanics */
  .mobile-card {
    display: flex !important;
    flex-direction: column;
    background: #0d0d0d;
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    margin-bottom: 18px;
    cursor: pointer;
    user-select: none;
    box-sizing: border-box;
    transition: border-color 0.25s ease;
  }

  .mobile-card:hover,
  .mobile-card:active {
    border-color: rgba(255, 255, 255, 0.35);
  }

  /* Color header block acting as the button/indicator */
  .mobile-card .cuad-block {
    position: static !important;
    width: 100% !important;
    height: 52px !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    transform: none !important;
    box-sizing: border-box;
  }

  /* Hover indicator or text inside header block on mobile */
  .mobile-card .cuad-block::after {
    content: "toca para revelar";
    font-family: 'Poppins', sans-serif;
    font-size: 0.65rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(0, 0, 0, 0.7);
    font-weight: 700;
    transition: opacity 0.2s ease;
  }

  .mobile-card.is-revealed .cuad-block::after {
    content: "toca para ocultar";
    color: rgba(0, 0, 0, 0.5);
  }

  /* explanation text under block container */
  .mobile-card .cuad-text {
    position: static !important;
    width: 100% !important;
    height: auto !important;
    padding: 0px 20px !important;
    text-align: left !important;
    display: block !important;
    background: #000;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    box-sizing: border-box;
    font-size: 0.95rem !important;
    line-height: 1.5;
    filter: none !important;
    transition: max-height 0.3s cubic-bezier(0, 1, 0, 1), opacity 0.2s ease, padding 0.3s ease;
  }

  .mobile-card.is-revealed .cuad-text {
    max-height: 250px;
    opacity: 1;
    padding: 20px !important;
    transition: max-height 0.5s cubic-bezier(1, 0, 1, 0), opacity 0.25s ease, padding 0.3s ease;
  }

  /* Gallery section adaptive height */
  #s-gallery {
    height: 70vh !important;
  }

  .carousel-wrap {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    width: 100% !important;
    height: 100% !important;
  }

  #gallery-prev,
  #gallery-next {
    width: 38px;
    height: 38px;
    font-size: 1.2rem;
  }

  #gallery-prev {
    left: -12px;
  }

  #gallery-next {
    right: -12px;
  }

  /* Video responsive height/padding */
  .video-section {
    padding: 40px 16px !important;
  }

  /* PIX responsive height */
  .pix-section {
    padding: 40px 16px !important;
  }

  .pix-wrap {
    height: 360px !important;
  }

  .pix-wrap iframe {
    width: 125% !important;
    max-width: 125% !important;
    height: 450px !important;
  }

  /* s6: Experience link styling */
  #s6 {
    height: auto !important;
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 24px;
  }

  #s6-title {
    position: static !important;
    width: 100% !important;
    height: auto !important;
    font-size: 1.6rem !important;
    text-align: center;
    display: flex !important;
    flex-direction: column;
    margin-bottom: 10px;
    line-height: 1.3;
  }

  #s6-arrow {
    position: static !important;
    font-size: 2.2rem !important;
    width: auto !important;
    height: auto !important;
  }

  /* Controls adjustments for mobile lightbox */
  .lightbox-content .controls-3d {
    bottom: 60px;
    width: 92%;
    padding: 6px;
  }
  .lightbox-content .hint-3d {
    bottom: 24px;
  }
  .controls-3d {
    bottom: 50px;
    padding: 6px 8px;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    width: 90%;
  }
  .btn-3d {
    padding: 6px 10px;
    font-size: 0.65rem;
  }
  .hint-3d {
    bottom: 12px;
    font-size: 0.6rem;
  }

  /* Mobile adjustments for Gestures section */
  #sG .botones-container {
    gap: 1.5rem;
    margin: 4vh 0;
  }
  .gesto-card {
    width: 140px;
    gap: 1rem;
  }
  .gesto-diagrama {
    width: 110px;
    height: 110px;
  }
  .gesto-diagrama svg {
    transform: scale(0.85);
    transform-origin: center;
  }
}