@font-face { font-family: 'Sofia Sans'; font-style: normal; font-weight: 400 800; font-display: swap; src: url(/assets/fonts/Yq6R-LCVXSLy9uPBwlATrO96kjouQb5-6g.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Sofia Sans'; font-style: normal; font-weight: 400 800; font-display: swap; src: url(/assets/fonts/Yq6R-LCVXSLy9uPBwlATrOF6kjouQb4.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Sofia Sans Extra Condensed'; font-style: normal; font-weight: 400 900; font-display: swap; src: url(/assets/fonts/raxoHjafvdAIOju4GcIfJH0i7zi50X3zRtuLNiMS0fSgJk52kCel2dA.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Sofia Sans Extra Condensed'; font-style: normal; font-weight: 400 900; font-display: swap; src: url(/assets/fonts/raxoHjafvdAIOju4GcIfJH0i7zi50X3zRtuLNiMS0fSuJk52kCel.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* Propuesta D: estuche de CD en 3D (three.js) con respaldo 2D. Colores tomados de la ilustración de LiL2PAiNT. */
:root {
  --noche: #16173A;        /* cielo de la ilustración */
  --noche-prof: #0F1029;
  --ciruela: #472354;
  --frambuesa: #B3305D;
  --magenta: #F2468F;
  --naranja: #FF8A3D;
  --durazno: #FFB347;
  --turquesa: #19A7B5;     /* el agua */
  --crema: #FFE9C7;        /* las nubes */
  --lavanda: #CFC3E8;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --pad: clamp(1.25rem, 4vw, 4rem);
  --display: "Sofia Sans Extra Condensed", "Arial Narrow", sans-serif;
}

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

html { color-scheme: dark; scrollbar-color: var(--magenta) var(--noche-prof); -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--noche);
  color: var(--crema);
  font-family: "Sofia Sans", system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.5;
}

::selection { background: var(--durazno); color: var(--noche); }
a { color: inherit; text-underline-offset: .2em; }
:focus-visible { outline: 3px solid var(--durazno); outline-offset: 3px; }
h1, h2, h3 { text-wrap: balance; }

/* ---------- Selector de idioma ---------- */
.barra { display: flex; justify-content: flex-end; max-width: 1500px; margin: 0 auto; padding: 1rem var(--pad) 0; }
.idioma { display: inline-flex; border: 2px solid var(--crema); border-radius: 999px; overflow: hidden; }
.idioma button {
  min-width: 3rem; min-height: 2.75rem; padding: 0 1rem;
  border: 0; background: transparent; color: var(--crema);
  font: 800 .95rem/1 "Sofia Sans", system-ui, sans-serif;
  cursor: pointer;
  transition: background-color .2s var(--ease), color .2s var(--ease);
}
.idioma button:hover { background: var(--durazno); color: var(--noche); }
.idioma button[aria-pressed="true"] { background: var(--crema); color: var(--noche); }
.idioma button:focus-visible { outline-offset: -4px; }

/* ---------- Escenario ---------- */
.pagina {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
  gap: clamp(2rem, 5vw, 6rem);
  max-width: 1500px;
  margin: 0 auto;
  padding: clamp(1rem, 3vw, 2rem) var(--pad) clamp(3rem, 6vw, 5rem);
}
.izq { align-self: start; }
/* La columna izquierda solo se queda fija si cabe completa en la pantalla */
@media (min-width: 901px) and (min-height: 880px) {
  .izq { position: sticky; top: clamp(1rem, 3vw, 2rem); }
}

/* ---------- Estuche de CD: 3D por encima, 2D de respaldo por debajo ---------- */
.estuche-wrap { position: relative; width: 100%; aspect-ratio: 1 / .58; }

/* Versión 2D: tu portada, debajo del marco PNG de la caja */
.estuche2d {
  position: absolute; left: 0; top: 50%;
  width: 58%; aspect-ratio: 544 / 476;
  transform: translateY(-50%);
  z-index: 1;
  filter: drop-shadow(0 .6rem 1rem rgba(0, 0, 0, .45));
}
.portada2d { position: absolute; left: 10.7%; top: 1.7%; width: 88.2%; height: 96.6%; object-fit: cover; }
.marco { position: absolute; inset: 0; width: 100%; height: 100%; }

/* Versión 3D */
.escena {
  position: absolute; inset: 0; z-index: 2;
  opacity: 0; pointer-events: none;
  touch-action: pan-y;
  cursor: grab;
  transition: opacity .5s var(--ease);
}
.escena canvas { display: block; width: 100%; height: 100%; }
.escena.agarrado { cursor: grabbing; }
.en3d .escena { opacity: 1; pointer-events: auto; }
.en3d .estuche2d, .en3d .cd { display: none; }

/* CD 2D: solo se ve si el 3D no está disponible */
.cd {
  position: absolute; left: 9%; top: 50%;
  width: 49%; aspect-ratio: 1;
  transform: translate(84%, -50%);
  visibility: hidden;
  filter: drop-shadow(0 .4rem 1rem rgba(0, 0, 0, .5));
}
.sin3d .cd { visibility: visible; animation: salir 1.5s var(--ease) .35s backwards; }
@keyframes salir { from { transform: translate(0, -50%); } }

.cd-giro {
  position: absolute; inset: 0; border-radius: 50%; overflow: hidden;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .55);
  animation: giro 3.4s linear infinite;
  animation-play-state: paused;
}
.suena .cd-giro { animation-play-state: running; }
@keyframes giro { to { transform: rotate(360deg); } } /* hacia la derecha (sentido horario) */
.cd-foto { display: block; width: 100%; height: 100%; object-fit: cover; }
.cd-aro {
  position: absolute; inset: 0; margin: auto; width: 31%; height: 31%; border-radius: 50%;
  background: rgba(236, 242, 246, .55);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .75), 0 0 0 1px rgba(15, 16, 41, .3);
}
.cd-hueco {
  position: absolute; inset: 0; margin: auto; width: 12.5%; height: 12.5%; border-radius: 50%;
  background: var(--noche);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .3);
}
.cd-brillo {
  position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  mix-blend-mode: screen; opacity: .35;
  background: conic-gradient(from 30deg,
    rgba(255,255,255,0) 0 8%, rgba(255,255,255,.9) 12%, rgba(242,70,143,.7) 18%, rgba(25,167,181,.7) 26%,
    rgba(255,179,71,.6) 32%, rgba(255,255,255,0) 40% 58%, rgba(255,255,255,.9) 62%, rgba(25,167,181,.7) 70%,
    rgba(242,70,143,.7) 78%, rgba(255,255,255,0) 88%);
}

/* ---------- Nombre y roles ---------- */
.identidad { margin-top: clamp(1rem, 2.5vw, 1.75rem); }
.nombre {
  margin: 0;
  font-family: var(--display); font-weight: 900;
  font-size: clamp(3rem, 6vw, 5rem); line-height: .88;
  text-transform: uppercase;
  color: var(--crema);
}
.roles { display: flex; flex-wrap: wrap; gap: .25rem 1.1rem; margin: 1rem 0 0; padding: 0; list-style: none; font-size: 1.25rem; font-weight: 800; }
.roles li:nth-child(1) { color: var(--durazno); }
.roles li:nth-child(2) { color: var(--magenta); }
.roles li:nth-child(3) { color: var(--turquesa); }
.roles li:nth-child(4) { color: var(--crema); }

/* ---------- Botones ---------- */
.acciones { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }
.btn {
  display: inline-flex; align-items: center; gap: .6rem;
  padding: .85rem 1.4rem;
  border: 2px solid var(--crema); border-radius: 6px;
  color: var(--crema);
  font-weight: 800; text-decoration: none;
  transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.btn:hover { background: var(--durazno); border-color: var(--durazno); color: var(--noche); }
.btn--primario { background: var(--ciruela); }
.btn--primario:hover { background: var(--naranja); border-color: var(--naranja); }
.ico { display: block; width: 1.4rem; height: 1.4rem; }
.ico--negro { display: none; }
.btn--primario:hover .ico--blanco, .btn--primario:focus-visible .ico--blanco { display: none; }
.btn--primario:hover .ico--negro, .btn--primario:focus-visible .ico--negro { display: block; }

/* ---------- CD 1 y CD 2 ---------- */
.der h2 {
  display: flex; align-items: center; gap: 1rem;
  margin: 0 0 1.25rem;
  font-family: var(--display); font-weight: 900;
  font-size: clamp(3rem, 7vw, 6rem); line-height: .9;
}
.num-cd {
  flex: none; display: grid; place-items: center;
  width: clamp(2.6rem, 6vw, 5rem); height: clamp(2.6rem, 6vw, 5rem);
  border-radius: 50%; color: var(--noche);
  font-size: clamp(1.6rem, 3.6vw, 3rem); line-height: 1;
}
.num-cd--1 { background: var(--magenta); }
.num-cd--2 { background: var(--turquesa); }

.pistas { list-style: none; margin: 0 0 clamp(2.5rem, 6vw, 5rem); padding: 0; border-top: 2px solid rgba(255, 233, 199, .4); }
.pista { border-bottom: 2px solid rgba(255, 233, 199, .4); }
.pista a {
  display: grid; grid-template-columns: 3.4rem minmax(0, 1fr); column-gap: 1rem;
  margin-inline: -.75rem; padding: 1.1rem .75rem 1.3rem;
  text-decoration: none;
  background: linear-gradient(var(--crema), var(--crema)) no-repeat 0 100% / 100% 0;
  transition: background-size .35s var(--ease), color .2s var(--ease);
}
.pista a:hover, .pista a:focus-visible { background-size: 100% 100%; color: var(--noche); outline-offset: -3px; }
.cod { padding-top: .3rem; font-family: var(--display); font-weight: 800; font-size: 1.6rem; line-height: 1.1; color: var(--durazno); transition: color .2s var(--ease); }
.pista a:hover .cod, .pista a:focus-visible .cod { color: var(--frambuesa); }
.titulo { margin: 0; font-family: var(--display); font-weight: 800; font-size: clamp(2rem, 4.4vw, 3.25rem); line-height: .95; }
.pistas--prensa .titulo { font-size: clamp(1.5rem, 2.6vw, 2.1rem); line-height: 1.02; }
.pistas--prensa .pista--destacada .titulo { font-size: clamp(2rem, 4vw, 3rem); }
.credito { display: inline-block; margin-bottom: .45rem; padding: .05rem .55rem; border-radius: 4px; background: var(--tag, var(--durazno)); color: var(--noche); font-weight: 800; }
.pistas--prensa .pista:nth-child(3n+2) { --tag: var(--magenta); }
.pistas--prensa .pista:nth-child(3n) { --tag: var(--turquesa); }
.texto { margin: .55rem 0 0; max-width: 60ch; }
.pista a:not(:hover):not(:focus-visible) .texto { color: var(--lavanda); }

.pie {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 2rem;
  padding: 1.75rem var(--pad);
  background: var(--noche-prof); color: var(--crema); font-weight: 700;
}

/* ---------- Móvil ---------- */
@media (max-width: 900px) {
  .pagina { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  .sin3d .cd { animation: none; }
  .cd-giro { animation: none; }
  .escena { transition: none; }
  .pista a, .cod, .btn, .idioma button { transition: none; }
}

/* ---------- Página 404 ---------- */
.no-encontrada { display: grid; gap: 1.25rem; justify-items: start; max-width: 40rem; margin: 0 auto; padding: clamp(3rem, 12vw, 8rem) var(--pad); }
.no-encontrada .nombre { font-size: clamp(5rem, 22vw, 12rem); }
