/* La película ocupa la primera pantalla. El resto de la portada sigue su flujo. */
.hero { padding: 0 0 clamp(44px, 6vw, 88px); }
.hero__grid {
  max-width: none;
  padding: 0;
  grid-template-columns: minmax(var(--gutter), 1fr) minmax(0, 560px) minmax(0, 580px) minmax(var(--gutter), 1fr);
  grid-template-areas: "film film film film" ". heading copy ." ". demo copy .";
  gap: 0;
  align-items: start;
}
.hero__media { display: contents; }
.hero__heading, .hero__copy { align-self: start; margin-top: clamp(36px, 6vw, 80px); }
.hero__heading { padding-right: clamp(22px, 3vw, 46px); }
.hero__copy { padding-left: clamp(12px, 2vw, 32px); }
.hero__title { margin-bottom: 12px; }
.hero-demo { grid-area: demo; margin-right: var(--gutter); }
.hero-film {
  grid-area: film;
  width: 100%;
  height: calc(100vh - var(--header-h) - 1px);
  height: calc(100dvh - var(--header-h) - 1px);
  --control-bottom: max(clamp(12px, 2.7vh, 30px), env(safe-area-inset-bottom));
  --control-right: max(clamp(12px, 3vw, 52px), env(safe-area-inset-right));
  isolation: isolate;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: radial-gradient(ellipse at 82% 42%, #13213a, #0b0d12 70%);
}
.hero-film video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  object-fit: cover;
  object-position: center;
}
/* Antes de que el reproductor asigne su carátula, mostrar el mismo primer cuadro. */
.hero-film video:not([poster]) {
  background: center / cover no-repeat url("/assets/hero-ia-20261126-horizontal.webp?v=3");
}
@media (max-width: calc(141dvh - 103px)) {
  .hero-film video:not([poster]) { background-image: url("/assets/hero-ia-20261126-cuadrado.webp?v=3"); }
}
@media (max-width: calc(81dvh - 59px)) {
  .hero-film video:not([poster]) { background-image: url("/assets/hero-ia-20261126-vertical.webp?v=3"); }
}
.hero-film::after {
  content: "";
  position: absolute;
  inset: 83% 0 0;
  pointer-events: none;
  background: linear-gradient(transparent, #090c13a3);
}
.viewport-cta, .hero-film__toggle {
  position: absolute;
  z-index: 1;
  bottom: var(--control-bottom);
}
.hero-film__toggle {
  left: 50%;
  right: auto;
  transform: translateX(-50%);
}
.viewport-cta {
  right: var(--control-right);
  max-width: calc(50% - 30px - var(--control-right));
  text-align: center;
}
.hero-film:has(video[controls]) .viewport-cta { bottom: max(54px, var(--control-bottom)); }

/* En un teléfono girado, despejar los controles sin cortar el rótulo superior. */
@media (orientation: landscape) and (max-height: 500px) {
  .hero-film video { object-position: center max(68%, calc(12px - 16.4vw)); }
}

@media (max-width: 780px) {
  .hero__grid {
    grid-template-columns: var(--gutter) minmax(0, 1fr) var(--gutter);
    grid-template-areas: "film film film" ". heading ." ". copy ." ". demo .";
  }
  .hero__heading, .hero__copy { padding: 0; }
  .hero__copy { margin-top: 14px; }
  .hero-demo { margin: 12px 0 0; }
}

@media (max-width: 530px) {
  .viewport-cta {
    min-height: 44px;
    height: auto;
    padding: 7px clamp(6px, 2vw, 12px);
    font-size: 14px;
    line-height: 1.15;
    white-space: normal;
    text-wrap: balance;
  }
  .viewport-cta .icon { display: none; }
}

@media (orientation: landscape) and (max-height: 345px) {
  .viewport-cta {
    right: max(12px, env(safe-area-inset-right));
    width: 112px;
    height: 44px;
    padding: 2px 6px;
    font-size: 14px;
    line-height: 1.1;
    white-space: normal;
    text-wrap: balance;
  }
  .viewport-cta .icon { display: none; }
}

.wa-float[inert] { visibility: hidden; }
.wa-float {
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  background: #128c7e;
}
.wa-float:hover { background: #0b7468; }
