/* Shared by the signup, confirmation, unsubscribe and legal pages.
   Keep the existing desktop design; improve reflow and touch use on phones. */
@media (max-width: 1100px) {
  .waitlist-page main {
    grid-template-columns: minmax(0, 1fr);
    gap: 48px;
    padding: 48px 0;
  }

  .waitlist-page main > div:first-child {
    order: 1;
    min-width: 0;
  }

  .waitlist-page .phone-col {
    order: 2;
    min-width: 0;
    flex-direction: column;
    gap: 20px;
  }

  .waitlist-page .steps {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    max-width: 100%;
  }
}

@media (max-width: 900px) {
  .wrap {
    min-height: 100svh;
  }

  main,
  article,
  .legal,
  .legal nav {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .field input {
    font-size: 16px; /* Avoid automatic zoom when focusing inputs on iOS. */
  }

  .field label {
    font-size: 12px;
  }

  .consent {
    font-size: 14px;
  }

  .consent input[type="checkbox"] {
    width: 20px;
    height: 20px;
  }

  .social a {
    width: 44px;
    height: 44px;
  }

  .legal nav {
    gap: 4px 16px;
  }

  .legal a,
  .back {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }

  button {
    min-height: 44px;
    max-width: 100%;
  }

  .phone {
    width: min(290px, 100%);
    height: auto;
    aspect-ratio: 290 / 590;
  }

  /* A percentage-height child inside an aspect-ratio box can make WebKit
     grow the phone. Insets keep the screen inside the existing 11px bezel. */
  .phone > .screen {
    position: absolute;
    inset: 11px;
    width: auto;
    height: auto;
  }
}

@media (max-width: 560px) {
  .wrap {
    padding-left: max(20px, env(safe-area-inset-left));
    padding-right: max(20px, env(safe-area-inset-right));
    padding-bottom: max(24px, env(safe-area-inset-bottom));
  }

  .waitlist-page main {
    padding-top: 32px;
  }

  .brand {
    margin-bottom: 28px;
  }

  h1 {
    overflow-wrap: anywhere;
  }

  form {
    padding: 16px;
  }

  .contact {
    padding: 16px;
  }

  .actions {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
  }
}

/* Match the landing hero's typography and clipped slide-and-fade word band. */
.waitlist-page .waitlist-hero-title {
  font-size: 48px;
  line-height: 1.1;
  letter-spacing: -1.2px;
}

.waitlist-hero-title .hero-rotator {
  display: block;
  position: relative;
  height: 1.15em;
  overflow: hidden;
}

.waitlist-hero-title .hero-rotator span {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  white-space: nowrap;
  color: #3692e4;
  transform: translateY(100%);
  opacity: 0;
  transition-property: transform, opacity;
  transition-timing-function: cubic-bezier(0.22, 0.61, 0.36, 1);
  transition-duration: 0ms;
}

.waitlist-hero-title .hero-rotator span:first-child {
  transform: translateY(0%);
  opacity: 1;
}

@media (max-width: 960px) {
  .waitlist-page .waitlist-hero-title {
    font-size: clamp(32px, 6vw, 42px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .waitlist-hero-title .hero-rotator span {
    transition-duration: 0ms !important;
  }
}
