﻿/* Page for a single project */
.project-hero { padding-top: 64px; padding-bottom: 28px; }
.project-back { display: inline-flex; margin-bottom: 22px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; text-decoration: none; color: #6b685b; }
.project-title { margin: 20px 0 0; font-weight: 300; font-size: clamp(22px, 3.8vw, 48px); line-height: 1; letter-spacing: -.035em; max-width: 15ch; }
.project-summary { margin: 22px 0 0; max-width: 54ch; font-size: 18px; line-height: 1.65; color: var(--muted-2); }
.project-copy { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; padding-top: 12px; padding-bottom: 52px; }
.project-copy p { margin: 0 0 18px; font-size: 16px; line-height: 1.7; color: var(--muted-2); }
.project-gallery { padding-bottom: 110px; }
.project-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.project-photo { margin: 0; background: #ebe7dc; overflow: hidden; cursor: zoom-in; min-height: 280px; }
.project-photo img { width: 100%; height: 100%; display: block; object-fit: cover; transition: transform .35s ease; }
.project-photo:hover img { transform: scale(1.015); }

.project-lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(14, 13, 10, .92);
}
.project-lightbox.is-open { display: flex; }
.project-lightbox__backdrop {
  position: absolute;
  inset: 0;
}
.project-lightbox__dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 1600px);
  height: min(100%, 100vh);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
}
.project-lightbox__media {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.project-lightbox__media img {
  max-width: 100%;
  max-height: calc(100vh - 120px);
  object-fit: contain;
  display: block;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .35);
}
.project-lightbox__button,
.project-lightbox__close {
  appearance: none;
  border: 0;
  background: rgba(246, 245, 241, .12);
  color: var(--paper);
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  cursor: pointer;
  transition: background .2s ease, transform .2s ease;
}
.project-lightbox__button:hover,
.project-lightbox__close:hover { background: rgba(246, 245, 241, .2); transform: scale(1.04); }
.project-lightbox__button:disabled { opacity: .35; cursor: default; transform: none; }
.project-lightbox__prev { grid-column: 1; grid-row: 1; justify-self: start; }
.project-lightbox__next { grid-column: 3; grid-row: 1; justify-self: end; }
.project-lightbox__close {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 2;
}
.project-lightbox__counter {
  grid-column: 2;
  grid-row: 2;
  justify-self: center;
  color: rgba(246, 245, 241, .8);
  font-size: 13px;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.project-lightbox__icon {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2.1;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (max-width: 820px) {
  .project-hero { padding-top: 42px; }
  .project-title { max-width: none; }
  .project-summary { font-size: 16px; }
  .project-copy { padding-bottom: 40px; }
  .project-grid { grid-template-columns: 1fr; gap: 18px; }
  .project-photo { min-height: 240px; }
  .project-gallery { padding-bottom: 72px; }
  .project-lightbox { padding: 12px; }
  .project-lightbox__dialog {
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-rows: minmax(0, 1fr) auto auto;
  }
  .project-lightbox__media img { max-height: calc(100vh - 170px); }
  .project-lightbox__counter { grid-column: 1 / -1; grid-row: 3; }
  .project-lightbox__close { top: 12px; right: 12px; }
  .project-lightbox__button { width: 44px; height: 44px; }
}
@media (max-width: 560px) {
  .project-summary,
  .project-copy p { font-size: 15px; }
  .project-photo { min-height: 200px; }
}
