/* Substratum header styles extracted from substratum.html */
:root {
  --bg: #090707;
  --panel: #3b2f2f;
  --muted: #d6cfcf;
  --accent: #9b3f2a;
  --nlt-gold: #ffb000;
  --server-bg: #0a0a0a;
  --dust: #6b5a50;
  --terminal-green: #00ff88;
  --terminal-amber: #ffb000;
  --error-red: #ff4444;
  --dim-text: #666666;
  --font-mono: 'Courier New', 'IBM Plex Mono', 'SFMono-Regular', Menlo, monospace;
}

html,
body {
  height: 100%;
  margin: 0;
  font-family: var(--font-mono);
  background: radial-gradient(ellipse at 20% 10%, rgba(60, 20, 20, 0.08), transparent 10%), radial-gradient(ellipse at 80% 90%, rgba(30, 10, 10, 0.05), transparent 15%), linear-gradient(180deg, #070405 0%, #0b0606 30%, #0a0a0a 70%, #050505 100%), repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.01) 0px, transparent 1px, transparent 2px, rgba(255, 255, 255, 0.005) 3px);
  color: var(--muted);
  font-weight: 400;
  text-rendering: optimizeSpeed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Typography tweaks */
h1 {
  font-weight: 700;
  color: var(--muted);
  text-shadow: 0 0 18px rgba(0, 0, 0, 0.45), 0 0 6px rgba(155, 63, 42, 0.03);
  letter-spacing: 2px;
}

.lede {
  font-weight: 500;
}

.para {
  font-size: 0.98rem;
  color: rgba(191, 183, 183, 0.96);
}

/* blinking parentheses used for small UI emphasis */
.paren-blink {
  display: inline-block;
  color: var(--nlt-gold);
  text-shadow: 0 0 10px rgba(255,176,0,0.18);
  animation: parenBlink 1.1s steps(1,end) infinite;
  -webkit-font-smoothing: antialiased;
}

@keyframes parenBlink {
  0% { opacity: 1; }
  45% { opacity: 0; }
  60% { opacity: 1; }
  100% { opacity: 1; }
}

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

.meta,
footer {
  font-weight: 300;
  color: rgba(255, 255, 255, 0.42);
}

.card {
  z-index: 1;
  position: relative;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.06) 1px, transparent 1px), radial-gradient(circle, rgba(0, 0, 0, 0.06) 1px, transparent 1px);
  background-size: 40px 40px, 80px 80px;
  mix-blend-mode: overlay;
  opacity: 0.48;
  z-index: 10002;
}

.scanline-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 4;
  border-radius: inherit;
  background-image: repeating-linear-gradient(to bottom, rgba(255,255,255,0.12) 0px, rgba(255,255,255,0.12) 1px, transparent 1px, transparent 4px);
  background-size: 100% 4px;
  background-position: 0 0;
  opacity: 0.22;
  mix-blend-mode: overlay;
  animation: scan-jitter 4s steps(4,end) infinite, scan-flash 8s linear infinite;
  will-change: background-position, transform, opacity, filter;
}

.scanline-overlay::before,
.scanline-overlay::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.9;
  mix-blend-mode: screen;
  will-change: transform, clip-path, opacity, filter;
}

.scanline-overlay::before {
  background-image: linear-gradient(transparent 42%, rgba(255,150,50,0.18) 50%, transparent 58%);
  background-size: 100% 200px;
  background-position: 0 120%;
  animation: band-scroll 60s linear infinite, scan-glitch-a 6s steps(1,end) infinite;
  filter: contrast(1.06) brightness(1.02);
}

.scanline-overlay::after {
  background-image: linear-gradient(transparent 42%, rgba(255,120,40,0.06) 50%, transparent 58%);
  background-size: 100% 180px;
  background-position: 0 100%;
  animation: scan-glitch-b 7.3s steps(1,end) infinite;
  filter: hue-rotate(8deg) saturate(1.04);
}

@keyframes scan-glitch-a {
  0%, 82% { transform: translateX(0); clip-path: inset(0 0 0 0); opacity: 0.9; }
  83% { transform: translateX(-8px); clip-path: inset(18% 0 70% 0); opacity: 1; }
  84% { transform: translateX(6px); }
  86% { transform: translateX(-4px); clip-path: inset(60% 0 30% 0); }
  88% { transform: translateX(0); clip-path: inset(0 0 0 0); opacity: 0.9; }
}

@keyframes scan-glitch-b {
  0%, 78% { transform: translateX(0); clip-path: inset(0 0 0 0); opacity: 0.85; }
  79% { transform: translateX(4px); clip-path: inset(10% 0 80% 0); opacity: 0.95; }
  80% { transform: translateX(-6px); }
  82% { transform: translateX(0); clip-path: inset(0 0 0 0); opacity: 0.85; }
}

@keyframes band-scroll {
  0% { background-position: 0 120%; }
  100% { background-position: 0 -220%; }
}

.glitch-date {
  position: relative;
  display: inline-block;
  color: #fff3b0;
  font-weight: 800;
  text-shadow: 0 0 10px rgba(255,200,80,0.9);
  animation: date-glitch 3.2s steps(2,end) infinite;
}

.glitch-date::before,
.glitch-date::after {
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  pointer-events: none;
  opacity: 0.8;
  mix-blend-mode: screen;
}

.glitch-date::before { color: #ff6b6b; transform: translate(-2px,-1px); clip-path: inset(0 0 60% 0); animation: date-slice-a 3.6s infinite; }
.glitch-date::after { color: #69f0ff; transform: translate(2px,1px); clip-path: inset(40% 0 0 0); animation: date-slice-b 2.9s infinite; }

@keyframes date-glitch {
  0% { opacity: 1; transform: translateX(0); }
  6% { opacity: 0.3; transform: translateX(-6px); }
  10% { opacity: 1; transform: translateX(4px); }
  20% { transform: translateX(0); }
  100% { opacity: 1; transform: translateX(0); }
}

@keyframes date-slice-a {
  0% { transform: translate(-2px,-1px); clip-path: inset(0 0 60% 0); }
  14% { transform: translate(-18px,-6px); clip-path: inset(18% 0 50% 0); }
  18% { transform: translate(8px,4px); }
  24% { transform: translate(0,0); clip-path: inset(0 0 60% 0); }
  100% { transform: translate(-2px,-1px); }
}

@keyframes date-slice-b {
  0% { transform: translate(2px,1px); clip-path: inset(40% 0 0 0); }
  12% { transform: translate(12px,6px); clip-path: inset(60% 0 0 0); }
  16% { transform: translate(-8px,-4px); }
  22% { transform: translate(0,0); clip-path: inset(40% 0 0 0); }
  100% { transform: translate(2px,1px); }
}

.glitch-link {
  color: var(--terminal-amber);
  text-decoration: none;
  position: relative;
  font-weight: 700;
  transition: color 160ms ease;
}

.glitch-link::before,
.glitch-link::after {
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  pointer-events: none;
  opacity: 0;
  mix-blend-mode: screen;
}

.glitch-link:hover { color: #ffffff; }

.glitch-link:hover::before {
  content: attr(data-text, 'New Life Technologies');
  color: #ff6b6b;
  transform: translate(-6px,-2px);
  opacity: 0.9;
  animation: link-glitch-a 420ms steps(2,end) 3;
}

.glitch-link:hover::after {
  content: attr(data-text, 'New Life Technologies');
  color: #6fefff;
  transform: translate(6px,2px);
  opacity: 0.85;
  animation: link-glitch-b 520ms steps(2,end) 3;
}

@keyframes link-glitch-a {
  0% { transform: translate(-6px,-2px); }
  50% { transform: translate(8px,4px); }
  100% { transform: translate(-4px,1px); }
}

@keyframes link-glitch-b {
  0% { transform: translate(6px,2px); }
  40% { transform: translate(-10px,-6px); }
  100% { transform: translate(3px,2px); }
}

.power-name {
  display: inline-block;
  color: #ffd27a;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 4px;
  background: linear-gradient(180deg, rgba(255,215,122,0.06), rgba(0,0,0,0.04));
  box-shadow: 0 8px 30px rgba(0,0,0,0.6), 0 0 18px rgba(255,180,80,0.12) inset;
  position: relative;
  z-index: 6;
  transition: transform 180ms ease, filter 200ms ease;
}

.power-name::after {
  content: '';
  position: absolute;
  left: -6px;
  right: -6px;
  bottom: -6px;
  height: 8px;
  background: rgba(255,200,90,0.06);
  filter: blur(8px);
  z-index: -1;
  border-radius: 6px;
  opacity: 0.9;
}

.power-name:hover {
  transform: translateY(-3px) scale(1.03);
  filter: drop-shadow(0 10px 20px rgba(255,160,30,0.18));
}

@media (prefers-reduced-motion: reduce) {
  .power-name { transition: none; }
}

@keyframes scan-jitter{
  0% { transform: translateX(0) scaleX(1); filter: hue-rotate(0deg); }
  10%{ transform: translateX(-2px) scaleX(1.01); }
  20%{ transform: translateX(1px) scaleX(0.995); }
  30%{ transform: translateX(-1px); }
  40%{ transform: translateX(0); }
  60%{ transform: translateX(2px) scaleX(1.02); filter: hue-rotate(2deg) saturate(1.05); }
  80%{ transform: translateX(-1px); }
  100%{ transform: translateX(0); }
}

@keyframes scan-flash{
  0% { opacity: 0.5; }
  2% { opacity: 0.85; filter: contrast(1.12) saturate(1.1); }
  5% { opacity: 0.4; }
  20% { opacity: 0.6; }
  100% { opacity: 0.58; }
}

@media (prefers-reduced-motion: reduce) {
  .scanline-overlay {
    animation: none;
    opacity: 0.02;
  }

  body::after {
    opacity: 0.03;
  }
}

/* flicker removed for performance */


header {
  padding: 14px 20px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.9));
  border-bottom: 1px solid rgba(255, 255, 255, 0.02);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

nav a {
  color: var(--accent);
  text-decoration: none;
  margin-left: 14px;
  font-size: 0.9rem;
}

header nav a {
  color: #ffb000 !important;
}

#wrap {
  max-width: 980px;
  margin: 40px auto;
  padding: 28px;
}

.card {
  background: linear-gradient(180deg, rgba(59, 47, 47, 0.28), rgba(10, 6, 6, 0.65));
  border: 1px solid rgba(155, 63, 42, 0.12);
  outline: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 10px;
  padding: 28px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.8), 0 0 60px rgba(0, 0, 0, 0.12);
  position: relative;
  overflow: hidden;
}

h1 {
  font-family: 'Courier New', monospace;
  font-size: 2.2rem;
  margin: 0 0 12px 0;
  color: var(--muted);
  letter-spacing: 2px;
  position: relative;
}

h1::before,
h1::after {
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  pointer-events: none;
  opacity: 0.6;
}

h1::before {
  color: rgba(255, 80, 80, 0.06);
  transform: translate(2px, -2px);
  mix-blend-mode: screen;
}

h1::after {
  color: rgba(170, 120, 120, 0.06);
  transform: translate(-2px, 1px);
  mix-blend-mode: overlay;
}

@keyframes headerFlicker {
  0% { opacity: 1 }
  8% { opacity: 0.12 }
  12% { opacity: 1 }
  100% { opacity: 1 }
}

.broken-ad {
  display: inline-block;
  position: relative;
  font-weight: 700;
  letter-spacing: 0.5px;
  animation: ad-flicker 2.4s steps(4, end) infinite, ad-jitter 1.8s steps(2, end) infinite;
  color: #ffb000;
  text-shadow: 
    1px 1px 0 rgba(255, 0, 0, 0.4),
    -1px -1px 0 rgba(0, 200, 255, 0.3);
}

@keyframes ad-flicker {
  0% { opacity: 1; }
  4% { opacity: 0.3; }
  8% { opacity: 1; }
  12% { opacity: 0.5; }
  25% { opacity: 1; }
  100% { opacity: 1; }
}

@keyframes ad-jitter {
  0%, 100% { transform: translateX(0) translateY(0); }
  25% { transform: translateX(-3px) translateY(2px); }
  50% { transform: translateX(2px) translateY(-1px); }
  75% { transform: translateX(-1px) translateY(3px); }
}

@media (prefers-reduced-motion: reduce) {
  .broken-ad { animation: none; opacity: 0.6; }
}

.neon {
  color: #fff6b8;
  position: relative;
  display: inline-block;
  text-shadow: 0 0 6px rgba(255,230,140,0.95), 0 0 18px rgba(255,160,40,0.6), 0 0 36px rgba(255,90,10,0.28);
  mix-blend-mode: screen;
  animation: neon-flicker 3.6s linear infinite;
}

.neon::before,
.neon::after {
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  pointer-events: none;
  opacity: 0.75;
  mix-blend-mode: screen;
}

.neon::before {
  color: rgba(255,120,30,0.92);
  transform: translateX(-2px);
  filter: blur(2px);
  animation: neon-glitch-1 2.9s infinite linear;
}

.neon::after {
  color: rgba(255,245,200,0.98);
  transform: translateX(2px);
  filter: blur(1px);
  animation: neon-glitch-2 3.3s infinite linear;
}

@keyframes neon-flicker {
  0%,100% { opacity: 1; }
  6% { opacity: 0.4; }
  9% { opacity: 1; }
  30% { opacity: 0.92; }
  60% { opacity: 0.98; }
}

@keyframes neon-glitch-1 {
  0% { transform: translateX(-2px) translateY(0); opacity: 0.7; }
  8% { transform: translateX(-18px) translateY(-6px); opacity: 1; }
  12% { transform: translateX(6px) translateY(2px); }
  20% { transform: translateX(0) translateY(0); opacity: 0.75; }
  100% { transform: translateX(-2px); }
}

@keyframes neon-glitch-2 {
  0% { transform: translateX(2px) translateY(0); opacity: 0.7; }
  10% { transform: translateX(12px) translateY(4px); opacity: 1; }
  14% { transform: translateX(-6px) translateY(-3px); }
  24% { transform: translateX(0) translateY(0); opacity: 0.72; }
  100% { transform: translateX(2px); }
}

.lede {
  color: var(--muted);
  margin: 12px 0 18px 0;
  font-size: 1.0rem;
  line-height: 1.6;
}

.para {
  margin: 12px 0;
  color: var(--muted);
  line-height: 1.7;
  font-size: 0.96rem;
}

.muted-note {
  color: rgba(255, 255, 255, 0.45);
  font-style: italic;
  margin-top: 8px;
}

.card::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: linear-gradient(transparent 40%, rgba(0, 0, 0, 0.02) 41%), repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.02) 0 1px, transparent 1px 6px);
  pointer-events: none;
  mix-blend-mode: overlay;
  opacity: 0.36;
}

.glitch-ambient {
  position: absolute;
  right: -8%;
  top: -18%;
  width: 120%;
  height: 120%;
  background: radial-gradient(circle at 40% 30%, rgba(155, 63, 42, 0.03), transparent 6%), linear-gradient(90deg, rgba(59, 47, 47, 0.12), transparent 20%);
  transform: rotate(-6deg);
  pointer-events: none;
}

.meta {
  margin-top: 16px;
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.85rem;
}

.stamp {
  display: inline-block;
  border: 1px dashed rgba(255, 255, 255, 0.06);
  padding: 6px 10px;
  border-radius: 6px;
  color: rgba(255, 200, 200, 0.9);
  background: rgba(0, 0, 0, 0.04);
  font-weight: 700;
}

@media (prefers-reduced-motion: no-preference) {
  h1 {
    animation: headerFlicker 6s linear infinite;
  }

  .card::before {
    content: '';
    position: absolute;
    left: -10%;
    top: 30%;
    width: 30%;
    height: 110%;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.02), transparent 40%);
    transform: skewX(-12deg);
    opacity: 0.06;
    pointer-events: none;
  }
}

footer {
  margin: 36px auto 0;
  text-align: center;
  color: rgba(255, 255, 255, 0.12);
  font-size: 0.85rem;
}

#processing-target {
  margin-top: 12px;
  border: 1px dashed var(--nlt-gold);
  padding: 20px;
  color: var(--nlt-gold);
  background: rgba(255, 176, 0, 0.05);
}

.terminal-orange {
  color: var(--nlt-gold);
  font-weight: 800;
  font-size: 1.16rem;
  font-family: 'Courier New', Courier, monospace;
  letter-spacing: 1px;
  text-shadow: 0 0 12px rgba(255,176,0,0.28), 0 0 32px rgba(255,176,0,0.06);
  -webkit-font-smoothing: antialiased;
  display: inline-block;
}

/* footer-local tweaks */
.maroon-footer .maroon-home {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  align-items: center;
  text-decoration: none;
  color: var(--nlt-text) !important;
  font-weight: 700;
  letter-spacing: 2px;
}

.maroon-footer .maroon-home,
.maroon-footer .maroon-home * {
  color: var(--nlt-text) !important;
}
