/* The site's other pages: each opens on a room of the same night (the world), under the GM's black construction paper,
   which lifts off as the page arrives; then the page itself, in plain reading columns with the Brand's notes.
   Without scripts, or held still, the room is its finished picture and no sheet is ever drawn. */
.eyebrow { font: 700 1rem/1.2 var(--body); color: var(--ash); margin: 0 0 10px; }
.small { font-size: 0.9rem; line-height: 1.45; color: var(--ash); margin: 0; }

/* ---- The room ---- */
.room { position: relative; overflow: clip; background: var(--fog); isolation: isolate; padding-top: var(--bar); }
.room-pic { position: relative; height: 62svh; min-height: 300px; max-height: 760px; overflow: hidden; background: #120f0c; perspective: 1100px; }
.room-pic > img, .room-pic > picture > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: var(--pos, 50% 50%); }
.room-pic::after { content: ""; position: absolute; z-index: 3; inset: auto 0 0; height: 34%; background: linear-gradient(180deg, rgba(25,24,29,0), var(--fog)); pointer-events: none; }
.room-words { position: relative; z-index: 4; margin: -64px auto 0; padding: 0 20px; max-width: 44rem; }
.room-words h1 { font-size: clamp(2.2rem, 9vw, 4.2rem); margin-bottom: 0.3em; }
.room-words .lede { font-size: 1.15rem; line-height: 1.5; max-width: 36rem; }
.room.band .room-pic { height: 38svh; min-height: 220px; max-height: 460px; }

@media (min-width: 900px) {
  .room-pic { height: min(78vh, 56vw); max-height: 820px; }
  .room-pic::after { height: 30%; }
  .room-words { --edge: max(5vw, calc((100vw - 72rem) / 2 + 5vw)); position: absolute; left: var(--edge); bottom: 40px; margin: 0; padding: 22px 28px 18px 0; max-width: 40rem; }
  /* Its own shade, as big as the words, so at large text the headline never runs out of it onto the lit table. */
  .room-words::before { content: ""; position: absolute; z-index: -1; inset: -60px -6vw -40px calc(-1 * var(--edge)); background: linear-gradient(90deg, rgba(25,24,29,0.92) 0, rgba(25,24,29,0.86) calc(100% - 6vw), rgba(25,24,29,0)); -webkit-mask-image: linear-gradient(180deg, transparent, #000 70px); mask-image: linear-gradient(180deg, transparent, #000 70px); pointer-events: none; }
  .room.band .room-pic { height: min(50vh, 34vw); }
  html.living .fog-again:not([hidden]) { right: 5vw; bottom: 28px; }
  .room.band .room-words { bottom: 24px; }
}

/* The fog: three sheets of black construction paper, each with a strip of painter's tape at its top, laid over the room
   and lifted off one after another as the page arrives. Only while the world lives; the animation finishes by itself. */
.fog, .fog-again { display: none; }
html.living .fog { display: block; position: absolute; inset: 0; z-index: 2; pointer-events: none; transform-style: preserve-3d; }
html.living .sheet { position: absolute; top: -3%; height: 108%; left: var(--l); width: var(--w); transform-origin: 50% 0; transform: rotate(var(--r));
  background-color: #141317;
  /* The paper's own flecks and a faint grain, as construction paper has. */
  background-image: radial-gradient(rgba(255,255,255,0.055) 0.7px, transparent 1.1px), radial-gradient(rgba(255,255,255,0.035) 0.6px, transparent 1px), linear-gradient(176deg, rgba(255,255,255,0.025), rgba(0,0,0,0.12));
  background-size: 5px 5px, 7px 7px, 100% 100%; background-position: 0 0, 2px 3px, 0 0;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.05), 0 3px 6px rgba(0,0,0,0.45);
  animation: fog-lift 1.05s cubic-bezier(.45,.05,.4,1) calc(var(--d) + 1.9s) both; will-change: transform, opacity; }
/* The room's script starts the lift as soon as the picture under it is drawn; without it, the sheets lift a little later
   by themselves. */
html.living .fog.go .sheet { animation-name: fog-lift-go; animation-delay: var(--d); }
html.living .sheet::before { content: ""; position: absolute; left: 50%; top: 4%; width: 74px; height: 20px; margin-left: -37px; background: var(--tape); transform: rotate(-4deg); opacity: 0.95; box-shadow: 0 1px 0 rgba(0,0,0,0.3); }
html.living .sheet.s1 { --l: -4%; --w: 41%; --r: -1.2deg; --d: 0.25s; --x: -14%; }
html.living .sheet.s2 { --l: 33%; --w: 36%; --r: 0.8deg; --d: 0.7s; --x: 4%; }
html.living .sheet.s3 { --l: 64%; --w: 42%; --r: -0.6deg; --d: 1.1s; --x: 16%; }
/* Laid back on the visitor's word, then lifted again. Two names, so each request starts the sheets afresh. */
html.living .fog.a .sheet { animation: fog-relay-a 2.1s cubic-bezier(.45,.05,.4,1) calc(var(--d) * 0.5) both; }
html.living .fog.b .sheet { animation: fog-relay-b 2.1s cubic-bezier(.45,.05,.4,1) calc(var(--d) * 0.5) both; }
@keyframes fog-lift {
  0% { transform: rotate(var(--r)); opacity: 1; }
  30% { transform: translateY(-2%) rotate(var(--r)) rotateX(-24deg); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.05), 0 26px 34px rgba(0,0,0,0.55); opacity: 1; }
  80% { opacity: 1; }
  100% { transform: translate(var(--x), -118%) rotate(calc(var(--r) * 5)) rotateX(-58deg); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.05), 0 40px 50px rgba(0,0,0,0.4); opacity: 0; }
}
@keyframes fog-lift-go {
  0% { transform: rotate(var(--r)); opacity: 1; }
  30% { transform: translateY(-2%) rotate(var(--r)) rotateX(-24deg); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.05), 0 26px 34px rgba(0,0,0,0.55); opacity: 1; }
  80% { opacity: 1; }
  100% { transform: translate(var(--x), -118%) rotate(calc(var(--r) * 5)) rotateX(-58deg); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.05), 0 40px 50px rgba(0,0,0,0.4); opacity: 0; }
}
@keyframes fog-relay-a {
  0% { transform: translate(var(--x), -118%) rotate(calc(var(--r) * 5)) rotateX(-58deg); opacity: 0; }
  12% { opacity: 1; }
  34% { transform: rotate(var(--r)); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.05), 0 3px 6px rgba(0,0,0,0.45); opacity: 1; }
  52% { transform: rotate(var(--r)); }
  66% { transform: translateY(-2%) rotate(var(--r)) rotateX(-24deg); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.05), 0 26px 34px rgba(0,0,0,0.55); opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translate(var(--x), -118%) rotate(calc(var(--r) * 5)) rotateX(-58deg); opacity: 0; }
}
@keyframes fog-relay-b {
  0% { transform: translate(var(--x), -118%) rotate(calc(var(--r) * 5)) rotateX(-58deg); opacity: 0; }
  12% { opacity: 1; }
  34% { transform: rotate(var(--r)); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.05), 0 3px 6px rgba(0,0,0,0.45); opacity: 1; }
  52% { transform: rotate(var(--r)); }
  66% { transform: translateY(-2%) rotate(var(--r)) rotateX(-24deg); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.05), 0 26px 34px rgba(0,0,0,0.55); opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translate(var(--x), -118%) rotate(calc(var(--r) * 5)) rotateX(-58deg); opacity: 0; }
}
/* The visitor's own sheet: shown only once the room's script runs. */
html.living .fog-again:not([hidden]) { display: inline-flex; position: absolute; z-index: 5; right: 12px; bottom: 76px; min-height: 44px; align-items: center; gap: 8px; padding: 0 14px;
  font: 700 0.9rem/1 var(--body); color: var(--white); background: rgba(20,19,23,0.88); border: 0; border-radius: 3px; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.12); cursor: pointer; -webkit-tap-highlight-color: transparent; }
html.living .fog-again::before { content: ""; width: 16px; height: 8px; background: var(--tape); transform: rotate(-6deg); }
html.living .fog-again:hover { background: #000; }
.room-pic { -webkit-tap-highlight-color: transparent; }

/* ---- The page under the room ---- */
.page { max-width: 72rem; margin: 0 auto; padding: 28px 20px 64px; }
.page .cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; }
@media (max-width: 24em) {
  .side .kit-card { grid-template-columns: minmax(0, 1fr); }
  .side .kit-card img { width: 72px; }
  .side .kit-card b { overflow-wrap: anywhere; }
}
.read { max-width: 42rem; }
.read h2 { font-size: clamp(1.5rem, 4.6vw, 2.1rem); margin: 1.6em 0 0.45em; }
.read h2:first-child { margin-top: 0.4em; }
.read h3 { font-size: 1.2rem; margin: 1.3em 0 0.35em; letter-spacing: -0.01em; }
.read p, .read li { line-height: 1.6; }
.read ul { padding-left: 1.2em; margin: 0 0 1em; }
.read li { margin-bottom: 0.35em; }
.read li::marker { color: var(--tape); }
.dates { color: var(--ash); font-size: 0.95rem; }
.read pre { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0 0 1.2em; padding: 16px 18px; background: var(--fog2); color: var(--white); font: 0.86rem/1.55 ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; border-radius: 2px; }
.side { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; align-content: start; }
.side .note { max-width: none; }
.side .note a { color: #0f63b4; }
.mail-line { font: 900 clamp(1.25rem, 5.4vw, 1.6rem)/1.15 var(--head); letter-spacing: -0.01em; overflow-wrap: anywhere; }
.mail-line a { display: inline-block; padding: 6px 0 5px; color: var(--white); text-decoration-color: var(--tape); text-decoration-thickness: 3px; }
.kit-card { display: grid; gap: 14px; grid-template-columns: 96px 1fr; align-items: center; background: var(--fog2); padding: 16px; border-radius: 2px; color: var(--white); text-decoration: none; }
.kit-card img { width: 96px; height: auto; box-shadow: 0 2px 0 #d9d2c4, 4px 10px 16px rgba(0,0,0,0.5); transform: rotate(-2deg); }
.kit-card b { display: block; color: var(--white); font: 900 1.25rem/1.1 var(--head); margin-bottom: 4px; }
.kit-card span { display: block; color: var(--ash); font-size: 0.95rem; line-height: 1.4; }
.kit-card .go { color: var(--white); font-weight: 700; margin-top: 6px; text-decoration: underline; text-decoration-color: var(--tape); text-decoration-thickness: 3px; text-underline-offset: 0.25em; }
.kit-card:hover b { color: var(--tape); }
.after-signup { margin-top: 56px; }
/* The legal words: one sheet of paper taped to the table, as a handout would be. The launch writes the lines in as
   plain paragraphs and links, so only [data-legal] itself, its p and its a are styled. */
[data-legal] { position: relative; max-width: 40rem; margin: 18px 0 8px; padding: 30px 26px 14px; background: var(--white); color: var(--fog); transform: rotate(-0.4deg);
  box-shadow: 0 2px 0 #d9d2c4, 0 16px 30px rgba(0,0,0,0.5); }
[data-legal]::before, [data-legal]::after { content: ""; position: absolute; top: -10px; width: 84px; height: 20px; background: var(--tape); opacity: 0.95; }
[data-legal]::before { left: 20px; transform: rotate(-4deg); }
[data-legal]::after { right: 20px; transform: rotate(3deg); }
[data-legal] p { margin: 0 0 1em; font-size: 1.0625rem; line-height: 1.6; color: var(--fog); }
[data-legal] a { color: #0f63b4; overflow-wrap: anywhere; text-decoration-thickness: 1px; }
[data-legal] a:hover { text-decoration-thickness: 2px; }
[data-legal] a:focus-visible { outline-color: var(--fog); }
@media (min-width: 900px) { [data-legal] { padding: 40px 44px 22px; } [data-legal] p { font-size: 1.125rem; } }
/* A real page of the kit, taped down on the dark like the map on the table. */
.taped { position: relative; margin: 30px 0 26px; padding: 10px; background: var(--white); transform: rotate(-0.6deg); box-shadow: 0 2px 0 rgba(0,0,0,0.3), 0 14px 26px rgba(0,0,0,0.45); }
.taped::before, .taped::after { content: ""; position: absolute; top: -10px; width: 80px; height: 20px; background: var(--tape); opacity: 0.95; }
.taped::before { left: 18px; transform: rotate(-4deg); }
.taped::after { right: 18px; transform: rotate(3deg); }
.taped img { width: 100%; height: auto; }
.taped figcaption { color: var(--fog); font-size: 0.92rem; line-height: 1.4; padding: 8px 4px 2px; }
@media (min-width: 900px) {
  .page { padding: 48px 5vw 88px; }
  .page .cols { grid-template-columns: minmax(0, 1fr) 22rem; gap: 64px; }
}

/* ---- The 404: the cellar, and the chest that is not a door ---- */
/* The room is the cellar picture at its own shape, so the chest stands on its own spot of the floor at every width. */
.lost .room-pic { height: auto; min-height: 0; max-height: none; aspect-ratio: 1080 / 1920; }
.lost .room-pic::after { display: none; }
.lost .room-words { position: absolute; z-index: 4; left: 0; right: 0; top: calc(var(--bar) + 14px); margin: 0; padding: 0 20px; }
.lost .room-words::after { content: ""; position: absolute; z-index: -1; inset: -14px 0 -40px; background: linear-gradient(180deg, rgba(18,14,11,0.9), rgba(18,14,11,0.7) 70%, rgba(18,14,11,0)); pointer-events: none; }
.lost .room-words h1 { font-size: clamp(2.2rem, 10vw, 4.4rem); }
.lost .mimic { position: absolute; z-index: 1; left: 50%; top: 50%; width: 20%; aspect-ratio: 1; transform: translate(-50%, -80%); padding: 0; border: 0; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.lost .mimic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 10px 8px rgba(0,0,0,0.6)); }
.lost .mimic .open { opacity: 0; }
.lost .mimic:active .open, .lost .mimic.chomp .open { opacity: 1; }
.lost .mimic:active .shut, .lost .mimic.chomp .shut { opacity: 0; }
html.living .lost .mimic.chomp { animation: chomp 0.62s cubic-bezier(.3,.7,.4,1); }
@keyframes chomp {
  0% { transform: translate(-50%, -80%); }
  22% { transform: translate(-50%, -92%) scale(1.08, 0.94) rotate(-3deg); }
  48% { transform: translate(-50%, -80%) scale(0.96, 1.05) rotate(2deg); }
  70% { transform: translate(-50%, -83%) scale(1.02, 0.98); }
  100% { transform: translate(-50%, -80%); }
}
.lost .page { padding-top: 32px; }
/* On a screen this narrow in letters (zoomed, or with very large text) the words follow the cellar, so the chest stays clear. */
@media (max-width: 22em) {
  .lost .room-words { position: relative; top: auto; padding: 20px 20px 0; }
  .lost .room-words::after { display: none; }
}
@media (min-aspect-ratio: 9/10) {
  .lost .room-pic { aspect-ratio: 2048 / 1280; }
  .lost .mimic { width: 11.5%; left: 60%; top: 60%; }
  .lost .room-words { left: max(32px, 5vw); right: auto; top: calc(var(--bar) + 32px); bottom: auto; max-width: 34rem; padding: 0; }
  .lost .room-words::before { display: none; }
  .lost .room-words::after { inset: -30px -60px -60px calc(-1 * max(32px, 5vw)); background: radial-gradient(ellipse at 30% 40%, rgba(18,14,11,0.92), rgba(18,14,11,0.75) 55%, rgba(18,14,11,0) 75%); }
}
