/* =========================================================
   Underiojano · estilos
   Paleta: negro #0A0A0A y crema #EDE6D6. Nada más.
   ========================================================= */

:root {
  --negro: #0A0A0A;
  --crema: #EDE6D6;
  --linea: rgba(237, 230, 214, 0.35);

  --f-titulo: "Archivo Black", "Arial Black", sans-serif;
  --f-caligrafia: "Pinyon Script", cursive;
  --f-texto: "Uncial Antiqua", Georgia, serif;

  --alto-pantalla: 100vh;
}

@supports (height: 100dvh) {
  :root { --alto-pantalla: 100dvh; }
}

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

html,
body {
  height: var(--alto-pantalla);
  overflow: hidden;
  background: var(--negro);
  color: var(--crema);
}

body {
  font-family: var(--f-texto);
  text-transform: lowercase;
  letter-spacing: 2px;
  -webkit-font-smoothing: antialiased;
  font-variant-emoji: text;
}

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

a {
  color: var(--crema);
  text-decoration: none;
}

a:hover { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1px; }

a:focus-visible {
  outline: 1px solid var(--crema);
  outline-offset: 4px;
}

.solo-lectores {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------- Grano de fotocopia ---------- */
.grano {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.13;
  pointer-events: none;
  z-index: 100;
}

.defs-svg {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* ---------- Header ---------- */
.cabecera {
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: center;
  padding: 14px 40px;
}

.logo {
  justify-self: center;
  display: block;
}

.logo img {
  height: 64px;
  width: auto;
}

a.logo:hover { text-decoration: none; }

.menu {
  justify-self: end;
  display: flex;
  gap: 28px;
  font-size: 17px;
  letter-spacing: 3px;
}

.menu a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.menu a[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: 6px;
  text-decoration-thickness: 1px;
}

/* =========================================================
   Inicio
   ========================================================= */
.fondo-video,
.degrade {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
}

.fondo-video {
  object-fit: cover;
  z-index: 0;
  pointer-events: none;
}

.degrade {
  z-index: 1;
  background: linear-gradient(
    to bottom,
    rgba(10, 10, 10, 0.75) 0%,
    rgba(10, 10, 10, 0) 22%,
    rgba(10, 10, 10, 0) 75%,
    rgba(10, 10, 10, 0.8) 100%
  );
}

/* ---------- Cinta ---------- */
.cinta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 24px;
  z-index: 10;
  overflow: hidden;
  border-top: 1px solid var(--crema);
  border-bottom: 1px solid var(--crema);
  padding: 8px 0;
  font-size: 16px;
  letter-spacing: 3px;
  text-shadow: 0 0 8px var(--negro);
  white-space: nowrap;
}

.cinta-pista {
  display: flex;
  width: max-content;
  animation: cinta 22s linear infinite;
  will-change: transform;
}

.cinta-bloque {
  display: flex;
  flex-shrink: 0;
}

.cinta-grupo {
  display: flex;
  align-items: center;
  gap: 28px;
  padding-right: 28px;
  flex-shrink: 0;
}

.cinta a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
}

.estrella { font-size: 13px; }

@keyframes cinta {
  from { transform: translateX(-50%); }
  to   { transform: translateX(0); }
}

/* ---------- Intro (solo la primera vez por sesión) ---------- */
.intro .logo img {
  transform-origin: 50% 50%;
  animation: intro-logo 3.2s cubic-bezier(.7, 0, .2, 1) both;
}

.intro .aparece {
  animation: aparecer 1s ease 2.9s both;
}

/* La cinta ya tiene su propia animación: el fundido va en el contenedor */
.intro .cinta.aparece {
  animation: aparecer 1s ease 2.9s both;
}

@keyframes intro-logo {
  0%   { transform: translateY(70vh) scale(3.4); opacity: 0; }
  25%  { transform: translateY(40vh) scale(3.4); opacity: 1; }
  55%  { transform: translateY(40vh) scale(3.4); opacity: 1; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}

@keyframes aparecer {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* =========================================================
   Novedades
   ========================================================= */
.novedades-main {
  height: calc(var(--alto-pantalla) - 92px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding-bottom: 16px;
}

.marco {
  position: relative;
  height: min(calc(var(--alto-pantalla) - 124px), calc(92vw * 1100 / 840));
  aspect-ratio: 840 / 1100;
  max-width: 92vw;
}

.marco-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.rosario {
  position: absolute;
  right: -9%;
  top: -6%;
  height: 36%;
  width: auto;
  max-width: none;
  transform: rotate(6deg);
  transform-origin: 50% 0;
  z-index: 3;
  pointer-events: none;
}

.marco-contenido {
  position: relative;
  z-index: 2;
  height: 100%;
  padding: 13% 15% 12%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  container-type: size;
}

.bajada {
  font-size: 14px;
  letter-spacing: 3px;
}

.titulo-gastado {
  font-family: var(--f-titulo);
  font-weight: 400;
  font-size: clamp(40px, 6.6vh, 64px);
  letter-spacing: -2px;
  line-height: 1;
  text-transform: none;
  filter: url(#gastado);
  margin-top: 0.25em;
}

.caligrafia {
  font-family: var(--f-caligrafia);
  font-size: clamp(26px, 4vh, 38px);
  letter-spacing: 0;
  text-transform: none;
  line-height: 1.2;
}

/* ---------- Lista de temas ---------- */
.temas {
  list-style: none;
  width: 100%;
  margin-top: clamp(2px, 1vh, 12px);
}

.temas li {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(4px, 1vh, 10px) 0;
}

.temas li + li {
  border-top: 1px solid var(--linea);
}

.tema-fecha {
  font-size: 13px;
  letter-spacing: 2px;
}

.tema-nombre {
  font-family: var(--f-caligrafia);
  font-size: clamp(24px, 3.5vh, 32px);
  letter-spacing: 0;
  text-transform: none;
  line-height: 1.15;
}

.tema-banda {
  font-family: var(--f-titulo);
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  line-height: 1.3;
}

/* Área táctil de 44px sin ocupar tanto lugar en el diseño */
.tema-escuchar {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin: -10px 0 -12px;
  padding: 0 12px;
  font-size: 14px;
  letter-spacing: 3px;
  text-decoration: underline;
  text-underline-offset: 5px;
  text-decoration-thickness: 1px;
}

span.tema-escuchar { opacity: 0.6; text-decoration-style: dotted; }

.tema-estado {
  font-size: 13px;
}

.pie {
  margin-top: clamp(4px, 1.4vh, 16px);
  font-size: 12px;
  letter-spacing: 2px;
}

.pie a { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }

/* =========================================================
   Celular y pantallas angostas
   ========================================================= */
@media (max-width: 760px) {
  .cabecera { padding: 14px 16px; }

  .menu {
    flex-direction: column;
    align-items: flex-end;
    gap: 0;
    font-size: 13px;
    letter-spacing: 2px;
  }

  .menu a { min-height: 32px; }
}

@media (max-width: 560px) {
  /* En el celular el marco usa todo el alto: las esquinas quedan intactas
     y solo se estiran los laterales (border-image), así no se deforma. */
  .marco {
    width: 92vw;
    height: calc(var(--alto-pantalla) - 124px);
    max-height: calc(92vw * 1100 / 840 * 1.35);
    aspect-ratio: auto;
    border-style: solid;
    border-width: 0;
    border-image-source: url("../assets/marco.png");
    border-image-slice: 260 fill;
    border-image-width: calc(92vw * 260 / 840);
    border-image-repeat: stretch;
  }

  .marco-img { display: none; }

  /* Los laterales del marco son finos: aprovechamos más ancho */
  .marco-contenido { padding: 12% 10% 10%; }

  .bajada { font-size: 12px; letter-spacing: 2px; }
  .pie { font-size: 11px; letter-spacing: 1px; max-width: 88%; }
  .temas li { padding: 3px 0; }
  .tema-nombre { line-height: 1.05; }

  .titulo-gastado {
    font-size: min(clamp(40px, 6.6vh, 64px), 10.5vw);
    letter-spacing: -1px;
  }

  .rosario { right: -4%; top: -2%; height: 30%; }

  .cinta { font-size: 14px; }
}

/* Pantallas bajitas (celular acostado, notebooks chicas) */
@media (max-height: 640px) {
  .bajada { font-size: 12px; }
  .tema-nombre { line-height: 1.05; }
  .temas li { padding: 2px 0; }
}

/* =========================================================
   Movimiento reducido: sin intro y cinta quieta
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  .intro .logo img,
  .intro .aparece,
  .intro .cinta.aparece {
    animation: none;
    opacity: 1;
  }
  /* La cinta sigue corriendo: es parte del diseño y se mueve lento y parejo */
}
