:root {
  --ink: #0d0b07;
  --teal: #16302d;
  --gold: #d9a04c;
  --rust: #b86a28;
  --parchment: #eadfb4;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--ink);
  color: var(--parchment);
  font: 1.2rem/1.65 "IM Fell English", Georgia, serif;
  text-align: center;
  min-height: 100vh;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* The whole page is one tall poster: key art on top, the same grain running
   on beneath it, and the gold corners closing the frame at the very bottom. */
.poster {
  position: relative;
  max-width: 760px;
  min-height: 100vh;
  margin: 0 auto;
  background:
    linear-gradient(90deg, rgb(0 0 0 / .45), transparent 18%, transparent 82%, rgb(0 0 0 / .45)),
    url("assets/texture.jpg") top center / 900px 600px repeat,
    #21190d;
  box-shadow: 0 0 60px #000;
}

/* Only the last sliver of the art is feathered, so the same grain shows
   through and there is no hard join. */
.hero img {
  display: block;
  width: 100%;
  height: auto;
  -webkit-mask-image: linear-gradient(#000 90%, transparent);
  mask-image: linear-gradient(#000 90%, transparent);
}

/* Same size and inset as the corners printed on the key art. */
.corner {
  position: absolute;
  bottom: .6%;
  width: 13.6%;
  height: auto;
  pointer-events: none;
}

.corner.left { left: 1.4%; bottom: 6px; }
.corner.right { right: 1.4%; bottom: 6px; transform: scaleX(-1); }

main {
  max-width: 38rem;
  margin: 0 auto;
  padding: 2.75rem 22px 40px;
}

.kicker {
  font-family: "IM Fell English SC", Georgia, serif;
  color: var(--gold);
  letter-spacing: .04em;
  margin-bottom: 2.2rem;
}

.lede p + p { margin-top: 1.1rem; }

.big {
  font-size: 1.75rem;
  line-height: 1.35;
  color: var(--gold);
}

.rule {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 3rem 0;
  color: var(--rust);
}

.rule::before,
.rule::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--rust), transparent);
}

figcaption {
  font-family: "IM Fell English SC", Georgia, serif;
  color: var(--gold);
  margin-top: .6rem;
}

.stars { color: var(--rust); font-size: 1.6rem; letter-spacing: .35em; padding-left: .35em; }

.review blockquote {
  font-size: 1.65rem;
  line-height: 1.35;
  text-wrap: balance;
}

.summons {
  margin: 3.5rem 0;
  padding: 2rem 1.25rem;
  border: 3px double var(--rust);
  background: rgb(0 0 0 / .3);
  font-family: "Special Elite", "Courier New", monospace;
  font-size: 1.1rem;
}

.summons h2 {
  font: 400 1.9rem/1.2 "IM Fell English SC", Georgia, serif;
  color: var(--gold);
  margin-bottom: .8rem;
}

.summons + .summons { margin-top: -1.75rem; }

.summon-link {
  display: inline-block;
  margin-top: 1.1rem;
  padding: .6rem .9rem;
  border: 1px solid var(--rust);
  color: var(--gold);
  font-size: clamp(.8rem, 3.5vw, 1.1rem);
  text-decoration: none;
  overflow-wrap: anywhere;
  transition: background .3s, color .3s, box-shadow .3s;
}

.summon-link:hover,
.summon-link:focus-visible {
  background: var(--gold);
  color: var(--ink);
  box-shadow: 0 0 24px rgb(217 160 76 / .55);
}

/* The rotating quote, set as a centrepiece between two rules. The fixed
   minimum height stops the page jumping as quotes change length. */
.whisper {
  min-height: 15rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: opacity 1.2s;
}

.whisper blockquote {
  font-style: italic;
  font-size: clamp(1.5rem, 5.8vw, 2.1rem);
  line-height: 1.35;
  color: #f3d692;
  text-shadow: 0 0 22px rgb(217 160 76 / .35);
  text-wrap: balance;
}

.whisper figcaption { margin-top: 1rem; font-size: 1.3rem; }

.rule + .whisper { margin: -1.5rem 0; }

.whisper.fading { opacity: 0; }

footer {
  padding: 1.5rem 15% 2.5rem;
  font-family: "Special Elite", "Courier New", monospace;
  font-size: .85rem;
  opacity: .65;
}

/* Desktop: the wide key art, so title, cast and opening line all show at once. */
@media (min-width: 900px) {
  .poster { max-width: 1320px; }

  main { max-width: 46rem; }

  main { padding-top: 3rem; }

  .kicker { margin-bottom: 1.4rem; text-wrap: balance; }

  .big { font-size: 2.35rem; margin-bottom: .4rem; text-wrap: balance; }

  .corner { width: 96px; }
  .corner.left { left: 14px; bottom: 10px; }
  .corner.right { right: 14px; bottom: 10px; }
}

/* The opening quote, which glitches apart to reveal the page. */
html.intro-on { overflow: hidden; }

.intro {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  cursor: pointer;
  background: radial-gradient(ellipse at center, #120d07, #060402 70%);
}

.intro-quote {
  position: relative;
  max-width: 21em;
  padding: 0 1.2em;
  font-size: clamp(1.6rem, 4.6vw, 3.1rem);
  line-height: 1.4;
  color: var(--parchment);
  text-shadow: 0 0 18px rgb(217 160 76 / .45);
}

.intro-quote p { text-wrap: balance; }
.intro-quote p + p { margin-top: .5em; }

.intro-quote .word { display: inline-block; white-space: nowrap; }

.intro-quote .letter {
  display: inline-block;
  opacity: 0;
  filter: blur(14px);
  transform: translateY(.35em) scale(1.5);
  transition: opacity 1.1s ease-out, filter 1.1s ease-out, transform 1.1s cubic-bezier(.2, .7, .2, 1), color 1.4s, text-shadow 1.4s;
}

.intro-quote .letter.in {
  opacity: 1;
  filter: blur(0);
  transform: none;
}

.intro-quote .dread.in {
  color: #f0a23c;
  text-shadow: 0 0 10px #d9601c, 0 0 34px #a83208;
}

.intro-by {
  font: 400 .55em "IM Fell English SC", Georgia, serif;
  color: var(--gold);
  margin-top: 1.4em;
  opacity: 0;
  transition: opacity 1s;
}

.intro-by.in { opacity: 1; }

.intro-skip {
  position: absolute;
  bottom: 18px;
  left: 0;
  right: 0;
  font: .8rem "Special Elite", "Courier New", monospace;
  color: var(--parchment);
  opacity: .4;
}

.intro.strip { pointer-events: none; }

/* strips are copies: show them finished, with the colours pulled apart */
.intro.strip .letter,
.intro.strip .intro-by { transition: none; filter: none; }

.intro.strip .letter,
.intro.strip .intro-by,
.intro.strip .intro-skip {
  text-shadow: var(--split, 2px) 0 rgb(230 50 25 / .85), calc(var(--split, 2px) * -1) 0 rgb(45 215 195 / .85);
}

.intro.strip.hot { background: #10211f; }

/* the page itself stutters as it comes through */
html.intro-glitching .hero img { animation: stutter 1.3s steps(1) both; }

@keyframes stutter {
  0%, 100% { transform: none; filter: none; }
  30% { transform: translateX(-9px); filter: drop-shadow(10px 0 rgb(230 50 25 / .6)); }
  42% { transform: translateX(6px) skewX(1deg); filter: hue-rotate(35deg); }
  55% { transform: none; filter: drop-shadow(-12px 0 rgb(45 215 195 / .55)); }
  68% { transform: translateX(-4px); filter: contrast(1.35) saturate(1.5); }
  80% { transform: translateX(3px); filter: drop-shadow(5px 0 rgb(230 50 25 / .5)); }
  90% { transform: none; filter: none; }
}

@media (prefers-reduced-motion: reduce) {
  .whisper { transition: none; }
}
