/* ---------------------------------------------------------------- *
 * A past session
 *
 * The record's own face: one of these per room, opened from a row on the
 * PAST ROOMS screen. Same stage, same mark, same navigation slots and the
 * same paper as the two screens below it, so opening a room reads as the
 * record turning over rather than as a page load. Every offset below is a
 * design pixel.
 *
 * Two columns: the question and what the room was filed under on the left,
 * the account of the evening on the right. The account runs in flow and the
 * layer scrolls once it passes the bottom of the drawing, as on the record.
 *
 * Scoped under .session-page: all five screens share a document, and
 * .content / .logo / .session-meta / .arrow mean something different in each
 * (main-menu.css has its own .session and .session-meta for the *next*
 * session). The backdrop, chip and back rules deliberately repeat the other
 * stylesheets instead of being lifted into a shared one -- keeping each
 * screen's stylesheet self-contained is what makes the scoping hold.
 * ---------------------------------------------------------------- */

/* One step above .sessions-page (320), so a swap can fade this in over the
   record it was opened from. Every session screen shares the one z-index:
   only one is ever revealed, and among themselves document order decides what
   paints over what -- which is the order they are registered in, so the swap
   direction still lines up. See the SCREENS table in index.html. */
.session-page {
  position: fixed;
  inset: 0;
  z-index: 330;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transition: opacity 600ms ease-out, visibility 0s linear 600ms;
}

.session-page.revealed {
  opacity: 1;
  visibility: visible;
  transition: opacity 600ms ease-out, visibility 0s;
}

/* ---------------------------------------------------------------- *
 * Backdrop
 * ---------------------------------------------------------------- */

/* Opaque base colour, as on the other screens: it is what hides the ones this
   layer covers while it fades. Fixed, not scrolled with the stage, so a long
   account moves over a sheet that stays still. */
.session-page .backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background-color: #efeee7;
}

/* Same crop as the menu's paper, so the grain does not shift between the
   screens during the cross-fade. */
.session-page .backdrop-paper {
  position: absolute;
  left: -4.792%;    /*  -69px */
  top: -5%;         /*  -45px */
  width: 107.014%;  /* 1541px */
  height: 114.111%; /* 1027px */
  background-image: url("../img/white-crumpled-paper.9072c1d09528.webp");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  mix-blend-mode: multiply;
}

/* ---------------------------------------------------------------- *
 * Stage
 *
 * As on the record: the padding is what puts the columns on the baseline the
 * screen was drawn on (162px in, 283px down), rather than an absolute offset,
 * because the account has to be able to push the stage past 900px. The auto
 * side margins centre the stage in a viewport bigger than it while still
 * letting it start at the top -- and stay reachable -- once it is not.
 * ---------------------------------------------------------------- */

.session-page .session-sheet {
  position: relative;
  z-index: 1;
  width: 1440px;
  min-height: 900px;
  flex: none;
  margin: auto 0;
  padding: 283px 164px 96px 162px;
  box-sizing: border-box;
}

.session-page .logo {
  position: absolute;
  top: 27px;
  left: 155px;
  width: 118px;
  height: 118px;
}

/* ---------------------------------------------------------------- *
 * Top navigation
 * ---------------------------------------------------------------- */

.session-page .top-nav {
  position: absolute;
  top: 69px;
  right: 164px;
  display: flex;
  gap: 20px;
}

.session-page .chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 44px;
  padding: 0 22px;
  border: 1px solid rgba(89, 89, 89, 0.4);
  border-radius: 3px;
  background: rgba(239, 238, 231, 0.2);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  font-family: "Iosevka Charon Mono", monospace;
  font-weight: 500;
  font-size: 16px;
  line-height: 1;
  color: #595959;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 200ms ease-out, color 200ms ease-out,
              background-color 200ms ease-out;
}

.session-page .chip:hover {
  border-color: rgba(89, 89, 89, 0.75);
  background: rgba(239, 238, 231, 0.45);
}

.session-page .chip-accent {
  border-color: rgba(218, 30, 55, 0.5);
}

.session-page .chip-accent .arrow {
  color: #da1e37;
}

.session-page .chip-accent:hover {
  border-color: rgba(218, 30, 55, 0.85);
  background: rgba(218, 30, 55, 0.06);
}

/* ---------------------------------------------------------------- *
 * Back to the record
 *
 * Unboxed, as on the screens before it: the way out of a detour rather than
 * one of the screen's destinations, so it is drawn as the arrow and the words.
 * ---------------------------------------------------------------- */

.session-page .back {
  position: absolute;
  top: 227px;
  left: 162px;
  display: inline-flex;
  align-items: center;
  gap: 20px;
  padding: 0;
  border: none;
  background: none;
  font-family: "Iosevka Charon Mono", monospace;
  font-weight: 500;
  font-size: 16px;
  line-height: 1;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #da1e37;
  cursor: pointer;
}

.session-page .back .arrow {
  color: #da1e37;
  transition: transform 200ms ease-out;
}

.session-page .back:hover .arrow {
  transform: translateX(-3px);
}

/* ---------------------------------------------------------------- *
 * The two columns
 *
 * 339px then 740px, so the account starts on 501px and both columns stop
 * short of the navigation above them. The question spans the pair; the
 * filing label and the account sit side by side underneath.
 * ---------------------------------------------------------------- */

.session-page .content {
  display: grid;
  grid-template-columns: 339px minmax(0, 740px);
  align-items: start;
}

/* Set to a measure of its own rather than to the columns: it is allowed to
   run past the first one and over the gutter, but not the whole way across,
   or the question stops reading as a question and starts reading as a
   paragraph. 760px is where the drawn question turns -- one word short of the
   line it would take at the full width of the columns. */
.session-page .session-question {
  grid-column: 1 / -1;
  width: 760px;
  margin: 0;
  font-family: "Lora", Georgia, serif;
  font-weight: 400;
  font-size: 48px;
  line-height: 54px;
  letter-spacing: -0.01em;
  color: #1a1c20;
}

/* What the room was filed under: the book, then the date and the place. */
.session-page .session-filed {
  grid-column: 1;
  margin-top: 18px;
}

.session-page .session-credit {
  margin: 0;
  font-family: "General Sans", sans-serif;
  font-weight: 400;
  font-size: 18px;
  line-height: 1;
  color: #1a1c20;
}

/* The same muted mono the record uses for a row's date and place, so the two
   screens label a session the same way. */
.session-page .session-meta {
  margin: 21px 0 0;
  font-family: "Iosevka Charon Mono", monospace;
  font-weight: 500;
  font-size: 15px;
  line-height: 1;
  letter-spacing: 0.15em;
  color: rgba(89, 89, 89, 0.6);
}

/* ---------------------------------------------------------------- *
 * The account
 *
 * Smaller than the club's other prose and set on a tighter line: it is
 * someone's notes on an evening rather than the voice of the site, and the
 * column is long enough that it wants reading through rather than announcing.
 * The offset drops its first line onto the label's line in the column beside
 * it, so the two columns start together.
 * ---------------------------------------------------------------- */

.session-page .session-text {
  grid-column: 2;
  margin-top: 64px;
  font-family: "General Sans", sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 26px;
  color: #1a1c20;
}

.session-page .session-text p {
  margin: 0;
}

.session-page .session-text p + p {
  margin-top: 12px;
}

/* ---------------------------------------------------------------- *
 * Below the design size
 *
 * As on the other screens: the stage is unpinned, the pieces hung off the
 * drawing fall back into flow, and the two columns become one -- the question,
 * then the label, then the account.
 * ---------------------------------------------------------------- */

@media (max-width: 1439px) {
  .session-page {
    display: block;
  }

  .session-page .session-sheet {
    width: 100%;
    min-height: 100vh;
    margin: 0;
    padding: 36px clamp(24px, 5vw, 90px) 80px;
  }

  .session-page .logo {
    position: static;
    display: block;
    width: 96px;
    height: 96px;
  }

  .session-page .top-nav {
    top: 46px;
    right: clamp(24px, 5vw, 90px);
  }

  .session-page .back {
    position: static;
    margin-top: 56px;
  }

  .session-page .content {
    display: block;
    margin-top: 30px;
  }

  .session-page .session-question {
    width: auto;
    max-width: 760px;
    font-size: clamp(36px, 5vw, 48px);
    line-height: 1.14;
  }

  .session-page .session-text {
    margin-top: 40px;
    max-width: 740px;
  }
}

@media (max-width: 720px) {
  .session-page .session-sheet {
    padding: 32px 24px 64px;
  }

  .session-page .logo {
    width: 88px;
    height: 88px;
  }

  .session-page .top-nav {
    position: static;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 30px;
  }

  .session-page .chip {
    height: 40px;
    padding: 0 18px;
    font-size: 14px;
  }

  .session-page .back {
    margin-top: 40px;
    gap: 14px;
    font-size: 14px;
  }

  .session-page .session-credit {
    font-size: 17px;
    line-height: 1.4;
  }

  .session-page .session-meta {
    margin-top: 16px;
    font-size: 13px;
  }

  .session-page .session-text {
    margin-top: 32px;
  }
}
