/* ──────────────────────────────────────────────────────────────
   project.css
   Styles shared by every CASE STUDY / PROJECT page (not the index).
   Load this AFTER style.css — it reuses the tokens defined there:
   --c-name --c-grey --c-body --c-tag --c-rule --c-bg --f-display
   --f-body --pad --gap
   ────────────────────────────────────────────────────────────── */

/* ── Hero media ── */
.hero {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #e8e8e8;
  overflow: hidden;
  margin-bottom: 3rem;
}
.hero video,
.hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.hero iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
.hero--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #aaa;
  font-family: var(--f-display);
  font-size: 1.6rem;
}

/* Modifier: width fills the column, height flows naturally —
   same behaviour as .media-block--auto, for hero images that
   shouldn't be cropped to 16:9. */
.hero--auto {
  aspect-ratio: unset;
  background: none;
}
.hero--auto img {
  height: auto;
  object-fit: unset;
}

/* ── Title / intro block ── */
.intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  margin-bottom: 3rem;
}
.intro__title {
  font-family: var(--f-display);
  font-size: 2.2rem;
  font-weight: 400;
  color: var(--c-name);
  line-height: 1.1;
  margin-bottom: 0.4em;
}
.intro__tag {
  font-family: var(--f-display);
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--c-tag);
  line-height: 1;
}
.intro__copy {
  font-family: var(--f-body);
  font-size: 1.5rem;
  font-weight: 300;
  color: var(--c-body);
  line-height: 1.5;
}

/* ── Content sections ── */
.section {
  margin-top: 3rem;
  margin-bottom: 3rem;
}
/* .section-label is already defined in style.css — reused as-is
   so section headings match the "Projects" label on the index. */
.media-block {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #e8e8e8;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #aaa;
  font-family: var(--f-display);
  font-size: 1.6rem;
}
.media-block img,
.media-block video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.media-block--square {
  aspect-ratio: 1 / 1;
  max-width: 480px;
}
/* Modifier: 9:16 vertical box, for portrait/vertical video assets
   (e.g. social videos shot for Stories/Reels/TikTok formats). */
.media-block--portrait {
  aspect-ratio: 9 / 16;
}
/* Modifier: let the image/video set its own height, no cropping,
   no letterboxing — just fills the column width and flows naturally. */
.media-block--auto {
  aspect-ratio: unset;
  background: none;
}
.media-block--auto img,
.media-block--auto video {
  width: 100%;
  height: auto;
  object-fit: unset;
  display: block;
}

/* Row wrapper: lays two or more media-blocks side by side
   instead of stacking them. Use with --small (or your own
   width modifier) on each child block. */
.media-row {
  display: flex;
  gap: var(--gap);
}

/* Modifier: shrinks a media-block to ~30% width, for smaller
   supporting assets like Pinterest pins inside a .media-row. */
.media-block--small {
  width: 30%;
}

/* ── Spirit magazine slideshow ──
   Click-through image carousel, replicating a Cargo.site
   gallery-slideshow with plain HTML/CSS/JS. */
.spirit-slideshow {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 2;
}
.spirit-slideshow__track {
  display: flex;
  height: 100%;
  transition: transform 0.4s ease;
}
.spirit-slideshow__slide {
  flex: 0 0 100%;
  height: 100%;
}
.spirit-slideshow__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.spirit-slideshow__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.35);
  color: #fff;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
}
.spirit-slideshow__nav--prev { left: 16px; }
.spirit-slideshow__nav--next { right: 16px; }

/* ── Footer / prev-next nav ── */
.page-nav {
  text-align: center;
  padding: 6rem 0 1rem;
  font-family: var(--f-body);
  font-size: 1.5rem;
  color: var(--c-body);
}
.page-nav a {
  margin: 0 0.5em;
}
.page-nav a:hover {
  color: var(--c-tag);
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .intro {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .intro__title { font-size: 2.6rem; }
  .intro__tag   { font-size: 1.6rem; }
  .intro__copy  { font-size: 1.7rem; }
}

.media-row--thirds .media-block {
  flex: 1;
  width: auto; /* overrides the fixed 30% from --small if still present */
}

.media-block--square-lg {
  aspect-ratio: 1 / 1;
  max-width: 640px;
}