/* ==========================================================================
   gallery.css, carlpayne.com
   Layout shared by all gallery pages (baseline.html, deviation.html,
   trace.html): page head, image plates, next-course door.
   Requires base.css to be loaded first.
   ========================================================================== */

/* ----- Gallery head: course number, title, description, blurb -------------- */
.gal-head {
  padding: 9.5rem 2rem 4.5rem;
  max-width: 880px;
  margin: 0 auto;
  text-align: center;
}

.gal-head .course-no { margin-bottom: 1.6rem; }

.gal-head h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  letter-spacing: .13em;
  text-transform: uppercase;
  line-height: 1.08;
  color: var(--bone);
  text-shadow: var(--relief);
}

.gal-head .desc {
  margin-top: 1.4rem;
  font-style: italic;
  color: var(--bone-dim);
  font-size: 1.15rem;
}

.gal-head .blurb {
  margin: 2.2rem auto 0;
  max-width: 46ch;
  font-size: 1.08rem;
}

.gal-head .rule {
  width: 56px;
  height: 1px;
  background: var(--hairline);
  margin: 3.2rem auto 0;
}

/* ----- Plates: one image per figure, varying widths -------------------------
   Width classes:   .w-narrow (560px)  .w-mid (760px)  .w-wide (1000px)
   Pull classes:    .pull-left  .pull-right  (offset from center for rhythm)  */
.plates { max-width: 1100px; margin: 0 auto; padding: 1rem 1.4rem 6rem; }

.plate {
  margin: 0 auto 7rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.plate.w-narrow { max-width: 560px; }
.plate.w-mid    { max-width: 760px; }
.plate.w-wide   { max-width: 1000px; }

.plate.pull-left  { margin-left: 0; }
.plate.pull-right { margin-right: 0; }

.plate img {
  width: 100%;
  /* Physical presence: each print floats slightly off the wall. */
  box-shadow: 0 18px 50px rgba(0, 0, 0, .45), 0 4px 14px rgba(0, 0, 0, .5);
}

.plate figcaption {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: baseline;
}

/* Caption (left) and plate number (right), both in ticket mono. */
.plate .cap {
  font-family: var(--font-mono);
  font-size: .64rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--bone-dim);
}

.plate .no {
  font-family: var(--font-mono);
  font-size: .64rem;
  letter-spacing: .2em;
  color: rgba(234, 227, 214, .35);
}

@media (max-width: 720px) {
  .plate { margin-bottom: 4.5rem; }
  .plate.pull-left,
  .plate.pull-right { margin-left: auto; margin-right: auto; }
}

/* Scroll reveal, js/reveal.js adds .in when a plate enters the viewport. */
.plate {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .9s ease, transform .9s ease;
}

.plate.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .plate { opacity: 1; transform: none; }
}

/* ----- Next course: full-width door to the next gallery --------------------- */
.next-course {
  border-top: 1px solid var(--hairline);
  background: var(--ground-2);
}

.next-course a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 4.5rem 2rem;
  text-align: center;
  transition: background .3s;
}

.next-course a:hover { background: #221d18; }

.next-course .nc-name {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 2rem;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.next-course a:hover .nc-name { color: var(--brass); }

.next-course .nc-desc { font-style: italic; color: var(--bone-dim); }
