/* US D/1–D/6 bold pop guided paywall — ui-us.pen D/* */

:root {
  --design-w: 402;
  --design-h: 822;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --native-safe-top: 0px;
  --native-safe-right: 0px;
  --native-safe-bottom: 0px;
  --native-safe-left: 0px;
  --safe-top: max(var(--native-safe-top), env(safe-area-inset-top, 0px));
  --safe-right: max(var(--native-safe-right), env(safe-area-inset-right, 0px));
  --safe-bottom: max(var(--native-safe-bottom), env(safe-area-inset-bottom, 0px));
  --safe-left: max(var(--native-safe-left), env(safe-area-inset-left, 0px));
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --page-ms: 480ms;
  --cta-bg: #161616;
  --cta-fg: #ffffff;
  --dot-active: #161616;
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

html,
body {
  margin: 0;
  min-height: 100%;
  height: 100%;
  font-family: var(--font);
  background: #111;
  color: #151515;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

body {
  overflow: hidden;
}

/* Hide stage until images are preloaded (avoids empty-image flash). */
html:not(.is-assets-ready) .stage {
  opacity: 0;
}

html.is-assets-ready .stage {
  opacity: 1;
}


.stage {
  min-height: 100%;
  min-height: 100dvh;
  display: grid;
  place-items: center;
}

.phone {
  width: 100%;
  height: 100%;
  position: relative;
}

.paywall {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #ffe500;
  isolation: isolate;
  --u: calc(100% / var(--design-w));
  --v: calc(100% / var(--design-h));
}

/* Per-step CTA + surface themes */
.paywall[data-step="0"] {
  --cta-bg: #161616;
  --cta-fg: #ffffff;
  --dot-active: #161616;
}
.paywall[data-step="1"] {
  --cta-bg: #ffffff;
  --cta-fg: #111111;
  --dot-active: #111111;
}
.paywall[data-step="2"] {
  --cta-bg: #151515;
  --cta-fg: #ffffff;
  --dot-active: #ffffff;
}
.paywall[data-step="3"] {
  --cta-bg: #161616;
  --cta-fg: #ffffff;
  --dot-active: #161616;
}
.paywall[data-step="4"] {
  --cta-bg: #111111;
  --cta-fg: #d7ff25;
  --dot-active: #d7ff25;
}
.paywall[data-step="5"],
.paywall.is-pro {
  --cta-bg: #111111;
  --cta-fg: #ffffff;
  --dot-active: #d7ff25;
}

.feature-stack {
  position: absolute;
  inset: 0;
  z-index: 1;
  transition: opacity var(--page-ms) var(--ease-out);
}

.paywall.is-pro .feature-stack {
  opacity: 0;
  pointer-events: none;
}

.feature {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateX(18px) scale(0.985);
  transition:
    opacity var(--page-ms) var(--ease-out),
    transform var(--page-ms) var(--ease-out),
    visibility 0s linear var(--page-ms);
  content-visibility: hidden;
  contain: layout paint style;
}

.feature.is-active {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition:
    opacity var(--page-ms) var(--ease-out),
    transform var(--page-ms) var(--ease-out),
    visibility 0s linear 0s;
  content-visibility: visible;
}

.feature.is-exit-left {
  opacity: 0;
  visibility: visible;
  transform: translateX(-22px) scale(0.985);
}

.feature.is-enter-right {
  opacity: 0;
  transform: translateX(28px) scale(0.99);
}

.feature--d1 {
  background: #ffe500;
}
.feature--d2 {
  background: #fdfdf0;
}
.feature--d3 {
  background: #2a1030;
}
.feature--d4 {
  background: #fe620d;
}
.feature--d5 {
  background: #e8f56a;
}

.feature__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.feature__bg-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  user-select: none;
  -webkit-user-drag: none;
}

.feature.is-active .feature__bg-img,
.feature.is-active .feature__hero-mid-img {
  animation: heroIn 0.5s var(--ease-out) both;
}

.feature__solid {
  position: absolute;
  inset: 0;
  background: #fe620d;
  z-index: 0;
}

/* D/4 mid visual */
.feature__hero-mid {
  position: absolute;
  left: calc(22 * var(--u));
  top: calc(165 * var(--v));
  width: calc(340 * var(--u));
  height: calc(529 * var(--v));
  z-index: 1;
  overflow: hidden;
  border-radius: 8px;
  pointer-events: none;
}

.feature__hero-mid-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  user-select: none;
  -webkit-user-drag: none;
}

.feature__copy {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 5;
  padding: 0 calc(24 * var(--u));
  pointer-events: none;
}

.feature__copy--top {
  top: max(48px, calc(var(--safe-top) + 40px));
}

.feature.is-active .feature__copy {
  animation: contentIn 0.6s var(--ease-out) 0.05s both;
}

.feature__title {
  margin: 0;
  max-width: 354px;
  color: #151515;
  font-size: clamp(26px, 7.5vw, 30px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.feature__subtitle {
  margin: 10px 0 0;
  max-width: 340px;
  color: #2a2a2a;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
}

.feature__copy--light .feature__title {
  color: #ffffff;
}
.feature__copy--light .feature__subtitle {
  color: #fff2fa;
}

.feature__copy--dark-warm .feature__title {
  color: #1c120d;
}
.feature__copy--dark-warm .feature__subtitle {
  color: #4e2514;
}

.feature--d2 .feature__title {
  color: #101010;
}
.feature--d2 .feature__subtitle {
  color: #123b3b;
}

.feature--d5 .feature__title {
  color: #111111;
}
.feature--d5 .feature__subtitle {
  color: #243000;
}

.paywall__footer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 8;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 calc(24 * var(--u)) max(20px, calc(var(--safe-bottom) + 16px));
  transition:
    opacity var(--page-ms) var(--ease-out),
    transform var(--page-ms) var(--ease-out);
}

.paywall__footer--continue {
  gap: 12px;
}

.paywall.is-pro .paywall__footer--continue {
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
}

.paywall__dots {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
  height: 10px;
}

.paywall__dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.18);
  transition:
    width 0.28s var(--ease-out),
    background 0.28s ease;
}

.paywall[data-step="2"] .paywall__dot {
  background: rgba(255, 255, 255, 0.28);
}

.paywall__dot.is-active {
  width: 16px;
  background: var(--dot-active);
}

.paywall__cta {
  position: relative;
  width: min(354px, 100%);
  height: 54px;
  min-height: 54px;
  border: 0;
  border-radius: 15px;
  padding: 0 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--cta-fg);
  font-family: inherit;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  background: var(--cta-bg);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
  transition: transform 0.18s var(--ease-out);
}

.paywall__cta--trial {
  width: 100%;
  max-width: 354px;
  color: #ffffff;
  background: #111111;
}

.paywall__cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 35%,
    rgba(255, 255, 255, 0.22) 50%,
    transparent 65%
  );
  transform: translateX(-120%);
  animation: ctaShimmer 3.6s ease-in-out 1.2s infinite;
  pointer-events: none;
}

.paywall__cta-label,
.paywall__cta-spinner {
  position: relative;
  z-index: 1;
}

.paywall__cta:active {
  transform: scale(0.975);
}

.paywall__cta[disabled],
.paywall.is-busy .paywall__cta--trial {
  cursor: progress;
}

.paywall__cta-spinner {
  display: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  animation: spin 0.7s linear infinite;
}

.paywall.is-busy .paywall__cta-spinner {
  display: inline-block;
}

.paywall__legal {
  margin: 12px 0 0;
  color: rgba(17, 17, 17, 0.55);
  font-size: 11px;
  font-weight: 600;
}

.paywall__close {
  position: absolute;
  top: calc(var(--safe-top) + 10px);
  right: max(14px, calc(var(--safe-right) + 10px));
  z-index: 20;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #111;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
  cursor: pointer;
  opacity: 0;
  transform: scale(0.9);
  transition:
    opacity 0.25s ease,
    transform 0.25s ease;
}

.paywall__close:not([hidden]) {
  opacity: 1;
  transform: scale(1);
}

.paywall__error {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: max(88px, calc(var(--safe-bottom) + 88px));
  z-index: 15;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(17, 17, 17, 0.92);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
}

.paywall__error[hidden] {
  display: none;
}

/* D/6 PRO — purple pop, no price */
.pro {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  opacity: 0;
  visibility: hidden;
  transform: translateY(24px) scale(0.98);
  pointer-events: none;
  background: #b859f9;
  transition:
    opacity var(--page-ms) var(--ease-out),
    transform var(--page-ms) var(--ease-out),
    visibility 0s linear var(--page-ms);
}

.paywall.is-pro .pro {
  opacity: 1;
  visibility: visible;
  transform: none;
  pointer-events: auto;
  transition:
    opacity var(--page-ms) var(--ease-out),
    transform var(--page-ms) var(--ease-out),
    visibility 0s linear 0s;
}

.pro__card {
  width: 100%;
  height: 100%;
  min-height: 100%;
  padding:
    max(48px, calc(var(--safe-top) + 36px))
    calc(24 * var(--u))
    max(20px, calc(var(--safe-bottom) + 16px));
  display: flex;
  flex-direction: column;
  align-items: stretch;
  box-sizing: border-box;
}

.pro__title {
  margin: 0;
  flex-shrink: 0;
  color: #111111;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.pro__subtitle {
  margin: 8px 0 0;
  flex-shrink: 0;
  color: #243000;
  font-size: 12px;
  font-weight: 600;
}

/* Design collage: x19 y84 359×430 on 402×822 — fill the mid band */
.pro__visual {
  margin: 10px auto 0;
  width: min(359px, 100%);
  flex: 1 1 auto;
  min-height: calc(360 * var(--v));
  max-height: none;
  border-radius: 18px;
  overflow: hidden;
}

.pro__visual-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  user-select: none;
  -webkit-user-drag: none;
}

.pro__benefits {
  /* Design: ErLae/Sdtfs/4T55v row at y526, 106×64, gap ≈16 */
  margin-top: 10px;
  flex-shrink: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  width: 100%;
  max-width: 354px;
  margin-left: auto;
  margin-right: auto;
}

.pro__benefit {
  box-sizing: border-box;
  min-height: 64px;
  height: 64px;
  border-radius: 18px;
  border: 1.5px solid rgba(255, 255, 255, 0.54);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 6px;
  text-align: center;
  color: #27163d;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.2;
}

/* ErLae — #eff8fa → #eee3f8 @ 135° */
.pro__benefit--edits {
  background: linear-gradient(135deg, #eff8fa 0%, #eee3f8 100%);
}

/* Sdtfs — #fdf6e5 → #fce8ee @ 135° */
.pro__benefit--hd {
  background: linear-gradient(135deg, #fdf6e5 0%, #fce8ee 100%);
}

/* 4T55v — #f7fff8 → #e2f0ee @ 135° */
.pro__benefit--wm {
  background: linear-gradient(135deg, #f7fff8 0%, #e2f0ee 100%);
}

.pro__benefit-icon {
  display: grid;
  place-items: center;
  line-height: 0;
  flex-shrink: 0;
}

.pro__benefit-label {
  display: block;
}

/* Pin trial CTA to bottom of the PRO card (design group y714) */
.pro__footer {
  margin-top: auto;
  padding-top: 14px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.pro .paywall__legal {
  color: rgba(17, 17, 17, 0.55);
}

@keyframes heroIn {
  from {
    opacity: 0;
    transform: scale(1.03);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes contentIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes ctaShimmer {
  0%,
  55% {
    transform: translateX(-120%);
  }
  80%,
  100% {
    transform: translateX(120%);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .feature,
  .pro,
  .feature__bg-img,
  .feature__hero-mid-img,
  .feature.is-active .feature__copy,
  .paywall__cta::before {
    animation: none !important;
    transition: none !important;
  }
}
