/* Final correction for homepage project chapters */
.home-page .project-chapter{
  --chapter-bg:#0b0b0b;
  min-height:100svh;
  min-height:100dvh;
  grid-template-columns:minmax(330px,.42fr) minmax(0,1.58fr)!important;
  grid-template-rows:1fr!important;
  gap:clamp(48px,6vw,110px)!important;
  align-items:center;
  padding:clamp(82px,8vw,126px) clamp(24px,5vw,86px)!important;
  background:var(--chapter-bg)!important;
}

.home-page .project-chapter::before{
  background:linear-gradient(145deg,var(--chapter-bg),#080808 82%)!important;
  opacity:1!important;
}

.home-page .project-chapter::after{
  left:clamp(24px,5vw,86px)!important;
  right:clamp(24px,5vw,86px)!important;
  background:rgba(255,255,255,.09)!important;
}

.home-page .project-chapter[data-project="people"]{--chapter-bg:#0d0b0a}
.home-page .project-chapter[data-project="street"]{--chapter-bg:#090b0d}
.home-page .project-chapter[data-project="nature"]{--chapter-bg:#0a0d0a}
.home-page .project-chapter[data-project="travel"]{--chapter-bg:#090c0d}
.home-page .project-chapter[data-project="creative"]{--chapter-bg:#0d0a09}

/* One deliberate text column */
.home-page .project-chapter .chapter-copy,
.home-page .layout-panorama .chapter-copy,
.home-page .layout-portrait .chapter-copy,
.home-page .layout-diptych .chapter-copy,
.home-page .layout-finale .chapter-copy{
  order:1!important;
  display:flex!important;
  flex-direction:column;
  align-items:flex-start!important;
  justify-content:center;
  align-self:center;
  width:100%!important;
  max-width:520px!important;
  margin:0!important;
  padding:0!important;
  gap:20px!important;
  text-align:left!important;
}

.home-page .project-chapter .chapter-copy h3,
.home-page .project-chapter .chapter-copy h3.title-long,
.home-page .project-chapter .chapter-copy h3.title-extra-long{
  width:100%;
  max-width:10.5ch!important;
  margin:0;
  font-size:clamp(3.8rem,5.6vw,6.8rem)!important;
  line-height:.88!important;
  letter-spacing:-.05em!important;
  overflow-wrap:normal;
  word-break:normal;
  hyphens:none;
  text-wrap:balance;
}

.home-page .project-chapter .chapter-copy h3.title-long{
  font-size:clamp(3.45rem,5vw,6rem)!important;
  max-width:12ch!important;
}

.home-page .project-chapter .chapter-copy h3.title-extra-long{
  font-size:clamp(3.05rem,4.45vw,5.3rem)!important;
  max-width:13ch!important;
}

.home-page .project-chapter .chapter-meta,
.home-page .layout-finale .chapter-meta{
  order:2;
  display:flex;
  flex-wrap:wrap;
  gap:10px 18px;
  width:100%;
  margin:4px 0 0!important;
  padding:16px 0 0!important;
  border-top:1px solid rgba(255,255,255,.16);
  color:rgba(244,241,235,.52);
}

.home-page .project-chapter .chapter-meta::before{content:none!important}

.home-page .project-chapter .chapter-copy>p,
.home-page .layout-panorama .chapter-copy>p,
.home-page .layout-diptych .chapter-copy>p,
.home-page .layout-finale .chapter-copy>p{
  order:3;
  justify-self:auto!important;
  grid-column:auto!important;
  grid-row:auto!important;
  width:100%;
  max-width:32ch!important;
  margin:2px 0 0;
  color:rgba(244,241,235,.72);
  font-size:clamp(1rem,1.15vw,1.12rem);
  line-height:1.62;
}

/* The photo itself is the visual object — no black stage, glow or oversized frame */
.home-page .project-chapter .chapter-media,
.home-page .layout-portrait .chapter-media,
.home-page .layout-panorama .chapter-media,
.home-page .layout-diptych .chapter-media,
.home-page .layout-finale .chapter-media{
  order:2!important;
  width:100%;
  min-width:0;
  min-height:0;
  display:grid!important;
  place-items:center!important;
  overflow:visible!important;
  background:transparent!important;
}

.home-page .project-chapter .chapter-media>a{
  position:relative;
  display:inline-grid!important;
  place-items:center!important;
  justify-self:center!important;
  width:max-content!important;
  max-width:100%!important;
  min-height:0!important;
  margin:0!important;
  padding:0!important;
  background:transparent!important;
  border:0!important;
  outline:0!important;
  box-shadow:none!important;
  filter:none!important;
  overflow:visible!important;
}

.home-page .project-chapter .chapter-media .responsive-picture{
  display:block!important;
  width:auto!important;
  max-width:100%!important;
  height:auto!important;
  margin:0!important;
  padding:0!important;
  background:transparent!important;
  box-shadow:none!important;
  transform:none!important;
}

.home-page .project-chapter .chapter-image,
.home-page .project-chapter .chapter-secondary-image{
  display:block!important;
  width:auto!important;
  height:auto!important;
  max-width:100%!important;
  max-height:76vh!important;
  margin:0!important;
  padding:0!important;
  object-fit:contain!important;
  object-position:center!important;
  background:transparent!important;
  border:1px solid rgba(244,241,235,.17)!important;
  border-radius:0!important;
  outline:0!important;
  box-shadow:none!important;
  filter:none!important;
  transform:none!important;
}

.home-page .project-chapter:hover .chapter-image,
.home-page .project-chapter:hover .chapter-secondary-image{
  filter:none!important;
  opacity:1!important;
}

/* Travel diptych: two clean photographs, each with its own fine border */
.home-page .layout-diptych .chapter-media>a{
  display:grid!important;
  width:100%!important;
  max-width:100%!important;
  grid-template-columns:minmax(0,1.12fr) minmax(0,.88fr)!important;
  gap:clamp(10px,1.4vw,22px)!important;
  align-items:center;
}

.home-page .layout-diptych .chapter-media .responsive-picture{
  display:grid!important;
  width:100%!important;
  place-items:center!important;
  background:transparent!important;
}

.home-page .layout-diptych .chapter-image,
.home-page .layout-diptych .chapter-secondary-image{
  max-height:68vh!important;
}

/* Compact action placed directly over the photograph */
.home-page .project-chapter .chapter-action,
.home-page .layout-diptych .chapter-action{
  left:clamp(14px,1.5vw,24px)!important;
  right:auto!important;
  bottom:clamp(14px,1.5vw,24px)!important;
  transform:none!important;
  gap:8px!important;
  padding:10px 12px!important;
  border:1px solid rgba(255,255,255,.34)!important;
  border-radius:0!important;
  background:rgba(5,5,5,.72)!important;
  box-shadow:none!important;
  backdrop-filter:blur(8px);
  -webkit-backdrop-filter:blur(8px);
  text-shadow:none;
}

.home-page .project-chapter .chapter-action span{padding:0!important}
.home-page .project-chapter .chapter-action i{padding:0 0 0 3px!important}

.home-page .project-chapter .chapter-media>a:hover .chapter-action,
.home-page .project-chapter .chapter-media>a:focus-visible .chapter-action{
  transform:translateY(-2px)!important;
  border-color:rgba(255,255,255,.68)!important;
  background:rgba(5,5,5,.86)!important;
}

/* Alternate only the order */
@media(min-width:821px){
  .home-page .project-chapter:nth-child(even){
    grid-template-columns:minmax(0,1.58fr) minmax(330px,.42fr)!important;
  }
  .home-page .project-chapter:nth-child(even) .chapter-media{order:1!important}
  .home-page .project-chapter:nth-child(even) .chapter-copy{order:2!important}
}

@media(max-width:1180px){
  .home-page .project-chapter,
  .home-page .project-chapter:nth-child(even){
    grid-template-columns:minmax(300px,.46fr) minmax(0,1.54fr)!important;
    gap:clamp(34px,4vw,62px)!important;
  }
  .home-page .project-chapter:nth-child(even){
    grid-template-columns:minmax(0,1.54fr) minmax(300px,.46fr)!important;
  }
  .home-page .project-chapter .chapter-copy h3,
  .home-page .project-chapter .chapter-copy h3.title-long,
  .home-page .project-chapter .chapter-copy h3.title-extra-long{
    font-size:clamp(3.1rem,5vw,5.3rem)!important;
  }
}

@media(max-width:820px){
  .home-page .project-chapter,
  .home-page .project-chapter:nth-child(even){
    min-height:auto;
    grid-template-columns:1fr!important;
    grid-template-rows:auto auto!important;
    gap:38px!important;
    padding:76px 14px!important;
  }
  .home-page .project-chapter .chapter-copy,
  .home-page .project-chapter:nth-child(even) .chapter-copy{
    order:1!important;
    max-width:none!important;
    padding:0 4px!important;
  }
  .home-page .project-chapter .chapter-media,
  .home-page .project-chapter:nth-child(even) .chapter-media{order:2!important}
  .home-page .project-chapter .chapter-copy h3,
  .home-page .project-chapter .chapter-copy h3.title-long,
  .home-page .project-chapter .chapter-copy h3.title-extra-long{
    max-width:12ch!important;
    font-size:clamp(3.4rem,15vw,5.7rem)!important;
  }
  .home-page .project-chapter .chapter-media>a{
    width:100%!important;
  }
  .home-page .project-chapter .chapter-media .responsive-picture{
    width:100%!important;
  }
  .home-page .project-chapter .chapter-image,
  .home-page .project-chapter .chapter-secondary-image{
    width:100%!important;
    max-height:none!important;
  }
  .home-page .layout-diptych .chapter-media>a{
    grid-template-columns:1fr!important;
  }
  .home-page .project-chapter .chapter-action,
  .home-page .layout-diptych .chapter-action{
    left:12px!important;
    bottom:12px!important;
    padding:9px 11px!important;
  }
}

@media(prefers-reduced-motion:reduce){
  .home-page .project-chapter .chapter-action{transition:none!important}
}
