/* ============================================================
   KinoPromo — дизайн-система
   Палитра: тёплая «бумага» + чернила + золото-шампань.
   Display: Unbounded · Body/UI: Inter · Без обводок.
   ============================================================ */

:root {
  --paper:   #FAFAF7;
  --surface: #FFFFFF;
  --wash:    #F0EFE9;
  --ink:     #141416;
  --muted:   #75757D;
  --gold:    #B98A2F;
  --gold-ink:#8E6A21;
  --scrim:   rgba(10, 10, 12, 0);
  --scrim-2: rgba(10, 10, 12, .78);
  --shadow:  0 18px 44px -18px rgba(20, 20, 22, .22);
  --shadow-soft: 0 10px 28px -16px rgba(20, 20, 22, .18);
  --header-bg: rgba(250, 250, 247, .82);
  --radius: 18px;
  --radius-sm: 12px;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Unbounded', 'Inter', system-ui, sans-serif;
  --container: 1180px;
}

html.dark {
  --paper:   #101013;
  --surface: #17171B;
  --wash:    #1E1E24;
  --ink:     #F3F3F1;
  --muted:   #9A9AA3;
  --gold:    #D8B25F;
  --gold-ink:#E3C377;
  --scrim-2: rgba(5, 5, 7, .82);
  --shadow:  0 22px 50px -18px rgba(0, 0, 0, .65);
  --shadow-soft: 0 12px 30px -16px rgba(0, 0, 0, .55);
  --header-bg: rgba(16, 16, 19, .8);
}

/* ---------- База ---------- */

*, *::before, *::after { box-sizing: border-box; border: 0; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background .25s ease, color .25s ease;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

button { font: inherit; color: inherit; background: none; cursor: pointer; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 22px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}

:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

::selection { background: var(--gold); color: #fff; }

/* ---------- Типографика ---------- */

.display {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: -0.01em;
  margin: 0;
}

.kicker {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 34px 0 10px;
}

.page-title { font-size: clamp(28px, 4.6vw, 46px); }
.page-sub { color: var(--muted); margin: 12px 0 0; max-width: 640px; }
.page-head { margin-bottom: 34px; }

.section-title { font-size: clamp(20px, 2.6vw, 27px); }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 22px;
}

.more-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
  transition: color .2s ease;
}
.more-link:hover { color: var(--gold); }

.dot {
  width: 3px; height: 3px;
  border-radius: 50%;
  background: currentColor;
  opacity: .55;
  display: inline-block;
  vertical-align: middle;
}

/* ---------- Шапка ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--header-bg);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  transition: box-shadow .25s ease;
}
.site-header.is-scrolled { box-shadow: 0 8px 24px -18px rgba(20, 20, 22, .35); }

.header-inner {
  display: flex;
  align-items: center;
  gap: 26px;
  height: 66px;
}

.logo {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 19px;
  letter-spacing: .02em;
  white-space: nowrap;
}
.logo span { color: var(--gold); }

.main-nav { display: flex; gap: 4px; margin-left: 6px; flex: 1; }

.main-nav a {
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  padding: 9px 13px;
  border-radius: 999px;
  transition: color .2s ease, background .2s ease;
}
.main-nav a:hover { color: var(--ink); background: var(--wash); }
.main-nav a.is-active { color: var(--gold-ink); background: color-mix(in srgb, var(--gold) 14%, transparent); }

.header-actions { display: flex; align-items: center; gap: 4px; }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: 999px;
  color: var(--muted);
  transition: color .2s ease, background .2s ease;
}
.icon-btn:hover { color: var(--ink); background: var(--wash); }

.i-moon { display: none; }
html.dark .i-moon { display: block; }
html.dark .i-sun { display: none; }

.burger { display: none; }

/* ---------- Кнопки ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  transition: transform .15s ease, background .2s ease, color .2s ease, box-shadow .2s ease;
}
.btn:active { transform: scale(.97); }

.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--gold); color: #fff; box-shadow: var(--shadow-soft); }
html.dark .btn-primary:hover { color: #141416; }

.btn-ghost { background: var(--wash); color: var(--ink); }
.btn-ghost:hover { background: color-mix(in srgb, var(--gold) 16%, var(--wash)); color: var(--gold-ink); }

/* ---------- Чипы и метки ---------- */

.chip {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 5px 11px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--gold) 15%, var(--surface));
  color: var(--gold-ink);
}

.chip-light {
  background: rgba(255, 255, 255, .16);
  color: #fff;
  backdrop-filter: blur(6px);
}

/* ---------- Hero: афиша дня ---------- */

.hero {
  display: grid;
  grid-template-columns: 1.72fr 1fr;
  gap: 18px;
  margin: 6px 0 54px;
}

.hero-main, .hero-mini {
  position: relative;
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--wash);
  transform: translateZ(0);
}

.hero-main { aspect-ratio: 16 / 10.4; }
.hero-side { display: grid; gap: 18px; }
.hero-mini { aspect-ratio: 16 / 9.6; }

.hero-main img, .hero-mini img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .6s cubic-bezier(.2, .7, .2, 1);
}
.hero-main:hover img, .hero-mini:hover img { transform: scale(1.045); }

.hero-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  gap: 12px;
  padding: 26px;
  background: linear-gradient(to top, var(--scrim-2) 0%, rgba(10,10,12,.28) 52%, var(--scrim) 78%);
  color: #fff;
}

.hero-title {
  font-size: clamp(21px, 3vw, 34px);
  font-weight: 700;
  color: #fff;
  text-wrap: balance;
  transition: color .2s ease;
}
.hero-main:hover .hero-title { color: var(--gold); }

.hero-mini-title {
  font-family: var(--font-body);
  font-size: 16.5px;
  font-weight: 700;
  line-height: 1.35;
  margin: 0;
  color: #fff;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color .2s ease;
}
.hero-mini:hover .hero-mini-title { color: var(--gold); }

.hero-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: rgba(255, 255, 255, .82);
}

/* ---------- Киноплёнка «Скоро в кино» ---------- */

.filmstrip-block {
  background: #121215;
  color: #F3F3F1;
  padding: 44px 0 46px;
  margin: 0 0 58px;
}
.filmstrip-block .section-title { color: #F3F3F1; }
.filmstrip-block .more-link { color: #9A9AA3; }
.filmstrip-block .more-link:hover { color: var(--gold); }

.filmstrip {
  position: relative;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 26px 0;
  /* перфорация киноплёнки */
  background:
    repeating-linear-gradient(90deg, transparent 0 10px, rgba(243,243,241,.16) 10px 22px, transparent 22px 32px) top / 100% 10px no-repeat,
    repeating-linear-gradient(90deg, transparent 0 10px, rgba(243,243,241,.16) 10px 22px, transparent 22px 32px) bottom / 100% 10px no-repeat;
}
.filmstrip::-webkit-scrollbar { display: none; }

.filmstrip-track {
  display: flex;
  gap: 18px;
  padding: 0 max(22px, calc((100vw - var(--container)) / 2 + 22px));
  width: max-content;
}

/* ---------- Карточки постеров ---------- */

.poster-card { width: 158px; flex: 0 0 auto; }

.poster-media {
  position: relative;
  aspect-ratio: 2 / 3;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--wash);
  box-shadow: none;
  transition: transform .3s ease, box-shadow .3s ease;
}
.poster-card:hover .poster-media { transform: translateY(-5px); box-shadow: var(--shadow); }

.poster-media img { width: 100%; height: 100%; object-fit: cover; }

.date-stamp {
  position: absolute;
  left: 8px; bottom: 8px;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: .04em;
  padding: 4px 9px;
  border-radius: 7px;
  background: var(--gold);
  color: #17130A;
  text-transform: uppercase;
}

.rating-stamp {
  position: absolute;
  right: 8px; top: 8px;
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 7px;
  background: rgba(10, 10, 12, .68);
  color: #fff;
  backdrop-filter: blur(4px);
}

.poster-title {
  margin-top: 10px;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.filmstrip-block .poster-title { color: #F3F3F1; }

.poster-sub {
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- Сетка новостей ---------- */

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px 26px;
}
.cards-grid-4 { grid-template-columns: repeat(4, 1fr); gap: 26px 22px; }

.card { min-width: 0; }
.card-link { display: block; }

.card-media {
  position: relative;
  aspect-ratio: 16 / 9.5;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--wash);
  margin-bottom: 14px;
}
.card-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .55s cubic-bezier(.2, .7, .2, 1);
}
.card-link:hover .card-media img { transform: scale(1.05); }
.card-media .chip { position: absolute; left: 10px; top: 10px; background: rgba(250,250,247,.9); }
html.dark .card-media .chip { background: rgba(23,23,27,.88); }

.card-title {
  font-size: 16.5px;
  font-weight: 700;
  line-height: 1.4;
  margin: 0 0 8px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color .2s ease;
}
.card-link:hover .card-title { color: var(--gold-ink); }

.card-meta {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12.5px;
  color: var(--muted);
}

.feed { margin-bottom: 70px; }

.load-more-wrap { display: flex; justify-content: center; margin-top: 40px; }

.card.is-appended { animation: cardIn .45s ease both; }
@keyframes cardIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

/* ---------- Статья ---------- */

.article { margin: 0 auto; }

.breadcrumbs {
  display: flex;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  margin: 34px 0 18px;
}
.breadcrumbs a:hover { color: var(--gold-ink); }

.article-title {
  font-size: clamp(25px, 4vw, 40px);
  text-wrap: balance;
  margin-bottom: 16px;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  color: var(--muted);
  margin-bottom: 26px;
}

.article-figure {
  margin: 0 0 30px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--wash);
}
.article-figure img { width: 100%; }

.article-trailer {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin: 0 0 30px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--wash);
}
.article-trailer iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: 0;
}

.article-body { font-size: 17.5px; line-height: 1.75; }
.article-body p { margin: 0 0 1.2em; }

.article-source {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: var(--wash);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 34px 0 8px;
  font-size: 14px;
  color: var(--muted);
}

.share-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 26px 0 66px;
}
.share-label { font-size: 13px; color: var(--muted); margin-right: 6px; }

.share-btn {
  font-size: 13px;
  font-weight: 600;
  padding: 9px 15px;
  border-radius: 999px;
  background: var(--wash);
  color: var(--ink);
  transition: background .2s ease, color .2s ease;
}
.share-btn:hover { background: color-mix(in srgb, var(--gold) 16%, var(--wash)); color: var(--gold-ink); }
.share-btn.is-copied { background: var(--gold); color: #fff; }

.related { margin-bottom: 76px; }

/* ---------- Релизы ---------- */

.release-month { margin-bottom: 52px; }
.month-title { font-size: 20px; margin-bottom: 20px; color: var(--gold-ink); }

.posters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 26px 20px;
}
.posters-grid .poster-card { width: auto; }

/* ---------- Поиск ---------- */

.search-form { display: flex; gap: 12px; max-width: 640px; margin-bottom: 30px; }

.search-input {
  flex: 1;
  min-width: 0;
  border: 0;
  border-radius: 999px;
  background: var(--wash);
  color: var(--ink);
  padding: 14px 22px;
  font: inherit;
  transition: box-shadow .2s ease;
}
.search-input::placeholder { color: var(--muted); }
.search-input:focus { outline: none; box-shadow: 0 0 0 2px var(--gold); }

.search-note { color: var(--muted); font-size: 14px; margin: 0 0 22px; }

/* ---------- Пагинация ---------- */

.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 46px 0 70px;
}

.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px; height: 42px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  background: var(--wash);
  color: var(--ink);
  transition: background .2s ease, color .2s ease;
}
.page-btn:hover { background: color-mix(in srgb, var(--gold) 16%, var(--wash)); color: var(--gold-ink); }
.page-btn.is-current { background: var(--ink); color: var(--paper); }
.page-gap { align-self: center; color: var(--muted); }

/* ---------- Пустые состояния ---------- */

.empty-state {
  text-align: center;
  padding: 84px 20px 96px;
  max-width: 560px;
  margin: 0 auto;
}
.empty-state h1, .empty-state h2 { font-size: clamp(24px, 4vw, 38px); margin-bottom: 14px; }
.empty-state p { color: var(--muted); margin: 0 0 26px; }
.empty-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.error-404 .kicker { margin-top: 60px; }

/* ---------- Подвал ---------- */

.site-footer {
  background: var(--surface);
  margin-top: 30px;
  padding: 54px 0 26px;
  transition: background .25s ease;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 38px;
}

.footer-brand p { color: var(--muted); font-size: 14px; max-width: 360px; margin: 16px 0 0; }

.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-col h4 {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 6px;
}
.footer-col a { font-size: 14px; color: var(--ink); opacity: .85; transition: color .2s ease, opacity .2s ease; }
.footer-col a:hover { color: var(--gold-ink); opacity: 1; }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  font-size: 12.5px;
  color: var(--muted);
  padding-top: 22px;
}

/* ---------- Адаптив ---------- */

@media (max-width: 1000px) {
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
  .cards-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .hero { grid-template-columns: 1fr; }
  .hero-side { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .main-nav {
    display: none;
    position: absolute;
    top: 66px; left: 0; right: 0;
    flex-direction: column;
    gap: 2px;
    background: var(--paper);
    padding: 12px 18px 20px;
    box-shadow: var(--shadow);
  }
  .main-nav.is-open { display: flex; }
  .main-nav a { padding: 13px 14px; font-size: 15px; }
  .burger { display: inline-flex; }

  .hero-side { grid-template-columns: 1fr; }
  .hero-overlay { padding: 18px; }
  .cards-grid, .cards-grid-4 { grid-template-columns: 1fr; gap: 30px; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .article-body { font-size: 16.5px; }
  .search-form { flex-direction: column; }
  .posters-grid { grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); }
  .poster-card { width: 138px; }
}

/* ---------- Доступность: движение ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001s !important;
    transition-duration: .001s !important;
    scroll-behavior: auto !important;
  }
}
