/* Project detail: cover, overview, side-by-side before/after, scope, gallery. */
.project-hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: 560px;
  padding: 150px 0 50px;
  background: #081421;
  color: white;
  overflow: hidden;
}
.project-hero--plain { background: var(--charcoal); }
.hero-photo { position: absolute; inset: 0; z-index: 0; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center var(--image-focus-y, 55%); }
.hero-photo::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #081421c4 0%, #0814217a 26%, #08142133 48%, transparent 68%);
}
[data-project="ken10"] .hero-photo img { object-position: center var(--image-focus-y, 68%); }
[data-project="qm"] .hero-photo img { object-position: center var(--image-focus-y, 40%); }
[data-project="la-sirena"] .hero-photo img { object-position: center var(--image-focus-y, 58%); }
[data-project="ken10"] .comparison-grid img { object-position: center var(--image-focus-y, 62%); }
[data-project="qm"] .comparison-grid img { object-position: center var(--image-focus-y, 42%); }
[data-project="la-sirena"] .comparison-grid img { object-position: center var(--image-focus-y, 40%); }
.hero-copy { position: relative; z-index: 2; }
.project-hero h1 { font-size: clamp(48px, 6.4vw, 86px); line-height: 1.08; max-width: 540px; }
.project-hero .model { color: #e6e9ec; font-family: var(--serif); font-size: 28px; margin-top: 10px; }
.project-hero .intro { color: #e0e3e7; font-size: 17px; max-width: 390px; line-height: 1.8; margin-top: 24px; }

.project-overview { padding-block: 28px 32px; }
.project-overview .section-label { font-family: var(--serif); font-size: 23px; font-weight: 500; letter-spacing: -.025em; margin-bottom: 22px; }
.project-overview dl { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0; }
.project-overview dl > div { padding-inline: 20px; border-left: 1px solid var(--line); }
.project-overview dl > div:first-child { padding-left: 0; border-left: 0; }
.project-overview dt { font-size: 17px; color: var(--muted); margin-bottom: 6px; }
.project-overview dd { font-size: 17px; font-weight: 500; line-height: 1.5; }

.project-comparison { width: calc(100% - 40px); max-width: 1480px; margin-inline: auto; padding: 0; }
.comparison-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.comparison-grid figure { position: relative; margin: 0; }
.comparison-grid img { width: 100%; aspect-ratio: 1.5; height: auto; object-fit: cover; object-position: center var(--image-focus-y, 55%); background: var(--stone); }
.comparison-grid figcaption { position: absolute; top: 18px; left: 18px; background: var(--navy); color: white; padding: 7px 15px; font-size: 17px; }
.comparison-grid figure:last-child figcaption { left: auto; right: 18px; }

.project-scope { background: var(--sand); color: var(--ink); padding-block: 40px 42px; }
.project-scope .section-heading { margin-bottom: 28px; }
.project-scope h2, .project-gallery h2, .project-next h2 { font-size: 30px; }
.scope-intro { max-width: 760px; color: var(--muted); font-size: 17px; line-height: 1.8; margin-bottom: 28px; }
.scope-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; }
.scope-count-1 { grid-template-columns: 1fr; }
.scope-count-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.scope-item { border-left: 1px solid var(--line); padding: 0 30px; }
.scope-item:first-child { border-left: 0; padding-left: 0; }
.scope-item:last-child { padding-right: 0; }
.scope-item h3 { font-size: 21px; min-height: 59px; line-height: 1.4; }
.scope-item ul { color: var(--muted); margin: 15px 0 0; padding-left: 19px; line-height: 1.75; font-size: 17px; }
.scope-item li { margin-bottom: 6px; }
.scope-item li::marker { color: #916544; }

.project-gallery { width: calc(100% - 40px); max-width: 1480px; margin-inline: auto; padding: 0 0 38px; }
.project-gallery .section-heading { margin: 0 auto 24px; }
.gallery-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.gallery-photo { border: 0; background: none; padding: 0; overflow: hidden; grid-column: span 2; aspect-ratio: 1.15; display: block; cursor: pointer; }
.gallery-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center var(--image-focus-y, center); transition: filter .25s; }
.gallery-photo:hover img { filter: brightness(.9); }
.count-1 .gallery-photo, .count-2 .gallery-photo { grid-column: span 3; }
.count-5 .gallery-photo:nth-child(-n+2) { grid-column: span 3; aspect-ratio: 1.85; }

.project-next { padding-block: 28px 36px; border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr 1.5fr; gap: 35px; align-items: start; }
.project-next h2 { font-size: 23px; }
.next-links { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.next-links a { display: flex; flex-direction: column; }
.next-links span { font-family: var(--serif); font-size: 22px; margin-bottom: 5px; }
.next-links small { font-size: 17px; color: var(--muted); }
.next-links a:hover { color: #995624; }

#gallery-dialog { padding: 52px 20px 20px; border: 0; background: var(--charcoal); color: white; width: min(1050px, 95vw); max-height: 95svh; }
#gallery-dialog::backdrop { background: #000c; }
#gallery-dialog .dialog-close { position: absolute; right: 20px; top: 10px; color: white; background: none; border: 0; font-size: 17px; padding: 5px; min-height: 44px; }
#gallery-dialog .dialog-image img { width: 100%; max-height: 76svh; height: auto; object-fit: contain; }

@media (min-width: 1600px) {
  .project-hero { min-height: 620px; }
}
@media (max-width: 1100px) {
  .project-hero { min-height: 510px; }
  .project-hero .intro { max-width: 335px; font-size: 17px; }
  .hero-photo::after { background: linear-gradient(90deg, #081421cc 0%, #08142180 34%, #08142122 56%, transparent 76%); }
  .project-overview dl { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 25px; }
  .project-overview dl > div:nth-child(4) { padding-left: 0; border-left: 0; }
  .scope-item { padding-inline: 22px; }
  .scope-item h3 { min-height: 86px; }
}
@media (max-width: 820px) {
  .project-hero { min-height: 500px; padding-block: 120px 38px; }
  .project-hero h1 { font-size: 58px; }
  .scope-grid, .scope-count-2, .scope-count-4 { grid-template-columns: 1fr; gap: 25px; }
  .scope-item, .scope-item:first-child, .scope-item:last-child { border-left: 0; border-top: 1px solid var(--line); padding: 22px 0 0; }
  .scope-item h3 { min-height: 0; }
  .project-next { grid-template-columns: 1fr; }
}
@media (max-width: 540px) {
  .project-hero { min-height: 560px; padding-block: 110px 40px; align-items: flex-end; }
  .project-hero h1 { font-size: 48px; }
  .project-hero .model { font-size: 25px; }
  .project-hero .intro { max-width: 100%; margin-top: 17px; font-size: 17px; }
  .hero-photo::after { background: linear-gradient(0deg, #081421e0 0%, #08142199 30%, #08142140 58%, transparent 82%); }
  .project-overview { padding-block: 25px 28px; }
  .project-overview dl { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 23px; }
  .project-overview dl > div { padding-inline: 15px; }
  .project-overview dl > div:nth-child(4) { padding-left: 15px; border-left: 1px solid var(--line); }
  .project-overview dl > div:nth-child(odd) { padding-left: 0; border-left: 0; }
  .project-overview .section-label { font-size: 22px; }
  .project-comparison { width: calc(100% - 24px); }
  .comparison-grid { grid-template-columns: 1fr; gap: 10px; }
  .comparison-grid figcaption { top: 12px; left: 12px; }
  .comparison-grid figure:last-child figcaption { right: 12px; }
  .project-scope { padding-block: 32px; }
  .project-scope h2, .project-gallery h2 { font-size: 27px; }
  .project-gallery { width: calc(100% - 24px); }
  .gallery-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .gallery-photo, .count-5 .gallery-photo:nth-child(-n+2), .count-1 .gallery-photo, .count-2 .gallery-photo { grid-column: span 1; aspect-ratio: 1.05; }
  .gallery-photo:first-child { grid-column: span 2; aspect-ratio: 1.5; }
  .project-next { padding-block: 28px 40px; }
  .next-links { gap: 20px; }
  .next-links span { font-size: 22px; }
}
