/* /videos — portfolio de vídeos. Se apoya en style.css (colores, tipografía, botones, chips) y en
   proyectos.css (cabecera de página, barra fija de filtros). Aquí solo va lo propio de los vídeos.
   Al cambiar esta hoja, subir el ?v= en videos.html (nginx no la cachea, pero Safari sí). */

.chip-n {
  margin-left: 3px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  opacity: .6;
}
.videos-page .catalog-controls { margin-bottom: clamp(36px, 6vw, 56px); }

.v-secciones { display: grid; gap: clamp(64px, 9vw, 104px); }

/* ---------- Cabecera de cada sección ---------- */

.v-seccion { padding: 0; scroll-margin-top: 150px; }
.v-seccion[hidden] { display: none; }

.v-seccion-head {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  column-gap: 12px;
  row-gap: 12px;
  padding-bottom: 18px;
  margin-bottom: 26px;
  border-bottom: 1px solid var(--border);
}
.v-seccion-titulo { font-size: clamp(1.9rem, 4vw, 3.2rem); }
.v-cuenta {
  font-family: var(--font-display);
  font-weight: 700;
  font-stretch: 110%;
  font-size: clamp(.9rem, 1.4vw, 1.1rem);
  font-variant-numeric: tabular-nums;
  color: var(--rojo-claro);
  line-height: 1;
  padding-top: .15em;
}
.v-seccion-intro {
  grid-column: 1 / -1;
  margin: 0;
  max-width: 62ch;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.v-sub {
  margin: 34px 0 14px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.v-sub[hidden], .v-grid[hidden] { display: none; }

/* ---------- Retículas ---------- */

.v-grid { display: grid; gap: 18px; }
.v-grid--h { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.v-grid--v { grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 14px; }

/* El primer videoclip, en grande: dos columnas y dos filas (las dos tarjetas siguientes se apilan a su lado) */
.v-grid--h > .is-destacado { grid-column: span 2; grid-row: span 2; }
.v-grid--h.is-solo > .v-card { grid-column: span 2; }

@media (max-width: 1100px) {
  .v-grid--h { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .v-grid--h > .is-destacado { grid-row: auto; }
}
@media (max-width: 640px) {
  .v-grid--h { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .v-grid--h > .is-destacado, .v-grid--h.is-solo > .v-card { grid-column: auto; }
  .v-grid--v { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
}

/* ---------- Tarjeta ---------- */

.v-card { min-width: 0; }
.v-card.is-hidden { display: none; }

.v-play {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .25s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.v-play:focus-visible { outline: 2px solid var(--rojo-claro); outline-offset: 3px; }

.v-thumb {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  background: var(--charcoal);
  overflow: hidden;
}
.v-card--v .v-thumb { aspect-ratio: 9 / 16; }
.is-destacado .v-thumb { flex: 1 0 auto; }
.v-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s var(--ease);
}
.v-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 55%, rgba(0,0,0,.55));
  pointer-events: none;
}

.v-boton {
  position: absolute;
  left: 12px; bottom: 12px;
  z-index: 1;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,.96);
  color: var(--black);
  display: grid;
  place-items: center;
  box-shadow: 0 8px 26px -6px rgba(0,0,0,.6);
  transition: background .2s, color .2s, transform .25s var(--ease);
}
.v-boton svg { width: 16px; height: 16px; margin-left: 2px; fill: currentColor; }
.is-destacado .v-boton { width: 66px; height: 66px; left: 22px; bottom: 22px; }
.is-destacado .v-boton svg { width: 22px; height: 22px; margin-left: 3px; }
.v-card--v .v-boton { width: 38px; height: 38px; left: 10px; bottom: 10px; }
.v-card--v .v-boton svg { width: 14px; height: 14px; }

.v-dur {
  position: absolute;
  right: 10px; bottom: 10px;
  z-index: 1;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  background: rgba(0,0,0,.62);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 100px;
}
.v-card--v .v-dur { right: 8px; bottom: 8px; font-size: 11px; padding: 3px 7px; }

.v-info { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px 16px; }
.v-artista {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.v-titulo { font-size: 16px; font-weight: 600; line-height: 1.3; text-wrap: balance; }
.v-meta { margin-top: 2px; font-size: 12.5px; color: var(--muted-2); }

.is-destacado .v-info { padding: 20px 22px 22px; gap: 8px; }
.is-destacado .v-titulo {
  font-family: var(--font-display);
  font-weight: 800;
  font-stretch: 118%;
  text-transform: uppercase;
  font-size: clamp(1.5rem, 2.8vw, 2.4rem);
  line-height: .95;
  letter-spacing: -0.015em;
}

.v-card--v .v-info { padding: 10px 12px 12px; gap: 3px; }
.v-card--v .v-artista { font-size: 10.5px; letter-spacing: .1em; }
.v-card--v .v-titulo { font-size: 14px; }
.v-card--v .v-meta { font-size: 11.5px; }

@media (hover: hover) {
  .v-play:hover { border-color: var(--border-2); }
  .v-play:hover .v-thumb img { transform: scale(1.04); }
  .v-play:hover .v-boton { background: var(--rojo); color: var(--white); transform: scale(1.06); }
}
.v-play:focus-visible .v-boton { background: var(--rojo); color: var(--white); }

.v-canal { margin: clamp(56px, 8vw, 88px) 0 0; text-align: center; }

/* ---------- Reproductor ---------- */

html.v-bloqueo { overflow: hidden; }

.v-modal {
  width: 100%; height: 100%;
  max-width: none; max-height: none;
  margin: 0; padding: 16px;
  border: 0;
  background: transparent;
  color: var(--white);
}
.v-modal[open] { display: grid; place-items: center; }
.v-modal::backdrop { background: rgba(3, 3, 4, .95); }

.v-modal-caja {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(1120px, calc(100vw - 32px), calc((100vh - 120px) * 16 / 9));
  width: min(1120px, calc(100vw - 32px), calc((100dvh - 120px) * 16 / 9));
}
.v-modal.is-v .v-modal-caja {
  width: min(440px, calc(100vw - 32px), calc((100vh - 110px) * 9 / 16));
  width: min(440px, calc(100vw - 32px), calc((100dvh - 110px) * 9 / 16));
}

.v-modal-barra { display: flex; align-items: center; gap: 12px; }
.v-modal-titulo {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-size: 14.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.v-modal-yt {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted-2);
  white-space: nowrap;
}
.v-modal-yt:hover, .v-modal-yt:focus-visible { color: var(--white); }
.v-modal-cerrar {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border-2);
  background: rgba(255,255,255,.06);
  color: var(--white);
  cursor: pointer;
}
.v-modal-cerrar:hover { background: rgba(255,255,255,.12); }
.v-modal-cerrar:focus-visible { outline: 2px solid var(--rojo-claro); outline-offset: 2px; }
.v-modal-cerrar svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

.v-modal-video {
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
}
.v-modal.is-v .v-modal-video { aspect-ratio: 9 / 16; }
.v-modal-video iframe { display: block; width: 100%; height: 100%; border: 0; }

@media (prefers-reduced-motion: reduce) {
  .v-thumb img, .v-boton, .v-play { transition: none; }
  .v-play:hover .v-thumb img { transform: none; }
}
