/* AeThex Passport Portal — themed to match aethex-forge cyberpunk system
   tokens mirrored from AETHEX-ALL/aethex-forge/client/global.css */

:root {
  /* Canon AeThex tokens (HSL triplets) */
  --bg-h: 0 0% 2%;
  --fg-h: 0 0% 95%;
  --aethex-500: 180 100% 50%;
  --aethex-400: 180 100% 60%;
  --aethex-600: 180 100% 40%;
  --aethex-700: 180 100% 30%;
  --neon-cyan: 180 100% 50%;
  --neon-purple: 270 100% 65%;
  --neon-magenta: 300 100% 55%;
  --neon-green: 142 76% 45%;
  --neon-yellow: 50 100% 65%;

  /* Resolved usable colors */
  --bg: hsl(var(--bg-h));
  --bg-2: hsl(0 0% 4%);
  --panel: hsl(0 0% 5%);
  --panel-2: hsl(0 0% 8%);
  --line: hsl(180 100% 50% / 0.12);
  --line-2: hsl(180 100% 50% / 0.22);
  --ink-dim: hsl(0 0% 45%);
  --ink: hsl(0 0% 72%);
  --ink-bright: hsl(var(--fg-h));

  /* Trinity — mapped into AeThex palette.
     Foundation keeps its red (destructive/passion).
     Corporation = aethex cyan (infrastructure / primary).
     Labs = neon purple (frontier / R&D). */
  --foundation: hsl(340 100% 55%);
  --corporation: hsl(var(--aethex-500));
  --labs: hsl(var(--neon-purple));

  --cyber: hsl(var(--aethex-500));
  --success: hsl(var(--neon-green));
  --warn: hsl(var(--neon-yellow));
  --error: hsl(340 100% 55%);

  --accent: var(--cyber);
  --radius: 0px;
}

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

html, body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Electrolize', 'Source Code Pro', ui-monospace, monospace;
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  letter-spacing: 0.01em;
  /* Grid lattice — very subtle */
  background-image:
    linear-gradient(hsl(var(--aethex-500) / 0.025) 1px, transparent 1px),
    linear-gradient(90deg, hsl(var(--aethex-500) / 0.025) 1px, transparent 1px);
  background-size: 56px 56px;
  background-position: -1px -1px;
}

button { font-family: inherit; background: none; border: none; color: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }

/* Fonts */
.mono { font-family: 'Source Code Pro', 'JetBrains Mono', ui-monospace, monospace; font-feature-settings: "zero" 1; }
.display { font-family: 'Orbitron', 'Electrolize', monospace; letter-spacing: 0.02em; }
.serif { font-family: Georgia, 'Merriweather', serif; font-style: italic; }

.eyebrow {
  font-family: 'Source Code Pro', monospace;
  font-size: 10px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

/* Scanlines — denser, cyan-tinted */
.scanlines::before {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none; z-index: 1000;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    hsl(180 100% 50% / 0.025) 2px,
    hsl(180 100% 50% / 0.025) 3px
  );
  mix-blend-mode: screen;
}
.scanlines::after {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none; z-index: 1001;
  background: radial-gradient(ellipse at center, transparent 50%, rgba(0,0,0,0.55) 100%);
}

/* Grain (always on, subtle) */
.grain {
  position: fixed; inset: 0; pointer-events: none; z-index: 999;
  opacity: 0.04;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* Redaction */
.redact {
  display: inline-block;
  background: var(--ink-bright);
  color: transparent;
  padding: 0 3px;
  border-radius: 0;
  user-select: none;
  transition: all 0.25s;
  position: relative;
}
.redact.off { background: transparent; color: inherit; }
.redact::after {
  content: '';
  position: absolute; inset: 0;
  background: repeating-linear-gradient(45deg, rgba(0,0,0,0.18), rgba(0,0,0,0.18) 2px, transparent 2px, transparent 4px);
  pointer-events: none;
  transition: opacity 0.25s;
}
.redact.off::after { opacity: 0; }

/* Animations */
@keyframes slowPulse { 0%,100% { opacity: 0.65; } 50% { opacity: 1; } }
.pulse { animation: slowPulse 2.6s ease-in-out infinite; }

@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.fade-up { animation: fadeUp 0.4s ease-out both; }

@keyframes sweep { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }
.sweep-bar {
  position: absolute; top: 0; left: 0; height: 100%; width: 40%;
  background: linear-gradient(90deg, transparent, color-mix(in oklab, var(--accent) 55%, transparent), transparent);
  animation: sweep 2.4s linear infinite;
  pointer-events: none;
}

@keyframes blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
.caret { animation: blink 1.05s steps(1) infinite; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--line-2); }
::-webkit-scrollbar-thumb:hover { background: hsl(var(--aethex-500) / 0.4); }

::selection { background: hsl(var(--aethex-500) / 0.3); color: var(--ink-bright); }
