/* grave-shift.web.app — the game's home, support and privacy pages.
   Colours are the game's own (app.css) and mean what they mean there: the flashlight's beam and amber for light,
   brass for money, mint for the catcher, witchfire for Vesper's blade, and each ghost its own glow.
   The flashlight on the hero is the one loud thing; everything else stays quiet. */
@font-face {
  font-family: 'Press Start 2P';
  src: url('fonts/press-start-2p.ttf') format('truetype');
  font-display: swap;
}
@font-face {
  font-family: 'Atkinson Hyperlegible Next';
  src: url('fonts/atkinson-next.woff2') format('woff2');
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Atkinson Hyperlegible Next';
  src: url('fonts/atkinson-next-italic.woff2') format('woff2');
  font-weight: 200 800;
  font-style: italic;
  font-display: swap;
}

:root {
  --void: #07070b;
  --dark: #141419;
  --night: #1d1c26;
  --tile: #3a3646;
  --ash: #7a7786;
  --fog: #a7a2b0;
  --bone: #d9d2c5;
  --beam: #ffe7b8;
  --amber: #ffb454;
  --mint: #7ef0c4;
  --brass: #c99a6b;
  --witchfire: #a86cff;
  --pixel: 'Press Start 2P', ui-monospace, 'Courier New', monospace;
  --text: 'Atkinson Hyperlegible Next', 'Atkinson Hyperlegible', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --wide: 70rem;
  --read: 40rem;
  --sprite: 4; /* how many screen pixels to a game pixel on the sprites */
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { background: var(--void); }

body {
  margin: 0;
  background: var(--void);
  color: var(--bone);
  font-family: var(--text);
  font-size: 1.125rem;
  line-height: 1.6;
  padding-inline: max(1rem, env(safe-area-inset-left, 0px));
  -webkit-text-size-adjust: 100%;
}

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

a { color: var(--beam); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { color: var(--amber); }
:focus-visible { outline: 2px solid var(--mint); outline-offset: 3px; border-radius: 2px; }

.wrap { max-width: var(--wide); margin-inline: auto; }

/* ---------- the top bar ---------- */
.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  padding-block: 1.25rem;
}
.mark {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--bone);
  text-decoration: none;
  font-family: var(--pixel);
  font-size: 16px;
  line-height: 1;
}
.mark img { width: 40px; height: 40px; border-radius: 10px; }
.mark:hover { color: var(--beam); }
.bar nav { display: flex; gap: 1.5rem; }
.bar nav a { color: var(--fog); text-decoration: none; font-weight: 600; }
.bar nav a:hover, .bar nav a[aria-current='page'] { color: var(--beam); }

/* ---------- the hero: the title screen's house, caught in a flashlight ---------- */
.hero {
  position: relative;
  aspect-ratio: 16 / 9;
  max-width: 100%;
  overflow: hidden;
  border-radius: 6px;
  background: var(--dark);
  isolation: isolate;
}
.hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: pixelated;
  filter: brightness(0.82);
}
/* The beam leaves the bottom-left corner and lands on the front door. */
.hero::before,
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  mix-blend-mode: screen;
}
.hero::before {
  background: conic-gradient(from 0deg at 4% 106%,
    transparent 0deg 58deg,
    rgb(255 222 160 / 0.16) 61deg,
    rgb(255 222 160 / 0.42) 65deg 75deg,
    rgb(255 222 160 / 0.16) 79deg,
    transparent 82deg 360deg);
  filter: blur(8px);
}
.hero::after {
  background:
    radial-gradient(ellipse 14% 22% at 73% 61%, rgb(255 231 184 / 0.55), rgb(255 180 84 / 0.18) 55%, transparent 75%),
    radial-gradient(ellipse 9% 12% at 4% 100%, rgb(255 231 184 / 0.55), transparent 70%);
}
.hero-shell { position: relative; }
.hero-words {
  position: absolute;
  z-index: 1;
  top: 7%;
  left: 5%;
  max-width: 48%;
  text-shadow: 0 1px 14px var(--void), 0 0 4px var(--void);
}
.hero-words h1 {
  margin: 0;
  font-family: var(--pixel);
  font-weight: 400;
  font-size: 40px;
  line-height: 1.3;
  white-space: nowrap;
  color: var(--beam);
  text-shadow: 0 0 18px rgb(255 180 84 / 0.35), 4px 4px 0 var(--void);
}
.hero-words .hook {
  margin: 1.1rem 0 0;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--bone);
}
.hero-words .line {
  margin: 0.6rem 0 0;
  font-size: 1.2rem;
  line-height: 1.45;
  color: var(--bone);
  text-wrap: pretty;
}
.soon {
  display: inline-block;
  margin: 1.4rem 0 0;
  padding: 0.5rem 0.95rem;
  border: 1px solid rgb(255 231 184 / 0.4);
  border-radius: 999px;
  background: rgb(7 7 11 / 0.6);
  color: var(--beam);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.3;
  text-shadow: none;
}

@media (max-width: 1000px) {
  .hero-words { max-width: 50%; }
  .hero-words h1 { font-size: 32px; }
  .hero-words .hook { font-size: 1.6rem; }
  .hero-words .line { font-size: 1.1rem; }
}
/* On a phone the words move under the picture. */
@media (max-width: 760px) {
  .hero-words { position: static; max-width: none; padding-block: 1.5rem 0; text-shadow: none; }
  .hero-words h1 { font-size: 24px; }
  .hero-words .hook { font-size: 1.5rem; margin-top: 0.9rem; }
  .hero-words .line { font-size: 1.125rem; }
}

/* ---------- the price, right under the hero ---------- */
.price {
  margin: 2.5rem 0 0;
  max-width: 44rem;
  font-size: 1.3rem;
  line-height: 1.5;
  text-wrap: pretty;
}
.money { color: var(--brass); font-weight: 700; white-space: nowrap; }

/* ---------- the sections ---------- */
main { padding-block: 0 4rem; }
.part { margin-top: 7rem; }
.part > h2 {
  margin: 0 0 1.5rem;
  max-width: 52rem;
  font-family: var(--pixel);
  font-weight: 400;
  font-size: 24px;
  line-height: 1.5;
  color: var(--beam);
  text-wrap: balance;
}
.part > p { margin: 0 0 1rem; max-width: var(--read); text-wrap: pretty; }

.shot { margin: 2.5rem 0 0; }
.shot img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  outline: 1px solid rgb(217 210 197 / 0.1);
  outline-offset: -1px;
  background: var(--dark);
}

/* What people say in the game, in their own words. */
blockquote { margin: 2rem 0; max-width: var(--read); }
blockquote p { margin: 0; font-style: italic; font-size: 1.3rem; line-height: 1.45; text-wrap: pretty; }
blockquote footer { margin-top: 0.5rem; color: var(--fog); font-size: 1rem; }
blockquote footer::before { content: '— '; }
blockquote.voice { margin: 0 0 2rem; }
blockquote.voice p { font-size: 1.75rem; line-height: 1.35; color: var(--bone); }

/* ---------- sprites: each one stood in a pool of flashlight on the floor, the only way they show in the game ---------- */
.ghosts, .heroes, .bosses { list-style: none; margin: 0; padding: 0; }
.pool, .bosses li {
  display: grid;
  place-items: end center;
  background: radial-gradient(ellipse 46% 26% at 50% 88%, rgb(255 180 84 / 0.34), rgb(255 180 84 / 0.1) 62%, transparent 76%);
}
.pool img, .bosses img {
  zoom: var(--sprite);
  max-width: none;
  image-rendering: pixelated;
  filter: drop-shadow(0 0 1.5px var(--glow, transparent));
}
.no-glow img { filter: none; }

.ghosts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2.25rem 3.5rem;
  max-width: 62rem;
}
.ghosts li, .heroes li { display: grid; grid-template-columns: 7rem minmax(0, 1fr); gap: 1.25rem; align-items: center; }
.ghosts .pool { height: 7rem; padding-bottom: 0.6rem; }
.ghosts h3, .heroes h3 {
  margin: 0 0 0.4rem;
  font-family: var(--pixel);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.4;
  color: var(--glow, var(--beam));
}
.ghosts p, .heroes p { margin: 0; text-wrap: pretty; }

.part > .bigger { margin: 3.5rem 0 0; }
.bosses {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 1.5rem 2.25rem;
  margin-top: 1.5rem;
}
.bosses li { grid-template-rows: 1fr auto; row-gap: 0.6rem; min-width: 7rem; padding-top: 0.5rem; background-position: 50% 0; background-size: 100% calc(100% - 1.6rem); background-repeat: no-repeat; }
.bosses span { color: var(--fog); font-size: 0.95rem; white-space: nowrap; }

.heroes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2.25rem 3.5rem;
  max-width: 62rem;
  margin-bottom: 2rem;
}
.heroes li { grid-template-columns: 10rem minmax(0, 1fr); }
.heroes .pool { height: 12rem; padding-bottom: 0.9rem; }
.heroes .pool img { zoom: calc(var(--sprite) + 1); }
.heroes h3.wick { color: var(--mint); }
.heroes h3.vesper { color: var(--witchfire); }

/* ---------- questions ---------- */
.faq { margin: 0; max-width: var(--read); }
.faq dt { font-weight: 700; color: var(--beam); margin-top: 1.6rem; }
.faq dt:first-child { margin-top: 0; }
.faq dd { margin: 0.3rem 0 0; text-wrap: pretty; }

/* ---------- the last word ---------- */
.last { margin-top: 7rem; padding-top: 3rem; border-top: 1px solid var(--tile); }
.sign {
  margin: 0;
  font-family: var(--pixel);
  font-size: 24px;
  line-height: 1.5;
  color: var(--beam);
  text-wrap: balance;
}
.last .soon { margin-top: 1.25rem; }

@media (max-width: 760px) {
  :root { --sprite: 3; }
  .part { margin-top: 4.5rem; }
  .part > h2 { font-size: 16px; }
  .price { font-size: 1.15rem; margin-top: 2rem; }
  .ghosts, .heroes { grid-template-columns: minmax(0, 1fr); gap: 1.75rem; }
  .ghosts li { grid-template-columns: 5.5rem minmax(0, 1fr); gap: 1rem; }
  .ghosts .pool { height: 5.5rem; padding-bottom: 0.45rem; }
  .heroes li { grid-template-columns: 8.5rem minmax(0, 1fr); gap: 1rem; }
  .heroes .pool { height: 10rem; }
  .bosses { gap: 1rem 1.25rem; }
  .bosses li { min-width: 0; }
  .bosses img { zoom: 2; }
  .shot { margin-inline: -1rem; } /* the pictures run to the phone's edges */
  .shot img { border-radius: 0; outline: 0; }
  blockquote p { font-size: 1.2rem; }
  blockquote.voice p { font-size: 1.4rem; }
  .last { margin-top: 4.5rem; }
  .sign { font-size: 16px; }
}

/* ---------- reading pages ---------- */
.page { max-width: var(--read); margin-inline: auto; padding-block: 2rem 4rem; }
.page h1 {
  margin: 0 0 0.5rem;
  font-family: var(--pixel);
  font-weight: 400;
  font-size: 32px;
  line-height: 1.3;
  color: var(--beam);
}
.page h2 { margin: 2.5rem 0 0.5rem; font-size: 1.25rem; font-weight: 700; line-height: 1.35; color: var(--beam); }
.page .dated { margin: 0 0 2rem; color: var(--fog); }
.page p, .page li { text-wrap: pretty; }
.page ul { padding-left: 1.25rem; }
.page li + li { margin-top: 0.35rem; }
.page li::marker { color: var(--amber); }
.write {
  margin: 1.5rem 0 0;
  padding: 1.25rem 1.5rem;
  background: var(--night);
  border-radius: 6px;
}
.write a { font-weight: 700; font-size: 1.2rem; overflow-wrap: anywhere; }
.write p { margin: 0.5rem 0 0; color: var(--fog); }

/* ---------- footer ---------- */
body > footer {
  border-top: 1px solid var(--tile);
  padding-block: 1.5rem 2.5rem;
  color: var(--fog);
  font-size: 1rem;
}
body > footer .wrap { display: flex; flex-wrap: wrap; gap: 0.75rem 2rem; justify-content: space-between; }
body > footer nav { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
body > footer a { color: var(--fog); }
body > footer a:hover { color: var(--beam); }

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
}
