/* Hero phone mockup + full-screen video experience for the Auths homepage.
 * Owns thumbnail, playing, end-screen presentation, and the decorative
 * “Watch this” cue anchored to the phone wrapper.
 * Does not own waitlist, opening-message, or page layout.
 * Canonical production path for the homepage phone mockup video.
 */

.hero-phone-wrap {
  position: relative;
  width: min(380px, 82vw);
  margin-inline: auto;
  overflow: visible;
}

.watch-this-cue {
  position: absolute;
  z-index: 4;
  display: flex;
  align-items: center;
  pointer-events: none;
  user-select: none;
}

.watch-this-label {
  font-family: inherit;
  font-style: italic;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  color: #0a0a0a;
}

.watch-this-arrow {
  display: block;
  height: auto;
  pointer-events: none;
}

/* Stacked hero: cue sits above the phone, pointing down-left. */
@media (max-width: 767px) {
  .hero-phone-wrap {
    margin-top: 3rem;
  }

  .watch-this-cue {
    top: -70px;
    right: -22px;
    bottom: auto;
    left: auto;
    display: block;
    width: 86px;
    height: 80px;
  }

  .watch-this-label {
    position: absolute;
    top: 0;
    right: 0;
    font-size: 18px;
  }

  .watch-this-arrow {
    position: absolute;
    top: 32px;
    left: -5px;
    width: 56px;
    margin: 0;
    transform: rotate(90deg);
    transform-origin: 50% 50%;
  }
}

@media (max-width: 390px) {
  .watch-this-cue {
    top: -66px;
    right: 0;
    width: 82px;
  }

  .watch-this-label {
    font-size: 16px;
  }

  .watch-this-arrow {
    top: 30px;
    left: -3px;
    width: 52px;
  }
}

/* Two-column hero: cue sits left of the phone, pointing down-right. */
@media (min-width: 768px) {
  .watch-this-cue {
    top: auto;
    right: auto;
    left: clamp(-220px, -17vw, -180px);
    bottom: clamp(88px, 12.6%, 96px);
    display: flex;
    align-items: center;
    width: auto;
    height: auto;
  }

  .watch-this-label {
    position: static;
    font-size: clamp(15px, 1.3vw, 17px);
  }

  .watch-this-arrow {
    position: static;
    width: clamp(88px, 7.8vw, 100px);
    margin-left: -6px;
    transform: none;
  }
}

/* Keep the cue in the column gap on mid-width two-column layouts. */
@media (min-width: 768px) and (max-width: 1023px) {
  .watch-this-cue {
    left: clamp(-160px, -14vw, -112px);
    bottom: clamp(72px, 11%, 88px);
  }

  .watch-this-label {
    font-size: 15px;
  }

  .watch-this-arrow {
    width: clamp(72px, 9vw, 88px);
  }
}

.hero-phone {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 563 / 1116;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.hero-phone:focus-visible {
  outline: 2px solid #e6007a;
  outline-offset: 4px;
}

.hero-phone__screen {
  position: absolute;
  left: calc(3% - 3px);
  right: calc(3% - 1px);
  top: 1.6%;
  bottom: 1.6%;
  overflow: hidden;
  border-radius: 12% / 6%;
  background: #000;
  box-shadow: inset 3px 0 0 #000;
  z-index: 1;
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  container-type: inline-size;
  container-name: phone-screen;
}

.hero-phone__preview {
  position: absolute;
  top: -3px;
  right: -2px;
  bottom: -3px;
  left: -4px;
  width: auto;
  height: auto;
  min-width: calc(100% + 6px);
  min-height: calc(100% + 6px);
  display: block;
  object-fit: cover;
  object-position: center;
  transform: none;
  background: #000;
  pointer-events: none;
  user-select: none;
}

.hero-phone__frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
  pointer-events: none;
  user-select: none;
}

.hero-phone__play-btn {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.hero-phone__play-circle {
  display: grid;
  place-items: center;
  width: clamp(3.68rem, 21.76cqi, 5.28rem);
  height: clamp(3.68rem, 21.76cqi, 5.28rem);
  border-radius: 50%;
  color: #000;
  background: #fff;
  opacity: 0.75;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.22);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.hero-phone__play-triangle {
  display: block;
  width: 100%;
  height: 100%;
}

.hero-phone:hover .hero-phone__play-circle,
.hero-phone:focus-visible .hero-phone__play-circle {
  transform: scale(1.04);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.34);
}

/* Full-screen cinematic layer */
.hero-video-stage {
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  visibility: hidden;
}

.hero-video-stage.is-active {
  pointer-events: auto;
  visibility: visible;
}

.hero-video-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  opacity: 0;
  transition: opacity 400ms cubic-bezier(0.22, 1, 0.36, 1);
}

.hero-video-stage.is-open .hero-video-backdrop {
  opacity: 1;
  background: rgba(0, 0, 0, 0.82);
}

.hero-video-stage.is-closing .hero-video-backdrop {
  opacity: 0;
  background: rgba(0, 0, 0, 0);
}

.hero-video-stage.is-mobile-fullscreen.is-open .hero-video-backdrop {
  background: #000;
}

.hero-video-shell {
  position: absolute;
  overflow: hidden;
  border-radius: 2.25rem;
  background: #000;
  transform-origin: center center;
  will-change: transform, opacity;
  container-type: inline-size;
  container-name: video-shell;
}

.hero-video-stage.is-mobile-fullscreen.is-open .hero-video-shell {
  border-radius: 0;
}

.hero-video-shell video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: none;
  display: block;
  background: #000;
}

.hero-video-shell video::-webkit-media-controls {
  display: none !important;
}

.hero-video-close {
  position: absolute;
  top: 4%;
  left: 94%;
  right: auto;
  z-index: 7;
  display: grid;
  place-items: center;
  width: clamp(2.5rem, 12cqi, 3rem);
  height: clamp(2.5rem, 12cqi, 3rem);
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #fff;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.55));
  transition: opacity 280ms ease, background 180ms ease;
}

.hero-video-close svg {
  width: 1.15rem;
  height: 1.15rem;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.hero-video-close:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.hero-video-close.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.hero-video-close:hover {
  background: rgba(0, 0, 0, 0.22);
}

.hero-video-stage[data-state="ended"] .hero-video-close {
  background: #3b1f63;
  filter: none;
}

.hero-video-stage[data-state="ended"] .hero-video-close:hover {
  background: #4a2878;
}

.hero-video-stage.is-closing .hero-video-close {
  opacity: 0;
  pointer-events: none;
}

.hero-video-pause-hit {
  position: absolute;
  inset: 0;
  z-index: 3;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.hero-video-stage[data-state="paused"] .hero-video-pause-hit,
.hero-video-stage[data-state="ended"] .hero-video-pause-hit,
.hero-video-stage.is-closing .hero-video-pause-hit {
  display: none;
}

.hero-video-playing {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  opacity: 1;
  transition: opacity 180ms ease;
}

.hero-video-stage[data-state="ended"] .hero-video-playing,
.hero-video-stage.is-closing .hero-video-playing {
  opacity: 0;
  visibility: hidden;
}

.hero-video-playing__fade {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 24%;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.72) 0%,
    rgba(0, 0, 0, 0.32) 58%,
    transparent 100%
  );
}

.hero-video-playing__brand {
  position: absolute;
  left: 6%;
  top: 89%;
  display: flex;
  align-items: center;
  gap: 1.2cqi;
  min-width: 0;
  transform: translateY(-50%);
}

.hero-video-playing__logo {
  width: 5.8cqi;
  height: 5.8cqi;
  min-width: 1.5rem;
  min-height: 1.5rem;
  flex-shrink: 0;
  border-radius: 50%;
  object-fit: cover;
  background: #fff;
}

.hero-video-playing__name {
  color: #fff;
  font-weight: 700;
  font-size: clamp(0.8125rem, 4.6cqi, 1.0625rem);
  line-height: 1.2;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.hero-video-playing__caption {
  position: absolute;
  left: 6%;
  right: 14%;
  top: 94%;
  margin: 0;
  color: #fff;
  font-weight: 400;
  font-size: clamp(0.6875rem, 3.9cqi, 0.9375rem);
  line-height: 1.25;
  text-align: left;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
  transform: translateY(-50%);
}

.hero-video-playing__more {
  position: absolute;
  left: 67%;
  top: 89%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  border-radius: 999px;
  padding: 0.48em 0.95em;
  background: #fff;
  color: #111;
  font-size: clamp(0.6875rem, 3.7cqi, 0.875rem);
  font-weight: 700;
  line-height: 1.1;
  text-decoration: none;
  white-space: nowrap;
  transform: translate(-50%, -50%);
}

.hero-video-playing__more:hover {
  opacity: 0.92;
}

.hero-video-playing__more:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.hero-video-volume {
  position: absolute;
  left: 93%;
  top: 91%;
  right: auto;
  bottom: auto;
  z-index: 6;
  display: grid;
  place-items: center;
  pointer-events: auto;
  width: clamp(2.15rem, 10.5cqi, 2.65rem);
  height: clamp(2.15rem, 10.5cqi, 2.65rem);
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.38);
  color: #fff;
  cursor: pointer;
  transform: translate(-50%, -50%);
}

.hero-video-volume:hover {
  background: rgba(0, 0, 0, 0.5);
}

.hero-video-volume:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.hero-video-volume__icon {
  width: 58%;
  height: 58%;
  display: block;
  object-fit: contain;
  pointer-events: none;
  filter: invert(1);
}

.hero-video-stage[data-state="ended"] .hero-video-volume {
  pointer-events: none;
  opacity: 0;
}

.hero-video-manual-play {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: none;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  pointer-events: none;
  cursor: pointer;
}

.hero-video-manual-play.is-visible {
  display: flex;
}

.hero-video-manual-play.is-visible .hero-phone__play-circle {
  pointer-events: auto;
}

.hero-video-manual-play:hover .hero-phone__play-circle,
.hero-video-manual-play:focus-visible .hero-phone__play-circle {
  transform: scale(1.04);
}

.hero-video-end {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 280ms ease;
}

.hero-video-end.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.hero-video-end__fade {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 64%;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.9) 0%,
    rgba(0, 0, 0, 0.55) 48%,
    transparent 100%
  );
  pointer-events: none;
}

.hero-video-end__replay {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  width: clamp(5.5rem, 28cqi, 7.25rem);
  height: clamp(5.5rem, 28cqi, 7.25rem);
  margin: 0;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: #000;
  cursor: pointer;
  transform: translate(-50%, -50%);
}

.hero-video-end__replay:hover {
  background: #f3f3f3;
}

.hero-video-end__replay:focus-visible {
  outline: 2px solid #111;
  outline-offset: 3px;
}

.hero-video-end__replay-icon {
  display: grid;
  place-items: center;
  width: 44%;
  height: 44%;
}

.hero-video-end__replay-icon svg {
  width: 100%;
  height: 100%;
}

.hero-video-end__replay-label {
  font-size: clamp(0.75rem, 4.2cqi, 0.9375rem);
  font-weight: 700;
  line-height: 1;
}

.hero-video-end__copy {
  position: absolute;
  top: 60%;
  left: 6%;
  right: 6%;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.1rem;
}

.hero-video-end__headline {
  margin: 0;
  color: #fff;
  font-size: clamp(1.25rem, 7.2cqi, 1.85rem);
  font-weight: 500;
  line-height: 1.2;
  text-align: center;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.45);
}

.hero-video-end__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 78%;
  max-width: 20rem;
  border-radius: 999px;
  padding: 0.85em 1.35em;
  background: linear-gradient(90deg, #e6007a 0%, #ff5c00 100%);
  color: #fff;
  font-size: clamp(0.9375rem, 4.8cqi, 1.125rem);
  font-weight: 700;
  line-height: 1.1;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 10px 28px rgba(230, 0, 122, 0.28);
  transition: opacity 180ms ease, transform 180ms ease;
}

.hero-video-end__cta:hover {
  opacity: 0.94;
}

.hero-video-end__cta:active {
  transform: scale(0.98);
}

.hero-video-end__cta:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .hero-phone__play-circle {
    transition: none !important;
  }

  .hero-video-backdrop {
    transition: opacity 160ms ease;
  }

  .hero-video-shell {
    transition: none !important;
  }

  .hero-video-stage.is-closing .hero-video-shell {
    transition: opacity 160ms ease !important;
  }

  .hero-video-playing,
  .hero-video-end {
    transition: none;
  }
}

@media (max-width: 767px) {
  .hero-video-stage.is-reduced .hero-video-shell {
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    aspect-ratio: auto !important;
    transform: none !important;
    border-radius: 0 !important;
  }

  .hero-video-stage.is-reduced.is-open .hero-video-backdrop {
    background: #000;
  }
}

@media (min-width: 768px) {
  .hero-video-stage.is-reduced .hero-video-shell {
    top: 50% !important;
    left: 50% !important;
    width: min(92vw, 420px) !important;
    height: auto !important;
    aspect-ratio: 9 / 16;
    transform: translate(-50%, -50%) !important;
    border-radius: 1rem;
  }
}

.hero-video-stage.is-reduced.is-open .hero-video-backdrop {
  background: rgba(0, 0, 0, 0.75);
}

body.hero-scroll-lock {
  overflow: hidden;
}
