:root {
  --preview-navy: #050b18;
  --preview-navy-soft: #091426;
  --preview-blue: #3e7bff;
  --preview-blue-strong: #1c61ed;
  --preview-white: #fff;
  --preview-muted: #9aa9bd;
  --preview-line: rgba(255, 255, 255, 0.13);
  --preview-ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --preview-safe-top: env(safe-area-inset-top, 0px);
  --preview-safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: #02050b;
}

body.mobile-preview {
  width: 100%;
  max-width: 480px;
  min-height: 100%;
  margin: 0 auto;
  overflow-x: clip;
  background: var(--preview-navy);
  color: var(--preview-white);
  font-family: Vazirmatn, Arial, sans-serif;
  box-shadow: 0 0 70px rgba(0, 0, 0, 0.58);
}

body.mobile-preview a { color: inherit; text-decoration: none; }
body.mobile-preview button,
body.mobile-preview a { -webkit-tap-highlight-color: transparent; }
body.mobile-preview button { font: inherit; }

body.mobile-preview :focus-visible {
  outline: 3px solid rgba(62, 123, 255, 0.7);
  outline-offset: 3px;
}

.mobile-landing-shell { display: none; }

html[data-landing-mode="mobile"] body.has-mobile-landing {
  width: 100%;
  min-height: 100%;
  margin: 0;
  overflow-x: clip;
  background: #02050b;
  color: var(--preview-white);
}

html[data-landing-mode="mobile"] body.has-mobile-landing .desktop-landing { display: none; }
html[data-landing-mode="mobile"] body.has-mobile-landing .mobile-landing-shell {
  width: 100%;
  max-width: 480px;
  min-height: 100%;
  margin: 0 auto;
  display: block;
  overflow-x: clip;
  background: var(--preview-navy);
  box-shadow: 0 0 70px rgba(0, 0, 0, 0.58);
}

html[data-landing-mode="mobile"] body.has-mobile-landing .mobile-landing-shell a { color: inherit; text-decoration: none; }
html[data-landing-mode="mobile"] body.has-mobile-landing .mobile-landing-shell button,
html[data-landing-mode="mobile"] body.has-mobile-landing .mobile-landing-shell a { -webkit-tap-highlight-color: transparent; }
html[data-landing-mode="mobile"] body.has-mobile-landing .mobile-landing-shell button { font: inherit; }
html[data-landing-mode="mobile"] body.has-mobile-landing .mobile-landing-shell :focus-visible {
  outline: 3px solid rgba(62, 123, 255, 0.7);
  outline-offset: 3px;
}

.preview-header {
  position: fixed;
  z-index: 50;
  top: 0;
  left: 50%;
  width: min(100%, 480px);
  min-height: calc(62px + var(--preview-safe-top));
  padding: calc(10px + var(--preview-safe-top)) 18px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  direction: rtl;
  transform: translateX(-50%);
  transition: background 180ms ease, border-color 180ms ease;
}

.preview-header.is-solid {
  border-bottom: 1px solid var(--preview-line);
  background: rgba(5, 11, 24, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.preview-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  direction: ltr;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.preview-brand img { flex: 0 0 auto; }

.preview-menu-button {
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 7px;
  background: rgba(5, 11, 24, 0.42);
  color: #fff;
  display: grid;
  place-items: center;
  transition: transform 140ms ease-out, border-color 180ms ease, background-color 180ms ease;
}

.preview-menu-button:active { transform: scale(0.96); }
.preview-menu-button[aria-expanded="true"] { border-color: rgba(118, 161, 255, 0.7); background: #0b1930; }

.preview-menu-button svg,
.preview-button svg,
.hero-next svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.preview-menu {
  position: fixed;
  z-index: 52;
  top: calc(76px + var(--preview-safe-top));
  right: max(12px, env(safe-area-inset-right));
  bottom: max(12px, calc(8px + var(--preview-safe-bottom)));
  left: max(12px, env(safe-area-inset-left));
  min-height: min(390px, calc(100dvh - 104px - var(--preview-safe-top) - var(--preview-safe-bottom)));
  padding: 16px 12px;
  border: 1px solid var(--preview-line);
  border-radius: 14px;
  background: rgba(5, 11, 24, 0.97);
  box-shadow: 0 20px 42px rgba(0, 0, 0, 0.42);
  opacity: 0;
  transform: translate3d(0, -12px, 0) scale(0.98);
  transform-origin: top center;
  transition: opacity 220ms ease-out, transform 240ms var(--preview-ease-out);
}

.preview-menu[hidden] { display: none; }
.preview-menu.is-open { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
.preview-menu a { display: flex; min-height: 54px; align-items: center; padding: 14px 16px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); border-radius: 9px; font-size: 15px; font-weight: 800; opacity: 0; transform: translateX(-8px); transition: opacity 180ms ease-out, transform 220ms var(--preview-ease-out), background-color 180ms ease; }
.preview-menu a:hover,
.preview-menu a:focus-visible { background: rgba(76, 126, 255, 0.13); outline: none; }
.preview-menu a[data-authenticated-link="dashboard"] { min-height: 64px; margin: 6px 0; background: #3d78ff; color: #fff; font-size: 16px; box-shadow: 0 14px 28px rgba(39, 98, 230, 0.26); }
.preview-menu.is-open a { opacity: 1; transform: translateX(0); }
.preview-menu.is-open a:nth-child(2) { transition-delay: 45ms; }
.preview-menu.is-open a:nth-child(3) { transition-delay: 90ms; }
.preview-menu.is-open a:nth-child(4) { transition-delay: 135ms; }
.preview-menu.is-open a:nth-child(5) { transition-delay: 180ms; }
.preview-menu a:last-child { border-bottom: 0; color: #80aaff; }

.preview-menu-scrim {
  position: fixed;
  z-index: 49;
  inset: 0;
  border: 0;
  background: rgba(0, 4, 13, .62);
  opacity: 0;
  transition: opacity 180ms ease-out;
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}

.preview-menu-scrim[hidden] { display: none; }
.preview-menu-scrim.is-open { opacity: 1; }

.mobile-hero {
  position: relative;
  min-height: 88svh;
  max-height: 860px;
  height: min(760px, 100svh);
  overflow: hidden;
  background: #030811;
  isolation: isolate;
}

.mobile-hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 38% 0 0;
  background: linear-gradient(to bottom, transparent, rgba(5, 11, 24, 0.28) 35%, #050b18 98%);
  pointer-events: none;
}

.mobile-hero-media {
  position: absolute;
  z-index: -2;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 48%;
  animation: mobile-hero-media-enter 900ms cubic-bezier(.23,1,.32,1) both;
}

.mobile-hero-copy {
  position: absolute;
  inset-inline: 22px;
  bottom: max(88px, calc(78px + var(--preview-safe-bottom)));
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.mobile-hero-copy > * {
  opacity: 0;
  transform: translate3d(0, 16px, 0);
  animation: mobile-hero-copy-enter 560ms cubic-bezier(.23,1,.32,1) forwards;
}

.mobile-hero-copy > :nth-child(1) { animation-delay: 130ms; }
.mobile-hero-copy > :nth-child(2) { animation-delay: 180ms; }
.mobile-hero-copy > :nth-child(3) { animation-delay: 230ms; }

@keyframes mobile-hero-media-enter {
  from { opacity: .58; transform: scale(1.045); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes mobile-hero-copy-enter {
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}

.mobile-hero-copy h1 {
  max-width: 330px;
  margin: 0;
  font-size: clamp(46px, 14vw, 66px);
  line-height: 0.98;
  font-weight: 950;
  letter-spacing: 0;
  text-wrap: balance;
  text-shadow: 0 6px 28px rgba(0, 0, 0, 0.48);
}

.mobile-hero-copy p {
  max-width: 315px;
  margin: 17px 0 20px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 13px;
  line-height: 1.9;
}

.preview-button {
  min-height: 52px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 900;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.preview-button:active { transform: scale(0.975); }
.preview-button-primary { background: var(--preview-blue); color: #fff; box-shadow: 0 14px 34px rgba(28, 97, 237, 0.34); }
.preview-button-primary:hover { background: #568cff; box-shadow: 0 17px 40px rgba(28, 97, 237, 0.45); }
.preview-button-light { background: #fff; color: #071021; }

.hero-next {
  position: absolute;
  left: 50%;
  bottom: max(12px, calc(5px + var(--preview-safe-bottom)));
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  transform: translateX(-50%);
  border: 0;
  color: rgba(255, 255, 255, 0.82);
}

.hero-next::before {
  content: "";
  position: absolute;
  inset: 3px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  animation: preview-scroll-pulse 1800ms ease-out infinite;
}

.hero-next svg {
  width: 18px;
  height: 18px;
  animation: preview-scroll-arrow 1500ms ease-in-out infinite;
}

@keyframes preview-scroll-pulse {
  0% { transform: scale(0.72); opacity: 0; }
  30% { opacity: 0.8; }
  100% { transform: scale(1.15); opacity: 0; }
}

@keyframes preview-scroll-arrow {
  0%, 100% { transform: translateY(-2px); }
  50% { transform: translateY(3px); }
}

.mobile-hero-copy .preview-button-primary {
  width: min(100%, 286px);
  min-height: 56px;
}

@supports not (height: 100svh) {
  .mobile-hero { height: min(760px, 100vh); }
}

.preview-section { padding: 78px 0; }

.preview-section-heading {
  padding-inline: 22px;
  text-align: center;
}

.preview-section-heading.align-start { text-align: start; }
.preview-section-heading p { margin: 0 0 9px; color: #76a1ff; font-size: 12px; font-weight: 800; }
.preview-section-heading h2 { margin: 0; font-size: clamp(30px, 9.4vw, 43px); line-height: 1.15; font-weight: 950; letter-spacing: 0; text-wrap: balance; }

.coaches-section { overflow: hidden; background: var(--preview-navy); }

.coach-rail {
  margin-top: 38px;
  overflow-x: auto;
  overflow-y: visible;
  padding: 18px calc((100% - min(72vw, 306px)) / 2) 22px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  overscroll-behavior-inline: contain;
  touch-action: pan-y;
  cursor: grab;
  perspective: 900px;
  direction: ltr;
}

.coach-rail::-webkit-scrollbar { display: none; }
.coach-rail.is-dragging { cursor: grabbing; scroll-snap-type: none; }

.coach-track {
  display: flex;
  direction: ltr;
  gap: 15px;
  width: max-content;
}

.coach-rail-state {
  width: min(86vw, 360px);
  min-height: 260px;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 7px;
  display: grid;
  place-content: center;
  gap: 8px;
  background: #081120;
  color: #91a0b5;
  direction: rtl;
  text-align: center;
}
.coach-rail-state strong { color: #fff; font-size: 16px; }
.coach-rail-state span { font-size: 11px; line-height: 1.8; }
.coach-rail-state.is-loading { color: #82aaff; font-size: 12px; font-weight: 800; }

.preview-coach {
  position: relative;
  flex: 0 0 min(72vw, 306px);
  height: min(112vw, 476px);
  min-height: 390px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 7px;
  background: #081120;
  color: #fff;
  direction: rtl;
  scroll-snap-align: center;
  transform: scale(0.91) rotateY(7deg);
  opacity: 0.56;
  transition: transform 280ms cubic-bezier(.2,.8,.2,1), opacity 280ms ease, border-color 280ms ease;
}

.preview-coach.is-active {
  z-index: 2;
  border-color: rgba(62, 123, 255, 0.8);
  transform: scale(1) rotateY(0);
  opacity: 1;
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.46);
}

.preview-coach.is-after { transform: scale(0.91) rotateY(-7deg); }
.preview-coach img { width: 100%; height: 100%; object-fit: cover; object-position: center top; pointer-events: none; user-select: none; }
.preview-coach::after { content: ""; position: absolute; inset: 36% 0 0; background: linear-gradient(to bottom, transparent, rgba(3, 8, 17, 0.9) 74%, #030811); }

.coach-copy { position: absolute; z-index: 2; inset: auto 18px 20px; }
.coach-copy small { display: inline-block; margin-bottom: 8px; color: #82aaff; font-size: 10px; font-weight: 800; }
.coach-copy h3 { margin: 0; font-size: 25px; font-weight: 950; }
.coach-copy p { margin: 6px 0 16px; color: rgba(255, 255, 255, 0.65); font-size: 12px; }
.coach-copy a { min-height: 44px; display: inline-flex; align-items: center; color: #75a1ff; font-size: 12px; font-weight: 900; }

.coach-pagination { min-height: 24px; margin-top: 5px; display: flex; justify-content: center; align-items: center; gap: 7px; direction: ltr; }
.coach-pagination button { width: 7px; height: 7px; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.28); transition: width 220ms var(--preview-ease-out), background-color 180ms ease, transform 140ms ease-out; }
.coach-pagination button:active { transform: scale(0.82); }
.coach-pagination button.is-active { width: 24px; border-radius: 4px; background: var(--preview-blue); }

.drag-hint { margin: 4px 0 0; display: flex; align-items: center; justify-content: center; gap: 8px; color: #79879b; font-size: 10px; }
.drag-hint span { width: 30px; height: 2px; background: #56647a; }

.mobile-membership {
  padding: 74px 20px;
  border-top: 1px solid var(--preview-line);
  border-bottom: 1px solid var(--preview-line);
  background: #07101e;
}

.mobile-membership .preview-section-heading {
  padding-inline: 0;
}

.mobile-membership-list {
  margin-top: 34px;
  display: grid;
  gap: 12px;
}

.mobile-membership-item {
  min-height: 112px;
  padding: 18px 16px;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  border: 1px solid rgba(132, 163, 216, 0.18);
  border-radius: 7px;
  background: rgba(13, 27, 49, 0.82);
}

.mobile-membership-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  font-size: 23px;
}

.mobile-membership-icon.food { background: rgba(16, 185, 129, 0.14); }
.mobile-membership-icon.exercise { background: rgba(62, 123, 255, 0.16); }
.mobile-membership-icon.coach { background: rgba(251, 191, 36, 0.14); }
.mobile-membership-item h3 { margin: 0 0 5px; color: #fff; font-size: 16px; font-weight: 900; }
.mobile-membership-item p { margin: 0; color: #98a7bb; font-size: 12px; line-height: 1.75; }

.mobile-subscription-cta {
  margin-top: 16px;
  padding: 20px 16px;
  display: grid;
  gap: 16px;
  border: 1px solid rgba(52, 211, 153, 0.32);
  border-radius: 7px;
  background: linear-gradient(145deg, rgba(7, 46, 38, 0.92), rgba(8, 24, 43, 0.96));
}

.mobile-subscription-cta > div { display: grid; gap: 4px; text-align: center; }
.mobile-subscription-cta span { color: #8fa0b6; font-size: 11px; font-weight: 700; }
.mobile-subscription-cta strong { color: #fff; font-size: 19px; font-weight: 950; }
.mobile-subscription-cta .preview-button { width: 100%; min-height: 52px; }

.preview-final { position: relative; min-height: 570px; padding: 78px 22px calc(64px + var(--preview-safe-bottom)); display: flex; align-items: flex-end; overflow: hidden; isolation: isolate; }
.preview-final::after { content: ""; position: absolute; z-index: -1; inset: 20% 0 0; background: linear-gradient(to bottom, transparent, rgba(5, 11, 24, 0.94) 74%); }
.preview-final > img { position: absolute; z-index: -2; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 38% center; }
.preview-final > div { width: 100%; display: flex; flex-direction: column; align-items: center; text-align: center; }
.preview-final h2 { max-width: 360px; margin: 0; font-size: 38px; line-height: 1.15; font-weight: 950; text-wrap: balance; }
.preview-final p { max-width: 330px; margin: 14px auto 22px; color: rgba(255, 255, 255, 0.72); font-size: 13px; line-height: 1.8; }
.preview-final .preview-button { width: min(100%, 320px); min-height: 56px; }

.preview-footer { padding: 34px 22px calc(34px + var(--preview-safe-bottom)); border-top: 1px solid var(--preview-line); background: #030711; }
.preview-footer-links { margin-top: 28px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--preview-line); }
.preview-footer-links a { min-height: 48px; display: flex; align-items: center; border-bottom: 1px solid var(--preview-line); color: #c1cada; font-size: 12px; font-weight: 800; }
.preview-footer-links a:nth-child(even) { padding-inline-start: 14px; border-inline-start: 1px solid var(--preview-line); }
.preview-footer-legal { margin-top: 20px; display: inline-flex; color: #738198; font-size: 11px; font-weight: 700; }

@media (max-width: 360px) {
  .mobile-hero { height: min(690px, 100svh); }
  .mobile-hero-copy { inset-inline: 18px; }
  .mobile-hero-copy h1 { font-size: 45px; }
  .preview-section { padding-block: 66px; }
  .preview-section-heading { padding-inline: 18px; }
  .preview-brand span { font-size: 10px; }
}

@media (min-width: 481px) {
  body.mobile-preview { border-inline: 1px solid rgba(255, 255, 255, 0.08); }
}

@media (prefers-reduced-motion: reduce) {
  .mobile-hero-media,
  .mobile-hero-copy > * { animation: none; opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .preview-menu { transition-duration: 120ms !important; }
  .preview-menu a { transition-duration: 120ms !important; transition-delay: 0ms !important; }
}
