/* ORTHODOX HOUSE — «живой» слой интерфейса (17.11.2026).
 * Его слово: «хороший, красивый новостной портал, но давай добавим динамики… чтобы лучше воспринимался людьми, чтобы нравился».
 * Выбрано им: главная новость сверху + живые карточки; заметно, но спокойно; весь портал сразу.
 * Файл подключается ПОСЛЕДНИМ (после grok.css и modern.css) и ничего в них не меняет. Вся анимация выключается
 * у тех, кто просил систему «уменьшить движение» (prefers-reduced-motion). Классы .rv/.ld ставит oh-live.js —
 * без скрипта страница выглядит как прежде. */

/* ---------- 1. главная новость сверху ---------- */
.ohero{position:relative;margin:2px 0 18px;border-radius:18px;overflow:hidden;height:clamp(300px,42vw,500px);background:#1c1114;
  box-shadow:0 22px 48px -26px rgba(23,19,16,.6);isolation:isolate}
.ohero .sl{position:absolute;inset:0;display:block;opacity:0;visibility:hidden;transition:opacity .9s ease,visibility 0s linear .9s;color:#fff;text-decoration:none}
.ohero .sl.on{opacity:1;visibility:visible;transition:opacity .9s ease;z-index:1}
.ohero .sl img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:center 28%}
.ohero .sl::after{content:"";position:absolute;inset:0;background:linear-gradient(to top,rgba(18,10,12,.9) 0%,rgba(18,10,12,.58) 32%,rgba(18,10,12,.12) 62%,rgba(18,10,12,0) 80%)}
.ohero .cap{position:absolute;inset-inline:0;bottom:0;z-index:2;max-width:880px;padding:clamp(18px,3vw,34px);padding-bottom:clamp(34px,4.2vw,46px)}
.ohero .kick{display:inline-block;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;vertical-align:top;color:#f0d68a;font-size:11px;font-weight:800;letter-spacing:.11em;text-transform:uppercase;
  padding:4px 10px;border-radius:999px;background:rgba(18,10,12,.45);backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px)}
.ohero h2{margin:10px 0 8px;font-size:clamp(21px,3.2vw,40px);line-height:1.13;font-weight:800;letter-spacing:-.015em;color:#fff;text-wrap:balance;
  text-shadow:0 2px 18px rgba(0,0,0,.35);display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden}
.ohero p{margin:0 0 8px;max-width:68ch;font-size:15.5px;line-height:1.5;color:rgba(255,255,255,.86);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.ohero .meta{font-size:12.5px;color:rgba(255,255,255,.72)}
.ohero .sl:hover h2{text-decoration:underline;text-decoration-thickness:2px;text-underline-offset:5px;text-decoration-color:rgba(240,214,138,.8)}
.ohero .dots{position:absolute;z-index:3;inset-inline-start:clamp(18px,3vw,34px);bottom:16px;display:flex;gap:7px}
.ohero .dots button{width:30px;height:4px;padding:0;border:0;border-radius:4px;background:rgba(255,255,255,.34);cursor:pointer;overflow:hidden;position:relative}
.ohero .dots button::before{content:"";position:absolute;inset:-10px 0}
.ohero .dots button i{position:absolute;inset:0;background:#f0d68a;transform:scaleX(0);transform-origin:left center;display:block}
[dir=rtl] .ohero .dots button i{transform-origin:right center}
.ohero .dots button.on i{transform:scaleX(1)}
.ohero .nav{position:absolute;top:50%;z-index:3;width:44px;height:44px;border:0;border-radius:50%;background:rgba(18,10,12,.42);color:#fff;font-size:24px;line-height:1;
  cursor:pointer;opacity:0;transform:translateY(-50%);transition:opacity .25s ease,background .2s ease;backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px)}
.ohero:hover .nav,.ohero:focus-within .nav{opacity:1}
.ohero .nav:hover{background:rgba(18,10,12,.7)}
.ohero .prev{inset-inline-start:14px}.ohero .next{inset-inline-end:14px}
[dir=rtl] .ohero .nav{transform:translateY(-50%) scaleX(-1)}
@media(max-width:720px){
  .ohero{height:clamp(250px,74vw,400px);border-radius:14px}
  .ohero p,.ohero .nav{display:none}
  .ohero h2{-webkit-line-clamp:5}
}
@media(prefers-reduced-motion:no-preference){
  .ohero.play .sl.on img{animation:ohkb 9s ease-out both}
  .ohero.play .dots button.on i{animation:ohbar var(--ohd,7s) linear both}
  .ohero.hold .dots button.on i,.ohero.hold .sl.on img{animation-play-state:paused}
  .ohero .sl.on .cap>*{animation:ohup .7s cubic-bezier(.2,.7,.2,1) both}
  .ohero .sl.on .cap>*:nth-child(2){animation-delay:.08s}
  .ohero .sl.on .cap>*:nth-child(3){animation-delay:.16s}
  .ohero .sl.on .cap>*:nth-child(4){animation-delay:.22s}
}
@keyframes ohkb{from{transform:scale(1)}to{transform:scale(1.06)}}
@keyframes ohbar{from{transform:scaleX(0)}to{transform:scaleX(1)}}
@keyframes ohup{from{opacity:0;transform:translateY(14px)}to{opacity:1;transform:none}}

/* ---------- 2. живые карточки новостей ---------- */
a.acard{padding:0;border-radius:14px;overflow:hidden}
a.acard .im{aspect-ratio:16/10;border-radius:0;flex:none}
a.acard .b{padding:14px 16px 8px}
a.acard .nact{padding:0 14px 12px;margin-top:4px;gap:6px}
a.acard .nact .ni{border-color:transparent;background:transparent;padding:4px 9px;min-width:38px;opacity:.6;transition:opacity .2s ease,transform .12s ease,border-color .2s ease}
a.acard:hover .nact .ni,a.acard:focus-within .nact .ni,a.acard .nact .ni.on{opacity:1}
a.acard .nact .ni:hover{border-color:var(--gold)}
@media(hover:none){a.acard .nact .ni{opacity:.85}}
/* на телефоне действия свёрнуты в кнопку «⋯» — отступ от края карточки */
a.acard>button{margin:6px 14px 12px!important;align-self:flex-start;min-width:54px}
.acard .im,.lead .im,.hl .im,.sshare .im{overflow:hidden}
.acard .im img,.lead .im img,.hl .im img,.sshare .im img{transition:transform .8s cubic-bezier(.2,.7,.2,1),opacity .45s ease}
@media(hover:hover) and (prefers-reduced-motion:no-preference){
  a.acard:hover{transform:translateY(-4px)}
  .acard:hover .im img,.lead:hover .im img,.hl:hover .im img,.sshare:hover .im img{transform:scale(1.06)}
  .rcard,.jrow{transition:transform .2s ease,box-shadow .2s ease}
  .rcard:hover{transform:translateY(-3px)}
}
/* «2 часа назад»: подсказка с полной датой */
[data-ts][title]{cursor:default}

/* ---------- 3. появление при прокрутке, проявление снимков (классы ставит oh-live.js) ---------- */
@media(prefers-reduced-motion:no-preference){
  html.ohl .rv{opacity:0;transform:translateY(18px)}
  html.ohl .rv.in{opacity:1;transform:none;transition:opacity .55s ease var(--rvd,0ms),transform .6s cubic-bezier(.2,.7,.2,1) var(--rvd,0ms)}
  html.ohl .im img:not(.ld){opacity:0}
  html.ohl main{animation:ohpage .35s ease both}
}
@keyframes ohpage{from{opacity:0}to{opacity:1}}

/* ---------- 4. бегущая строка «Последнее» ---------- */
.tick .tkm{flex:1;min-width:0;overflow:hidden;-webkit-mask-image:linear-gradient(to right,transparent,#000 24px,#000 calc(100% - 40px),transparent);mask-image:linear-gradient(to right,transparent,#000 24px,#000 calc(100% - 40px),transparent)}
.tick .tkt{display:inline-flex;gap:0;align-items:center;white-space:nowrap;will-change:transform}
.tick .tkt>*{margin-inline-end:12px}
@media(prefers-reduced-motion:no-preference){
  .tick .tkt.run{animation:ohtick var(--tkd,60s) linear infinite}
  .tick:hover .tkt.run,.tick:focus-within .tkt.run{animation-play-state:paused}
  [dir=rtl] .tick .tkt.run{animation-name:ohtickr}
}
@keyframes ohtick{from{transform:translateX(0)}to{transform:translateX(-50%)}}
@keyframes ohtickr{from{transform:translateX(0)}to{transform:translateX(50%)}}
