/* Project pages. Measurements come from the Figma project frames (1512px wide).
   Loaded after styles.css on every project page. */

.project {
  max-width: 1512px;
  margin: 0 auto;
  padding: 0 30px 54px;
}

.project h1,
.project h2 { margin: 0; font-weight: 700; }
.project h2 { font-size: 40px; line-height: 46px; }

.prose {
  font-family: var(--font-body);
  font-variation-settings: "SOFT" 0, "WONK" 1;
  font-size: 30px;
  line-height: 37px;
}
.prose p { margin: 0 0 37px; }
.prose p:last-child { margin-bottom: 0; }
.prose strong { font-weight: 700; }
.prose a { text-decoration: underline; }

/* A heading followed by its text */
.block > h2 + * { margin-top: 14px; }
.project .section { margin-top: 54px; }
.section > h2 + * { margin-top: 24px; }

/* ---------- Images ----------
   .media boxes keep the shape they have in Figma (aspect-ratio set inline).
   Images fill the box; Figma crops are copied as inline left/top/width/height. */
.media {
  position: relative;
  overflow: hidden;
  margin: 0;
}
.media img,
.media video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
}
.media--contain img { object-fit: contain; }
.full { margin-left: -30px; margin-right: -30px; }

.pair {
  display: grid;
  grid-template-columns: var(--pair-cols, 1fr 1fr);
  column-gap: var(--pair-gap, 34px);
  align-items: start;
}

/* Horizontally scrolling strip of images */
.strip {
  --s: 1;
  display: flex;
  align-items: center;
  gap: 15px;
  height: calc(var(--strip-h) * 1px * var(--s));
  margin-left: -30px;
  margin-right: -30px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
}
/* Strips that scroll themselves hide their scrollbar, like the home carousel */
.strip[data-autoscroll] { scrollbar-width: none; }
.strip[data-autoscroll]::-webkit-scrollbar { display: none; }
.strip > .media {
  flex: none;
  height: calc(var(--h) * 1px * var(--s));
  aspect-ratio: var(--w) / var(--h);
}

/* ---------- Design projects: coloured banner ---------- */
.banner {
  position: relative;
  aspect-ratio: 1512 / 448;
  margin: 54px -30px 0;
  overflow: hidden;
  background: var(--banner-bg);
  color: #fffbfb;
}
.banner-art {
  position: absolute;
  left: var(--art-left, 0);
  top: 0;
  width: var(--art-w);
  height: var(--art-h, 100%);
  opacity: var(--art-opacity, 0.8);
  overflow: hidden;
}
.banner-art img { position: absolute; max-width: none; }
.banner-kicker {
  position: absolute;
  top: 33px;
  right: 30px;
  margin: 0;
  font-size: 40px;
  font-weight: 700;
}
.banner-title {
  position: absolute;
  right: 30px;
  bottom: 25px;
  margin: 0;
  font-size: 60px;
  font-weight: 700;
  text-align: right;
}

.facts,
.story {
  display: grid;
  margin-top: 54px;
}
.facts {
  grid-template-columns: var(--facts-cols, 445fr 445fr 488fr);
  column-gap: var(--facts-gap, 37px);
}
.story {
  grid-template-columns: var(--story-cols);
  column-gap: var(--story-gap);
}

/* ---------- Art projects: title beside the main image ---------- */
.art-hero {
  display: grid;
  grid-template-columns: var(--hero-cols);
  column-gap: 36px;
  align-items: start;
}
.art-title { font-size: 60px; line-height: 69px; }
.art-medium { font-size: 40px; line-height: 46px; margin: 22px 0 0; font-weight: 700; }
.art-panel { position: relative; }
.art-panel .media { opacity: 0.5; }
.art-panel .art-heading { position: absolute; top: 0; left: 0; }
.art-panel .art-medium { margin-top: 15px; }

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap: var(--grid-gap, 33px);
  row-gap: 56px;
}

/* ---------- South London Gallery extras ---------- */
.logo-sheet { position: relative; }
.logo-sheet span {
  position: absolute;
  font-family: var(--font-body);
  font-variation-settings: "SOFT" 0, "WONK" 1;
  font-size: clamp(11px, 1.98vw, 30px);
  line-height: 1.2;
}
.logo-sheet span.sans { font-family: var(--font-heading); }

.type-sheet { margin-left: -13px; margin-right: -30px; }

.slg-grid {
  display: grid;
  column-gap: 37px;
  align-items: stretch;
}
.slg-grid .stack {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
}

.merch {
  display: grid;
  grid-template-columns: 809fr 615fr;
  column-gap: 26px;
  align-items: start;
}
.postcards {
  display: flex;
  flex-direction: column;
  gap: 40px;
}
.postcard {
  box-shadow: 0 0 23px rgba(0, 0, 0, 0.25);
  transform: rotate(var(--r));
}

/* Two-column photo grid (process photos on art pages) */
.grid-2 {
  display: grid;
  grid-template-columns: 704fr 703fr;
  column-gap: 45px;
  row-gap: 55px;
  margin-top: 55px;
}
.grid-2 .media { aspect-ratio: 704 / 528; }

/* Title that sits over the left edge of a wide main image (Mau Makan Apa) */
.art-overlap { position: relative; }
.art-overlap .media { margin-left: calc(128 / 1452 * 100%); }
.art-overlap .art-heading { position: absolute; top: 1px; left: 0; width: 271px; z-index: 1; }

/* Title on its own line above a pair of images (Gedung Kesenian Jakarta) */
.art-top .art-title { white-space: nowrap; }
.art-top .grid-2 { margin-top: 22px; }

/* ---------- Smaller screens ---------- */
@media (max-width: 1200px) {
  .project h2 { font-size: 32px; line-height: 38px; }
  .prose { font-size: 24px; line-height: 31px; }
  .prose p { margin-bottom: 31px; }
  .banner-title { font-size: 44px; }
  .banner-kicker { font-size: 28px; }
  .art-title { font-size: 44px; line-height: 52px; }
  .art-medium { font-size: 28px; line-height: 34px; }
  .facts, .story { column-gap: 32px; }
}

@media (max-width: 1000px) {
  /* Banner gets taller than its Figma shape, so artwork switches to a simple fill */
  .banner { aspect-ratio: auto; height: 300px; }
  .banner-art { left: 0; width: 100%; height: 100%; }
  .banner-art img {
    left: 0 !important; top: 0 !important;
    width: 100% !important; height: 100% !important;
    object-fit: cover;
  }
}

@media (max-width: 760px) {
  .project { padding: 0 16px 40px; }
  .full, .strip, .banner, .type-sheet { margin-left: -16px; margin-right: -16px; }
  .project h2 { font-size: 24px; line-height: 30px; }
  .prose { font-size: 18px; line-height: 25px; }
  .prose p { margin-bottom: 20px; }
  .project .section, .facts, .story { margin-top: 36px; }

  .banner { height: 240px; margin-top: 16px; }
  .banner-kicker { top: 16px; right: 16px; font-size: 18px; }
  .banner-title { right: 16px; bottom: 16px; font-size: 28px; }

  .facts, .story, .pair, .grid-2, .grid-3, .art-hero, .slg-grid, .merch {
    grid-template-columns: 1fr;
    row-gap: 24px;
  }
  .strip { --s: 0.6; }

  .art-hero { padding-top: 16px; }
  .art-title { font-size: 34px; line-height: 40px; }
  .art-medium { font-size: 22px; line-height: 28px; margin-top: 8px; }
  .art-panel .art-heading { position: static; margin-bottom: 16px; }
  .art-strip { aspect-ratio: 3 / 2 !important; }
  .art-strip img { left: 0 !important; top: 0 !important; width: 100% !important; height: 100% !important; }

  .postcards { gap: 28px; padding: 12px; }
  .grid-2 { margin-top: 36px; }
  .art-overlap { padding-top: 16px; }
  .art-overlap .media { margin-left: 0; }
  .art-overlap .art-heading { position: static; width: auto; margin-bottom: 16px; }
  .art-top { padding-top: 16px; }
  .art-top .art-title { white-space: normal; }
  .art-top .grid-2 { margin-top: 16px; }
}
