/* «Кино» — посадочная «Разработка Telegram-ботов»: триптих «ночь — утро — вечер», проба бота в видоискателе,
   монтажный лист, афиша работ, монтажный стол (как на главной), вопросы в чате с ботом, финал с вашей репликой. */

.crumbs { display: flex; gap: 8px; align-items: center; margin-bottom: 14px; font-size: 14px; color: var(--bone-2); text-shadow: 0 1px 10px rgba(0, 0, 0, .6); }
.crumbs a { color: var(--bone-2); text-decoration: none; border-bottom: 1px solid var(--line-2); }
.crumbs a:hover { color: var(--bone); }
.crumbs span[aria-hidden] { opacity: .5; }

/* ——— триптих ——— */
.tri { position: relative; height: var(--len, 320vh); }
.tri__stage { position: sticky; top: var(--top); height: calc(100vh - var(--top) - var(--bot)); display: grid; grid-template-columns: var(--c1, 6fr) var(--c2, 1fr) var(--c3, 1fr); gap: 2px; overflow: hidden; background: var(--black); }
.tri__p { position: relative; min-width: 0; overflow: hidden; }
.tri__p .frame { transition: filter .6s; }
.tri__p:not(.is-cur) .frame { filter: brightness(.42) saturate(.6); }
.tri__time { position: absolute; z-index: 4; left: 50%; top: 24px; transform: translateX(-50%); font-size: 15px; color: var(--bone); letter-spacing: .02em; text-shadow: 0 1px 8px rgba(0, 0, 0, .8); transition: opacity .3s; }
.tri__p.is-cur .tri__time { opacity: 0; }
.tri .sub { width: min(720px, 86%); }
.tri__title { max-width: min(520px, 42vw); }
.tri__p:first-of-type .frame::before { content: ""; position: absolute; z-index: 1; inset: 0; background: linear-gradient(90deg, rgba(0, 0, 0, .58), rgba(0, 0, 0, .2) 45%, transparent 70%); pointer-events: none; }
.tri .cap { bottom: 96px; }

@media (min-width: 861px) {
  .rm .tri { height: auto; }
  .rm .tri__stage { position: relative; top: 0; display: block; height: auto; overflow: visible; }
  .rm .tri__p { height: calc(100vh - var(--top) - var(--bot)); }
  .rm .tri__p + .tri__p { border-top: 2px solid var(--black); }
  .rm .tri__p .frame { filter: none; }
  .rm .tri__time { display: none; }
  .rm .tri__title { opacity: 1; visibility: visible; transform: none; }
}

/* ——— проба: видоискатель ——— */
.demo { background: #0b0b0a; min-height: calc(100vh - var(--top) - var(--bot)); display: flex; align-items: center; padding: 40px var(--gut); }
.demo__set { width: 100%; max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) minmax(330px, 360px) minmax(0, 1fr); gap: 44px; align-items: center; }
.demo__left { display: flex; flex-direction: column; gap: 22px; }
.demo__left h2 { font: 300 34px/1.1 var(--serif); }
.demo__lead { font-size: 16.5px; color: var(--bone-2); margin-top: -10px; }
.demo__right { display: flex; flex-direction: column; gap: 30px; }
.demo__tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.notes { display: grid; gap: 26px; }
.notes li { position: relative; padding-left: 18px; border-left: 1px solid var(--line); transition: border-color .3s; }
.notes b { display: block; font: 400 21px/1.2 var(--serif); color: var(--bone-2); margin-bottom: 6px; transition: color .3s; }
.notes span { display: block; font-size: 15.5px; line-height: 1.5; color: var(--stone); }
.notes li.is-hot { border-left-color: var(--glass); }
.notes li.is-hot b { color: var(--bone); }
.notes li.is-hot span { color: var(--bone-2); }
.vf { position: relative; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 52px 22px 18px; }
.vf__c { position: absolute; width: 26px; height: 26px; border-color: rgba(234, 228, 216, .55); border-style: solid; border-width: 0; }
.vf__c--tl { left: 0; top: 0; border-left-width: 1.5px; border-top-width: 1.5px; }
.vf__c--tr { right: 0; top: 0; border-right-width: 1.5px; border-top-width: 1.5px; }
.vf__c--bl { left: 0; bottom: 0; border-left-width: 1.5px; border-bottom-width: 1.5px; }
.vf__c--br { right: 0; bottom: 0; border-right-width: 1.5px; border-bottom-width: 1.5px; }
.vf__rec { position: absolute; left: 14px; top: 12px; display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--bone-2); }
.vf__rec i { width: 8px; height: 8px; border-radius: 50%; background: var(--glass); animation: rec 1.6s steps(2) infinite; }
@keyframes rec { 50% { opacity: .25; } }
.msgr { position: absolute; right: 12px; top: 4px; display: flex; gap: 2px; padding: 3px; border-radius: 20px; box-shadow: inset 0 0 0 1px var(--line-2); }
.msgr__b { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px; border: 0; border-radius: 16px; background: transparent; color: var(--bone-2); font-size: 14px; cursor: pointer; }
.msgr__b.is-on { background: var(--bone); color: #141413; }
.dev { width: 290px; height: min(570px, calc(100vh - var(--top) - var(--bot) - 190px)); min-height: 470px; padding: 8px; border-radius: 44px; background: #0d0d0c; box-shadow: 0 0 0 1px #2e2e2b, inset 0 0 0 2px #1c1c1a, 0 50px 90px -40px #000; }
.tg--demo { width: 100%; height: 100%; border-radius: 37px; font-size: 14.5px; }
.tg--demo .tg__sb { height: 40px; font-size: 14px; padding: 0 26px 0 34px; }
.tg--demo .tg__nav { height: 50px; grid-template-columns: 62px minmax(0, 1fr) 44px; padding: 0 8px; }
.tg--demo .tg__ttl b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tg--demo .tg__ava { width: 32px; height: 32px; }
.tg--demo .tg__back { font-size: 14.5px; }
.tg--demo .tg__ttl b { font-size: 15px; }
.tg--demo .tg__feed { justify-content: flex-end; padding: 10px 9px 6px; gap: 6px; overflow: hidden; }
.tg--demo .m { max-width: 84%; font-size: 14.5px; line-height: 1.35; animation: msgIn .3s var(--ease) both; }
.tg--demo .kb { width: 84%; animation: msgIn .3s var(--ease) both; }
.tg--demo .kb.one { grid-template-columns: 1fr; }
.tg--demo .kb button.alt { grid-column: 1 / -1; }
.tg--demo .kb button { min-height: 44px; font: 500 13.5px/1.2 Inter, var(--sans); cursor: pointer; transition: background .15s; }
.tg--demo .kb button:hover { background: rgba(52, 62, 56, .62); }
.tg--demo .kb button:disabled { cursor: default; opacity: .55; }
.tg--demo .kb .alt { background: rgba(255, 255, 255, .72); color: #2f5d57; }
.tg--demo .typing { align-self: flex-start; display: flex; gap: 4px; padding: 11px 13px; border-radius: 17px 17px 17px 5px; background: #fff; }
.tg--demo .typing i { width: 6px; height: 6px; border-radius: 50%; background: #9aa197; animation: typ 1s infinite; }
.tg--demo .typing i:nth-child(2) { animation-delay: .15s; }
.tg--demo .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes typ { 0%, 60%, 100% { transform: none; opacity: .5; } 30% { transform: translateY(-3px); opacity: 1; } }
@keyframes msgIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.tg--demo .card { align-self: flex-start; width: 84%; overflow: hidden; border-radius: 16px 16px 16px 5px; background: #fff; animation: msgIn .3s var(--ease) both; }
.tg--demo .card__img { height: 92px; background: linear-gradient(135deg, #cfc6b4, #a99d86); display: grid; place-items: center; }
.tg--demo .card__b { padding: 8px 11px 9px; }
.tg--demo .card__b b { display: block; font-size: 14.5px; }
.tg--demo .card__b span { font-size: 13.5px; color: #5a5d57; }
.tg--demo .pay { align-self: flex-start; width: 84%; padding: 10px 12px; border-radius: 16px 16px 16px 5px; background: #fff; animation: msgIn .3s var(--ease) both; }
.tg--demo .pay b { display: block; font-size: 14.5px; margin-bottom: 2px; }
.tg--demo .pay span { font-size: 13.5px; color: #5a5d57; }
.tg__kb { display: none; }
.tg--demo .tg__home { bottom: 7px; width: 110px; margin-left: -55px; height: 4px; }
.tg--demo[data-m="max"] .tg__nav { background: #f3f2f7; }
.tg--demo[data-m="max"] .tg__back { color: #4d4b8a; }
.tg--demo[data-m="max"] .out { background: #e4e2f3; }
.tg--demo[data-m="max"] .out i { color: #6c6a9e; }
.tg--demo[data-m="max"] .tg__ava { background: #3f3d6b; }
.tg--demo[data-m="max"] .kb button { background: rgba(63, 61, 107, .5); }
.tg--demo[data-m="max"] { background: linear-gradient(180deg, #e2e1ea 0%, #ebeaf0 60%, #e3e2ea 100%); }
.owner { min-height: 70px; width: 100%; display: flex; }
.owner__n { display: grid; grid-template-columns: 36px 1fr; gap: 10px; align-items: center; width: 100%; max-width: 360px; padding: 10px 12px; border-radius: 16px; background: rgba(246, 244, 239, .94); color: #151514; animation: msgIn .35s var(--ease) both; }
.owner__n[hidden] { display: none; }
.owner__ic { width: 36px; height: 36px; border-radius: 9px; background: var(--bottle); display: grid; place-items: center; }
.owner__n b { display: block; font-size: 13px; font-weight: 600; color: #4c4f48; }
.owner__n p { font-size: 14.5px; line-height: 1.3; }
.vf__again { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px 0 13px; border: 0; border-radius: 20px; background: transparent; box-shadow: inset 0 0 0 1px var(--line-2); color: var(--bone-2); font-size: 14px; cursor: pointer; }
.vf__again:hover { color: var(--bone); box-shadow: inset 0 0 0 1px var(--bone); }

/* ——— что входит: лист на столе ——— */
.sheet { background: linear-gradient(90deg, rgba(14, 14, 13, .94) 0%, rgba(14, 14, 13, .72) 42%, rgba(14, 14, 13, .35) 100%), #0e0e0d url(img/b2.webp) 88% 78% / 135% auto no-repeat; }
.sheet__in { max-width: 1160px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 56px; align-items: center; }
.sheet__head h2 { font: 300 34px/1.12 var(--serif); }
.sheet__head p { margin-top: 12px; color: var(--bone-2); font-size: 17px; max-width: 26em; }
.sheet__list { padding: 34px 40px 30px; background: #ece6da; color: #1d1c19; border-radius: 2px; transform: rotate(-.7deg); box-shadow: 0 30px 70px -30px rgba(0, 0, 0, .8), 0 2px 0 rgba(0, 0, 0, .08); background-image: repeating-linear-gradient(transparent 0 51px, rgba(29, 28, 25, .1) 51px 52px); background-position: 0 30px; }
.sheet__list div { display: grid; grid-template-columns: 150px 1fr; gap: 18px; align-items: baseline; min-height: 52px; padding: 13px 0 0; }
.sheet__list dt { font: 400 19px/1.2 var(--serif); color: #1d1c19; }
.sheet__list dd { font-size: 16px; line-height: 1.4; color: #3e3c35; }

/* ——— фильмография: афиша — один большой постер и список ——— */
.films { background: radial-gradient(60% 70% at 38% 50%, #1a1a18 0%, #0b0b0a 70%); }
.afisha { max-width: 1160px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) 300px 260px; grid-template-rows: auto 1fr; gap: 0 48px; align-items: center; }
.afisha__head { grid-column: 1; grid-row: 1; align-self: end; margin-bottom: 26px; }
.afisha__head h2 { font: 300 34px/1.12 var(--serif); }
.afisha__head p { margin-top: 10px; max-width: 26em; font-size: 17px; color: var(--bone-2); }
.afisha__cap { grid-column: 1; grid-row: 2; align-self: start; }
.afisha__main { grid-column: 2; grid-row: 1 / span 2; position: relative; margin: 0; padding: 10px; border-radius: 6px; background: #0a0a09; box-shadow: 0 0 0 1px #2c2c29, 0 0 90px rgba(234, 228, 216, .07), 0 40px 80px -40px #000; }
.afisha__main img { display: block; width: 100%; height: auto; aspect-ratio: 600 / 1060; object-fit: cover; border-radius: 3px; cursor: pointer; }
.afisha__n { font-size: 14px; color: var(--stone); margin-bottom: 8px; }
.afisha__cap h3 { font: 300 30px/1.12 var(--serif); }
.afisha__sub { margin-top: 10px; max-width: 26em; font-size: 17px; color: var(--bone-2); }
.afisha__meta { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; font-size: 16px; }
.afisha__meta .link { display: inline-flex; align-items: center; min-height: 44px; }
.afisha__list { grid-column: 3; grid-row: 1 / span 2; display: grid; gap: 10px; }
.af { width: 100%; display: grid; grid-template-columns: 54px 1fr; gap: 14px; align-items: center; padding: 6px 12px 6px 6px; border: 0; border-radius: 6px; background: transparent; color: var(--bone-2); font: 400 16px/1.25 var(--sans); text-align: left; cursor: pointer; transition: background .2s, color .2s; }
.af span svg { display: inline-block; vertical-align: -1px; margin-right: 7px; opacity: .7; }
.af img { width: 54px; height: 84px; object-fit: cover; border-radius: 3px; filter: saturate(.5) brightness(.85); transition: filter .2s; }
.af:hover { background: rgba(234, 228, 216, .06); color: var(--bone); }
.af.is-on { background: rgba(234, 228, 216, .1); color: var(--bone); }
.af.is-on img, .af:hover img { filter: none; }

/* ——— как идёт работа: монтажный стол с главной (стили в sections.css) ——— */

/* ——— вопросы: чат с ботом ——— */
.ask { background: var(--black); }
.ask__in { max-width: 1160px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, .7fr) minmax(0, 1.3fr); gap: 56px; align-items: start; }
.ask__head { position: sticky; top: calc(var(--top) + 40px); }
.ask__head h2 { font: 300 34px/1.12 var(--serif); }
.ask__head p { margin-top: 12px; color: var(--bone-2); font-size: 17px; }
.ask__chat { border-radius: 22px; overflow: hidden; background: linear-gradient(180deg, #d9d3c7 0%, #e4dfd5 55%, #ddd7cb 100%); color: #121211; font-family: Inter, var(--sans); }
.ask__feed { display: flex; flex-direction: column; gap: 8px; min-height: 260px; max-height: 460px; overflow-y: auto; padding: 18px 16px 12px; scroll-behavior: smooth; }
.ask__m { max-width: 82%; padding: 9px 13px; border-radius: 18px; font-size: 15.5px; line-height: 1.42; box-shadow: 0 1px 1px rgba(0, 0, 0, .06); animation: msgIn .3s var(--ease) both; }
.ask__m--in { align-self: flex-start; background: #fff; border-bottom-left-radius: 5px; }
.ask__m--out { align-self: flex-end; background: #dcefc9; border-bottom-right-radius: 5px; }
.ask__typing { align-self: flex-start; display: flex; gap: 4px; padding: 12px 14px; border-radius: 18px 18px 18px 5px; background: #fff; }
.ask__typing i { width: 6px; height: 6px; border-radius: 50%; background: #9aa197; animation: typ 1s infinite; }
.ask__typing i:nth-child(2) { animation-delay: .15s; }
.ask__typing i:nth-child(3) { animation-delay: .3s; }
.ask__qs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 12px; background: rgba(247, 246, 243, .97); border-top: 1px solid rgba(0, 0, 0, .07); }
.ask__q summary { display: flex; align-items: center; min-height: 48px; padding: 8px 14px; border-radius: 12px; background: rgba(52, 62, 56, .5); color: #fff; font-size: 14.5px; line-height: 1.3; cursor: pointer; list-style: none; transition: background .15s; }
.ask__q summary::-webkit-details-marker { display: none; }
.ask__q summary:hover { background: rgba(52, 62, 56, .68); }
.ask__q.is-asked summary { background: rgba(52, 62, 56, .26); color: #3d413b; }
.ask__q p { padding: 10px 6px 4px; font-size: 15px; line-height: 1.45; color: #2c2e2a; }
.js-on .ask__q p { display: none; }

/* ——— финал ——— */
.fin--bots .fin__shot { overflow: hidden; }

@media (max-width: 1280px) and (min-width: 1181px) {
  .tri__title { max-width: 440px; }
}

@media (max-width: 1180px) and (min-width: 861px) {
  .tri__title { max-width: 420px; }
  .demo__set { grid-template-columns: minmax(0, 1fr) 340px; gap: 32px; }
  .demo__right { grid-column: 1; }
  .vf { grid-column: 2; grid-row: 1 / span 2; }
  .afisha { grid-template-columns: minmax(0, 1fr) 260px; gap: 0 32px; }
  .afisha__list { grid-column: 1; grid-row: 3; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 22px; }
  .afisha__main { grid-row: 1 / span 3; }
  .ask__in { grid-template-columns: 1fr; gap: 28px; }
  .ask__head { position: static; }
  .sheet__in { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 860px) {
  .tri__p .frame { --pos: 50% 50% !important; }
  .tri { height: calc(100svh - var(--top)) !important; }
  .tri__stage { position: static; display: block; height: auto; background: none; overflow: visible; }
  .tri__p { position: absolute; }
  .tri__p:first-of-type .frame::before { display: none; }
  .tri__time { display: none; }
  .tri__p .frame { filter: none !important; }
  .tri .cap { bottom: auto; }
  .tri__title { max-width: none; }
  .crumbs { display: none; }
  .demo { display: block; min-height: 0; padding: 64px 16px 56px; }
  .demo__set { display: flex; flex-direction: column; align-items: stretch; gap: 18px; }
  .vf { align-self: center; }
  .sheet__in { grid-template-columns: 1fr; gap: 20px; }
  .sheet { background: linear-gradient(180deg, rgba(14, 14, 13, .9), rgba(14, 14, 13, .6)), #0e0e0d url(img/b2.webp) 78% 80% / cover no-repeat; }
  .demo__left, .demo__right { display: contents; }
  .demo__left h2 { font-size: 28px; }
  .demo__lead { margin-top: -6px; font-size: 16px; }
  .owner { order: 3; min-height: 0; }
  .demo__tabs { order: 1; flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 0 16px; scrollbar-width: none; }
  .demo__tabs::-webkit-scrollbar { display: none; }
  .demo__tabs .chip { flex: none; }
  .vf { order: 2; width: 100%; padding: 50px 10px 18px; }
  .dev { width: min(300px, 80vw); height: min(560px, 150vw); min-height: 0; border-radius: 42px; }
  .demo__left .notes { order: 4; }
  .demo__right .notes { order: 5; }
  .notes { gap: 18px; }
  .notes b { font-size: 19px; }
  .notes span { font-size: 15px; }
  .msgr { right: 8px; top: 2px; }
  .msgr__b { min-height: 44px; padding: 0 14px; }
  .vf__rec { top: 16px; }
  .vf { padding-top: 58px; }
  .sheet__list { padding: 22px 18px 18px; transform: none; background-image: none; }
  .sheet__list div { grid-template-columns: 1fr; gap: 2px; min-height: 0; padding: 10px 0; border-bottom: 1px solid rgba(29, 28, 25, .12); }
  .sheet__list div:last-child { border-bottom: 0; }
  .sheet__list dt { font-size: 18px; }
  .sheet__head h2, .ask__head h2 { font-size: 28px; }
  .afisha { display: grid; grid-template-columns: 44% minmax(0, 1fr); gap: 16px; align-items: center; }
  .afisha__head { grid-column: 1 / -1; grid-row: 1; margin-bottom: 4px; }
  .afisha__head h2 { font-size: 28px; }
  .afisha__head p { font-size: 16px; }
  .afisha__main { grid-column: 1; grid-row: 2; padding: 6px; }
  .afisha__cap { grid-column: 2; grid-row: 2; align-self: center; }
  .afisha__cap h3 { font-size: 23px; }
  .afisha__sub { font-size: 15px; }
  .afisha__meta { flex-direction: column; align-items: flex-start; gap: 4px; font-size: 15px; }
  .afisha__list { grid-column: 1 / -1; grid-row: 3; display: flex; gap: 8px; overflow-x: auto; margin: 6px -16px 0; padding: 0 16px 4px; scrollbar-width: none; }
  .afisha__list::-webkit-scrollbar { display: none; }
  .afisha__list li { flex: none; }
  .af { width: auto; grid-template-columns: 40px auto; gap: 10px; padding: 4px 14px 4px 4px; font-size: 15px; white-space: nowrap; }
  .af img { width: 40px; height: 62px; }
  .vf__rec { display: none; }
  .vf { padding-bottom: 96px; }
  .ask__in { grid-template-columns: 1fr; gap: 18px; }
  .ask__head { position: static; }
  .ask__chat { border-radius: 18px; margin: 0 -6px; }
  .ask__feed { min-height: 200px; max-height: 360px; padding: 14px 12px 10px; }
  .ask__qs { grid-template-columns: 1fr; }
  .fin--bots .fin__shot { height: 118vw; max-height: 640px; }
}
