/* Project page layout only. Every value comes from tokens.css; shared pieces from components.css. */

/* ---------- Intro: the name, the write-up and its credits (Lauren Nelson's) ----------
   On the gallery's two columns, so the text lines up with the photos' edges (Luke 10/26: on
   Lauren's it doesn't): the name and write-up over the left photo of a pair, the credits over
   the right one. Page edges are the strip's (--gutter), as everywhere. */
.project__intro {
  display: grid; grid-template-columns: 1fr 1fr;
  column-gap: var(--photo-gap); row-gap: var(--stack-md);  /* name to write-up: Lauren Nelson's 33px, by eye */
  padding: var(--page-top) var(--gutter) var(--block-gap);
}
.project__title { grid-column: 1; }
.project__story { grid-column: 1; grid-row: 2; }
/* The credits: architect, builder, photographer, stylist, as many as the project has, as on
   Becky's current site (Luke 10/26). One row each over the right photo: the role in the caps
   label, the name in small sentence case (the caption's pair, .small) on its baseline. No rules
   (Becky 10/30: "Might look cleaner without?"), so the names line up a gap past the longest role,
   as on phones, and the rows read as one block; the first row is level with the write-up's top. */
.credits {
  grid-column: 2; grid-row: 2; align-self: start;
  display: grid; grid-template-columns: auto 1fr;
  column-gap: var(--stack-md); row-gap: var(--stack-sm);
  margin: 0;
}
.credits__item { grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; align-items: baseline; }
.credits dd { margin: 0; }

/* ---------- Gallery: the cover, then the photos (build/pages/project.mjs) ----------
   Two kinds of row (Luke 10/26): a wide photo full width at 3:2 (a 4:3 one would be taller
   than the screen), or two tall ones side by side at 4:5. An odd tall photo at the end sits
   alone in the left column, the size of a pair's. One gap everywhere, across and down. Phones
   keep the pairs side by side. */
.gallery { display: grid; row-gap: var(--photo-gap); padding: 0 var(--gutter) var(--block-gap); }
.gallery__row { display: grid; grid-template-columns: 1fr 1fr; column-gap: var(--photo-gap); }
.gallery__row--pair > .photo, .gallery__row--single > .photo { aspect-ratio: var(--ratio-tall); }
.gallery__row--wide > .photo { grid-column: 1 / -1; aspect-ratio: var(--ratio-wide); }

/* ---------- Bar: back to the portfolio | Contact us | next project (Karia's) ----------
   Three cells of the grid, divided by its lines, all three in the caps label (Luke 10/26),
   each centered in its cell (Luke 10/27). The ends carry the button arrow (it moves on hover,
   as on every button); the middle is a text link (.link) and softens on hover. */
.pager { display: grid; grid-template-columns: 1fr 1fr 1fr; }
.pager > * + * { border-left: var(--stroke) solid var(--line); }
.pager a {
  display: flex; align-items: center; justify-content: center;
  min-height: var(--bar-h);
  padding-inline: var(--gutter);
  text-align: center;
}

@media (max-width: 45.99em) {
  .project__intro { grid-template-columns: 1fr; }
  .project__title, .project__story, .credits { grid-column: 1; grid-row: auto; }
  .pager { grid-template-columns: 1fr 1fr; }
  .pager__start { grid-column: 1 / -1; grid-row: 1; border-bottom: var(--stroke) solid var(--line); }
  .pager > .pager__start { border-left: 0; }
}
/* Phones under 390px (SE, mini): "Back to portfolio" doesn't fit half the bar on one line, so
   it reads "Portfolio" there (screen readers still hear all of it) */
@media (max-width: 24.36em) {
  .pager__more { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}
