/* Apeparition, site v4 */

@font-face { font-family: "Mona Sans"; src: url("../fonts/MonaSans.woff2") format("woff2"); font-weight: 200 900; font-stretch: 75% 125%; font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("../fonts/InstrumentSerif-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("../fonts/InstrumentSerif-Italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }

/* colours: "moonlight" (night blue, moon-grey, lantern amber) */
:root {
  --bg-rgb: 7 11 17;
  --fg-rgb: 236 241 247;
  --paper-rgb: 220 227 236;
  --ink-rgb: 10 18 30;
  --accent-rgb: 255 178 74;

  --bg: rgb(var(--bg-rgb));
  --bg-2: #0a0f17;
  --panel: #101722;
  --fg: rgb(var(--fg-rgb));
  --fg-2: #a6b2c1;
  --fg-3: #6b788a;
  --line: rgb(var(--fg-rgb) / .09);
  --line-2: rgb(var(--fg-rgb) / .18);
  --paper: rgb(var(--paper-rgb));
  --ink: rgb(var(--ink-rgb));
  --ink-2: #46556a;
  --ink-line: rgb(var(--ink-rgb) / .14);
  --accent: rgb(var(--accent-rgb));
  --paper-accent: #b8690c;

  --wrap: 1360px;
  --gut: clamp(20px, 4.4vw, 64px);
  --r: 18px;
  --r-l: 26px;
  --ease: cubic-bezier(.2, .7, .1, 1);

  --body: "Mona Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --display: "Instrument Serif", Georgia, "Times New Roman", serif;
  --d-stretch: 100%; --d-weight: 400; --d-case: none; --d-track: -.02em; --d-lh: .9;
  --h-stretch: 100%; --h-weight: 400; --h-track: -.02em; --h-lh: .95; --h-size: 1.28;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; background: var(--bg); }
html.still { scroll-behavior: auto; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font-family: var(--body); font-size: 17px; line-height: 1.55; font-weight: 420;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, video { display: block; max-width: 100%; }
p, dd, li { text-wrap: pretty; }
.feat p, .m p, .place .pd, .sub { text-wrap: balance; }
a { color: inherit; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--fg); color: var(--bg); }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 14px; border-radius: 10px; background: var(--fg); color: var(--bg); font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }
.wrap {
  width: 100%; max-width: var(--wrap); margin-inline: auto;
  padding-left: max(var(--gut), env(safe-area-inset-left));
  padding-right: max(var(--gut), env(safe-area-inset-right));
}

/* display type */
.wordmark, .brand {
  font-family: var(--display); font-stretch: var(--d-stretch); font-weight: var(--d-weight);
  text-transform: var(--d-case); letter-spacing: var(--d-track); line-height: var(--d-lh);
}
.h2, .feat h3, .m h3, .place .pn, .place-cap .t, .doc h1 {
  font-family: var(--display); font-stretch: var(--h-stretch); font-weight: var(--h-weight); letter-spacing: var(--h-track);
}

/* ---------- buttons ---------- */
.btn {
  --h: 52px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: var(--h); padding: 0 24px; border: 0; border-radius: 999px;
  font: 600 15px/1 var(--body); letter-spacing: .005em; white-space: nowrap; text-decoration: none; cursor: pointer;
  transition: transform .3s var(--ease), background-color .25s, box-shadow .3s, color .25s;
}
.btn svg { width: 16px; height: 16px; flex: none; }
.btn-light { background: var(--fg); color: var(--ink); }
.btn-light:hover { transform: translateY(-2px); box-shadow: 0 14px 34px -14px rgb(var(--fg-rgb) / .45); }
.btn-glass {
  background: rgb(var(--fg-rgb) / .08); color: var(--fg); box-shadow: inset 0 0 0 1px rgb(var(--fg-rgb) / .2);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.btn-glass:hover { background: rgb(var(--fg-rgb) / .15); transform: translateY(-2px); }
.btn-sm { --h: 40px; padding: 0 18px; font-size: 14px; }

/* ---------- nav ---------- */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 50; padding-top: env(safe-area-inset-top); transition: background-color .35s, box-shadow .35s; }
.nav-in { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gut); height: 68px; display: flex; align-items: center; gap: 28px; }
.brand { font-size: 26px; color: var(--fg); text-decoration: none; white-space: nowrap; line-height: 1; }
.nav .brand { opacity: 0; transform: translateY(-4px); transition: opacity .35s, transform .35s var(--ease); }
.nav.solid, .nav.always {
  background: rgb(var(--bg-rgb) / .74); box-shadow: 0 1px 0 var(--line);
  -webkit-backdrop-filter: saturate(150%) blur(18px); backdrop-filter: saturate(150%) blur(18px);
}
.nav.solid .brand, .nav.always .brand { opacity: 1; transform: none; }
.nav.on-paper { background: rgb(var(--paper-rgb) / .82); box-shadow: 0 1px 0 var(--ink-line); }
.nav.on-paper .brand { color: var(--ink); }
.nav.on-paper .nav-links a { color: var(--ink-2); }
.nav.on-paper .nav-links a:hover { color: var(--ink); }
.nav.on-paper .btn-light { background: var(--ink); color: var(--paper); }
.nav-links { display: flex; gap: 30px; margin-left: auto; }
.nav-links a { font-size: 14px; font-weight: 500; color: var(--fg-2); text-decoration: none; transition: color .2s; }
.nav-links a:hover, .nav-links a[aria-current] { color: var(--fg); }
@media (max-width: 820px) {
  .nav-links { display: none; }
  .nav .btn { margin-left: auto; }
}

/* ---------- hero ---------- */
.hero { position: relative; isolation: isolate; overflow: hidden; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; justify-content: flex-end; background: #000; }
.hero-media { position: absolute; inset: 0; z-index: -2; }
.hero-media > * { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; }
.hero-video { opacity: 0; transition: opacity 1.4s ease; }
.hero-video.on { opacity: 1; }
.hero-shade {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(180deg, rgb(var(--bg-rgb) / .62) 0, rgb(var(--bg-rgb) / 0) 150px),
    linear-gradient(0deg, var(--bg) 0, rgb(var(--bg-rgb) / .9) 17%, rgb(var(--bg-rgb) / .5) 42%, rgb(var(--bg-rgb) / 0) 68%);
}
.hero-in { padding-top: 120px; padding-bottom: calc(clamp(56px, 9vh, 110px) + env(safe-area-inset-bottom)); }
.fit-box { width: 100%; }
.wordmark { display: inline-block; margin: 0; white-space: nowrap; color: var(--fg); font-size: 9.4vw; transform-origin: 0 100%; }
.hero-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px 48px; margin-top: clamp(26px, 3.2vw, 46px); }
.lede { margin: 0; max-width: 33ch; text-wrap: balance; font-size: clamp(17px, 1.45vw, 21px); line-height: 1.45; color: var(--fg-2); }
.cta { display: flex; flex-wrap: wrap; gap: 12px; }
.cta.center { justify-content: center; }

.js .hero .wordmark { animation: apparate 1.9s var(--ease) .1s both; }
.js .hero .hero-row { animation: rise 1.1s var(--ease) .6s both; }
@keyframes apparate { 0% { opacity: 0; filter: blur(24px); transform: scale(1.035); } 55% { opacity: 1; } 100% { opacity: 1; filter: blur(0); transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

@media (max-width: 700px) {
  .hero-in { padding-top: 100px; }
  .hero-row { flex-direction: column; align-items: stretch; }
  .cta .btn { flex: 1 1 auto; }
}

/* ---------- sections ---------- */
.sec { padding-top: clamp(76px, 10vw, 150px); padding-bottom: clamp(84px, 11vw, 170px); }
.sec-head { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; row-gap: 22px; align-items: end; margin-bottom: clamp(40px, 6vw, 88px); }
.h2 { grid-column: 1 / span 8; margin: 0; font-size: calc(var(--h-size) * clamp(44px, 6.6vw, 108px)); line-height: var(--h-lh); text-wrap: balance; }
.sub { grid-column: 9 / span 4; margin: 0; max-width: 40ch; font-size: 17px; line-height: 1.55; color: var(--fg-2); text-wrap: pretty; }
@media (max-width: 980px) { .h2, .sub { grid-column: 1 / -1; } }

/* ---------- the game (paper) ---------- */
.paper { position: relative; background: var(--paper); color: var(--ink); }
.paper ::selection { background: var(--ink); color: var(--paper); }
.paper .sub { color: var(--ink-2); }


.features { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(40px, 4.4vw, 64px) clamp(16px, 2vw, 28px); }
.feat { margin: 0; }
.feat.w7 { grid-column: span 7; }
.feat.w5 { grid-column: span 5; }
.feat.w4 { grid-column: span 4; }
.feat.w12 { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(16px, 2vw, 28px); align-items: end; }
.feat figure { margin: 0 0 20px; overflow: hidden; border-radius: var(--r); background: var(--panel); height: var(--fh, clamp(230px, 27vw, 410px)); }
.feat.w4 figure { --fh: clamp(200px, 20vw, 300px); }
.feat.w12 figure { grid-column: span 8; margin: 0; --fh: clamp(250px, 32vw, 480px); }
.feat.w12 .feat-text { grid-column: span 4; padding-bottom: 4px; }
.feat img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.4s var(--ease); }
.feat:hover img { transform: scale(1.04); }
.feat h3 { margin: 0 0 8px; font-size: calc(var(--h-size) * clamp(22px, 1.9vw, 30px)); line-height: 1.08; }
.feat p { margin: 0; max-width: 44ch; color: var(--ink-2); }
@media (max-width: 860px) {
  .features { grid-template-columns: minmax(0, 1fr); }
  .feat.w7, .feat.w5, .feat.w4, .feat.w12 { grid-column: 1 / -1; }
  .feat.w12 { display: block; }
  .feat figure, .feat.w4 figure, .feat.w12 figure { height: auto; aspect-ratio: 16 / 10; margin: 0 0 18px; }
}

/* ---------- places ---------- */
.places { background: var(--bg); }
.place-wrap { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 4.5vw, 72px); align-items: start; }
.place-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.place { border-bottom: 1px solid var(--line); }
.place button { all: unset; box-sizing: border-box; display: block; width: 100%; padding: clamp(18px, 2vw, 26px) 0; cursor: pointer; }
.place button:focus-visible { outline: 2px solid var(--fg); outline-offset: 4px; }
.place .pn { display: block; font-size: calc(var(--h-size) * clamp(26px, 2.9vw, 46px)); line-height: 1.02; color: rgb(var(--fg-rgb) / .3); transition: color .35s; }
.place .pd { display: block; max-height: 0; margin-top: 0; overflow: hidden; opacity: 0; font-size: 15.5px; line-height: 1.5; color: var(--fg-2); transition: max-height .55s var(--ease), opacity .4s, margin-top .55s var(--ease); }
.place:hover .pn { color: rgb(var(--fg-rgb) / .7); }
.place.on .pn { color: var(--fg); }
.place.on .pd { max-height: 6em; margin-top: 10px; opacity: 1; }
.place-img { display: none; }
.place-view { position: sticky; top: 92px; overflow: hidden; aspect-ratio: 4 / 3; margin: 0; border-radius: var(--r-l); background: #000; box-shadow: inset 0 0 0 1px var(--line); }
.place-view img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.06); transition: opacity .8s var(--ease), transform 1.8s var(--ease); }
.place-view img.on { opacity: 1; transform: none; }
.place-view::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(0deg, rgba(0, 0, 0, .6), rgba(0, 0, 0, 0) 38%); }
.place-cap { position: absolute; left: 22px; bottom: 18px; z-index: 1; display: flex; align-items: baseline; gap: 14px; margin: 0; color: var(--fg); }
.place-cap .t { font-size: calc(var(--h-size) * 20px); line-height: 1.1; }
@media (max-width: 900px) {
  .place-wrap { grid-template-columns: minmax(0, 1fr); }
  .place-view { display: none; }
  .place button { cursor: default; }
  .place .pn { color: var(--fg); }
  .place .pd { max-height: none; margin-top: 10px; opacity: 1; }
  .place-img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; margin: 0 0 22px; border-radius: var(--r); }
}

/* ---------- monsters ---------- */
.monsters { background: var(--bg-2); border-top: 1px solid var(--line); }
.mgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 1.6vw, 22px); }
.m { margin: 0; overflow: hidden; border-radius: var(--r); background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); transition: transform .5s var(--ease), box-shadow .5s, opacity .9s var(--ease); }
.m:hover { transform: translateY(-4px); box-shadow: inset 0 0 0 1px var(--line-2), 0 30px 60px -30px rgba(0, 0, 0, .8); }
.m figure { margin: 0; aspect-ratio: 16 / 10; overflow: hidden; background: #000; }
.m img { width: 100%; height: 100%; object-fit: cover; filter: brightness(.9) saturate(.95); transition: transform 1.2s var(--ease), filter .6s; }
.m:hover img { transform: scale(1.06); filter: brightness(1.1) saturate(1.05); }
.m-body { padding: 18px 20px 20px; }
.m h3 { margin: 0 0 6px; font-size: calc(var(--h-size) * clamp(20px, 1.6vw, 24px)); line-height: 1.1; }
.m p { margin: 0; font-size: 15px; line-height: 1.45; color: var(--fg-2); }
.unknown { height: 100%; display: grid; place-items: center; align-content: center; gap: 4px; background: radial-gradient(60% 75% at 50% 45%, var(--panel) 0, var(--bg) 100%); }
.unknown span { font-family: var(--display); font-weight: var(--h-weight); font-size: clamp(64px, 7vw, 104px); line-height: 1; color: rgb(var(--fg-rgb) / .13); }
@media (max-width: 1000px) { .mgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) {
  .mgrid {
    display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
    margin-inline: calc(-1 * var(--gut)); padding: 0 var(--gut) 6px; scroll-padding-inline: var(--gut);
  }
  .mgrid::-webkit-scrollbar { display: none; }
  .m { flex: 0 0 82%; scroll-snap-align: start; }
}

/* ---------- trailer ---------- */
.trailer { background: var(--bg-2); scroll-margin-top: 80px; }   /* (the menu bar would cover its heading) */
.trailer .sec { padding-top: 0; }
.frame { position: relative; overflow: hidden; aspect-ratio: 16 / 9; border-radius: var(--r-l); background: #000; box-shadow: inset 0 0 0 1px var(--line), 0 50px 120px -50px rgba(0, 0, 0, .9); }
.frame video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.play { all: unset; position: absolute; inset: 0; display: grid; place-items: center; cursor: pointer; background: linear-gradient(0deg, rgba(0, 0, 0, .5), rgba(0, 0, 0, .08) 60%); }
.pb { display: grid; place-items: center; width: clamp(68px, 8vw, 104px); aspect-ratio: 1; border-radius: 50%; background: var(--fg); color: var(--ink); transition: transform .4s var(--ease), box-shadow .4s; }
.pb svg { width: 30%; height: 30%; margin-left: 6%; }
.play:hover .pb, .play:focus-visible .pb { transform: scale(1.07); box-shadow: 0 0 0 14px rgb(var(--fg-rgb) / .12); }
.frame.playing .play { display: none; }

/* ---------- end ---------- */
.end { position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: center; min-height: min(92vh, 980px); text-align: center; background: #000; }
.end-bg { position: absolute; inset: 0; z-index: -2; background: url("../img/hero.jpg") 50% 40% / cover no-repeat; }
.end::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, var(--bg-2) 0, rgb(var(--bg-rgb) / .42) 26%, rgb(var(--bg-rgb) / .58) 66%, var(--bg) 100%); }
.end-in { padding-top: 120px; padding-bottom: 120px; }
.end .fit-box { text-align: center; }
.end-line { margin: clamp(30px, 3.4vw, 52px) 0 30px; font-size: clamp(17px, 1.5vw, 21px); color: var(--fg-2); }
.warn { max-width: 52ch; margin: 34px auto 0; font-size: 13px; line-height: 1.5; color: var(--fg-3); }

/* ---------- footer ---------- */
.foot { background: var(--bg); border-top: 1px solid var(--line); font-size: 14px; color: var(--fg-3); }
.foot-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 40px; padding-top: 36px; padding-bottom: calc(40px + env(safe-area-inset-bottom)); }
.foot .brand { font-size: 22px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 26px; }
.foot a { color: var(--fg-2); text-decoration: none; }
.foot a:hover { color: var(--fg); }
.foot p { margin: 0; }

/* ---------- reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .9s var(--ease), transform 1.2s var(--ease); transition-delay: calc(var(--i, 0) * 90ms); }
.js .reveal.in { opacity: 1; transform: none; }
.js .m.reveal.in:hover { transform: translateY(-4px); transition-delay: 0s; }

/* ---------- privacy / support ---------- */
.doc { max-width: 820px; margin: 0 auto; padding: 150px var(--gut) 110px; }
.doc h1 { margin: 0 0 14px; font-size: calc(var(--h-size) * clamp(44px, 6vw, 80px)); line-height: var(--h-lh); }
.doc .updated { margin: 0 0 40px; font-size: 14px; color: var(--fg-3); }
.doc h3 { margin: 44px 0 10px; font-size: 19px; font-weight: 650; color: var(--fg); }
.doc p, .doc li, .doc dd { color: var(--fg-2); }
.doc ul { padding-left: 1.2em; }
.doc li + li { margin-top: 6px; }
.doc a { color: var(--fg); text-decoration: underline; text-decoration-color: rgb(var(--fg-rgb) / .35); text-underline-offset: 3px; }
.doc a:hover { text-decoration-color: var(--fg); }
.faq { margin: 36px 0 0; border-top: 1px solid var(--line); }
.faq dt { padding-top: 24px; font-size: 18px; font-weight: 650; color: var(--fg); }
.faq dd { margin: 8px 0 0; padding-bottom: 24px; border-bottom: 1px solid var(--line); }

/* ---------- less motion ---------- */
.still *, .still *::before, .still *::after { animation: none !important; transition: none !important; }
.still .reveal { opacity: 1; transform: none; }
.still .hero-video { display: none; }
