/* ============================================================
   BOSFOR — catalogue (the archive)
   ============================================================ */

.cat-hero { padding: calc(var(--nav-h) + clamp(40px, 7vh, 90px)) var(--pad) clamp(24px, 4vh, 50px); overflow: hidden; }
.cat-word {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(74px, 20.5vw, 380px); line-height: 0.8;
  letter-spacing: -0.02em; white-space: nowrap;
}

/* ---- filter bar (sticky) ---- */
.filters {
  position: sticky; top: 0; z-index: 200;
  display: flex; align-items: stretch; gap: 0; flex-wrap: wrap;
  padding: 0 var(--pad);
  background: rgba(0,0,0,0.72); backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.filter {
  display: flex; align-items: center; gap: 12px;
  padding: 20px 0; margin-right: clamp(20px, 3vw, 48px);
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-40); position: relative; transition: color .4s var(--ease);
}
.filter:hover { color: var(--ink-90); }
.filter.is-active { color: #fff; }
.filter__count { font-size: 10px; color: var(--ink-25); transition: color .4s; }
.filter.is-active .filter__count { color: var(--ink-60); }
.filter::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: #fff; transform: scaleX(0); transform-origin: left; transition: transform .5s var(--ease); }
.filter.is-active::after { transform: scaleX(1); }

/* ---- archive list ---- */
.archive { padding: clamp(20px,3vw,40px) var(--pad) clamp(80px,12vh,160px); }
.arow {
  display: grid; grid-template-columns: 56px 132px 1fr auto; align-items: center; gap: clamp(18px,2.5vw,40px);
  padding: clamp(16px,2vw,26px) 0; border-bottom: 1px solid var(--line);
  position: relative; cursor: pointer;
  transition: padding-left .55s var(--ease), background .5s var(--ease);
}
.arow:hover { padding-left: 14px; }
.arow__num { font-family: var(--mono); font-size: 12px; color: var(--ink-40); transition: color .4s; }
.arow:hover .arow__num { color: #fff; }
.arow__thumb { width: 132px; aspect-ratio: 3 / 2; border-radius: 3px; overflow: hidden; position: relative; }
.arow__thumb .art { position: absolute; inset: 0; transition: transform .7s var(--ease); }
.arow:hover .arow__thumb .art { transform: scale(1.08); }
.arow__main { display: flex; flex-direction: column; gap: 27px; min-width: 0; }
.arow__title { font-family: var(--serif); font-weight: 500; font-size: clamp(26px, 3.6vw, 50px); line-height: 0.98; letter-spacing: -0.01em; transition: transform .5s var(--ease); }
.arow:hover .arow__title { transform: translateX(8px); }
.arow__sub { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-40); display: flex; gap: 14px; flex-wrap: wrap; }
.arow__sub b { color: var(--ink-60); font-weight: 400; }
/* формат дублирует жанр — прячем дубль только на десктопе (на мобиле жанр скрыт, формат = категория) */
@media (min-width: 721px) { .arow__fmt.is-dupe { display: none; } }
.arow__right { display: flex; align-items: center; gap: clamp(20px,2.4vw,40px); }
.arow__year { font-family: var(--mono); font-size: 13px; color: var(--ink-60); }
.arow__status { min-width: 130px; text-align: right; }
.arow__status .status::before { animation: none; }
.arow__go { font-family: var(--mono); font-size: 16px; opacity: 0; transform: translateX(-6px); transition: opacity .4s, transform .5s var(--ease); }
.arow:hover .arow__go { opacity: 1; transform: none; }

/* filtered out */
.arow.is-hidden { display: none; }

/* ============================================================
   CATALOGUE ASSEMBLY — featured block, dual filters,
   two hover modes (floating poster / full-bleed backdrop)
   ============================================================ */

/* keep page content above the fixed backdrop layer */
.cat-hero, .cfeat-wrap, .archive-wrap, .footx { position: relative; z-index: 1; }
.cat-hero, .cfeat-wrap { transition: opacity .55s var(--ease); }

/* ---- section heads ---- */
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; padding: 0 var(--pad); margin-bottom: clamp(22px,3vw,40px); }
.sec-head__rule { flex: 1; height: 1px; background: var(--line); margin-left: 18px; }
.sec-head__count { font-family: var(--mono); font-size: 11px; letter-spacing: 0.2em; color: var(--ink-40); }

/* ---- filter bar: format/status groups + hover toggle ---- */
.filter-div { width: 1px; align-self: center; height: 16px; background: var(--line); margin-right: clamp(20px,3vw,48px); }
/* статус — всегда выпадающий список справа в панели фильтров */
.filters__fsel { margin-left: auto; align-self: center; }
.filters__toggle { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.filters__toggle-lbl { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-25); margin-right: 10px; }
.filters__toggle button { font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-40); padding: 7px 12px; border: 1px solid var(--line); border-radius: 100px; transition: color .35s, background .35s, border-color .35s; }
.filters__toggle button:hover { color: var(--ink-90); }
.filters__toggle button.is-active { color: #000; background: #fff; border-color: #fff; }

/* ---- award ribbon — белая закладка с вырезом-ласточкой, висит сверху баннера.
   Закрыта — только значок ❦; на hover карточки вытягивается и показывает «2 награды» вертикально */
.aribbon {
  position: absolute; top: 0; left: clamp(20px,2.4vw,36px); z-index: 4;
  width: clamp(22px,1.7vw,26px); max-height: 34px; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; gap: 9px;
  padding: 9px 0 14px; background: #fff; color: #0b0b0b;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% calc(100% - 8px), 0 100%);
  filter: drop-shadow(0 8px 14px rgba(0,0,0,.35));
  transition: max-height .9s cubic-bezier(0.16, 1, 0.3, 1);
}
.aribbon__ic { flex: none; font-size: 17px; line-height: 1; }
.aribbon__tx { font-family: var(--mono); font-size: 9px; letter-spacing: .14em; text-transform: uppercase; white-space: nowrap;
  writing-mode: vertical-rl; text-orientation: mixed; }
.cfeat__card:hover .aribbon, .aribbon:hover { max-height: 220px; }

/* мобильный выпадающий список форматов — на десктопе скрыт (показ в mobile.css). !important — чтобы перебить .fsel display:inline-flex */
.filters__flist { display: none !important; }

/* hover/focus-open дропдаун фильтров (статус + док) — список открывается по наведению */
.hsel { position: relative; display: inline-flex; align-items: center; cursor: pointer; outline: none; font-family: var(--mono); font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-60); }
.hsel__cur { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; transition: color .25s; }
.hsel__cur::after { content: "▾"; font-size: 0.9em; color: var(--ink-40); transition: transform .3s var(--ease), color .25s; }
.hsel:hover .hsel__cur, .hsel:focus-within .hsel__cur { color: #fff; }
.hsel:hover .hsel__cur::after, .hsel:focus-within .hsel__cur::after { transform: rotate(180deg); color: #fff; }
.hsel__list { position: absolute; top: calc(100% + 12px); right: 0; z-index: 300; min-width: 190px; margin: 0; padding: 6px 0; list-style: none;
  background: #0c0c0c; border: 1px solid var(--line); border-radius: 4px; box-shadow: 0 18px 46px rgba(0,0,0,.55);
  opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity .26s var(--ease), transform .26s var(--ease), visibility 0s linear .26s; }
.hsel:hover .hsel__list, .hsel:focus-within .hsel__list { opacity: 1; visibility: visible; transform: none; transition: opacity .26s var(--ease), transform .26s var(--ease); }
/* мостик, чтобы курсор не терял hover в зазоре между триггером и списком */
.hsel::after { content: ""; position: absolute; top: 100%; right: 0; width: 190px; height: 14px; }
.hsel__opt { padding: 10px 16px; white-space: nowrap; color: var(--ink-60); transition: color .2s, background .2s; }
.hsel__opt:hover { color: #fff; background: rgba(255,255,255,.06); }
.hsel__opt.is-sel { color: #fff; }

/* ---- featured block ---- */
.cfeat-wrap { padding: clamp(34px,5vh,72px) 0 0; }
.cfeat { display: grid; grid-template-columns: 1.5fr 1fr; gap: clamp(14px,1.6vw,28px); padding: 0 var(--pad); }
.cfeat.is-single { grid-template-columns: 1fr; }
.cfeat.is-single .cfeat__card { aspect-ratio: 21 / 9; }
.cfeat__card { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 4px; background: #0c0c0c; }
.cfeat__frame { position: absolute; inset: 0; }
.cfeat__frame .art { position: absolute; inset: 0; transform: scale(1.001); transition: transform 1s var(--ease); }
.cfeat__card:hover .cfeat__frame .art { transform: scale(1.06); }
.cfeat__veil { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0,0,0,.82) 0%, rgba(0,0,0,.22) 46%, rgba(0,0,0,0) 78%); }
.cfeat__body { position: absolute; left: 0; right: 0; bottom: 0; padding: clamp(20px,2.4vw,38px); display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
/* блок текста — верстка 1:1 с карточкой фильма (exhibit): фест-строка → заголовок → статус • жанр • формат • год */
.cfeat__festline { color: var(--ink-60); }
.cfeat__title { font-size: clamp(30px,4.4vw,66px); line-height: 0.96; letter-spacing: -0.01em; transition: transform .5s var(--ease); }
.cfeat__card:hover .cfeat__title { transform: translateX(6px); }
.cfeat__metaline { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; color: var(--ink-60); }
.cfeat__metaline .status { font-size: inherit; color: #fff; }
.cfeat__metaline .status[data-status="in-production"]::before { animation: none; }
.cfeat__dot { color: var(--ink-40); font-size: 1.35em; line-height: 0; font-weight: 700; opacity: 0.85; }
.cfeat__cta { display: inline-flex; align-items: center; gap: 9px; margin-top: 6px; color: var(--ink-60); opacity: 0; transform: translateY(8px); transition: opacity .45s var(--ease), transform .45s var(--ease), color .3s; }
.cfeat__cta span { transition: transform .5s var(--ease); }
.cfeat__card:hover .cfeat__cta { opacity: 1; transform: none; color: #fff; }
.cfeat__card:hover .cfeat__cta span { transform: translateX(5px); }

/* типографика баннеров: на большом (первом) — сверху, на маленьком (втором) — снизу
   с тем же отступом (паддинг .cfeat__body). Вейл у большого — тёмный кверху */
.cfeat:not(.is-single) .cfeat__card:first-child .cfeat__body { top: 0; bottom: auto; }
.cfeat:not(.is-single) .cfeat__card:first-child .cfeat__veil {
  background: linear-gradient(180deg, rgba(0,0,0,.82) 0%, rgba(0,0,0,.26) 48%, rgba(0,0,0,0) 82%);
}
/* маленький: мета стоит на том же отступе снизу, что и заголовок большого сверху.
   hover-CTA выведена из потока (absolute) — больше не резервирует место под текстом */
.cfeat:not(.is-single) .cfeat__card:nth-child(2) .cfeat__body { top: auto; bottom: clamp(20px,2.4vw,38px); padding-bottom: 0; }
.cfeat:not(.is-single) .cfeat__card:nth-child(2) .cfeat__cta { position: absolute; left: clamp(20px,2.4vw,38px); top: 100%; margin-top: 12px; }

/* ---- archive list: text-forward (no inline thumb) ---- */
.archive-wrap { padding: clamp(40px,6vh,84px) 0 clamp(80px,12vh,160px); }
.archive { padding: 0 var(--pad); }
.arow { grid-template-columns: 1fr auto; transition: padding-left .55s var(--ease), opacity .45s var(--ease); }
.arow__title { font-size: clamp(28px, 4vw, 58px); }

/* ---- full-bleed backdrop layer (bg hover mode) ---- */
.catbg { position: fixed; inset: 0; z-index: 0; background: #000; opacity: 0; pointer-events: none; transition: opacity .6s var(--ease); }
.cat-bg-on .catbg { opacity: 1; }
.catbg__img { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0; transform: scale(1.06); transition: opacity .7s var(--ease), transform 2s var(--ease); }
.catbg__img.on { opacity: 1; transform: scale(1); }
.catbg__scrim { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.5) 0%, rgba(0,0,0,.34) 40%, rgba(0,0,0,.7) 100%); }

/* recede everything but the hovered row while a backdrop is showing */
.cat-bg-on .cat-hero, .cat-bg-on .cfeat-wrap { opacity: 0.1; }
.archive.is-hovering .arow { opacity: 0.22; }
.archive.is-hovering .arow:hover { opacity: 1; }
.archive.is-hovering .arow:hover .arow__status .status { color: #fff; }
/* staggered re-entry when timeline live */
.anim-ready .arow.is-enter { animation: arowIn .7s var(--ease) both; }
@keyframes arowIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }

.archive__empty { padding: 80px 0; text-align: center; font-family: var(--serif); font-style: italic; font-size: 24px; color: var(--ink-40); display: none; }
.archive__empty.is-on { display: block; }

/* ---- compact filter dock (collapses into the nav line on scroll) ---- */
.filters { transition: opacity .4s var(--ease); }
.cat-compact .filters { opacity: 0; pointer-events: none; }

.catdock {
  position: fixed; top: 0; left: 0; right: 0; height: calc(var(--navx-h) + 38px); z-index: 810;
  display: flex; align-items: center; justify-content: center;
  padding: 0 calc(var(--pad) + 72px);
  opacity: 0; pointer-events: none; transform: translateY(-8px);
  background: rgba(0,0,0,0); border-bottom: 1px solid transparent;
  transition: opacity .45s var(--ease), transform .45s var(--ease), background .45s var(--ease), border-color .45s var(--ease);
}
.cat-compact .catdock {
  opacity: 1; pointer-events: auto; transform: none;
  background: rgba(0,0,0,0.8); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.catdock__inner { display: flex; align-items: center; gap: clamp(14px, 2.6vw, 36px); }
.fsel { display: inline-flex; align-items: center; gap: 10px; }
.fsel__lbl { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-40); }
.fsel select {
  appearance: none; -webkit-appearance: none;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
  color: #fff; background-color: transparent; border: 1px solid var(--line); border-radius: 100px;
  padding: 9px 32px 9px 15px; cursor: pointer; outline: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6' fill='none'><path d='M1 1l4 4 4-4' stroke='white' stroke-opacity='0.6' stroke-width='1.3'/></svg>");
  background-repeat: no-repeat; background-position: right 13px center;
  transition: border-color .3s;
}
.fsel select:hover { border-color: var(--ink-60); }
.fsel select option { background: #0b0b0b; color: #fff; text-transform: none; }

@media (max-width: 640px) {
  .fsel__lbl { display: none; }
  .catdock { padding: 0 calc(var(--pad) + 52px); }
  .catdock__inner { gap: 10px; }
  .fsel select { padding: 8px 28px 8px 12px; font-size: 10px; }
}

@media (max-width: 760px) {
  .arow { grid-template-columns: 1fr; gap: 16px; }
  .arow__thumb { display: none; }
  .arow__right { display: none; }
}
