:root {
  --bg: #050816;
  --bg-2: #0B1020;
  --bg-3: #141B2D;
  --accent: #4F8CFF;
  --accent-2: #7C5CFF;
  --success: #00D084;
  --ink: #F7F9FC;
  --muted: #9CA7B8;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
}

[x-cloak] { display: none !important; }

/* ---------- Glassmorphism ---------- */
.glass {
  background: rgba(20, 27, 45, 0.45);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* ---------- Hover lift for cards ---------- */
.card-hover {
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.35s ease,
              background-color 0.35s ease;
}
.card-hover:hover {
  transform: translateY(-4px);
  border-color: rgba(79, 140, 255, 0.35);
  background-color: rgba(20, 27, 45, 0.65);
}

/* ---------- Numbered flow markers ---------- */
.flow-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  font-weight: 500;
  min-width: 1.6rem;
}

/* ---------- Animated background grid ---------- */
.grid-bg {
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 20%, black 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 20%, black 20%, transparent 75%);
  animation: grid-drift 30s linear infinite;
}

@keyframes grid-drift {
  0%   { background-position: 0 0; }
  100% { background-position: 64px 64px; }
}

/* ---------- Glowing ambient orbs ---------- */
.orb {
  position: absolute;
  border-radius: 9999px;
  filter: blur(90px);
  opacity: 0.35;
  pointer-events: none;
  z-index: 0;
}
.orb-1 {
  top: -80px;
  left: -60px;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, var(--accent), transparent 70%);
  animation: float-a 14s ease-in-out infinite;
}
.orb-2 {
  top: 120px;
  right: -100px;
  width: 460px;
  height: 460px;
  background: radial-gradient(circle, var(--accent-2), transparent 70%);
  animation: float-b 16s ease-in-out infinite;
}
.orb-3 {
  top: 50%;
  left: 50%;
  width: 500px;
  height: 500px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, var(--accent), transparent 70%);
  opacity: 0.18;
}

@keyframes float-a {
  0%, 100% { transform: translate(0, 0); }
  50%      { transform: translate(30px, 40px); }
}
@keyframes float-b {
  0%, 100% { transform: translate(0, 0); }
  50%      { transform: translate(-40px, 20px); }
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--bg);
}
::-webkit-scrollbar-thumb {
  background: var(--bg-3);
  border-radius: 8px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .grid-bg, .orb-1, .orb-2 { animation: none; }
  .card-hover { transition: none; }
}

/* ---------- Focus visibility ---------- */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}
