/* ═══════════════════════════════════════════
   GLOBAL.CSS — NIGHT CITY ANIME VAULT
   Palette:
     --void:    #0a0a0f
     --deep:    #0f0f1a
     --red:     #ff003c
     --cyan:    #00f5ff
     --gold:    #f5c518
     --purple:  #1a0a2e
     --dimtext: #6b7a9a
     --muted:   #2a2a3e
═══════════════════════════════════════════ */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --void: #0a0a0f;
  --deep: #0f0f1a;
  --red: #ff003c;
  --cyan: #00f5ff;
  --gold: #f5c518;
  --purple: #1a0a2e;
  --dimtext: #6b7a9a;
  --muted: #2a2a3e;
  --white: #e8e8f0;
  --font-display: 'Orbitron', monospace;
  --font-mono: 'Share Tech Mono', monospace;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  background-color: var(--void);
  color: var(--white);
  font-family: var(--font-mono);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* ── Scanlines overlay ───────────────────── */
.scanlines {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: repeating-linear-gradient(
    to bottom,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.08) 2px,
    rgba(0, 0, 0, 0.08) 4px
  );
}

/* ── Noise texture ───────────────────────── */
.noise {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 9998;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 128px 128px;
}

/* ── Header ──────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 15, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-line {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--red), var(--cyan), transparent);
  opacity: 0.6;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.1rem;
  letter-spacing: 0.2em;
}

.logo-bracket {
  color: var(--red);
}

.logo-text {
  color: var(--white);
  position: relative;
}

.header-nav {
  font-size: 0.75rem;
  color: var(--dimtext);
  letter-spacing: 0.1em;
}

/* ── Footer ──────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--muted);
  margin-top: 4rem;
  padding: 1.5rem 2rem;
}

.footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.72rem;
  color: var(--dimtext);
  letter-spacing: 0.08em;
}

.footer-inner a {
  color: var(--cyan);
  text-decoration: none;
}

.footer-inner a:hover {
  text-decoration: underline;
}

.footer-sep {
  color: var(--muted);
}

/* ── Glitch text ─────────────────────────── */
.glitch-text {
  position: relative;
  display: inline-block;
}

.glitch-text::before,
.glitch-text::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.glitch-text::before {
  color: var(--red);
  animation: glitch-before 3.5s infinite;
  clip-path: polygon(0 30%, 100% 30%, 100% 50%, 0 50%);
}

.glitch-text::after {
  color: var(--cyan);
  animation: glitch-after 3.5s infinite;
  clip-path: polygon(0 55%, 100% 55%, 100% 75%, 0 75%);
}

@keyframes glitch-before {
  0%, 90%, 100% { transform: translate(0); opacity: 0; }
  92% { transform: translate(-4px, 2px); opacity: 1; }
  95% { transform: translate(3px, -1px); opacity: 1; }
  97% { transform: translate(0); opacity: 0; }
}

@keyframes glitch-after {
  0%, 88%, 100% { transform: translate(0); opacity: 0; }
  90% { transform: translate(4px, -2px); opacity: 1; }
  93% { transform: translate(-2px, 1px); opacity: 1; }
  96% { transform: translate(0); opacity: 0; }
}

/* ── Pulse skeleton ──────────────────────── */
.pulse {
  animation: pulse-anim 1.5s ease-in-out infinite;
}

@keyframes pulse-anim {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.7; }
}

/* ── Scrollbar ───────────────────────────── */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: var(--void);
}
::-webkit-scrollbar-thumb {
  background: var(--red);
  border-radius: 3px;
}

/* ── Utilities ───────────────────────────── */
.accent-red { color: var(--red); }
.accent-cyan { color: var(--cyan); }
.accent-gold { color: var(--gold); }
