/* Work detail page base */
.work-detail-page {
  overflow-x: clip;
}
.product-collage-page .detail-heading {
  min-height: 0;
  padding: 142px 0 28px;
  border-bottom: 0;
}
.product-collage-page .detail-heading h1 {
  margin: 0;
  font-size: clamp(38px, 5vw, 66px);
  letter-spacing: -0.045em;
}
.product-collage-page .project-showcase {
  padding-top: 0;
  padding-bottom: 90px;
}
/* Each SVG is a complete card; preserve its original composition. */
.product-collage-page .showcase-grid {
  display: flex;
  flex-direction: column;
  gap: clamp(12px, 2.6vw, 40px);
}
.product-collage-page .showcase-row {
  display: grid;
  gap: clamp(12px, 2.6vw, 40px);
}
.product-collage-page .showcase-row-top {
  grid-template-columns: minmax(0, 111fr) minmax(0, 161fr) minmax(0, 75fr);
}
.product-collage-page .showcase-row-bottom {
  grid-template-columns: minmax(0, 126fr) minmax(0, 231fr);
}
.product-collage-page .showcase-row > .image-placeholder {
  display: block;
  grid-column: auto;
  grid-row: auto;
  min-width: 0;
  min-height: 0;
  border: 0;
  border-radius: clamp(8px, 1.3vw, 20px);
  background: transparent;
}
.product-collage-page .image-placeholder img {
  position: static;
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  mix-blend-mode: normal;
  transform: none;
}
.work-detail-page main > .wrap,
.work-detail-page .detail-heading > .wrap,
.work-detail-page .footer {
  width: calc(100% - 64px);
  max-width: 1536px;
  margin-inline: auto;
}

/* Heading section */
.detail-heading {
  min-height: 210px;
  display: flex;
  align-items: flex-end;
  padding: 130px 0 28px;
  border-bottom: 1px solid var(--line);
  background-color: #fff;
  background-image: radial-gradient(
    circle,
    rgba(194, 205, 200, 0.72) 1px,
    transparent 1.25px
  );
  background-size: 18px 18px;
}
.detail-heading h1 {
  font-size: clamp(48px, 5vw, 72px);
  line-height: 1;
  font-weight: 400;
  margin-top: 60px;
}

/* Showcase gallery section */
.project-showcase {
  padding: 42px 0 115px;
}
.showcase-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: minmax(280px, 420px);
  gap: 26px;
}
.image-placeholder {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid var(--line);
}
.image-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;;
  transition: transform 0.45s ease;
}
.image-placeholder:hover img {
  transform: scale(1.03);
}
.image-placeholder.is-revealed {
  animation: detail-image-reveal 0.75s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
@keyframes detail-image-reveal {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: translateY(0); }
}
/* Project summary section */
.project-summary {
  display: grid;
  grid-template-columns: 1.45fr 0.65fr;
  gap: 105px;
  padding: 85px 0 0;
}
.project-summary article {
  max-width: 850px;
}
.project-summary h2 {
  margin-bottom: 30px;
  font-size: clamp(26px, 2.2vw, 36px);
  line-height: 1.45;
  font-weight: 400;
}
.project-summary p {
  font-size: 16px;
  line-height: 2.05;
}
.project-summary aside {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
  align-content: start;
  padding-top: 2px;
}
.project-summary aside span {
  min-height: 42px;
  display: grid;
  place-items: center;
  padding: 7px 10px;
  border: 1px solid var(--line);
  color: #555c58;
  font-size: 11px;
  text-align: center;
  transition:
    border-color 0.25s ease,
    color 0.25s ease;
}
.project-summary aside span:hover {
  border-color: var(--green);
  color: var(--green);
}

/* Related work section */
.work-detail-page .work {
  padding: 70px 0 110px;
}
.work-detail-page .related-work:not(.work) {
  padding: 55px 0 80px;
  background: linear-gradient(180deg, #fff 0%, #f4fcf7 100%);
  text-align: center;
}
.related-work-heading .kicker { display: block; margin-bottom: 3px; font-size: 7px; color: #9aa39f; }
.related-work-heading h2 { margin: 0; font-size: clamp(25px, 3vw, 42px); line-height: 1.02; font-weight: 500; }
.related-work-heading h2 em { color: var(--green); font-weight: 400; }
.related-work-heading p { margin: 10px 0 22px; color: #929b97; font-size: 10px; }
.related-projects { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 24px; text-align: left; }
.related-projects article { position: relative; min-height: 205px; padding: 9px 9px 34px; border: 1px solid #e1e9e4; background: rgba(255, 255, 255, .78); }
.related-project-image { height: 108px; display: grid; place-items: center; overflow: hidden; background: #fff; background-image: radial-gradient(circle, rgba(204,216,210,.55) 1px, transparent 1px); background-size: 13px 13px; }
.related-project-image img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 8px 12px rgba(41,61,52,.08)); }
.related-projects article > span { display: block; margin-top: 8px; color: var(--green); font-size: 6px; }
.related-projects h3 { margin: 1px 0 0; font-size: 15px; line-height: 1; font-weight: 500; }
.related-projects p { max-width: 85%; margin: 3px 0 0; color: #8c9691; font-size: 7px; line-height: 1.25; }
.related-projects a { position: absolute; right: 9px; bottom: 10px; display: inline-flex; align-items: center; gap: 4px; color: var(--green); font-size: 6px; }
.related-projects a b { display: inline-grid; width: 12px; height: 12px; place-items: center; border-radius: 50%; background: var(--green); color: #fff; font-size: 9px; font-weight: 400; }
/* CTA and footer sections */
.work-detail-page .cta {
  margin-top: 30px;
}
.work-detail-page .footer {
  margin-top: 20px;
}

/* Responsive layout */
@media (max-width: 900px) {
  .showcase-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 230px 230px;
    gap: 18px;
  }
  .brand-shot {
    grid-column: 1 / 3;
  }
  .project-summary {
    grid-template-columns: 1fr;
    gap: 45px;
  }
  .project-summary aside {
    max-width: 560px;
  }
}

/* Flatten the two desktop rows into a compact phone gallery. */
@media (max-width: 600px) {
  .product-collage-page .showcase-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: none;
    grid-auto-rows: clamp(170px, 34vw, 210px);
    gap: 12px;
    align-items: stretch;
  }
  .product-collage-page .showcase-row {
    display: contents;
  }
  .product-collage-page .showcase-row > .hero-shot {
    grid-column: 1 / -1;
  }
  .product-collage-page .showcase-row > .image-placeholder {
    height: 100%;
  }
  .product-collage-page .showcase-row > .image-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 40% center;
  }
}

@media (max-width: 800px) {
  .work-detail-page main > .wrap,
  .work-detail-page .detail-heading > .wrap,
  .work-detail-page .footer {
    width: calc(100% - 28px);
  }
  .detail-heading {
    padding-top: 120px;
  }
}

@media (max-width: 520px) {
  .detail-heading {
    min-height: 175px;
    padding-bottom: 22px;
  }
  .detail-heading h1 {
    font-size: 40px;
  }
  .project-showcase {
    padding-top: 25px;
    padding-bottom: 80px;
  }
  .showcase-grid {
    display: flex;
    flex-direction: column;
    gap: 14px;
  }
  .image-placeholder {
    min-height: 210px;
    border-radius: 10px;
  }
  .project-summary {
    padding-top: 55px;
  }
  .project-summary h2 {
    font-size: 24px;
    line-height: 1.4;
  }
  .project-summary p {
    font-size: 14px;
    line-height: 1.9;
  }
  .project-summary aside {
    grid-template-columns: 1fr 1fr;
    gap: 9px;
  }
  .project-summary aside span {
    min-height: 40px;
    font-size: 10px;
  }
}

@media (max-width: 520px) {
  .work-detail-page .related-work:not(.work) {
    padding: 45px 0 55px;
  }
  .product-collage-page .detail-heading {
    padding: 122px 0 17px;
  }
  .product-collage-page .detail-heading h1 {
    font-size: 29px;
  }
  .product-collage-page .project-showcase {
    padding-bottom: 65px;
  }
  .product-collage-page .showcase-grid,
  .product-collage-page .showcase-row {
    gap: 10px;
  }
}
