/* US C/1–C/6 guided onboarding paywall — design frames 402×822 (ui-us.pen C/*) */

:root {
  --design-w: 402;
  --design-h: 822;
  --color-title: #f8fafc;
  --color-subtitle: rgba(255, 255, 255, 0.8);
  --color-cta-text: #000000;
  --color-cta-bg: #f7d920;
  --color-cta-stroke: rgba(255, 248, 240, 0.67);
  --shadow-cta: 0 12px 24px rgba(75, 51, 44, 0.4);
  --shade-bottom: rgba(0, 0, 0, 0.68);
  --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;
  color-scheme: dark;
}

*,
*::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: #0b0b10;
  color: var(--color-title);
  -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;
  padding: 0;
}

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

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

.feature-stack {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  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;
  pointer-events: none;
}

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

.paywall.is-animating .feature.is-active,
.paywall.is-animating .feature.is-exit-left {
  will-change: opacity, transform;
}

.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__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

/* C/1 design: image y=-189 h=1011 on 822 */
.feature__bg--tall .feature__bg-img {
  object-position: center 18%;
}

/* C/4 design: y=-32 */
.feature__bg--shift-up .feature__bg-img {
  object-position: center 35%;
}

/* C/5 design: y=-73 */
.feature__bg--shift-up-more .feature__bg-img {
  object-position: center 28%;
}

.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 {
  animation: heroIn 0.55s var(--ease-out) both;
}

.feature__shade {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(497 * var(--v));
  height: calc(325 * var(--v));
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(
    to top,
    var(--shade-bottom) 0%,
    rgba(0, 0, 0, 0.35) 42%,
    transparent 100%
  );
}

.feature__copy {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(536 * var(--v));
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 calc(30 * var(--u));
  text-align: center;
  pointer-events: none;
}

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

.feature__title {
  margin: 0;
  max-width: 348px;
  width: 100%;
  color: var(--color-title);
  font-size: clamp(28px, 8.5vw, 34px);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.4);
}

.feature__subtitle {
  margin: 14px 0 0;
  max-width: 360px;
  color: var(--color-subtitle);
  font-size: clamp(14px, 4vw, 16px);
  font-weight: 500;
  line-height: 1.45;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.35);
}

.paywall__footer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 8;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding:
    0 calc(34 * var(--u))
    max(18px, calc(var(--safe-bottom) + 16px));
  text-align: center;
  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(255, 255, 255, 0.28);
  transition:
    width 0.28s var(--ease-out),
    background 0.28s ease;
}

.paywall__dot.is-active {
  width: 16px;
  background: #f7d920;
}

.paywall__cta {
  position: relative;
  width: min(334px, 100%);
  height: 56px;
  min-height: 56px;
  border: 1px solid var(--color-cta-stroke);
  border-radius: 28px;
  padding: 0 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--color-cta-text);
  font-family: inherit;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.01em;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  background: var(--color-cta-bg);
  box-shadow: var(--shadow-cta);
  transition:
    transform 0.18s var(--ease-out),
    filter 0.18s ease;
}

.paywall__cta--trial {
  width: 100%;
  max-width: 354px;
  height: 56px;
  border: 0;
  color: #ffffff;
  font-size: 15px;
  font-weight: 900;
  background-image: linear-gradient(90deg, #ff947c 0%, #e7b84f 100%);
  box-shadow: 0 12px 24px rgba(180, 90, 50, 0.3);
}

.paywall__cta::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(
    105deg,
    transparent 35%,
    rgba(255, 255, 255, 0.35) 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:focus-visible {
  outline: 3px solid rgba(247, 217, 32, 0.5);
  outline-offset: 3px;
}

.paywall__cta[disabled],
.paywall.is-busy .paywall__cta--trial {
  cursor: progress;
  filter: saturate(0.92);
}

.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(255, 255, 255, 0.65);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.3;
}

.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: #3a2520;
  background: rgba(255, 248, 240, 0.92);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  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(20, 12, 16, 0.92);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
}

.paywall__error[hidden] {
  display: none;
}

/* —— C/6 PRO: film bg + bottom sheet —— */
.pro {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transform: translateY(24px) scale(0.98);
  pointer-events: none;
  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: translateY(0) scale(1);
  pointer-events: auto;
  transition:
    opacity var(--page-ms) var(--ease-out),
    transform var(--page-ms) var(--ease-out),
    visibility 0s linear 0s;
}

.pro__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

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

.pro__hero-shade {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: calc(304 * var(--v));
  z-index: 1;
  background: linear-gradient(
    to bottom,
    rgba(17, 16, 21, 0.72) 0%,
    transparent 100%
  );
  pointer-events: none;
}

.pro__hero-copy {
  position: relative;
  z-index: 2;
  padding:
    max(56px, calc(var(--safe-top) + 48px))
    calc(30 * var(--u))
    12px;
}

.pro__kicker {
  margin: 0;
  color: #ffe1a8;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.pro__hero-title {
  margin: 8px 0 0;
  max-width: 342px;
  color: #ffffff;
  font-size: clamp(26px, 7.5vw, 30px);
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.pro__hero-sub {
  margin: 10px 0 0;
  max-width: 326px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
}

.pro__sheet {
  position: relative;
  z-index: 2;
  margin-top: auto;
  width: 100%;
  padding:
    22px calc(24 * var(--u))
    max(16px, calc(var(--safe-bottom) + 14px));
  border-radius: 28px 28px 0 0;
  background: linear-gradient(
    180deg,
    rgba(48, 32, 28, 0.92) 0%,
    rgba(28, 20, 18, 0.96) 100%
  );
  border-top: 1px solid rgba(255, 225, 168, 0.18);
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.28);
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.pro__sheet-title {
  margin: 0;
  color: #ffffff;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.01em;
}

.pro__sheet-sub {
  margin: 6px 0 0;
  color: rgba(255, 255, 255, 0.8);
  font-size: 12px;
  font-weight: 500;
}

.pro__benefits {
  margin-top: 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.pro__benefit {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 8px;
  border-radius: 14px;
  background: rgba(255, 244, 220, 0.92);
  color: #3a2520;
  font-size: 11px;
  font-weight: 800;
  text-align: center;
  line-height: 1.2;
}

.pro__footer {
  width: 100%;
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

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

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

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

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

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

  .feature,
  .feature.is-active {
    transform: none;
  }
}

@media (max-height: 700px) {
  .feature__title {
    font-size: 28px;
  }

  .feature__subtitle {
    margin-top: 8px;
    font-size: 14px;
  }

  .paywall__cta {
    height: 52px;
  }

  .pro__hero-title {
    font-size: 24px;
  }

  .pro__sheet {
    padding-top: 16px;
  }
}
