/* Витрина кейсов. Оболочка, шрифты и палитра — общие (portal.css);
 * здесь только то, что есть исключительно на этой странице: строка подбора,
 * кнопки-боли, карточка кейса и окно «видео готовится».
 *
 * Раньше витрина жила со своим оформлением и оранжевым акцентом — человек
 * попадал сюда с главной и не понимал, что это тот же сайт. Теперь разница
 * только в содержании.
 */

/* ── результат подбора ───────────────────────────────────────────────────── */
.result { display: none; margin-top: 28px }
.result.show { display: block; animation: rise .5s var(--ease) both }
.result-head { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; margin-bottom: 14px; flex-wrap: wrap }
.result-head h3 { font-size: 19px }
.result-head button { background: none; border: 0; color: var(--muted); font: inherit; font-size: 14px; text-decoration: underline; cursor: pointer }
.result-head button:hover { color: var(--accent) }
.hit { display: flex; gap: 16px; border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; margin-bottom: 10px; background: var(--surf) }
.hit .num { width: 30px; height: 30px; border-radius: 9px; background: var(--accent-dim); color: var(--accent); display: grid; place-items: center; font-family: var(--mono); font-weight: 700; font-size: 14px; flex: none }
.hit h4 { margin: 0 0 6px; font-family: var(--display); font-size: 17px; font-weight: 700 }
.hit p { margin: 0 0 10px; color: var(--ink-2); font-size: 15px }
.hit .why { font-family: var(--mono); font-size: 12px; color: var(--muted); background: rgba(255, 255, 255, .04); border-radius: 8px; padding: 7px 11px; display: inline-block }
.hit .go { margin-top: 12px; display: flex; gap: 10px; flex-wrap: wrap }
.hit .go a { font-size: 14px; font-weight: 600; color: var(--accent); border: 1px solid var(--line); padding: 9px 15px; border-radius: 999px; transition: border-color .2s }
.hit .go a:hover { border-color: var(--accent) }
.none { border: 1px solid var(--line); border-radius: 14px; padding: 22px; background: var(--surf); color: var(--ink-2) }
.none b { display: block; font-family: var(--display); font-size: 17px; color: var(--ink); margin-bottom: 8px }

/* ── окно «видео готовится» ──────────────────────────────────────────────── */
.vmodal { position: fixed; inset: 0; z-index: 80; display: none; place-items: center; padding: 20px; background: rgba(3, 10, 9, .72); backdrop-filter: blur(6px) }
.vmodal.on { display: grid; animation: fade .25s both }
.vmodal .box { max-width: 460px; width: 100%; background: var(--surf); border: 1px solid var(--line-2); border-radius: var(--rad); padding: 30px; text-align: center; animation: rise .35s var(--ease) both }
.vmodal .ic { width: 56px; height: 56px; border-radius: 999px; background: var(--accent-dim); display: grid; place-items: center; margin: 0 auto 18px }
.vmodal .ic svg { width: 22px; height: 22px; fill: var(--accent); margin-left: 3px }
.vmodal h3 { font-size: 20px }
.vmodal p { margin-top: 12px; color: var(--ink-2); font-size: 15px }
.vmodal .row { display: flex; gap: 10px; justify-content: center; margin-top: 22px; flex-wrap: wrap }
.vmodal .row .primary { background: var(--accent); color: var(--on-accent); font-weight: 600; padding: 13px 22px; border-radius: 999px }
.vmodal .row button { background: transparent; border: 1px solid var(--line); color: var(--ink-2); font: inherit; padding: 13px 22px; border-radius: 999px; cursor: pointer }
.vmodal .row button:hover { border-color: var(--accent); color: var(--accent) }
@keyframes fade { from { opacity: 0 } to { opacity: 1 } }

/* ── мелочи страницы ─────────────────────────────────────────────────────── */
.list-head { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; flex-wrap: wrap }
.list-head p { font-size: 15px; color: var(--muted) }
.again { margin-top: 26px; max-width: 720px }

@media (max-width: 900px) {
  .case { grid-template-columns: minmax(0, 1fr); gap: 20px }
  .case .who { grid-template-columns: minmax(0, 1fr) }
  .ask-row { flex-wrap: wrap; border-radius: 20px; padding: 12px }
  .ask-row input { flex: 1 1 100%; padding: 6px 8px }
  .ask-row button { width: 100% }
}

/* ── страница кейса ──────────────────────────────────────────────────────── */
.ccrumbs { font-family: var(--mono); font-size: 12px; color: var(--muted); display: flex; gap: 10px; flex-wrap: wrap }
.ccrumbs a { color: var(--accent) }
.ccrumbs a:hover { color: var(--accent-2) }
.case-page h1 { margin-top: 18px; max-width: 20ch }
.case-acts { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 30px }

/* плеер разбора */
.vplayer { position: relative; border-radius: var(--rad); overflow: hidden; background: #04100F; box-shadow: var(--shadow); aspect-ratio: 16 / 9 }
.vplayer video { width: 100%; height: 100%; display: block; object-fit: cover; background: #04100F }
.vplay {
  position: absolute; inset: 0; width: 100%; border: 0; background: rgba(4, 16, 15, .35);
  cursor: pointer; display: grid; place-items: center; transition: background .25s;
}
.vplay span {
  width: 84px; height: 84px; border-radius: 999px; background: var(--accent); display: grid; place-items: center;
  box-shadow: 0 20px 50px -18px rgba(0, 209, 193, .7); transition: transform .25s var(--ease);
}
.vplay span::after { content: ''; width: 0; height: 0; margin-left: 6px; border-left: 24px solid var(--on-accent); border-top: 15px solid transparent; border-bottom: 15px solid transparent }
.vplay:hover { background: rgba(4, 16, 15, .18) }
.vplay:hover span { transform: scale(1.07) }
.vhint {
  position: absolute; left: 18px; bottom: 18px; font-family: var(--mono); font-size: 12px;
  color: var(--ink-2); background: rgba(4, 16, 15, .6); backdrop-filter: blur(6px);
  border-radius: 99px; padding: 7px 14px; pointer-events: none; transition: opacity .25s;
}
.vplayer.on .vplay, .vplayer.on .vhint { opacity: 0; pointer-events: none }
.case-shot { width: 100%; border-radius: var(--rad); border: 1px solid var(--line) }

.case-cols { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 48px; align-items: start }
.case-pains { list-style: none; margin: 20px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px }
.case-pains li { position: relative; padding-left: 30px; font-size: 16px; line-height: 1.5; color: var(--ink-2) }
.case-pains li::before {
  content: ''; position: absolute; left: 0; top: 9px; width: 14px; height: 2px; background: var(--accent); opacity: .8;
}
.case-tech { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px }
.case-tech span { font-family: var(--mono); font-size: 12px; color: var(--ink-2); border: 1px solid var(--line); border-radius: 99px; padding: 7px 13px }
.case-who { display: flex; flex-direction: column; gap: 18px; margin-top: 28px }
.case-who b { display: block; font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 7px }
.case-who p { font-size: 15px; line-height: 1.55; color: var(--ink-2) }

.case-nav { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap }
.case-nav a { display: flex; flex-direction: column; gap: 6px; max-width: 46% }
.case-nav a.r { text-align: right; margin-left: auto }
.case-nav span { font-family: var(--mono); font-size: 12px; color: var(--muted) }
.case-nav b { font-family: var(--display); font-weight: 700; font-size: 16px; line-height: 1.3 }
.case-nav a:hover b { color: var(--accent) }

@media (max-width: 1000px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)) }
  .case-cols { grid-template-columns: minmax(0, 1fr); gap: 30px }
}
@media (max-width: 640px) {
  .tiles { grid-template-columns: minmax(0, 1fr) }
  .case-nav a { max-width: 100% }
  .case-nav a.r { text-align: left; margin-left: 0 }
  .vplay span { width: 62px; height: 62px }
  .vplay span::after { border-left-width: 18px; border-top-width: 11px; border-bottom-width: 11px }
}

/* ── кинозал ──────────────────────────────────────────────────────────────
   Главный элемент страницы — один большой экран, в котором идёт работа.
   Ленты под ним только выбирают, что показать: они мелкие и не соревнуются
   с экраном за внимание. Пятнадцать кейсов при этом видны сразу, потому что
   ленты разложены по болям и прокручиваются вбок. */
.hall { padding: clamp(28px, 4vw, 56px) 0 clamp(20px, 3vw, 34px) }
.hall-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; flex-wrap: wrap; margin-bottom: 26px }
.hall-top h1 { margin-top: 14px; font-size: clamp(32px, 4.4vw, 54px) }
.hall-ask { display: flex; align-items: center; gap: 8px; background: var(--surf); border: 1px solid var(--line); border-radius: 999px; padding: 6px 6px 6px 22px; flex: 1 1 420px; max-width: 560px }
.hall-ask:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(0, 209, 193, .1) }
.hall-ask input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font: inherit; font-size: 15px; padding: 11px 0 }
.hall-ask input::placeholder { color: var(--muted) }
.hall-ask button { flex: none; width: 44px; height: 44px; border: 0; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-size: 18px; cursor: pointer; transition: background .2s }
.hall-ask button:hover { background: var(--accent-2) }

/* экран */
.screen {
  position: relative; border-radius: 20px; overflow: hidden; background: #04100F;
  aspect-ratio: 16 / 8.4; box-shadow: 0 60px 120px -60px rgba(0, 0, 0, .95), 0 0 0 1px rgba(255, 255, 255, .07);
}
.screen video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top center; opacity: 0; transition: opacity .5s var(--ease) }
.screen video.on { opacity: 1 }
/* затемнение снизу: под ним живёт текст, и он должен читаться на любом кадре */
.scr-glass { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(4,16,15,.18) 0%, rgba(4,16,15,.06) 26%, rgba(4,16,15,.62) 58%, rgba(4,16,15,.93) 78%, rgba(4,16,15,.99) 100%) }
.scr-info { position: absolute; left: 0; right: 0; bottom: 0; padding: clamp(20px, 3vw, 38px); display: flex; flex-direction: column; gap: 10px; max-width: 780px }
.scr-prod { font-family: var(--mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent) }
.scr-info h2 { font-size: clamp(22px, 2.7vw, 36px); line-height: 1.12; text-shadow: 0 2px 24px rgba(4,16,15,.7) }
.scr-info p { font-size: clamp(14px, 1.2vw, 16px); line-height: 1.5; color: var(--ink-2); text-shadow: 0 1px 16px rgba(4,16,15,.8); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden }
.scr-acts { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 6px }
.scr-acts .btn { min-height: 46px; padding: 12px 22px }
.scr-hint {
  position: absolute; top: 16px; right: 18px; display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent);
  background: rgba(4, 33, 30, .7); backdrop-filter: blur(6px); border: 1px solid rgba(0, 209, 193, .3);
  border-radius: 99px; padding: 6px 13px; transition: opacity .3s;
}
.scr-hint::before { content: ''; width: 7px; height: 7px; border-radius: 99px; background: var(--accent); animation: pulseDot 1.8s infinite }
@keyframes pulseDot { 0%, 100% { opacity: .9 } 50% { opacity: .2 } }
.screen.touched .scr-hint { opacity: 0 }

/* ленты */
.reels { display: flex; flex-direction: column; gap: clamp(22px, 3vw, 36px) }
.reel.hide { display: none }
.reel > header { display: flex; align-items: baseline; gap: 12px; margin-bottom: 14px }
.reel > header h3 { font-size: clamp(17px, 1.7vw, 21px) }
.reel > header span { font-family: var(--mono); font-size: 12px; color: var(--muted) }
.reel-track {
  display: flex; gap: 14px; overflow-x: auto; padding: 4px 2px 10px;
  scroll-snap-type: x proximity; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent;
}
.reel-track::-webkit-scrollbar { height: 6px }
.reel-track::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 99px }
.reel-item {
  flex: 0 0 clamp(200px, 21vw, 268px); scroll-snap-align: start;
  display: flex; flex-direction: column; gap: 10px; text-align: left; cursor: pointer;
  background: none; border: 0; padding: 0; font: inherit; color: inherit;
}
.reel-shot {
  position: relative; display: block; aspect-ratio: 16 / 10; border-radius: 12px; overflow: hidden;
  background: #0A1A18; border: 1px solid var(--line); transition: border-color .25s, transform .25s var(--ease), box-shadow .25s;
}
.reel-shot video, .reel-shot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top center }
.reel-item:hover .reel-shot, .reel-item.on .reel-shot { border-color: var(--accent); transform: translateY(-4px); box-shadow: 0 20px 40px -24px rgba(0, 209, 193, .5) }
.reel-item.on .reel-shot::after {
  content: 'сейчас на экране'; position: absolute; left: 8px; bottom: 8px;
  font-family: var(--mono); font-size: 10px; letter-spacing: .06em; color: var(--on-accent);
  background: var(--accent); border-radius: 99px; padding: 4px 9px;
}
.reel-cap b { display: block; font-family: var(--display); font-weight: 700; font-size: 14px; line-height: 1.3 }
.reel-cap i { display: block; font-style: normal; font-family: var(--mono); font-size: 11px; color: var(--muted); margin-top: 5px }
.reel-item:hover .reel-cap b { color: var(--accent) }

@media (max-width: 860px) {
  .hall-ask { min-width: 100% }
  .screen { aspect-ratio: 16 / 11 }
  /* на телефоне текст занимает половину кадра — светлый интерфейс под ним
     нужно гасить сильнее, иначе заголовок теряется на белых карточках */
  .scr-glass { background: linear-gradient(180deg, rgba(4,16,15,.25) 0%, rgba(4,16,15,.2) 18%, rgba(4,16,15,.8) 46%, rgba(4,16,15,.97) 72%, rgba(4,16,15,1) 100%) }
  .scr-info p { display: none }
  .scr-acts .btn { flex: 1 1 auto; justify-content: center }
  .scr-hint { display: none }
  .reel-item { flex-basis: 68vw }
}
