/*
Theme Name: Wild Signals
Theme URI: https://wildsignals.pl
Author: Wild Signals
Description: Radio waves in the ether — code, RF, UAS, field.
Version: 3.4.2
Text Domain: wildsignals
*/

@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;600&family=Barlow:wght@600;800&display=swap");

:root {
  --bg: #080a08;
  --panel: #101410;
  --line: #2a3328;
  --text: #e6ebdf;
  --muted: #6f7a68;
  --fog: #9aa892;
  --amber: #d4b056;
  --olive: #4a6b3e;
  --phos: #7ecf6a;
  --glow: rgba(212,176,86,.35);
  --display: "Barlow", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh;
  font: 15px/1.5 var(--mono); color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}
body.is-skew { filter: hue-rotate(12deg) contrast(1.06); }
::selection { background: var(--amber); color: #111; }
a { color: var(--amber); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
.wrap { width: min(900px, calc(100% - 2rem)); margin: 0 auto; position: relative; z-index: 3; }

.shape-field {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .85;
}

/* continuous RF carriers across the ether */
.carrier-bands {
  position: fixed; inset: 0; z-index: 1; pointer-events: none; overflow: hidden;
}
.carrier {
  position: absolute; left: -10%; width: 120%; height: 72px;
  color: rgba(126,207,106,.28);
  animation: carrier-drift 22s linear infinite;
}
.carrier.c1 { top: 14%; color: rgba(126,207,106,.32); }
.carrier.c2 {
  top: 48%; color: rgba(212,176,86,.26);
  animation-duration: 28s; animation-direction: reverse;
}
.carrier.c3 {
  bottom: 16%; color: rgba(74,107,62,.34);
  animation-duration: 34s;
}
@keyframes carrier-drift {
  from { transform: translateX(0); }
  to { transform: translateX(-8.33%); }
}

/* header */
.site-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 0; position: sticky; top: 0; z-index: 40;
  background: linear-gradient(180deg, rgba(8,10,8,.95), rgba(8,10,8,.7) 70%, transparent);
  backdrop-filter: blur(8px);
}
.brand {
  display: flex; align-items: center; gap: .65rem;
  color: var(--text); font-family: var(--display); font-weight: 800;
  letter-spacing: .1em; text-transform: uppercase; font-size: .86rem;
}
.brand:hover { text-decoration: none; color: var(--amber); }
.mark {
  width: 2rem; height: 2rem; color: var(--amber);
  display: grid; place-items: center;
  filter: drop-shadow(0 0 12px var(--glow));
}
.mark svg { width: 100%; height: 100%; animation: mark-pulse 2.8s ease-in-out infinite; }
@keyframes mark-pulse {
  0%,100% { opacity: .7; transform: scale(.96); }
  50% { opacity: 1; transform: scale(1.05); }
}
.nav { display: flex; gap: .35rem; font-size: 1.15rem; }
.nav a {
  color: var(--muted); width: 2.2rem; height: 2.2rem;
  display: grid; place-items: center;
  border: 1px solid transparent; border-radius: 50%;
  transition: color .2s, border-color .2s, box-shadow .2s;
}
.nav a:hover, .nav a[aria-current="page"] {
  color: var(--amber); border-color: var(--line); text-decoration: none;
  box-shadow: 0 0 16px rgba(212,176,86,.2);
}

/* hero */
.hero { padding: 2.4rem 0 1.2rem; position: relative; }
.hero-carrier {
  display: block; width: min(420px, 92%); height: 36px;
  margin: .35rem 0 1rem;
  color: var(--phos);
  filter: drop-shadow(0 0 10px rgba(126,207,106,.25));
}
.hero-carrier .hc-a { animation: carrier-pulse 2.8s ease-in-out infinite; }
.hero-carrier .hc-b {
  color: var(--amber);
  animation: carrier-pulse 2.8s ease-in-out infinite .4s;
}
@keyframes carrier-pulse {
  0%,100% { opacity: .45; }
  50% { opacity: 1; }
}
.eyebrow {
  margin: 0 0 .9rem; position: relative;
  font-size: .68rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--phos);
}
h1 {
  margin: 0; position: relative;
  font-family: var(--display); font-weight: 800;
  font-size: clamp(2.6rem, 8vw, 4.2rem); line-height: .92;
  letter-spacing: -.03em; max-width: 9ch;
  background: linear-gradient(110deg, var(--text) 40%, var(--amber));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lede {
  margin: 1.1rem 0 0; max-width: 32rem; position: relative;
  color: var(--fog); font-size: .95rem;
}

/* sigils */
.sigil-row {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: .7rem;
  margin: 1.6rem 0 1.8rem;
}
.sigil {
  appearance: none; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: .45rem;
  padding: .9rem .5rem;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 999px 999px 18px 18px;
  color: var(--fog); font: 600 .62rem/1 var(--mono); letter-spacing: .16em;
  transition: color .2s, border-color .2s, transform .25s, box-shadow .25s;
}
.sigil svg { width: 42px; height: 42px; display: block; }
.sigil:hover, .sigil.is-hot {
  color: var(--amber); border-color: rgba(212,176,86,.5);
  box-shadow: 0 0 24px rgba(212,176,86,.15);
  transform: translateY(-3px);
}

/* traffic */
.traffic {
  display: flex; align-items: center; gap: .8rem;
  margin: 0 0 2rem; padding: .7rem .9rem;
  background: rgba(16,20,16,.8);
  border: 1px solid var(--line);
  border-radius: 999px;
}
.traffic-mark {
  width: 36px; height: 16px; flex: none; color: var(--phos);
}
.traffic-mark svg { width: 100%; height: 100%; display: block; }
.traffic-line { margin: 0; color: var(--fog); font-size: .84rem; transition: opacity .3s; }
.traffic-line.is-fade { opacity: 0; }

/* fauna */
.fauna { margin: 0 0 2.4rem; }
.fauna-head h2 {
  font-family: var(--display); font-weight: 800;
  font-size: 1.55rem; margin: 0 0 .5rem;
}
.fauna-hint { margin: 0 0 1.3rem; max-width: 34rem; color: var(--fog); font-size: .88rem; }
.fauna-stage {
  display: grid; gap: 1.2rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.beast {
  display: flex; flex-direction: column;
  margin: 0; padding: .85rem .85rem 0;
  border: 1px solid var(--line); background: var(--panel);
  border-radius: 28px 28px 12px 12px;
  cursor: pointer; color: inherit; font: inherit; text-align: left;
  transition: border-color .2s, transform .25s, box-shadow .25s;
}
.beast:hover, .beast:focus-visible {
  border-color: rgba(212,176,86,.5);
  outline: none;
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0,0,0,.4), 0 0 28px rgba(212,176,86,.12);
}
.beast-icon {
  position: relative;
  width: min(260px, 88%);
  aspect-ratio: 1;
  margin: .4rem auto .2rem;
  display: grid; place-items: center;
}
.beast-mark {
  width: 100%; height: 100%;
  object-fit: contain;
  display: block;
  transition: transform .35s ease, filter .35s ease;
  filter: drop-shadow(0 0 16px rgba(212,176,86,.12));
}
.beast-bird .beast-mark {
  filter: drop-shadow(0 0 18px rgba(126,207,106,.18));
}
.beast:hover .beast-mark,
.beast:focus-visible .beast-mark {
  transform: scale(1.03);
}
.beast.is-calling .beast-mark {
  animation: icon-tx 0.7s ease-in-out infinite alternate;
  filter: drop-shadow(0 0 28px rgba(126,207,106,.45));
}
@keyframes icon-tx {
  from { transform: scale(1); }
  to { transform: scale(1.03); }
}
.beast.is-open .beast-mark {
  filter: drop-shadow(0 0 26px rgba(212,176,86,.4));
}
.beast-cap {
  display: flex; align-items: center; gap: .5rem;
  padding: .7rem .15rem .85rem;
  border-top: 1px solid var(--line);
  font-size: .7rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted);
}
.cap-role { color: var(--amber); font-size: 1.1rem; letter-spacing: 0; }
.beast.is-calling { border-color: var(--phos); }
.beast.is-calling .cap-text { color: var(--phos); }
.beast.is-open { border-color: var(--amber); }
.beast.is-open .cap-text { color: var(--amber); }

/* Morse as wave blips */
.morse-board {
  margin: 0 0 1.2rem; padding: 1rem 1.1rem;
  background: #0a0c0a; border: 1px solid var(--line);
  border-radius: 20px;
}
.morse-board[hidden] { display: none !important; }
.morse-board.is-live { border-color: rgba(126,207,106,.4); box-shadow: 0 0 24px rgba(126,207,106,.1); }
.morse-stream {
  display: flex; flex-wrap: wrap; gap: .55rem .8rem; align-items: center;
  min-height: 2.4rem;
}
.m-letter {
  display: inline-flex; gap: .2rem; align-items: center;
  min-height: 1.6rem;
}
.m-letter i {
  display: block; font-style: normal; font-size: 0;
  background: transparent;
  border: 2px solid var(--amber);
  box-shadow: 0 0 10px var(--glow);
  animation: glyph-pop .15s ease-out;
}
.m-letter i.dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--amber);
}
.m-letter i.dash {
  width: 30px; height: 10px; border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--amber), transparent);
  border: none; height: 3px;
  box-shadow: 0 0 8px var(--glow);
}
@keyframes glyph-pop {
  from { transform: scale(1.5); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.voice-reveal {
  margin: 1.2rem 0 0; padding: 1.15rem 1.2rem;
  border: 1px solid rgba(212,176,86,.4);
  background: rgba(16,20,16,.9);
  position: relative; overflow: hidden;
  border-radius: 24px;
}
.voice-reveal[hidden] { display: none !important; }
.eq-frame {
  position: absolute; inset: 12px 16px; pointer-events: none;
  border: 1px dashed rgba(212,176,86,.18);
  border-radius: 12px;
  background:
    linear-gradient(90deg, transparent 0, transparent 48%, rgba(212,176,86,.08) 50%, transparent 52%) 0 50% / 100% 1px no-repeat;
}
.voice-hint { margin: 0 0 .5rem; font-size: .74rem; color: var(--muted); position: relative; }
.eq-math { overflow-x: auto; font-size: 1.25rem; position: relative; }
.eq-math .katex { color: var(--amber); }

/* riddles */
.riddles {
  display: grid; gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  margin: 0 0 2.5rem;
}
.riddle {
  position: relative; overflow: hidden;
  border: 1px solid var(--line); padding: 1.15rem 1.1rem 1.3rem;
  background: var(--panel); min-height: 8rem;
  border-radius: 22px;
  transition: transform .25s, border-color .25s, box-shadow .25s;
}
.r-wave {
  position: absolute; right: 8px; top: 28px;
  width: 110px; height: 36px; opacity: .28;
  color: var(--amber);
  pointer-events: none;
}
.r-fw .r-wave { color: var(--phos); }
.r-uas .r-wave { color: var(--olive); }
.riddle:hover {
  border-color: rgba(212,176,86,.45);
  transform: translateY(-2px);
  box-shadow: 0 0 24px rgba(212,176,86,.1);
}
.riddle .tag {
  position: absolute; top: .65rem; right: .7rem;
  font-size: .58rem; letter-spacing: .14em; color: var(--olive);
}
.riddle .q {
  font-family: var(--display); font-weight: 700; font-size: 1.05rem;
  margin: 0 0 .5rem; color: var(--fog);
}
.riddle .a {
  margin: 0; color: var(--muted); font-size: .84rem;
  filter: blur(3px); transition: filter .3s, color .3s;
}
.riddle:hover .a, .riddle:focus-within .a { filter: none; color: var(--text); }

.site-footer {
  margin-top: 1rem; padding: 1.3rem 0 2.6rem;
  border-top: 1px solid var(--line);
  color: var(--muted); font-size: .76rem;
}
.foot-id { margin: 0 0 .35rem; letter-spacing: .2em; color: var(--olive); font-weight: 600; }
.was { margin: 0; opacity: .8; }

@media (max-width: 700px) {
  .sigil-row { grid-template-columns: repeat(2, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .carrier, .hero-carrier .hc-a, .hero-carrier .hc-b, .mark svg,
  .beast.is-calling .beast-mark {
    animation: none !important;
  }
}
