/* The sixteen programs as a stacked deck (js/deck.js). The front card sits centred; the cards already
   passed stack above it as narrowing strips and the cards to come stack below as widening strips.
   Every card is one unit, photo and text together, that only scales. No rules. */
.pdeck {
  position: relative;
  height: calc(100vh + 15 * 42vh);
  background: #000;
  color: #ededea;
}
.pdeck__stage {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}
.pdeck__side {
  position: absolute;
  top: 76px;
  z-index: 300;
  font-family: var(--display, "Newsreader", serif);
  font-size: 15px;
  line-height: 1.3;
}
.pdeck__side i {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  color: #8d8d88;
}
.pdeck__side--l { left: var(--gut, 40px); }
.pdeck__side--r { right: var(--gut, 40px); text-align: right; }
.pdeck__go {
  font-family: var(--display, "Newsreader", serif);
  font-style: italic;
  font-size: 15px;
  color: #b9b9b4;
  text-decoration: none;
  transition: color .3s ease;
}
.pdeck__go:hover,
.pdeck__go:focus-visible {
  color: #ededea;
}
.pdeck__c {
  position: absolute;
  left: 50%;
  top: 0;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  background: #111;
  color: #fff;
  transform-origin: 50% 0;
  will-change: transform, width;
}
.pdeck__c::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: #000;
  opacity: .34;
}
/* Photo and text fill the card; the whole card scales as one unit */
.pdeck__ph {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 100%;
  transform: translateX(-50%);
  background: center/cover no-repeat;
}
.pdeck__in {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  z-index: 2;
  width: 100%;
  transform: translateX(-50%);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  padding: clamp(16px, 1.6vw, 26px) clamp(20px, 2vw, 32px) clamp(22px, 2.2vw, 34px);
}
.pdeck__foot {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 20px;
}
.pdeck__c h3 {
  margin: 0;
  font-family: var(--display, "Newsreader", serif);
  font-weight: 400;
  font-size: clamp(18px, 1.5vw, 23px);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pdeck__n {
  font-style: italic;
  font-size: 14px;
  opacity: .8;
}
.pdeck__body {
  margin-top: auto;
  max-width: 34em;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.pdeck__lead {
  margin: 0;
  font-family: var(--display, "Newsreader", serif);
  font-weight: 300;
  font-style: italic;
  font-size: clamp(28px, 2.8vw, 44px);
  line-height: 1.06;
  text-wrap: balance;
}
.pdeck__txt {
  margin: 0;
  font-size: 16px;
  line-height: 1.5;
  color: #e2e2dd;
}
@media (max-width: 1024px) {
  .pdeck__side { display: none; }
  .pdeck__side--l { left: 16px; }
  .pdeck__side--r { right: 16px; }
  .pdeck__go { font-size: 13px; }
  .pdeck__lead { font-size: 24px; }
  .pdeck__txt { font-size: 14px; }
}
/* The guide's plain list of the sixteen is replaced by the deck */
.guide .guide__index,
.guide .guide__list { display: none; }

/* Home: the headline that introduces the deck */
.pdeck-head {
  padding-bottom: clamp(24px, 3vw, 48px);
  text-align: center;
}
.pdeck-head__t {
  margin: 0 auto;
  font-weight: 300;
  font-size: clamp(40px, 5.6vw, 92px);
  line-height: 1;
}
.pdeck-head__d {
  max-width: 30em;
  margin: clamp(18px, 2vw, 28px) auto 0;
  font-size: clamp(16px, 1.3vw, 20px);
  line-height: 1.5;
  color: #b4b4af;
}

/* The program name is the focal point: centred along the top of every card. The decision sits
   lower left, the action lower right */
.pdeck__foot {
  position: relative;
  justify-content: center;
}
.pdeck__c h3 {
  font-size: clamp(22px, 2.1vw, 34px);
  font-weight: 400;
  text-align: center;
  max-width: 82%;
}
.pdeck__n {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
}
.pdeck__body {
  max-width: none;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(20px, 3vw, 56px);
  align-items: end;
}
.pdeck__lead {
  font-size: clamp(24px, 2.3vw, 38px);
}
.pdeck__txt {
  max-width: 26em;
  justify-self: end;
}
@media (max-width: 1024px) {
  .pdeck__c h3 { font-size: 19px; }
  .pdeck__body { grid-template-columns: 1fr; gap: 10px; }
  .pdeck__txt { justify-self: start; }
}

/* Legibility: a deeper even veil over the photograph, and the program name set larger */
.pdeck__c::before {
  opacity: .52;
}
.pdeck__c h3 {
  font-size: clamp(28px, 2.8vw, 46px);
  line-height: 1.1;
}
.pdeck__txt {
  color: #FFFFFF;
}
@media (max-width: 1024px) {
  .pdeck__c h3 { font-size: 22px; }
}

/* Long program names step down a size so the whole name stays on one line */
.pdeck__c h3 { max-width: 90%; }
.pdeck__c--long h3 { font-size: clamp(22px, 2.1vw, 34px); }
@media (max-width: 1024px) { .pdeck__c--long h3 { font-size: 17px; } }

/* Every program name at one size, wrapping to two lines when it needs to */
.pdeck__c h3,
.pdeck__c--long h3 {
  --fs: clamp(26px, 2.5vw, 40px);
  font-size: calc(var(--fs) / var(--s, 1));
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  text-wrap: balance;
  line-height: 1.08;
  max-width: 80%;
}
@media (max-width: 1024px) {
  .pdeck__c h3,
  .pdeck__c--long h3 { --fs: 20px; }
}

/* The front card: the program name large, in the centre of the card */
.pdeck__big {
  position: absolute;
  left: 8%;
  right: 8%;
  top: 50%;
  transform: translateY(-58%);
  margin: 0;
  z-index: 2;
  font-family: var(--display, "Newsreader", serif);
  font-weight: 300;
  font-size: clamp(40px, 4.6vw, 76px);
  line-height: 1.02;
  letter-spacing: -.01em;
  text-align: center;
  text-wrap: balance;
  color: #FFFFFF;
  pointer-events: none;
}
.pdeck__in { z-index: 3; }
@media (max-width: 1024px) {
  .pdeck__big { font-size: 30px; transform: translateY(-80%); }
}
.pdeck__big {
  left: 6%;
  right: 6%;
  top: 46%;
  transform: translateY(-50%);
  font-size: clamp(36px, 4.1vw, 66px);
}
@media (max-width: 1024px) {
  .pdeck__big { font-size: 28px; top: 40%; }
}
/* One program name per card, never duplicated: centred along the top, large */
.pdeck__big { display: none; }
.pdeck__c h3 {
  --fs: clamp(30px, 3vw, 48px);
}
.pdeck__foot {
  padding-top: 6px;
}
/* The section after the deck slides over the deck's empty lower half */
.pdeck + * ,
.pdeck + .page,
.pdeck + section {
  position: relative;
  z-index: 2;
  background: #000;
}

/* Phones: the card's question and description centred under the name, the question smaller */
@media (max-width: 1024px) {
  .pdeck__body { justify-items: center; text-align: center; }
  .pdeck__lead { font-size: 19px; line-height: 1.2; }
  .pdeck__txt { justify-self: center; }
}

/* Homepage deck: name and question only, no description and no number */
.pdeck .pdeck__txt, .pdeck .pdeck__n { display: none !important; }

/* Tablets: the name and its question sit together in the middle of the card */
@media (min-width: 761px) and (max-width: 1024px) {
  .pdeck .pdeck__in { justify-content: center; }
  .pdeck .pdeck__body { margin-top: 18px; }
  .pdeck .pdeck__lead { font-size: 24px; }
}

/* Home deck: the leader's question comes first, the name of the work after it */
.pdeck .pdeck__body { order: -1; margin-top: 0; }
.pdeck .pdeck__foot { margin-top: auto; }
@media (min-width: 761px) and (max-width: 1024px) {
  .pdeck .pdeck__body { margin: 0 0 18px; }
  .pdeck .pdeck__foot { margin-top: 0; }
}
@media (max-width: 760px) {
  .pdeck .pdeck__body { margin-bottom: 12px; }
}

/* Home deck: the leader's question is the focal point, the name of the work sits smaller under it */
.pdeck .pdeck__lead { font-size: clamp(32px, 3.4vw, 54px) !important; line-height: 1.15; }
.pdeck .pdeck__c h3 { font-size: clamp(17px, 1.4vw, 22px) !important; --fs: clamp(17px, 1.4vw, 22px); opacity: .85; }
@media (min-width: 761px) and (max-width: 1024px) {
  .pdeck .pdeck__lead { font-size: 34px !important; }
  .pdeck .pdeck__c h3 { font-size: 19px !important; }
}
@media (max-width: 760px) {
  .pdeck .pdeck__lead { font-size: 25px !important; }
  .pdeck .pdeck__c h3 { font-size: 15px !important; }
}

/* Laptops: the leader's question sits centred on the card, the name of the work centred at its foot */
@media (min-width: 1025px) {
  .pdeck .pdeck__body { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; margin: auto 0 !important; max-width: none; }
  .pdeck .pdeck__lead { max-width: 18em; text-wrap: balance; }
  .pdeck .pdeck__foot { margin-top: 0; }
}

/* Big desktops (8 Nov): the cards are 40% smaller (js/deck.js), so the name of the work is set larger to read clearly */
@media (min-width: 1600px) {
  .pdeck .pdeck__c h3 { font-size: clamp(24px, 1.35vw, 40px) !important; --fs: clamp(24px, 1.35vw, 40px); }
}
