/*
 * Keep the hero glitch animation from changing document height on common
 * phone widths. The original phrase fits on one line in this range, while
 * some wider replacement glyphs do not. Clipping only the animated overflow
 * preserves the effect without creating a temporary second line.
 */
@media (min-width: 361px) and (max-width: 479px) {
  #top h1.display-xl .text-signal {
    contain: inline-size;
    display: block;
    width: 100%;
    overflow-x: clip;
    white-space: nowrap;
  }
}

@media (max-width: 479px) {
  #device dl > div {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.35rem;
    padding-block: 0.875rem;
  }

  #device dl dd {
    max-width: 100%;
    text-align: left;
  }
}

.legal-footer {
  background: #101010;
  border-top: 1px solid rgb(255 255 255 / 15%);
  color: #f4f1e7;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  padding: 1.5rem clamp(1.25rem, 4vw, 3rem);
}

.legal-footer__inner {
  align-items: center;
  display: flex;
  gap: 1rem 2rem;
  justify-content: space-between;
  margin-inline: auto;
  max-width: 1400px;
}

.legal-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1.25rem;
  justify-content: flex-end;
}

.legal-footer a {
  color: inherit;
  text-underline-offset: 0.2em;
}

@media (max-width: 639px) {
  .legal-footer__inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .legal-footer nav {
    justify-content: flex-start;
  }
}

/*
 * Product campaign photography. These supporting images are intentionally
 * decorative: the surrounding sections already carry the product name,
 * description, and specifications. Keeping them in CSS also lets the
 * server-rendered and hydrated page share the exact same markup.
 */
#how > div::after {
  aspect-ratio: 1672 / 941;
  background-image: url("/assets/marketing/flock-block-studio-dark.webp");
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  border: 1px solid rgb(255 255 255 / 15%);
  content: "";
  display: block;
  margin-top: clamp(3.5rem, 7vw, 6.5rem);
  width: 100%;
}

#scan + section > div::after {
  aspect-ratio: 3 / 1;
  background-image:
    url("/assets/marketing/flock-block-everyday-carry.webp"),
    url("/assets/marketing/flock-block-cafe.webp");
  background-position: left center, right center;
  background-repeat: no-repeat;
  background-size: calc(50% - 0.375rem) 100%;
  content: "";
  display: block;
  margin-top: clamp(3.5rem, 7vw, 6rem);
  width: 100%;
}

#device figure {
  overflow: hidden;
}

#device figure::after {
  aspect-ratio: 1;
  background-image: url("/assets/marketing/flock-block-usb-c-detail.webp");
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  border: 1px solid rgb(255 255 255 / 25%);
  bottom: clamp(0.75rem, 2vw, 1.25rem);
  box-shadow: 0 1.25rem 3rem rgb(0 0 0 / 32%);
  content: "";
  display: block;
  position: absolute;
  right: clamp(0.75rem, 2vw, 1.25rem);
  width: 42%;
}

@media (max-width: 639px) {
  #scan + section > div::after {
    aspect-ratio: 3 / 4;
    background-position: center top, center bottom;
    background-size: 100% calc(50% - 0.375rem);
  }

  #device figure::after {
    width: 44%;
  }
}
