/* xity.dev — cyberpunk developer hub: layered depth, blur-focus, blob intrusions */

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

:root {
  --navy: #0a1428;
  --purple: #1a0a28;
  --teal: #0a2828;
  --magenta: #e040a0;
  --cyan: #40e0d0;
  --yellow: #e0d040;
  --text: #e0e8f0;
  --glitch-red: #ff2040;
}

html, body {
  background: var(--navy);
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  overflow-x: hidden;
  min-height: 100vh;
}

body {
  position: relative;
  background: linear-gradient(135deg, var(--navy), var(--purple), var(--teal), var(--navy));
  background-size: 400% 400%;
  animation: city-cycle 20s ease-in-out infinite;
}

@keyframes city-cycle {
  0%   { background-position: 0% 0%; }
  33%  { background-position: 50% 50%; }
  66%  { background-position: 100% 100%; }
  100% { background-position: 0% 0%; }
}

/* Glitch noise field */
.glitch-field {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.5;
  mix-blend-mode: screen;
}
.glitch-field svg { width: 100%; height: 100%; }

/* Blob layer */
.blob-layer {
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  overflow: hidden;
}
.blob {
  position: absolute;
  width: 50vmin;
  height: 50vmin;
  filter: blur(2px);
  mix-blend-mode: screen;
}
.blob-1 { top: 10%; left: -10%; animation: drift1 28s ease-in-out infinite; }
.blob-2 { top: 50%; right: -10%; animation: drift2 34s ease-in-out infinite; }
.blob-3 { bottom: -10%; left: 30%; animation: drift3 40s ease-in-out infinite; }

@keyframes drift1 {
  0%, 100% { transform: translate(0, 0) rotate(0deg) scale(1); }
  33%      { transform: translate(20vw, 10vh) rotate(120deg) scale(1.1); }
  66%      { transform: translate(40vw, 30vh) rotate(240deg) scale(0.9); }
}
@keyframes drift2 {
  0%, 100% { transform: translate(0, 0) rotate(0deg) scale(1); }
  50%      { transform: translate(-30vw, -20vh) rotate(180deg) scale(1.15); }
}
@keyframes drift3 {
  0%, 100% { transform: translate(0, 0) rotate(0deg) scale(1); }
  50%      { transform: translate(15vw, -30vh) rotate(-180deg) scale(1.05); }
}

/* Hero */
.hero {
  position: relative;
  z-index: 10;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 24px;
}

.hero-meta {
  font-family: 'Fira Code', ui-monospace, monospace;
  font-size: 12px;
  color: var(--cyan);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 32px;
  opacity: 0.85;
}

.hero-title {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: clamp(56px, 12vw, 180px);
  line-height: 0.95;
  color: var(--text);
  letter-spacing: -0.02em;
  text-shadow:
    -2px 0 var(--magenta),
     2px 0 var(--cyan);
}

.hero-sub {
  font-family: 'Inter', sans-serif;
  font-size: clamp(15px, 1.6vw, 22px);
  color: var(--text);
  margin-top: 28px;
  max-width: 600px;
  line-height: 1.55;
  opacity: 0.92;
}
.hero-sub em {
  font-style: italic;
  color: var(--magenta);
}

.blur-in {
  filter: blur(8px);
  opacity: 0.6;
  transition: filter 1.2s ease-out, opacity 1.2s ease-out;
}
.blur-in.sharp {
  filter: blur(0);
  opacity: 1;
}

.hero-strip {
  margin-top: 60px;
  display: flex;
  gap: 24px;
  align-items: center;
  font-family: 'Fira Code', ui-monospace, monospace;
  font-size: 12px;
  color: var(--text);
  opacity: 0.85;
}
.hero-strip em {
  font-style: normal;
  color: var(--yellow);
  margin-left: 4px;
}
.hero-strip .dot {
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--cyan);
  display: inline-block;
}

/* Stack of holographic panels */
.stack {
  position: relative;
  z-index: 10;
  max-width: 760px;
  margin: 0 auto;
  padding: 80px 24px 120px;
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.panel {
  background: rgba(10, 20, 40, 0.55);
  border: 1px solid rgba(64, 224, 208, 0.22);
  border-radius: 6px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: clamp(22px, 4vw, 44px);
  position: relative;
}

.panel-tag {
  font-family: 'Fira Code', ui-monospace, monospace;
  font-size: 11px;
  color: var(--magenta);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.panel-h {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: clamp(26px, 3.6vw, 44px);
  line-height: 1.1;
  margin-bottom: 18px;
  color: var(--text);
  letter-spacing: -0.01em;
}
.panel-h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: clamp(20px, 2.4vw, 30px);
  margin-bottom: 14px;
  color: var(--cyan);
}

.panel p { margin-bottom: 1em; opacity: 0.92; }
.panel p strong { color: var(--yellow); }

.principles, .api {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
}
.principles li, .api li {
  padding: 12px 0;
  border-bottom: 1px solid rgba(224, 232, 240, 0.08);
  font-size: 15.5px;
}
.principles li:last-child, .api li:last-child { border-bottom: none; }
.principles strong { color: var(--cyan); margin-right: 8px; }
.api code {
  font-family: 'Fira Code', ui-monospace, monospace;
  background: rgba(64, 224, 208, 0.10);
  color: var(--cyan);
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 13.5px;
}

.code-panel {
  background: rgba(10, 12, 24, 0.78);
  border-color: rgba(224, 64, 160, 0.24);
}
.code-panel pre {
  font-family: 'Fira Code', ui-monospace, monospace;
  font-size: 14px;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--text);
}
.code-panel .kw { color: var(--magenta); }
.code-panel .str { color: var(--yellow); }
.code-panel .num { color: var(--cyan); }
.code-panel .bool { color: var(--cyan); }
.code-panel .fn { color: var(--cyan); }

/* Reveal */
.reveal {
  opacity: 0;
  filter: blur(8px);
  transform: translateY(12px);
  transition: opacity 0.9s ease-out, filter 1.2s ease-out, transform 0.9s ease-out;
}
.reveal.in {
  opacity: 1;
  filter: blur(0);
  transform: translateY(0);
}

/* Terminal footer */
.terminal {
  position: relative;
  z-index: 10;
  background: #060912;
  color: #d8e0e8;
  font-family: 'Fira Code', ui-monospace, monospace;
  font-size: 13px;
  border-top: 1px solid rgba(64, 224, 208, 0.30);
}
.term-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: #0a0e1a;
}
.term-bar .dot {
  width: 11px; height: 11px; border-radius: 50%;
}
.term-bar .red { background: var(--glitch-red); }
.term-bar .yel { background: var(--yellow); }
.term-bar .grn { background: #40e090; }
.term-title {
  margin-left: 14px;
  font-size: 12px;
  color: rgba(216, 224, 232, 0.7);
  letter-spacing: 0.08em;
}
.term-body {
  padding: 22px 18px;
  white-space: pre-wrap;
  line-height: 1.85;
}
.term-body .ts { color: rgba(216, 224, 232, 0.55); }
.term-body .ok   { color: #40e090; }
.term-body .warn { color: var(--yellow); }
.term-body .info { color: var(--cyan); }
.term-body .err  { color: var(--glitch-red); }

/* Glitch flash */
.glitching {
  animation: glitch-flash 200ms steps(2);
}
@keyframes glitch-flash {
  0%   { transform: translate(0, 0); text-shadow: -2px 0 var(--magenta), 2px 0 var(--cyan); }
  25%  { transform: translate(-2px, 1px); text-shadow: -3px 0 var(--magenta), 3px 0 var(--cyan); }
  50%  { transform: translate(2px, -1px); text-shadow:  3px 0 var(--magenta), -3px 0 var(--cyan); }
  100% { transform: translate(0, 0); text-shadow: -2px 0 var(--magenta), 2px 0 var(--cyan); }
}
