.case-study {
  width: min(1100px, calc(100% - 64px));
  margin: 0 auto;
  padding-top: 160px;
  padding-bottom: 80px;
  text-transform: lowercase;
}


/* hero */
.project-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  margin-bottom: 100px;
}

.hero-text h1 {
  font-family: "The Seasons", serif;
  font-size: 24px;
  line-height: 1;
  margin: 0 0 18px;
  white-space: nowrap;
}

.project-intro {
  font-family: "Shree Devanagari 714", serif;
  font-size: 16px;
  line-height: 1.5;
  color: #666;
  margin: 0 0 20px;
  max-width: 560px;
}

.project-meta {
  font-family: "Shree Devanagari 714", serif;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #999;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
}

.hero-image img {
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: 600px;
  display: block;
  object-fit: cover;
}


/* content grid */
.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  column-gap: clamp(24px, 4vw, 60px);
  row-gap: 40px;
  max-width: 1100px;
  margin: 80px auto 0;
  align-items: start;
}

.content-grid.reverse .content-text {
  grid-column: 2;
}

.content-grid.reverse .content-image {
  grid-column: 1;
  grid-row: 1;

  justify-content: flex-end;
}

.content-text {
  max-width: 520px;
}

.content-text h2 {
  font-family: "The Seasons", serif;
  font-size: 24px;
  line-height: 1.1;
  margin: 0 0 14px;
}

.content-text p {
  font-family: "Shree Devanagari 714", serif;
  font-size: 16px;
  line-height: 1.55;
  color: #666;
  /* margin: 0 0 24px; */
}

.content-text p:last-child {
  margin-bottom: 0;
}

.content-image {
  display: flex;
  justify-content: center;
}

.content-image img {
  width: 100%;
  max-width: 520px;
  height: auto;
  object-fit: cover;
  display: block;
}


/* optional text-only or image-only section */
.project-section {
  max-width: 1100px;
  margin: 120px auto 0;
  text-align: left;
}

.project-section h2 {
  font-family: "The Seasons", serif;
  font-size: 24px;
  line-height: 1.1;
  margin: 0 0 20px;
}

.project-section p {
  max-width: 760px;
  font-family: "Shree Devanagari 714", serif;
  font-size: 16px;
  line-height: 1.6;
  color: #666;
  margin: 0;
}

.project-section img {
  margin: 0 auto;
  max-height: 600px;
}


/* image groups */
.mark-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  max-width: 1100px;
  margin: 80px auto;
}

.mark-grid img {
  width: 100%;
  display: block;
}

.mark-large {
  max-width: 1100px;
  margin: 100px auto;
}

.mark-large img {
  width: 100%;
  display: block;
}

.spread-row img {
  width: 100%;
  max-width: 700px;
  display: block;
  margin: 25px auto;
}


/* image lightbox */
.image-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  z-index: 2000;
}

.image-lightbox img {
  max-width: 90%;
  max-height: 90%;
  display: block;
}

.image-lightbox.open {
  opacity: 1;
  visibility: visible;
}

.zoomable {
  cursor: zoom-in;
  transition: transform 0.35s ease, opacity 0.25s ease;
}

.zoomable:hover {
  transform: scale(1.015);
  opacity: 0.96;
}


/* flipbook */
.flipbook-section {
  max-width: 900px;
  margin: 180px auto 24px;
  text-align: center;
}

.flipbook-section h2 {
  margin: 0 0 12px;
  font-family: "The Seasons", serif;
  font-size: 30px;
  line-height: 1.1;
}

.flipbook-section p {
  margin: 0 auto;
  max-width: 600px;
  font-family: "Shree Devanagari 714", serif;
  font-size: 18px;
  line-height: 1.5;
  color: #666;
}

.flipbook-crop {
  width: 100%;
  max-width: 900px;
  height: 450px;
  margin: 0 auto 120px;
  overflow: hidden;
  position: relative;
}

.flipbook-crop iframe {
  position: absolute;
  top: 0;
  left: -250px;
  width: calc(100% + 500px);
  height: 100%;
  border: 0;
}


/* page navigation */
.project-pagination {
  width: min(1100px, calc(100% - 64px));
  margin: 0 auto;
  padding-top: 28px;
  border-top: 1px solid #eee;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.project-pagination-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.project-pagination-link.next {
  text-align: right;
}

.pagination-label {
  display: block;
  margin-bottom: 8px;
  font-family: "The Seasons", serif;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #999;
}

.pagination-title {
  display: block;
  font-family: "The Seasons", serif;
  font-size: 24px;
  line-height: 1.1;
  color: #282828;
  transition: color 0.2s ease;
}

.project-pagination-link:hover .pagination-title {
  color: #c49cff;
}


/* responsiveness */
@media (max-width: 700px) {
  .case-study {
    width: calc(100% - 32px);
    padding-top: 120px;
    padding-bottom: 40px;
  }

  .project-hero {
    grid-template-columns: 1fr;
    gap: 30px;
    margin-bottom: 80px;
  }

  .hero-image img {
    margin: 0 auto;
  }

  .hero-text {
    text-align: center;
  }

  .hero-text h1 {
    font-size: 40px;
    white-space: normal;
  }

  .project-intro {
    font-size: 18px;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
  }

  .project-meta {
    justify-content: center;
    white-space: normal;
    gap: 10px 14px;
  }

  .content-grid,
  .content-grid.reverse {
    grid-template-columns: 1fr;
    gap: 28px;
    margin: 80px auto 0;
  }

  .content-grid.reverse .content-text,
  .content-grid.reverse .content-image {
    grid-column: auto;
    grid-row: auto;
  }

  .content-text {
    max-width: 100%;
    text-align: center;
  }

  .content-text h2,
  .content-text p {
    text-align: center;
  }

  .content-image img {
    max-width: 100%;
    margin: 0 auto;
  }

  .project-section {
    margin: 90px auto 50px;
    text-align: center;
  }

  .project-section p {
    max-width: 100%;
    font-size: 18px;
    line-height: 1.55;
    padding: 0 6px;
  }

  .mark-grid {
    grid-template-columns: 1fr;
    gap: 18px;
    margin: 24px auto;
  }

  .mark-large {
    margin: 80px auto;
  }

  .flipbook-section {
    margin: 90px auto 24px;
  }

  .flipbook-crop {
    height: 380px;
    margin: 0 auto 90px;
  }

  .flipbook-crop iframe {
    left: -250px;
    width: calc(100% + 500px);
  }

  .project-pagination {
    width: calc(100% - 32px);
    gap: 24px;
    margin: 60px auto 0;
    padding-top: 32px;
  }

  .pagination-label {
    font-size: 10px;
  }

  .pagination-title {
    font-size: 18px;
  }
}