/*
 * Getting started: the four videos, each in a phone (AHO-711).
 *
 * The phone is drawn here and not with phone.css's, because the support page
 * does not load that file and the two must look the same. The names are its
 * own (film-*) so nothing here reaches the app screens on the home page.
 *
 * On a narrow screen the four scroll sideways and snap; from 56rem of room
 * they stand in a row. The room is the section's, not the viewport's, so the
 * same markup fits the home page's full width and the support page's column.
 */
.starts {
  container-type: inline-size;
  padding-top: clamp(4rem, 10vw, 8rem);
}

.starts h2 {
  max-width: 16ch;
  margin-top: 0.75rem;
}

.films {
  display: flex;
  gap: clamp(1.25rem, 3vw, 2.5rem);
  margin: clamp(2.5rem, 5vw, 4rem) calc(-1 * var(--gutter)) 0;
  padding: 0 var(--gutter) 0.5rem;
  list-style: none;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--gutter);
  scrollbar-width: none;
}

.films::-webkit-scrollbar {
  display: none;
}

.films li {
  flex: 0 0 min(72vw, 17rem);
  display: grid;
  gap: 1rem;
  align-content: start;
  scroll-snap-align: start;
}

@container (min-width: 34rem) {
  .films {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-inline: 0;
    padding-inline: 0;
    overflow: visible;
  }

  .films li {
    flex: none;
  }
}

@container (min-width: 56rem) {
  .films {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* ---------- The phone, and the video in it ---------- */

.film {
  display: block;
  container-type: inline-size;
  width: 100%;
  color: inherit;
  text-decoration: none;
}

.film-device {
  position: relative;
  display: block;
  padding: 3cqw;
  border-radius: 14cqw;
  background: #15130f;
}

.film-island {
  position: absolute;
  top: 3cqw;
  left: 50%;
  z-index: 2;
  width: 31cqw;
  height: 9cqw;
  border-radius: 999px;
  background: #000;
  transform: translateX(-50%);
}

.film-screen {
  position: relative;
  display: block;
  aspect-ratio: 1290 / 2796;
  overflow: hidden;
  border-radius: 11.5cqw;
  background: #f6f1e7;
}

.film-screen img,
.film-screen iframe {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
}

/* The button is the whole phone; the disc says so. */
.film-play {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 22cqw;
  height: 22cqw;
  border-radius: 50%;
  background: var(--lava);
  box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.28);
  transform: translate(-50%, -50%);
  transition: transform 0.2s ease;
}

.film:hover .film-play,
.film:focus-visible .film-play {
  transform: translate(-50%, -50%) scale(1.08);
}

.film:focus-visible {
  outline: 3px solid var(--lava);
  outline-offset: 4px;
  border-radius: 14cqw;
}

.film-play svg {
  width: 42%;
  margin-left: 6%;
  fill: #17171a;
}

.film.is-playing picture,
.film.is-playing .film-play {
  display: none;
}

/* ---------- The words under each ---------- */

.films h3 {
  margin: 0;
  padding-top: 1rem;
  border-top: var(--rule) solid var(--ink);
  font-size: 1.25rem;
  line-height: 1.2;
}

.films h3 b {
  display: inline-block;
  margin-right: 0.6rem;
  color: var(--lava);
  font: 0.8125rem/1 var(--mono);
  letter-spacing: 0.14em;
  vertical-align: 0.15em;
}

.films p {
  margin: 0;
  color: var(--ink2);
}

.films .length {
  font: 0.8125rem/1.4 var(--mono);
  letter-spacing: 0.08em;
}

.starts .more {
  margin-top: 2.5rem;
  font-weight: 700;
}

.starts .more a {
  color: inherit;
  text-decoration-thickness: 3px;
  text-underline-offset: 0.3em;
  text-decoration-color: var(--lava);
}

@media (prefers-reduced-motion: reduce) {
  .film-play {
    transition: none;
  }
}
