:root {
  --ink: #171717;
  --muted: #626262;
  --paper: #ffffff;
  --field: #f0f0ed;
  --night: #121212;
  --red: #e2473f;
  --page: 1280px;
  --measure: 66ch;
  --gutter: clamp(20px, 4vw, 56px);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --ease-out: cubic-bezier(.23, 1, .32, 1);
}

* { box-sizing: border-box; }

html {
  background: var(--paper);
  scroll-behavior: smooth;
}

body.kasta-page {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font);
  font-size: 18px;
  line-height: 1.62;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

.kasta-page main a,
.kasta-page main a:visited { color: var(--red); }
.kasta-page main img { max-width: 100%; }

.skip-link {
  position: fixed;
  z-index: 1100;
  top: 8px;
  left: 8px;
  padding: 10px 14px;
  color: #fff !important;
  background: var(--ink);
  transform: translateY(-140%);
  transition: transform 160ms var(--ease-out);
}

.skip-link:focus { transform: translateY(0); }

.interview-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(520px, .95fr) minmax(0, 1.05fr);
  width: 100%;
  min-height: min(760px, calc(100svh - 90px));
  color: #fff;
  background: var(--night);
}

.hero-photo {
  grid-column: 2;
  grid-row: 1;
  width: 100%;
  height: 100%;
  max-width: none !important;
  object-fit: cover;
  object-position: 68% center;
}

.hero-grid {
  z-index: 1;
  grid-column: 1;
  grid-row: 1;
  display: flex;
  align-items: flex-end;
  min-width: 0;
  padding: clamp(64px, 8vw, 110px) var(--gutter);
}

.hero-copy {
  width: 100%;
  max-width: 560px;
}

.interview-hero h1 {
  margin: 0;
  font-size: clamp(44px, 4vw, 62px);
  font-weight: 760;
  letter-spacing: -.055em;
  line-height: .98;
  text-wrap: balance;
}

.hero-title-location,
.hero-title-quote {
  display: block;
  white-space: nowrap;
}
.hero-title-quote { margin-top: .12em; }

.hero-deck {
  max-width: 44ch;
  margin: 30px 0 0;
  color: rgba(255, 255, 255, .83);
  font-size: clamp(17px, 1.5vw, 21px);
  line-height: 1.5;
  text-wrap: pretty;
}

.hero-byline {
  margin: 24px 0 0;
  color: rgba(255, 255, 255, .58);
  font-size: 14px;
  line-height: 1.45;
}

.contact-sheet {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 6px;
  padding: 6px;
  background: var(--night);
}

.contact-sheet figure {
  grid-column: span 1;
  min-width: 0;
  height: clamp(112px, 12vw, 180px);
  margin: 0;
  overflow: hidden;
  background: #272727;
  transition: opacity 180ms ease, transform 180ms var(--ease-out);
}

.contact-sheet .contact-frame--wide { grid-column: span 2; }

.contact-sheet img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.contact-sheet figure:first-child img { object-position: center 28%; }
.contact-sheet figure:last-child img { object-position: center 38%; }

.article-intro,
.question,
.comments-section,
.editorial-photo {
  width: min(calc(100% - (var(--gutter) * 2)), var(--page));
  margin-inline: auto;
}

.article-intro {
  padding-block: clamp(88px, 10vw, 148px);
}

.intro-copy {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) minmax(0, 2.15fr);
  gap: clamp(42px, 7vw, 104px);
  align-items: start;
}

.intro-copy .intro-text {
  grid-column: 2;
  grid-row: 1;
  max-width: 56ch;
  margin: 0;
  font-size: clamp(24px, 2.3vw, 34px);
  font-weight: 570;
  letter-spacing: -.025em;
  line-height: 1.33;
  text-wrap: pretty;
}

.intro-copy .intro-event {
  grid-column: 1;
  grid-row: 1;
  margin: .35em 0 0;
  color: var(--muted);
  font-size: 15px;
  font-weight: 650;
  line-height: 1.55;
}

.format-intro {
  width: 100%;
  margin: 0;
  padding: clamp(72px, 8vw, 118px) max(var(--gutter), calc((100vw - var(--page)) / 2 + var(--gutter)));
  color: #fff;
  background: var(--red);
}

.format-intro p {
  margin: 0 0 18px;
  color: rgba(255, 255, 255, .72);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.3;
}

.format-intro h2 {
  max-width: 16ch;
  margin: 0;
  font-size: clamp(42px, 6vw, 82px);
  font-weight: 760;
  letter-spacing: -.055em;
  line-height: .98;
  text-wrap: balance;
}

.questions {
  padding: 0;
  background: var(--paper);
}

.questions--feature-final { padding-bottom: clamp(72px, 9vw, 122px); }

.question {
  padding-block: clamp(84px, 10vw, 150px);
  scroll-margin-top: 96px;
}

.question:nth-child(even) {
  width: 100%;
  padding-inline: max(var(--gutter), calc((100vw - var(--page)) / 2 + var(--gutter)));
  background: var(--field);
}

.question-body {
  display: grid;
  grid-template-columns: minmax(240px, 370px) minmax(0, 1fr);
  gap: clamp(52px, 7vw, 112px);
  align-items: start;
  width: 100%;
  max-width: var(--page);
  margin-inline: auto;
}

.question h2 {
  position: sticky;
  top: 118px;
  max-width: 18ch;
  margin: 0;
  font-size: clamp(27px, 2.6vw, 39px);
  font-weight: 720;
  letter-spacing: -.038em;
  line-height: 1.16;
  text-wrap: pretty;
}

.question h2::before {
  position: absolute;
  left: -1.25em;
  color: var(--red);
  content: "—";
}

.answers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(36px, 5vw, 72px) clamp(30px, 4vw, 58px);
  min-width: 0;
}

.answer {
  --speaker: var(--red);
  min-width: 0;
  padding-top: 0;
}

.answer[data-speaker="Хамиль"] { --speaker: #b23b34; }
.answer[data-speaker="Шым"] { --speaker: #8f322d; }
.answer[data-speaker="Змей"] { --speaker: #6f2925; }

.answer-name {
  display: block;
  margin: 0 0 12px;
  color: var(--speaker);
  font-size: 14px;
  font-weight: 760;
  line-height: 1.3;
}

.answer-name::after { content: ":"; }

.answer-text {
  display: block;
  max-width: var(--measure);
  font-size: clamp(17px, 1.35vw, 20px);
  line-height: 1.66;
  text-wrap: pretty;
}

.answer-text p { margin: 0; }
.answer-text p + p { margin-top: 1em; }
.keep { white-space: nowrap; }

.answer-portrait {
  float: left;
  width: 72px;
  height: 92px;
  margin: 3px 16px 8px 0;
  overflow: hidden;
  background: #ddd;
}

.answer-portrait img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
}

.answer-portrait figcaption { display: none; }

.portrait-gallery {
  display: none;
}

.editorial-photo {
  margin-top: clamp(10px, 2vw, 28px);
  margin-bottom: clamp(88px, 11vw, 150px);
}

.editorial-photo img {
  display: block;
  width: 100%;
  height: min(68vw, 820px);
  object-fit: cover;
  background: #eee;
}

.editorial-photo--wide img { object-position: center 45%; }

.editorial-photo--portrait {
  display: grid;
  grid-template-columns: 1.35fr .65fr;
  gap: clamp(28px, 5vw, 72px);
  align-items: end;
  width: min(calc(100% - (var(--gutter) * 2)), 980px);
}

.editorial-photo--portrait img {
  height: auto;
  aspect-ratio: 3 / 4;
}

.editorial-photo figcaption {
  max-width: 28ch;
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.interview-signoff {
  grid-column: 1 / -1;
  max-width: 30ch;
  margin: 14px 0 0;
  color: var(--red);
  font-size: clamp(22px, 2vw, 28px);
  font-weight: 720;
  letter-spacing: -.02em;
  line-height: 1.35;
}

.comments-section {
  width: min(calc(100% - (var(--gutter) * 2)), 960px);
  padding-block: clamp(72px, 9vw, 118px);
}

.comments-section h2 {
  margin: 0 0 38px;
  font-size: clamp(36px, 4vw, 54px);
  font-weight: 740;
  letter-spacing: -.04em;
  line-height: 1.08;
}

.source-note {
  max-width: var(--measure);
  margin: 30px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.kasta-page :focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 3px;
}

.js-motion .question,
.js-motion .editorial-photo,
.js-motion .format-intro {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 340ms ease, transform 340ms var(--ease-out);
}

.js-motion .question.is-visible,
.js-motion .editorial-photo.is-visible,
.js-motion .format-intro.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (hover: hover) and (pointer: fine) {
  .contact-sheet:has(figure:hover) figure:not(:hover) { opacity: .34; }
  .contact-sheet figure:hover { transform: translateY(-4px); }
}

@media (max-width: 1080px) {
  .interview-hero {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .hero-photo {
    grid-column: 1;
    grid-row: 1;
    height: auto;
    aspect-ratio: 16 / 9;
  }

  .hero-grid {
    grid-column: 1;
    grid-row: 2;
    padding-block: 52px 60px;
  }

  .contact-sheet {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .contact-sheet figure { height: clamp(118px, 22vw, 220px); }

  .contact-sheet figure:first-child {
    background: #111;
  }

  .contact-sheet figure:first-child img {
    object-fit: contain;
    object-position: center;
  }

  .keep { white-space: normal; }
}

@media (max-width: 780px) {
  body.kasta-page { font-size: 17px; }

  .hero-photo {
    aspect-ratio: 6 / 5;
    object-position: 73% center;
  }

  .hero-grid {
    padding: 34px 20px 42px;
  }

  .interview-hero h1 {
    font-size: clamp(26px, 7.2vw, 30px);
    line-height: 1.01;
  }

  .hero-deck {
    margin-top: 22px;
    font-size: 17px;
  }

  .hero-byline { margin-top: 20px; font-size: 13px; }

  .contact-sheet {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
    padding: 4px;
  }

  .contact-sheet figure,
  .contact-sheet .contact-frame--wide {
    grid-column: span 1;
    height: 118px;
  }

  .contact-sheet .contact-frame--wide { grid-column: span 2; }

  .article-intro { padding-block: 62px 76px; }

  .intro-copy {
    display: flex;
    flex-direction: column;
    gap: 34px;
  }

  .intro-copy .intro-text { order: 1; font-size: 21px; line-height: 1.46; }
  .intro-copy .intro-event { order: 2; margin: 0; font-size: 15px; }

  .format-intro {
    padding: 62px 20px 68px;
  }

  .format-intro h2 {
    max-width: 11ch;
    font-size: clamp(38px, 12vw, 58px);
  }

  .question,
  .question:nth-child(even) {
    width: 100%;
    padding: 72px 20px 82px;
  }

  .question-body { display: block; }

  .question h2 {
    position: relative;
    top: auto;
    max-width: none;
    margin-bottom: 44px;
    padding-left: 1.25em;
    font-size: clamp(25px, 7.4vw, 32px);
    line-height: 1.2;
  }

  .question h2::before { left: 0; }

  .answers {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .answer-name { margin-bottom: 8px; }
  .answer-text { font-size: 18px; line-height: 1.64; }

  .answer-portrait {
    width: 92px;
    height: 118px;
    margin-right: 15px;
  }

  .editorial-photo,
  .editorial-photo--portrait {
    display: block;
    width: 100%;
    margin-bottom: 88px;
  }

  .editorial-photo img,
  .editorial-photo--portrait img {
    width: 100%;
    height: auto;
    aspect-ratio: auto;
  }

  .editorial-photo figcaption {
    margin: 12px 20px 0;
  }

  .comments-section { padding-block: 64px 86px; }
  .keep { white-space: normal; }
}

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

  .js-motion .question,
  .js-motion .editorial-photo,
  .js-motion .format-intro {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .contact-sheet figure { transition: none; }
}

@media print {
  .site-header,
  .site-footer,
  .comments-section,
  .contact-sheet { display: none !important; }

  .interview-hero {
    display: block;
    min-height: 0;
    color: #000;
    background: #fff;
  }

  .hero-photo { display: none; }
  .hero-grid { display: block; padding: 2cm 0 1cm; }
  .hero-deck, .hero-byline { color: #333; }
  .question, .question:nth-child(even) { width: 100%; padding: 1cm 0; background: #fff; }
  .question h2 { position: static; }
  .answer-text p { orphans: 3; widows: 3; }
}
