/* ==========================================================================
   Videos y medios (/videos/)
   Usa los tokens y componentes de styles.css (header, footer, botones,
   overline, animaciones). Aquí vive solo lo propio de la página.
   ========================================================================== */

/* `hidden` manda aunque el componente declare su propio display. */
[hidden] { display: none !important; }

/* ---------- Reproductor: miniatura que se vuelve video al dar clic ---------- */

.player {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 1rem;
  background: var(--navy);
}

/* El anillo de foco va en el marco: dentro, el recorte lo escondería. */
.player:has(.player__poster:focus-visible) {
  outline: 2px solid var(--focus, var(--navy));
  outline-offset: 3px;
}

.player__poster {
  position: absolute;
  inset: 0;
  display: block;
}

.player__poster:focus-visible { outline: none; }

/* <picture> sirve la miniatura en WebP cuando YouTube la tiene (pesa la mitad) */
.player__poster picture { display: block; height: 100%; }

.player__poster img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* recorta las franjas negras de las miniaturas 4:3 */
  filter: saturate(0.92);
  transition: transform 700ms var(--ease-out);
}

/* Un velo azul de marca iguala miniaturas de canales distintos */
.player__poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgb(31 59 77 / 0.32), rgb(31 59 77 / 0.06) 55%);
  pointer-events: none;
}

.player__play {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 3.75rem;
  height: 3.75rem;
  margin: -1.875rem 0 0 -1.875rem;
  border-radius: 999px;
  background: var(--sun);
  color: var(--navy);
  box-shadow: var(--elev-2);
  transition:
    transform 180ms var(--ease-snap),
    background-color 140ms var(--ease-snap);
}

.player__play svg {
  width: 1.625rem;
  height: 1.625rem;
  fill: currentColor;
  transform: translateX(1.5px); /* el triángulo se ve centrado por su masa, no por su caja */
}

@media (hover: hover) {
  .player__poster:hover img { transform: scale(1.03); }

  .player__poster:hover .player__play {
    background: var(--sun-hover);
    transform: scale(1.06);
  }
}

.player__poster:active .player__play { transform: scale(0.96); }

.player iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ---------- Destacado ---------- */

.vhero { padding-top: clamp(0.25rem, 0.8vw, 0.75rem); }

.vhero__panel {
  --focus: var(--sun);
  position: relative;
  z-index: 0;
  display: grid;
  gap: clamp(2.25rem, 5vw, 3rem);
  width: min(100% - 2 * var(--frame), var(--max));
  margin-inline: auto;
  overflow: hidden;
  padding: clamp(2rem, 6vw, 4.5rem) var(--inset) clamp(2rem, 5vw, 3.5rem);
  border-radius: var(--radius-panel);
  background: var(--navy);
  color: var(--on-navy);
}

/* Grano de papel, como el hero de la página principal */
.vhero__panel::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: var(--grain);
  opacity: 0.05;
  pointer-events: none;
}

.vhero__branches {
  position: absolute;
  bottom: -30%;
  left: -20%;
  z-index: -1;
  width: clamp(22rem, 80%, 42rem);
  aspect-ratio: 4393 / 4419;
  fill: var(--sage);
  opacity: 0.1;
  pointer-events: none;
}

.vhero__head {
  display: grid;
  justify-items: start;
  align-content: start;
  gap: clamp(1.25rem, 2.4vw, 1.75rem);
}

.vhero__head .overline { color: var(--sage); }

.vhero__title {
  max-width: 11em;
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 1.3rem + 3.4vw, 4.5rem);
  font-weight: 300;
  line-height: 1.02;
  letter-spacing: -0.03em;
}

.vhero__lead {
  max-width: 30em;
  color: var(--on-navy-soft);
  font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem);
  line-height: 1.55;
}

.vhero__feature {
  display: grid;
  gap: 1.125rem;
  margin: 0;
}

.vhero__feature .player { border-radius: calc(var(--radius-panel) - 0.375rem); }

.vhero__caption {
  display: grid;
  gap: 0.3125rem;
}

.vhero__source {
  color: var(--sage);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.vhero__name {
  font-family: var(--font-display);
  font-size: clamp(1.375rem, 1.15rem + 0.8vw, 1.875rem);
  line-height: 1.2;
  letter-spacing: -0.014em;
}

.vhero__meta {
  color: var(--on-navy-soft);
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
}

@media (min-width: 64em) {
  .vhero__panel {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: clamp(1.5rem, 2.5vw, 2.5rem);
    align-items: center;
    padding-block: clamp(3rem, 5vw, 5.5rem) clamp(2.5rem, 4vw, 4rem);
  }

  .vhero__head { grid-column: 1 / span 5; }

  /* El video se sale una columna hacia la derecha del eje del titular */
  .vhero__feature { grid-column: 6 / span 7; }

  .vhero__branches {
    bottom: -40%;
    left: -12%;
    width: 52%;
  }
}

/* ---------- Entrevistas y lo más reciente ---------- */

.press { padding-top: clamp(4.5rem, 10vw, 8.5rem); }
.latest { padding-top: clamp(3.5rem, 8vw, 6rem); }

.press__grid {
  display: grid;
  gap: clamp(2rem, 5vw, 3.25rem);
  width: min(100% - 2 * var(--frame), var(--max));
  margin-inline: auto;
  padding-inline: var(--inset);
}

.press__head {
  display: grid;
  justify-items: start;
  gap: clamp(1.125rem, 2vw, 1.5rem);
}

.press__head .overline { color: var(--ink-soft); }
.press__head .overline__icon { fill: var(--sage); }

.press__title {
  max-width: 12em;
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 1.2rem + 3vw, 3.75rem);
  font-weight: 300;
  line-height: 1.04;
  letter-spacing: -0.028em;
}

.press__list {
  display: grid;
  gap: clamp(2.75rem, 5vw, 3.5rem) clamp(1.5rem, 2.5vw, 2.5rem);
}

@media (min-width: 40em) {
  .press__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 64em) {
  .press__list { grid-template-columns: repeat(3, minmax(0, 1fr)); }

  /* De a dos cuando son cuatro: en tres columnas la cuarta quedaría sola */
  .press__list--pairs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.clip {
  display: grid;
  align-content: start;
  justify-items: start;
  gap: 0.5rem;
}

.clip .player {
  justify-self: stretch;
  margin-bottom: 0.625rem;
}

.clip__source {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.375rem 0.625rem;
  color: var(--ink-soft);
  font-size: 0.8125rem;
  font-weight: 500;
}

.clip__kind {
  padding: 0.125rem 0.5625rem 0.1875rem;
  border: 1px solid rgb(31 59 77 / 0.22);
  border-radius: 999px;
  color: var(--ink);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.clip__title {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 1.1rem + 0.5vw, 1.5rem);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.012em;
}

.clip__meta {
  color: var(--ink-soft);
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
}

.clip__link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  margin-top: 0.25rem;
  padding-block: 0.375rem; /* área táctil sin separar más la tarjeta */
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--sun);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.3em;
  transition: text-decoration-color 140ms var(--ease-snap);
}

.clip__link:hover { text-decoration-color: var(--navy); }

.clip__link .icon {
  width: 0.9375rem;
  height: 0.9375rem;
}

/* ---------- Instagram ---------- */

.ig { padding-top: clamp(4.5rem, 10vw, 8.5rem); }

.ig__panel {
  --focus: var(--navy);
  display: grid;
  align-items: center;
  gap: 2rem;
  width: min(100% - 2 * var(--frame), var(--max));
  margin-inline: auto;
  padding: clamp(2.25rem, 6vw, 5rem) var(--inset);
  border-radius: var(--radius-panel);
  background: var(--sage); /* azul sobre salvia: 5.5:1 */
  color: var(--navy);
}

.ig__body {
  display: grid;
  justify-items: start;
  gap: 1rem;
}

.ig__title {
  max-width: 12em;
  font-family: var(--font-display);
  font-size: clamp(2rem, 1.2rem + 2.4vw, 3.25rem);
  font-weight: 300;
  line-height: 1.06;
  letter-spacing: -0.024em;
}

.ig__body p { max-width: 32em; }

.ig__handle {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 0.75rem;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 1.15rem + 2.2vw, 3.25rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.ig__handle .icon {
  width: 0.75em;
  height: 0.75em;
}

.ig__arrow { transition: transform 200ms var(--ease-snap); }
.ig__handle:hover .ig__arrow { transform: translateX(4px); }

@media (min-width: 64em) {
  .ig__panel { grid-template-columns: minmax(0, 1fr) auto; }
}

/* ---------- Invitación ---------- */

.invite { padding-top: clamp(4rem, 9vw, 7rem); }

.invite__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem 3rem;
  width: min(100% - 2 * var(--frame) - 2 * var(--inset), var(--max) - 2 * var(--inset));
  margin-inline: auto;
  padding-top: clamp(2rem, 4vw, 3rem);
  border-top: 1px solid var(--line);
}

.invite__title {
  max-width: 17em;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 1.2rem + 1.8vw, 2.75rem);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

/* ---------- En escenario: recap de Global Minds 2026 ----------
   Video vertical (9:16) alojado en el sitio. En celular va a lo ancho, con
   tope de alto para que el control de reproducción quepa en pantalla; en
   escritorio acompaña al texto como la foto de Conferencias en la home. */

.stage__lead {
  max-width: 30em;
  color: var(--ink);
  font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem);
  line-height: 1.55;
}

.stage__head .btn { margin-top: 0.5rem; }

.stage__media {
  justify-self: center;
  width: min(100%, 24rem, calc((100svh - 6rem) * 9 / 16));
  margin: 0;
}

.stage__video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 9 / 16;
  border-radius: 1rem;
  background: var(--navy);
}

.stage__video:focus-visible { outline: 2px solid var(--navy); outline-offset: 3px; }

@media (min-width: 64em) {
  .stage__grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: clamp(1.5rem, 2.5vw, 2.5rem);
    align-items: center;
  }

  .stage__head { grid-column: 1 / span 6; }
  .stage__media { grid-column: 8 / span 5; justify-self: start; }
}

/* ---------- Movimiento ---------- */

@media (prefers-reduced-motion: no-preference) {
  .vhero__head > * { animation: rise 760ms var(--ease-out) both; }
  .vhero__head > :nth-child(2) { animation-delay: 70ms; }
  .vhero__head > :nth-child(3) { animation-delay: 150ms; }
  .vhero__feature { animation: rise 900ms var(--ease-out) 200ms both; }
  .vhero__branches { animation: grow 1800ms var(--ease-out) 200ms both; }
  .latest:not([hidden]) { animation: rise 640ms var(--ease-out) both; }
}
