/* PS Moldova — кинорежим (телефоны и планшеты) + мобильная композиция лендинга.

   Кинорежим — колода полноэкранных карточек: предложение с тарифами, игры,
   отзывы, контакты. Листается свайпом, точки внизу показывают позицию.
   Стили не привязаны к ширине экрана: режим включает JS (сенсорный ввод),
   раскладка подстраивается через clamp() и ориентацию. */

/* ─────────────── КИНОРЕЖИМ ─────────────── */

body.cine-open { overflow: hidden; }

.cine {
  position: fixed; left: 0; right: 0; top: 0; z-index: 120; overflow: hidden;
  /* dvh — живая высота вьюпорта: низ не уходит под панель браузера */
  height: 100vh; height: 100dvh;
  background: #04060c; color: #eaf0fa;
  display: flex; flex-direction: column;
  padding-top: env(safe-area-inset-top);
  padding-right: env(safe-area-inset-right);
  padding-left: env(safe-area-inset-left);
  padding-bottom: max(env(safe-area-inset-bottom), 6px);
}
.cine[hidden] { display: none; }

/* — фон — */
.cine-art {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 56% 24%; z-index: 0;
}
.cine-shade, .cine-glow { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.cine-shade {
  background: linear-gradient(180deg, rgba(4,6,12,.82) 0%, rgba(4,6,12,.24) 20%,
              rgba(4,6,12,.72) 50%, #04060c 86%);
}
.cine-glow {
  background: radial-gradient(80% 44% at 50% 74%,
              color-mix(in srgb, var(--accent, #1a8cff) 28%, transparent) 0%, rgba(4,6,12,0) 76%);
}

/* — шапка — */
.cine-top {
  position: relative; z-index: 6; flex: none;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px clamp(18px, 4vw, 34px) 0;
}
.cine-brand { display: inline-flex; align-items: center; gap: 9px; color: #fff; }
.cine-brand img { height: clamp(24px, 3.4vw, 30px); width: auto; display: block; }
.cine-brand .name {
  font-family: var(--font-head, Sora, sans-serif); font-size: 14.5px; font-weight: 700;
  letter-spacing: -.012em; white-space: nowrap;
}
.cine-top-actions { display: flex; align-items: center; gap: 8px; }
.cine-chip {
  height: 38px; min-width: 38px; padding: 0 13px; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: rgba(10,16,27,.6); border: 1px solid rgba(255,255,255,.1);
  color: #dbe4f2; font: 600 11.5px/1 var(--font-body, Manrope, sans-serif); cursor: pointer;
  white-space: nowrap;
}
.cine-chip:hover { color: #fff; border-color: rgba(255,255,255,.22); }
.cine-chip.is-lang { text-transform: uppercase; }
.cine-chip.is-chat { padding: 0; color: var(--accent-2, #8ab4ff); }
.cine-chip.is-chat svg { width: 18px; height: 18px; }

/* — колода экранов — */
.cine-deck {
  position: relative; z-index: 5; flex: 1; min-height: 0;
  display: flex; overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory; scroll-behavior: smooth;
  scrollbar-width: none; overscroll-behavior-x: contain;
}
.cine-deck::-webkit-scrollbar { display: none; }
.cine-screen {
  flex: 0 0 100%; scroll-snap-align: center; scroll-snap-stop: always;
  min-width: 0; overflow-y: auto; overscroll-behavior: contain;
  display: flex; align-items: flex-end;
  padding: 0 clamp(18px, 4vw, 34px);
}
.cine-screen-inner {
  width: 100%; max-width: 620px; margin-inline: auto;
  display: flex; flex-direction: column; gap: clamp(14px, 2.4vh, 22px);
  padding-block: clamp(12px, 2vh, 26px);
}
.cine-screen.is-offer .cine-screen-inner { margin-top: auto; }

/* — текстовый блок — */
.cine-badge {
  align-self: flex-start;
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px; border-radius: 999px;
  background: color-mix(in srgb, var(--accent, #1a8cff) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent, #1a8cff) 42%, transparent);
  color: #8ec7ff; font-size: 9.5px; font-weight: 700; letter-spacing: .15em; text-transform: uppercase;
}
.cine-badge::before {
  content: ""; width: 5px; height: 5px; border-radius: 50%; background: #8ec7ff;
  animation: cinePulse 2.2s ease-in-out infinite;
}
@keyframes cinePulse { 0%,100% { opacity: 1 } 50% { opacity: .35 } }
.cine-kicker {
  display: block; font-size: 9.5px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase;
  color: #8492a8;
}
.cine-copy h1, .cine-copy h2 {
  margin: 12px 0 0; font-family: var(--font-head, Sora, sans-serif); font-weight: 800;
  font-size: clamp(28px, min(9.5vw, 5.6vh), 48px); line-height: 1.0; letter-spacing: -.04em;
  text-wrap: balance;
}
.cine-copy h1 .accent { color: #4ea3ff; display: block; }
.cine-copy p {
  margin: 12px 0 0; max-width: 46ch; color: #b6c2d4; text-wrap: pretty;
  font-size: clamp(12.5px, 1.6vh, 15px); line-height: 1.6;
}
.cine-rating { display: flex; align-items: center; gap: 8px; color: #c3ccda; }
.cine-rating i { color: #ffc24a; }

/* — рельс тарифов — */
.cine-rail { display: flex; flex-direction: column; gap: 8px; }
.cine-plan {
  position: relative; display: flex; align-items: center; gap: 13px; width: 100%;
  padding: clamp(11px, 1.5vh, 16px) 16px; border-radius: 18px; cursor: pointer; text-align: left;
  background: rgba(10,16,27,.7); border: 1px solid rgba(255,255,255,.09);
  backdrop-filter: blur(16px); color: inherit; font: inherit;
  transition: background .18s, border-color .18s, box-shadow .18s;
}
.cine-plan.is-active {
  background: linear-gradient(120deg, color-mix(in srgb, var(--accent, #1a8cff) 30%, transparent), rgba(10,16,27,.82));
  border-color: color-mix(in srgb, var(--accent, #1a8cff) 52%, transparent);
  box-shadow: 0 16px 38px color-mix(in srgb, var(--accent, #1a8cff) 26%, transparent);
}
.cine-plan-main { flex: 1; min-width: 0; }
.cine-plan-code {
  display: block; font-size: 9.5px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
  color: #8492a8;
}
.cine-plan.is-active .cine-plan-code { color: #a9d4ff; }
.cine-plan-sub {
  display: block; margin-top: 4px; font-size: 12.5px; color: #93a1b5;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cine-plan.is-active .cine-plan-sub { color: #c3ccda; }
.cine-plan-price {
  font-family: var(--font-head, Sora, sans-serif); font-weight: 800; letter-spacing: -.03em;
  font-size: clamp(16px, 2.2vh, 20px); white-space: nowrap;
}
.cine-plan-price span { font-size: 11px; font-weight: 600; color: #93a1b5; margin-left: 3px; }
.cine-plan-chev { font-size: 18px; color: #8ea4c4; }
.cine-plan-badge {
  position: absolute; top: -9px; left: 16px; padding: 5px 10px; border-radius: 999px;
  background: var(--accent, #1a8cff); color: #fff;
  font-size: 8.5px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase;
  box-shadow: 0 6px 16px color-mix(in srgb, var(--accent, #1a8cff) 50%, transparent);
}

/* — кнопки — */
.cine-cta { display: flex; gap: 10px; }
.cine-buy {
  flex: 1; height: clamp(48px, 6.4vh, 58px); border-radius: 18px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--accent, #1a8cff); color: #fff; font-size: 14.5px; font-weight: 700;
  border: 0; cursor: pointer; font-family: inherit;
  box-shadow: 0 14px 34px color-mix(in srgb, var(--accent, #1a8cff) 42%, transparent);
}
.cine-buy:hover, .cine-buy:active { color: #fff; }
.cine-buy.is-ghost {
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.16); box-shadow: none; color: #eaf0fa;
}
.cine-tg {
  width: clamp(48px, 6.4vh, 58px); height: clamp(48px, 6.4vh, 58px); border-radius: 18px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); color: #4ea3ff; font-size: 20px;
}

/* — экран «игры» — */
.cine-covers { display: flex; gap: 8px; }
.cine-cover {
  flex: 1 1 0; min-width: 0; aspect-ratio: 3 / 4; border-radius: 12px; overflow: hidden;
  background: #131b27; box-shadow: 0 16px 34px -22px rgba(0,0,0,.9);
}
.cine-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* — экран «отзывы» — */
.cine-reviews { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.cine-review {
  margin: 0; padding: 14px 16px; border-radius: 16px;
  background: rgba(10,16,27,.72); border: 1px solid rgba(255,255,255,.09); backdrop-filter: blur(14px);
}
.cine-stars { color: #ffc24a; font-size: 10px; letter-spacing: 2px; }
.cine-stars .is-off { color: rgba(255,255,255,.18); }
.cine-review blockquote {
  margin: 8px 0 0; font-size: 12.5px; line-height: 1.55; color: #c3ccda;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.cine-review figcaption { margin-top: 8px; font-size: 11px; color: #8492a8; }

/* — экран «контакты» — */
.cine-contacts { display: flex; flex-direction: column; gap: 8px; }
.cine-contact {
  min-height: 56px; padding: 0 18px; border-radius: 18px; display: flex; align-items: center; gap: 12px;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1);
  color: #eaf0fa; font-size: 14px; font-weight: 600;
}
.cine-contact i { font-size: 19px; color: #4ea3ff; width: 22px; text-align: center; }
.cine-contact.is-wa { background: linear-gradient(100deg,#25d366,#18b955); color: #04240f; border-color: transparent; }
.cine-contact.is-wa i { color: #04240f; }
.cine-contact.is-tg { background: linear-gradient(100deg,#3aa8ff,#1a8cff); color: #04121f; border-color: transparent; }
.cine-contact.is-tg i { color: #04121f; }
.cine-note { margin: 0; font-size: 11.5px; color: #7f8da3; }

/* — точки-индикаторы — */
.cine-nav {
  position: relative; z-index: 6; flex: none;
  display: flex; align-items: center; justify-content: center; gap: 7px;
  padding: 12px 0 calc(10px + env(safe-area-inset-bottom));
}
.cine-nav button {
  width: 7px; height: 7px; padding: 0; border: 0; border-radius: 999px; cursor: pointer;
  background: rgba(255,255,255,.24); transition: width .2s, background .2s;
}
.cine-nav button.is-on { width: 24px; background: var(--accent, #1a8cff); }

/* — возврат в кинорежим со страницы — */
.cine-back {
  position: fixed; right: 14px; bottom: 14px; z-index: 90; width: 46px; height: 46px; border-radius: 14px;
  display: none; align-items: center; justify-content: center;
  background: rgba(10,16,27,.86); border: 1px solid rgba(255,255,255,.14); color: #8ec7ff; font-size: 18px;
  backdrop-filter: blur(12px); cursor: pointer;
}
body.cine-dismissed .cine-back { display: inline-flex; }
/* Над кнопкой консультанта (assistant.css), а не под ней. */
body.cine-dismissed:has(.as) .cine-back { bottom: 92px; }

@media (prefers-reduced-motion: reduce) {
  .cine-badge::before { animation: none; }
  .cine-deck { scroll-behavior: auto; }
}

/* — Альбомная ориентация: текст слева, содержимое справа — */
@media (orientation: landscape) {
  .cine-art { object-position: 52% 30%; }
  .cine-shade {
    background: linear-gradient(90deg, rgba(4,6,12,.94) 0%, rgba(4,6,12,.72) 34%,
                rgba(4,6,12,.12) 72%, rgba(4,6,12,.55) 100%),
                linear-gradient(0deg, rgba(4,6,12,.85) 0%, rgba(4,6,12,0) 46%);
  }
  .cine-screen { align-items: center; }
  .cine-screen-inner {
    max-width: 1100px;
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 46%);
    align-items: center; column-gap: clamp(20px, 4vw, 44px); row-gap: 12px;
  }
  .cine-screen.is-offer .cine-screen-inner { margin-top: 0; }
  .cine-copy { grid-column: 1; grid-row: 1 / span 2; }
  .cine-rail, .cine-covers, .cine-reviews, .cine-contacts { grid-column: 2; grid-row: 1 / span 2; }
  .cine-cta, .cine-note { grid-column: 1; grid-row: 3; }
  .cine-copy h1, .cine-copy h2 { font-size: clamp(24px, min(4.4vw, 8.2vh), 44px); }
  .cine-copy p { font-size: clamp(12px, 1.9vh, 15px); }
  .cine-reviews { grid-template-columns: 1fr; }
  .cine-review blockquote { -webkit-line-clamp: 2; }
}

/* маленькая высота (телефон в альбоме) — компактнее */
@media (orientation: landscape) and (max-height: 520px) {
  .cine-plan { padding: 10px 14px; border-radius: 16px; }
  .cine-plan-sub { display: none; }
  .cine-nav { padding: 8px 0 calc(8px + env(safe-area-inset-bottom)); }
}

/* планшеты: крупнее текст, спокойнее плотность */
@media (min-width: 820px) {
  .cine-screen-inner { gap: clamp(16px, 2.6vh, 26px); }
  .cine-copy p { font-size: clamp(14px, 1.8vh, 17px); }
  .cine-plan { padding: 16px 18px; }
  .cine-plan-sub { font-size: 13.5px; }
}

/* =====================================================================
   МОБИЛЬНАЯ КОМПОЗИЦИЯ ЛЕНДИНГА (после выхода из кинорежима)
   ===================================================================== */
@media (max-width: 900px) {

  section { padding: 50px 0; }
  .section-head { margin-bottom: 22px; }
  .section-head h2 { font-size: clamp(26px, 8vw, 34px); }

  .hero-usp { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .hero-usp .u {
    padding: 13px 14px; border-radius: 16px; border: 1px solid rgba(255,255,255,.09);
    background: rgba(10,16,27,.6); align-items: center;
  }
  .hero-usp .u b { font-size: 12.5px; }
  .hero-usp .u span { font-size: 11.5px; white-space: normal; }
  .hero { padding-bottom: 92px; }

  .plan-row {
    display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory;
    scroll-behavior: smooth; scrollbar-width: none;
    margin-inline: -18px; padding: 6px 18px 4px;
  }
  .plan-row::-webkit-scrollbar { display: none; }
  .plan { flex: 0 0 clamp(258px, 78vw, 300px); scroll-snap-align: center; border-radius: 24px; }
  .mdots { display: flex; justify-content: center; gap: 6px; margin-top: 14px; }
  .mdots span {
    width: 6px; height: 6px; border-radius: 999px; background: rgba(255,255,255,.22);
    transition: width .2s, background .2s;
  }
  .mdots span.is-on { width: 22px; background: var(--accent, #1a8cff); }

  .trust-strip { grid-template-columns: 1fr 1fr; border-radius: 20px; }
  .trust-strip .ts { padding: 16px 14px; border-left: 0; border-top: 1px solid var(--border-soft); }
  .trust-strip .ts:first-child, .trust-strip .ts:nth-child(2) { border-top: 0; }
  .trust-strip .ts:nth-child(even) { border-left: 1px solid var(--border-soft); }

  .cc-more { flex-direction: column; gap: 8px; }
  .cc-more a, .cc-more span {
    width: 100%; min-height: 62px; padding: 0 18px; border-radius: 19px;
    background: rgba(255,255,255,.05); font-size: 13.5px; gap: 12px;
  }
  .cc-more i { font-size: 20px; width: 24px; text-align: center; }

  .form-card { border-radius: 24px; padding: 22px 18px; }
  .form-card input, .form-card select, .form-card textarea { min-height: 56px; border-radius: 16px; }
  .form-card textarea { min-height: 88px; }

  .msticky {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 95;
    padding: 14px 16px calc(22px + env(safe-area-inset-bottom));
    background: linear-gradient(180deg, rgba(4,6,12,0) 0%, rgba(4,6,12,.9) 32%, #04060c 68%);
    pointer-events: none;
  }
  .msticky[hidden] { display: none; }
  .msticky-inner {
    pointer-events: auto; display: flex; align-items: center; gap: 12px; height: 60px;
    padding: 0 8px 0 16px; border-radius: 20px; background: rgba(16,24,40,.92);
    border: 1px solid rgba(255,255,255,.1); backdrop-filter: blur(14px);
  }
  .msticky-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
  .msticky-kicker {
    font-size: 9.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: #8ea4c4;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  .msticky-price {
    font-family: var(--font-head, Sora, sans-serif); font-size: 15px; font-weight: 800; letter-spacing: -.02em;
  }
  .msticky-btn {
    height: 44px; padding: 0 20px; border-radius: 14px; display: inline-flex; align-items: center;
    background: var(--accent, #1a8cff); color: #fff; font-size: 13.5px; font-weight: 700; white-space: nowrap;
  }
  body.cine-open .msticky { display: none; }
  body.cine-dismissed .cine-back { bottom: 96px; }
  /* Консультант тоже плавает справа внизу: панель «Оформить» его не закрывает, кинорежим — над ним. */
  body:has(.msticky:not([hidden])) .as:not([data-open="true"]) { bottom: 100px; }
  body.cine-dismissed:has(.as) .cine-back { bottom: 80px; }
  body.cine-dismissed:has(.as):has(.msticky:not([hidden])) .cine-back { bottom: 168px; }
}

/* iPhone приближает страницу при фокусе на поле мельче 16px (e2e test_phone_inputs_do_not_zoom). */
@media (max-width: 768px) {
  input:not([type=checkbox]):not([type=radio]), select, textarea { font-size: 16px !important; }
}
