:root {
  --ink: #d9f5ed;
  --muted: #a2b9bf;
  --aqua: #7bf6dc;
  --blue: #70a5ff;
  --base: #061c25;
  --mx: 0px;
  --my: 0px;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--base);
}

body {
  font-family: "Space Grotesk", Arial, sans-serif;
  color: var(--ink);
  overflow-x: hidden;
}

body.immersive {
  height: 100dvh;
  min-height: 100dvh;
  overflow: hidden;
}

button, a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
  touch-action: manipulation;
}

button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--aqua);
  outline-offset: 6px;
}

[hidden] { display: none !important; }

::selection {
  background: var(--aqua);
  color: #07222a;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

figure {
  margin: 0;
  min-width: 0;
}

a { color: var(--aqua); }

/* PORTADA */

.portada {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 100px 9%;
  overflow: hidden;
  isolation: isolate;
  color: #143e56;
  background:
    radial-gradient(ellipse at 85% 12%, #887fe848, transparent 43%),
    radial-gradient(ellipse at 10% 88%, #44d7cc60, transparent 45%),
    linear-gradient(125deg, #ebfcf8, #c6e9ee 52%, #b6cdee);
}

.portada::before {
  content: "";
  position: absolute;
  top: -25%;
  right: -28%;
  width: 75%;
  height: 130%;
  border: 1px solid #ffffff7a;
  border-radius: 48% 52% 65% 35%;
  transform: rotate(-25deg);
}

.portada-fondo {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.esfera {
  position: absolute;
  animation: float 10s ease-in-out infinite alternate;
}

.esfera-1 {
  top: -105px;
  right: -105px;
  width: 580px;
  height: 450px;
  border-radius: 36% 64% 67% 33% / 45% 40% 60% 55%;
  background: linear-gradient(140deg, #ffffffd9, #73d6e040, #7076de73);
  box-shadow:
    inset 18px 20px 60px #ffffffa6,
    0 30px 90px #4073a221;
}

.esfera-2 {
  right: 5%;
  bottom: -200px;
  width: 420px;
  height: 530px;
  border-radius: 70% 30% 44% 56% / 35% 56% 44% 65%;
  background: linear-gradient(160deg, #ffffff73, #40c4cb66, #6c8fe44d);
  animation-delay: -4s;
}

.esfera-3 {
  top: 25%;
  right: 29%;
  width: 150px;
  height: 150px;
  border: 1px solid #ffffffcc;
  border-radius: 40% 60% 72% 28%;
  background: #ffffff26;
  backdrop-filter: blur(15px);
  animation-delay: -7s;
}

.portada-contenido {
  position: relative;
  width: 100%;
  max-width: 1150px;
  animation: arrive 1s both;
}

.portada-etiqueta {
  margin-bottom: 45px;
  font: 11px monospace;
  text-transform: uppercase;
  letter-spacing: 3px;
}

.portada h1 {
  max-width: 1050px;
  margin: 0;
  font: 800 clamp(58px, 9vw, 135px)/.98 Syne, Arial, sans-serif;
  letter-spacing: -.06em;
  text-wrap: balance;
}

.portada h2 {
  max-width: 450px;
  margin: 35px 0;
  font-size: clamp(17px, 1.8vw, 23px);
  font-weight: 400;
  line-height: 1.6;
}

.portada-entrar {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 60px;
  border: 0;
  border-radius: 50px;
  padding: 20px 28px;
  background: #153f50;
  color: #effaf5;
}

.icono-entrar {
  width: 12px;
  height: 12px;
  border-top: 1px solid;
  border-right: 1px solid;
  transform: rotate(45deg);
}

/* LUZ Y PROFUNDIDAD */

.flow-field {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 30% 60%, #166e793b, transparent 60%),
    radial-gradient(ellipse at 100% 0%, #2546a82b, transparent 55%);
}

.immersive[data-view="cover"] .flow-field {
  visibility: hidden;
}

.immersive:not([data-view="cover"]) .portada,
.immersive[data-view="cover"] .universe,
.immersive[data-view="cover"] main,
.immersive[data-view="cover"] .scene-hud,
.immersive[data-view="hub"] main,
.immersive[data-view="hub"] .scene-hud,
.immersive[data-view="scene"] .universe,
.immersive footer,
.volver-explorar {
  display: none;
}

/* NAVEGACIÓN */

.brand {
  position: fixed;
  top: 30px;
  left: 4vw;
  z-index: 45;
  border: 0;
  padding: 0;
  background: none;
  font: 11px/1.5 monospace;
  letter-spacing: 2px;
  text-align: left;
}

.immersive[data-view="cover"] .brand { color: #153f50; }
.brand:hover { color: var(--aqua); }

.navegacion {
  position: relative;
  z-index: 50;
}

.nav-abrir {
  position: fixed;
  right: 4vw;
  top: 25px;
  z-index: 52;
  border: 1px solid #91c7c544;
  border-radius: 40px;
  padding: 13px 22px;
  background: #0d2937c9;
  backdrop-filter: blur(16px);
}

.nav-icono::after {
  content: " +";
  margin-left: 15px;
  color: var(--aqua);
}

.immersive[data-view="cover"] .nav-abrir {
  color: #153f50;
  background: #edf9f2d9;
}

.nav-secciones {
  position: fixed;
  inset: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-content: center;
  gap: 0 6vw;
  padding: 100px 9vw 40px;
  overflow: auto;
  background: #071d29f5;
  backdrop-filter: blur(24px);
}

.nav-secciones::before {
  content: "DISTINTAS PARTES. UNA MISMA VIDA.";
  position: absolute;
  top: 50px;
  left: 9vw;
  color: var(--muted);
  font: 10px monospace;
  letter-spacing: 2px;
}

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 20px;
  border-bottom: 1px solid #84c7c52b;
  padding: 14px 0;
  color: #e2f4f0;
  text-decoration: none;
  font: 600 clamp(21px, 2.5vw, 37px) Syne, Arial;
  transition: color .3s, transform .3s;
}

.nav-item::before {
  content: attr(data-number);
  color: var(--muted);
  font: 10px monospace;
}

.nav-item img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}

.nav-item:hover,
.nav-item[aria-current] {
  color: var(--aqua);
  transform: translateX(8px);
}

.nav-item.visited::after {
  content: "↗";
  margin-left: auto;
  color: var(--aqua);
  font: 16px Arial;
}

/* ESPACIO DE PRESENTACIÓN */

.universe {
  position: fixed;
  inset: 0;
  z-index: 1;
  overflow: auto;
  isolation: isolate;
  background: radial-gradient(
    ellipse at 30% 45%,
    #14495522,
    transparent 55%
  );
}

.universe-art {
  position: absolute;
  top: 12%;
  left: 5%;
  width: 53%;
  height: 70%;
  perspective: 1100px;
  transform-style: preserve-3d;
}

.universe-art::before {
  content: "";
  position: absolute;
  inset: 10% 8% 0;
  background: radial-gradient(ellipse, #50dbd12b, transparent 65%);
  filter: blur(30px);
}

.liquid-seam {
  position: absolute;
  left: 9%;
  top: 0;
  width: 75%;
  height: 100%;
  border: 1px solid #87ffdc32;
  border-radius: 48% 52% 23% 77% / 63% 39% 61% 37%;
  transform: rotate(-18deg);
  box-shadow:
    0 0 80px #27c4b50d,
    inset 0 0 50px #2dc7b50d;
  animation: breathe 9s ease-in-out infinite alternate;
}

.hero-memory {
  position: absolute;
  left: 18%;
  top: 3%;
  width: 59%;
  height: 86%;
  border-radius: 46% 46% 4px 4px;
  object-fit: contain;
  filter: drop-shadow(0 20px 35px #0007);
  transform: translate3d(var(--mx), var(--my), 0) rotate(-5deg);
  transition: transform .7s;
  mask-image: linear-gradient(#000 84%, transparent);
}

.echo {
  position: absolute;
  width: 24%;
  height: 33%;
  object-fit: cover;
  opacity: .7;
  filter: saturate(.65);
  box-shadow: 0 20px 60px #0007;
}

.echo-one {
  left: 0;
  top: 13%;
  border-radius: 50% 50% 8px 8px;
  transform:
    translate(
      calc(var(--mx) * -1),
      calc(var(--my) * -.6)
    )
    rotate(-12deg);
}

.echo-two {
  right: 0;
  bottom: 17%;
  border-radius: 5px 65px 5px 5px;
  transform:
    translate(
      calc(var(--mx) * -.7),
      calc(var(--my) * -.8)
    )
    rotate(12deg);
}

.art-caption {
  position: absolute;
  left: 4%;
  bottom: 0;
  z-index: -1;
  color: #c5f8eb1c;
  font: 800 clamp(40px, 6vw, 95px)/.82 Syne, Arial;
  letter-spacing: -.075em;
}

.universe-copy {
  position: absolute;
  left: 62%;
  right: 5%;
  top: 22%;
  max-width: 540px;
}

.eyebrow {
  margin: 0 0 28px;
  color: var(--aqua);
  font: 10px/1.6 monospace;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.universe-title {
  margin: 0 0 24px;
  font: 700 clamp(40px, 4.5vw, 74px)/1.03 Syne, Arial;
  letter-spacing: -.055em;
  text-wrap: balance;
}

.universe-intro {
  max-width: 440px;
  margin-bottom: 28px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.75;
}

.universe-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.primary {
  border: 0;
  border-radius: 40px;
  padding: 18px 24px;
  background: var(--aqua);
  color: #092b32;
  font-weight: 600;
  transition: box-shadow .3s, transform .3s;
}

.primary:hover {
  box-shadow: 0 0 40px #7bf6dc33;
  transform: translateY(-3px);
}

.round {
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border: 1px solid #a1d3cb55;
  border-radius: 50%;
  background: #0d2a3640;
  color: inherit;
}

.round:hover,
.round-label:hover {
  border-color: var(--aqua);
  color: var(--aqua);
}

.discovery-count {
  margin-top: 25px;
  color: #6faaa8;
  font: 10px monospace;
  letter-spacing: 1px;
}

.frequency {
  position: absolute;
  bottom: 25px;
  left: 4vw;
  right: 4vw;
}

.frequency-heading {
  display: flex;
  justify-content: space-between;
  margin-bottom: 14px;
  color: #7eaaa9;
  font: 9px monospace;
  letter-spacing: 1.5px;
}

.frequency-options {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 5px 0;
  scrollbar-width: thin;
  scrollbar-color: #7bf6dc33 transparent;
}

.frequency-item {
  position: relative;
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 12px;
  min-width: 100px;
  border: 0;
  border-top: 1px solid #5e939c55;
  padding: 15px 5px 8px;
  background: transparent;
  color: #8fa8b0;
  font-size: 11px;
  text-align: left;
  white-space: nowrap;
  transition: color .3s, border .3s;
}

.frequency-item span:first-child {
  font: 9px monospace;
  opacity: .6;
}

.frequency-item[aria-pressed="true"] {
  border-top-color: var(--aqua);
  color: var(--aqua);
}

.frequency-item[aria-pressed="true"]::before {
  content: "";
  position: absolute;
  top: -3px;
  left: 4px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--aqua);
  box-shadow: 0 0 12px var(--aqua);
}

.universe[data-facet="codigo-abierto"] .hero-memory,
.universe[data-facet="en-orbita"] .hero-memory,
.universe[data-facet="mi-lado-off"] .hero-memory {
  left: 2%;
  width: 84%;
  border-radius: 8px;
  mask-image: none;
  transform: translate(var(--mx), var(--my)) rotate(-5deg);
}

/* ESCENARIOS */

main {
  position: relative;
  z-index: 2;
  padding: 100px 5vw 110px;
}

main section { margin-bottom: 80px; }

.immersive main {
  position: fixed;
  inset: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scroll-padding-top: 100px;
  view-transition-name: experience;
}

.immersive main section {
  position: relative;
  max-width: 1600px;
  min-height: calc(100svh - 210px);
  margin: 0 auto;
}

.scene-number {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--aqua);
  font: 9px monospace;
  letter-spacing: 2px;
}

section > h2 {
  margin: 0 0 30px;
  font: 600 24px/1.2 Syne, Arial;
  letter-spacing: -1px;
}

section h3 {
  margin: 0 0 22px;
  font: 600 clamp(23px, 2.2vw, 36px)/1.2 Syne, Arial;
  letter-spacing: -1px;
}

section p {
  max-width: 65ch;
  color: #b6cdd0;
  font-size: 15px;
  line-height: 1.8;
}

.scene-hud {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 35;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 17px 4vw;
  background: linear-gradient(transparent, #061c25 35%);
  backdrop-filter: blur(12px);
}

.text-control {
  border: 0;
  padding: 14px 0;
  background: none;
  color: var(--aqua);
  font-size: 12px;
}

.scene-position {
  color: #789fa4;
  font: 10px monospace;
  letter-spacing: 1px;
}

.round-label {
  border: 1px solid #94c6c44a;
  border-radius: 35px;
  padding: 13px 20px;
  background: transparent;
  font-size: 12px;
  transition: color .3s, border .3s;
}

.photo-button {
  position: relative;
  display: block;
  width: 100%;
  border: 0;
  border-radius: inherit;
  padding: 0;
  background: transparent;
  color: inherit;
  cursor: zoom-in;
}

.photo-button img {
  width: 100%;
  object-fit: contain;
}

.photo-button::after {
  content: "+";
  position: absolute;
  bottom: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid #b3f1df66;
  border-radius: 50%;
  background: #072a32b3;
  color: var(--aqua);
  font: 18px Arial;
  opacity: 0;
  transition: opacity .3s;
}

.photo-button:hover::after,
.photo-button:focus-visible::after {
  opacity: 1;
}

figcaption {
  color: #b5d2d2;
  font-size: 14px;
  line-height: 1.7;
}

.interaction-hint {
  display: block;
  margin-top: 18px;
  color: #678f96;
  font: 10px monospace;
  letter-spacing: 1px;
  text-align: center;
}

/* IDENTIDAD */

.presentacion {
  display: grid;
  grid-template-columns: .9fr 1.2fr;
  align-items: center;
  gap: 7vw;
}

.presentacion-texto { max-width: 470px; }

.presentacion-texto h3 {
  color: #dcfaee;
  font-size: clamp(29px, 3.5vw, 54px);
}

.presentacion-texto .round-label { margin-top: 22px; }

.presentacion-imagen {
  position: relative;
  min-height: 530px;
  perspective: 1200px;
}

.presentacion-imagen .photo-button {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  width: 58%;
  transform: rotate(-7deg) translate(var(--mx), var(--my));
  transition: transform .7s, left .7s, opacity .7s;
}

.presentacion-imagen .photo-button:last-child {
  top: 65px;
  left: 45%;
  z-index: 1;
  width: 48%;
  opacity: .68;
  transform: rotate(9deg);
}

.presentacion-imagen img {
  max-height: 530px;
  border-radius: 80px 80px 4px 4px;
  object-fit: contain;
  box-shadow: 0 30px 60px #0005;
}

.presentacion-imagen.reversed .photo-button:first-child {
  z-index: 1;
  opacity: .6;
  transform: rotate(-12deg) scale(.88);
}

.presentacion-imagen.reversed .photo-button:last-child {
  z-index: 3;
  opacity: 1;
  transform: rotate(0) translateX(-30px) scale(1.12);
}

/* EN ÓRBITA */

#en-orbita {
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  align-content: start;
  gap: 0 6vw;
}

#en-orbita > .scene-number,
#en-orbita > h2 {
  grid-column: 1 / -1;
}

.mode-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 26px;
}

.mode-switch button {
  border: 1px solid #7daba64d;
  border-radius: 30px;
  padding: 11px 18px;
  background: none;
  color: #9fb9bc;
  font-size: 12px;
}

.mode-switch button[aria-pressed="true"],
.mode-switch button[aria-selected="true"] {
  border-color: var(--aqua);
  background: var(--aqua);
  color: #082a32;
}

#en-orbita > .mode-switch {
  grid-column: 1;
  grid-row: 3;
}

#en-orbita > .formacion {
  grid-column: 1;
  grid-row: 4 / 7;
  padding: 30px 0;
}

.learning-topic h3 { max-width: 350px; }
.learning-topic p { max-width: 410px; }

.imagenes-estudios {
  grid-column: 2;
  grid-row: 4;
  align-self: start;
  min-width: 0;
  border: 1px solid #6599a94d;
  border-radius: 12px;
  overflow: hidden;
  background: #0a202c;
  box-shadow: 0 35px 90px #0005;
}

.imagenes-estudios::before {
  content: "● ● ●   /   CAPTURAS / MI APRENDIZAJE";
  display: block;
  border-bottom: 1px solid #6599a933;
  padding: 14px 20px;
  color: #79b5b5;
  font: 9px monospace;
  letter-spacing: 2px;
}

.imagenes-estudios img {
  height: 340px;
  padding: 15px;
}

.imagenes-estudios figcaption {
  padding: 0 25px 20px;
}

.gallery-controls {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 15px;
}

.gallery-controls > span {
  color: #86b4b6;
  font: 10px monospace;
  letter-spacing: 2px;
}

.thumbnail-strip {
  display: flex;
  gap: 10px;
  min-width: 0;
  overflow: auto;
  padding: 5px 0 12px;
  scrollbar-width: thin;
  scrollbar-color: #76dcca55 transparent;
}

.thumbnail {
  position: relative;
  flex: 0 0 52px;
  width: 52px;
  height: 58px;
  border: 1px solid #61899544;
  border-radius: 8px;
  padding: 3px;
  background: #0c2934;
  opacity: .5;
  transition: opacity .3s, border .3s;
}

.thumbnail img {
  width: 100%;
  height: 100%;
  border-radius: 4px;
  object-fit: cover;
}

.thumbnail[aria-pressed="true"] {
  border-color: var(--aqua);
  opacity: 1;
  box-shadow: 0 0 12px #7bf6dc1a;
}

#en-orbita > .gallery-controls {
  grid-column: 2;
  grid-row: 3;
  justify-self: end;
}

#en-orbita > .thumbnail-strip {
  grid-column: 2;
  grid-row: 5;
  margin-top: 14px;
}

/* CÓDIGO ABIERTO */

.proyecto {
  display: grid;
  grid-template-columns: .75fr 1.3fr;
  align-items: start;
  gap: 20px 6vw;
}

.proyecto > h3 {
  grid-column: 1;
  grid-row: 1;
  margin-top: 30px;
  color: #ddfaf0;
  font-size: clamp(32px, 4vw, 64px);
}

.proyecto > .photo-button {
  grid-column: 2;
  grid-row: 1 / 5;
  box-shadow: 0 40px 100px #0007;
  transform: perspective(1300px) rotateY(-9deg) rotateZ(2deg);
  transition: transform .6s;
}

.proyecto > .photo-button:hover {
  transform: perspective(1300px) rotateY(0) rotateZ(0);
}

.proyecto > .photo-button img {
  max-height: 60svh;
}

.proyecto > a {
  grid-column: 1;
  grid-row: 2;
  justify-self: start;
  border-radius: 40px;
  padding: 17px 24px;
  background: var(--aqua);
  color: #052b30;
  font-size: 13px;
  text-decoration: none;
}

.project-reveal {
  grid-column: 1;
  grid-row: 3;
  justify-self: start;
}

.project-story {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  max-width: 950px;
  margin-top: 25px;
  border-top: 1px solid #6d9c9c44;
  padding-top: 20px;
}

.project-story p { font-size: 14px; }

/* MI LADO OFF */

.gustos > div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 15px 7vw;
}

.gustos h3,
.gustos p {
  grid-column: 1;
}

.gustos figure {
  grid-column: 2;
  grid-row: 1 / 5;
  justify-self: center;
  max-width: 650px;
}

.gustos figure img {
  max-height: 45svh;
  filter: drop-shadow(0 30px 40px #0007);
}

.gustos figcaption { margin-top: 18px; }
.gustos-personales p { max-width: 650px; }

.gustos-personales::after {
  content: "OFF";
  grid-column: 2;
  grid-row: 1 / 4;
  color: #7bf6dc1a;
  font: 800 clamp(100px, 20vw, 300px) Syne, Arial;
  transform: rotate(-10deg);
}

.gustos .round-label {
  grid-column: 1;
  justify-self: start;
  margin-top: 10px;
}

.pulse-bars {
  grid-column: 1;
  display: flex;
  align-items: center;
  gap: 5px;
  height: 65px;
  max-width: 380px;
}

.pulse-bars i {
  display: block;
  flex: 1;
  max-width: 8px;
  height: var(--level, 25px);
  border-radius: 5px;
  background: linear-gradient(var(--aqua), #3b78e7);
  transform: scaleY(.4);
  animation: beat .6s ease-in-out infinite alternate;
  animation-delay: calc(var(--i) * -.13s);
  animation-play-state: paused;
}

.pulse-on .pulse-bars i {
  animation-play-state: running;
}

#mi-lado-off[data-mode="1"]::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(
    ellipse at 75% 40%,
    #913abd30,
    transparent 60%
  );
}

/* VIAJES */

#viajes > .gallery-controls {
  position: absolute;
  right: 0;
  top: 20px;
}

.galeria-viajes {
  touch-action: pan-y;
}

.galeria-viajes figure {
  display: grid;
  grid-template-columns: 1.4fr .65fr;
  align-items: center;
  gap: 6vw;
}

.galeria-viajes .photo-button {
  position: relative;
  max-width: 950px;
}

.galeria-viajes img {
  height: 56svh;
  object-fit: contain;
  filter: drop-shadow(0 25px 40px #0006);
}

.galeria-viajes figcaption {
  max-width: 430px;
  border-left: 1px solid #6ee7ce55;
  padding-left: 25px;
  font-size: clamp(18px, 1.9vw, 27px);
  font-weight: 400;
  line-height: 1.6;
}

.galeria-viajes + .thumbnail-strip {
  justify-content: center;
  margin-top: 24px;
}

/* AFTER HOURS */

#after-hours {
  display: grid;
  grid-template-columns: .6fr 1.4fr;
  align-content: start;
  gap: 0 5vw;
}

#after-hours > .scene-number,
#after-hours > h2 {
  grid-column: 1 / -1;
}

#after-hours > p {
  grid-column: 1;
  margin-top: 0;
  font-size: 18px;
}

#after-hours > .gallery-controls {
  grid-column: 1;
  grid-row: 5;
  align-self: start;
  margin-top: 20px;
}

#after-hours > .noches {
  grid-column: 2;
  grid-row: 3 / 9;
  touch-action: pan-y;
}

.noches figure {
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
}

.noches img {
  height: 52svh;
  object-fit: contain;
  filter: brightness(.82);
  transition: filter .5s;
}

.noches figcaption {
  max-width: 540px;
  margin-top: 20px;
  padding: 0 20px;
  text-align: center;
}

.noches + .thumbnail-strip {
  grid-column: 1;
  grid-row: 6;
  flex-wrap: wrap;
  max-width: 260px;
  margin-top: 20px;
  overflow: visible;
}

.flash-toggle {
  grid-column: 1;
  grid-row: 7;
  justify-self: start;
  align-self: start;
  margin-top: 20px;
}

#after-hours::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(
    ellipse at 80% 30%,
    #ab2aa21c,
    transparent 60%
  );
  transition: background .5s;
}

.flash-on .noches img {
  filter: brightness(1.15) saturate(1.15);
}

#after-hours.flash-on::before {
  background: radial-gradient(
    ellipse at 75% 40%,
    #84f7d73b,
    transparent 65%
  );
}

/* LA CREW */

.amigos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 8vw;
  padding: 0 4vw;
}

.amigos figure {
  transition: transform .7s, opacity .7s;
}

.amigos figure:first-child {
  transform: rotate(-4deg);
}

.amigos figure:last-child {
  margin-top: 30px;
  transform: rotate(5deg);
}

.amigos img {
  height: 45svh;
  object-fit: contain;
  filter: drop-shadow(0 20px 35px #0006);
}

.amigos figcaption {
  max-width: 500px;
  margin: 20px auto 0;
}

.amigos.crossed figure:first-child {
  transform: translateX(12%) rotate(4deg);
}

.amigos.crossed figure:last-child {
  transform: translateX(-12%) rotate(-5deg);
}

.crew-switch {
  display: block;
  margin: 35px auto 0;
}

/* RAW */

#raw > h2 {
  margin-bottom: 10px;
  color: #e4fff3;
  font-size: 48px;
}

.galeria {
  position: relative;
  width: min(850px, 85%);
  height: 52svh;
  min-height: 300px;
  margin: 0 auto;
  perspective: 1400px;
  touch-action: pan-y;
}

.raw-foto {
  position: absolute;
  inset: 0;
  width: 68%;
  height: 100%;
  margin: auto;
  opacity: .3;
  pointer-events: none;
  transform:
    translateX(calc(var(--pos) * 15%))
    translateY(calc(var(--pos) * 8px))
    translateZ(calc(var(--abs) * -100px))
    rotate(calc(var(--pos) * 6deg))
    scale(calc(1 - var(--abs) * .1));
  transition:
    transform .7s cubic-bezier(.2, .8, .2, 1),
    opacity .7s;
}

.raw-foto.active {
  opacity: 1;
  pointer-events: auto;
}

.raw-foto .photo-button {
  height: 100%;
  filter: drop-shadow(0 25px 40px #0008);
}

.raw-foto img {
  height: 100%;
  object-fit: contain;
}

.raw-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 25px;
}

.raw-controls > span {
  color: var(--muted);
  font: 11px monospace;
}

/* UNRELEASED */

.ideas {
  max-width: 1200px;
  margin: 0 auto;
}

.ideas > p {
  max-width: 630px;
  margin: 0 0 35px;
}

.idea-choices {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 50px;
}

.idea-choices button {
  position: relative;
  border: 0;
  border-top: 1px solid #77b6b44a;
  padding: 25px 5px;
  background: transparent;
  color: #93b4ba;
  font-size: 13px;
  line-height: 1.6;
  text-align: left;
}

.idea-choices button::before {
  content: "+";
  display: block;
  margin-bottom: 20px;
  color: var(--aqua);
  font: 28px Syne;
}

.idea-choices button[aria-pressed="true"] {
  border-color: var(--aqua);
  color: var(--aqua);
}

.idea-choices button[aria-pressed="true"]::before {
  content: "↗";
}

.ideas article {
  position: relative;
  max-width: 800px;
  margin-left: 12%;
  border-left: 1px solid #7bf6dc55;
  padding: 10px 0 20px 35px;
}

.ideas article h3 {
  font-size: clamp(28px, 3.5vw, 50px);
}

.ideas article p { font-size: 17px; }

/* CONEXIONES ENTRE FACETAS */

.connections {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 28px;
  margin-top: 55px;
  border-top: 1px solid #80b8ba20;
  padding: 25px 0 5px;
}

.connections > span {
  color: #59858c;
  font: 8px monospace;
  letter-spacing: 2px;
}

.connection {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 0;
  padding: 0;
  background: transparent;
  color: #adcac8;
  font-size: 11px;
}

.connection img {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  object-fit: cover;
  opacity: .7;
  transition: opacity .3s, transform .3s;
}

.connection:hover { color: var(--aqua); }

.connection:hover img {
  opacity: 1;
  transform: scale(1.12);
}

body[data-zone="after-hours"] .flow-field {
  background:
    radial-gradient(ellipse at 80% 30%, #852a7433, transparent 65%),
    radial-gradient(ellipse at 20% 80%, #1d56633b, transparent 60%);
}

body[data-zone="raw"] .flow-field {
  background: radial-gradient(
    ellipse at 50% 65%,
    #244b5b66,
    transparent 65%
  );
}

body[data-zone="unreleased"] .flow-field {
  background: radial-gradient(
    ellipse at 60% 50%,
    #275d6655,
    transparent 65%
  );
}

/* VISOR DE FOTOGRAFÍAS */

.photo-viewer {
  width: 100vw;
  max-width: 100vw;
  height: 100dvh;
  max-height: 100dvh;
  border: 0;
  padding: 0;
  background: #04131bf5;
  color: var(--ink);
}

.photo-viewer::backdrop { background: #04131b; }

.photo-viewer[open] {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 75px 6vw 25px;
}

.photo-viewer > img {
  max-width: 100%;
  max-height: 65dvh;
  object-fit: contain;
}

.photo-viewer > p {
  max-width: 800px;
  margin: 0;
  color: #bfd9d5;
  font-size: 15px;
  line-height: 1.7;
  text-align: center;
}

.viewer-close {
  position: absolute;
  right: 4vw;
  top: 25px;
  border: 1px solid #7fa8a755;
  border-radius: 30px;
  padding: 12px 20px;
  background: none;
}

.viewer-controls {
  display: flex;
  gap: 15px;
}

/* ANIMACIONES */

@keyframes float {
  to { translate: -25px 35px; rotate: 8deg; }
}

@keyframes arrive {
  from { opacity: 0; transform: translateY(25px); }
  to { opacity: 1; transform: none; }
}

@keyframes breathe {
  to {
    transform: rotate(5deg) scale(.94);
    border-radius: 39% 61% 64% 36% / 50% 55% 45% 50%;
  }
}

@keyframes beat {
  to { transform: scaleY(2); }
}

@keyframes depart {
  to {
    opacity: 0;
    filter: blur(8px);
    transform: scale(1.035);
  }
}

::view-transition-old(experience) {
  animation: depart .35s ease both;
}

::view-transition-new(experience) {
  animation: arrive .6s cubic-bezier(.2, .8, .2, 1) both;
}

/* PANTALLAS DE POCA ALTURA */

@media (max-height: 760px) and (min-width: 901px) {
  .universe-copy { top: 18%; }
  .universe-title { font-size: 48px; }
  .universe-intro {
    margin-bottom: 18px;
    font-size: 13px;
    line-height: 1.6;
  }
  .eyebrow { margin-bottom: 18px; }
  .universe-art { top: 11%; height: 66%; }
  .frequency { bottom: 15px; }
  .presentacion-imagen { min-height: 390px; }
  .presentacion-imagen img { max-height: 390px; }
}

/* TABLETS */

@media (max-width: 1000px) and (min-width: 761px) {
  .universe-art { left: 1%; width: 51%; }
  .universe-copy { left: 55%; top: 19%; right: 4%; }
  .universe-title { font-size: 42px; }
  .universe-intro { font-size: 13px; }
  .universe-actions { gap: 7px; }
  .primary { padding: 15px 18px; font-size: 13px; }
  .frequency-item { min-width: 105px; }
  .presentacion { gap: 4vw; }
  .presentacion-imagen { min-height: 420px; }
  .presentacion-imagen img { max-height: 400px; }
}

/* CELULARES */

@media (max-width: 760px) {
  .brand {
    top: 25px;
    left: 6vw;
    max-width: 150px;
    font-size: 8px;
    letter-spacing: 1px;
  }

  .nav-abrir {
    right: 5vw;
    top: 18px;
    padding: 11px 17px;
    font-size: 12px;
  }

  .nav-secciones {
    grid-template-columns: 1fr;
    align-content: start;
    padding: 90px 6vw 30px;
  }

  .nav-secciones::before {
    top: 65px;
    left: 6vw;
    font-size: 8px;
  }

  .nav-item { gap: 14px; padding: 10px 0; font-size: 22px; }
  .nav-item img { width: 36px; height: 36px; }
  .nav-item::before { font-size: 8px; }

  .portada { padding: 100px 7% 60px; }
  .portada h1 {
    font-size: clamp(52px, 12vw, 85px);
    letter-spacing: -.055em;
  }
  .portada h2 { font-size: 18px; }
  .portada-etiqueta { font-size: 9px; }
  .esfera-1 { right: -260px; }
  .esfera-3 { right: 5%; width: 100px; height: 100px; }

  .universe {
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
    padding: 80px 6vw 30px;
  }

  .universe-art {
    position: relative;
    left: auto;
    top: auto;
    order: 1;
    flex-shrink: 0;
    width: 100%;
    height: 330px;
    min-height: 260px;
    margin: 0 auto 10px;
  }

  .hero-memory { left: 20%; top: 0; width: 56%; height: 95%; }
  .echo-one { left: 0; top: 10%; width: 24%; height: 39%; }
  .echo-two { right: 0; bottom: 12%; width: 24%; height: 39%; }
  .liquid-seam { left: 6%; width: 85%; height: 100%; }
  .art-caption { left: 8%; bottom: 0; font-size: 56px; opacity: .7; }

  .universe-copy {
    position: relative;
    left: auto;
    right: auto;
    top: auto;
    order: 2;
    max-width: none;
    padding-top: 15px;
  }

  .eyebrow {
    margin-bottom: 16px;
    font-size: 8px;
    letter-spacing: 1px;
  }

  .universe-title {
    max-width: 430px;
    margin-bottom: 18px;
    font-size: clamp(34px, 8.5vw, 48px);
    font-weight: 600;
  }

  .universe-intro {
    max-width: none;
    margin-bottom: 22px;
    font-size: 13px;
    line-height: 1.7;
  }

  .primary { padding: 16px 20px; font-size: 12px; }
  .round { width: 42px; height: 42px; }
  .discovery-count { margin-top: 20px; }

  .frequency {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    order: 3;
    margin-top: 25px;
    padding-bottom: 10px;
  }

  .frequency-heading { font-size: 8px; letter-spacing: .8px; }
  .frequency-heading span:last-child { display: none; }
  .frequency-item { flex: 0 0 108px; font-size: 10px; }
  .frequency-options { padding-bottom: 12px; }

  .universe[data-facet="codigo-abierto"] .hero-memory,
  .universe[data-facet="en-orbita"] .hero-memory,
  .universe[data-facet="mi-lado-off"] .hero-memory {
    left: 5%;
    width: 90%;
  }

  .scene-hud {
    gap: 10px;
    padding: 12px 5vw;
    padding-bottom: max(12px, env(safe-area-inset-bottom));
  }

  .text-control { font-size: 10px; white-space: nowrap; }

  .scene-position {
    max-width: 40%;
    font-size: 8px;
    line-height: 1.5;
    letter-spacing: 0;
    text-align: center;
  }

  main { padding: 95px 6vw 110px; }
  .immersive main { scroll-padding-top: 95px; }
  .scene-number { font-size: 8px; }
  section > h2 { margin-bottom: 30px; font-size: 23px; }
  section p { font-size: 14px; }

  .presentacion {
    display: flex;
    flex-direction: column-reverse;
    gap: 25px;
  }

  .presentacion-imagen { width: 100%; min-height: 360px; }
  .presentacion-imagen img { max-height: 350px; }
  .presentacion-imagen .photo-button:last-child { top: 40px; }
  .presentacion-texto { max-width: none; }
  .presentacion-texto h3 { font-size: 30px; }
  .presentacion-texto .round-label { margin-top: 12px; }

  #en-orbita { display: flex; flex-direction: column; gap: 0; }

  #en-orbita > .formacion {
    min-height: 220px;
    padding: 0 0 20px;
  }

  #en-orbita > .gallery-controls { align-self: flex-end; }
  .imagenes-estudios { width: 100%; flex-shrink: 0; }
  .imagenes-estudios img { height: 260px; }
  .imagenes-estudios::before { font-size: 7px; letter-spacing: 1px; }
  .imagenes-estudios figcaption { font-size: 12px; }
  .thumbnail-strip { width: 100%; }
  .thumbnail { flex-basis: 45px; width: 45px; height: 52px; }

  .proyecto { display: flex; flex-direction: column; gap: 24px; }
  .proyecto > h3 { margin: 0; font-size: 40px; }

  .proyecto > .photo-button {
    order: 1;
    width: 100%;
    transform: rotate(-2deg);
  }

  .proyecto > a {
    order: 2;
    align-self: flex-start;
    font-size: 12px;
  }

  .project-reveal { order: 3; align-self: flex-start; }
  .project-story { order: 4; display: block; margin-top: 0; padding-top: 10px; }
  .project-story p { font-size: 14px; }

  .gustos > div {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 15px;
  }

  .gustos h3 { margin-bottom: 5px; font-size: 29px; }
  .gustos figure { order: 3; width: 100%; }
  .gustos figure img { max-height: 44svh; }
  .gustos figcaption { margin-top: 14px; font-size: 12px; }

  .gustos .round-label {
    order: 5;
    align-self: flex-start;
    margin-top: 5px;
  }

  .pulse-bars { order: 4; height: 45px; }
  .gustos-personales::after { order: 3; font-size: 125px; text-align: center; }
  .mode-switch { gap: 7px; }
  .mode-switch button { padding: 10px 13px; font-size: 10px; }

  #viajes > .gallery-controls {
    position: static;
    justify-content: flex-end;
    margin-top: -10px;
  }

  .galeria-viajes figure {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 25px;
  }

  .galeria-viajes img { height: 48svh; }
  .galeria-viajes figcaption { padding-left: 18px; font-size: 17px; }

  .galeria-viajes + .thumbnail-strip {
    justify-content: flex-start;
    margin-top: 25px;
  }

  #after-hours { display: flex; flex-direction: column; }
  #after-hours > p { margin-bottom: 12px; font-size: 15px; }

  #after-hours > .gallery-controls {
    align-self: flex-end;
    margin-top: 15px;
  }

  .noches img { height: 48svh; }
  .noches figcaption { margin-top: 20px; padding: 0; font-size: 13px; }

  .noches + .thumbnail-strip {
    order: 2;
    flex-wrap: nowrap;
    max-width: none;
    margin-top: 20px;
    overflow: auto;
  }

  .flash-toggle { order: 3; align-self: flex-start; }

  .amigos {
    display: flex;
    flex-direction: column;
    gap: 35px;
    padding: 0 10px;
  }

  .amigos figure { width: 100%; }
  .amigos figure:last-child { margin-top: 0; }
  .amigos img { height: 42svh; }
  .amigos figcaption { margin-top: 16px; font-size: 13px; }
  .amigos.crossed figure:first-child { transform: rotate(3deg); }
  .amigos.crossed figure:last-child { transform: rotate(-3deg); }
  .crew-switch { margin-top: 30px; }

  .galeria {
    width: 100%;
    height: 48svh;
    min-height: 280px;
    overflow: clip;
  }

  .raw-foto {
    width: 78%;
    transform:
      translateX(calc(var(--pos) * 10%))
      translateY(calc(var(--pos) * 5px))
      rotate(calc(var(--pos) * 4deg))
      scale(calc(1 - var(--abs) * .09));
  }

  .raw-controls { flex-wrap: wrap; gap: 12px; }
  .raw-controls .round-label { padding: 12px 15px; font-size: 10px; }
  .interaction-hint { font-size: 8px; }
  .ideas > p { margin-bottom: 20px; font-size: 14px; }

  .idea-choices {
    grid-template-columns: 1fr 1fr;
    gap: 12px 20px;
    margin-bottom: 30px;
  }

  .idea-choices button { padding: 15px 0; font-size: 11px; }
  .idea-choices button::before { margin-bottom: 10px; font-size: 22px; }
  .ideas article { margin-left: 0; padding-left: 20px; }
  .ideas article h3 { font-size: 28px; }
  .ideas article p { font-size: 15px; }

  .photo-viewer[open] { gap: 16px; padding: 70px 20px 25px; }
  .photo-viewer > img { max-height: 57dvh; }
  .photo-viewer > p { font-size: 13px; }
  .viewer-close { right: 20px; top: 20px; font-size: 12px; }
  .viewer-controls .round-label { padding: 12px 18px; }
  .photo-button::after { opacity: 1; }

  .connections {
    justify-content: flex-start;
    gap: 20px;
    margin-top: 35px;
  }

  .connections > span { width: 100%; }
  .connection { font-size: 10px; }
  .connection img { width: 30px; height: 30px; }
  #after-hours > .connections { order: 4; }
}

/* MOVIMIENTO REDUCIDO */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }

  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) {
    animation: none !important;
  }
}