/* ============================================================================
   Project detail page
   Claude design system — single serif weight (500), 1.60 body, warm neutrals
   ============================================================================ */

/* The album opens straight into the photos. This used to be a full-viewport
   cover image with the title written over it; it pushed the actual work below
   the fold, and since the cover is picked from the album it also showed one
   frame twice. Now it is just a title block.

   Top padding has to clear the floating nav plate, which ends at ~91px on
   desktop and ~96px on mobile. */
.p-head {
  padding: clamp(132px, 16vh, 176px) 0 44px;
}
.p-head .container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.p-head .cat {
  font-family: var(--font-sans);
  font-size: var(--fs-overline);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1.6;
  color: var(--accent);
}
.p-head .ttl {
  font-family: var(--font-serif);
  font-weight: 500;                        /* single serif weight */
  font-size: clamp(48px, 7.4vw, 108px);
  line-height: 1.08;
  letter-spacing: -0.018em;
}
.p-head .yr {
  font-family: var(--font-sans);
  font-size: var(--fs-overline);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1.6;
  color: var(--text-soft);
}

/* The album page used to have a separate meta block (title, year, category
   listed, long description). That is gone by design — the page is supposed
   to read as a photo album: a title, then the photos, then the testimonial
   and the CTA. */

.p-gallery { padding: 8px 0 52px; }

/* 12-column grid, 50px row unit, 20px gap — same ratios as the homepage
   magazine grid so proportions stay consistent across the site */
.p-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: 50px;
  gap: 20px;
}
.p-photo {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  cursor: zoom-in;
}
.p-photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: top center;   /* crop from the top — never cut heads */
  transition: transform 1s var(--easing);
}
.p-photo:hover img { transform: scale(1.04); }

.p-photo.span-tall   { grid-column: span 4; grid-row: span 9; }  /* 0.68 */
.p-photo.span-big    { grid-column: span 4; grid-row: span 7; }  /* 0.88 */
.p-photo.span-square { grid-column: span 4; grid-row: span 6; }  /* 1.03 */
.p-photo.span-mini   { grid-column: span 3; grid-row: span 4; }  /* 1.17 */
.p-photo.span-wide   { grid-column: span 6; grid-row: span 5; }  /* 1.91 */

.p-testimonial {
  padding: calc(var(--section-y) * 0.8) 0;
  background: var(--bg-soft);
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}
.p-testimonial .t-card { max-width: 720px; margin: 0 auto; }

.p-cta { padding: calc(var(--section-y) * 0.85) 0; text-align: center; }
.p-cta h2 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(36px, 4.6vw, 68px);
  line-height: 1.14;
  letter-spacing: -0.016em;
  margin-bottom: 34px;
}
.p-cta h2 span.sans {
  font-family: var(--font-sans);
  font-weight: 300;
  color: var(--text-mute);
  display: block;
  font-size: 0.32em;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

/* lightbox */
.p-lightbox {
  position: fixed; inset: 0;
  background: rgba(20, 20, 19, 0.94);
  backdrop-filter: blur(8px);
  z-index: 100;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity .3s var(--easing);
}
.p-lightbox.open { opacity: 1; pointer-events: auto; }
.p-lightbox img {
  max-width: 92vw; max-height: 92vh;
  object-fit: contain;
  border-radius: var(--r-lg);
}
.p-lightbox .lb-close {
  position: absolute; top: 24px; right: 24px;
  width: 44px; height: 44px;
  border-radius: var(--r-sm);
  background: var(--glass-bg-strong);
  border: 1px solid var(--line-strong);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; color: var(--text);
  transition: box-shadow .3s var(--easing);
}
.p-lightbox .lb-close:hover { box-shadow: var(--ring); }

@media (max-width: 900px) {
  .p-grid { grid-template-columns: repeat(6, 1fr); grid-auto-rows: 44px; gap: 16px; }
  .p-photo.span-tall   { grid-column: span 6; grid-row: span 9; }
  .p-photo.span-big    { grid-column: span 6; grid-row: span 7; }
  .p-photo.span-square { grid-column: span 3; grid-row: span 6; }
  .p-photo.span-mini   { grid-column: span 3; grid-row: span 4; }
  .p-photo.span-wide   { grid-column: span 6; grid-row: span 5; }
}

@media (max-width: 560px) {
  .p-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 40px; gap: 14px; }
  .p-photo.span-tall   { grid-column: span 2; grid-row: span 7; }
  .p-photo.span-big    { grid-column: span 2; grid-row: span 6; }
  .p-photo.span-square { grid-column: span 1; grid-row: span 5; }
  .p-photo.span-mini   { grid-column: span 1; grid-row: span 4; }
  .p-photo.span-wide   { grid-column: span 2; grid-row: span 4; }
  .p-head { padding: 118px 0 32px; }
  .p-head .ttl { font-size: clamp(38px, 11vw, 60px); }
}
/* ── Liquid glass details ─────────────────────────────────────────────────
   Same warm-glass system as the main stylesheet (see style.css). These two
   live here because project.css loads after it and would otherwise win. */

/* Photo counter ("2024 · 4 фотографии") as a chip next to the title. */
.p-head .yr {
  align-self: flex-start;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--liquid-tint);
  -webkit-backdrop-filter: blur(12px) saturate(150%) brightness(1.05);
  backdrop-filter: blur(12px) saturate(150%) brightness(1.05);
  box-shadow:
    inset 0 8px 14px -8px rgba(255, 250, 240, 0.32),
    inset 0 -8px 14px -6px rgba(13, 12, 10, 0.42);
}

/* Lightbox close button. The overlay behind it is a plain dark scrim —
   blurring a full-screen surface would cost far more than it is worth. */
.p-lightbox .lb-close {
  border: 0;
  background: var(--liquid-tint);
  -webkit-backdrop-filter: blur(12px) saturate(150%) brightness(1.05);
  backdrop-filter: blur(12px) saturate(150%) brightness(1.05);
  box-shadow:
    inset 0 8px 14px -8px rgba(255, 250, 240, 0.32),
    inset 0 -8px 14px -6px rgba(13, 12, 10, 0.42);
}
