/* Просмотр историй на странице «Работы» (18.10.2026): старый просмотр (assets/stories.css)
   в цветах и шрифтах нового сайта. Собирается скриптом из stories.css, руками правится только хвост файла. */
.st-view {
  position: fixed; inset: 0; z-index: 300; display: none; background: #0E1420; color: #E6E4DF;
  grid-template-columns: 250px minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto;
}
.st-view.on { display: grid; }
.st-top { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem clamp(16px, 3vw, 2.4rem); border-bottom: 1px solid rgba(214,179,106,0.28); }
.st-eyebrow { font-family: var(--body); font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; color: #D6B36A; }
.st-title { font-family: var(--display); font-weight: 600; font-size: clamp(1.5rem, 2.2vw, 2rem); line-height: 1.1; color: #E6E4DF; margin: 0.2rem 0 0; display: inline-block; max-width: none; }
.st-top-niche { font-size: 15px; color: #CBD0DA; margin-left: 1rem; }
.st-close { flex: none; width: 52px; height: 52px; font-size: 1.8rem; line-height: 1; color: #E6E4DF; background: transparent; border: 1px solid #D6B36A; cursor: pointer; }
.st-close:hover { background: rgba(214,179,106,0.1); }
.st-close:focus-visible, .st-arrow:focus-visible, .st-ch:focus-visible { outline: 2px solid #D6B36A; outline-offset: 3px; }

.st-chapters { grid-row: 2; padding: 1.6rem 1rem 1.6rem clamp(16px, 3vw, 2.4rem); border-right: 1px solid rgba(214,179,106,0.2); overflow-y: auto; }
.st-ch { display: flex; gap: 0.7rem; align-items: baseline; width: 100%; text-align: left; background: none; border: 0; border-left: 2px solid transparent; padding: 0.6rem 0.7rem; min-height: 44px; font: inherit; font-size: 16px; color: #CBD0DA; cursor: pointer; }
.st-ch span { font-family: var(--body); font-size: 12px; color: #D6B36A; flex: none; }
.st-ch:hover { color: #E6E4DF; }
.st-ch.on { color: #E6E4DF; border-left-color: #A33848; background: rgba(26,36,52,0.7); }

.st-stage { grid-row: 2; position: relative; overflow: hidden; }
.st-slide { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: clamp(1rem, 2.4vw, 2rem) clamp(4.2rem, 7vw, 6.5rem); }
.st-slide[hidden] { display: none; }
.st-img { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; box-shadow: 0 30px 60px -30px rgba(0,0,0,0.5); mix-blend-mode: normal; -webkit-mask-image: none; mask-image: none; }
.st-arrow { position: absolute; top: 50%; z-index: 2; flex: none; width: 56px; height: 56px; transform: translateY(-50%); font-size: 1.4rem; color: #E6E4DF; background: rgba(26,36,52,0.92); border: 1px solid #D6B36A; cursor: pointer; }
.st-arrow.prev { left: clamp(8px, 1.6vw, 1.4rem); }
.st-arrow.next { right: clamp(8px, 1.6vw, 1.4rem); }
.st-arrow:hover:not(:disabled) { background: #8A2332; color: #1A2434; border-color: #8A2332; }
.st-arrow:disabled { opacity: 0.3; cursor: default; }

.st-bottom { grid-column: 1 / -1; display: flex; align-items: center; gap: 1.4rem; padding: 0.9rem clamp(16px, 3vw, 2.4rem); border-top: 1px solid rgba(214,179,106,0.28); min-height: 76px; }
.st-count { font-family: var(--body); font-size: 14px; letter-spacing: 0.1em; color: #E6E4DF; flex: none; }
.st-bar { flex: 1; height: 2px; background: rgba(214,179,106,0.2); overflow: hidden; }
.st-bar i { display: block; height: 100%; background: #D6B36A; transform-origin: left center; transition: transform .45s cubic-bezier(.16,1,.3,1); }
.st-end { display: flex; gap: 0.8rem; flex-wrap: wrap; justify-content: flex-end; visibility: hidden; opacity: 0; transition: opacity .3s; }
.st-end.on { visibility: visible; opacity: 1; }
.st-end .btn { min-height: 48px; }

/* короткие истории */
.st-cover, .st-text-slide, .st-review { display: flex; flex-direction: column; align-items: center; text-align: center; max-width: 900px; width: 100%; }
.st-niche { font-family: var(--body); font-size: 13px; letter-spacing: 0.18em; text-transform: uppercase; color: #D6B36A; }
.st-name {
  margin: 0.6rem 0 2rem; font-family: var(--display); font-style: normal; font-weight: 600; font-size: clamp(2.8rem, 6vw, 5.6rem); line-height: 1;
  background: linear-gradient(100deg,#A9833C 0%,#D6B46A 24%,#F0D99E 44%,#C59A4C 64%,#E8CA86 82%,#B08A40 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: #D6B36A;
}
.st-dev .mk-laptop { width: min(620px, 60vw); }
.st-text { font-family: var(--display); font-style: normal; font-size: clamp(1.7rem, 3vw, 2.8rem); line-height: 1.25; color: #E6E4DF; max-width: 26ch; margin: 1rem auto 0; }
.st-devices { display: flex; align-items: flex-end; justify-content: center; gap: clamp(1.4rem, 4vw, 3.4rem); width: 100%; }
.st-devices .mk-laptop { width: min(640px, 52vw); }
.st-devices .mk-phone { width: min(190px, 16vw); }
.st-quote { font-family: var(--display); font-style: normal; font-size: clamp(1.8rem, 3.2vw, 3rem); line-height: 1.2; color: #E6E4DF; max-width: 22ch; margin: 0 auto; }
.st-who { font-size: 15px; color: #CBD0DA; margin: 0.8rem auto 1.6rem; }
.st-shots { display: grid; gap: 1rem; width: min(640px, 100%); }
.st-shots img { width: 100%; height: auto; display: block; border: 8px solid #1A2434; outline: 1px solid rgba(214,179,106,0.35); }
.st-bot { width: min(480px, 100%); height: 300px; margin-top: 1.6rem; display: flex; flex-direction: column; background: #0B1128; color: #E8E5D8; border: 1px solid rgba(201,162,39,0.45); text-align: left; font-size: 15px; }
.st-bot-log { flex: 1; overflow-y: auto; padding: 0.8rem; display: flex; flex-direction: column; gap: 0.5rem; }
.st-bot-quick { display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 0.7rem; border-top: 1px solid rgba(201,162,39,0.25); }
.st-bot-quick button { min-height: 44px; padding: 0.4rem 0.8rem; font: inherit; font-size: 14px; color: #E8E5D8; background: transparent; border: 1px solid rgba(201,162,39,0.55); cursor: pointer; }

@media (max-width: 900px) {
  .st-view { grid-template-columns: minmax(0, 1fr); }
  .st-chapters { display: none; }
  .st-stage { grid-column: 1; }
  .st-slide { padding: 0.8rem 0.8rem 4.6rem; }
  .st-arrow { top: auto; bottom: 0.8rem; transform: none; width: 52px; height: 52px; }
  .st-top-niche { display: none; }
  .st-bottom { flex-wrap: wrap; gap: 0.8rem; }
  .st-end { width: 100%; justify-content: stretch; display: none; }
  .st-end.on { display: flex; }
  .st-end .btn { flex: 1 1 100%; }
  .st-devices .mk-laptop { width: 64vw; }
  .st-devices .mk-phone { width: 24vw; }
  .st-dev .mk-laptop { width: 86vw; }
}

/* правки после первого просмотра 23.09: высота картинки макапа по пропорции (атрибут height=688 иначе
   растягивал превью), меньше пустоты над меню, подзаголовок меню в две ровные строки */
.st-eyebrow { display: block; }
.st-top-niche { margin-left: 0.8rem; }

/* 14.10.2026: история главами-текстом (кейс аптеки). Текст слева, колонка до 66 знаков,
   длинная глава прокручивается внутри кадра (колесо мыши сначала листает текст, потом кадр) */
.st-name-long { font-size: clamp(2.2rem, 4.2vw, 4rem); line-height: 1.05; margin-bottom: 0.4rem; max-width: 18ch; }
.st-sub { font-family: var(--display); font-style: normal; font-size: clamp(1.3rem, 2vw, 1.8rem); color: #CBD0DA; margin: 0 auto 1.8rem; max-width: none; }
.st-slide.is-long { overflow-y: auto; overscroll-behavior: contain; }
.st-sec { width: 100%; max-width: 64ch; margin: auto 0; text-align: left; font-size: clamp(18px, 1.15vw, 21px); line-height: 1.6; color: #E6E4DF; }
.st-sec h3 { font-family: var(--display); font-weight: 600; font-size: clamp(1.8rem, 2.6vw, 2.4rem); line-height: 1.15; margin: 0.6rem 0 1rem; }
.st-sec p { margin: 0.9rem 0 0; max-width: none; }
.st-sec ul { list-style: none; margin: 1.1rem 0 0; padding: 0; display: grid; gap: 1rem; }
.st-sec li { position: relative; padding-left: 1.5rem; }
.st-sec li::before { content: ""; position: absolute; left: 0; top: 0.68em; width: 7px; height: 7px; border-radius: 50%; background: #A33848; }
.st-sec li b { font-weight: 600; }
.st-screen { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 0.9rem; max-width: 100%; max-height: 100%; }
.st-screen img { display: block; width: auto; max-width: 100%; height: auto; max-height: calc(100vh - 260px); object-fit: contain; border: 1px solid rgba(214,179,106,0.35); box-shadow: 0 30px 60px -30px rgba(0,0,0,0.5); mix-blend-mode: normal; -webkit-mask-image: none; mask-image: none; }
.st-screen figcaption { font-size: 15px; color: #CBD0DA; }
@media (max-width: 900px) {
  .st-sec { font-size: 16px; padding-bottom: 1rem; }
  .st-slide.is-long { align-items: flex-start; }
}

/* рамки устройств для коротких историй (были в final-fly.css) */
.mk-laptop .mk-screen { padding: 3.2% 3.2% 4%; background: #16181D; border-radius: 12px 12px 4px 4px; box-shadow: 0 24px 50px -20px rgba(0,0,0,.6); }
.mk-laptop .mk-screen img { aspect-ratio: 16 / 10; object-fit: cover; object-position: 50% 0; border-radius: 2px; }
.mk-laptop::after { content: ''; display: block; height: 10px; margin: 0 -7%; background: linear-gradient(#5A6170, #3A404C); border-radius: 0 0 14px 14px; }
.mk-phone { padding: 5px; background: #111317; border-radius: 22px; border: 1px solid rgba(214,179,106,.25); }
.mk-phone img { aspect-ratio: 9 / 19; object-fit: cover; object-position: 50% 0; border-radius: 17px; }
.st-view .mk-laptop img, .st-view .mk-phone img { display: block; width: 100%; height: auto; }

/* кнопки внутри просмотра в виде кнопок сайта */
.st-view .btn-main { background: var(--cta); color: var(--cta-text); border: 0; }
.st-view .btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--gold); }
.st-view .btn { display: inline-flex; align-items: center; justify-content: center; padding: 0 22px; font-family: var(--body); font-size: 17px; text-decoration: none; cursor: pointer; }
.st-view .st-img { box-shadow: 0 30px 60px -30px rgba(0,0,0,.7); }
.st-shots img { border-color: #1A2434; }

/* 25.10.2026, просьба Софьи: история идёт одной лентой, как на Behance. Сцена прокручивается колесом,
   кадры стоят друг под другом, кадры ленты кейса встык, короткие кадры (обложка, текст, отзыв) с воздухом.
   Стрелки не нужны: перейти к главе можно по оглавлению слева. */
.st-stage { overflow-y: auto; overscroll-behavior: contain; padding: clamp(1.2rem, 3vw, 2.4rem) 0 clamp(3rem, 8vw, 6rem); }
.st-arrow { display: none; }
.st-slide { position: static; inset: auto; padding: clamp(3rem, 7vw, 6rem) clamp(16px, 4vw, 4rem); }
.st-slide.is-strip { padding: 0 clamp(16px, 4vw, 4rem); }
.st-slide.is-long { overflow: visible; }
.st-img { width: 100%; max-width: 1400px; max-height: none; }
.st-view .st-img { box-shadow: none; }
.st-screen img { max-height: none; }
.st-bar i { transition: none; }
@media (max-width: 900px) {
  .st-stage { padding: 0 0 4rem; }
  .st-slide { padding: 2.4rem 16px; }
  .st-slide.is-strip { padding: 0; }
}
