/* The slides: four sheets of a spoof exam paper on the same desk as the builder.
   Each slide is drawn 1280 x 720 and the whole stage is scaled to fit the screen (see slides.js). */

.deck-body {
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

.stage {
  position: absolute;
  left: 50%;
  top: calc(50% - 22px);
  width: 1280px;
  height: 720px;
  transform: translate(-50%, -50%) scale(var(--k, 1));
  transform-origin: center;
}

.slide {
  position: absolute;
  inset: 0;
  padding: 40px 58px 44px;
  overflow: hidden;
  outline: 0;
}
.slide[hidden] {
  display: none;
}
.slide.enter {
  animation: turn 0.32s ease-out both;
}
.slide.enter-back {
  animation: turn-back 0.32s ease-out both;
}
@keyframes turn {
  from {
    opacity: 0;
    translate: 46px 0;
    rotate: 0.8deg;
  }
}
@keyframes turn-back {
  from {
    opacity: 0;
    translate: -46px 0;
    rotate: -0.8deg;
  }
}

/* things that appear one press at a time */
.step {
  opacity: 0;
  visibility: hidden;
}
.step.shown {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.3s ease;
}

/* printed at the foot of every page */
.slide::after {
  content: attr(data-page);
  position: absolute;
  left: 0;
  right: 0;
  bottom: 16px;
  font-size: 15px;
  font-weight: 700;
  text-align: center;
}
.slide::before {
  content: "AOP/1";
  position: absolute;
  left: 58px;
  bottom: 16px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--pencil);
}
.turn-over {
  position: absolute;
  right: 58px;
  bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 800;
}
.turn-over::after {
  content: "";
  border: 6px solid transparent;
  border-left: 9px solid var(--ink);
  border-right: 0;
}

/* ---------------------------------------------------------------- 1. the cover */
.cover-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.logo {
  display: block;
  width: auto;
  height: 66px;
}
.paper-box {
  display: grid;
  grid-auto-flow: column;
  margin: 0;
  border: 2px solid var(--ink);
}
.paper-box > div {
  padding: 8px 20px 7px;
  min-width: 130px;
}
.paper-box > div + div {
  border-left: 2px solid var(--ink);
}
.paper-box dt {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--pencil);
}
.paper-box dd {
  margin: 0;
  font-family: var(--typed);
  font-weight: 700;
  font-size: 22px;
  white-space: nowrap;
}
.kicker {
  margin-top: 40px;
  font-size: 16px;
  letter-spacing: 0.22em;
}
.slide-cover h1 {
  margin: 4px 0 16px -6px;
  font-weight: 900;
  font-size: 138px;
  line-height: 0.9;
  letter-spacing: -0.045em;
  white-space: nowrap;
}
.dot {
  color: var(--pen);
}
.strap {
  font-size: 30px;
  line-height: 1.25;
}
.instructions {
  position: relative;
  margin-top: 30px;
  padding-top: 18px;
  border-top: 2px solid var(--ink);
}
.instructions h2 {
  font-size: 14px;
}
.instructions ol {
  display: grid;
  gap: 5px;
  margin-top: 10px;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.instructions li {
  position: relative;
  padding-left: 40px;
  font-size: 25px;
  line-height: 1.3;
  counter-increment: step;
}
.instructions li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  font-weight: 800;
}
.ringed {
  position: relative;
  display: inline-block;
}
.ringed .drawn {
  position: absolute;
  inset: -12px -10px -14px;
  width: calc(100% + 20px);
  height: calc(100% + 26px);
  overflow: visible;
  color: var(--pen);
}
.ringed .drawn path {
  vector-effect: non-scaling-stroke;
  stroke-width: 3.5;
}
.cover-note {
  position: absolute;
  left: 716px;
  top: 34px;
  font-weight: 700;
  font-size: 36px;
  line-height: 1;
  rotate: -4deg;
}
.examiner {
  position: absolute;
  left: 58px;
  bottom: 44px;
  font-size: 21px;
  font-weight: 800;
}
.examiner span {
  margin-left: 14px;
  font-weight: 400;
  color: var(--pencil);
}

/* ---------------------------------------------------------------- the question line on slides 2 to 4 */
.question {
  display: flex;
  align-items: baseline;
  gap: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--ink);
}
.question .q-num {
  font-size: 30px;
  font-weight: 900;
}
.question h2 {
  flex: 1;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.question .section-letter {
  font-size: 16px;
  letter-spacing: 0.2em;
}
.question .swipe {
  font-size: 44px;
  font-weight: 900;
  letter-spacing: -0.03em;
}
.marks {
  font-size: 18px;
  font-weight: 700;
  white-space: nowrap;
}

/* ---------------------------------------------------------------- 2. the anatomy */
.script {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}
.row {
  display: grid;
  grid-template-columns: 790px minmax(0, 1fr);
  gap: 0 34px;
  align-items: start;
}
.row[hidden] {
  display: none;
}
.row .typed-text {
  font-family: var(--typed);
  font-size: 18.5px;
  line-height: 1.5;
}
.row-bare .typed-text {
  font-size: 30px;
  line-height: 1.3;
}
.side-note {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 0 10px;
  font-family: var(--hand);
  line-height: 1.12;
}
.side-note .drawn {
  width: 44px;
  height: 22px;
  margin-top: 8px;
  overflow: visible;
  rotate: 180deg;
}
.side-note strong {
  font-weight: 700;
  font-size: 33px;
}
.side-note span {
  grid-column: 2;
  font-size: 22px;
  line-height: 1.2;
}
.row-bare .side-note strong {
  font-size: 30px;
}
.slide-anatomy .seg.sweep {
  animation: sweep 0.7s ease-out both;
}
@keyframes sweep {
  from {
    background-size: 0% 100%;
  }
  to {
    background-size: 100% 100%;
  }
}
.slide-anatomy .stamp-spot {
  position: absolute;
  left: 470px;
  bottom: 50px;
}
.slide-anatomy .stamp {
  font-size: 46px;
  border-width: 5px;
  border-radius: 10px;
  padding: 4px 22px 1px;
}

/* ---------------------------------------------------------------- 3. your turn */
.turn-grid {
  display: grid;
  grid-template-columns: 372px minmax(0, 1fr);
  gap: 0 56px;
  margin-top: 30px;
}
.qr-card {
  grid-row: 1 / span 2;
  padding: 22px 22px 16px;
  rotate: -1.6deg;
}
.qr svg {
  display: block;
  width: 100%;
  height: auto;
}
.qr-address {
  margin-top: 10px;
  font-weight: 700;
  font-size: 19px;
  line-height: 1.25;
  text-align: center;
  overflow-wrap: anywhere;
}
.tasks {
  display: grid;
  gap: 20px;
  align-content: start;
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
}
.tasks li {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 0 8px;
  align-items: baseline;
  font-size: 36px;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.tasks .q-num {
  font-weight: 900;
}
.tasks strong {
  font-weight: 800;
}
.turn-note {
  justify-self: end;
  width: 430px;
  margin: 26px 6px 0 0;
  padding: 26px 24px 22px;
  font-size: 26px;
}
.small-print {
  position: absolute;
  left: 58px;
  right: 58px;
  bottom: 44px;
  font-size: 16px;
  color: var(--pencil);
}

/* ---------------------------------------------------------------- 4. end of paper */
.end-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 0 54px;
  margin-top: 34px;
}
.keepers {
  display: grid;
  gap: 24px;
  align-content: start;
  margin: 0;
  padding: 0;
  list-style: none;
}
.keepers li {
  display: grid;
  gap: 1px;
}
.keepers .typed {
  font-size: 24px;
  line-height: 1.25;
}
.keepers .biro,
.keepers .pen {
  font-size: 26px;
  line-height: 1.15;
}
.magic {
  margin-top: 12px;
}
.magic .typed {
  position: relative;
  width: fit-content;
  font-weight: 700;
}
.magic .typed .drawn {
  position: absolute;
  left: -4px;
  right: -4px;
  bottom: -12px;
  width: calc(100% + 8px);
  height: 14px;
  overflow: visible;
  color: var(--pen);
}
.magic .typed .drawn path {
  vector-effect: non-scaling-stroke;
  stroke-width: 3.5;
}
.magic .pen {
  margin-top: 12px;
  font-weight: 700;
  font-size: 30px;
}
.contact {
  padding: 20px 20px 16px;
  text-align: center;
  rotate: 1.4deg;
}
.contact-name {
  margin-top: 12px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.contact-where {
  font-size: 15px;
  line-height: 1.3;
  color: var(--pencil);
}
.contact-address {
  margin-top: 8px;
  font-size: 13px;
  font-weight: 700;
  overflow-wrap: anywhere;
}
.keep-link {
  position: absolute;
  left: 58px;
  bottom: 74px;
  font-size: 22px;
}
.keep-link .typed {
  font-weight: 700;
}
.end-of-paper {
  position: absolute;
  right: 58px;
  bottom: 14px;
  font-size: 14px;
  letter-spacing: 0.24em;
}

/* ---------------------------------------------------------------- the controls, down on the desk */
.deck-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  color: var(--desk-dim);
}
.deck-button {
  min-height: 34px;
  padding: 5px 14px;
  border: 1.5px solid rgba(241, 237, 225, 0.6);
  border-radius: 3px;
  background: transparent;
  color: var(--desk-ink);
  font-family: var(--typed);
  font-weight: 700;
  font-size: 13.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
}
.deck-button:hover {
  border-color: var(--desk-ink);
}
.deck-button:focus-visible {
  outline-color: #fff;
}
.deck-button[disabled] {
  opacity: 0.35;
  cursor: default;
}
.deck-count,
.deck-clock {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
}
.deck-clock {
  padding: 3px 10px;
  background: var(--card);
  color: var(--ink);
  font-size: 16px;
}
.deck-clock.late {
  color: var(--pen);
}
.deck-keys {
  position: fixed;
  right: 22px;
  bottom: 19px;
  margin: 0;
  font-size: 12.5px;
  text-align: right;
  color: var(--desk-dim);
  transition: opacity 0.6s ease;
}
@media (max-width: 1000px) {
  .deck-keys {
    display: none; /* no room beside the buttons, and small screens are swiped, not keyed */
  }
}
.deck-keys.gone {
  opacity: 0;
}
.deck-notice {
  margin: 40px auto;
  max-width: 600px;
  padding: 20px 24px;
  font-weight: 600;
}
