/* Solved Hell, direction B: an inscription cut into a crypt wall, above a
   stash holding one unidentified amulet, lit by the torches that flank it. */
:root {
  color-scheme: dark;
  --void: #050403;
  --ink-3: #8f877c;
  /* Diablo II item text. */
  --unique: #c7b377;   /* ÿc4 */
  --white: #ffffff;    /* ÿc0 */
  --red: #ff4d4d;      /* ÿc1 */
  /* Exocet is the Diablo II face (logo and item text). It is used as soon as
     fonts/exocet.woff2 exists; until then New Rocker, a free gothic display
     face with the same flared, spiked capitals, stands in. */
  --d2: "Exocet", "New Rocker", Georgia, serif;
  /* The inscription: Cinzel's Roman capitals share Exocet's bones without
     New Rocker's hooked L's (three of them in the title). */
  --d2-title: "Exocet", "Cinzel", Georgia, serif;
  --d2-title-weight: 900;
  --d2-text-weight: 400;
  --text: "Spectral", Georgia, "Times New Roman", serif;
  --cell: 58px;
}
@font-face {
  font-family: "Exocet";
  src: url("../fonts/exocet.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--void); overflow-x: clip; }
body {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--void);
  color: var(--white);
  font: 1.0625rem/1.6 var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
.scene { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
.wall {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(56px, 9vh, 96px);
  padding: clamp(56px, 10vh, 120px) 16px clamp(40px, 6vh, 72px);
  text-align: center;
}
.mark {
  font-family: var(--d2-title);
  font-weight: var(--d2-title-weight);
  font-size: clamp(3.25rem, 7vw, 7.5rem);
  line-height: 1.1;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #6d665d;
  white-space: nowrap;
}
.mark .word { display: inline-block; }

/* The stash: a slot grid with the hovered item's tooltip above it. */
.stash { display: flex; flex-direction: column; align-items: center; }
.grid {
  position: relative;
  width: calc(var(--cell) * 5);
  height: calc(var(--cell) * 2);
}
.tooltip {
  /* Diablo II: Resurrected's item tooltip. A translucent black box with no
     frame, snug to its longest line, every line centred, tight leading, and
     its lower edge resting on the hovered item's slot. */
  max-width: calc(100vw - 24px);
  margin-bottom: 2px;
  padding: .3em .75em .4em;
  background: rgba(0, 0, 0, .8);
  font-family: var(--d2);
  font-weight: var(--d2-text-weight);
  font-size: 1.25rem;
  line-height: 1.24;
  letter-spacing: .02em;
  text-shadow: 0 1px 0 #000;
}
/* The game's own text colours: unique gold, white, red. */
.t-name { color: var(--unique); }
.t-stat { color: var(--white); }
.t-red { color: var(--red); }

.fine { position: relative; z-index: 1; padding: 0 24px max(20px, env(safe-area-inset-bottom)); text-align: center; }
.fine p { margin: 0 auto; max-width: 62ch; font-size: .9375rem; line-height: 1.5; color: var(--ink-3); }

@media (min-width: 900px) {
  :root { --cell: 66px; }
  .tooltip { font-size: 1.375rem; }
}
/* Phones: the inscription stacks, as large as the width allows. */
@media (max-width: 640px) {
  .mark { font-size: min(16.5vw, 5.5rem); line-height: 1.2; letter-spacing: .07em; }
  .mark .word { display: block; }
  .wall { gap: 48px; }
}

/* While the scene owns the wall, the DOM wordmark stays for readers and search. */
.js .mark { color: transparent; }

/* Without the scene: the same wall as a still render, the inscription cut in CSS. */
.still body { background: #0b0a09 url("wall-wide.webp") center / cover no-repeat; }
@media (max-width: 640px) { .still body { background-image: url("wall-tall.webp"); } }
.still .mark, html:not(.js) .mark {
  color: #a78443;
  /* Cut into the stone: shadow along the upper lip, light caught on the lower. */
  text-shadow: 0 -2px 1px rgba(0, 0, 0, .85), 0 2px 1px rgba(255, 214, 150, .22), 0 0 30px rgba(0, 0, 0, .6);
}
.item { position: absolute; left: calc(var(--cell) * 2); top: 0; width: var(--cell); height: var(--cell); }
.still .grid, html:not(.js) .grid {
  background:
    linear-gradient(90deg, #6b5a40 2px, transparent 2px) 0 0 / var(--cell) var(--cell),
    linear-gradient(#6b5a40 2px, transparent 2px) 0 0 / var(--cell) var(--cell),
    #0a0909;
  box-shadow: 0 0 0 2px #6b5a40, inset 0 6px 16px #000, 0 0 0 8px rgba(0, 0, 0, .55);
}
.still .item { background: url("amulet.webp") center / 100% no-repeat; }
