/* 01Forge — Cyberpunk monochrome landing */

:root {
  --fg: #ffffff;
  --fg-dim: #9a9a9a;
  --fg-faint: #5a5a5a;
  --fg-ghost: #2a2a2a;
  --bg: #000000;
  --bg-tint: #080808;
  --panel: #0c0c0c;
  --line: #1e1e1e;
  --line-strong: #2e2e2e;
  --accent: #a6ff4d;
  --accent-warn: #ff3b3b;
  --f-mono: 'Geist Mono', ui-monospace, 'SF Mono', monospace;
  --f-display: 'Space Grotesk', ui-sans-serif, system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--f-mono);
  font-size: 14px;
  overflow-x: hidden;
}

::selection { background: var(--fg); color: var(--bg); }

body.inverted {
  --fg: #000000;
  --fg-dim: #4a4a4a;
  --fg-faint: #7a7a7a;
  --fg-ghost: #c0c0c0;
  --bg: #ffffff;
  --bg-tint: #f5f5f5;
  --panel: #f0f0f0;
  --line: #d0d0d0;
  --line-strong: #a0a0a0;
}

.mono { font-family: var(--f-mono); }
.display { font-family: var(--f-display); letter-spacing: -0.02em; }
.dim { color: var(--fg-dim); }
.faint { color: var(--fg-faint); }
.upper { text-transform: uppercase; letter-spacing: 0.12em; }

.app-root { position: relative; min-height: 100vh; isolation: isolate; }

.rain-layer {
  position: fixed; inset: 0; z-index: 0;
  pointer-events: none; opacity: 0.55;
}
.rain-canvas { width: 100%; height: 100%; display: block; }

.scanlines {
  position: fixed; inset: 0; z-index: 50; pointer-events: none;
  background-image: repeating-linear-gradient(
    0deg, rgba(255,255,255,0.08) 0px, rgba(255,255,255,0.08) 1px,
    transparent 1px, transparent 3px
  );
  mix-blend-mode: overlay;
}
.vignette {
  position: fixed; inset: 0; z-index: 49; pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 50%, rgba(0,0,0,0.45) 100%);
}
body.inverted .vignette {
  background: radial-gradient(ellipse at center, transparent 50%, rgba(255,255,255,0.45) 100%);
}
.noise {
  position: fixed; inset: 0; z-index: 51; pointer-events: none;
  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'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.6 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  mix-blend-mode: overlay;
}

.top-bar {
  position: sticky; top: 0; z-index: 30;
  display: grid; grid-template-columns: 1fr auto 1fr;
  align-items: center; gap: 24px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in oklab, var(--bg) 85%, transparent);
  backdrop-filter: blur(6px);
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em;
}
.top-bar__left, .top-bar__right { display: flex; align-items: center; gap: 10px; }
.top-bar__right { justify-content: flex-end; }
.top-bar__nav { display: flex; gap: 20px; }
.brand-mark {
  font-family: var(--f-display); font-weight: 700;
  font-size: 15px; letter-spacing: 0;
  padding: 2px 8px; border: 1px solid var(--fg); color: var(--fg);
}
.top-sep { color: var(--fg-ghost); }
.nav-link {
  color: var(--fg-dim); text-decoration: none;
  transition: color 0.15s; position: relative; padding: 4px 0;
}
.nav-link:hover { color: var(--fg); }
.nav-link:hover::before { content: '['; position: absolute; left: -10px; color: var(--accent); }
.nav-link:hover::after { content: ']'; position: absolute; right: -10px; color: var(--accent); }
.status-dot {
  width: 8px; height: 8px; background: var(--accent);
  border-radius: 50%; box-shadow: 0 0 8px var(--accent);
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: 0.3; } }

.bottom-ticker {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 30;
  display: flex; align-items: center;
  border-top: 1px solid var(--line);
  background: color-mix(in oklab, var(--bg) 90%, transparent);
  backdrop-filter: blur(6px);
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em;
  height: 36px;
}
.ticker-label {
  padding: 0 14px; background: var(--fg); color: var(--bg);
  height: 100%; display: flex; align-items: center; font-weight: 600;
}
.bottom-ticker .ticker-label:last-child { margin-left: auto; }
.ticker-track { flex: 1; overflow: hidden; position: relative; height: 100%; }
.ticker-inner {
  position: absolute; display: flex; gap: 36px;
  align-items: center; height: 100%; white-space: nowrap;
  animation: ticker 60s linear infinite; padding-left: 14px;
}
@keyframes ticker {
  from { transform: translateX(0); }
  to { transform: translateX(-33.33%); }
}
.ticker-item { color: var(--fg-dim); }
.ticker-bullet { color: var(--fg); }

.crosshair {
  position: fixed; inset: 0; z-index: 40;
  pointer-events: none; transition: opacity 0.2s;
  mix-blend-mode: difference;
}
.crosshair-h { position: absolute; left: 0; right: 0; height: 1px; background: rgba(255,255,255,0.25); }
.crosshair-v { position: absolute; top: 0; bottom: 0; width: 1px; background: rgba(255,255,255,0.25); }
.crosshair-box {
  position: absolute; width: 16px; height: 16px;
  border: 1px solid rgba(255,255,255,0.7);
  transform: translate(-50%, -50%);
}

.glitch { position: relative; display: inline-block; }
.glitch::before, .glitch::after {
  content: attr(data-text); position: absolute; inset: 0;
  pointer-events: none; opacity: 0;
}
.glitch:hover::before {
  opacity: 1; animation: glitch-a 0.6s steps(2) infinite;
  color: var(--fg); text-shadow: 1px 0 var(--accent);
  clip-path: inset(0 0 55% 0); transform: translate(-1px, 0);
}
.glitch:hover::after {
  opacity: 1; animation: glitch-b 0.6s steps(2) infinite;
  color: var(--fg); text-shadow: -1px 0 var(--fg);
  clip-path: inset(55% 0 0 0); transform: translate(1px, 0);
}
@keyframes glitch-a {
  0%,100% { transform: translate(-1px, 0); }
  20% { transform: translate(-2px, 1px); }
  40% { transform: translate(1px, -1px); }
  60% { transform: translate(-3px, 0); }
  80% { transform: translate(1px, 1px); }
}
@keyframes glitch-b {
  0%,100% { transform: translate(1px, 0); }
  20% { transform: translate(2px, -1px); }
  40% { transform: translate(-1px, 1px); }
  60% { transform: translate(3px, 0); }
  80% { transform: translate(-1px, -1px); }
}

.type-caret {
  display: inline-block; color: var(--accent);
  animation: blink 1s steps(2) infinite; margin-left: 2px;
}
.type-caret.done { color: var(--fg); }
@keyframes blink { 50% { opacity: 0; } }

.cta {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px;
  background: var(--fg); color: var(--bg);
  font-family: var(--f-mono); font-size: 12px;
  text-transform: uppercase; letter-spacing: 0.18em;
  text-decoration: none; font-weight: 600;
  border: 1px solid var(--fg); cursor: crosshair;
  position: relative; transition: all 0.15s;
}
.cta:hover {
  background: var(--bg); color: var(--fg);
  box-shadow: 4px 4px 0 var(--accent);
  transform: translate(-2px, -2px);
}
.cta .cta-arrow { transition: transform 0.15s; }
.cta:hover .cta-arrow { transform: translateX(4px); }

.cta--ghost {
  background: transparent; color: var(--fg);
  border: 1px solid var(--fg-dim);
}
.cta--ghost:hover {
  background: transparent; color: var(--fg);
  border-color: var(--fg); box-shadow: 4px 4px 0 var(--fg);
}

.panel {
  border: 1px solid var(--line);
  background: color-mix(in oklab, var(--bg) 70%, transparent);
  backdrop-filter: blur(4px);
  padding: 20px; position: relative;
}
.panel__label {
  position: absolute; top: -9px; left: 12px;
  padding: 0 8px; background: var(--bg);
  font-size: 10px; text-transform: uppercase;
  letter-spacing: 0.2em; color: var(--fg-dim);
}
.panel__label .dot {
  display: inline-block; width: 6px; height: 6px;
  background: var(--accent); border-radius: 50%;
  margin-right: 6px; vertical-align: middle;
}

.variation-stage { position: relative; z-index: 1; padding: 0 0 48px 0; }

.tweaks-panel {
  position: fixed; bottom: 52px; right: 16px; z-index: 100;
  width: 280px; background: var(--bg);
  border: 1px solid var(--fg); padding: 0;
  font-size: 11px;
  box-shadow: 6px 6px 0 rgba(166,255,77,0.3);
}
.tweaks-panel__header {
  background: var(--fg); color: var(--bg);
  padding: 8px 12px; display: flex;
  justify-content: space-between; align-items: center;
  text-transform: uppercase; letter-spacing: 0.2em; font-weight: 700;
}
.tweaks-panel__body { padding: 14px 14px 16px; display: flex; flex-direction: column; gap: 14px; }
.tweak-row { display: flex; flex-direction: column; gap: 6px; }
.tweak-label {
  color: var(--fg-dim); text-transform: uppercase;
  letter-spacing: 0.15em; font-size: 10px;
  display: flex; justify-content: space-between;
}
.tweak-val { color: var(--fg); }
.tweak-seg { display: flex; border: 1px solid var(--line); }
.tweak-seg button {
  flex: 1; padding: 6px 4px; background: transparent;
  border: none; color: var(--fg-dim);
  font-family: var(--f-mono); font-size: 10px;
  text-transform: uppercase; cursor: crosshair; letter-spacing: 0.1em;
}
.tweak-seg button + button { border-left: 1px solid var(--line); }
.tweak-seg button.active { background: var(--fg); color: var(--bg); }
.tweak-range { width: 100%; accent-color: var(--accent); }
.tweak-toggle {
  display: flex; justify-content: space-between; align-items: center;
  padding: 6px 0; border-top: 1px dashed var(--line);
}
.tweak-toggle button {
  background: transparent; border: 1px solid var(--fg-dim);
  color: var(--fg); padding: 4px 10px;
  font-family: var(--f-mono); font-size: 10px;
  text-transform: uppercase; letter-spacing: 0.1em; cursor: crosshair;
}
.tweak-toggle button.on { background: var(--fg); color: var(--bg); border-color: var(--fg); }

.variation-picker { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.variation-picker button {
  padding: 10px 0; background: transparent;
  border: 1px solid var(--line); color: var(--fg-dim);
  font-family: var(--f-mono); font-size: 11px;
  cursor: crosshair; font-weight: 600;
}
.variation-picker button.active {
  background: var(--fg); color: var(--bg); border-color: var(--fg);
}

.tweaks-launcher {
  position: fixed; bottom: 52px; right: 16px; z-index: 100;
  background: var(--bg); border: 1px solid var(--fg);
  color: var(--fg); padding: 8px 12px;
  font-family: var(--f-mono); font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.15em; cursor: crosshair;
}
.tweaks-launcher:hover { background: var(--fg); color: var(--bg); }

.tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border: 1px solid var(--line-strong);
  font-size: 10px; text-transform: uppercase;
  letter-spacing: 0.15em; color: var(--fg-dim);
}
.tag .dot {
  width: 5px; height: 5px; background: var(--accent);
  border-radius: 50%; box-shadow: 0 0 6px var(--accent);
}

.accent { color: var(--accent); }
.accent-box {
  display: inline-block; width: 8px; height: 8px;
  background: var(--accent); box-shadow: 0 0 8px var(--accent);
}

.ascii {
  font-family: var(--f-mono); font-size: 10px;
  line-height: 1.1; white-space: pre; color: var(--fg-dim);
}

.marquee-headline {
  display: flex; overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
}
.marquee-headline > div {
  display: flex; gap: 60px; white-space: nowrap;
  animation: ticker 40s linear infinite;
  font-family: var(--f-display); font-size: 22px;
  letter-spacing: -0.01em; padding-left: 60px;
}

.mega {
  font-family: var(--f-display); font-weight: 500;
  line-height: 0.9; letter-spacing: -0.04em;
}

@media (max-width: 880px) {
  .top-bar { grid-template-columns: 1fr auto; }
  .top-bar__right { display: none; }
}
