/* Hero phone mockup + full-screen video experience for new.auths.xyz */

.hero-phone-wrap {
  position: relative;
  width: min(380px, 82vw);
  margin-inline: auto;
}

.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.is-pulse-stopped .hero-phone__play::after {
  animation: none;
}

.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: 48% 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__ad-badge {
  position: absolute;
  top: 5%;
  right: 7%;
  width: 7%;
  z-index: 4;
  pointer-events: none;
  user-select: none;
}

.hero-phone__brand {
  position: absolute;
  left: calc(6.38297868337cqi + 2.744688px);
  bottom: 9.71%;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  z-index: 4;
  pointer-events: none;
  user-select: none;
}

.hero-phone__brand-logo {
  width: clamp(28px, 7.8vw, 44px);
  height: clamp(28px, 7.8vw, 44px);
  object-fit: contain;
}

.hero-phone__brand-name {
  color: #fff;
  font-weight: 600;
  font-size: clamp(11px, 4.42945cqw, 16px);
  line-height: 1.2;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.hero-phone__ad-button {
  position: absolute;
  right: 7%;
  bottom: 11%;
  width: 34%;
  z-index: 4;
  pointer-events: none;
  user-select: none;
}

.hero-phone__caption {
  position: absolute;
  left: calc(8.509192cqi + 2.744688px);
  right: calc(6.642488cqi + 0.276889px);
  bottom: 4.55%;
  color: #fff;
  font-weight: 300;
  font-size: clamp(11px, 4.42945cqw, 16px);
  line-height: 1.2;
  z-index: 4;
  pointer-events: none;
  user-select: none;
  text-align: left;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
}

.hero-phone__watch-overlay {
  position: absolute;
  left: 50%;
  top: 47%;
  transform: translate(-50%, -50%);
  z-index: 5;
  pointer-events: none;
}

.hero-phone__play {
  position: relative;
  width: 54px;
  height: 54px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #fff;
  color: #111;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.hero-phone__play svg {
  width: 1.15rem;
  height: 1.15rem;
  margin-left: 0.12rem;
  fill: currentColor;
}

.hero-phone__play::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.42);
  animation: auths-play-pulse 2.4s ease-out infinite;
}

.hero-phone:hover .hero-phone__play,
.hero-phone:focus-visible .hero-phone__play {
  transform: scale(1.04);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.34);
}

@keyframes auths-play-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.42);
  }

  70% {
    box-shadow: 0 0 0 18px rgba(255, 255, 255, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
  }
}

/* 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;
}

.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-close {
  position: absolute;
  top: max(0.75rem, env(safe-area-inset-top, 0px));
  right: max(0.75rem, env(safe-area-inset-right, 0px));
  z-index: 5;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 280ms ease, background 180ms ease;
}

.hero-video-close svg {
  width: 1.125rem;
  height: 1.125rem;
  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.6);
}

.hero-video-stage.is-closing .hero-video-close {
  opacity: 0;
  pointer-events: none;
}

.hero-video-manual-play {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: none;
  align-items: center;
  justify-content: center;
  border: 0;
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}

.hero-video-manual-play.is-visible {
  display: flex;
}

.hero-video-end-panel {
  position: absolute;
  inset: auto 0 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.875rem;
  padding: 1.25rem 1rem max(1.25rem, env(safe-area-inset-bottom, 0px));
  background: linear-gradient(to top, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.45) 72%, transparent 100%);
  opacity: 0;
  transform: translateY(0.75rem);
  transition: opacity 280ms ease, transform 280ms ease;
  pointer-events: none;
}

.hero-video-end-panel.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.hero-video-end-panel__lead {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
  text-align: center;
}

.hero-video-join-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 12rem;
  border-radius: 999px;
  padding: 0.75rem 1.5rem;
  font-size: 0.9375rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  box-shadow: 0 10px 28px rgba(230, 0, 122, 0.28);
  transition: opacity 180ms ease, transform 180ms ease;
}

.hero-video-join-cta:hover {
  opacity: 0.92;
}

.hero-video-join-cta:active {
  transform: scale(0.98);
}

.hero-video-join-cta:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .hero-phone__play,
  .hero-phone__play::after {
    animation: none !important;
    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-end-panel {
    transition: none;
  }
}

@media (max-width: 767px) {
  .hero-phone__watch-overlay {
    top: 45%;
  }

  .hero-phone__play {
    width: 46px;
    height: 46px;
  }

  .hero-phone__play svg {
    width: 1rem;
    height: 1rem;
  }

  .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;
}
