/* ============================================================
   KIVOLVE — DESIGN TOKENS
   Display: Space Grotesk (technical, geometric — fits a
   career/tech platform without borrowing generic SaaS type).
   Body: Inter (neutral, highly legible at small sizes).
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=Inter:wght@400;500;600;700&display=swap');

:root[data-theme="dark"] {
  --bg: #0a0e1a;
  --bg-raise: #0d1220;
  --nav: rgba(10, 14, 26, 0.82);
  --card: #10162a;
  --card-raise: #171f38;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #c7cede;
  --text-dim: #7c869e;
  --text-bright: #f4f6fb;
  --shadow-1: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 12px 30px -14px rgba(0, 0, 0, 0.6);
  --shadow-2: 0 1px 0 rgba(255, 255, 255, 0.06) inset, 0 24px 60px -20px rgba(0, 0, 0, 0.75);
}

:root[data-theme="light"] {
  --bg: #f4f5fa;
  --bg-raise: #ffffff;
  --nav: rgba(244, 245, 250, 0.82);
  --card: #ffffff;
  --card-raise: #ffffff;
  --line: rgba(10, 14, 26, 0.08);
  --line-strong: rgba(10, 14, 26, 0.14);
  --text: #454e64;
  --text-dim: #8991a6;
  --text-bright: #10162a;
  --shadow-1: 0 1px 0 rgba(255, 255, 255, 0.6) inset, 0 12px 24px -16px rgba(16, 22, 42, 0.18);
  --shadow-2: 0 1px 0 rgba(255, 255, 255, 0.7) inset, 0 24px 48px -20px rgba(16, 22, 42, 0.22);
}

:root {
  --signal: #3654ff;
  --signal-dim: #2842d6;
  --signal-tint: #93a4ff;
  --ember: #ff7a45;
  --good: #35c98f;
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 32px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  transition: background-color 0.25s ease, color 0.25s ease;
}

h1, h2, h3, .display {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  color: var(--text-bright);
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.bg-nav { background-color: var(--nav); border-color: var(--line); }
.bg-card { background-color: var(--card); }
.bg-card-raise { background-color: var(--card-raise); }
.text-main { color: var(--text); }
.text-dim { color: var(--text-dim); }
.text-bright { color: var(--text-bright); }
.border-line { border-color: var(--line); }
.hidden { display: none !important; }

.nav-tab {
  opacity: 0.55;
  color: var(--text);
  transition: opacity 0.2s ease, color 0.2s ease;
  cursor: pointer;
  background: none;
  border: none;
  font: inherit;
}
.nav-tab.active { opacity: 1; color: var(--signal); }
.nav-tab:hover { opacity: 0.85; }

.btn-primary {
  background: var(--signal);
  color: #fff;
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: transform 0.15s ease, background 0.15s ease;
  box-shadow: 0 10px 24px -10px rgba(54, 84, 255, 0.55);
}
.btn-primary:hover { background: var(--signal-dim); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--text-bright);
  border-radius: var(--radius-sm);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.btn-ghost:hover { border-color: var(--signal); background: rgba(54, 84, 255, 0.08); }

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  align-items: center;
}
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
}

.pipeline-preview {
  background: linear-gradient(165deg, var(--card-raise), var(--card));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-2);
  position: relative;
  overflow: hidden;
}
.pipeline-preview::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -30%;
  width: 60%;
  height: 80%;
  background: radial-gradient(circle, rgba(54, 84, 255, 0.28), transparent 70%);
  pointer-events: none;
}

.job-row {
  border-bottom: 1px solid var(--line);
  padding: 1.5rem 0;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1.25rem;
  align-items: center;
  transition: background 0.15s ease;
}
.job-row:first-child { padding-top: 0; }
.job-row:last-child { border-bottom: none; }
.job-row:hover { background: rgba(54, 84, 255, 0.04); }
@media (max-width: 700px) {
  .job-row { grid-template-columns: 1fr; }
}

.job-mark {
  width: 52px; height: 52px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  background: var(--card-raise);
  border: 1px solid var(--line);
  color: var(--text-bright);
  flex-shrink: 0;
}

.visa-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
}
.visa-domestic { color: var(--good); border-color: rgba(53, 201, 143, 0.35); background: rgba(53, 201, 143, 0.08); }
.visa-sponsor { color: var(--signal-tint); border-color: rgba(54, 84, 255, 0.35); background: rgba(54, 84, 255, 0.08); }
.visa-relocation { color: var(--ember); border-color: rgba(255, 122, 69, 0.35); background: rgba(255, 122, 69, 0.08); }

.track {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.5rem;
  position: relative;
  margin: 2.5rem 0 3rem;
}
.track::before {
  content: '';
  position: absolute;
  top: 17px; left: 5%; right: 5%;
  height: 2px;
  background: var(--line-strong);
  z-index: 0;
}
.track-stage { position: relative; z-index: 1; text-align: center; }
.track-dot {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--card-raise);
  border: 2px solid var(--line-strong);
  margin: 0 auto 0.6rem;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text-dim);
  transition: all 0.2s ease;
}
.track-stage.filled .track-dot { background: var(--signal); border-color: var(--signal); color: #fff; }
.track-stage-label { font-size: 0.72rem; font-weight: 600; color: var(--text-dim); }
.track-stage.filled .track-stage-label { color: var(--text-bright); }
@media (max-width: 700px) {
  .track { grid-template-columns: 1fr; gap: 1.5rem; }
  .track::before { display: none; }
}

.journey-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 3px solid var(--signal);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow-1);
}

#ai-fab {
  position: fixed;
  bottom: 1.5rem; right: 1.5rem;
  z-index: 150;
  width: 58px; height: 58px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 14px 30px -10px rgba(54, 84, 255, 0.65);
  display: flex; align-items: center; justify-content: center;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease;
}
#ai-fab:hover { transform: scale(1.06); }

#ai-drawer {
  position: fixed;
  bottom: 0; right: 0;
  width: 100%; max-width: 420px;
  height: 100%; max-height: 640px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  z-index: 190;
  display: flex; flex-direction: column;
  box-shadow: var(--shadow-2);
  transition: transform 0.25s ease;
}
@media (min-width: 700px) {
  #ai-drawer { bottom: 1.5rem; right: 1.5rem; height: 600px; border-radius: var(--radius-lg); }
}

.chat-bubble-user {
  background: var(--signal);
  color: #fff;
  border-radius: 16px 16px 4px 16px;
  padding: 0.7rem 1rem;
  max-width: 82%;
  margin-left: auto;
}
.chat-bubble-ai {
  background: var(--card-raise);
  border: 1px solid var(--line);
  color: var(--text-bright);
  border-radius: 16px 16px 16px 4px;
  padding: 0.7rem 1rem;
  max-width: 82%;
}

.typing-dot { animation: pulse 1.2s infinite ease-in-out; }
.typing-dot:nth-child(2) { animation-delay: 0.15s; }
.typing-dot:nth-child(3) { animation-delay: 0.3s; }
@keyframes pulse { 0%, 60%, 100% { opacity: 0.3; } 30% { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
  html { scroll-behavior: auto; }
}

.scrollbar-hide::-webkit-scrollbar { display: none; }
.scrollbar-hide { scrollbar-width: none; }

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
.hero-anim { animation: rise 0.6s cubic-bezier(0.16, 1, 0.3, 1) both; }

:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; }