/* Beneath the Veil. Colours are taken from the store art: the title
   lettering (bone, ash), the night (ink), the forest's teal mist and
   fireflies, the lantern's amber and the wanderer's red cloak.
   The lettering is the game's own 5x7 font; keep its sizes at multiples
   of 9px so each game pixel stays a whole number of screen pixels. */

@font-face {
  font-family: "Veil Pixel";
  src: url("assets/font/veil-pixel.ttf") format("truetype");
  font-display: block;
}

:root {
  --ink: #050507;
  --night: #0b0f12;
  --panel: #10161a;
  --line: #24323a;
  --bone: #d8d2c4;
  --ash: #a29d93;
  --dim: #6f6c66;
  --mist: #5fa8a0;
  --amber: #e0a24a;
  --cloak: #8a2a26;
  --px: 2px;           /* one game pixel at body size */
}

* { box-sizing: border-box; }

html { background: var(--ink); scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--bone);
  background: var(--ink);
  font: 18px/36px "Veil Pixel", monospace;
  -webkit-font-smoothing: none;
  font-smooth: never;
  text-rendering: optimizeSpeed;
}

img, video { display: block; max-width: 100%; image-rendering: pixelated; }

h1, h2 { font-weight: normal; margin: 0; }
p { margin: 0 0 18px; }
em { font-style: normal; color: var(--amber); }
a { color: var(--mist); }

/* ---------- hero ---------- */

.hero {
  position: relative;
  min-height: min(100vh, 1080px);
  min-height: min(100svh, 1080px);
  display: grid;
  place-items: start center;
  overflow: hidden;
  isolation: isolate;
}

.hero-art {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: url("assets/art/library_hero.png") 50% 62% / cover no-repeat;
  image-rendering: pixelated;
}
/* fade the art into the page below */
.hero-art::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 30%;
  background: linear-gradient(to bottom, transparent, var(--ink));
}

.hero-inner {
  padding: min(12vh, 108px) 18px 0;
  text-align: center;
}

.logo {
  font-size: 36px;
  line-height: 36px;
  letter-spacing: 0;
  text-transform: uppercase;
  /* bone above, ash on the lower half of each letter, as on the title screen */
  color: transparent;
  background: linear-gradient(to bottom, var(--bone) 0 calc(100% * 4 / 9), var(--ash) 0);
  -webkit-background-clip: text;
  background-clip: text;
  /* the title screen's dark outline, one game pixel thick */
  --o: calc(1em / 9);
  filter:
    drop-shadow(var(--o) 0 0 var(--ink))
    drop-shadow(calc(var(--o) * -1) 0 0 var(--ink))
    drop-shadow(0 var(--o) 0 var(--ink))
    drop-shadow(0 calc(var(--o) * -1) 0 var(--ink));
}
@media (max-width: 419px)  { .logo { font-size: 27px; line-height: 27px; } }
@media (min-width: 560px)  { .logo { font-size: 54px; line-height: 54px; } }
@media (min-width: 900px)  { .logo { font-size: 72px; line-height: 72px; } }
@media (min-width: 1400px) { .logo { font-size: 90px; line-height: 90px; } }

.tagline {
  margin: 18px 0 0;
  color: var(--ash);
  text-shadow: var(--px) var(--px) 0 var(--ink);
}

.stores {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
  margin-top: 36px;
}

.scroll-cue {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--ash);
  text-decoration: none;
  font-size: 27px;
  animation: bob 2.4s steps(2) infinite;
}
@keyframes bob { 50% { transform: translate(-50%, 6px); } }

/* ---------- buttons: the game's command-menu boxes ---------- */

.btn {
  --bd: var(--line);
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  min-width: 162px;
  padding: 9px 18px;
  color: var(--bone);
  text-decoration: none;
  background: rgba(11, 15, 18, .88);
  /* a 2px frame with the corners knocked out, drawn with box-shadows */
  box-shadow:
    0 calc(var(--px) * -1) 0 0 var(--bd),
    0 var(--px) 0 0 var(--bd),
    calc(var(--px) * -1) 0 0 0 var(--bd),
    var(--px) 0 0 0 var(--bd),
    inset 0 var(--px) 0 0 rgba(216, 210, 196, .06);
  margin: var(--px);
}
.btn span { font-size: 18px; }
.btn small { font-size: 18px; line-height: 27px; color: var(--dim); }
.btn:hover, .btn:focus-visible { --bd: var(--ash); outline: none; }
.btn:hover span, .btn:focus-visible span { color: var(--amber); }
.btn:hover::before, .btn:focus-visible::before {
  /* the menu cursor */
  content: ">";
  position: absolute;
  left: 6px;
  top: 9px;
  color: var(--amber);
}
.btn[aria-disabled="true"] { cursor: default; }
.soon { display: none; }

/* phones: three slim buttons in a row, one shared "coming soon" */
@media (max-width: 559px) {
  .hero .stores { gap: 9px; margin-top: 27px; }
  .hero .btn { min-width: 0; flex: 1 1 0; padding: 9px 6px; }
  .hero .btn small { display: none; }
  .hero .btn:hover::before, .hero .btn:focus-visible::before { content: none; }
  .soon { display: block; margin: 9px 0 0; color: var(--dim); }
}

/* ---------- sections ---------- */

main { display: block; }

.band {
  max-width: 1188px;
  margin: 0 auto;
  padding: 72px 18px;
}
.narrow { max-width: 792px; }

h2 {
  font-size: 27px;
  line-height: 36px;
  color: var(--bone);
  margin-bottom: 27px;
}
@media (min-width: 700px) { h2 { font-size: 36px; line-height: 45px; } }

#trailer h2, #screenshots h2 { text-align: center; }

.lede {
  font-size: 27px;
  line-height: 45px;
  color: var(--bone);
  margin-bottom: 36px;
}
.intro p:not(.lede) { color: var(--ash); }

/* framed media: thin line, dark matte, like a screenshot on a wall */
.frame {
  margin: 0;
  padding: var(--px);
  background: var(--line);
  box-shadow: 0 0 0 var(--px) var(--ink), 0 0 0 calc(var(--px) * 2) #151d22;
}
.frame > * { width: 100%; background: var(--ink); }

.video { max-width: 1104px; margin: 0 auto; }
.video video { aspect-ratio: 16 / 9; }

.feature {
  display: grid;
  gap: 36px;
  align-items: center;
  padding-top: 54px;
  padding-bottom: 54px;
}
@media (min-width: 900px) {
  .feature { grid-template-columns: 7fr 5fr; gap: 54px; }
  .feature.flip .clip { order: 2; }
}
.copy p { color: var(--ash); }
.copy h2 + p { color: var(--bone); }
.warn { color: var(--cloak) !important; filter: brightness(1.5); }

.marks { list-style: none; margin: 0; padding: 0; }
.marks li {
  position: relative;
  padding-left: 27px;
  margin-bottom: 18px;
  color: var(--ash);
}
.marks li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 14px;
  width: 8px;
  height: 8px;
  background: var(--mist);
  box-shadow: 0 0 0 2px var(--ink), 0 0 0 4px #1d3a38;
}
@media (min-width: 700px) {
  .columns { columns: 2; column-gap: 54px; }
  .columns li { break-inside: avoid; }
}

.gallery {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.gallery .shot:first-child { grid-column: 1 / -1; }
@media (min-width: 900px) {
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .gallery .shot:first-child { grid-column: auto; grid-row: span 2; align-self: stretch; }
  .gallery .shot:first-child img { height: 100%; object-fit: cover; }
  .gallery { grid-template-columns: 2fr 1fr 1fr; }
}
.shot { display: block; }
.shot img { aspect-ratio: 16 / 9; object-fit: cover; transition: filter .2s steps(2); filter: brightness(.85); }
.shot:hover img, .shot:focus-visible img { filter: none; }
.shot:focus-visible { outline: var(--px) solid var(--amber); outline-offset: 4px; }

.cta { text-align: center; padding-bottom: 108px; }
.capsule {
  margin: 0 auto;
  width: 616px;          /* half of 1232, so the art's pixels stay square */
  max-width: 100%;
  box-shadow: 0 0 0 var(--px) var(--line);
}

footer {
  border-top: var(--px) solid #11181c;
  padding: 36px 18px 54px;
  text-align: center;
  color: var(--dim);
  font-size: 9px;
  line-height: 18px;
  letter-spacing: 1px;
}
footer p { margin: 0; }

/* ---------- lightbox ---------- */

.lightbox {
  padding: 0;
  border: 0;
  background: transparent;
  max-width: 96vw;
  max-height: 96vh;
}
.lightbox::backdrop { background: rgba(5, 5, 7, .92); }
.lightbox img { max-height: 92vh; width: auto; box-shadow: 0 0 0 var(--px) var(--line); cursor: zoom-out; }

/* the dead store buttons say so, briefly */
.btn.nudge small { color: var(--amber); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .scroll-cue { animation: none; }
}
