/* warx.org — apex shell
   Palette: ink #05070d / panel #0a0f1a / cyan #4df3ff / green #3dffa0 / amber #ffb84d */

:root {
  --bg: #05070d;
  --bg2: #0a0f1a;
  --line: rgba(77, 243, 255, 0.14);
  --cyan: #4df3ff;
  --green: #3dffa0;
  --amber: #ffb84d;
  --text: #c8d6e8;
  --dim: #5a6b85;
  --f-pixel: "Press Start 2P", "Courier New", monospace;
  --f-term: "VT323", "Consolas", "SFMono-Regular", monospace;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  min-height: 100vh;
  background:
    radial-gradient(1100px 600px at 50% -10%, rgba(77, 243, 255, 0.09), transparent 65%),
    radial-gradient(900px 500px at 85% 110%, rgba(255, 184, 77, 0.05), transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg2) 100%);
  color: var(--text);
  font-family: var(--f-term);
  font-size: 20px;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* ---- CRT layers ---- */
.noise {
  position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: 0.5;
  background-image: repeating-linear-gradient(0deg,
    rgba(255,0,0,0.028) 0 1px, rgba(0,255,0,0.028) 1px 2px, rgba(0,0,255,0.028) 2px 3px);
  mix-blend-mode: screen;
}
.scanlines {
  position: fixed; inset: 0; z-index: 2; pointer-events: none;
  background: repeating-linear-gradient(180deg, rgba(0,0,0,0.22) 0 1px, transparent 1px 3px);
  opacity: 0.5;
}
.sweep {
  position: fixed; left: 0; right: 0; top: -40%; height: 34%; z-index: 3;
  pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(77,243,255,0.045), transparent);
  animation: sweep 9s linear infinite;
}
@keyframes sweep { 0% { top: -40%; } 100% { top: 110%; } }

/* ---- top bar ---- */
.topbar {
  position: relative; z-index: 5;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px clamp(18px, 4vw, 44px);
  border-bottom: 1px solid var(--line);
}
.brand {
  color: var(--cyan); text-decoration: none; font-size: 22px;
  text-shadow: 0 0 12px rgba(77,243,255,0.55);
}
.brand-dot, .wm-dot { color: var(--amber); }
.uptime { color: var(--dim); font-size: 20px; letter-spacing: 0.06em; }
.uptime::before { content: "▲ "; color: var(--green); }

/* ---- hero / terminal ---- */
.hero {
  position: relative; z-index: 5;
  flex: 1;
  display: flex; align-items: center; justify-content: center;
  padding: clamp(24px, 5vh, 64px) 16px;
}
.terminal {
  width: min(980px, 94vw);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(6, 10, 18, 0.82);
  box-shadow:
    0 0 0 1px rgba(0,0,0,0.6),
    0 24px 80px rgba(0,0,0,0.55),
    0 0 60px rgba(77,243,255,0.07);
  overflow: hidden;
  backdrop-filter: blur(2px);
}
.term-bar {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,0.02);
}
.dots { display: flex; gap: 7px; }
.dots i { width: 11px; height: 11px; border-radius: 50%; background: #26303f; }
.dots i:nth-child(1) { background: rgba(255,90,80,0.85); }
.dots i:nth-child(2) { background: rgba(255,184,77,0.85); }
.dots i:nth-child(3) { background: rgba(61,255,160,0.85); }
.term-title { color: var(--dim); font-size: 18px; flex: 1; }
.term-tag {
  color: var(--dim); font-size: 16px; border: 1px solid var(--line);
  padding: 2px 8px; border-radius: 4px;
}

.term-body { padding: clamp(22px, 4vw, 44px) clamp(18px, 5vw, 56px) clamp(26px, 4vw, 48px); }

.prompt-line { font-size: 19px; color: var(--dim); margin-bottom: clamp(20px, 4vw, 34px); }
.prompt { color: var(--green); }
.prompt::after { content: " "; }
.cmd { color: var(--text); }

.wordmark {
  margin: 0;
  font-family: var(--f-pixel);
  font-weight: 400;
  font-size: clamp(30px, 8.2vw, 76px);
  line-height: 1.15;
  color: #eaffff;
  letter-spacing: 0.02em;
  text-shadow:
    0 0 8px rgba(77,243,255,0.9),
    0 0 28px rgba(77,243,255,0.55),
    0 0 70px rgba(77,243,255,0.3),
    0 2px 0 rgba(0,0,0,0.8);
  word-break: break-word;
}
.wm-dot { color: var(--amber); text-shadow: 0 0 10px rgba(255,184,77,0.8); }

.type-line {
  margin: clamp(14px, 3vw, 24px) 0 0;
  font-size: clamp(19px, 2.6vw, 24px);
  color: var(--dim);
  min-height: 1.4em;
}
.type-line::after { content: "▊"; color: var(--cyan); margin-left: 4px; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.divider {
  display: flex; align-items: center; gap: 14px;
  margin: clamp(22px, 4vw, 34px) 0 clamp(10px, 2vw, 16px);
  color: var(--dim); font-size: 16px;
}
.divider .seg {
  flex: 1; height: 2px;
  background: linear-gradient(90deg, transparent, var(--line));
}
.divider .seg.right { background: linear-gradient(90deg, var(--line), transparent); }
.divider .led {
  width: 7px; height: 7px; flex: none;
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan);
  animation: ledpulse 1.6s ease-in-out infinite;
}
@keyframes ledpulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }

.uplink-label {
  color: var(--amber); font-size: 18px; letter-spacing: 0.14em;
  text-transform: uppercase; margin-bottom: 12px;
}

.nodes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
}
.node {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 16px 9px 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(77,243,255,0.03);
  color: var(--text); text-decoration: none;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.node b { font-weight: 400; font-size: 20px; color: #e6f7ff; }
.node span { color: var(--dim); font-size: 16px; }
.node:hover, .node:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(77,243,255,0.55);
  background: rgba(77,243,255,0.08);
  box-shadow: 0 0 18px rgba(77,243,255,0.25);
  outline: none;
}
.node .dot {
  width: 8px; height: 8px; border-radius: 50%; flex: none;
}
.dot.ok { background: var(--green); box-shadow: 0 0 8px var(--green); animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

.hint { margin-top: 16px; color: var(--dim); font-size: 17px; }

/* ---- footer ---- */
.foot {
  position: relative; z-index: 5;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 16px 20px 22px;
  border-top: 1px solid var(--line);
  color: var(--dim); font-size: 17px;
}
.foot-sep { opacity: 0.5; }

/* ---- scrollbar ---- */
html { scrollbar-color: #1b2740 var(--bg); }
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #1b2740; border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: #2a3a5e; }

/* ---- reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  .sweep { animation: none; display: none; }
  .dot.ok, .led, .type-line::after { animation: none; }
  .node { transition: none; }
  .node:hover { transform: none; }
}
