:root {
  --bg: #151515;
  --bg-soft: #1e1e1c;
  --panel: #24231f;
  --text: #fffaf0;
  --muted: #c9c1b3;
  --accent: #ff9d00;
  --accent-2: #ffd23f;
  --accent-deep: #e96800;
  --line: rgba(255, 210, 63, 0.2);
  --shadow: 0 28px 70px rgba(0, 0, 0, 0.28);
  --radius: 28px;
  --radius-sm: 18px;
  --shell: min(1180px, calc(100% - 48px));
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background:
    radial-gradient(
      circle at 15% 8%,
      rgba(255, 157, 0, 0.08),
      transparent 28rem
    ),
    var(--bg);
  color: var(--text);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  line-height: 1.68;
  overflow-x: hidden;
}
body.no-scroll {
  overflow: hidden;
}
img,
video {
  display: block;
  width: 100%;
}
button,
a {
  font: inherit;
}
.shell {
  width: var(--shell);
  margin-inline: auto;
}

h1,
h2 {
  margin: 0;
  line-height: 0.98;
  letter-spacing: -0.045em;
}
h1 {
  font-size: clamp(4.4rem, 10vw, 9rem);
  max-width: 7ch;
}
h1 span {
  color: var(--accent-2);
}
h2 {
  font-size: clamp(2.5rem, 5vw, 5rem);
  max-width: 10ch;
}
p {
  margin: 0 0 1.15em;
}

.hero {
  min-height: 100svh;
  position: relative;
  display: grid;
  align-items: center;
  padding: 72px 0;
  isolation: isolate;
}
.hero::before {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.5;
}
.hero__glow {
  position: absolute;
  z-index: -1;
  border-radius: 999px;
  filter: blur(18px);
  opacity: 0.48;
}
.hero__glow--one {
  width: 360px;
  height: 360px;
  right: 3vw;
  top: 8vh;
  background: rgba(255, 157, 0, 0.33);
}
.hero__glow--two {
  width: 250px;
  height: 250px;
  left: -100px;
  bottom: 5vh;
  background: rgba(255, 210, 63, 0.18);
}
.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(340px, 0.88fr);
  gap: clamp(38px, 7vw, 110px);
  align-items: center;
}
.hero__copy > p:not(.eyebrow) {
  max-width: 700px;
  color: #eee8dc;
  font-size: clamp(1.05rem, 1.4vw, 1.28rem);
}
.hero__lead {
  margin-top: 34px;
  color: var(--accent-2) !important;
  font-weight: 800;
}
.eyebrow,
.chapter-number {
  margin-bottom: 18px;
  color: var(--accent-2);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  margin-top: 16px;
  padding: 12px 22px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  color: #18130b;
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 12px 28px rgba(255, 157, 0, 0.18);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}
.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(255, 157, 0, 0.28);
}
.button--light {
  background: #fff7df;
}

.hero-card,
.media-card,
.video-card,
.photoset__item {
  margin: 0;
  cursor: zoom-in;
}
.hero-card {
  transform: rotate(2.5deg);
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 32px;
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.08),
    rgba(255, 255, 255, 0.02)
  );
  box-shadow: var(--shadow);
}
.hero-card figcaption {
  padding: 16px 6px 4px;
  color: var(--accent-2);
  font-weight: 700;
}

.media-frame,
.video-preview {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-sm);
  background: #2d2c27;
}
.media-frame--portrait {
  aspect-ratio: 4 / 5;
}
.media-frame--wide {
  aspect-ratio: 16 / 10;
}
.media-frame--hero {
  aspect-ratio: 4 / 5;
}
.media-frame img,
.video-preview video {
  height: 100%;
  object-fit: cover;
  transition:
    transform 0.45s cubic-bezier(0.2, 0.7, 0.2, 1),
    filter 0.3s ease;
}
.js-zoom:hover .media-frame img,
.js-zoom:hover .video-preview video {
  transform: scale(1.035);
  filter: saturate(1.05);
}
.media-card figcaption,
.video-card figcaption,
.group-caption {
  margin: 12px 2px 12px;
  color: var(--muted);
  font-size: 0.93rem;
  line-height: 1.5;
}
.group-caption {
  grid-column: 1 / -1;
}
.media-missing {
  display: none;
}

.chapter {
  padding: clamp(76px, 10vw, 150px) 0;
}
.chapter--accent {
  background:
    linear-gradient(180deg, rgba(255, 157, 0, 0.035), rgba(255, 210, 63, 0.02)),
    var(--bg-soft);
  border-block: 1px solid var(--line);
}
.chapter--media-band {
  padding-block: 54px;
}
.chapter--gallery {
  padding-top: clamp(72px, 9vw, 120px);
}
.chapter--final-story {
  border-top: 1px solid var(--line);
}
.story-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(46px, 8vw, 116px);
  align-items: start;
}
.story-grid--reverse {
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
}
.story-copy {
  max-width: 620px;
}
.story-copy--large {
  max-width: 760px;
}
.story-copy--narrow {
  max-width: 760px;
  margin: 0 auto 56px;
  text-align: center;
}
.story-copy p:not(.chapter-number) {
  color: #e7e0d4;
  font-size: clamp(1rem, 1.25vw, 1.14rem);
}
.story-copy h2 {
  margin-bottom: 34px;
}
.media-stack {
  display: grid;
  gap: 28px;
}
.media-card--offset {
  width: 82%;
  margin-left: auto;
  transform: translateX(3%);
}
.media-card--wide {
  width: 100%;
}
.media-cluster {
  display: grid;
  gap: 28px;
}

.paired-media,
.triple-media,
.six-media,
.band-grid,
.video-grid,
.photoset {
  display: grid;
  gap: 18px;
}
.paired-media {
  grid-template-columns: repeat(2, 1fr);
}
.paired-media--compact {
  gap: 14px;
}
.triple-media {
  grid-template-columns: repeat(3, 1fr);
}
.six-media {
  grid-template-columns: repeat(3, 1fr);
}
.six-media--feature {
  max-width: 980px;
  margin-inline: auto;
}
.band-grid {
  grid-template-columns: 1fr 1.2fr 0.8fr;
  align-items: start;
}

.section-heading {
  margin-bottom: 42px;
}
.section-heading h2 {
  max-width: 12ch;
}
.section-heading--split {
  display: flex;
  gap: 32px;
  justify-content: space-between;
  align-items: end;
}
.section-heading--split > p {
  max-width: 320px;
  color: var(--muted);
  margin: 0;
}

.chapter--video {
  background: #10100f;
}
.video-grid {
  grid-template-columns: repeat(12, 1fr);
}
.video-card {
  grid-column: span 4;
}
.video-card:nth-child(1),
.video-card:nth-child(4) {
  grid-column: span 7;
}
.video-card:nth-child(2),
.video-card:nth-child(5) {
  grid-column: span 5;
}
.video-card:nth-child(3) {
  grid-column: 4 / span 6;
}
.video-preview {
  aspect-ratio: 16 / 10;
}
.video-preview span {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: rgba(255, 210, 63, 0.92);
  color: #17130a;
  font-size: 1.35rem;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
  pointer-events: none;
}

.photoset {
  grid-template-columns: repeat(12, 1fr);
  grid-auto-flow: dense;
}
.photoset__item {
  grid-column: span 3;
}
.photoset__item:nth-child(7n + 1),
.photoset__item:nth-child(7n + 5) {
  grid-column: span 6;
}
.photoset__item:nth-child(7n + 3) {
  grid-column: span 4;
}
/* .photoset__item .media-frame {
  aspect-ratio: 1 / 1;
}
.photoset__item:nth-child(7n + 1) .media-frame {
  aspect-ratio: 16 / 9;
}
.photoset__item:nth-child(7n + 5) .media-frame {
  aspect-ratio: 3 / 2;
} */

.video-final-grid {
  display: grid;
  grid-template-columns: 0.7fr 1.3fr;
  gap: clamp(40px, 7vw, 100px);
  align-items: center;
}
.video-preview--feature {
  aspect-ratio: 16 / 9;
}
.video-card--feature figcaption {
  font-size: 1rem;
}

.cta {
  padding: clamp(90px, 13vw, 170px) 0;
  background: linear-gradient(
    135deg,
    var(--accent-deep),
    var(--accent),
    var(--accent-2)
  );
  color: #1b1306;
  text-align: center;
}
.cta__inner {
  max-width: 860px;
}
.cta h2 {
  max-width: 11ch;
  margin: 0 auto 26px;
  font-size: clamp(3rem, 7vw, 6.8rem);
}
.cta p {
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  font-weight: 700;
}
.paw {
  width: 54px;
  height: 54px;
  margin-inline: auto !important;
  border-radius: 50%;
  background: #1b1306;
  color: transparent;
  position: relative;
}
.paw::before,
.paw::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #1b1306;
  top: -15px;
}
.paw::before {
  left: 4px;
}
.paw::after {
  right: 4px;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: none;
  grid-template-rows: 1fr auto;
  place-items: center;
  padding: 28px;
  background: rgba(5, 5, 5, 0.94);
  backdrop-filter: blur(14px);
}
.lightbox.is-open {
  display: grid;
}
.lightbox__content {
  width: min(92vw, 1280px);
  height: min(82vh, 900px);
  display: grid;
  place-items: center;
}
.lightbox__content img,
.lightbox__content video {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 16px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
}
.lightbox__content video {
  width: min(100%, 1180px);
}
.lightbox__caption {
  max-width: 850px;
  margin: 20px auto 0;
  color: #eee4d3;
  text-align: center;
}
.lightbox__close {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 2;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: var(--accent-2);
  color: #15100a;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}

@media (max-width: 980px) {
  :root {
    --shell: min(100% - 36px, 900px);
  }
  .hero {
    min-height: auto;
    padding-top: 56px;
  }
  .hero__inner,
  .story-grid,
  .story-grid--reverse,
  .video-final-grid {
    grid-template-columns: 1fr;
  }
  .hero-card {
    width: min(620px, 86%);
    justify-self: end;
  }
  .story-copy {
    max-width: 760px;
  }
  .story-grid--reverse .media-cluster {
    order: 2;
  }
  .band-grid {
    grid-template-columns: 1fr 1fr;
  }
  .band-grid > :nth-child(2) {
    grid-column: 1 / -1;
    order: -1;
  }
  .video-card,
  .video-card:nth-child(n) {
    grid-column: span 6;
  }
  .video-card:nth-child(5) {
    grid-column: 4 / span 6;
  }
  .photoset__item {
    grid-column: span 4;
  }
  .photoset__item:nth-child(7n + 1),
  .photoset__item:nth-child(7n + 5) {
    grid-column: span 6;
  }
}

@media (max-width: 680px) {
  :root {
    --shell: min(100% - 28px, 620px);
    --radius: 22px;
    --radius-sm: 15px;
  }
  body {
    line-height: 1.62;
  }
  .hero {
    padding: 42px 0 64px;
  }
  .hero__inner {
    gap: 40px;
  }
  h1 {
    font-size: clamp(4rem, 21vw, 7rem);
  }
  h2 {
    font-size: clamp(2.55rem, 13vw, 4.5rem);
  }
  .hero-card {
    width: 92%;
    transform: rotate(1.5deg);
  }
  .chapter {
    padding: 78px 0;
  }
  .story-copy--narrow {
    text-align: left;
    margin-bottom: 36px;
  }
  .story-copy p:not(.chapter-number) {
    font-size: 1rem;
  }
  .media-card--offset {
    width: 90%;
  }
  .paired-media,
  .triple-media,
  .six-media,
  .band-grid {
    gap: 10px;
  }
  .triple-media {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .six-media {
    grid-template-columns: repeat(2, 1fr);
  }
  .band-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .band-grid > :nth-child(2) {
    grid-column: auto;
  }
  .video-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .video-card,
  .video-card:nth-child(n) {
    grid-column: auto;
  }
  .video-preview span {
    width: 54px;
    height: 54px;
  }
  .section-heading--split {
    display: block;
  }
  .section-heading--split > p {
    margin-top: 20px;
  }
  .photoset {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .photoset__item,
  .photoset__item:nth-child(n) {
    grid-column: span 1;
  }
  .photoset__item:nth-child(5n + 1) {
    grid-column: 1 / -1;
  }
  .photoset__item:nth-child(5n + 1) .media-frame {
    aspect-ratio: 16 / 10;
  }
  .lightbox {
    padding: 14px;
  }
  .lightbox__content {
    width: 94vw;
    height: 76vh;
  }
  .lightbox__caption {
    font-size: 0.9rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

/* === Iriska media update === */
/* All regular photos are 960x1280 (3:4), so their cards keep that proportion. */
.media-frame,
.media-frame--portrait,
.media-frame--wide,
.media-frame--hero {
  aspect-ratio: 3 / 4;
}

.media-frame img {
  object-fit: cover;
}

/* Vertical videos: preview and lightbox preserve the full 9:16 frame. */
.video-preview,
.video-preview--feature {
  aspect-ratio: 9 / 16;
}

.video-preview video {
  object-fit: contain;
  background: #0d0d0c;
}

/* Chapter 02 video arrangement */
.chapter-inline-media--02 {
  margin-top: 64px;
  margin-left: clamp(0px, 10vw, 150px);
  max-width: 850px;
}
.video-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}
.video-pair + .video-pair {
  margin-top: 34px;
}
.video-pair--bottom {
  max-width: 680px;
  margin-inline: auto;
}

/* Summer block: no tiny collage thumbnails. */
.summer-media {
  display: grid;
  gap: 30px;
}
.summer-feature-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  align-items: start;
}
.collage-card {
  max-width: 920px;
  margin-inline: auto;
  width: 100%;
}
.media-frame--collage {
  aspect-ratio: auto;
  background: #24231f;
}
.media-frame--collage img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

/* Photosessions become horizontal sliders rather than a tiny mosaic. */
.photoset {
  position: relative;
  display: block;
  padding-inline: 62px;
}
.photoset__viewport {
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.photoset__viewport::-webkit-scrollbar {
  display: none;
}
.photoset__track {
  display: flex;
  gap: 18px;
  width: max-content;
  align-items: center;
}
.photoset__item {
  flex: 0 0 clamp(230px, 28vw, 340px);
  scroll-snap-align: start;
}
.photoset__item .media-frame {
  aspect-ratio: auto;
  height: auto;
}
.photoset__item .media-frame img {
  width: 100%;
  aspect-ratio: auto;
  object-fit: cover;
  border-radius: var(--radius-sm);
}
.photoset__nav {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  background: rgba(36, 35, 31, 0.92);
  color: var(--accent-2);
  font-size: 1.35rem;
  cursor: pointer;
  transform: translateY(-50%);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
}
.photoset__nav:hover {
  background: var(--accent);
  color: #17130a;
}
.photoset__nav--prev {
  left: 0;
}
.photoset__nav--next {
  right: 0;
}

/* Contacts on the final screen. */
.cta {
  background:
    radial-gradient(
      circle at 50% 20%,
      rgba(255, 157, 0, 0.09),
      transparent 34rem
    ),
    #171716;
  color: var(--text);
  border-top: 1px solid var(--line);
}
.cta h2 {
  color: var(--text);
}
.cta p {
  color: var(--muted);
}
.contacts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  max-width: 760px;
  margin: 64px auto 0;
  text-align: left;
}
.contact-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.035);
}
.contact-photo {
  flex: 0 0 108px;
  width: 108px;
  height: 108px;
  overflow: hidden;
  border: 3px solid rgba(255, 210, 63, 0.75);
  border-radius: 50%;
  background: #24231f;
}
.contact-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.contact-info h3 {
  margin: 0 0 8px;
  color: var(--accent-2);
  font-size: 1.25rem;
}
.contact-info a {
  display: block;
  color: #eee8dc;
  text-decoration: none;
  font-size: 0.94rem;
  line-height: 1.55;
}
.contact-info a:hover {
  color: var(--accent-2);
}

/* Robust modal: the media area itself is constrained by both viewport dimensions. */
.lightbox {
  display: none;
  place-items: center;
  padding: 16px;
}
.lightbox.is-open {
  display: flex;
  flex-direction: column;
}
.lightbox__content {
  width: min(94vw, 1280px);
  height: calc(100dvh - 100px);
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.lightbox__content img,
.lightbox__content video {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 16px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
}
.lightbox__content.is-video {
  width: min(94vw, 720px);
  height: calc(100dvh - 105px);
}
.lightbox__content.is-video video {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  aspect-ratio: 9 / 16;
  background: #080808;
}
.lightbox__caption {
  flex: 0 0 auto;
  width: min(92vw, 850px);
  max-height: 70px;
  overflow: auto;
  margin: 10px auto 0;
  color: #eee4d3;
  text-align: center;
}

@media (max-width: 980px) {
  .chapter-inline-media--02 {
    margin-left: 0;
    max-width: none;
  }
  .summer-feature-row {
    grid-template-columns: 1fr 1fr;
  }
  .contacts {
    max-width: 700px;
  }
}

@media (max-width: 700px) {
  :root {
    --shell: min(100% - 28px, 600px);
  }
  .video-pair,
  .summer-feature-row,
  .contacts {
    grid-template-columns: 1fr;
  }
  .video-pair--bottom {
    max-width: none;
  }
  .photoset {
    padding-inline: 48px;
  }
  .photoset__item {
    flex-basis: min(calc(100vw - 124px), 310px);
  }
  .photoset__nav {
    width: 40px;
    height: 40px;
  }
  .contact-card {
    padding: 16px;
  }
  .contact-photo {
    flex-basis: 88px;
    width: 88px;
    height: 88px;
  }
  .lightbox {
    padding: 10px;
  }
  .lightbox__content,
  .lightbox__content.is-video {
    width: calc(100vw - 20px);
    height: calc(100dvh - 92px);
  }
  .lightbox__content.is-video video {
    max-width: calc(100vw - 20px);
    max-height: calc(100dvh - 92px);
  }
  .lightbox__caption {
    max-height: 64px;
    font-size: 0.86rem;
  }
}

/* === Final layout refinement === */
/* Compact vertical-video previews: the full frame is still available after click,
   but previews no longer occupy most of the viewport. */
.video-preview,
.video-preview--feature {
  aspect-ratio: 4 / 3;
  max-height: 360px;
}
.video-preview video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #0d0d0c;
}
.video-card {
  max-width: 360px;
}
.video-pair .video-card {
  max-width: 330px;
}
.video-pair--top,
.video-pair--bottom {
  justify-items: center;
}

/* Chapter 02: the walk with Natasha and Lera gets a proper visual block. */
.friends-video-feature {
  display: flex;
  justify-content: center;
  margin: 34px auto 18px;
}
.friends-video-feature .video-card {
  max-width: 330px;
  width: 100%;
}
.friends-walk {
  max-width: 980px;
  margin: 18px auto 0;
}
.friends-walk__photos {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.friends-walk__photos .media-frame {
  aspect-ratio: 3 / 4;
}
.friends-walk .group-caption {
  text-align: center;
}

/* Chapter 04: four media cards in a readable 2×2 arrangement. */
.chapter04-media {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  align-items: start;
}
.chapter04-media .media-card,
.chapter04-media .video-card {
  width: 100%;
  max-width: none;
}
.chapter04-media .media-frame {
  aspect-ratio: 3 / 4;
}
.chapter04-media .video-preview {
  aspect-ratio: 4 / 3;
  max-height: 330px;
}

/* Lightbox: never force a portrait video to exceed either viewport dimension. */
.lightbox {
  padding: 12px;
  overflow: hidden;
}
.lightbox__content,
.lightbox__content.is-video {
  width: min(92vw, 560px);
  height: min(78dvh, 760px);
  min-height: 0;
  max-height: calc(100dvh - 92px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.lightbox__content.is-video video {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  aspect-ratio: auto;
}
.lightbox__content img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

@media (max-width: 700px) {
  .video-preview,
  .video-preview--feature {
    max-height: 300px;
  }
  .friends-walk__photos {
    grid-template-columns: 1fr;
    max-width: 360px;
    margin-inline: auto;
  }
  .chapter04-media {
    grid-template-columns: 1fr;
  }
  .chapter04-media .video-card {
    max-width: 360px;
    margin-inline: auto;
  }
  .lightbox__content,
  .lightbox__content.is-video {
    width: min(92vw, 430px);
    height: calc(100dvh - 120px);
    max-height: calc(100dvh - 120px);
  }
}

/* === Final media layout correction === */
.story-grid > * {
  min-width: 0;
}

/* Vertical videos are intentionally compact in the page preview. */
.video-card {
  width: min(100%, 240px);
  max-width: 240px;
}
.video-preview,
.video-preview--feature {
  width: 100%;
  aspect-ratio: 3 / 4;
  max-height: none;
  border-radius: var(--radius-sm);
  background: #0d0d0c;
}
.video-preview video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Chapter 02: all video material belongs here. */
.chapter02-videos,
.friends-walk {
  grid-column: 1 / -1;
  min-width: 0;
}
.chapter02-videos {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 34px;
  align-items: start;
  justify-content: center;
  max-width: 850px;
  margin: 20px auto 0;
}
.chapter02-videos > .video-card {
  justify-self: center;
}
.chapter02-flip-videos {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 240px));
  gap: 22px;
  align-items: start;
  justify-content: center;
}
.chapter02-flip-videos .video-card {
  width: 100%;
}
.friends-walk {
  max-width: 1000px;
  margin: 42px auto 0;
}
.friends-walk__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}
.friends-walk__grid .media-frame {
  aspect-ratio: 3 / 4;
}
.friends-walk__grid .video-card {
  width: 100%;
  max-width: none;
}
.friends-walk__grid .video-preview {
  aspect-ratio: 3 / 4;
}
.friends-walk > .group-caption {
  text-align: center;
}

/* Chapter 04 must never let the media grid squeeze the text column. */
.chapter04-media {
  min-width: 0;
  width: 100%;
  grid-template-columns: repeat(1, minmax(0, 1fr));
}
.chapter04-media .media-card,
.chapter04-media .video-card {
  min-width: 0;
  width: 100%;
  max-width: none;
}
.chapter04-media .media-frame {
  aspect-ratio: 3 / 4;
}
.chapter04-media .video-preview {
  aspect-ratio: 3 / 4;
}

/* The modal is a viewport-bound stage, not browser fullscreen. */
.lightbox {
  padding: 20px;
  overflow: hidden;
  grid-template-rows: minmax(0, 1fr) auto;
}
.lightbox__content,
.lightbox__content.is-video {
  width: min(92vw, 760px);
  height: min(calc(100dvh - 150px), 820px);
  max-height: calc(100dvh - 150px);
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.lightbox__content img,
.lightbox__content video,
.lightbox__content.is-video video {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  aspect-ratio: auto;
}
.lightbox__content.is-video {
  width: min(92vw, 520px);
}
.lightbox__content.is-video video {
  max-width: min(92vw, 520px);
  max-height: calc(100dvh - 150px);
  background: #080808;
}
.lightbox__caption {
  width: min(90vw, 850px);
  max-height: 64px;
  overflow: auto;
  margin: 10px auto 0;
}

@media (max-width: 980px) {
  .chapter02-videos {
    grid-template-columns: 1fr;
    max-width: 560px;
  }
  .chapter02-flip-videos {
    grid-template-columns: repeat(2, minmax(0, 240px));
  }
  .friends-walk__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 560px;
    margin-inline: auto;
  }
}

@media (max-width: 700px) {
  .video-card,
  .chapter02-flip-videos .video-card {
    width: 210px;
    max-width: 210px;
  }
  .chapter02-videos {
    gap: 28px;
  }
  .chapter02-flip-videos {
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 12px;
    width: 100%;
  }
  .chapter02-flip-videos .video-card {
    width: 100%;
    max-width: none;
  }
  .friends-walk__grid {
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 12px;
  }
  .chapter04-media {
    grid-template-columns: repeat(1, minmax(0, 1fr));
  }
  .lightbox {
    padding: 12px;
  }
  .lightbox__content,
  .lightbox__content.is-video {
    width: calc(100vw - 24px);
    height: calc(100dvh - 128px);
    max-height: calc(100dvh - 128px);
  }
  .lightbox__content.is-video video {
    max-width: calc(100vw - 24px);
    max-height: calc(100dvh - 128px);
  }
}

/* =========================================================
   Final media layout refinements
   ========================================================= */

.media-frame--portrait,
.chapter04-media-grid .media-frame {
  aspect-ratio: 3 / 4;
}

/* Compact landscape preview for vertical videos. Cover images fill this stage;
   videos without a cover remain fully visible with contain. */
.video-preview {
  aspect-ratio: 982 / 660;
  background: #11110f;
  display: grid;
  place-items: center;
}
.video-preview video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #11110f;
}
.video-cover {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.video-preview--feature {
  aspect-ratio: 16 / 9;
}

.chapter02-intro {
  margin-bottom: clamp(56px, 7vw, 96px);
}
.chapter02-media-flow {
  display: grid;
  gap: clamp(42px, 6vw, 76px);
  max-width: 1100px;
  margin-inline: auto;
}
.chapter02-video-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 36px);
  align-items: start;
}
.chapter02-video-row .video-card {
  width: 100%;
  min-width: 0;
}
.chapter02-video-row--first {
  max-width: 900px;
  margin-inline: auto;
}
.chapter02-video-row--flip {
  max-width: 760px;
  margin-inline: auto;
}

.friends-walk--separate {
  width: 100%;
  max-width: 1060px;
  margin-inline: auto;
}
.friends-walk--separate .friends-walk__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(14px, 2vw, 24px);
}
.friends-walk--separate .group-caption {
  margin-top: 14px;
  text-align: center;
}

.chapter04-media-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(18px, 2.5vw, 30px);
  align-items: start;
}
.chapter04-media-grid .media-card,
.chapter04-media-grid .video-card {
  width: 100%;
  min-width: 0;
}
.chapter04-media-grid .media-card--offset {
  width: 100%;
  margin: 0;
  transform: none;
}
.chapter04-media-grid .video-preview {
  width: 100%;
}

.chapter--video-final {
  padding-top: 0;
}

.chapter--video-final .video-card--feature {
  width: 100%;
}
.chapter--video-final .video-preview--feature video {
  object-fit: contain;
}

.lightbox {
  padding: 18px;
}
.lightbox__content {
  width: min(94vw, 1280px);
  height: calc(100dvh - 110px);
  min-height: 0;
  max-height: calc(100dvh - 110px);
}
.lightbox__content.is-video {
  width: min(92vw, 900px);
  height: calc(100dvh - 110px);
  max-height: calc(100dvh - 110px);
}
.lightbox__content.is-video video {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

@media (max-width: 980px) {
  .chapter02-intro {
    margin-bottom: 52px;
  }
  .chapter02-video-row--first,
  .chapter02-video-row--flip {
    max-width: 820px;
  }
}

@media (max-width: 680px) {
  .chapter02-video-row,
  .friends-walk--separate .friends-walk__grid,
  .chapter04-media-grid {
    grid-template-columns: 1fr;
  }
  .chapter02-video-row--flip,
  .chapter02-video-row--first {
    max-width: 520px;
  }
  .video-preview {
    aspect-ratio: 982 / 660;
  }
  .chapter--video-final .video-preview--feature {
    aspect-ratio: 16 / 9;
  }
  .lightbox {
    padding: 10px;
  }
  .lightbox__content,
  .lightbox__content.is-video {
    width: 96vw;
    height: calc(100dvh - 92px);
    max-height: calc(100dvh - 92px);
  }
}

/* =========================================================
   FINAL OVERRIDE — layout stability
   ========================================================= */

.chapter02-video-row > .video-card,
.chapter04-media-grid > .video-card,
.chapter04-media-grid > .media-card,
.video-final-grid > .video-card,
.friends-walk__grid > .media-card {
  grid-column: auto !important;
  min-width: 0;
}

/* ---------- Chapter 02 ---------- */

.chapter02-media-flow {
  width: 100%;
  max-width: 1100px;
  margin-inline: auto;
  display: grid;
  gap: clamp(40px, 5vw, 64px);
}

.chapter02-video-row {
  width: 100%;
  max-width: 900px;
  margin-inline: auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  align-items: start;
}

.chapter02-video-row > .video-card {
  width: 100%;
  max-width: none;
}

.chapter02-video-row--flip {
  max-width: 760px;
}

/* The 09–11 caption belongs only to the three photos. */
.friends-walk--separate {
  width: 100%;
  max-width: 1060px;
  margin-inline: auto;
}

.friends-walk--separate .friends-walk__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.friends-walk--separate .friends-walk__grid > .media-card {
  width: 100%;
}

.friends-walk--separate .friends-walk__grid .media-frame {
  aspect-ratio: 3 / 4;
}

/* ---------- Chapter 04 ---------- */

.chapter04-media {
  width: 100%;
  min-width: 0;
}

.chapter04-media-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  align-items: start;
}

.chapter04-media-grid > .media-card,
.chapter04-media-grid > .video-card {
  grid-column: auto !important;
  width: 100%;
  min-width: 0;
}

.chapter04-media-grid .media-frame--portrait {
  aspect-ratio: 3 / 4;
}

.chapter04-media-grid .video-preview {
  width: 100%;
  aspect-ratio: 982 / 660;
}

/* ---------- Final "Я не отчаиваюсь" block ---------- */

.video-final-grid {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(300px, 0.72fr) minmax(0, 1.28fr);
  gap: clamp(48px, 7vw, 100px);
  align-items: center;
}

.video-final-grid > .video-card {
  grid-column: auto !important;
  width: 100%;
  max-width: 760px;
  min-width: 0;
  margin-inline: auto;
}

.video-final-grid .video-preview--feature {
  width: 100%;
  aspect-ratio: 16 / 9;
}

.video-final-grid .video-preview--feature video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #0d0d0c;
}

/* ---------- Contacts / final screen ---------- */

.cta {
  padding-block: clamp(100px, 12vw, 150px);
}

.cta__inner {
  width: min(1120px, calc(100% - 48px));
  max-width: 1120px;
}

.contacts {
  width: min(900px, 100%);
  max-width: 900px;
}

/* ---------- Responsive ---------- */

@media (max-width: 980px) {
  .chapter02-video-row {
    max-width: 760px;
  }

  .video-final-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .video-final-grid > .video-card {
    max-width: 700px;
  }
}

@media (max-width: 680px) {
  .chapter02-video-row {
    grid-template-columns: 1fr;
    max-width: 520px;
  }

  /* Videos 02 and 03 stay side-by-side down to this breakpoint. */
  .chapter02-video-row--flip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 520px;
    gap: 12px;
  }

  .friends-walk--separate .friends-walk__grid {
    grid-template-columns: 1fr;
    max-width: 360px;
    margin-inline: auto;
  }

  .chapter04-media-grid {
    grid-template-columns: 1fr;
  }

  .video-final-grid > .video-card {
    max-width: 100%;
  }

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

@media (max-width: 420px) {
  .chapter02-video-row--flip {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   Gallery lightbox + final "Сегодня" layout
   ========================================================= */

body.lightbox-open {
  overflow: hidden;
}

.lightbox {
  padding: clamp(16px, 3vw, 40px);
  box-sizing: border-box;
}

.lightbox__content {
  width: min(92vw, 1100px);
  height: min(88dvh, 900px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.lightbox__image {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.lightbox__video {
  display: block;
  max-width: 90vw;
  max-height: 88dvh;
  width: auto;
  height: auto;
  object-fit: contain;
  background: #080808;
}

.lightbox__nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
  width: 52px;
  height: 72px;
  border: 0;
  border-radius: 14px;
  background: rgba(255, 196, 35, 0.92);
  color: #111;
  font-size: 48px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.lightbox__nav--prev {
  left: clamp(10px, 2vw, 28px);
}
.lightbox__nav--next {
  right: clamp(10px, 2vw, 28px);
}

.lightbox__nav[hidden] {
  display: none;
}

.video-final-grid--today {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(34px, 5vw, 58px);
  align-items: start;
}

.video-final-grid--today > .video-card {
  order: 1;
  width: min(760px, 100%);
  margin-inline: auto;
}

.video-final-grid--today > *:not(.video-card) {
  order: 2;
}

@media (max-width: 680px) {
  .lightbox__content {
    width: 94vw;
    height: 84dvh;
  }

  .lightbox__nav {
    width: 42px;
    height: 56px;
    font-size: 38px;
  }

  .lightbox__nav--prev {
    left: 7px;
  }
  .lightbox__nav--next {
    right: 7px;
  }

  .video-final-grid--today > .video-card {
    width: 100%;
  }
}

/* New media in chapter 07: four photos + one video. */
.chapter07-new-media {
  display: grid;
  gap: clamp(40px, 5vw, 64px);
  margin-top: clamp(42px, 6vw, 76px);
  padding-left: 2rem;
  padding-right: 2rem;
}

.chapter07-video {
  width: min(760px, 100%);
  margin-inline: auto;
}

/* Final polish */
.video-final-grid--today {
  display: block !important;
  max-width: 900px;
}

.story-copy--today {
  max-width: 900px;
  margin-inline: auto;
}

.story-copy--today .video-card--feature {
  width: min(760px, 100%);
  margin: clamp(38px, 5vw, 58px) auto 0;
}

.story-copy--today .video-preview--feature {
  width: 100%;
  aspect-ratio: 16 / 9;
}

.story-copy--today .video-preview--feature video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Lightbox navigation */
.lightbox {
  grid-template-rows: 1fr auto;
}

.lightbox__nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1001;
  width: 54px;
  height: 70px;
  border: 0;
  border-radius: 16px;
  background: rgba(255, 196, 35, 0.94);
  color: #17130a;
  font-size: 48px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.35);
}

.lightbox__nav--prev {
  left: clamp(10px, 2vw, 30px);
}
.lightbox__nav--next {
  right: clamp(10px, 2vw, 30px);
}
.lightbox__nav[hidden] {
  display: none;
}

.lightbox__image,
.lightbox__video {
  max-width: calc(100vw - 140px) !important;
  max-height: calc(100dvh - 120px) !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain !important;
}

@media (max-width: 680px) {
  .lightbox__nav {
    width: 42px;
    height: 54px;
    font-size: 36px;
  }

  .lightbox__nav--prev {
    left: 5px;
  }
  .lightbox__nav--next {
    right: 5px;
  }

  .lightbox__image,
  .lightbox__video {
    max-width: calc(100vw - 76px) !important;
    max-height: calc(100dvh - 100px) !important;
  }
}

/* Video covers */
.video-preview {
  position: relative;
  overflow: hidden;
}
.video-preview .video-cover {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.video-preview .video-cover + span {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}
.video-preview--feature .video-cover {
  object-fit: cover;
}

.media-frame--landscape-43 {
  aspect-ratio: 4 / 3 !important;
}

.img-obj-position--top {
  object-position: top !important;
}

@media (max-width: 700px) {
  .width--100 {
    width: 100%;
    max-width: 100%;
  }
}

.link {
  color: var(--accent-2);
  text-decoration: none;
}

.link:hover {
  color: var(--accent);
}
/* Chapter 07: the current shelter photo is smaller, with the chip video to its right.
   The five new photos use the full chapter width so they stay large on desktop. */
.chapter07-current-pair {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 3fr);
  gap: clamp(18px, 2.5vw, 30px);
  align-items: start;
}

.chapter07-current-pair > .media-card,
.chapter07-current-pair > .video-card {
  width: 100%;
  min-width: 0;
}

.chapter07-current-pair .video-preview {
  width: 100%;
}

.chapter07-new-media {
  width: 100%;
  margin-top: clamp(42px, 6vw, 76px);
}

.chapter07-new-media .chapter04-media-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 26px);
  max-width: none;
  margin-inline: auto;
}

.chapter07-new-media .chapter04-media-grid > .media-card {
  grid-column: auto;
}

@media (max-width: 680px) {
  .chapter07-current-pair {
    grid-template-columns: 1fr;
  }

  .chapter07-new-media .chapter04-media-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .chapter--video-final .shell {
    width: calc(100% - 28px);
  }
}
