/* Performance additions preserve the existing visual system and content. */
.gf-bg-pending { opacity: 0 !important; }
.gf-bg-retained { opacity: 1 !important; }
/* Explicit stacking keeps Safari's accelerated video behind the name. */
#hero-text { position: relative; z-index: 2; }
/* The first paint is the real hero, even before JavaScript or YouTube is ready. */
#video-bg { opacity: 1; }
/* A body-level fixed layer stays in the viewport when the hero scrolls away.
   Navigation excludes it; media visibility owns it instead. */
body.gf-reel-away #video-bg { visibility: hidden !important; }
#hero-playbar-controls { opacity: 1; }
body:not(.intro-active):not(.gf-video-fullscreen) #hero-text,
body:not(.intro-active):not(.gf-video-fullscreen) #hero-title {
  opacity: 1 !important;
  visibility: visible !important;
}
#hero-poster {
  position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0;
}
#hero-poster img {
  position: absolute; left: 0; width: 100%; height: 50%;
  object-fit: cover; object-position: center;
}
#hero-poster img:first-child { top: 0; }
#hero-poster img:last-child { bottom: 0; }
#video-bg iframe { opacity: 0; transition: opacity .25s ease; }
.gf-hero-playing #video-bg iframe { opacity: 1; transition: none; }
#hero-intro-clip {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; pointer-events: none; opacity: 0;
}
#hero-intro-clip.show-frame { opacity: 1; }
/* Category thumbnails share the fixed hero reel. Their own covers and the
   full-width editorial sections (Premier, Luz Eterna, BTS, etc.) stay intact. */
#catalog .reel-bg-section::before,
#catalog .almohada-bg-section::before,
#catalog .hechicera-section-wrap + .catalog-grid.perf1-grid::before { display: none; }
#catalog .gf-perf-reel { display: none; }
/* The opening project grid spans two containers and ends before Luz Eterna. */
#catalog .hechicera-section-wrap,
#fiesta-projects,
#opening-projects-more::before {
  background-color: #0b0c11;
  background-image: linear-gradient(rgba(5,8,15,.35), rgba(5,8,15,.48)), var(--project-photo);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
#catalog .hechicera-section-wrap {
  --project-photo: url('../images/t50-1.jpg');
}
#fiesta-projects {
  display: flow-root;
  --project-photo: url('../images/fv-101.jpg');
}
#opening-projects-more {
  position: relative;
  isolation: isolate;
  --release-spacing: clamp(24px, 3vw, 40px);
}
#opening-projects-more > #nr-new-section {
  margin-block-start: var(--release-spacing);
}
#opening-projects-more::before {
  content: '';
  position: absolute;
  grid-column: 1 / -1;
  grid-row: 1 / 3;
  inset-block: 0 calc(0px - var(--release-spacing));
  left: 50%;
  width: 100vw;
  transform: translateX(-50%);
  z-index: -1;
  pointer-events: none;
  --project-photo: url('../images/vsp/psicologo-portada-1440.webp');
}
@media (max-width: 768px) {
  #catalog .hechicera-section-wrap {
    margin-bottom: 0;
    padding-bottom: 4px;
  }
  #opening-projects-more::before {
    grid-row: 1 / 5;
    /* Include the mobile grid's 4px gutter at the section boundary. */
    inset-block-end: calc(-4px - var(--release-spacing));
    --project-photo: url('../images/vsp/psicologo-portada-960.webp');
  }
}
#catalog::before { background: rgba(4,6,9,.24) !important; }
body.gf-catalog-reel #video-bg { visibility: visible !important; opacity: .85 !important; }
/* Keep the supplied guitar artwork in its original blue/purple color. */
#cat-item-reel-2023 .cat-thumb { position: relative; }
#cat-item-reel-2023 iframe { pointer-events: none; opacity: 0; transition: opacity .25s; }
#cat-item-reel-2023 iframe[data-media-state="1"],
#cat-item-reel-2023 iframe[data-media-state="3"] { opacity: 1; }
#cat-item-reel-2023 .cat-play-overlay { display: none; }
#director-showreel-section, #projects-showreel-section { background: #05070a !important; }
.showreel-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.showreel-player { opacity: 0; }
.showreel-player[data-media-state="1"], .showreel-player[data-media-state="3"] { opacity: 1; }
.catalog-credit {
  grid-column: 1 / -1;
  justify-self: center;
  position: relative;
  display: flex;
  align-items: center;
  gap: .4rem;
  max-width: 46rem;
  margin: .55rem .25rem .35rem;
  padding: .35rem .75rem;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 1rem;
  background: rgba(10, 10, 15, .65);
  color: rgba(255, 255, 255, .92);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: .03em;
  font: 400 .6875rem/1.32 'Inter', sans-serif;
}
.catalog-credit svg { flex: none; color: #6767fc; }
@media (max-width: 768px) {
  .catalog-credit { margin-block: .35rem 0; padding: .3rem .55rem; }
}
#beginning-section .beginning-bg-photo img { object-position: center; filter: none; }
#beginning-section .beginning-bg-photo::after {
  background: linear-gradient(180deg,rgba(5,5,10,.32),rgba(5,5,10,.12) 45%,rgba(5,5,10,.48));
}
.gf-play-fallback {
  position: absolute; left: 50%; top: 68%; transform: translateX(-50%);
  z-index: 15; min-height: 44px; padding: 10px 22px; border-radius: 24px;
  border: 1px solid rgba(255,255,255,.6); background: rgba(8,9,11,.85);
  color: white; font: 12px var(--gf-ui, sans-serif); cursor: pointer;
  pointer-events: auto;
}
.gf-play-fallback[hidden] { display: none; }
#gf-play-hero-iframe {
  top: calc(100% + 12px);
  font-family: var(--gf-mono);
  letter-spacing: .12em;
  text-transform: uppercase;
}
@media (max-width: 768px) {
  #video-bg { opacity: .75; }
  /* Keep form fields readable without triggering iOS focus zoom. */
  .contact-form input, .contact-form textarea, .contact-form select,
  .dogma-form input, .dogma-form textarea, .dogma-form select {
    font-size: 16px !important;
  }
}
/* Reserve a stable viewport when the Instagram/Safari toolbar moves. */
/* Hidden preview frames have no client rects, so the media controller
   never arms this YouTube preview on mobile. Tapping still opens its modal. */
@media (max-width: 768px), (hover: none) and (pointer: coarse) {
  .pepsi-preview .viz-reel-bg, #pepsi-sound-btn { display: none !important; }
  .pepsi-preview .viz-card-poster { opacity: 1; }
}

@supports (height: 100svh) {
  @media (max-width: 768px) {
    #hero { min-height: 100svh; }
    .enter-splash { min-height: 100svh; }
  }
}

/* Fondos de secciones lejanas: esperan a que la página se acerque, para no
   competir con el video del hero al abrir. lazy-bg.js los enciende. */
html.gf-lazybg [data-lazybg]:not(.gf-bg-on) { background-image: none !important; }

/* Las luces animadas del fondo ya no van (pedido). */
.bolt-bg canvas { display: none !important; }

/* Cosas que seguían trabajando sin verse. */
/* Indicador "Scroll" retirado: su línea seguía latiendo. */
#scroll-hint .scroll-line { animation: none !important; }
/* El aviso de conexión solo gira cuando está a la vista. */
.conn-pill:not(.visible) .conn-pill-spinner { animation-play-state: paused; }
/* El visor de fotos cerrado era una capa de pantalla completa con desenfoque,
   invisible pero siempre compuesta. Cerrado, deja de existir para el pintado. */
.bts-lightbox:not(.active) { visibility: hidden; transition: opacity .35s ease, visibility 0s linear .35s; }
.bts-lightbox.active { visibility: visible; transition: opacity .35s ease; }

.gf-menu-links a[hidden] { display: none !important; }

/* ── Áreas táctiles de 44 px sin cambiar el aspecto ── */
#hero-playbar-controls span { position: relative; }
#hero-playbar-controls span::after {
  content: ''; position: absolute; left: -8px; right: -8px; top: 50%;
  height: 44px; transform: translateY(-50%);
}
#vid-modal-close::after {
  content: ''; position: absolute; left: 50%; top: 50%;
  width: 44px; height: 44px; transform: translate(-50%, -50%);
}
@media (max-width: 768px) {
  .card-sound-btn::after { content: ''; position: absolute; inset: -7px; }
  /* Safari amplía la página sola al enfocar campos de menos de 16 px. */
  .contact-input, .contact-textarea, .dogma-input, .dogma-textarea { font-size: 16px !important; }
}
/* El hero ocupa exactamente la pantalla visible de Safari (no la alta). */
@supports (height: 100svh) {
  @media (max-width: 768px) { #hero { height: 100svh; } }
}

/* El reel de YouTube trae barras de cine dentro del propio video (imagen ~2.35:1
   en un cuadro 16:9). Se amplía el reproductor para que la imagen llene la
   pantalla, igual que el clip local con el que empalma. No aplica en pantalla
   completa, donde se ve el video entero. */
body:not(.gf-video-fullscreen) #video-bg iframe {
  width: max(236vh, 100vw) !important;
  height: max(132.75vh, 56.25vw) !important;
  min-width: 0 !important;
  min-height: 0 !important;
}

/* ── Tarjeta "Reel actual" ──
   1) El reproductor se dibuja 2.5 veces más grande y se reduce en pantalla: así
      YouTube lo ve grande y manda alta definición a una tarjeta chica.
   2) Se amplía 1.32x para recortar las barras de cine que trae el video.
   3) Aparece 3 s después de empezar a reproducir, cuando YouTube ya retiró su
      título y sus botones; mientras tanto se ve la portada. */
#cat-item-reel-2023 .cat-thumb { overflow: hidden; }
#cat-item-reel-2023 iframe {
  inset: auto !important; left: 50% !important; top: 50% !important;
  width: 250% !important; height: 250% !important;
  transform: translate(-50%, -50%) scale(.528);
  transition: opacity .2s;
}
#cat-item-reel-2023 iframe[data-media-state="1"],
#cat-item-reel-2023 iframe[data-media-state="3"] { transition: opacity .35s 3s; }

/* ── Vista previa de Pepsi (solo computadora) ──
   El reproductor era un cuadrado chico y YouTube mandaba 360p. Ahora es 16:9
   (como la tarjeta), cuatro veces más grande por dentro, y se reduce en pantalla:
   YouTube lo ve grande y manda la máxima calidad del video (1080p). */
.pepsi-preview .viz-reel-bg iframe {
  width: 400% !important;
  height: 400% !important;
  transform: translate(-50%, -50%) scale(.2625) !important;
}

/* ── Tarjetas de WORK en computadora: formato apaisado 16:9, igual que en móvil ── */
@media (min-width: 769px) {
  #viz2-section .viz-card,
  #viz2-section .viz-card.viz-card-reel {
    width: 460px !important;
    height: 259px !important;
    left: -230px !important;
    top: -129.5px !important;
    border-radius: 10px !important;
  }
}

/* ══ iPhone Duo (plegable) ══
   Cerrado (382×580) usa el formato móvil tal cual.
   Abierto vertical (669×825): formato móvil, con los carruseles ampliados
   para aprovechar el ancho. */
@media (min-width: 600px) and (max-width: 768px) {
  #viz2-section .viz-gallery, #viz3-section .viz-gallery,
  #viz5-section .viz-gallery, #work6-section .viz-gallery { height: 430px !important; }
  #viz2-section .viz-track, #viz3-section .viz-track,
  #viz5-section .viz-track, #work6-section .viz-track { scale: 1.45; }
}
/* Abierto horizontal (951×543): formato de computadora en una pantalla baja.
   Los carruseles se achican para entrar completos sin cortarse. */
@media (min-width: 769px) and (max-height: 620px) {
  html body .viz-section .viz-gallery,
  html body #viz2-section .viz-gallery, html body #viz3-section .viz-gallery,
  html body #viz5-section .viz-gallery, html body #work6-section .viz-gallery { height: 250px !important; }
  .viz-track { scale: .62; }
  #viz2-section .viz-track { scale: .6; }
  .viz-header .gf-titulo-img, .viz-header .gf-titulo-img img { max-height: 92px; width: auto; }
}

/* ── Luz Eterna (New Release) ──
   Desde el primer instante se ve la portada del video, nunca la interfaz de
   YouTube: el reproductor aparece 3 s después de empezar (cuando YouTube ya
   retiró título y botones) y no reacciona al cursor, que es lo que la volvía a
   mostrar. Por dentro es el doble de grande para que YouTube mande la calidad
   máxima. El sonido se sigue manejando con su botón. */
div:has(> #nr-new-iframe) {
  background: #000 url('https://i.ytimg.com/vi/lXD7XD4wii4/maxresdefault.jpg') center / cover no-repeat;
}
#nr-new-iframe {
  inset: auto !important; left: 50% !important; top: 50% !important;
  width: 200% !important; height: 200% !important;
  transform: translate(-50%, -50%) scale(.5);
  pointer-events: none;
  opacity: 0;
  transition: opacity .2s;
}
#nr-new-iframe[data-media-state="1"],
#nr-new-iframe[data-media-state="3"] { opacity: 1; transition: opacity .4s 3s; }

/* ── Carruseles Psicólogo (vsp) y Beginning en computadora: mismo tamaño que WORK ── */
@media (min-width: 769px) {
  #vsp-section .vsp-card,
  #beginning-section .bgn-card {
    width: 460px !important;
    height: 259px !important;
    left: -230px !important;
    top: -129.5px !important;
  }
  #vsp-section .vsp-gallery,
  #beginning-section .bgn-gallery { height: 520px !important; }
}
/* iPhone Duo abierto en horizontal: estos dos también se achican para entrar */
@media (min-width: 769px) and (max-height: 620px) {
  html body #vsp-section .vsp-gallery,
  html body #beginning-section .bgn-gallery { height: 250px !important; }
  #vsp-track, #bgn-track { scale: .6; }
}

/* Fondo de Director: el video aparece 3 s después de arrancar, cuando YouTube
   ya retiró su título y botones. */
#bio-reel-iframe { opacity: 0; transition: opacity .2s; }
#bio-reel-iframe[data-media-state="1"],
#bio-reel-iframe[data-media-state="3"] { opacity: 1; transition: opacity .6s 3s; }

/* Computadora: el reel que va después de la biografía sólo se muestra al entrar
   por el botón Director. En el scroll largo del inicio se oculta, porque el
   mismo reel ya aparece más arriba, al final de Proyectos. */
/* (13 nov) También en el móvil: Vic lo vio repetido al final del scroll. */
html:not([data-gf-screen="bio"]) #director-showreel-section { display: none !important; }

/* Grilla en computadora y Duo abierto: el nombre del artista estaba al 30 % de
   blanco y casi no se leía. Sube al 75 %; el título de la canción sigue más
   fuerte (88 % y en negrita). */
@media (min-width: 769px) {
  .cat-item .cat-meta .cat-client { color: rgba(255,255,255,.75) !important; }
}

/* Pantallas táctiles anchas (iPhone Duo abierto, iPad): Safari de iOS no dibuja
   los fondos fijos (background-attachment: fixed) y la foto quedaba convertida
   en un color liso. Ahí el fondo acompaña al scroll, como en el móvil. */
@media (hover: none) and (pointer: coarse) {
  .dark-parallax-content,
  .reel-bg-section::before,
  .almohada-bg-section::before { background-attachment: scroll !important; }
}

/* ── Nombres de artistas legibles en todas las secciones ──
   Estaban entre el 35 % y el 60 % de blanco (o en azul sobre foto) y no se
   leían. Suben a un blanco claro; el título de la canción sigue siendo el más
   fuerte. No cambia el tamaño de la letra. */
html body .cat-item .cat-caption .cap-client,
html body .viz-card .cat-caption .cap-client,
html body .vsp-card .cat-caption .cap-client,
html body .cinema-card .cat-caption .cap-client,
.cat-caption .cap-client,
.viz-info-artist:not(.viz-info-artist-green),
.vsp-info-artist,
.bgn-info-artist,
.concert-midsub,
.cinema-mobile-section .cinema-artist,
#nr-new-section span[style*="rgba(255,255,255,0.55)"],
#director-showreel-section span[style*="rgba(255,255,255,0.55)"],
#projects-showreel-section span[style*="rgba(255,255,255,0.55)"] { color: rgba(255,255,255,.8) !important; }
/* Listas de artistas bajo el título de cada sección */
.viz-section-artists, .viz-sublabel { color: rgba(255,255,255,.78) !important; }

/* Grilla en computadora y Duo abierto: la ficha «Reel actual» tiene el título
   de una sola línea y quedaba 13 px más corta que sus vecinas, dejando un hueco
   debajo. Ahora la foto/video ocupa todo el alto de la fila. */
@media (min-width: 769px) {
  #cat-item-reel-2023 { display: flex !important; flex-direction: column; }
  #cat-item-reel-2023 > .cat-thumb { flex: 1 1 auto; height: auto !important; min-height: 0; }
}

/* ── Letras chicas que no se leían (revisión general) ──
   Sólo color; ningún tamaño cambia. Los títulos grandes en azul, las flechas y
   los estados apagados (idioma no elegido, pestaña inactiva) quedan como están. */
/* Artista en azul bajo los carruseles Work y Music Videos → blanco */
html body .viz-info-artist.viz-info-artist-green { color: rgba(255,255,255,.8) !important; }
/* Azul oscuro sobre foto → el azul claro que la página ya usa en otras etiquetas */
html body .viz-info-tag, html body .viz-info-actual, html body .cinema-play-hint,
html body .bgn-info-note, html body .bgn-sublabel, html body .vsp-sublabel,
html body .cat-nav-location, html body .dogma-eyebrow, html body .dogma-cat-count { color: rgb(165,165,255) !important; }
/* Blancos apagados (35–55 %) → 78 % */
html body .prem-sublabel, html body .bts-sublabel, html body .concert-eyebrow-txt,
html body .concert-subtitle-txt, html body .concert-coming-label, html body .concert-coming-sub,
html body .dogma-sublabel, html body .dogma-form-sub, html body .contact-type-desc,
html body .pinfo-tag, #contact-zone span[style*="0.55"] { color: rgba(255,255,255,.78) !important; }
html body .dogma-form-note { color: rgba(255,255,255,.6) !important; }
html body #beginning-section .bgn-sublabel { color: rgb(165,165,255) !important; }

/* Gotas de Sal ya no se reproduce sola: se oculta su botón de sonido y el
   reproductor vacío; queda la foto de la tarjeta. */
#gotas-sound-btn, #viz-gotas-iframe { display: none !important; }
/* …y la tarjeta se comporta como una tarjeta de foto normal */
.viz-card:has(#viz-gotas-iframe) .viz-reel-bg { display: none !important; }
.viz-card:has(#viz-gotas-iframe) .viz-card-poster { position: static !important; opacity: 1 !important; display: block; width: 100%; height: 100%; object-fit: cover; }

/* Reel al final de Proyectos y de Director: igual que Luz Eterna. Se ve la
   portada hasta 3 s después de arrancar (cuando YouTube ya retiró título y
   botones), el cursor no los hace reaparecer, y por dentro es el doble de
   grande para que YouTube mande mejor calidad. */
html body .showreel-player {
  inset: auto !important; left: 50% !important; top: 50% !important;
  width: 200% !important; height: 200% !important;
  transform: translate(-50%, -50%) scale(.5);
  pointer-events: none; opacity: 0; transition: opacity .2s;
}
html body .showreel-player[data-media-state="1"],
html body .showreel-player[data-media-state="3"] { opacity: 1; transition: opacity .4s 3s; }

/* Foto «The Beginning» al final de la biografía: sólo en la pantalla Director.
   En el scroll largo del inicio se oculta (pedido 13 nov 2026). */
html:not([data-gf-screen="bio"]) .gf-beginning-foto { display: none !important; }

/* Luz Eterna y el Reel se abren con controles al tocarlos */
div:has(> #nr-new-iframe), div:has(> .showreel-player) { cursor: pointer; }
