/* Hidden rune hunt. Isolated from the established section and journal geometry. */
.rune-hunt-host {
  position: relative;
}

.discoverable-rune {
  position: absolute;
  z-index: 18;
  display: grid;
  place-items: center;
  width: clamp(32px, 2.4vw, 42px);
  height: clamp(32px, 2.4vw, 42px);
  padding: 0;
  color: rgba(117, 104, 83, .55);
  background: transparent;
  border: 0;
  border-radius: 48%;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  -webkit-user-select: none;
  user-select: none;
  cursor: pointer;
  font: 400 clamp(1.05rem, 1.45vw, 1.5rem)/1 "Rune Cut", Georgia, serif;
  filter: saturate(.55);
  transition: color 180ms ease, filter 180ms ease, opacity 180ms ease, text-shadow 180ms ease, transform 140ms ease;
}

.rune-hunt-host > .discoverable-rune,
#campaign .campaign-map > .discoverable-rune {
  position: absolute;
  z-index: 18;
}

.rune-hunt-active .discoverable-rune {
  opacity: .66;
  visibility: visible;
  pointer-events: auto;
}

.discoverable-rune:hover,
.discoverable-rune:focus-visible {
  color: #b0dfc2;
  opacity: .98;
  outline: 1px solid rgba(72, 198, 119, .35);
  outline-offset: 3px;
  filter: saturate(1);
  text-shadow: 0 0 5px rgba(36, 218, 107, .64), 0 0 13px rgba(103, 48, 156, .38);
}

.discoverable-rune.is-found,
.discoverable-rune.is-awakening,
.rune-hunt-unlocked .discoverable-rune {
  color: #8bd6a7;
  opacity: .78;
  filter: saturate(1);
  text-shadow: 0 0 4px rgba(36, 218, 107, .62), 0 0 11px rgba(103, 48, 156, .3);
}

.discoverable-rune.is-awakening {
  animation: rune-awaken 700ms ease-out both;
}

.discoverable-rune.is-rejected {
  animation: rune-reject 480ms ease-out both;
}

.discoverable-rune--timber {
  top: 3.5%;
  right: 2.5%;
  color: rgba(73, 52, 34, .7);
  text-shadow: 0 1px 0 rgba(212, 172, 110, .14), 0 -1px 1px rgba(0, 0, 0, .75);
}

.discoverable-rune--iron {
  right: 2.25%;
  bottom: 3.25%;
  color: rgba(77, 83, 78, .72);
  text-shadow: 0 1px 0 rgba(205, 188, 153, .12), 0 -1px 1px #020302;
}

.discoverable-rune--ink {
  left: 48.15%;
  top: 8.2%;
  color: rgba(182, 151, 101, .88);
  transform: rotate(-3deg);
  text-shadow: 0 1px 0 rgba(238, 215, 174, .32), 0 -1px 1px rgba(8, 4, 2, .9);
}

.discoverable-rune--stone {
  right: 3.4%;
  bottom: 7.2%;
  color: rgba(184, 164, 128, .9);
  text-shadow: 0 1px 0 rgba(241, 222, 184, .34), 0 -1px 1px rgba(5, 3, 2, .9);
}

.discoverable-rune--stone:hover,
.discoverable-rune--stone:focus-visible,
.discoverable-rune--stone.is-found,
.discoverable-rune--stone.is-awakening,
.rune-hunt-unlocked .discoverable-rune--stone {
  color: #b8ebc9;
  opacity: .92;
  filter: saturate(1.08) brightness(1.08);
  text-shadow: 0 0 4px rgba(190, 244, 211, .72), 0 0 12px rgba(36, 218, 107, .72), 0 0 18px rgba(103, 48, 156, .42);
}

.rune-hunt-completing::after {
  position: fixed;
  z-index: 9998;
  inset: 0;
  content: "";
  pointer-events: none;
  background:
    radial-gradient(circle at 40% 55%, rgba(20, 209, 94, .34), transparent 44%),
    radial-gradient(circle at 68% 42%, rgba(114, 43, 173, .34), transparent 46%);
  mix-blend-mode: screen;
  animation: rune-site-pulse 1050ms ease-out both;
}

.rune-hunt-resetting .site-view {
  animation: rune-site-dim 460ms ease-out;
}

.journal-detail--hidden-signal .journal-foundation {
  isolation: isolate;
}

.hidden-signal-opening,
.hidden-signal-reading {
  color: #17100a;
}

.hidden-signal-sigil {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .45rem;
  width: min(100%, 330px);
  margin: clamp(1.3rem, 4vh, 2.8rem) auto 1rem;
  padding: .85rem 1rem;
  border-top: 1px solid rgba(40, 24, 14, .55);
  border-bottom: 1px solid rgba(40, 24, 14, .55);
  text-align: center;
  font: 400 clamp(1.3rem, 2vw, 2rem)/1 "Rune Cut", Georgia, serif;
}

.hidden-signal-sigil span {
  filter: drop-shadow(0 0 5px rgba(19, 132, 65, .26));
}

.hidden-signal-found {
  margin: .9rem 0 0;
  color: #315139;
  text-align: center;
  font: 700 .76rem/1.4 system-ui, sans-serif;
  letter-spacing: .14em;
}

.hidden-signal-reading .journal-entry-copy {
  max-height: clamp(180px, 31vh, 360px);
  padding-right: .45rem;
  overflow-y: auto;
  scrollbar-color: rgba(54, 38, 24, .55) transparent;
  scrollbar-width: thin;
}

.hidden-signal-media {
  margin: .8rem 0 0;
}

.hidden-signal-video {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #090806;
  border: 1px solid rgba(40, 24, 14, .72);
  box-shadow: 0 5px 12px rgba(28, 16, 8, .25);
}

.hidden-signal-video iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.hidden-signal-media figcaption {
  margin-top: .35rem;
  color: #291d14;
  font: 700 .68rem/1.3 system-ui, sans-serif;
  letter-spacing: .1em;
}

.hidden-signal-external {
  margin-top: 1rem;
  color: #17100a;
  border-color: rgba(40, 24, 14, .66);
}

@keyframes rune-awaken {
  0% { opacity: .4; transform: scale(.9); }
  42% { opacity: 1; transform: scale(1.16); text-shadow: 0 0 7px #58ec90, 0 0 20px rgba(109, 44, 172, .8); }
  100% { opacity: .78; transform: scale(1); }
}

@keyframes rune-reject {
  0%, 100% { opacity: .66; filter: brightness(1); }
  42% { opacity: .12; filter: brightness(.45); }
}

@keyframes rune-site-pulse {
  0% { opacity: 0; }
  28% { opacity: .95; }
  100% { opacity: 0; }
}

@keyframes rune-site-dim {
  0%, 100% { filter: brightness(1); }
  46% { filter: brightness(.78) saturate(.7); }
}

@media (max-width: 800px) {
  .discoverable-rune { width: 36px; height: 36px; font-size: 1.15rem; }
  .discoverable-rune--timber { top: 1.8%; right: 2%; }
  .discoverable-rune--iron { right: 4%; bottom: 2.5%; }
  .discoverable-rune--ink { left: auto; right: 5%; top: 3.2%; }
  .discoverable-rune--stone { right: 5%; bottom: 3.5%; }
  .hidden-signal-reading .journal-entry-copy { max-height: none; overflow: visible; }
}

@media (prefers-reduced-motion: reduce) {
  .discoverable-rune,
  .discoverable-rune.is-awakening,
  .discoverable-rune.is-rejected,
  .rune-hunt-completing::after,
  .rune-hunt-resetting .site-view { animation: none; transition: none; }
}
