/* Shared first-screen composition across every project. */
body .project-opening { height: calc(100svh - 88px); min-height: 360px; display: flex; flex-direction: column; gap: 20px; padding: 24px 0 16px; box-sizing: border-box; }
body .project-opening-title { flex: 0 0 auto; text-align: center; margin: 0; padding: 0; }
body .project-opening-title > p { margin: 0; font-size: 12px; line-height: 1.4; color: #777; }
body .project-opening-title h1 { margin: 8px 0; font-size: clamp(30px, 4vw, 60px); font-weight: 400; line-height: 1.05; letter-spacing: -.035em; }
body .project-opening-title .project-opening-deck { font-size: 14px; color: inherit; }
body .project-opening .project-opening-image { flex: 1 1 0; min-height: 0; width: 100%; max-width: none; height: auto; margin: 0; padding: 0; overflow: hidden; background: transparent; }
body .project-opening-image > a { display: block; width: 100%; height: 100%; }
body .project-opening .project-opening-image img { display: block; width: 100%; height: 100%; min-height: 0; max-height: 100%; object-fit: contain; object-position: center; margin: 0; border-radius: 0; transform: none; }
body .coway-chapter-nav { position: static; }
body.coway-page .project-opening { height: calc(100svh - 132px); }
@media (max-width: 700px) {
 body .project-opening { height: calc(100svh - 80px); gap: 14px; padding-top: 20px; }
 body.coway-page .project-opening { height: calc(100svh - 128px); }
 body .project-opening-title > p { font-size: 10px; }
 body .project-opening-title .project-opening-deck { font-size: 12px; }
}

/* Override the older Coway cover crop, including its more specific link rule. */
body.coway-page .project-opening .coway-hero .image-link { display: block; flex: none; width: 100%; height: 100%; min-height: 0; overflow: visible; }
body.coway-page .project-opening .coway-hero .image-link img { width: 100%; height: 100%; max-height: 100%; object-fit: contain; object-position: center; }

/* Keep the title anchored within the complete, uncropped photograph. */
body .project-opening { display: flex; align-items: center; justify-content: center; padding: 20px 0; gap: 0; }
body .project-opening .project-opening-image { position: relative; flex: 0 1 auto; width: min(100%, calc((100svh - 150px) * var(--hero-ratio))); height: auto; aspect-ratio: var(--hero-ratio); overflow: visible; }
body .project-opening .project-opening-title { position: absolute; z-index: 2; top: 6%; left: 4%; right: 4%; pointer-events: none; }
body .project-opening-title h1 { font-size: clamp(26px, 4vw, 60px); }
body.dyson-page .project-opening-title, body.bentley-page .project-opening-title { color: #fff; text-shadow: 0 1px 16px #0009; }
body.dyson-page .project-opening-title > p, body.bentley-page .project-opening-title > p { color: #f2f2f2; }
@media (max-width: 700px) {
 body .project-opening { height: auto; min-height: 0; padding: 18px 0 30px; }
 body.coway-page .project-opening { height: auto; }
 body .project-opening .project-opening-image { width: 100%; }
 body .project-opening-title h1 { font-size: clamp(22px, 6vw, 36px); margin: 4px 0; }
 body .project-opening-title .project-opening-deck { font-size: 10px; }
}

/* Full-screen, edge-to-edge project entrances. */
body .project-opening, body.coway-page .project-opening {
  width: 100vw;
  margin: 0 calc(50% - 50vw);
  height: calc(100svh - 68px);
  min-height: 0;
  padding: 0;
}
body .project-opening .project-opening-image {
  width: 100%; height: 100%; max-height: none;
  aspect-ratio: auto; flex: 1 1 auto; overflow: hidden;
}
body .project-opening .project-opening-image img,
body.coway-page .project-opening .coway-hero .image-link img {
  width: 100%; height: 100%; max-height: none;
  object-fit: cover; object-position: center;
}
body.coway-page .project-opening .coway-hero .image-link img { object-position: center 80%; }
body .project-opening .project-opening-title { top: 6%; }
body.cmf-page .project-opening-title { color: #fff; text-shadow: 0 2px 18px #000b; }
body.cmf-page .project-opening-title > p { color: #fff; }
@media (max-width: 700px) {
 body .project-opening, body.coway-page .project-opening { height: calc(100svh - 64px); padding: 0; }
 /* Preserve the whole product on narrow screens, continuing its studio backdrop. */
 body.apex-page .project-opening-image { background: #f2edf0; }
 body.coway-page .project-opening-image { background: #e6e6e6; }
 body.apex-page .project-opening .project-opening-image img,
 body.coway-page .project-opening .coway-hero .image-link img { object-fit: contain; }
}
body:has(.project-opening) { overflow-x: clip; }
body.bentley-page .project-opening-title h1,
body.dyson-page .project-opening-title h1,
body.cmf-page .project-opening-title h1 { color: #fff; }

/* Restore the earlier fitted opening: complete image, natural proportions, no viewport bleed. */
body .project-opening, body.coway-page .project-opening {
 width:100%; margin:0; height:auto; min-height:0; padding:20px 0;
 display:flex; align-items:center; justify-content:center;
}
body .project-opening .project-opening-image {
 width:min(100%,calc((100svh - 150px) * var(--hero-ratio,1.5)));
 max-width:100%; height:auto; max-height:none; aspect-ratio:var(--hero-ratio,1.5);
 flex:0 0 auto; margin:0; overflow:visible;
}
body .project-opening .project-opening-image > a,
body.coway-page .project-opening .coway-hero .image-link {
 display:block; width:100%; height:auto; overflow:visible;
}
body .project-opening .project-opening-image img,
body.coway-page .project-opening .coway-hero .image-link img {
 display:block; width:100%; height:auto; max-height:none; object-fit:contain !important;
 object-position:center !important; transform:none;
}
@media(max-width:700px){
 body .project-opening,body.coway-page .project-opening {height:auto;padding:18px 0 30px;}
 body .project-opening .project-opening-image {width:100%;}
}
