/* limina.css — liminalia, morisuki
   each poem page: <body class="limen v-NAME">, the poem goes in <pre class="limina">.*/

/* index */

.liminalia h1 {
  color: #bb2be3;
}

.liminalia .realm {
  width: 100%;
  max-width: 900px;
  margin-top: 1.5rem;
}

.liminalia .realm h2 {
  margin: 0;
  color: var(--lp, #bb2be3);
  font-weight: normal;
}

.liminalia .realm .span {
  margin: 0.2rem 0 0.9rem;
  color: #777;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
}

.liminalia .tbl {
  --cols: 14ch minmax(0, 1fr) 8ch;
  --cols-m: 14ch minmax(0, 1fr) 8ch;
  border-color: var(--lp, #bb2be3);
}

.liminalia .tbl .f-head {
  color: var(--lp, #bb2be3);
  border-bottom-color: var(--lp, #bb2be3);
}

.liminalia .tbl .ll {
  color: var(--fc, #bb2be3);
}

.liminalia .tbl .link-button:hover .f-id::before {
  color: var(--lp, #bb2be3);
}

.liminalia .dove {
  --lp: #f3f0ea;
}

.liminalia .river {
  --lp: #2fb5a5;
}

.liminalia .field {
  --lp: #d9b44a;
}

.liminalia .unreal {
  --lp: #ffc8e4;
}

/* poem page */

.limen {
  --ink: #fff;
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
}

.threshold {
  max-width: 38rem;
  margin: 0 auto;
  padding: 75px 20px 40px;
}

.lintel {
  margin: 0 0 1.5rem;
  padding: 0;
  border: 0;
}

.lintel small {
  color: var(--ink);
  opacity: 0.6;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
}

.lintel h1 {
  margin: 0.2rem 0 0;
  color: var(--title, var(--ink));
  font-size: 1.5rem;
  font-weight: normal;
}

.limina {
  margin: 0;
  color: var(--ink);
  font-size: 0.75rem;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: break-word;
}

.passage {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2.5rem;
  font-size: 0.75rem;
}

.passage a,
.passage a:hover {
  color: var(--ink);
  text-decoration: none;
  opacity: 0.45;
}

.passage a:hover {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  body.limen * {
    animation: none !important;
  }
}

/* Texas, Ontario */

.v-wheat {
  --ink: #6e1426;
  background:
    repeating-linear-gradient(90deg, transparent 0 9px, rgba(150, 105, 35, 0.07) 9px 10px),
    linear-gradient(#c98a3a, #e2c27a 30%, #e8d29a);
}

/* The crescent moon angel */

.v-angel {
  --ink: #c23a6e;
  background: linear-gradient(#efb0c6, #f9dde0 55%, #fbf6ef 56%);
}

.v-angel .limina {
  text-shadow: 0 0 6px #fff, 1px 1px 0 rgba(70, 130, 70, 0.12);
}

/* A dream */

.v-dream {
  --ink: #2f6e34;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.5) 0 2px, transparent 2px) 0 0 / 180px 100%,
    linear-gradient(rgba(255, 255, 255, 0.5) 0 2px, transparent 2px) 0 0 / 100% 240px,
    #d6e6d3;
}

.v-dream .limina :is(b, i, em, strong) {
  font-weight: normal;
  font-style: normal;
  color: #b8860b;
  text-shadow: 0 0 4px rgba(255, 220, 120, 0.8);
}

/* A weapon that tyranny will fear */

.v-weapon {
  --ink: #d8d2cc;
  --title: #a00000;
  background: linear-gradient(90deg, transparent calc(50% - 1px), #4a0000 0 calc(50% + 1px), transparent 0) fixed, #000;
}

.v-weapon .limina {
  animation: stutter 9s steps(1) infinite;
}

@keyframes stutter {
  0%, 100% { color: var(--ink); transform: none; }
  61% { color: #a00000; transform: translateX(-2px); }
  61.6% { color: var(--ink); transform: translateX(1px); }
  62% { color: #a00000; transform: none; }
  62.3% { color: var(--ink); }
}

/* Indecisive */

.v-pencil {
  --ink: #6b6b6e;
  background:
    radial-gradient(farthest-corner at 100% 0, rgba(240, 160, 180, 0.35), transparent 60%),
    #ebe3d3;
}

.v-pencil .limina {
  text-shadow: 0 0 0.6px rgba(60, 60, 64, 0.6);
  -webkit-mask-image: linear-gradient(170deg, #000, rgba(0, 0, 0, 0.6) 40%, #000 70%, rgba(0, 0, 0, 0.7));
  mask-image: linear-gradient(170deg, #000, rgba(0, 0, 0, 0.6) 40%, #000 70%, rgba(0, 0, 0, 0.7));
}

/* Church Steeple */

.v-steeple {
  --ink: #e4dca6;
  background: linear-gradient(#4b4f5a, #1b2347 45%, #0a1030);
}

.v-steeple .limina {
  text-shadow: 0 0 6px rgba(255, 210, 90, 0.3);
}

/* Creekside */

.v-creek {
  --ink: #d0752e;
  background: #07102e;
}

.v-creek .threshold {
  position: relative;
}

.v-creek .threshold::after {
  content: "";
  position: absolute;
  top: 40%;
  left: 60%;
  width: 14rem;
  height: 14rem;
  margin: -7rem;
  border: 1px solid rgba(170, 200, 255, 0.25);
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
  animation: ripple 14s ease-out infinite;
}

@keyframes ripple {
  0% { transform: scale(0.05); opacity: 0; }
  2% { opacity: 1; }
  20%, 100% { transform: scale(1); opacity: 0; }
}

/* Wedding room */

.v-wedding {
  --ink: rgba(255, 255, 255, 0.7);
  background: #5e6068;
}

.v-wedding .limina {
  animation: haunt 10s ease-in-out infinite;
}

@keyframes haunt {
  50% { opacity: 0.55; }
}

/* The angel in moonlight */

.v-moonlight {
  --ink: #ecd2e0;
  background:
    radial-gradient(1px 1px at 20% 30%, #fff, transparent) 0 0 / 230px 230px,
    radial-gradient(1px 1px at 70% 80%, #fff, transparent) 0 0 / 310px 310px,
    #060820;
}

.v-moonlight .limina {
  text-shadow: 0 0 5px rgba(255, 210, 235, 0.35);
}

/* I wished for us to be once in a lifetime */

.v-crt {
  --ink: #ffe66d;
  background:
    repeating-linear-gradient(transparent 0 2px, rgba(255, 255, 255, 0.035) 2px 3px),
    radial-gradient(ellipse at center, #11110c, #000 75%);
}

.v-crt .limina,
.v-crt .lintel h1 {
  text-shadow: 0 0 4px rgba(255, 230, 109, 0.6);
}

/* Will there be enough left of me? */

.v-trench {
  --ink: #a4532a;
  background: linear-gradient(#4a4734, #2c2719);
}

.v-trench .limina {
  text-shadow: 0 1px 0 #120d06, 0 -1px 0 rgba(255, 190, 140, 0.12);
}

/* Celestial bodies */

.v-galaxy {
  --ink: #c8aee6;
  background:
    radial-gradient(1px 1px at 30% 40%, #e8dcff, transparent) 0 0 / 190px 190px,
    radial-gradient(ellipse 40% 12% at 50% 50%, rgba(170, 120, 230, 0.18), transparent),
    #120722;
}

.v-galaxy .limina {
  text-shadow: 0 0 1px #fff, 0 0 6px rgba(180, 140, 240, 0.3);
}

/* Bed of grey clouds */

.v-clouds {
  --ink: #2a3650;
  background: linear-gradient(90deg, #8d949f, #e9ebee 50%, #fff);
}

.v-clouds .limina {
  background: linear-gradient(90deg, #2a3650 30%, #d9558f 60%) fixed;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Golden veils */

.v-veils {
  --ink: #d6b04a;
  background: linear-gradient(#0b4a46, #042827);
}

/* There is a garden that grows inside of me */

.v-garden {
  --ink: #f7a8c8;
  --bouquet: #e3a3b4, #e2a58a, #c98a8f, #c27184, #b05264, #c4573f, #b8643a,
    #a8222c, #d08a3a, #c9a23f, #ecd6c4, #e3d6b4, #8fa596, #a9c8d8, #7f9ac0,
    #8e8bb4, #e39a8f, #9c7fa6, #a8738f, #e3a3b4;
  background: linear-gradient(#1c2619, #141c12 55%, #0d120b);
}

.v-garden .limina,
.v-garden .lintel h1 {
  background: linear-gradient(165deg, var(--bouquet));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.v-garden .lintel h1 {
  width: fit-content;
  background-image: linear-gradient(90deg, var(--bouquet));
}

/* Pouring out at the seams of one hundred different realities */

.v-seams {
  --ink: #b0b3bd;
  background: linear-gradient(#2a2c33, #121317);
}

.v-seams .limina {
  color: #a8001c;
  animation: bleed 9s ease-out both;
}

@keyframes bleed {
  from { color: transparent; text-shadow: 0 0 18px rgba(168, 0, 28, 0); }
  40% { color: transparent; text-shadow: 0 0 14px rgba(168, 0, 28, 0.7); }
  to { color: #a8001c; text-shadow: 0 0 1px rgba(168, 0, 28, 0.4); }
}

/* Here's to the self I killed to reach you */

.v-brick {
  --ink: rgba(6, 2, 1, 0.85);
  background:
    linear-gradient(rgba(12, 4, 2, 0.6) 0 2px, transparent 0) 0 0 / 100% 30px,
    conic-gradient(at 2px 30px, transparent 75%, rgba(12, 4, 2, 0.6) 0) 0 0 / 90px 60px,
    conic-gradient(at 2px 30px, transparent 75%, rgba(12, 4, 2, 0.6) 0) 45px 30px / 90px 60px,
    #4a1f16;
}

.v-brick .limina,
.v-brick .lintel h1 {
  filter: blur(0.4px);
}

/* Patience is a virtue */

.v-velvet {
  --ink: #d93a63;
  background: linear-gradient(160deg, #1a2580, #0a1045 60%, #050826);
}

/* you never attended my funeral. */

.v-funeral {
  --ink: #d9d9d9;
  background:
    url("glass/shards-a.png"),
    url("glass/shards-b.png") 213px 141px,
    #000;
}

.v-funeral .limina {
  position: relative;
  text-shadow: 1px 1px 0 rgba(150, 170, 200, 0.25);
}

.v-funeral .limina::after {
  content: "";
  position: absolute;
  inset: -0.5rem -1.5rem;
  background: url("glass/crack.png") 0 0 no-repeat;
  -webkit-mask-image:
    linear-gradient(transparent, #000 4rem, #000 calc(100% - 4rem), transparent),
    linear-gradient(90deg, transparent, #000 4rem, #000 calc(100% - 4rem), transparent);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(transparent, #000 4rem, #000 calc(100% - 4rem), transparent),
    linear-gradient(90deg, transparent, #000 4rem, #000 calc(100% - 4rem), transparent);
  mask-composite: intersect;
  mix-blend-mode: difference;
  opacity: 0.5;
  pointer-events: none;
}

/* inbetween */

.v-inbetween {
  --ink: #b08a2e;
  background: radial-gradient(ellipse 80% 60% at 50% 55%, #0b0d10, #030304 60%, #000);
}

.v-inbetween .limina,
.v-inbetween .lintel h1 {
  background: linear-gradient(170deg, #3f7a3a, #6a3f8c 50%, #a8842a);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.v-inbetween .lintel h1 {
  width: fit-content;
  background-image: linear-gradient(90deg, #3f7a3a, #6a3f8c, #a8842a);
}

.v-inbetween .threshold {
  position: relative;
}

.dust {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.dust i {
  --c: #e6cf86;
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: var(--c);
  box-shadow: 0 0 4px 1px var(--c);
  opacity: 0;
  animation: mote var(--t) ease-in-out var(--d) infinite;
}

.dust i:nth-child(3n) {
  --c: #8fc48a;
}

.dust i:nth-child(4n) {
  --c: #c2a2e6;
}

@keyframes mote {
  0%, 40%, 100% { opacity: 0; transform: translateY(0) scale(0.3); }
  48% { opacity: 1; transform: translateY(-3px) scale(1); }
  51% { opacity: 0.4; }
  54% { opacity: 1; }
  70% { opacity: 0; transform: translateY(-14px) scale(0.5); }
}

/* esoteria */

.limen:not(.v-garden) {
  background-attachment: fixed;
}
