/* ════════════════════════
   VELTRIX — HERO SECTION
   ════════════════════════ */
#hero {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 700px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--obsidian);
}

/* Three.js Canvas */
#city-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

/* City gradient overlay */
.city-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(to right,
      rgba(9,9,11,0.92) 0%,
      rgba(9,9,11,0.7) 40%,
      rgba(9,9,11,0.2) 70%,
      rgba(9,9,11,0.05) 100%
    ),
    linear-gradient(to top,
      rgba(9,9,11,0.95) 0%,
      transparent 35%
    );
}

/* ── VELIX SCENE ── */
#velix-scene {
  position: absolute;
  right: 4%;
  bottom: 0;
  width: 55%;
  max-width: 820px;
  height: 100%;
  z-index: var(--z-velix);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
}

/* Desk environment: monitors + character side by side */
#velix-desk-env {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 0;
  width: 100%;
  padding-bottom: 48px;
}

/* ── MONITORS ── */
.monitor {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}
.monitor-frame {
  border: 1.5px solid rgba(245, 179, 1, 0.2);
  border-radius: 8px;
  overflow: hidden;
  background: var(--obsidian);
  box-shadow:
    0 0 0 1px rgba(245,179,1,0.08),
    0 20px 60px rgba(0,0,0,0.7),
    inset 0 0 40px rgba(245,179,1,0.03);
}
.monitor-neck {
  width: 4px;
  height: 40px;
  background: linear-gradient(to bottom, #2a2a30, #1a1a1f);
  border-radius: 2px;
}
.monitor-base {
  width: 60px;
  height: 8px;
  background: #1a1a1f;
  border-radius: 4px;
  margin-top: 2px;
}
.monitor-screen {
  padding: 10px;
  position: relative;
  overflow: hidden;
}

/* Scanline overlay on screen */
.screen-scanline {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.08) 2px,
    rgba(0,0,0,0.08) 3px
  );
  pointer-events: none;
  z-index: 2;
}

/* Left monitor — code */
.mon-left {
  transform: perspective(800px) rotateY(8deg);
  transform-origin: right center;
  opacity: 0.85;
}
.mon-left .monitor-frame {
  width: 180px;
  height: 130px;
}
.mon-left .monitor-screen {
  background: rgba(9, 9, 11, 0.95);
}

/* Code stream styling */
.code-stream {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cs-line {
  font-family: var(--font-mono);
  font-size: 0.48rem;
  color: rgba(245, 179, 1, 0.75);
  letter-spacing: 0.03em;
  white-space: nowrap;
  overflow: hidden;
  animation: code-type 4s steps(30, end) infinite;
}
.cs-line:nth-child(even) { color: rgba(245, 245, 245, 0.4); }
.cs-cursor {
  color: var(--amber) !important;
  animation: blink-cursor 0.8s step-end infinite;
}
@keyframes blink-cursor {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}
@keyframes code-type {
  0% { width: 0; }
  40%, 100% { width: 100%; }
}

/* Right monitor — data viz */
.mon-right {
  transform: perspective(800px) rotateY(-8deg);
  transform-origin: left center;
  opacity: 0.85;
}
.mon-right .monitor-frame {
  width: 160px;
  height: 120px;
}
.mon-right .monitor-screen {
  background: rgba(9, 9, 11, 0.95);
  display: flex;
  align-items: flex-end;
}
.data-viz {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 80px;
  padding: 4px 4px 2px;
  width: 100%;
}
.dv-bar {
  flex: 1;
  height: var(--h);
  background: linear-gradient(to top, var(--amber), rgba(245,179,1,0.3));
  border-radius: 2px 2px 0 0;
  animation: bar-anim 2s ease-in-out infinite alternate;
}
.dv-bar:nth-child(2) { animation-delay: 0.2s; }
.dv-bar:nth-child(3) { animation-delay: 0.4s; }
.dv-bar:nth-child(4) { animation-delay: 0.1s; }
.dv-bar:nth-child(5) { animation-delay: 0.5s; }
.dv-bar:nth-child(6) { animation-delay: 0.3s; }
.dv-bar:nth-child(7) { animation-delay: 0.15s; }
@keyframes bar-anim {
  from { opacity: 0.6; transform: scaleY(0.85); }
  to   { opacity: 1;   transform: scaleY(1); }
}

/* Desk surface */
#velix-desk-surface {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  width: 70%;
  height: 6px;
  background: linear-gradient(to right, rgba(23,23,28,0), var(--carbon), rgba(23,23,28,0));
  border-radius: 3px;
  z-index: 1;
}

/* Keyboard */
.desk-keyboard {
  position: absolute;
  bottom: -12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 3px;
  align-items: center;
}
.kb-row {
  display: flex;
  gap: 3px;
}
.kb-row span {
  display: block;
  width: 12px;
  height: 8px;
  background: #1a1a22;
  border: 1px solid rgba(245,179,1,0.12);
  border-radius: 2px;
  box-shadow: 0 1px 0 rgba(0,0,0,0.5);
  animation: kb-press 3s ease-in-out infinite;
}
.kb-row span:nth-child(3n) { animation-delay: 0.3s; }
.kb-row span:nth-child(3n+1) { animation-delay: 0.6s; }
@keyframes kb-press {
  0%, 90%, 100% { transform: translateY(0); opacity: 0.5; }
  95% { transform: translateY(1px); opacity: 0.9; background: rgba(245,179,1,0.15); }
}
.kb-spacebar {
  width: 60px;
  height: 8px;
  background: #1a1a22;
  border: 1px solid rgba(245,179,1,0.12);
  border-radius: 2px;
  box-shadow: 0 1px 0 rgba(0,0,0,0.5);
}

/* Velix ambient glow */
.velix-ambient {
  position: absolute;
  bottom: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 180px;
  height: 30px;
  background: radial-gradient(ellipse, rgba(245,179,1,0.15) 0%, transparent 70%);
  filter: blur(12px);
  pointer-events: none;
}

/* HUD panels */
.hud-panel {
  position: absolute;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px 10px;
  background: rgba(9,9,11,0.7);
  border: 1px solid var(--amber-border);
  border-radius: var(--r-sm);
  backdrop-filter: blur(8px);
}
.hud-tl { top: 20%; left: 4%; }
.hud-tr { top: 20%; right: 4%; }
.hud-k {
  font-family: var(--font-mono);
  font-size: 0.45rem;
  letter-spacing: 0.15em;
  color: rgba(245,245,245,0.4);
}
.hud-v {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  color: var(--ice-dim);
}
.hud-v.active { color: var(--amber); }

/* ── HERO CONTENT ── */
#hero-content {
  position: absolute;
  left: 6%;
  top: 50%;
  transform: translateY(-50%);
  z-index: var(--z-content);
  max-width: 560px;
}

.hero-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: var(--sp-6);
  opacity: 0;
  animation: fade-up var(--dur-slow) var(--ease-out) 0.2s forwards;
}
.badge-pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 8px var(--amber);
  animation: badge-pulse 2s ease-in-out infinite;
}
@keyframes badge-pulse {
  0%, 100% { box-shadow: 0 0 4px var(--amber); }
  50% { box-shadow: 0 0 14px var(--amber), 0 0 24px rgba(245,179,1,0.3); }
}
.badge-text {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  color: var(--amber);
}

/* Title */
.hero-title {
  display: flex;
  flex-direction: column;
  gap: 0.1em;
  margin-bottom: var(--sp-6);
}
.ht-line {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 4.5vw, 4rem);
  font-weight: 800;
  color: var(--ice);
  letter-spacing: -0.01em;
  line-height: 1.1;
  opacity: 0;
  transform: translateY(30px);
  animation: fade-up var(--dur-slow) var(--ease-out) forwards;
}
.ht-line:nth-child(1) { animation-delay: 0.4s; }
.ht-line:nth-child(2) { animation-delay: 0.55s; }
.ht-line:nth-child(3) { animation-delay: 0.7s; }
.ht-line:nth-child(4) { animation-delay: 0.85s; }
.ht-amber { color: var(--amber); }

/* Subtitle */
.hero-sub {
  font-size: 1.05rem;
  color: var(--ice-dim);
  line-height: 1.7;
  margin-bottom: var(--sp-8);
  opacity: 0;
  animation: fade-up var(--dur-slow) var(--ease-out) 1s forwards;
}

/* CTA Buttons */
.hero-ctas {
  display: flex;
  gap: var(--sp-4);
  flex-wrap: wrap;
  margin-bottom: var(--sp-10);
  opacity: 0;
  animation: fade-up var(--dur-slow) var(--ease-out) 1.1s forwards;
}
.cta-primary {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 14px 28px;
  background: var(--amber);
  color: var(--obsidian);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  border-radius: var(--r-sm);
  transition: transform var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-fast),
              background var(--dur-fast);
  overflow: hidden;
}
.cta-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(245,179,1,0.4);
  background: var(--amber-soft);
}
.cta-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(255,255,255,0.2) 0%, transparent 70%);
  opacity: 0;
  transition: opacity var(--dur-fast);
}
.cta-primary:hover .cta-glow { opacity: 1; }

.cta-secondary {
  display: inline-flex;
  align-items: center;
  padding: 14px 28px;
  border: 1px solid var(--amber-border);
  color: var(--ice-dim);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  border-radius: var(--r-sm);
  transition: border-color var(--dur-fast),
              color var(--dur-fast),
              background var(--dur-fast);
}
.cta-secondary:hover {
  border-color: var(--amber);
  color: var(--amber);
  background: var(--amber-dim);
}

/* Metrics */
.hero-metrics {
  display: flex;
  align-items: center;
  gap: var(--sp-6);
  opacity: 0;
  animation: fade-up var(--dur-slow) var(--ease-out) 1.25s forwards;
}
.hm {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.hm-n {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--amber);
}
.hm-l {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  color: rgba(245,245,245,0.4);
}
.hm-sep {
  width: 1px;
  height: 30px;
  background: var(--ice-border);
}

/* Scroll cue */
.scroll-cue {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: var(--z-content);
  opacity: 0;
  animation: fade-up var(--dur-slow) var(--ease-out) 1.5s forwards;
}
.scroll-cue-line {
  width: 1px;
  height: 50px;
  background: linear-gradient(to bottom, var(--amber), transparent);
  animation: scroll-line 2s ease-in-out infinite;
}
@keyframes scroll-line {
  0% { transform: scaleY(0); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
  51% { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}
.scroll-cue span {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.2em;
  color: rgba(245,245,245,0.3);
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

/* Ambient phrase */
.ambient-phrase {
  position: absolute;
  bottom: 24px;
  right: 5%;
  font-family: var(--font-display);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: rgba(245, 179, 1, 0.15);
  z-index: var(--z-content);
  white-space: nowrap;
  pointer-events: none;
}

/* ── KEYFRAMES ── */
@keyframes fade-up {
  to { opacity: 1; transform: translateY(0); }
}
