/* ==========================================================================
   Velveflix child — assets/css/vf-title.css
   Спринт B1 (2026-06-12): компактный hero страницы тайтла по прототипу
   (_vf-preview/title.html + vf-preview.css §.vf-title/.vf-facts/.vf-cast/.vf-block).
   Изоляция: всё под .vf-scope. Только токены vf-tokens.css (0 хардкодов).
   Грузится условно на is_singular(movies/tvshows/episodes).

   Коллизия имён: легаси style.css определяет .vf-title как стиль H1 (Спринт A hero,
   font-size!important). Здесь .vf-title — ГРИД-КОНТЕЙНЕР (как в прототипе),
   а заголовок — .vf-title__h1. Спецификация .vf-scope .vf-title (0,0,2,0) бьёт
   style.css .vf-title (0,0,1,0); где у легаси !important — дублируем !important.
   ========================================================================== */

/* ---- Хлебные крошки тайтла (компактные, как в прототипе) ---- */
.vf-scope .vf-title-crumbs{
  font-size: var(--vf-fs-sm); color: var(--vf-text-muted);
  margin: var(--vf-space-5) 0 var(--vf-space-2);
}
.vf-scope .vf-title-crumbs a{ color: var(--vf-text-muted); text-decoration: none; }
.vf-scope .vf-title-crumbs a:hover{ color: var(--vf-accent); }
.vf-scope .vf-title-crumbs .sep{ opacity:.6; margin: 0 4px; }

/* ---- HERO: двухколоночная сетка (постер слева / инфо+WtW справа) ---- */
.vf-scope .vf-title{
  display: grid !important;
  grid-template-columns: 1fr;
  gap: var(--vf-space-6);
  margin: var(--vf-space-6) 0 0 !important;
  align-items: start;
}
@media (min-width:900px){
  .vf-scope .vf-title{ grid-template-columns: 300px 1fr; }
}

.vf-scope .vf-title__poster{
  position: relative;
  border-radius: var(--vf-radius-lg);
  overflow: hidden;
  aspect-ratio: 2/3;
  background: var(--vf-skeleton);
  box-shadow: var(--vf-shadow-2);
  align-self: start;
}
.vf-scope .vf-title__poster img{
  width:100%; height:100%; object-fit:cover; display:block;
}
.vf-scope .vf-title__poster .vf-hd-badge,
.vf-scope .vf-title__poster .vf-rating-badge{ z-index:2; }

.vf-scope .vf-title__h1{
  font-size: var(--vf-fs-display) !important;
  font-weight: var(--vf-fw-extrabold) !important;
  line-height: var(--vf-lh-tight) !important;
  letter-spacing: var(--vf-ls-tight);
  color: var(--vf-text) !important;
  margin: 0 !important;
}
.vf-scope .vf-title__tagline{
  font-style: italic; color: var(--vf-text-muted);
  font-size: var(--vf-fs-sm); margin: var(--vf-space-2) 0 0;
}

.vf-scope .vf-title__metarow{
  display:flex; flex-wrap:wrap; align-items:center;
  gap: var(--vf-space-3);
  margin: var(--vf-space-3) 0;
  color: var(--vf-text-2); font-size: var(--vf-fs-sm);
}
.vf-scope .vf-title__metarow .vf-badge{
  display:inline-flex; align-items:center; gap:4px;
  padding:3px 9px; border-radius: var(--vf-radius-pill);
  font-weight: var(--vf-fw-semibold); font-size: var(--vf-fs-xs);
}
.vf-scope .vf-title__metarow .vf-badge--rating{
  color: var(--vf-rating); background: var(--vf-rating-bg);
}
.vf-scope .vf-title__metarow .vf-badge--imdb{
  color:#f5c518; background: rgba(245,197,24,.10);
}

.vf-scope .vf-title__genres{
  display:flex; flex-wrap:wrap; gap: var(--vf-space-2);
  margin-bottom: var(--vf-space-4);
}
.vf-scope .vf-title__genres a,
.vf-scope .vf-genre-pill{
  padding:4px 12px; border-radius: var(--vf-radius-pill);
  background: var(--vf-surface-2); border:1px solid var(--vf-line);
  font-size: var(--vf-fs-xs); color: var(--vf-text-2);
  text-decoration:none; transition: border-color var(--vf-dur-fast,.18s) var(--vf-ease-standard,ease), color var(--vf-dur-fast,.18s) var(--vf-ease-standard,ease);
}
.vf-scope .vf-title__genres a:hover,
.vf-scope .vf-genre-pill:hover{ border-color: var(--vf-line-strong); color: var(--vf-text); }

.vf-scope .vf-title__overview{
  color: var(--vf-text-2); line-height: var(--vf-lh-normal);
  margin-bottom: var(--vf-space-5); max-width: 64ch;
}

.vf-scope .vf-title__actions{
  display:flex; gap: var(--vf-space-3); flex-wrap:wrap;
  align-items:center; margin-bottom: var(--vf-space-6);
}

/* Кнопки hero — на токенах (как .vf-btn прототипа). Не зависят от легаси .vf-btn-watch. */
.vf-scope .vf-title__actions .vf-btn,
.vf-scope a.vf-btn,
.vf-scope button.vf-btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  min-height:44px; padding:0 18px; border-radius: var(--vf-radius-md);
  font-weight: var(--vf-fw-semibold); font-size: var(--vf-fs-sm);
  border:1px solid transparent; cursor:pointer; text-decoration:none;
  line-height:1; transition: background var(--vf-dur-fast,.18s) var(--vf-ease-standard,ease), border-color var(--vf-dur-fast,.18s) var(--vf-ease-standard,ease);
}
.vf-scope .vf-btn--accent{ background: var(--vf-accent); color:var(--vf-text-on-accent,#1A0E0C); }
.vf-scope .vf-btn--accent:hover{ background: var(--vf-accent-hover); }
.vf-scope .vf-btn--accent:active{ transform: translateY(1px); }
.vf-scope .vf-btn--ghost{ background: var(--vf-surface-2); color: var(--vf-text); border-color: var(--vf-line); }
.vf-scope .vf-btn--ghost:hover{ border-color: var(--vf-line-strong); background: var(--vf-surface-3); }
.vf-scope .vf-btn--ghost.is-on{ color: var(--vf-accent); }
.vf-scope .vf-btn:focus-visible{ outline:2px solid var(--vf-focus-ring,var(--vf-accent-ring)); outline-offset:2px; }

/* WtW поднят в правую колонку первого экрана — отступ сверху от actions */
.vf-scope .vf-title .vf-wtw{ margin-top: 0; }

/* ---- Блоки-секции (Details / Top cast) ---- */
.vf-scope .vf-block{ margin: var(--vf-space-8) 0; }
.vf-scope .vf-block > h2{
  font-size: var(--vf-fs-h3); font-weight: var(--vf-fw-bold);
  letter-spacing: var(--vf-ls-tight);
  margin: 0 0 var(--vf-space-4); color: var(--vf-text);
}

/* ---- Details (факты) ---- */
.vf-scope .vf-facts{
  display:grid; grid-template-columns: repeat(auto-fit,minmax(140px,1fr));
  gap: var(--vf-space-4);
}
.vf-scope .vf-fact{ color: var(--vf-text); font-size: var(--vf-fs-sm); min-width:0; }
.vf-scope .vf-fact b{
  display:block; color: var(--vf-text-muted); font-size: var(--vf-fs-xs);
  text-transform: uppercase; letter-spacing: var(--vf-ls-caps);
  margin-bottom: 2px; font-weight: var(--vf-fw-semibold);
}
.vf-scope .vf-fact a{ color: var(--vf-text-2); text-decoration:none; }
.vf-scope .vf-fact a:hover{ color: var(--vf-accent); }

/* ---- Top cast ---- */
.vf-scope .vf-cast{
  display:grid; grid-template-columns: repeat(auto-fill,minmax(96px,1fr));
  gap: var(--vf-space-4);
}
@media (min-width:600px){
  .vf-scope .vf-cast{ grid-template-columns: repeat(auto-fill,minmax(110px,1fr)); }
}
.vf-scope .vf-cast__p{ text-align:center; min-width:0; }
.vf-scope .vf-cast__p a{ text-decoration:none; color:inherit; display:block; }
.vf-scope .vf-cast__av{
  width:72px; height:72px; border-radius: var(--vf-radius-round);
  background: var(--vf-surface-3); margin:0 auto var(--vf-space-2);
  display:grid; place-items:center; overflow:hidden;
  font-weight: var(--vf-fw-bold); color: var(--vf-text-2); font-size:1.1rem;
}
.vf-scope .vf-cast__av img{ width:100%; height:100%; object-fit:cover; display:block; }
.vf-scope .vf-cast__n{
  font-size: var(--vf-fs-sm); font-weight: var(--vf-fw-semibold);
  color: var(--vf-text); line-height: var(--vf-lh-snug);
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.vf-scope .vf-cast__p a:hover .vf-cast__n{ color: var(--vf-accent); }
.vf-scope .vf-cast__r{
  font-size: var(--vf-fs-xs); color: var(--vf-text-muted);
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
