/* Homepage teaser: the version 2 video, muted with captions until the visitor asks for sound. */

.teaser {
  padding: 36px 0 8px;
}

.teaser h2 {
  max-width: 30ch;
  margin-top: 10px;
  font-size: clamp(1.5rem, 2.8vw, 2.2rem);
  line-height: 1.1;
}

.teaser-frame {
  margin-top: 22px;
}

.teaser-media {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #0b0d10;
}

.teaser-media video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #0b0d10;
}

.teaser-captions {
  position: absolute;
  left: 50%;
  bottom: 64px;
  transform: translateX(-50%);
  width: max-content;
  max-width: min(92%, 46rem);
  padding: 6px 12px 7px;
  color: #fff;
  background: rgba(10, 10, 10, 0.78);
  font-family: var(--sans);
  font-size: clamp(0.92rem, 1.5vw, 1.3rem);
  line-height: 1.35;
  text-align: center;
  pointer-events: none;
}

.teaser-captions:empty,
.teaser-captions[hidden] {
  display: none;
}

.teaser-controls {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  display: flex;
  gap: 8px;
  align-items: center;
}

.teaser-controls .teaser-cc {
  margin-left: auto;
}

.teaser-controls button {
  min-height: 36px;
  padding: 7px 12px;
  color: #fff;
  background: rgba(10, 10, 10, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: var(--radius);
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  cursor: pointer;
}

.teaser-controls button:hover,
.teaser-controls button:focus-visible {
  border-color: #fff;
  background: rgba(10, 10, 10, 0.92);
}

.teaser-controls button:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 2px;
}

.teaser-controls .teaser-sound {
  font-weight: 600;
}

.teaser-note {
  margin-top: 10px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.74rem;
  line-height: 1.5;
}

/* Phones: the picture is too small to cover, so the captions and buttons sit in a strip under it. */
@media (max-width: 640px) {
  .teaser {
    padding-top: 24px;
  }

  .teaser-media {
    aspect-ratio: auto;
  }

  .teaser-media video {
    height: auto;
    aspect-ratio: 16 / 9;
  }

  .teaser-captions,
  .teaser-captions:empty {
    position: static;
    display: flex;
    align-items: center;
    justify-content: center;
    width: auto;
    max-width: none;
    min-height: calc(2 * 1.35em + 12px);
    padding: 6px 10px;
    transform: none;
    background: #0b0d10;
    font-size: 0.86rem;
  }

  .teaser-captions[hidden] {
    display: flex;
  }

  .teaser-controls {
    position: static;
    padding: 0 8px 8px;
    background: #0b0d10;
    gap: 6px;
  }

  .teaser-controls button {
    min-height: 32px;
    padding: 5px 9px;
    font-size: 0.72rem;
  }
}

.teaser-controls[hidden] {
  display: none;
}

.teaser-transcript {
  margin-top: 8px;
  font-size: 0.86rem;
  color: var(--muted);
}

.teaser-transcript summary {
  cursor: pointer;
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--ink);
}

.teaser-transcript p {
  max-width: 72ch;
  margin-top: 6px;
}
