/* Video onboarding paywalls — design frames 360×640 */

:root {
  --color-cta-text: #111827;
  --color-title: #ffffff;
  --color-sub: #d1d5db;
  --color-muted: #cbd5e1;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
    "Noto Sans Arabic", "Noto Sans SC", 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);
  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: #020617;
  color: var(--color-title);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

body {
  overflow: hidden;
}

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: stretch;
}

.phone,
.paywall {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 100dvh;
  overflow: hidden;
  background: #020617;
}

.paywall__media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.paywall__poster,
.paywall__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.paywall__poster {
  z-index: 1;
}

.paywall__video {
  z-index: 2;
  opacity: 0;
  transition: opacity 280ms var(--ease-out);
}

.paywall__video.is-ready {
  opacity: 1;
}

.paywall__fade {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  height: min(48vh, 340px);
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(2, 6, 23, 0) 0%,
    rgba(2, 6, 23, 0.38) 42%,
    rgba(2, 6, 23, 0.88) 100%
  );
}

.layout-cards .paywall__fade {
  height: min(52vh, 360px);
  background: linear-gradient(
    180deg,
    rgba(2, 6, 23, 0) 0%,
    rgba(2, 6, 23, 0.66) 45%,
    rgba(2, 6, 23, 0.94) 100%
  );
}

.overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  padding: 0 24px calc(var(--safe-bottom) + 18px);
  pointer-events: none;
}

.overlay > * {
  pointer-events: auto;
}

.layout-pills .overlay {
  align-items: flex-start;
  padding-inline: 24px;
  gap: 20px;
}

.layout-pills .paywall__cta {
  align-self: center;
  width: min(292px, 100%);
}

.layout-cards .overlay,
.layout-checks .overlay,
.layout-rows .overlay,
.layout-bento .overlay {
  align-items: stretch;
}

.layout-bento .overlay {
  padding-inline: 18px;
}

.pills {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: min(272px, 100%);
}

.pill {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 12px;
  background: rgba(2, 6, 23, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.pill__label {
  flex: 1;
  min-width: 0;
  color: #fff;
  font-size: 10.6px;
  font-weight: 800;
  line-height: 1.2;
}

.dot {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.5);
  color: #fff;
}

.dot svg {
  width: 10px;
  height: 10px;
}

.dot--violet { background: #a78bfa; }
.dot--blue { background: #60a5fa; }
.dot--green { background: #34d399; }
.dot--amber { background: #fbbf24; }
.dot--pink { background: #f472b6; }

.heading {
  margin: 0 0 12px;
  color: #fff;
  font-size: 17px;
  font-weight: 900;
  line-height: 1.2;
}

.card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 12px;
  margin-bottom: 16px;
}

.card {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 54px;
  padding: 0 10px;
  border-radius: 17px;
  background: rgba(2, 6, 23, 0.47);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.card__icon {
  flex-shrink: 0;
  width: 25px;
  height: 25px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  color: #fff;
}

.card__icon svg {
  width: 14px;
  height: 14px;
}

.card__text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.card__title {
  color: #fff;
  font-size: 11.5px;
  font-weight: 900;
  line-height: 1.15;
}

.card__detail {
  color: #cbd5e1;
  font-size: 8.8px;
  font-weight: 700;
  line-height: 1.2;
}

.title-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
}

.trial-title {
  margin: 0;
  color: #fff;
  font-size: 25px;
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.layout-rows .trial-title {
  font-size: 24px;
}

.trial-sub {
  margin: 0;
  color: #d1d5db;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
}

.layout-rows .trial-sub {
  font-size: 10.5px;
}

.checks {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}

.check {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-size: 10.5px;
  font-weight: 800;
  line-height: 1.2;
}

.check svg {
  flex-shrink: 0;
  width: 11px;
  height: 11px;
}

.rows {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin: 0 0 14px;
}

.row {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 17px;
  padding: 0 8px;
  border-radius: 7px;
  background: rgba(2, 6, 23, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.row__bar {
  flex-shrink: 0;
  width: 3px;
  height: 9px;
  border-radius: 2px;
}

.row__label {
  flex: 1;
  min-width: 0;
  color: #fff;
  font-size: 9.6px;
  font-weight: 700;
  line-height: 1.2;
}

.bento-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 22px;
  margin-bottom: 8px;
}

.vip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 20px;
  padding: 0 8px;
  border-radius: 7px;
  background: #8b5cf6;
  color: #fff;
  font-size: 9.5px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.bento-title {
  margin: 0;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.2;
}

.bento {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 16px;
}

.bento__top {
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: 7px;
  min-height: 100px;
}

.bento-hero {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  min-height: 100px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.8), rgba(37, 99, 235, 0.72));
}

.bento-hero__icon {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.bento-hero__icon svg {
  width: 18px;
  height: 18px;
}

.bento-hero__title {
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
}

.bento-hero__detail {
  color: rgba(255, 255, 255, 0.85);
  font-size: 10px;
  font-weight: 600;
  line-height: 1.25;
}

.bento-col {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
}

.bento-mini {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 46px;
  padding: 6px 9px;
  border-radius: 11px;
  background: rgba(2, 6, 23, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.bento-mini__icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  color: #fff;
}

.bento-mini__icon svg {
  width: 16px;
  height: 16px;
}

.bento-mini__title {
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
}

.bento__bottom {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 7px;
}

.chip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 10px;
  border-radius: 10px;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.15;
}

.chip svg {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
}

.chip--amber {
  background: rgba(245, 158, 11, 0.22);
  border: 1px solid rgba(251, 191, 36, 0.37);
  color: #fff;
}

.chip--amber svg {
  color: #fbbf24;
}

.chip--pink {
  background: rgba(236, 72, 153, 0.22);
  border: 1px solid rgba(244, 114, 182, 0.37);
}

.chip--pink svg {
  color: #f472b6;
}

.paywall__cta {
  position: relative;
  width: min(304px, 100%);
  height: 48px;
  min-height: 48px;
  margin-inline: auto;
  border: 0;
  border-radius: 32px;
  padding: 0 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--color-cta-text);
  font-family: inherit;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.01em;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(2, 6, 23, 0.28);
}

.layout-cards .paywall__cta {
  border-radius: 23px;
  font-size: 14.5px;
}

.layout-checks .paywall__cta,
.layout-rows .paywall__cta {
  border-radius: 37px;
}

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

.paywall__cta-arrow {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

html[dir="rtl"] .paywall__cta-arrow {
  transform: scaleX(-1);
}

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

.paywall__cta:focus-visible {
  outline: 3px solid rgba(167, 139, 250, 0.55);
  outline-offset: 3px;
}

.paywall.is-busy .paywall__cta {
  cursor: progress;
}

.paywall__cta-spinner {
  display: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(17, 24, 39, 0.2);
  border-top-color: #111827;
  animation: spin 0.7s linear infinite;
}

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

.paywall.is-busy .paywall__cta-arrow {
  display: none;
}

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

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

.paywall__close:active {
  background: rgba(255, 255, 255, 0.92);
  transform: scale(0.94);
}

.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(60, 30, 50, 0.92);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
}

.paywall__error[hidden] {
  display: none;
}

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

@media (min-width: 400px) {
  .trial-title {
    font-size: 27px;
  }

  .pill__label,
  .check,
  .row__label {
    font-size: 11.4px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .paywall__video,
  .paywall__close,
  .paywall__cta {
    transition: none;
  }

  .paywall__cta-spinner {
    animation: none;
  }
}
