.home {
  background: #19253e radial-gradient(ellipse at 50% 0%, #45557788, transparent 76%);
  padding-top: clamp(1.25rem, 3vh, 2.5rem);
}

.book {
  position: relative;
  isolation: isolate;
  width: min(96%, 100rem, max(48rem, calc(181svh - 10rem)));
  aspect-ratio: 1.81;
  margin: auto;
}

/* 2026-11-24: Shadow only the binding. Filtering the ancestor also rasterizes the live lettering. */
.book::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: url("/art/cognac-grimoire.webp") var(--book-origin, center) / var(--book-size, 100% 100%) no-repeat;
  filter: drop-shadow(0 .9rem .85rem #090e1f94);
}

/* 2026-11-23: Percentages register the live content with the ruled margins of the painted binding. */
.print-filters { position: absolute; pointer-events: none; }

.title-page {
  position: absolute;
  inset: 6.5% auto auto 11.3%;
  width: 35%;
  height: 65%;
  display: grid;
  place-items: center;
}

.title-page::before {
  content: "";
  pointer-events: none;
  position: absolute;
  inset: 71% .5% 1%;
  background: url("/art/oak-endpaper.webp") center bottom / 100% auto no-repeat;
  opacity: .67;
  mix-blend-mode: multiply;
  mask-image: linear-gradient(to bottom, transparent, #000 64%, #000 82%, transparent),
    linear-gradient(to right, transparent, #000 10%, #000 90%, transparent);
  mask-composite: intersect;
  transform: skewX(-1.3deg) rotate(-.5deg);
}

.title-imprint {
  width: 100%;
  display: grid;
  justify-items: center;
  gap: clamp(.75rem, 1.6vw, 1.5rem);
  position: relative;
}
.title-page h1 { width: 91%; line-height: 0; }
.title-page h1 img { display: block; width: 100%; height: auto; }
.game-description {
  max-inline-size: 31ch;
  margin: 0;
  text-align: center;
  text-wrap: balance;
  color: #302b30;
  font: 500 clamp(1rem, 1.45vw, 1.35rem)/1.25 Spectral, Georgia, serif;
}
.title-page .play {
  position: relative;
  min-height: 3.65rem;
  max-width: 100%;
  border: none;
  border-radius: 0;
  background: transparent;
  isolation: isolate;
  text-align: center;
  padding: .7rem clamp(1.35rem, 2.7vw, 2.8rem);
  min-width: min(100%, 12rem);
  color: #fff8e8;
  font: 500 clamp(1.35rem, 2vw, 1.9rem)/1.1 Spectral, Georgia, serif;
}
.title-page .play::before,
.title-page .play::after {
  content: "";
  position: absolute;
  width: auto;
  height: auto;
  pointer-events: none;
  z-index: -1;
}
.title-page .play::before {
  inset: 0;
  background:
    repeating-linear-gradient(90deg, #ffffff0c 0 1px, transparent 1px 3px),
    linear-gradient(106deg, #861b32, #b42636 38%, #a31f32 78%, #921d30);
  clip-path: polygon(0 0, 100% 0, 95% 50%, 100% 100%, 0 100%, 5% 50%);
}
.title-page .play::after {
  inset: 5px 10px;
  clip-path: none;
  background:
    repeating-linear-gradient(90deg, #dcc392 0 3px, transparent 3px 5px) top / 100% 1px no-repeat,
    repeating-linear-gradient(90deg, #dcc392 0 3px, transparent 3px 5px) bottom / 100% 1px no-repeat;
}
.title-page .play:is(:hover, :active)::before { filter: brightness(.92); }

.title-page .play:focus-visible { outline: 3px solid #19253e; outline-offset: 4px; }

.picture-page {
  position: absolute;
  left: 54.3%;
  top: 39.15%;
  width: 33.3%;
  transform: translateY(-50%) perspective(65vw) rotateX(4deg) rotateY(-4deg) skewX(1.1deg) rotate(.45deg);
  filter: url("#page-bow");
  mix-blend-mode: multiply;
}

.picture-page .meadow {
  display: block;
  width: 100%;
  height: auto;
  max-height: none;
  mask: url("/art/dry-ink.webp") center / 100% 100% no-repeat;
  mask-mode: luminance;
  filter: saturate(.91) contrast(.97) brightness(1.07);
  opacity: .93;
}

.home footer {
  width: min(93%, 95rem);
  padding: 1.15rem 0;
  border-color: #d3c39c42;
  font: 500 1.03rem/1.5 Spectral, Georgia, serif;
}
.home footer a { font: inherit; color: #e5ecfa; }
.home footer .publisher { color: #c7d9ff; }
.home footer a:focus-visible { outline-color: currentColor; }

@media (max-width: 720px) {
  .home { padding-top: .8rem; }
  .book {
    width: min(98%, 29rem, max(21rem, 60svh));
    aspect-ratio: .56;
    /* Show the illustrated left leaf and a sliver of the facing page at the gutter. */
    --book-size: 194% 107%;
    --book-origin: left top;
  }
  .title-page {
    left: 21.75%;
    top: 8%;
    width: 68%;
    height: 29%;
    grid-template-rows: minmax(0, 1fr);
  }
  .title-imprint { gap: .45rem; }
  .title-page h1 { width: 93%; }
  .title-page .play { min-height: 2.95rem; padding: .55rem 1.15rem; font-size: 1.25rem; }
  .title-page::before { display: none; }
  .picture-page {
    left: 23%;
    top: 40%;
    width: 65.5%;
    transform: perspective(90vw) rotateX(3deg) rotateY(3deg) skewX(-1.2deg) rotate(-.55deg);
  }
  .home footer { font-size: .95rem; margin-top: .5rem; padding: .7rem 0 1rem; }
}
