/* Three local composition types: editorial copy, independent concepts, visual galleries. */
.japandi-page {
  --page-width:1280px;
  --editorial-width:960px;
  --page-gutter:clamp(20px,4vw,48px);
  --page-inset:max(var(--page-gutter),calc((100% - var(--page-width)) / 2));
  --japandi-gap:clamp(24px,3vw,36px);
  --section-space:clamp(56px,5vw,80px);
  --subsection-space:clamp(28px,3vw,40px);
}
.japandi-page :is(.case-content,.technical-documentation) { padding-inline:var(--page-inset); }
.japandi-page .case-content { padding-block:56px var(--section-space); }
.japandi-page :is(.case-brief,.reading-copy,.rooms-heading,.room-heading,.room-chapter-heading,.editorial-copy,.apartment-walk,.technical-heading,.technical-group-heading) { max-width:var(--editorial-width); }
.japandi-page :is(.project--japandi p,.technical-heading p,.technical-group-heading p) { max-width:none; margin:0 0 16px; }
.japandi-page :is(.case-brief,.room-plan,.room-heading,.room-chapter-heading,.editorial-copy,.reading-copy,.technical-heading,.technical-group-heading) > p:last-child { margin-bottom:0; }
.japandi-page :is(.case-brief,.room-plan,.rooms-heading,.technical-heading) h2 { margin:0 0 16px; font-size:clamp(1.85rem,2.3vw,2.6rem); line-height:1.18; }
.japandi-page :is(.room-heading,.technical-group-heading) h3 { margin:0 0 16px; font-size:clamp(1.5rem,1.9vw,2rem); line-height:1.2; }
.japandi-page .room-chapter-heading h4 { margin:0 0 12px; font:clamp(1.25rem,1.5vw,1.6rem)/1.25 var(--serif); }
.japandi-page :is(.case-brief,.room-plan,.room-heading,.room-chapter-heading,.editorial-copy,.apartment-walk,.reading-copy) { color:var(--ink-soft); }
.japandi-page :is(h1,h2,h3,h4,.walk-title) { color:var(--ink); }
.japandi-page .japandi-story { display:block; }
.japandi-page .case-brief { margin-bottom:var(--section-space); }
.japandi-page .room-plan > .gallery-item { width:min(100%,900px); margin:var(--subsection-space) auto; }
.japandi-page .apartment-walk { margin-top:var(--subsection-space); }
.japandi-page .walk-title { font:clamp(1.4rem,2vw,1.8rem)/1.25 var(--serif); }
.japandi-page .original-description { margin-top:24px; padding-block:12px; }
.japandi-page .reading-copy { padding-top:24px; }
.japandi-page .room-presentation-chapter { margin-top:var(--section-space); }
.japandi-page .rooms-heading { margin-bottom:24px; }
.japandi-page .room-section { margin-top:var(--section-space); padding-top:0; border:0; }
.japandi-page :is(.room-heading,.room-chapter-heading) { margin-bottom:24px; }
.japandi-page .room-section > .room-heading:last-child { margin-bottom:0; }
.japandi-page .room-chapter + .room-chapter { margin-top:var(--subsection-space); }
.japandi-page .living-concept { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:var(--japandi-gap); align-items:start; }
.japandi-page .living-copy > .room-heading { margin-bottom:var(--subsection-space); }
.japandi-page .living-copy .room-chapter-heading { margin-bottom:0; }
.japandi-page .living-moodboards { display:grid; gap:32px; justify-items:center; }
.japandi-page .living-moodboards > .room-moodboard { width:min(100%,320px); }
.japandi-page .room-visualizations { margin-top:var(--subsection-space); }
.japandi-page .japandi-gallery,
.japandi-page .technical-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:var(--japandi-gap); align-items:start; }
.japandi-page .japandi-gallery > .gallery-item:last-child:nth-child(odd) { grid-column:1 / -1; width:calc((100% - var(--japandi-gap)) / 2); justify-self:center; }
.japandi-page .japandi-story .image-button { height:auto; aspect-ratio:auto; background:var(--white); }
.japandi-page .japandi-story .image-button img { width:100%; height:auto; object-fit:contain; }
.japandi-page .technical-documentation { padding-block:0 var(--section-space); border:0; }
.japandi-page .technical-heading { margin-bottom:var(--subsection-space); }
.japandi-page .technical-group-heading { margin-bottom:24px; }
.japandi-page .technical-group + .technical-group { margin-top:var(--section-space); }
.japandi-page .technical-thesis-card { max-width:var(--editorial-width); margin-top:var(--subsection-space); }
@media(max-width:900px) {
  .japandi-page .living-concept { grid-template-columns:minmax(0,1fr); gap:var(--subsection-space); }
}
@media(max-width:640px) {
  .japandi-page .case-content { padding-top:36px; }
  .japandi-page :is(.japandi-gallery,.technical-grid) { grid-template-columns:minmax(0,1fr); }
  .japandi-page .japandi-gallery > .gallery-item:last-child:nth-child(odd) { width:100%; }
  .japandi-page .living-moodboards > .room-moodboard { width:min(100%,280px); }
}
