/* ── Scroll reveal ───────────────────────────────────── */

.reveal {
  opacity: 0;
  transition: opacity 0.6s ease;
}

.reveal--visible {
  opacity: 1;
}

/* ── Detail footer ───────────────────────────────────── */

.detail-footer {
  text-align: center;
  padding-bottom: 60px;
}

.detail-footer__arrows {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 7%;
}

.footer-story {
  display: block;
  text-align: center;
  margin-top: 4vh;
  margin-bottom: -60px;
  transition: transform 0.2s ease;
}

.footer-story:hover { transform: scale(1.05); }

.footer-story img {
  width: 35vw;
  height: auto;
}

.detail-footer__contact {
  font-family: "Merriweather", serif;
  font-size: 1.2vw;
  line-height: 1.8;
  color: #6E2A5E;
  margin: 0;
  text-align: center;
}

.detail-footer__arrows .arrow { position: static; cursor: pointer; }
.detail-footer__arrows .arrow.left  { transform: none; }
.detail-footer__arrows .arrow.right { transform: scaleX(-1); }
.detail-footer__arrows .arrow.left:hover  { transform: none;        filter: brightness(0.6) saturate(2); }
.detail-footer__arrows .arrow.right:hover { transform: scaleX(-1);  filter: brightness(0.6) saturate(2); }

.detail-footer__arrows:has(.footer-scroll-top) {
  position: relative;
  justify-content: center;
}

.footer-scroll-top {
  position: absolute;
  right: 7%;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

.arrow--up {
  transform: rotate(90deg);
  transition: filter 0.2s ease;
}

.footer-scroll-top:hover .arrow--up {
  filter: brightness(0.6) saturate(2);
}

/* ── Sections ─────────────────────────────────────────── */

.section {
  padding: 0 10%;
  margin-bottom: 80px;
  position: relative;
  z-index: 1;
}

.section__title {
  font-family: "Vinnytsya", sans-serif;
  font-size: 2vw;
  font-weight: normal;
  margin-bottom: 24px;
}

.section--split .section__figure {
  width: 100%;
  padding-left: 21.5%;
  padding-right: 6%;
  margin: 0;
  box-sizing: border-box;
}

.section--split .section__figure img {
  width: 100%;
  height: auto;
  display: block;
}

.section--split .section__figure figcaption {
  font-family: "Merriweather", serif;
  font-size: 1.25vw;
  font-weight: 300;
  font-style: normal;
  line-height: 1.5;
  color: #6E2A5E;
  margin-top: 1.5%;
  margin-left: 0;
  text-align: left;
  width: 80%;
}

.section--split .section__below {
  display: flex;
  gap: 11%;
  align-items: flex-start;
  padding: 15vw 21.5% 0;
  box-sizing: border-box;
  width: 100%;
}

.section--split .section__title {
  flex: 0 0 34%;
  margin: 0;
  padding: 0;
  font-size: 2.4vw;
  font-weight: 400;
  line-height: 1;
  color: #C695BA;
}

.section--split .section__text {
  flex: 1;
  min-width: 0;
  font-family: "Merriweather", serif;
  font-size: 1.2vw;
  line-height: 1.4;
  color: #6E2A5E;
}

.section--split .section__text p { margin: 0 0 1em; }

.section--full {
  margin-top: 10vw;
  margin-bottom: 10vw;
  padding-left: 6%;
  padding-right: 6%;
  position: static;
}

.section--full-left  { padding-right: 21.5%; }
.section--full-right { padding-left: 21.5%; }

.section--full--portrait { padding-right: 0; }

.section--full.section--full--portrait figure { margin: 0; }

.section--full.section--full--portrait figcaption { margin-left: 15.5vw; }

.section--split {
  margin-top: 10vw;
  margin-bottom: 10vw;
  position: static;
  padding: 0;
}

.artwork + .section--full,
.artwork + .section--split { margin-top: 6vw; }

.artwork + .section--poem { margin-top: 8vw; }

.section--poem {
  margin: 8vw auto 6vw;
  width: 60%;
  text-align: left;
  font-family: "Merriweather", serif;
  font-style: italic;
  font-size: 1.1vw;
  line-height: 1.8;
  color: #C695BA;
}

.section--poem p { margin: 0 0 1em 0; }

.section--full figure {
  margin: 0 auto;
  width: 100%;
}

.section--full img {
  width: 100%;
  height: auto;
  display: block;
}

.section--full figcaption,
.section--row figcaption {
  font-family: "Merriweather", serif;
  font-size: 1.25vw;
  font-weight: 300;
  font-style: normal;
  line-height: 1.5;
  color: #6E2A5E;
  margin-top: 1.5%;
  margin-left: 15.5vw;
  text-align: left;
  width: 80%;
}

.section--row {
  margin: 6vw 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.section__photo-row {
  display: flex;
  gap: 2vw;
  align-items: stretch;
  width: 60%;
}

.section__photo-row img {
  flex: 0 0 calc(50% - 1vw);
  width: calc(50% - 1vw);
  object-fit: cover;
}

.section--row .figcaption--split {
  margin-top: 10px;
  width: 85%;
}

/* ── Stitched photo row (Ksyusha) ─────────────────────── */

.section--row-stitched .section__photo-row {
  width: 110%;
  margin-left: -3.5%;
  gap: 3vw;
}

.section--row-stitched figcaption {
  margin-left: 4%;
}

.figcaption--split {
  display: flex;
  justify-content: space-between;
  text-align: left;
}

.figcaption--split span:last-child { text-align: right; }

/* ── Lightbox ────────────────────────────────────────── */

.zoomable {
  cursor: zoom-in;
}

.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
}

.lightbox--open {
  display: flex;
}

.lightbox__img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  pointer-events: none;
}

/* ── Hero & arrows ───────────────────────────────────── */

.hero {
  position: relative;
  text-align: center;
  margin-top: 3vw;
}

.detail-logo-link {
  display: block;
  transition: transform 0.35s ease;
}

.detail-logo-link:hover { transform: scale(1.02); }
.detail-logo-link:active { transform: scale(1.0); }

.detail-logo {
  display: block;
  width: 60%;
  height: auto;
  margin: 0 auto;
}

.arrows {
  margin-top: -15%;
  position: relative;
  left: 0;
  width: 100%;
  padding: 3%;
  box-sizing: border-box;
  pointer-events: none;
}

.arrow-btn { pointer-events: auto; }

.arrow-btn {
  position: absolute;
  width: 10%;
  aspect-ratio: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.arrow-btn--left  { left: 6%; }
.arrow-btn--right { right: 6%; }

.arrow {
  transition: transform 0.25s ease, filter 0.25s ease;
}

.arrow-btn .arrow {
  width: 7vw;
  pointer-events: none;
}

.detail-footer__arrows .arrow {
  width: 7vw;
}

.arrow.left  { transform: none; }
.arrow.right { transform: scaleX(-1); }

.arrow-btn--left:hover  .arrow { transform: none;          filter: brightness(0.6) saturate(2); }
.arrow-btn--right:hover .arrow { transform: scaleX(-1);   filter: brightness(0.6) saturate(2); }

.arrow-btn--left:active  .arrow { transform: none; }
.arrow-btn--right:active .arrow { transform: scaleX(-1); }

/* ── Artwork ─────────────────────────────────────────── */

.artwork {
  display: flex;
  flex-direction: column;
  padding: 13% 0 0;
  position: relative;
  z-index: 1;
}

.artwork__image {
  width: 100%;
  padding-left: 17%;
  padding-right: 17%;
  box-sizing: border-box;
}

.artwork__image img {
  width: 100%;
  height: auto;
  display: block;
}

.artwork__below {
  display: flex;
  gap: 11%;
  align-items: flex-start;
  padding: 15vw 21.5% 0;
  box-sizing: border-box;
  width: 100%;
}

.artwork__below h1 {
  flex: 0 0 34%;
  margin: 0;
  margin-top: -0.4vw;
  padding: 0;
  font-family: "Vinnytsya";
  font-size: 2.4vw;
  font-weight: 400;
  line-height: 1;
  color: #C695BA;
}

#story {
  flex: 1;
  min-width: 0;
}

#story p {
  margin: 0 0 1em;
  line-height: 1.5;
  font-size: 1.25vw;
  font-family: "Merriweather", serif;
  font-weight: 300;
  color: #6E2A5E;
}

#story p.story__footnote {
  margin-top: 2em;
  font-size: 0.9vw;
  opacity: 0.7;
}

@media (min-width: 769px) and (max-width: 1024px) {
  #story p.story__footnote {
    font-size: 1.6vw;
  }
}

@media (max-width: 768px) {
  #story p.story__footnote {
    font-size: 3.5vw;
  }
}

/* ── Detail topbar & nav ─────────────────────────────── */

.detail-topbar {
  justify-content: center;
  gap: 3vw;
  padding: 2% 4%;
}

.detail-nav-link {
  position: relative;
  font-family: "Vinnytsya", sans-serif;
  font-size: 1.1vw;
  color: #6E2A5E;
  text-decoration: none;
}

.detail-nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.6vw;
  height: 10px;
  background-image: url("images/dash.svg");
  background-repeat: repeat-x;
  background-size: auto 10px;
  background-position: center;
  opacity: 0;
  transform: scaleX(0.7);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.detail-nav-link:hover::after {
  opacity: 1;
  transform: scaleX(1);
}

/* ── Layout ──────────────────────────────────────────── */

.detail-page {
  position: relative;
  min-height: 100vh;
  margin: 0;
}

.side-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 16px;
  background-image: url("images/side-stitch.svg");
  background-repeat: repeat-y;
  background-size: 16px auto;
  background-position: 0 0;
  z-index: 2;
}

#main { position: relative; }

.side-line-left  { left: 7%; }
.side-line-right { right: 7%; }

.content-inner {
  position: relative;
  z-index: 1;
  padding-bottom: 80px;
}

/* ── Tablet ───────────────────────────────────────────── */
@media (max-width: 1024px) {
  .detail-page .topbar { display: none; }
  .detail-topbar { display: none; }
  .detail-logo { width: 95vw; }
  .side-line { display: none; }

  .artwork { padding: 6vw 0 0; }

  .artwork__image {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-left: 6%;
    padding-right: 6%;
    box-sizing: border-box;
  }

  .artwork__image img {
    width: auto;
    max-width: 100%;
    object-fit: contain;
  }

  .artwork__below {
    padding: 10vw 6% 0 12%;
    gap: 1%;
    box-sizing: border-box;
  }

  .artwork__below h1 { font-size: 3.2vw; flex: 0 0 35%; }

  #story p { font-size: 1.9vw; line-height: 1.5; }

  .hero { margin-top: 4vw; margin-bottom: 2vw; }

  .content-inner { padding-bottom: 40px; }
  .arrows { display: none; }

  .section { padding: 0; }

  .section--full,
  .section--split { margin-top: 12vw; margin-bottom: 12vw; }

  .artwork + .section--full,
  .artwork + .section--split { margin-top: 8vw; }

  .section--full figure { width: 100%; position: relative; }
  .figure--portrait { width: 100% !important; }

  .section--full figure::before,
  .section--full figure::after {
    content: "";
    position: absolute;
    top: -16px;
    bottom: -16px;
    width: 16px;
    background-image: url("images/side-stitch.svg");
    background-repeat: repeat-y;
    background-size: 16px auto;
    background-position: 0 0;
    z-index: 2;
  }
  .section--full figure::before { left: 3%; }
  .section--full figure::after  { right: 3%; }

  .section--full figcaption,
  .section--row figcaption { font-size: 1.9vw; margin-left: 12%; }

  .section--split .section__figure { width: 100%; padding-left: 4%; padding-right: 6%; }
  .section--split .section__figure figcaption { font-size: 1.6vw; margin-left: 5vw; }

  .section--full-center { padding-left: 10%; padding-right: 10%; }

  .section--split .section__below { flex-direction: column; gap: 4vw; padding: 5vw 6% 0; }
  .section--split .section__title { flex: unset; font-size: 3.5vw; }
  .section--split .section__text { font-size: 2.2vw; }
  .section__title { font-size: 3.5vw; }

  .section--poem { width: 88%; font-size: 2vw; }

  .section__photo-row { flex-direction: column; width: 100%; gap: 4vw; }
  .section__photo-row img { flex: unset; width: 100%; }

  .section--row .figcaption--split { width: 100%; }
  .figcaption--split { flex-direction: column; gap: 2px; text-align: left; }
  .figcaption--split span,
  .figcaption--split span:last-child { text-align: left; }
  .section--full figcaption.figcaption--split,
  .section--row figcaption.figcaption--split { text-align: left; }

  .footer-story { margin-bottom: 8vw; }
  .footer-story img { width: 40vw; }
  .footer-arrow-left,
  .footer-arrow-right { display: none; }
  .detail-footer__contact { font-size: 2vw; }
  .detail-footer__arrows { padding: 0 4%; justify-content: center; }
}

.swipe-hint {
  display: none;
}

@media (max-width: 768px) {
  .swipe-hint {
    display: flex;
    position: fixed;
    inset: 0;
    z-index: 500;
    align-items: center;
    justify-content: space-between;
    padding: 0 6vw;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s ease;
  }

  .swipe-hint.swipe-hint--visible {
    opacity: 1;
  }

  .swipe-hint__arrow {
    width: 22vw;
    opacity: 0.5;
  }

  .swipe-hint__text {
    font-family: "Vinnytsya", sans-serif;
    font-size: 8vw;
    color: #C695BA;
    opacity: 0.5;
  }
}

/* ── Phone ────────────────────────────────────────────── */
@media (max-width: 768px) {
  .footer-scroll-top { display: none; }

  .artwork__below {
    flex-direction: column;
    padding: 8vw 6% 0;
    gap: 4vw;
  }

  .artwork__below h1 { font-size: 7vw; flex: unset; }
  #story p { font-size: 4.2vw; }

  .section--full figure::before,
  .section--full figure::after {
    width: 2vw;
    background-size: 2vw auto;
    bottom: -4vw;
  }
  .section--full figure::before { left: 2%; }
  .section--full figure::after  { right: 2%; }

  .section--full figcaption,
  .section--row figcaption { font-size: 3.5vw; margin-left: 6%; margin-right: 6%; width: auto; }

  .section--split .section__text  { font-size: 4.2vw; }
  .section--split .section__title { font-size: 6vw; }
  .section--split .section__below { padding: 5vw 4vw 0; }
  .section__title { font-size: 6vw; }

  .section--split .section__figure { padding-left: 0; padding-right: 0; }
  .section--split .section__figure figcaption { font-size: 3.5vw; margin-left: 4vw; }

  .section--full { padding-left: 0; padding-right: 0; }
  .section--full-center { padding-left: 4vw; padding-right: 4vw; }
  .section--poem { font-size: 4vw; }

  .detail-footer__contact { font-size: 3.8vw; }
  .footer-story img { width: 65vw; }
}
