/* FUTURE DIGITAL WASTELAND // salvaged node on swarthos.online
   Shared look for wasteland.html and the artifact pages. */
:root {
  --void: #07090a;
  --panel: #0d1210;
  --phos: #9dff6a;      /* phosphor green */
  --phos-dim: #5f9b45;
  --text: #c6f5b0;
  --rust: #c8632b;
  --amber: #ffb43a;
  --cyan: #00f0ff;
  --mag: #ff00aa;
  --ash: #6d7a70;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--void);
  color: var(--text);
  font-family: 'VT323', monospace;
  font-size: 1.4rem;
  line-height: 1.45;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}
/* grain + scanlines + vignette */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 9998;
  background: repeating-linear-gradient(to bottom, transparent 0, transparent 2px, rgba(157,255,106,0.05) 2px, rgba(157,255,106,0.05) 4px);
}
body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 9997;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,0.75) 100%);
}
.grain {
  position: fixed; inset: -50%; pointer-events: none; z-index: 9996; opacity: 0.09;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: grain 0.9s steps(5) infinite;
}
@keyframes grain { 0%{transform:translate(0,0)} 20%{transform:translate(-3%,2%)} 40%{transform:translate(2%,-3%)} 60%{transform:translate(-2%,-1%)} 80%{transform:translate(3%,3%)} 100%{transform:translate(0,0)} }
/* rolling interference band */
.band { position: fixed; left: 0; right: 0; height: 90px; top: -100px; pointer-events: none; z-index: 9995;
  background: linear-gradient(transparent, rgba(157,255,106,0.06), transparent); animation: band 9s linear infinite; }
@keyframes band { 0%{top:-100px} 100%{top:110%} }

.wrap { max-width: 1060px; margin: 0 auto; padding: 26px 18px 60px; position: relative; z-index: 1; }
a { color: var(--cyan); }

/* top crumbs */
.crumbs { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 18px; font-size: 1.1rem; letter-spacing: 3px; color: var(--ash); margin-bottom: 26px; }
.crumbs a { color: var(--phos-dim); text-decoration: none; border-bottom: 1px dashed rgba(157,255,106,0.4); }
.crumbs a:hover { color: var(--mag); border-color: var(--mag); }

/* boot log */
.boot { font-size: 1.15rem; color: var(--phos-dim); letter-spacing: 1px; min-height: 7.4em; margin-bottom: 18px; white-space: pre-wrap; }
.boot .ok { color: var(--phos); }
.boot .warn { color: var(--amber); }
.boot .err { color: var(--rust); }
.cursor { display: inline-block; width: 0.6em; background: var(--phos); color: var(--phos); animation: blinkc 1s steps(1) infinite; }
@keyframes blinkc { 50% { opacity: 0; } }

/* title */
.title { position: relative; text-align: center; font-weight: normal; font-size: 4.4rem; line-height: 0.95; letter-spacing: 8px; color: var(--phos);
  text-shadow: 0 0 6px rgba(157,255,106,0.8), 0 0 22px rgba(157,255,106,0.35); margin: 6px 0 10px; }
.title .torn { display: inline-block; }
.glitch { position: relative; display: inline-block; }
.glitch::before, .glitch::after { content: attr(data-text); position: absolute; left: 0; top: 0; width: 100%; overflow: hidden; pointer-events: none; }
.glitch::before { color: var(--mag); transform: translate(-3px, 0); clip-path: inset(0 0 72% 0); opacity: 0.75; animation: g1 3.4s infinite steps(1); }
.glitch::after { color: var(--cyan); transform: translate(3px, 0); clip-path: inset(64% 0 0 0); opacity: 0.75; animation: g2 2.7s infinite steps(1); }
@keyframes g1 { 0%{clip-path:inset(0 0 72% 0)} 18%{clip-path:inset(40% 0 44% 0)} 37%{clip-path:inset(80% 0 4% 0)} 55%{clip-path:inset(12% 0 70% 0)} 74%{clip-path:inset(55% 0 30% 0)} 90%{clip-path:inset(0 0 100% 0)} }
@keyframes g2 { 0%{clip-path:inset(64% 0 0 0)} 22%{clip-path:inset(20% 0 66% 0)} 41%{clip-path:inset(90% 0 2% 0)} 63%{clip-path:inset(33% 0 50% 0)} 85%{clip-path:inset(100% 0 0 0)} }
.subtitle { text-align: center; color: var(--amber); letter-spacing: 5px; font-size: 1.35rem; text-shadow: 0 0 10px rgba(255,180,58,0.45); }
.origin { text-align: center; color: var(--ash); font-size: 1.05rem; letter-spacing: 3px; margin-top: 8px; }

/* section heads */
.sec { margin-top: 56px; }
.sec-head { display: flex; align-items: baseline; gap: 14px; border-bottom: 1px dashed rgba(157,255,106,0.45); padding-bottom: 6px; margin-bottom: 18px; }
.sec-head h2 { font-weight: normal; font-size: 2.05rem; letter-spacing: 6px; color: var(--phos); text-shadow: 0 0 10px rgba(157,255,106,0.45); }
.sec-head .code { color: var(--rust); letter-spacing: 3px; font-size: 1.1rem; margin-left: auto; white-space: nowrap; }
.prose p { margin-bottom: 12px; color: var(--text); font-size: 1.35rem; }

/* salvaged panel: torn corners */
.panel { position: relative; background: linear-gradient(160deg, #101814, #0a0f0c); border: 1px solid rgba(157,255,106,0.35);
  clip-path: polygon(0 0, 92% 0, 100% 14px, 100% 100%, 22px 100%, 0 calc(100% - 22px)); padding: 20px 22px; }
.panel::before { content: ""; position: absolute; top: 0; right: 0; width: 8%; height: 14px; background: linear-gradient(135deg, transparent 50%, rgba(157,255,106,0.35) 50%, rgba(157,255,106,0.35) 54%, transparent 54%); }

/* repository grid */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.artifact { display: flex; flex-direction: column; text-decoration: none; color: inherit; transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s; }
.artifact:hover { transform: translateY(-4px); border-color: var(--cyan); box-shadow: 0 0 28px rgba(0,240,255,0.18); }
.artifact .screen { position: relative; height: 170px; margin: -20px -22px 16px; overflow: hidden; background: #050806; border-bottom: 1px solid rgba(157,255,106,0.25); }
.artifact .screen img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(0.55) sepia(0.25) hue-rotate(50deg) contrast(1.1) brightness(0.8); transition: filter 0.3s; }
.artifact:hover .screen img { filter: none; }
.artifact .screen::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(to bottom, transparent 0 2px, rgba(0,0,0,0.35) 2px 3px); pointer-events: none; }
.artifact .num { color: var(--rust); letter-spacing: 4px; font-size: 1.1rem; }
.artifact h3 { font-weight: normal; font-size: 1.85rem; letter-spacing: 3px; color: var(--cyan); line-height: 1.1; margin: 2px 0 8px; text-shadow: 0 0 10px rgba(0,240,255,0.35); }
.artifact p { color: var(--text); font-size: 1.25rem; flex: 1; }
.meter { margin-top: 14px; font-size: 1.05rem; letter-spacing: 2px; color: var(--ash); }
.meter .bar { height: 6px; margin-top: 4px; background: rgba(157,255,106,0.12); position: relative; overflow: hidden; }
.meter .bar i { position: absolute; left: 0; top: 0; bottom: 0; background: repeating-linear-gradient(90deg, var(--phos) 0 6px, transparent 6px 8px); }
.enter { margin-top: 14px; color: var(--amber); letter-spacing: 4px; font-size: 1.2rem; }
.artifact:hover .enter { color: var(--mag); }
.slot { display: flex; align-items: center; justify-content: center; min-height: 260px; text-align: center; color: var(--ash); letter-spacing: 4px; font-size: 1.25rem;
  border: 1px dashed rgba(109,122,112,0.6); background: repeating-linear-gradient(45deg, rgba(109,122,112,0.05) 0 10px, transparent 10px 20px); }
.slot b { display: block; color: var(--rust); font-weight: normal; font-size: 1.5rem; }

/* fake screen art for artifacts without a picture */
.wave { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 4px; padding: 0 20px; }
.wave span { width: 5px; background: var(--phos); box-shadow: 0 0 8px var(--phos); animation: wv 1.3s ease-in-out infinite; opacity: 0.85; }
@keyframes wv { 0%,100% { transform: scaleY(0.35); } 50% { transform: scaleY(1); } }
.nosignal { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; flex-direction: column;
  background: repeating-linear-gradient(90deg, #2a2a2a 0 12%, #c8c8c8 12% 24%, #b0a400 24% 36%, #00a0a8 36% 48%, #00a000 48% 60%, #a000a0 60% 72%, #a00000 72% 84%, #0000a0 84% 100%);
  filter: saturate(0.5) brightness(0.55); }
.nosignal em { font-style: normal; background: #000; color: var(--phos); padding: 2px 12px; letter-spacing: 5px; font-size: 1.5rem; }

/* status lines from the originals */
.status { margin: 26px 0 0; padding-top: 10px; border-top: 1px dashed rgba(109,122,112,0.6); text-align: center; color: var(--ash); letter-spacing: 2px; font-size: 1.1rem; }

/* artifact page header */
.art-head { text-align: center; margin-bottom: 10px; }
.art-head .num { color: var(--rust); letter-spacing: 6px; font-size: 1.25rem; }
.art-head h1 { font-weight: normal; font-size: 3.6rem; letter-spacing: 6px; line-height: 1; color: var(--phos); text-shadow: 0 0 8px rgba(157,255,106,0.7), 0 0 24px rgba(157,255,106,0.3); margin: 6px 0 10px; }
.art-head .tag { color: var(--amber); letter-spacing: 3px; font-size: 1.35rem; }

/* audio */
.player { max-width: 760px; margin: 26px auto 0; }
.player .label { color: var(--phos); letter-spacing: 3px; font-size: 1.4rem; }
.player .scope { position: relative; height: 90px; margin: 14px 0; background: #040705; border: 1px solid rgba(157,255,106,0.25); overflow: hidden; }
.player audio { width: 100%; display: block; filter: sepia(0.4) hue-rotate(50deg); }
.player .fine { color: var(--ash); font-size: 1.15rem; margin-top: 12px; }
.player .dl { display: inline-block; margin-top: 12px; color: var(--amber); text-decoration: none; letter-spacing: 3px; border-bottom: 1px dashed rgba(255,180,58,0.6); font-size: 1.15rem; }
.player .dl:hover { color: var(--mag); border-color: var(--mag); }
.wave.idle span { animation-play-state: paused; }

/* video */
.vid { margin-top: 30px; }
.vid h2 { font-weight: normal; font-size: 1.75rem; letter-spacing: 2px; color: var(--cyan); line-height: 1.15; text-shadow: 0 0 10px rgba(0,240,255,0.3); }
.vid p { margin: 6px 0 14px; color: var(--text); font-size: 1.3rem; }
.vid .tape { color: var(--rust); letter-spacing: 4px; font-size: 1.1rem; }
.frame16 { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; border: 1px solid rgba(157,255,106,0.3); }
.frame16 iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* collections */
.log { margin-top: 34px; }
.log .stamp { color: var(--rust); letter-spacing: 4px; font-size: 1.1rem; }
.log h2 { font-weight: normal; font-size: 1.9rem; letter-spacing: 3px; color: var(--cyan); line-height: 1.1; margin: 2px 0 14px; text-shadow: 0 0 10px rgba(0,240,255,0.3); }
.log .pic { display: block; margin: 0 auto 16px; max-width: 640px; border: 1px solid rgba(157,255,106,0.3); background: #000; position: relative; }
.log .pic img { display: block; width: 100%; height: auto; max-height: 620px; object-fit: contain; }
.log .pic:hover { border-color: var(--cyan); box-shadow: 0 0 22px rgba(0,240,255,0.2); }
.log p { margin-bottom: 12px; font-size: 1.32rem; color: var(--text); }
.log .tap { text-align: center; color: var(--ash); font-size: 1rem; letter-spacing: 2px; margin: -10px 0 14px; }

/* artifact nav */
.art-nav { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 46px; font-size: 1.2rem; letter-spacing: 3px; }
.art-nav a { color: var(--phos-dim); text-decoration: none; border-bottom: 1px dashed rgba(157,255,106,0.4); }
.art-nav a:hover { color: var(--mag); border-color: var(--mag); }
.core { text-align: center; margin-top: 40px; }
.core a { display: inline-block; color: var(--cyan); text-decoration: none; font-size: 1.55rem; letter-spacing: 4px; padding: 10px 26px; border: 2px solid var(--cyan); }
.core a:hover { background: rgba(0,240,255,0.12); box-shadow: 0 0 20px rgba(0,240,255,0.5); }

.foot { margin-top: 60px; text-align: center; color: var(--ash); font-size: 1.1rem; letter-spacing: 2px; }
.foot a { color: var(--phos-dim); text-decoration: none; border-bottom: 1px dashed rgba(157,255,106,0.4); }
.foot a:hover { color: var(--mag); border-color: var(--mag); }
.foot .copy { margin-top: 10px; }

/* random flicker added by script */
.flick { animation: flick 0.25s steps(2) 1; }
@keyframes flick { 0% { opacity: 1; transform: translateX(0); } 50% { opacity: 0.55; transform: translateX(3px); filter: hue-rotate(90deg); } 100% { opacity: 1; transform: translateX(0); } }

@media (max-width: 640px) {
  body { font-size: 1.3rem; }
  .title { font-size: 2.75rem; letter-spacing: 4px; }
  .art-head h1 { font-size: 2.5rem; letter-spacing: 3px; }
  .sec-head { flex-wrap: wrap; }
  .sec-head h2 { font-size: 1.7rem; letter-spacing: 4px; }
  .sec-head .code { margin-left: 0; }
  .grid { grid-template-columns: 1fr; }
  .boot { font-size: 1.02rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
