.header {
  background: var(--bg);
  border-bottom: 0;
}

.header__top {
  display: grid;
  grid-template-columns: auto minmax(220px, 1fr) auto;
  align-items: center;
  gap: 28px;
  min-height: 78px;
}

.logo__name {
  display: flex;
  flex-direction: column;
  font-family: "Manrope", var(--font);
  font-weight: 800;
  font-size: 22px;
  line-height: 0.9;
  letter-spacing: -0.04em;
}

.logo__name em {
  font-style: normal;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--green);
}

.logo__mark {
  width: 28px;
  height: 28px;
  border: 2px solid var(--green);
  border-radius: 2px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  padding: 3px;
}

.logo__mark i {
  display: block;
  background: var(--green);
}

.logo__mark i:nth-child(2),
.logo__mark i:nth-child(3) {
  background: transparent;
  border: 1.5px solid var(--green);
}

.rail {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.rail__track {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}

.rail__track::-webkit-scrollbar { display: none; }

.rail a {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 0 14px;
  border-bottom: 2px solid transparent;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--text-nav);
}

.rail a:hover,
.rail a.is-current {
  color: var(--green);
  border-bottom-color: var(--green);
  background: transparent;
}

.search {
  width: 100%;
  max-width: none;
  justify-self: stretch;
}

.search input {
  height: 44px;
  border-radius: 2px;
  border-width: 1px;
  background: var(--white);
}

.page { padding-top: 22px; }

.panel {
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  padding: 8px 0 4px;
}

.section__title {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero {
  margin-bottom: 18px;
}

.hero__slider,
.hero__track { position: relative; }

.hero__slide {
  display: none;
}

.hero__slide.is-active { display: block; }

.hero__frame {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #1c2430;
}

.hero__backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(18, 24, 32, 0.88) 0%, rgba(18, 24, 32, 0.55) 48%, rgba(18, 24, 32, 0.25) 100%);
}

.hero__sheet {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 28px;
  align-items: end;
  padding: 28px;
}

.hero__poster img,
.screen-layout .title-poster,
.screen-layout .title-poster img,
.card--catalog .card__poster,
.card--catalog .card__poster img,
.card--catalog .card__hit img {
  width: 300px !important;
  height: 450px !important;
  max-width: 100%;
  aspect-ratio: auto !important;
  object-fit: cover;
}

.hero__poster {
  display: block;
  width: 300px;
  height: 450px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

.hero__poster img { display: block; }

.hero__facts {
  color: #fff;
  max-width: 640px;
  padding-bottom: 8px;
}

.hero__kicker {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #9bb6ff;
}

.hero__title {
  margin: 0;
  font-family: "Manrope", var(--font);
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.04em;
  text-transform: none;
  color: #fff;
}

.hero__orig {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
}

.hero__bits,
.hero__scores {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.hero__bits span,
.score {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 8px;
  background: rgba(255, 255, 255, 0.12);
  font-size: 13px;
  font-weight: 700;
}

.score--kp { background: #f5c518; color: #1c2430; }
.score--imdb { background: #f5c518; color: #1c2430; }
.score b { font-weight: 800; margin-right: 6px; }

.hero__desc {
  margin: 14px 0 0;
  max-width: 62ch;
  color: rgba(255, 255, 255, 0.84);
  font-size: 15px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero__actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.hero .btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 2px;
  font-weight: 800;
  text-decoration: none;
}

.hero .btn--primary { background: var(--green); color: #fff; }
.hero .btn--ghost {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.45);
}

.hero__nav {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.hero__nav button,
.hero__dots button {
  width: 36px;
  height: 36px;
  border: 1px solid var(--border-strong);
  background: var(--white);
  color: var(--text);
  cursor: pointer;
}

.hero__dots {
  display: flex;
  gap: 6px;
}

.hero__dots button.is-active {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.cards-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, 300px) !important;
  justify-content: start;
  gap: 28px 22px !important;
}

.cards-row {
  --cards-per-view: 3;
  grid-auto-columns: 300px !important;
}

.card--catalog {
  width: 300px;
  max-width: 100%;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.card--catalog .card__poster { border-radius: 0; }

.card--catalog .card__play { display: none; }

.card--catalog .card__info {
  background: transparent;
  padding: 10px 0 0;
}

.card--catalog .card__title {
  font-size: 16px;
  letter-spacing: -0.02em;
}

.card__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.card__facts span {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-soft);
}

.card__facts span + span::before {
  content: "·";
  margin-right: 6px;
  color: var(--text-muted);
}

.card--catalog .rating-kp,
.card--catalog .rating-imdb {
  min-height: 22px;
  padding: 0 6px;
  background: var(--hover-soft);
  font-weight: 800;
}

.screen {
  position: relative;
  aspect-ratio: 16 / 9;
  max-height: 420px;
  margin-bottom: 22px;
  overflow: hidden;
  background: #1c2430;
}

.screen__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.screen-layout.title-layout {
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 28px;
}

.screen-layout .title-poster {
  width: 300px;
  height: 450px;
  border-radius: 0;
}

.title-info__name {
  font-family: "Manrope", var(--font);
  font-size: clamp(28px, 3vw, 42px);
  letter-spacing: -0.04em;
  text-transform: none;
}

.title-specs--compact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin-top: 16px;
  border-top: 1px solid var(--border);
}

.title-specs__row {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 8px;
  padding: 8px 12px 8px 0;
  border-bottom: 1px solid var(--border);
}

.news-feed { display: grid; gap: 0; border-top: 1px solid var(--border); }

.news-feed .ncard {
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
}

.news-feed .ncard__link {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 16px;
  padding: 16px 0;
}

.footer { background: transparent; }

@media (max-width: 1000px) {
  .hero__frame {
    display: flex;
    flex-direction: column;
    aspect-ratio: auto;
    max-height: none;
    overflow: visible;
    background: transparent;
  }

  .hero__backdrop {
    position: relative;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    max-height: 360px;
  }

  .hero__frame::after { display: none; }

  .hero__sheet {
    position: relative;
    inset: auto;
    margin-top: 0;
    background: #1c2430;
    align-items: center;
  }
}

@media (max-width: 768px) {
  .header__top {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "logo actions"
      "search search";
    gap: 10px;
  }

  .header__top .logo { grid-area: logo; }
  .header__top .header__actions { grid-area: actions; }
  .header__top .search {
    grid-area: search;
    grid-column: 1 / -1;
  }

  .hero__sheet {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .hero__facts { order: -1; }

  .hero__poster,
  .hero__poster img {
    width: min(300px, 100%) !important;
    height: auto !important;
    aspect-ratio: 300 / 450 !important;
  }

  .cards-grid,
  .card--catalog,
  .card--catalog .card__poster,
  .card--catalog .card__poster img,
  .screen-layout .title-poster,
  .screen-layout .title-poster img {
    width: min(300px, 100%) !important;
    height: auto !important;
  }

  .card--catalog .card__poster,
  .screen-layout .title-poster {
    aspect-ratio: 300 / 450 !important;
    height: auto !important;
  }

  .screen-layout.title-layout { grid-template-columns: 1fr; }
  .title-specs--compact { grid-template-columns: 1fr; }
}
