/* =========================================================
   JOURNEY — scroll-driven sahna (canvas + DOM qatlamlari)
   Qatlamlar (pastdan): canvas → stars → shade → labels → hero/summit → card
   ========================================================= */
.journey { position: relative; height: 640vh; background: #DCE6F2; }
.stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; contain: layout paint; }
.stage__canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; transform: scale(1.04); transition: opacity 1.2s var(--ease), transform 2.4s var(--ease); }
.stage.is-ready .stage__canvas { opacity: 1; transform: none; }
.stage__labels { opacity: 0; transition: opacity .8s .6s var(--ease); }
.stage.is-ready .stage__labels { opacity: 1; }
.hero > * { opacity: 0; transform: translateY(18px); }
.stage.is-booted .hero > * { animation: rise 1s .15s var(--ease) both; }
.stage.is-booted .hero > :nth-child(2) { animation-delay: .23s; }
.stage.is-booted .hero > :nth-child(3) { animation-delay: .33s; }
.stage.is-booted .hero > :nth-child(4) { animation-delay: .43s; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* tepadagi oqartiruvchi soya (--shade) va pastki vinyetka (--vig) — overlay.js boshqaradi.
   Ranglar — @property o'zgaruvchilar (--sh-*): gradientning o'zi animatsiya qilinmaydi,
   ranglari esa silliq o'tadi; fazalar bo'yicha qiymatlar theme-time.css da */
@property --sh-top { syntax: '<color>'; inherits: true; initial-value: rgba(244, 247, 252, .78); }
@property --sh-mid { syntax: '<color>'; inherits: true; initial-value: rgba(244, 247, 252, .65); }
@property --sh-side { syntax: '<color>'; inherits: true; initial-value: rgba(246, 248, 253, .82); }
@property --sh-side2 { syntax: '<color>'; inherits: true; initial-value: rgba(246, 248, 253, .55); }
.stage__shade {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(180deg, var(--sh-top) 0%, transparent 20%),
    radial-gradient(120% 90% at 0% 18%, var(--sh-side) 0%, var(--sh-side2) 30%, transparent 58%);
  opacity: var(--shade, 1);
}
.stage__shade::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(10, 14, 30, .28) 0%, rgba(10, 14, 30, 0) 22%);
  opacity: var(--vig, 1);
}
.stage__labels { position: absolute; inset: 0; pointer-events: none; z-index: 2; }

/* hero / summit */
.hero, .summit { position: absolute; left: var(--gutter); top: clamp(104px, 16vh, 170px); width: min(600px, 44vw); z-index: 3; will-change: transform, opacity; }
.hero__title, .summit__title { margin-top: 22px; font-size: clamp(42px, min(5.1vw, 9.2vh), 84px); line-height: .98; font-weight: 600; letter-spacing: -0.048em; color: var(--ink); text-wrap: balance; }
.hero__lead, .summit__lead { margin-top: 24px; max-width: 470px; font-size: clamp(17px, 1.35vw, 20px); line-height: 1.5; color: var(--ink-2); letter-spacing: -0.01em; }
.summit__lead strong { color: var(--blue); font-weight: 700; }
.hero__actions { margin-top: 34px; display: flex; gap: 12px; flex-wrap: wrap; }
.summit { opacity: 0; visibility: hidden; }
.summit.is-on { visibility: visible; }

/* bosqich kartasi */
.card {
  position: absolute; z-index: 4; right: var(--gutter); bottom: 28px;
  width: 344px; padding: 20px 22px 6px; border-radius: 26px;
  background: rgba(255, 255, 255, .9);
  backdrop-filter: blur(14px) saturate(1.5); -webkit-backdrop-filter: blur(14px) saturate(1.5);
  box-shadow: 0 30px 60px -28px rgba(16, 20, 60, .45), 0 0 0 1px rgba(255, 255, 255, .6) inset;
  will-change: transform, opacity;
}
.card__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.card__cabin { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--muted); white-space: nowrap; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.card__progress { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; margin: 16px 0 18px; }
.card__progress i { height: 4px; border-radius: 4px; background: var(--blue-100); position: relative; overflow: hidden; }
.card__progress i::after { content: ''; position: absolute; inset: 0; background: var(--blue); transform: scaleX(var(--f, 0)); transform-origin: left; border-radius: inherit; }
.card__body { transition: opacity .35s var(--ease), transform .45s var(--ease); }
.card__body.is-swap { opacity: 0; transform: translateY(8px); }
.card__title { font-size: 30px; line-height: 1.05; font-weight: 600; letter-spacing: -0.04em; }
.card__desc { margin-top: 10px; font-size: 15px; line-height: 1.5; color: var(--ink-2); }
.card__label { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 14px; font-weight: 600; }
.card__list { margin-top: 12px; display: grid; gap: 9px; }
.card__list li { display: flex; align-items: center; gap: 12px; font-size: 14.5px; color: var(--ink-2); }
.card__list li::before {
  content: ''; flex: none; width: 22px; height: 22px; border-radius: 50%;
  background: var(--blue) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.5 12.5l3.5 3.5 7.5-8' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 15px no-repeat;
}
.card__peers { margin: 14px 0 14px; font-size: 13px; color: var(--muted); }
.card__peers b { color: var(--ink-2); font-weight: 600; }

/* Sayohat davomida: ixcham karta yuqori chapda (osmon zonasi) — kanat va kabinalarni to'smaydi */
@media (min-width: 961px) {
  .card.card--left { right: auto; left: var(--gutter); bottom: auto; top: 96px; width: 296px; padding: 14px 16px 15px; border-radius: 20px; }
  .card--left .card__top { gap: 8px; }
  .card--left .chip { height: 24px; padding: 0 10px; font-size: 11.5px; }
  .card--left .card__cabin { font-size: 11.5px; }
  .card--left .card__progress { margin: 11px 0 12px; gap: 4px; }
  .card--left .card__progress i { height: 3px; }
  .card--left .card__title { font-size: 22px; letter-spacing: -0.035em; }
  .card--left .card__desc { margin-top: 5px; font-size: 13.5px; line-height: 1.45; }
  .card--left .card__label, .card--left .card__peers { display: none; }
  .card--left .card__list { margin-top: 11px; display: flex; flex-wrap: wrap; gap: 5px; }
  .card--left .card__list li { gap: 5px; padding: 4px 9px 4px 5px; border-radius: 999px; background: var(--blue-50); font-size: 12px; font-weight: 500; color: var(--ink-2); }
  .card--left .card__list li::before { width: 15px; height: 15px; background-size: 10px; }
}

/* sahna pastki qatori: izoh + skroll ishorasi */
.stage__foot { position: absolute; left: var(--gutter); right: var(--gutter); bottom: 26px; z-index: 3; display: flex; align-items: center; pointer-events: none; }
.stage__caption { display: flex; align-items: center; gap: 12px; font-size: 14px; font-weight: 500; color: #fff; text-shadow: 0 1px 12px rgba(0, 0, 0, .35); }
.stage__line { width: 28px; height: 2px; background: var(--blue); border-radius: 2px; box-shadow: 0 0 12px rgba(84, 88, 255, .8); }
.stage__hint {
  position: absolute; left: 50%; bottom: 0; transform: translateX(-50%);
  display: flex; flex-direction: column-reverse; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 500; color: rgba(255, 255, 255, .92); text-shadow: 0 1px 12px rgba(0, 0, 0, .35); transition: opacity .4s;
}
.hint-m, .stage__chev { display: none; }
.stage__chev { width: 9px; height: 9px; border-right: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(45deg); animation: chev 1.6s var(--ease) infinite; }
@keyframes chev { 0% { transform: translateY(-3px) rotate(45deg); opacity: 0; } 40% { opacity: 1; } 100% { transform: translateY(5px) rotate(45deg); opacity: 0; } }
.stage__mouse { width: 22px; height: 34px; border: 1.6px solid rgba(255, 255, 255, .85); border-radius: 12px; position: relative; }
.stage__mouse i { position: absolute; left: 50%; top: 7px; width: 3px; height: 7px; margin-left: -1.5px; border-radius: 2px; background: #fff; animation: wheel 1.8s var(--ease) infinite; }
@keyframes wheel { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(9px); opacity: 0; } 100% { opacity: 0; } }

/* sahnadagi yorliqlar (joylashuvi — overlay.js, translate3d + --dx) */
.lbl { position: absolute; left: 0; top: 0; will-change: transform, opacity; contain: layout style; }
.cab-tag { transform-origin: 50% 0; }
.cab-tag__in {
  display: flex; flex-direction: column; align-items: center; transform: translateX(calc(-50% + var(--dx, 0px)));
  padding: 6px 11px 7px; border-radius: 12px; background: rgba(255, 255, 255, .92);
  box-shadow: 0 6px 18px -8px rgba(10, 14, 40, .45); white-space: nowrap;
}
.cab-tag__name { font-size: 12.5px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.2; color: var(--ink); }
.cab-tag__meta { font-size: 10.5px; font-weight: 500; color: var(--muted); line-height: 1.2; margin-top: 1px; }
.cab-tag--hero .cab-tag__in { background: var(--blue); box-shadow: 0 10px 26px -8px rgba(84, 88, 255, .85); }
.cab-tag--hero .cab-tag__name { color: #fff; }
.cab-tag--hero .cab-tag__meta { color: rgba(255, 255, 255, .78); }

.ms { pointer-events: none; }
.ms__in { position: absolute; left: 0; bottom: 0; display: flex; flex-direction: column; align-items: center; transform: translateX(-50%); }
.ms__pill {
  padding: 7px 13px; border-radius: 999px; background: rgba(255, 255, 255, .9);
  font-size: 13px; font-weight: 600; letter-spacing: -0.01em; color: var(--ink); white-space: nowrap;
  box-shadow: 0 8px 20px -10px rgba(10, 14, 40, .5);
  transition: background-color .4s var(--ease), color .4s var(--ease), box-shadow .4s;
  transform: translateX(var(--dx, 0px));
}
.ms__pill em { font-style: normal; font-weight: 500; color: var(--muted); margin-right: 6px; transition: color .4s; }
.ms__stem { width: 1px; height: var(--stem, 46px); background: linear-gradient(rgba(255, 255, 255, .95), rgba(255, 255, 255, .35)); }
.ms__dot { width: 9px; height: 9px; margin-bottom: -4.5px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 3px rgba(255, 255, 255, .35); transition: background-color .4s, box-shadow .4s; }
.ms.is-done .ms__pill { background: var(--blue); color: #fff; box-shadow: 0 10px 24px -10px rgba(84, 88, 255, .9); }
.ms.is-done .ms__pill em { color: rgba(255, 255, 255, .7); }
.ms.is-done .ms__dot { background: var(--blue); box-shadow: 0 0 0 4px rgba(84, 88, 255, .3); }

/* Unicorn yorlig'i — cho'qqi tepasidagi osmonda, yetib kelganda paydo bo'ladi */
.uni__in {
  position: absolute; right: 0; top: 0; transform: translate(var(--dx, 0px), -50%);
  display: flex; align-items: center; gap: 7px; padding: 7px 14px 7px 11px; border-radius: 999px;
  background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .6);
  box-shadow: 0 10px 30px -14px rgba(30, 40, 120, .45), inset 0 1px 0 rgba(255, 255, 255, .35);
  color: #fff; white-space: nowrap; text-shadow: 0 1px 10px rgba(30, 50, 130, .35);
}
.uni__spark { width: 12px; height: 12px; fill: #fff; filter: drop-shadow(0 0 6px rgba(200, 210, 255, .9)); }
.uni__t { font-size: 13.5px; font-weight: 600; letter-spacing: .01em; }
.uni__v { font-size: 12.5px; font-weight: 500; opacity: .82; font-feature-settings: 'tnum'; }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .card { width: 320px; }
}
@media (max-width: 960px) {
  .hero, .summit { width: auto; right: var(--gutter); top: 92px; }
  /* telefonda cho'qqi matni — pastki oq kartada (tepada unicorn va cho'qqi ochiq qoladi) */
  .summit {
    top: auto; bottom: 16px; padding: 18px 18px 18px; border-radius: 22px;
    background: rgba(255, 255, 255, .92); box-shadow: 0 30px 60px -28px rgba(16, 20, 60, .45);
  }
  .summit .eyebrow { font-size: 12.5px; }
  .summit .summit__title { margin-top: 10px; font-size: clamp(28px, 7.6vw, 40px); }
  .summit .summit__lead { margin-top: 8px; font-size: 14.5px; }
  .summit .hero__actions { margin-top: 14px; }
  .summit .btn { height: 46px; padding: 0 20px; font-size: 15px; }
  .hero__lead, .summit__lead { max-width: 520px; }
  .stage__shade { background: linear-gradient(180deg, var(--sh-top) 0%, var(--sh-mid) 34%, transparent 56%); }
  .stage__shade::after { background: linear-gradient(0deg, rgba(10, 14, 30, .3) 0%, rgba(10, 14, 30, 0) 30%); }
  .card { left: var(--gutter); right: var(--gutter); width: auto; bottom: 16px; padding: 16px 18px 14px; border-radius: 22px; }
  .card__label, .card__list, .card__peers { display: none; }
  .card__progress { margin: 12px 0 12px; }
  .card__title { font-size: 24px; }
  .card__desc { font-size: 14px; margin-top: 6px; }
  .stage__foot { display: flex; bottom: 22px; }
  .stage__caption, .hint-d, .stage__mouse { display: none; }
  .hint-m, .stage__chev { display: block; }
  .stage__hint { gap: 6px; font-size: 12.5px; flex-direction: column; }
}
@media (max-width: 640px) {
  .hero__title, .summit__title { font-size: clamp(36px, 10.4vw, 48px); margin-top: 16px; }
  .hero__lead, .summit__lead { font-size: 16px; margin-top: 16px; }
  .hero__actions { margin-top: 22px; }
  .hero__actions .btn { height: 48px; padding: 0 20px; font-size: 15px; }
  .cab-tag__meta { display: none; }
  .card__cabin { display: none; }
  .ms__pill { font-size: 12px; padding: 6px 10px; }
}
/* Landshaft telefonlar (past balandlik) */
@media (max-height: 520px) and (orientation: landscape) {
  .hero, .summit { top: 64px; width: min(460px, 56vw); right: auto; }
  .hero .eyebrow, .summit .eyebrow { display: none; }
  .hero__title, .summit__title, .summit .summit__title { margin-top: 0; font-size: clamp(26px, 4.6vw, 34px); }
  .hero__lead, .summit__lead, .summit .summit__lead { margin-top: 8px; font-size: 13.5px; max-width: 420px; }
  .hero__actions, .summit .hero__actions { margin-top: 12px; }
  .hero__actions .btn, .summit .btn { height: 40px; padding: 0 16px; font-size: 14px; }
  .summit { bottom: auto; background: none; box-shadow: none; padding: 0; border-radius: 0; }
  .card { display: none; }
  .stage__foot { bottom: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .hero > * { opacity: 1; transform: none; animation: none !important; }
  .stage__canvas { transform: none; }
  .stage__mouse i { animation: none; }
}
