@font-face {
  font-family: "HeadUpDaisy";
  src: url("fonts/x14y24pxHeadUpDaisy.ttf") format("truetype");
  font-display: swap;
}
@font-face {
  font-family: "MaruMinyaM";
  src: url("fonts/x12y12pxMaruMinyaM.ttf") format("truetype");
  font-display: swap;
}

:root {
  --black: #030304;
  --dark: #0b0b0d;
  --kindadark: #131416;
  --dgrey: #292b2e;
  --grey: #5f6266;
  --lgrey: #909396;
  --light: #c9c9c7; /* body */
  --exlight: #ecebe8; /* heading */

  --tear: #78868f;
  --tear-dim: #4a555c;
  --pink: #9a808a;
  --pink-dim: #63525a;

  --rain-tilt: 4deg;
  --rain-opacity: 0.75;
  --rain-speed: 0.6;
  --rain-z: 1;
  --panel: rgba(5, 5, 6, 0.72);
  --measure: 1000px;
  --text-measure: 72ch;

  --photo: none;

  --rain-near: url("images/rain-near.svg");
  --rain-mid: url("images/rain-mid.svg");
  --rain-far: url("images/rain-far.svg");
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  overflow-x: hidden;
}

body {
  background: var(--black);
  color: var(--light);
  font-family: Georgia, Times, serif;
  font-size: 17px;
  line-height: 1.55;
}

.center {
  text-align: center;
}

.backdrop {
  position: fixed;
  inset: 0;
  z-index: -3;
  background-image: var(--photo);
  background-size: cover;
  background-position: center 40%;
  filter: grayscale(100%) contrast(118%) brightness(0.3);
}

.glow {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(
      44vmax 34vmax at 66% 6%,
      rgba(255, 255, 255, 0.1),
      rgba(255, 255, 255, 0.03) 46%,
      transparent 74%
    ),
    radial-gradient(
      30vmax 24vmax at 20% 44%,
      rgba(255, 255, 255, 0.035),
      transparent 70%
    ),
    linear-gradient(
      to bottom,
      #030304 0%,
      #08080a 32%,
      #0d0e10 62%,
      #101113 84%,
      #121315 100%
    );
}

.grain {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(
      120vmax 90vmax at 50% 45%,
      transparent 34%,
      rgba(0, 0, 0, 0.78) 100%
    ),
    repeating-linear-gradient(
      0deg,
      rgba(255, 255, 255, 0.018) 0px,
      rgba(255, 255, 255, 0.018) 1px,
      transparent 1px,
      transparent 3px
    );
}

.rain {
  position: fixed;
  inset: 0;
  z-index: var(--rain-z);
  overflow: hidden;
  pointer-events: none;
  opacity: var(--rain-opacity);
}

.sheet {
  position: absolute;
  top: calc(-1 * var(--tile-h));
  left: -6%;
  width: 112%;
  height: calc(100% + var(--tile-h));
  background-repeat: repeat;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  transform: rotate(var(--rain-tilt));
  will-change: transform;
  animation: pour var(--speed) linear infinite;
}

.sheet--near {
  --tile-h: 320px;
  --speed: calc(0.85s * var(--rain-speed));
  background-image: var(--rain-near);
  background-size: 240px 320px;
}

.sheet--mid {
  --tile-h: 280px;
  --speed: calc(1.45s * var(--rain-speed));
  background-image: var(--rain-mid);
  background-size: 210px 280px;
}

.sheet--far {
  --tile-h: 240px;
  --speed: calc(2.3s * var(--rain-speed));
  background-image: var(--rain-far);
  background-size: 180px 240px;
}

@keyframes pour {
  from {
    transform: rotate(var(--rain-tilt)) translate3d(0, 0, 0);
  }
  to {
    transform: rotate(var(--rain-tilt)) translate3d(0, var(--tile-h), 0);
  }
}

.poster {
  position: relative;
  z-index: 2;
  max-width: var(--measure);
  margin: 0 auto;
  padding: 30px 18px 56px;
  text-align: center;
}

.frame {
  box-sizing: border-box;
  min-width: 0;
  border-top-color: var(--grey);
  border-left-color: var(--grey);
  background-color: var(--panel);
  background-image: linear-gradient(
    158deg,
    rgba(255, 255, 255, 0.045) 0%,
    rgba(255, 255, 255, 0.012) 34%,
    rgba(255, 255, 255, 0) 58%,
    rgba(0, 0, 0, 0.12) 100%
  );
  -webkit-backdrop-filter: blur(3px) grayscale(60%);
  backdrop-filter: blur(3px) grayscale(60%);
  padding: 26px 34px 32px;
  box-shadow:
    0 0 0 1px var(--black),
    inset 0 1px 0 rgba(255, 255, 255, 0.09),
    inset 1px 0 0 rgba(255, 255, 255, 0.04),
    0 18px 50px rgba(0, 0, 0, 0.65);
}

.frame p,
.frame h2,
.frame h3,
.frame .lineup {
  max-width: var(--text-measure);
  margin-left: auto;
  margin-right: auto;
}

.kicker {
  font-family: "MaruMinyaM", monospace;
  font-size: 0.8rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--grey);
  margin: 0 0 10px;
}

h1 {
  font-family: "HeadUpDaisy", monospace;
  font-size: clamp(1.9rem, 8vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: 1px;
  color: var(--exlight);
  margin: 0 0 8px;
  text-shadow:
    0 0 20px rgba(255, 255, 255, 0.18),
    0 2px 0 var(--black);
}

h2 {
  font-family: "HeadUpDaisy", monospace;
  font-size: clamp(1.1rem, 5vw, 1.5rem);
  color: var(--lgrey);
  letter-spacing: 1px;
  margin: 26px auto 6px;
}

h3 {
  font-family: "MaruMinyaM", monospace;
  font-size: 1rem;
  letter-spacing: 2px;
  color: var(--lgrey);
  margin: 18px auto 3px;
}

.tagline {
  font-style: italic;
  color: var(--lgrey);
  margin: 0 auto 4px;
}

p {
  margin: 0 0 11px;
}

small {
  color: var(--grey);
  font-size: 0.82rem;
}

b,
strong {
  color: var(--exlight);
}

em {
  color: var(--lgrey);
}

.accent {
  color: var(--exlight);
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.22);
}
.tear {
  color: var(--tear);
}

.gradient {
  background: linear-gradient(105deg, #9dbcd2 0%, #cdd2d6 44%, #d2a8b6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: none;
  filter: drop-shadow(0 0 10px rgba(150, 180, 205, 0.3))
    drop-shadow(0 2px 0 rgba(3, 3, 4, 0.9));
}
.heart {
  color: var(--pink);
}
.dim {
  color: var(--grey);
}

a {
  color: var(--tear);
  text-decoration: underline;
}
a:hover {
  color: var(--pink);
  background: rgba(185, 142, 156, 0.1);
}
a:visited {
  color: var(--tear-dim);
}

hr {
  border: 0;
  border-top: 1px solid var(--dgrey);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  margin: 18px auto;
  max-width: 62%;
}

.rule {
  line-height: 0;
  margin: 15px auto;
  user-select: none;
}

.rule i {
  display: inline-block;
  width: 18px;
  height: 16px;
  margin: 0 5px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 18px 16px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.ieh {
    display: inline-block;
    width: 12px;
    height: 10px;
    margin: 0 5px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 12px 10px;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

.heart {
  background-image: url("images/heart.svg");
}

.broke {
  background-image: url("images/heart-broken.svg");
}

.details {
  font-family: "MaruMinyaM", monospace;
  font-size: 0.95rem;
  line-height: 1.9;
  display: inline-block;
  text-align: left;
  border-top-color: var(--black);
  border-left-color: var(--black);
  background: rgba(0, 0, 0, 0.42);
  padding: 12px 20px;
  margin: 4px 0 2px;
}

.loc {
    line-height: 1;
}

.details span {
  color: var(--grey);
}

.lineup {
  font-family: "MaruMinyaM", monospace;
  line-height: 2;
  margin: 2px auto 8px;
}

.book {
  display: inline-block;
  text-decoration: none;
  font-family: "MaruMinyaM", monospace;
  color: var(--tear);
  margin: 14px 0 4px;
}
.book:hover {
  background: none;
  color: var(--lgrey);
}

.inset {
    background-color: var(--black);
    width: fit-content;
    padding: 4px 8px 4px 8px;
}

button,
input[type="submit"] {
  font-family: "MaruMinyaM", monospace;
  font-size: 1.15rem;
  cursor: pointer;
  padding: 0.5rem 1.4rem;
  color: #f4eef1;
  background: linear-gradient(165deg, #35566e 0%, #3b4460 48%, #6a4152 100%);
  border: 2px solid;
  border-color: #9fc9e2 #2a1c23 #2a1c23 #9fc9e2;
  text-shadow: 0 0 8px rgba(148, 196, 226, 0.7), 0 1px 0 #14161c;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 0 14px rgba(120, 160, 195, 0.22),
    0 0 22px rgba(154, 128, 138, 0.16);
}
button:hover,
input[type="submit"]:hover {
  background: linear-gradient(165deg, #41657f 0%, #4a5372 48%, #7f4d61 100%);
  color: #fff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 0 18px rgba(140, 185, 220, 0.38),
    0 0 28px rgba(184, 142, 158, 0.28);
}
button:active,
input[type="submit"]:active {
  border-color: #2a1c23 #9fc9e2 #9fc9e2 #2a1c23;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.5);
}

img {
  max-width: 100%;
  height: auto;
}

.frame div:has(.art),
.art-container {
  max-width: var(--text-measure);
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

.art {
  display: block;
  width: 100%;
  max-width: 460px;
  height: auto;
  margin: 14px auto;
  box-sizing: border-box;
  border: 1px solid var(--dgrey);
  filter: contrast(112%);
}
.foot {
  margin-top: 22px;
  font-family: "MaruMinyaM", monospace;
  font-size: 0.8rem;
  color: var(--grey);
  line-height: 1.9;
}

.foot .sunset {
  background: linear-gradient(to right, var(--lgrey), var(--grey), var(--lgrey));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

@media screen and (max-width: 700px) {
  body {
    font-size: 16px;
  }
  .poster {
    padding: 16px 8px 40px;
  }
  .frame {
    padding: 18px 13px 22px;
  }
  .details {
    display: block;
    padding: 12px 14px;
    font-size: 0.9rem;
  }
  .sheet--far {
    display: none;
  }
  :root {
    --rain-opacity: 0.62;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sheet {
    animation: none;
  }
}
