/* ==========================
   1. Переменные и базовые стили
   ========================== */

:root {
  --ink: #14110f;
  /* --ink: #0d0b0a; */
  --ink2: #1c1614;
  /* --ink2: #15110f; */
  --surface: #211a17;
  /* --surface: #1d1714; */
  --surface2: #2d231e;
  /* --surface2: #241c18; */
  --line: #42332c;
  /* --line: #3b2d27; */

  --wine: #b23a44;
  --wine2: #8f2d36;
  --bone: #eee5d5;
  --text: #d0c4b3;
  --muted: #988b7b;
  --moon: #829bb2;

  --wrap: 1220px;
  --header: 78px;

  --display: Georgia, "Times New Roman", serif;
  --body: "Open Sans", Arial, sans-serif;

  --ease: cubic-bezier(.22, .61, .36, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font: 400 16px/1.72 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(
      900px 500px at 80% 0,
      rgba(178, 58, 68, .12),
      transparent 65%
    ),
    radial-gradient(
      900px 600px at 0 25%,
      rgba(130, 155, 178, .08),
      transparent 65%
    );
  z-index: -1;
}

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

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

button {
  font: inherit;
}

.wrap {
  width: min(100% - 40px, var(--wrap));
  margin: auto;
}

/* ==========================
   2. Ссылки, заголовки и текст
   ========================== */


h1,
h2,
h3,
h4 {
  margin: 0 0 .75rem;
  color: var(--bone);
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.08;
}

h1 {
  font-size: clamp(2.6rem, 5.2vw, 5rem);
}

h2 {
  font-size: clamp(2rem, 3.5vw, 3.3rem);
  margin-bottom: 40px;
}

h3 {
  font-size: clamp(1.35rem, 2vw, 1.8rem);
}

.kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 13px;
  color: var(--wine);
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
}

.kicker::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--wine);
}

.lead {
  max-width: 760px;
  color: #d9cebf;
  font-size: clamp(1.02rem, 1.25vw, 1.18rem);
}

.muted {
  color: var(--muted);
}

/* ==========================
   3. Шапка сайта и навигация
   ========================== */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;

  display: flex;
  align-items: center;

  height: var(--header);
  border-bottom: 1px solid transparent;
  transition: .25s var(--ease);
  border-bottom: 1px solid var(--line);
  background: #0b0908;
}

.site-header.stuck {
  background: rgba(13, 11, 10, .9);
  backdrop-filter: blur(15px);
  border-color: rgba(59, 45, 39, .9);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  white-space: nowrap;
}

.brand-title {
  color: var(--bone);
  font: 900 1.35rem/1 var(--display);
  letter-spacing: .13em;
  text-transform: uppercase;
}

.brand-year {
  color: var(--wine);
  font-size: .62rem;
  letter-spacing: .18em;
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 30px);
}

.nav a {
  position: relative;
  padding: 8px 0;
  color: #c4b8a8;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.nav a::after {
  content: "";
  position: absolute;
  bottom: 1px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--wine);
  transition: .25s;
}

.nav a:hover,
.nav a.active {
  color: var(--bone);
}

.nav a:hover::after,
.nav a.active::after {
  width: 100%;
}

.menu {
  display: none;
  align-items: center;
  justify-content: center;

  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 5px;

  background: transparent;
  color: var(--bone);
  cursor: pointer;
}

.menu svg {
  width: 22px;
}

.mobile-nav {
  display: none;
  position: fixed;
  top: var(--header);
  left: 0;
  right: 0;
  z-index: 999;

  padding: 12px 20px 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(13, 11, 10, .98);
}

.mobile-nav.open {
  display: flex;
  flex-direction: column;
}

.mobile-nav a {
  padding: 13px 2px;
  border-bottom: 1px solid #2c231f;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.mobile-nav a:last-child {
  border: 0;
}

/* ==========================
   4. Главный экран
   ========================== */

.hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  overflow: hidden;

  min-height: 720px;
  /* height: min(90vh, 860px); */
}

.hero-media {
  position: absolute;
  inset: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(.85) saturate(.85) contrast(1.01);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(8, 7, 6, 0.3) 0, rgba(8, 7, 6, .2) 100%), linear-gradient(0deg, rgba(8, 7, 6, .98) 0, rgba(8, 7, 6, .15) 72%);
}

.hero-content {
  position: relative;
  z-index: 1;
  width: 100%;
  padding-bottom: 200px;
}

.hero-content h1 {
  max-width: 850px;
  font-size: clamp(2.8rem, 6vw, 5.7rem);
  letter-spacing: -.025em;
}

.hero-sub {
  margin: 0 0 16px;
  color: var(--bone);
  font: italic clamp(1.25rem, 2vw, 1.7rem)/1.3 var(--display);
}

.hero-text {
  max-width: 720px;
  color: #d2c5b5;
  font-size: clamp(1rem, 1.2vw, 1.14rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

/* Кнопки */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-height: 46px;
  padding: 11px 20px;
  border: 1px solid transparent;
  border-radius: 4px;

  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  transition: .2s var(--ease);
}

.btn-primary {
  background: var(--wine);
  color: #fff;
}

.btn-primary:hover {
  background: var(--wine2);
  transform: translateY(-2px);
}

.btn-ghost {
  border-color: #56453c;
  background: rgba(255, 255, 255, .03);
  color: var(--bone);
}

.btn-ghost:hover {
  border-color: #88766a;
  background: rgba(255, 255, 255, .07);
  transform: translateY(-2px);
}

/* ==========================
   5. Общие секции и сетки
   ========================== */

.section {
  margin-bottom: 70px;
  padding-top: 50px;
}



.kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 13px;
  color: var(--wine);
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
}
.kicker::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--wine);
}


.rule {
  height: 1px;
  margin: 34px 0;
  background: var(--line);
}

/* Карточки преимуществ */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: 50px;
}

.feature {
  /* min-height: 150px; */
  padding: 28px;
  border: 1px solid var(--line);
  background: linear-gradient(
    145deg,
    rgba(36, 28, 24, .95),
    rgba(21, 17, 15, .95)
  );
}

.feature-number {
  margin:0 0 25px 0;
  color: var(--wine);
  font: 700 2.2rem/1 var(--display);
}

.feature h3 {
  font-size: 1.45rem;
}


.text-link{
  color: #8f2d36;
}

/* Блок с изображениями */

.image-strip {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 18px;
}

.image-strip figure {
  position: relative;
  overflow: hidden;
  min-height: 380px;
  margin: 0;
  border: 1px solid var(--line);
}

.image-strip img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(.72);
}

.image-strip figcaption {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 40px 24px 22px;
  background: linear-gradient(
    0deg,
    rgba(10, 8, 7, .92),
    transparent
  );
  color: var(--bone);
  font-family: var(--display);
  font-size: 1.25rem;
}

/* ==========================
   6. Заголовки внутренних страниц
   ========================== */

.page-hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  overflow: hidden;

  min-height: 510px;
  height: 62vh;
  max-height: 700px;
  border-bottom: 1px solid var(--line);
}

.page-hero-media {
  position: absolute;
  inset: 0;
}

.page-hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(.6) saturate(.7);
}

.page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(8, 7, 6, 0.3) 0, rgba(8, 7, 6, .2) 100%), linear-gradient(0deg, rgba(8, 7, 6, .98) 0, rgba(8, 7, 6, .15) 72%);
}

.page-hero-content {
  position: relative;
  z-index: 1;
  padding-bottom: 64px;
}

.page-hero-content h1 {
  max-width: 850px;
  font-size: clamp(2.7rem, 5vw, 4.8rem);
}

.page-hero-content p {
  max-width: 700px;
  color: #d3c7b8;
  font-size: 1.05rem;
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: .76rem;
}

.crumbs a:hover {
  color: var(--bone);
}

/* ==========================
   7. Страница персонажей
   ========================== */

.family {
  margin-top: 55px;
  padding-top: 34px;
  border-top: 1px solid var(--line);
}

.family-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(250px, 420px);
  align-items: end;
  gap: 35px;
  margin-bottom: 24px;
}

.family-head p {
  margin: 0;
  color: var(--muted);
}

.character-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.character-card {
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
  transition: .28s var(--ease);
}

.character-card:hover {
  border-color: #62463f;
  transform: translateY(-5px);
}

.character-media {
  overflow: hidden;
  aspect-ratio: 5 / 5;
  background: #201a17;
}

.character-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(.72) contrast(1.01);
  transition: .45s var(--ease);
}

.character-card:hover .character-media img {
  transform: scale(1.04);
  filter: saturate(.9);
}

.character-body {
  padding: 18px;
}

.character-body h3 {
  margin-bottom: 5px;
  font-size: 1.35rem;
}

.character-role {
  color: var(--wine);
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
  margin: 0;
}

/* .character-summary {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: .92rem;
} */

/* .character-card details {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
} */

/* .character-card summary {
  color: var(--bone);
  cursor: pointer;
  list-style: none;
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
} */

/* .character-card summary::-webkit-details-marker {
  display: none;
} */

/* .character-card summary::after {
  content: "+";
  float: right;
  color: var(--wine);
  font-size: 1rem;
} */

/* .character-card details[open] summary::after {
  content: "−";
} */

/* .details-text {
  padding-top: 12px;
  color: var(--muted);
  font-size: .9rem;
} */

.family-note {
  margin-top: 25px;
  padding: 24px;
  border-left: 2px solid var(--wine);
  background: rgba(178, 58, 68, .06);
}

/* ==========================
   8. Страница сезонов и серий
   ========================== */

.season-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 42px;
}

.season-nav a {
  padding: 9px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.season-nav a:hover {
  border-color: var(--wine);
  color: var(--bone);
}

.season {
  scroll-margin-top: 95px;
  padding: 60px 0 10px;
  border-top: 1px solid var(--line);
}



.season-label {
  color: var(--wine);
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.season-head p {
  margin: 0;
  color: var(--muted);
}

.episode-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.episode {
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
  transition: .28s var(--ease);
}

.episode:hover {
  border-color: #62463f;
  transform: translateY(-4px);
}

.episode-media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
}

.episode-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(.68) brightness(.82);
  transition: .45s var(--ease);
}

.episode:hover .episode-media img {
  transform: scale(1.04);
  filter: saturate(.85) brightness(.92);
}

.episode-no {
  position: absolute;
  bottom: 12px;
  left: 14px;
  color: var(--bone);
  font: 700 2.2rem/1 var(--display);
  text-shadow: 0 3px 12px #000;
}

.episode-body {
  padding: 18px;
}

.episode-meta {
  color: var(--wine);
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.episode h3 {
  margin: 5px 0 9px;
  font-size: 1.35rem;
}

.episode-intro {
  margin: 0;
  color: var(--muted);
  font-size: .9rem;
}

/* .episode details {
  margin-top: 15px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
} */

/* .episode summary {
  color: var(--bone);
  cursor: pointer;
  list-style: none;
  font-size: .73rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
} */

/* .episode summary::-webkit-details-marker {
  display: none;
} */

/* .episode summary::after {
  content: "+";
  float: right;
  color: var(--wine);
  font-size: 1rem;
} */

/* .episode details[open] summary::after {
  content: "−";
} */

.episode-full {
  padding-top: 12px;
  color: var(--muted);
  font-size: .9rem;
}

/* ==========================
   9. Факты и выделенные блоки
   ========================== */

.facts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.fact {
  padding: 22px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.fact strong {
  display: block;
  margin-bottom: 6px;
  color: var(--bone);
  font-family: var(--display);
  font-size: 1.3rem;
}

.fact span {
  color: var(--muted);
  font-size: .93rem;
}

.callout {
  margin: 50px 0;
  padding: 30px;
  border: 1px solid var(--wine-dim, #5a2a2c);
  background: linear-gradient(
    135deg,
    rgba(178, 58, 68, .11),
    rgba(18, 16, 15, .4)
  );
}

.callout strong {
  color: var(--bone);
}

/* ==========================
   10. Подвал сайта
   ========================== */

.footer {
  padding: 52px 0 25px;
  border-top: 1px solid var(--line);
  background: #0b0908;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 50px;
}

.footer-links {
  display: flex;
  justify-content: space-between;
  gap: 30px;
}

.footer h3 {
  margin-bottom: 15px;
  color: var(--muted);
  font: 800 .72rem/1 var(--body);
  letter-spacing: .15em;
  text-transform: uppercase;
}

.footer a {
  display: block;
  margin: 8px 0;
  color: #c4b8a8;
  font-size: .9rem;
}

.footer a:hover {
  color: var(--bone);
}

.footer-tag {
  max-width: 440px;
  margin-top: 15px;
  color: var(--muted);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  margin-top: 38px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: #75695e;
  font-size: .75rem;
}

/* ==========================
   11. Кнопка возврата наверх
   ========================== */

.back-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 900;

  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;

  background: rgba(18, 16, 15, .92);
  color: var(--bone);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: .2s;
}

.back-top.show {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.back-top:hover {
  background: var(--wine);
}

/* ==========================
   12. Подписи к изображениям
   ========================== */

figcaption {
  font-size: 12px;
  font-weight: 300;
}

/* ==========================
   13. Адаптивность: планшеты
   ========================== */

@media (max-width: 1050px) {
  .nav {
    gap: 15px;
  }

  .nav a {
    font-size: .68rem;
  }

  .character-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 850px) {
  .nav {
    display: none;
  }

  .menu {
    display: flex;
  }

  .feature-grid,
  .episode-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .family-head,
  .season-head,
  .section-head {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .character-grid {
    grid-template-columns: repeat(2, 1fr);
  }


  .hero {
    min-height: 650px;
    height: 78vh;
  }

  .page-hero {
    min-height: 480px;
    height: 56vh;
  }
}

/* ==========================
   14. Адаптивность: телефоны
   ========================== */

@media (max-width: 560px) {
  .wrap {
    width: min(100% - 28px, var(--wrap));
  }

  .hero-content {
    padding-bottom: 186px;
  }

  .hero-content h1 {
    font-size: clamp(2.5rem, 12vw, 3.7rem);
  }

  .hero-sub {
    font-size: 1.2rem;
  }

  .page-hero-content {
    padding-bottom: 45px;
  }

  .page-hero-content h1 {
    font-size: clamp(2.4rem, 11vw, 3.4rem);
  }

  .section {
    padding: 55px 0;
  }

  .feature-grid,
  .episode-grid,
  .character-grid,
  .facts {
    grid-template-columns: 1fr;
  }

  .image-strip figure {
    min-height: 280px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .hero-actions {
    flex-direction: column;
    max-width: 360px;
  }
}

.pageImg, p{
  margin-bottom: 20px;
}