/* «Кино и наука» — стили раздела. Опирается на переменные и компоненты site.css. */

/* ── Первый экран и лента постеров ── */
.chero { min-height: 86svh; }
.cread b { font-weight: 500; }
.hero__meta .cread { text-align: right; }

.reel { overflow: hidden; border-top: 1px solid var(--c-line); padding: 18px 0; }
.reel__track { display: flex; gap: 14px; width: max-content; animation: marquee 70s linear infinite; padding-left: 14px; }
.reel__i { position: relative; display: block; width: clamp(120px, 13vw, 210px); aspect-ratio: 2 / 3; border-radius: 10px; overflow: hidden; background: var(--c-soft); flex: none; color: var(--paper); text-decoration: none; }
.reel__t { position: absolute; inset: auto 0 0 0; padding: 40px 12px 12px; display: flex; flex-direction: column; gap: 6px; background: linear-gradient(to top, rgba(14,14,13,.92), rgba(14,14,13,0)); opacity: 0; transform: translateY(8px); transition: opacity .3s, transform .4s var(--ease); }
.reel__t b { font: 900 clamp(22px, 2vw, 30px)/.92 var(--display); text-transform: uppercase; color: var(--accent); }
.reel__t i { font: 400 10px/1.3 var(--mono); text-transform: uppercase; letter-spacing: .06em; font-style: normal; opacity: .8; }
.reel__i:hover .reel__t, .reel__i:focus-visible .reel__t { opacity: 1; transform: none; }
.reel__i img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.05); transition: filter .5s; }
.reel:hover .reel__track { animation-play-state: paused; }
.reel__i:hover img { filter: none; }

/* ── Шкала точности ── */
.meter { display: inline-flex; gap: 3px; vertical-align: -1px; margin-right: 10px; }
.meter i { width: 14px; height: 8px; border-radius: 2px; box-shadow: inset 0 0 0 1px currentColor; opacity: .55; }
.meter[data-n="1"] i:nth-child(-n+1), .meter[data-n="2"] i:nth-child(-n+2), .meter[data-n="3"] i { background: currentColor; opacity: 1; }
.accstats .stat { text-decoration: none; transition: background-color .35s var(--ease), color .35s var(--ease), padding .35s var(--ease); }
.accstats .stat:hover { background: var(--c-pop); color: var(--c-pop-fg); padding-left: 20px; }
.accstats .stat span { display: flex; align-items: center; }

/* ── Фильтры каталога ── */
.cfilters { display: grid; gap: 12px; margin-bottom: clamp(28px, 4vw, 48px); }
.csearch { display: flex; align-items: baseline; gap: 18px; border-bottom: 1px solid var(--c-fg); padding-bottom: 10px; margin-bottom: 10px; }
.csearch span { opacity: .55; flex: none; }
.csearch input { flex: 1; min-width: 0; font: 500 clamp(22px, 2.6vw, 38px)/1.2 var(--sans); letter-spacing: -.025em; color: inherit; background: none; border: 0; outline: 0; padding: 0; }
.csearch input::placeholder { color: var(--c-muted); opacity: .6; }
.chip { font: inherit; font-size: 15px; color: inherit; background: none; cursor: pointer; }

/* ── Карточка фильма ── */
.fgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); border-top: 1px solid var(--c-line); }
.fc { position: relative; display: flex; flex-direction: column; justify-content: space-between; aspect-ratio: 3 / 4.1; padding: 18px; overflow: hidden;
  text-decoration: none; color: var(--paper); background: var(--ink); border-right: 1px solid rgba(237,236,231,.14); border-bottom: 1px solid rgba(237,236,231,.14); isolation: isolate; }
.fc[hidden] { display: none; }
.fc__poster { position: absolute; inset: 0; z-index: -1; }
.fc__poster img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) brightness(.5) contrast(1.1); transform: scale(1.02); transition: filter .6s var(--ease), transform 1.1s var(--ease); }
.fc__poster .art { width: 60%; margin: 22% auto 0; opacity: .5; }
.fc__poster::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(14,14,13,.94) 0%, rgba(14,14,13,.5) 46%, rgba(14,14,13,.1) 100%); transition: opacity .5s; }
.fc__top { display: flex; justify-content: space-between; gap: 10px; }
.fc__read { display: none; color: var(--accent); margin-right: auto; }
.fc.is-read .fc__read { display: inline; }
.fc__body { display: flex; flex-direction: column; }
.fc b { font: 900 clamp(34px, 3.3vw, 52px)/.9 var(--display); text-transform: uppercase; letter-spacing: -.005em; text-wrap: balance; }
.fc__year { margin-top: 10px; opacity: .7; }
.fc__more { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .5s var(--ease); }
.fc__more > span { overflow: hidden; min-height: 0; display: flex; flex-direction: column; opacity: 0; transition: opacity .4s; }
.fc__desc { font-size: 15.5px; line-height: 1.4; padding-top: 14px; }
.fc__acc { padding-top: 14px; color: var(--accent); display: flex; align-items: center; }
@media (hover: hover) {
  .fc:hover .fc__poster img, .fc:focus-visible .fc__poster img { filter: grayscale(0) brightness(.62); transform: scale(1.08); }
  .fc:hover .fc__more, .fc:focus-visible .fc__more { grid-template-rows: 1fr; }
  .fc:hover .fc__more > span, .fc:focus-visible .fc__more > span { opacity: 1; }
  .fc:hover b { color: var(--accent); }
}
.fgrid--row { grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr)); }

/* ── Указатель концепций ── */
.cindex { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0 clamp(20px, 3vw, 48px); }
.cindex h3 { padding: 0 0 14px; opacity: .55; font-weight: 400; }
.cx { display: flex; flex-direction: column; gap: 2px; padding: 12px 0; border-top: 1px solid var(--c-line); text-decoration: none; transition: padding .3s var(--ease), color .3s; }
.cx span { font-size: 18px; font-weight: 500; letter-spacing: -.012em; line-height: 1.2; }
.cx i { font: 400 11px/1.4 var(--mono); text-transform: uppercase; letter-spacing: .05em; font-style: normal; opacity: .55; }
.cx:hover { padding-left: 12px; }
.cx:hover i { opacity: 1; }

/* Постер, который следует за курсором в указателе */
.peek { position: fixed; left: 0; top: 0; z-index: 80; width: 190px; aspect-ratio: 2 / 3; border-radius: 10px; overflow: hidden; pointer-events: none;
  opacity: 0; transition: opacity .25s; box-shadow: 0 24px 60px rgba(0,0,0,.35); background: var(--ink); will-change: transform; }
.peek.on { opacity: 1; }
.peek img { width: 100%; height: 100%; object-fit: cover; }

/* ── Страница фильма ── */
.fhero { padding-top: clamp(110px, 12vw, 170px); padding-bottom: clamp(48px, 7vw, 110px); }
.fhero__grid { display: grid; grid-template-columns: minmax(0, 1fr) clamp(220px, 27vw, 420px); gap: clamp(28px, 6vw, 100px); align-items: end; }
.fhero__title { font-size: clamp(56px, 10.5vw, 200px); line-height: .84; max-width: none; margin-bottom: clamp(22px, 3vw, 40px); overflow-wrap: anywhere; }
.fhero__poster { border-radius: 16px; overflow: hidden; aspect-ratio: 2 / 3; background: var(--c-soft); transform: rotate(2deg); transition: transform .7s var(--ease); }
.fhero__poster:hover { transform: none; }
.fhero__poster img { width: 100%; height: 100%; object-fit: cover; }
.ftags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.ftags li { border: 1px solid var(--c-line); border-radius: 999px; padding: 7px 15px; font-size: 15px; }
.facc { margin-top: 24px; color: var(--c-pop); display: flex; align-items: center; }

.fquote { max-width: 26ch; }
.fsec { display: grid; grid-template-columns: minmax(180px, .34fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 80px); align-items: start; }
.fsec__side { position: sticky; top: 96px; }
.fsec__side .note { max-width: 30ch; line-height: 1.6; }
.fsec__main h2 { font: 500 clamp(30px, 4vw, 60px)/1.04 var(--sans); letter-spacing: -.035em; max-width: 20ch; text-wrap: balance; margin-bottom: clamp(22px, 3vw, 40px); }
.ftext { max-width: 62ch; font-size: clamp(18px, 1.45vw, 21px); line-height: 1.55; }
.ftext p + p { margin-top: 1em; }
.fverdict { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 22px; margin-bottom: clamp(22px, 3vw, 40px); color: var(--c-pop); transition: color .7s var(--ease); }
.fverdict span:last-child { font: 900 clamp(44px, 6.5vw, 110px)/.88 var(--display); text-transform: uppercase; }
.fverdict .meter { margin: 0; gap: 6px; }
.fverdict .meter i { width: clamp(26px, 3vw, 46px); height: clamp(14px, 1.5vw, 22px); border-radius: 4px; }
.tech { max-width: 70ch; margin-top: clamp(24px, 3vw, 40px); }
.tech b { font-size: clamp(19px, 1.6vw, 23px); }
.tech span { font-size: clamp(16.5px, 1.25vw, 18.5px); line-height: 1.5; margin-top: 6px; }
.fnav { border-top: 0; padding-top: 0; }

/* ── Узкие экраны: карточка становится строкой с постером ── */
@media (max-width: 700px) {
  .fgrid, .fgrid--row { grid-template-columns: 1fr; }
  .fc { aspect-ratio: auto; display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 0 16px; padding: 16px var(--gut); color: var(--c-fg); background: none; border-right: 0; border-bottom: 1px solid var(--c-line); }
  .fc__poster { position: relative; inset: auto; z-index: 0; grid-row: 1 / 3; aspect-ratio: 2 / 3; border-radius: 8px; overflow: hidden; background: var(--c-soft); }
  .fc__poster::after { display: none; }
  .fc__poster img { filter: none; transform: none; }
  .fc__top { grid-column: 2; opacity: .6; margin-bottom: 8px; }
  .fc__body { grid-column: 2; }
  .fc b { font-size: 34px; }
  .fc__more { grid-template-rows: 1fr; }
  .fc__more > span { opacity: 1; }
  .fc__desc { font-size: 15.5px; padding-top: 10px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; color: var(--c-muted); }
  .fc__acc { color: inherit; padding-top: 10px; }
  .fhero__grid { grid-template-columns: 1fr; }
  .fhero__poster { width: min(62%, 260px); order: -1; }
  .fsec { grid-template-columns: 1fr; }
  .fsec__side { position: static; display: contents; }
  .fsec__side .eyebrow { order: 0; margin-bottom: 0; }
  .fsec__main { order: 1; }
  .fsec__side .note { order: 2; max-width: none; padding-top: 18px; border-top: 1px solid var(--c-line); }
  .reel__t { opacity: 1; transform: none; }
  .hero__meta .cread { text-align: left; }
  .csearch { flex-direction: column; gap: 6px; }
}
@media (prefers-reduced-motion: reduce) { .reel__track { animation: none; } }
