/* Project showcase pages (e.g. canterbury-pool.html). Builds on style.css tokens. */

.project-details { background: var(--paper); }
.project-details-inner { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(40px, 6vw, 96px); align-items: start; }
.project-details h2 { margin-bottom: 18px; }
.text-link { display: inline-block; margin-top: 18px; font: 600 13px var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--bronze); text-decoration: none; }
.text-link:hover { text-decoration: underline; }

.spec-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); }
.spec-list li { padding: 26px 0 24px; border-bottom: 1px solid var(--line); }
.spec-list li:nth-child(odd):not(.spec-wide) { padding-right: 24px; border-right: 1px solid var(--line); }
.spec-list li:nth-child(even) { padding-left: 24px; }
.spec-list .spec-wide { grid-column: 1 / -1; }
.spec-list strong { display: block; font: 600 clamp(40px, 4.4vw, 64px)/1 var(--serif); color: var(--ink); margin-bottom: 8px; }
.spec-list span { font-size: 15px; color: var(--muted); }

.onsite { background: var(--ink); color: var(--white); }
.onsite .eyebrow { color: var(--bronze-light); }
.onsite .lede { color: rgba(255,255,255,.7); }
.onsite .container { max-width: 1560px; }
.onsite-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.onsite-grid figure { margin: 0; position: relative; overflow: hidden; aspect-ratio: 4 / 5; background: var(--ink-soft); }
.onsite-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease); }
.onsite-grid figure:hover img { transform: scale(1.04); }
.onsite-grid figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 60px 20px 18px;
  background: linear-gradient(to top, rgba(0,0,0,.75), rgba(0,0,0,0));
  font: 600 22px/1.2 var(--serif);
}

/* Split hero for photo-led project pages */
.p-hero { display: grid; grid-template-columns: 1.1fr 1fr; min-height: 100vh; min-height: 100svh; background: var(--stage); color: var(--white); }
.p-hero-copy { display: flex; flex-direction: column; justify-content: center; padding: calc(var(--header-h) + 40px) clamp(24px, 6vw, 96px) 64px; }
.p-hero-copy .eyebrow { color: var(--bronze-light); }
.p-hero-copy h1 { margin-bottom: 22px; }
.p-hero-lede { font-size: 19px; color: rgba(255,255,255,.82); max-width: 44ch; }
.p-hero-media { position: relative; overflow: hidden; }
.p-hero-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%; }

/* Before / after comparison sliders */
.ba-section { background: var(--ink); color: var(--white); }
.ba-section .eyebrow { color: var(--bronze-light); }
.ba-section .lede { color: rgba(255,255,255,.7); }
.ba-section .container { max-width: 1560px; }
.ba-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.ba { margin: 0; --pos: 50%; }
.ba-frame { position: relative; aspect-ratio: 3 / 4; overflow: hidden; background: var(--ink-soft); user-select: none; }
.ba-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.ba-before { clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.ba-frame::after { content: ""; position: absolute; top: 0; bottom: 0; left: var(--pos); width: 3px; margin-left: -1.5px; background: var(--white); box-shadow: 0 0 12px rgba(0,0,0,.5); pointer-events: none; }
.ba-frame::before {
  content: "‹ ›"; position: absolute; top: 50%; left: var(--pos); z-index: 2; transform: translate(-50%, -50%);
  width: 48px; height: 48px; border-radius: 50%; background: var(--white); color: var(--ink);
  display: grid; place-items: center; font: 600 20px/1 var(--sans); pointer-events: none; box-shadow: 0 4px 16px rgba(0,0,0,.35);
}
.ba-frame input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; z-index: 3; }
.ba-frame:focus-within::before { outline: 3px solid var(--bronze-light); outline-offset: 2px; }
.ba-tag { position: absolute; top: 14px; z-index: 1; padding: 6px 12px; background: rgba(12,11,9,.65); font: 600 11px var(--sans); letter-spacing: .16em; text-transform: uppercase; pointer-events: none; }
.ba-tag-before { left: 14px; } .ba-tag-after { right: 14px; }
.ba figcaption { margin-top: 14px; font: 600 24px/1.2 var(--serif); }

/* Finished spaces */
.spaces { background: var(--marble); }
.spaces .container { max-width: 1560px; }
.spaces-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.spaces-grid figure { margin: 0; position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--ink-soft); }
.spaces-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease); }
.spaces-grid figure:hover img { transform: scale(1.03); }
.spaces-grid figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 70px 26px 22px; color: var(--white); background: linear-gradient(to top, rgba(0,0,0,.75), rgba(0,0,0,0)); }
.spaces-grid figcaption strong { display: block; font: 600 30px/1.1 var(--serif); margin-bottom: 4px; }
.spaces-grid figcaption span { font-size: 16px; color: rgba(255,255,255,.85); }

@media (max-width: 860px) {
  .p-hero { grid-template-columns: 1fr; }
  .p-hero-media { min-height: 70vh; }
  .ba-list { grid-template-columns: 1fr; }
  .spaces-grid { grid-template-columns: 1fr; }
}

/* Gallery: masonry columns, full-screen viewer */
.gallery { background: var(--paper); }
.gallery .container { max-width: 1560px; }
.gallery-grid { columns: 3 340px; column-gap: 18px; }
.gallery-item {
  all: unset; display: block; width: 100%; margin-bottom: 18px; break-inside: avoid;
  overflow: hidden; cursor: zoom-in; background: var(--marble);
}
.gallery-item img { width: 100%; height: auto; transition: transform .8s var(--ease), filter .4s; }
.gallery-item:hover img { transform: scale(1.03); }
.gallery-item:focus-visible { outline: 3px solid var(--bronze); outline-offset: 2px; }

.gallery-viewer { width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(8,7,6,.95); color: var(--white); }
.gallery-viewer::backdrop { background: rgba(8,7,6,.95); }
.gallery-viewer[open] { display: grid; place-items: center; }
.gallery-viewer img { max-width: calc(100vw - 160px); max-height: calc(100vh - 110px); width: auto; height: auto; object-fit: contain; }
.gallery-count { position: absolute; left: 0; right: 0; bottom: 18px; margin: 0; text-align: center; font-size: 15px; color: rgba(255,255,255,.8); }
.gv-btn { position: absolute; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.25); color: var(--white); width: 52px; height: 52px; border-radius: 50%; font: 400 32px/1 var(--serif); cursor: pointer; }
.gv-btn:hover { background: rgba(255,255,255,.2); }
.gv-close { top: 18px; right: 18px; }
.gv-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.gv-next { right: 20px; top: 50%; transform: translateY(-50%); }
@media (max-width: 600px) {
  .gallery-grid { columns: 2 140px; column-gap: 10px; }
  .gallery-item { margin-bottom: 10px; }
  .gallery-viewer img { max-width: 100vw; max-height: calc(100vh - 140px); }
  .gv-prev, .gv-next { top: auto; bottom: 50px; transform: none; }
}

.project-cta { background: var(--marble); text-align: center; }
.project-cta-inner h2 { max-width: 20ch; margin: 0 auto 18px; }
.project-cta-inner .lede { margin: 0 auto; }
.project-cta-inner .chapter-actions { justify-content: center; }
.project-cta .btn-ghost { color: var(--ink); }

@media (max-width: 860px) {
  .project-details-inner { grid-template-columns: 1fr; }
  .onsite-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .onsite-grid { grid-template-columns: 1fr; }
  .spec-list { grid-template-columns: 1fr; }
  .spec-list li:nth-child(odd):not(.spec-wide), .spec-list li:nth-child(even) { padding-left: 0; padding-right: 0; border-right: 0; }
}
