/*
 * Уникальные блоки для трёх страниц художников.
 * Общая шапка/футер/dc-section берутся из content-pages.css и design-system.css —
 * здесь только визуальные идеи, специфичные для каждой страницы.
 */

/* ============================================================
   1. НЕНОВ — книжный разворот
   ============================================================ */
.nenov-hero { padding-bottom: var(--ds-section-space-bottom); }
.nenov-hero__grid { display: grid; grid-template-columns: minmax(300px, .62fr) minmax(0, 1fr); gap: 64px; align-items: start; }

.artist-hero__portrait { width: 100%; max-width: 440px; aspect-ratio: 1 / 1; justify-self: center; align-self: start; min-width: 0; border-radius: var(--ds-radius-image, 12px); overflow: hidden; }
.artist-hero__image { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: var(--ds-radius-image, 12px); }

.nenov-hero__role { margin: 20px 0 22px; color: var(--color-brown); font-weight: var(--ds-font-weight-bold); }

/* Vertical career path */
.path-section { background: var(--ds-color-canvas); }
.illustration-note { background: var(--ds-color-canvas); }
.path-list { position: relative; max-width: 720px; margin: 48px 0 0; padding: 0; list-style: none; }
.path-list::before { content: ""; position: absolute; top: 6px; bottom: 6px; left: 7px; width: 2px; background: linear-gradient(180deg, var(--primary), rgba(114, 64, 30, .35)); }
.path-list li { position: relative; padding: 0 0 34px 40px; }
.path-list li:last-child { padding-bottom: 0; }
.path-list li::before { content: ""; position: absolute; top: 4px; left: 0; width: 16px; height: 16px; border-radius: 50%; background: var(--color-bg); border: 3px solid var(--color-brown); }
.path-list time { display: block; color: var(--color-brown); font-family: var(--font-heading); font-size: var(--ds-font-size-lead); }
.path-list h3 { margin: 6px 0 4px; font-size: var(--ds-font-size-title); font-weight: var(--ds-font-weight-semibold); line-height: 1.3; }
.path-list p { margin: 0; color: var(--ds-color-text-muted); font-size: var(--ds-font-size-title); font-weight: var(--ds-font-weight-medium); line-height: 1.6; }

.publisher-pills { display: flex; flex-wrap: wrap; gap: 10px; margin: 40px 0 0; padding: 0; list-style: none; }
.publisher-pills li { padding: 9px 18px; border: 1px solid rgba(114, 64, 30, .3); border-radius: 999px; background: rgba(255, 255, 255, .55); font-size: var(--ds-font-size-md); font-weight: var(--ds-font-weight-semibold); color: var(--color-brown); }

/* ============================================================
   2. ПУСТОВИТ — раскадровка / мультипликация
   ============================================================ */
.pustovit-hero { padding-bottom: var(--ds-section-space-bottom); }
.pustovit-hero__grid { display: grid; grid-template-columns: minmax(280px, .55fr) minmax(0, 1fr); gap: 60px; align-items: start; }

.pustovit-hero__role { margin: 20px 0 22px; color: var(--color-brown); font-weight: var(--ds-font-weight-bold); }

/* Horizontal filmstrip timeline */
.content-page .filmstrip-section { padding-top: var(--ds-section-space-top); padding-bottom: var(--ds-section-space-bottom); background: var(--ds-color-canvas); color: var(--ds-color-text); }
.filmstrip-section__stage { position: relative; }
/* The strip is full-bleed but visually clipped by .site-content-shell (overflow: clip),
   so the shell's left edge acts as the wall. The insets are computed from the actual
   .ds-container width (the % resolves against the filmstrip's parent), so the first frame
   lands exactly on the container's left edge — on one line with the title's first letter,
   i.e. 60px from the visible wall. The trailing inset mirrors the leading one: in native
   (non-scrub) scrolling the strip then settles with its last frame on the container's
   right edge — the shared content line of the section. */
.filmstrip {
  width: 100vw;
  margin-top: 24px;
  margin-left: calc(50% - 50vw);
  padding-left: calc(50vw - 50%);
  padding-right: calc(50vw - 50%);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  padding-bottom: 0;
  scrollbar-width: none;
}
.filmstrip::-webkit-scrollbar { display: none; }
.filmstrip:focus-visible { outline: 3px solid var(--color-brown); outline-offset: 6px; }
.filmstrip__track { display: flex; gap: 4px; width: max-content; padding: 0; margin: 0; list-style: none; }
.filmstrip__frame { position: relative; flex: 0 0 clamp(240px, 24vw, 300px); padding: 22px 20px 24px; border: 2px solid rgba(247, 239, 222, .18); background: var(--color-dark); }
.filmstrip__frame::before, .filmstrip__frame::after { content: ""; position: absolute; left: 8px; right: 8px; height: 10px; background-image: repeating-linear-gradient(90deg, #100d09 0 10px, transparent 10px 20px); }
.filmstrip__frame::before { top: 0; }
.filmstrip__frame::after { bottom: 0; }
.filmstrip__frame time { display: block; color: #f2be6b; font-family: var(--font-heading); font-size: var(--ds-font-size-lead); font-weight: var(--ds-font-weight-semibold); }
.filmstrip__frame h3 { margin: 14px 0 8px; font-size: var(--ds-font-size-title); font-weight: var(--ds-font-weight-semibold); line-height: 1.3; color: #f7efde; }
.filmstrip__frame p { margin: 0; color: rgba(247, 239, 222, .82); font-size: var(--ds-font-size-title); font-weight: var(--ds-font-weight-semibold); line-height: 1.55; }

@media (min-width: 769px) and (prefers-reduced-motion: no-preference) {
  /* JS alone adds this class; without it the accessible native scroller remains available.
     The section keeps its normal 88px top/bottom padding at all times (hug-content) — only the
     filmstrip itself pins, centered in the viewport, for exactly the scroll distance it needs. */
  .filmstrip-section--scrubbing .filmstrip-section__stage { height: calc(var(--filmstrip-viewport-height) + var(--filmstrip-scroll-distance)); }
  .filmstrip-section--scrubbing .filmstrip-section__viewport { position: sticky; top: max(0px, calc((100vh - var(--filmstrip-viewport-height)) / 2)); box-sizing: border-box; height: var(--filmstrip-viewport-height); }
  .filmstrip-section--scrubbing .filmstrip { overflow: hidden; }
}

/* Catalog card layout in the artist-page context. Core card styling remains in styles.css/catalog.css. */
.artist-books { width: 100%; margin-top: 44px; }
section[aria-labelledby="upcoming-title"] .artist-books { margin-top: 14px; }
.artist-books--single { grid-template-columns: minmax(0, 260px); max-width: 260px; }
.artist-books .bestsellers__card { min-width: 0; }
.artist-book-card__description { margin: 0; color: var(--ds-color-text-muted); font-size: var(--ds-font-size-title); font-weight: var(--ds-font-weight-medium); line-height: 1.55; }
.artist-book-card__cover-placeholder { display: grid; place-items: center; background: linear-gradient(145deg, var(--color-brown), var(--color-dark)); color: #f7efde; }
.artist-book-card__cover-placeholder span { padding: 9px 18px; border: 1.5px solid rgba(247, 239, 222, .6); border-radius: 999px; font-size: var(--ds-font-size-md); font-weight: var(--ds-font-weight-bold); text-transform: uppercase; letter-spacing: .08em; }

/* ============================================================
   3. НЕПОМНЯЩИЙ + ПОПУГАЕВА — в четыре руки
   ============================================================ */
.duo-hero { padding-bottom: var(--ds-section-space-bottom); }
.duo-hero__grid { display: grid; grid-template-columns: minmax(300px, .58fr) minmax(0, 1fr); gap: 60px; align-items: start; }

.duo-portrait-wrap { position: relative; }
.duo-portrait-wrap img { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 18px; box-shadow: 0 26px 48px rgba(35, 30, 19, .18); }
.duo-portrait-wrap__roles { display: flex; margin-top: 16px; gap: 12px; }
.duo-portrait-wrap__roles span { flex: 1; padding: 10px 14px; border-radius: 10px; background: rgba(255, 255, 255, .6); text-align: center; font-size: var(--ds-font-size-md); font-weight: var(--ds-font-weight-bold); color: var(--color-brown); }

.duo-hero h1 { font-size: clamp(28px, 3.2vw, 44px); line-height: 1.15; margin-bottom: 0; }
.duo-hero__role { margin: 18px 0 22px; color: var(--color-brown); font-weight: var(--ds-font-weight-bold); }

.duo-roles-split { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-top: 34px; }
.duo-roles-split article { padding: 24px; border-radius: var(--ds-radius-lg); background: rgba(255, 255, 255, .55); box-shadow: var(--ds-shadow-card); }
.duo-roles-split p:first-child { margin: 0 0 8px; color: var(--color-brown); font-size: var(--ds-font-size-md); font-weight: var(--ds-font-weight-bold); text-transform: uppercase; letter-spacing: .06em; }
.duo-roles-split h3 { margin: 0 0 8px; font-family: var(--font-heading); font-size: var(--ds-font-size-lead); font-weight: var(--ds-font-weight-medium); }
.duo-roles-split p:last-child { margin: 0; color: var(--ds-color-text-muted); font-size: var(--ds-font-size-title); font-weight: var(--ds-font-weight-medium); line-height: 1.55; }

.tandem-quote { position: relative; max-width: 720px; margin: 44px 0 0; padding: 32px 40px 30px 34px; border-left: 4px solid var(--color-brown); background: rgba(255, 255, 255, .62); border-radius: 0 var(--ds-radius-lg) var(--ds-radius-lg) 0; box-shadow: var(--ds-shadow-card); }
.tandem-quote p { margin: 0; font-family: var(--font-heading); font-size: 24px; font-weight: var(--ds-font-weight-bold); line-height: 1.4; color: var(--color-text); }
.tandem-quote cite { display: block; margin-top: 16px; color: var(--color-brown); font-family: var(--font-body); font-size: var(--ds-font-size-md); font-weight: var(--ds-font-weight-bold); font-style: normal; }

.duo-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 40px; }
.duo-stats article { padding: 32px 28px; border-radius: var(--ds-radius-lg); background: rgba(255, 255, 255, .65); border: 1px solid rgba(114, 64, 30, .14); box-shadow: var(--ds-shadow-card); color: var(--color-text); }
.duo-stats article:first-child strong { display: block; color: var(--color-brown); font-family: var(--font-heading); font-size: clamp(38px, 4vw, 56px); font-weight: var(--ds-font-weight-medium); line-height: 1; }
.duo-stats article:first-child span { display: block; margin-top: 10px; color: var(--ds-color-text-muted); font-size: var(--ds-font-size-title); font-weight: var(--ds-font-weight-medium); line-height: 1.5; }
.duo-stats article:last-child p { margin: 0; color: var(--color-text); font-size: var(--ds-font-size-title); font-weight: var(--ds-font-weight-medium); line-height: 1.55; }
.duo-stats article:last-child p:first-child { margin-bottom: 10px; color: var(--color-brown); font-size: var(--ds-font-size-md); font-weight: var(--ds-font-weight-bold); text-transform: uppercase; letter-spacing: .06em; }

.tag-cloud-section { background: var(--ds-color-canvas); }
.tag-cloud-group { margin-top: 32px; }
.tag-cloud-group:first-of-type { margin-top: 40px; }
.tag-cloud-group h3 { margin: 0 0 16px; color: var(--color-brown); font-size: var(--ds-font-size-md); font-weight: var(--ds-font-weight-bold); text-transform: uppercase; letter-spacing: .06em; }
.tag-cloud-group .publisher-pills { margin: 0; }

/* Interactive focus states shared across profile pages */
.filmstrip__frame:focus-visible,
.duo-roles-split article:focus-visible {
  outline: 3px solid var(--color-brown);
  outline-offset: 3px;
}

/* ============================================================
   Responsive — breakpoints match content-pages.css (1024/768/480)
   ============================================================ */
@media (max-width: 1024px) {
  .nenov-hero__grid,
  .pustovit-hero__grid,
  .duo-hero__grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .nenov-hero__grid > div,
  .pustovit-hero__grid > div,
  .duo-hero__grid > div {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 680px;
    margin-inline: auto;
  }

  .content-hero__eyebrow {
    margin-top: 0;
    margin-bottom: 12px;
    text-align: center;
    margin-inline: auto;
  }

  .content-hero h1 {
    text-align: center;
    margin-bottom: 16px;
  }

  .nenov-hero__role,
  .pustovit-hero__role,
  .duo-hero__role {
    margin: 10px 0 18px;
    text-align: center;
  }

  .content-hero__lead {
    text-align: center;
    margin-inline: auto;
  }

  /* Portraits and hero images become full-width on single-column layouts */
  .artist-hero__portrait,
  .artist-hero__portrait img,
  .artist-hero__portrait picture,
  .duo-portrait-wrap img,
  .duo-portrait-wrap {
    width: 100%;
  }

  .artist-hero__portrait {
    max-width: 360px;
    height: auto;
    aspect-ratio: auto;
    margin: 0 auto;
  }

  .artist-hero__image {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
  }

  .duo-portrait-wrap {
    max-width: 360px;
    margin: 0 auto;
  }

  .duo-roles-split {
    grid-template-columns: 1fr;
  }

  .duo-stats {
    grid-template-columns: 1fr;
  }

  /* Cap image heights to avoid overly tall images on narrow viewports */
  .artist-hero__portrait img,
  .artist-hero__portrait picture,
  .duo-portrait-wrap img,
  .duo-portrait-wrap picture {
    height: auto;
    max-height: 80vh;
    object-fit: cover;
    object-position: top;
  }

  /* Центрирование заголовков и контента в секциях страниц художников */
  section[aria-labelledby="publishers-title"],
  section[aria-labelledby="quote-title"],
  section[aria-labelledby="pustovit-books-title"],
  section[aria-labelledby="upcoming-title"],
  section[aria-labelledby="roles-title"],
  section[aria-labelledby="stats-title"],
  section[aria-labelledby="filmstrip-title"],
  .tag-cloud-section {
    text-align: center;
  }

  section[aria-labelledby="publishers-title"] .content-label,
  section[aria-labelledby="publishers-title"] .ds-section__title,
  section[aria-labelledby="publishers-title"] .illustration-note__copy,
  section[aria-labelledby="quote-title"] .content-label,
  section[aria-labelledby="quote-title"] .ds-section__title,
  section[aria-labelledby="quote-title"] .illustration-note__copy,
  section[aria-labelledby="pustovit-books-title"] .content-label,
  section[aria-labelledby="pustovit-books-title"] .ds-section__title,
  section[aria-labelledby="pustovit-books-title"] .illustration-note__copy,
  section[aria-labelledby="upcoming-title"] .content-label,
  section[aria-labelledby="upcoming-title"] .ds-section__title,
  section[aria-labelledby="upcoming-title"] .illustration-note__copy,
  section[aria-labelledby="roles-title"] .content-label,
  section[aria-labelledby="roles-title"] .ds-section__title,
  section[aria-labelledby="stats-title"] .content-label,
  section[aria-labelledby="stats-title"] .ds-section__title,
  section[aria-labelledby="filmstrip-title"] .content-label,
  section[aria-labelledby="filmstrip-title"] .ds-section__title,
  .tag-cloud-section .content-label,
  .tag-cloud-section .ds-section__title,
  .tag-cloud-section .illustration-note__copy {
    text-align: center;
    margin-inline: auto;
  }

  .tag-cloud-group h3 {
    text-align: center;
  }

  .tag-cloud-section .tag-list {
    justify-content: center;
  }

  .tandem-quote {
    margin-inline: auto;
  }

  .duo-stats {
    max-width: 680px;
    margin-inline: auto;
  }

  .publisher-pills {
    justify-content: center;
  }

  .artist-books--single {
    margin-inline: auto;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .path-list { max-width: none; }
  .manuscript-quote, .tandem-quote { padding: 28px 24px 26px 40px; }
  .manuscript-quote p, .tandem-quote p { font-size: var(--ds-font-size-lead); }
  .nenov-hero__grid,
  .pustovit-hero__grid,
  .duo-hero__grid {
    gap: 24px;
  }
  .artist-hero__portrait { width: 100%; max-width: 320px; height: auto; aspect-ratio: auto; margin: 0 auto; }
  .duo-portrait-wrap { width: 100%; max-width: 320px; min-width: 0; margin: 0 auto; }
  .duo-portrait-wrap img { width: 100%; height: auto; aspect-ratio: 3 / 4; }
  .filmstrip__frame { flex-basis: min(78vw, 260px); }
  .artist-books,
  .artist-books--single { grid-template-columns: 1fr; max-width: none; }
  .duo-portrait-wrap__roles { flex-direction: column; }
  .publisher-pills li { font-size: var(--ds-font-size-sm); padding: 8px 14px; }
  section[aria-labelledby="upcoming-title"] .artist-books { margin-top: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .filmstrip { scroll-behavior: auto; }
}
