/* playthewaitingroom.com. The wall is the page, the carpet is its foot, and what stands
   on it is signage: the game's own faces (IBM Plex Sans; Overpass for the signs) and
   colours (the waiting room's off-white, the EXIT sign's red, the carpet's blue, the
   house green of its icon). Both pages use this one sheet. */

@font-face {
  font-family: "IBM Plex Sans";
  src: url("/fonts/IBMPlexSans-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("/fonts/IBMPlexSans-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Overpass";
  src: url("/fonts/Overpass-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --wall: #ece7dd;
  --paper: #f6f2ea;
  --ink: #1b1c1e;
  --muted: #58544c;
  --rule: #c8c1b2;
  --exit: #c2301d;
  --exit-lit: #d64a3a;
  --link: #9d2414;
  --door: #2c2f33;
  --door-ink: #ece7dd;
  --door-dim: #b9b3a6;
  --carpet: #26334f;
  --green: #1a5243;
  --sans: "IBM Plex Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --sign: "Overpass", "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  --gutter: 16px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--wall);
  color: var(--ink);
  font: 400 17px/1.6 var(--sans);
  overflow-wrap: break-word;
}

img { display: block; max-width: 100%; height: auto; }

a { color: var(--link); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }

h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }

.wrap { width: 100%; max-width: calc(960px + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }

.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--wall); padding: 8px 12px; z-index: 2; }
.skip:focus { left: 8px; top: 8px; }

/* ---- Letterhead: the mark, the name, where things are ---- */

.letterhead { border-bottom: 1px solid var(--rule); }
.letterhead .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; padding-top: 14px; padding-bottom: 14px; }
.letterhead .name { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; font: 500 13px/1.2 var(--sans); letter-spacing: 0.22em; text-transform: uppercase; }
.letterhead .name img { width: 28px; height: 28px; }
.letterhead nav ul { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.letterhead nav a { font: 700 12px/1.9 var(--sign); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); text-decoration: none; }
.letterhead nav a:hover, .letterhead nav a[aria-current] { color: var(--ink); text-decoration: underline; }

/* ---- The top of a page ---- */

.top { padding: clamp(36px, 7vw, 76px) 0 clamp(28px, 5vw, 48px); text-align: center; }

.notice {
  display: inline-block;
  max-width: 100%;
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: 9px 18px 8px;
  font: 400 15px/1.45 var(--sans);
  color: var(--muted);
  box-shadow: 0 1px 0 rgba(27, 28, 30, 0.08);
  text-wrap: balance;
}

.wordmark { margin-top: clamp(26px, 5vw, 44px); font-weight: 500; text-transform: uppercase; line-height: 1; }
.wordmark .the { display: block; font-size: clamp(12px, 2.6vw, 26px); letter-spacing: 0.65em; margin-right: -0.65em; color: var(--muted); }
.wordmark .name { display: block; margin-top: 0.36em; font-size: clamp(27px, 8.3vw, 78px); letter-spacing: 0.125em; margin-right: -0.125em; }

.lede { margin: clamp(20px, 3.4vw, 30px) auto 0; max-width: 34em; font-size: clamp(18px, 2.3vw, 21px); line-height: 1.5; text-wrap: balance; }

/* The two doors: one marked EXIT, one plain. */
.doors { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: clamp(24px, 4vw, 34px); }
.sign {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 50px; padding: 13px 24px 10px;
  font: 700 15px/1.2 var(--sign); letter-spacing: 0.16em; text-transform: uppercase; text-decoration: none;
  border: 2px solid var(--door); border-radius: 3px;
  background: var(--door); color: var(--door-ink);
  transition: background-color 120ms linear, color 120ms linear, box-shadow 120ms linear;
}
.sign:hover { background: var(--ink); color: #fff; }
.sign.exit { background: var(--exit); border-color: #8e2012; color: #fff; box-shadow: 0 0 0 0 rgba(214, 74, 58, 0); }
.sign.exit:hover { background: #a82817; color: #fff; box-shadow: 0 0 22px 0 rgba(214, 74, 58, 0.45); }
.sign.plain { background: transparent; color: var(--ink); }
.sign.plain:hover { background: var(--ink); color: var(--wall); }
.sign small { font: inherit; letter-spacing: 0.1em; opacity: 0.85; }
.under { margin-top: 14px; font-size: 15px; color: var(--muted); }
.prose .doors { justify-content: flex-start; margin-top: 20px; }

/* ---- Pictures: prints with a mount ---- */

.print { background: var(--paper); border: 1px solid var(--rule); padding: clamp(6px, 1.2vw, 10px); }
.print img { width: 100%; }
figcaption { margin-top: 8px; font-size: 14.5px; line-height: 1.4; color: var(--muted); }

/* ---- Sections ---- */

.sec { padding: clamp(34px, 6vw, 60px) 0 0; }
.sec > h2, .plate {
  display: block;
  font: 700 13px/1.3 var(--sign); letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--ink);
  padding-top: 13px; margin-bottom: clamp(16px, 2.6vw, 24px);
  border-top: 2px solid var(--ink);
}
.sec h3 { font: 500 16px/1.35 var(--sans); margin: 22px 0 8px; }
.sec > h2 + h3 { margin-top: 0; }

.prose p { max-width: 38em; }
.prose p + p { margin-top: 0.85em; }
.prose .large { font-size: clamp(19px, 2.4vw, 23px); line-height: 1.45; }

/* The directory board: white letters on a dark board, one line a thing. */
.board { background: var(--door); color: var(--door-ink); border: 6px solid #1b1c1e; padding: clamp(10px, 2vw, 18px) clamp(14px, 3vw, 30px); }
.board > div { display: grid; grid-template-columns: 11.5em minmax(0, 1fr); gap: 4px 24px; padding: 13px 0 11px; border-bottom: 1px solid rgba(236, 231, 221, 0.16); }
.board > div:last-child { border-bottom: 0; }
.board dt { font: 700 12.5px/1.75 var(--sign); letter-spacing: 0.18em; text-transform: uppercase; color: var(--door-dim); }
.board dd { font-size: 16px; line-height: 1.5; }
.board a { color: #fff; }

/* ---- Trailer ---- */

.trailer { position: relative; display: block; background: #0e0f11; aspect-ratio: 16 / 9; color: #fff; }
.trailer img, .trailer iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: cover; }
.trailer .play {
  position: absolute; left: clamp(10px, 2.4vw, 22px); bottom: clamp(10px, 2.4vw, 22px);
  display: inline-flex; align-items: center; gap: 12px;
  padding: 12px 20px 9px; border-radius: 3px;
  background: var(--exit); border: 2px solid #8e2012; color: #fff;
  font: 700 14px/1.2 var(--sign); letter-spacing: 0.16em; text-transform: uppercase; white-space: nowrap;
  transition: box-shadow 120ms linear;
}
.trailer .play::before { content: ""; border-style: solid; border-width: 7px 0 7px 11px; border-color: transparent transparent transparent #fff; margin-top: -3px; }
.trailer:hover .play, .trailer:focus-visible .play { box-shadow: 0 0 26px 0 rgba(214, 74, 58, 0.6); }
.trailer.wide { aspect-ratio: 1920 / 823; }
.url { margin-top: 10px; font-size: 15px; color: var(--muted); }

/* ---- Screenshots ---- */

.shots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(12px, 2vw, 20px); }
.shots a { display: block; }
.shots img { aspect-ratio: 16 / 9; object-fit: cover; }

/* ---- Press kit ---- */

.facts { border-top: 1px solid var(--rule); }
.facts > div { display: grid; grid-template-columns: 9.5em minmax(0, 1fr); gap: 2px 24px; padding: 10px 0 9px; border-bottom: 1px solid var(--rule); }
.facts dt { font: 700 12.5px/2.1 var(--sign); letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }

.copy { position: relative; background: var(--paper); border: 1px solid var(--rule); padding: 16px 18px; max-width: 46em; }
.copy p + p { margin-top: 0.85em; }
.copy + h3, .copy-btn + h3 { margin-top: 26px; }
.copy-btn {
  display: inline-block; margin: 8px 0 0; padding: 7px 12px 5px;
  font: 700 11.5px/1.2 var(--sign); letter-spacing: 0.16em; text-transform: uppercase;
  background: transparent; color: var(--ink); border: 1px solid var(--ink); border-radius: 2px; cursor: pointer;
}
.copy-btn:hover { background: var(--ink); color: var(--wall); }

.list { max-width: 44em; }
.list li { position: relative; padding-left: 1.3em; }
.list li + li { margin-top: 0.55em; }
.list li::before { content: ""; position: absolute; left: 0.1em; top: 0.72em; width: 0.5em; height: 2px; background: var(--ink); }

.files { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: clamp(12px, 2vw, 20px); }
.files .tile { display: flex; align-items: center; justify-content: center; aspect-ratio: 16 / 9; padding: 18px; background: var(--paper); border: 1px solid var(--rule); }
.files .tile.dark { background: var(--door); border-color: var(--door); }
.files .tile.bare { padding: 0; background: #0e0f11; border-color: #0e0f11; }
.files .tile img { max-height: 100%; width: auto; }
.files .tile.bare img { width: 100%; height: 100%; object-fit: contain; }

.jump { margin-top: clamp(26px, 4vw, 38px); display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 18px; }
.jump a { font: 700 12px/2.2 var(--sign); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); text-decoration: none; }
.jump a:hover { color: var(--ink); text-decoration: underline; }

.more { max-width: 44em; }
.more li + li { margin-top: 0.5em; }

/* ---- The foot: skirting board, then carpet ---- */

.foot { margin-top: clamp(48px, 8vw, 88px); background: var(--carpet); color: #e3e0d8; border-top: 10px solid #17181a; font-size: 15px; }
.foot .wrap { padding-top: 26px; padding-bottom: 34px; display: grid; gap: 8px; }
.foot a { color: #fff; }
.foot a:hover { color: #fff; text-decoration-thickness: 2px; }
.foot ul { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-bottom: 6px; }
.foot ul a { font: 700 12.5px/1.9 var(--sign); letter-spacing: 0.14em; text-transform: uppercase; text-decoration: none; }
.foot ul a:hover { text-decoration: underline; }

/* ---- A wrong door ---- */

.lost { min-height: 62vh; display: grid; align-content: center; justify-items: center; text-align: center; padding: 56px 0 24px; }
.lost h1 { font: 500 clamp(26px, 6vw, 44px)/1.15 var(--sans); letter-spacing: 0.125em; text-transform: uppercase; margin-top: 30px; }
.lost p { margin-top: 14px; }

/* ---- Small windows ---- */

@media (max-width: 700px) {
  body { font-size: 16px; }
  .shots { grid-template-columns: minmax(0, 1fr); }
  .board > div, .facts > div { grid-template-columns: minmax(0, 1fr); }
  .board dt, .facts dt { line-height: 1.4; }
  .doors { flex-direction: column; align-items: stretch; }
  .trailer .play { padding: 9px 14px 6px; font-size: 12px; }
  .letterhead .wrap { justify-content: center; }
  .letterhead nav ul { justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

@media print {
  .letterhead nav, .doors, .copy-btn, .jump { display: none; }
  body { background: #fff; }
  .foot { background: #fff; color: #000; border-top: 1px solid #000; }
  .foot a { color: #000; }
}
