/* Career Lab Command Center Motion Pack
   No CDN. No framework. GPU-friendly CSS + vanilla JS.
*/

:root {
  --motion-ease: cubic-bezier(.22, 1, .36, 1);
  --motion-fast: 180ms;
  --motion-med: 520ms;
  --motion-slow: 900ms;
  --spotlight-x: 50%;
  --spotlight-y: 0%;
}

html {
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(720px circle at var(--spotlight-x) var(--spotlight-y), rgba(96, 165, 250, .20), transparent 42%),
    radial-gradient(900px circle at 20% 12%, rgba(14, 165, 233, .12), transparent 38%),
    radial-gradient(900px circle at 84% 8%, rgba(34, 197, 94, .09), transparent 42%);
  opacity: .95;
  transition: opacity 240ms ease;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(148, 163, 184, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, .035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at 50% 0%, black, transparent 72%);
}

.page-shell {
  position: relative;
  z-index: 1;
}

.hero,
.panel,
.summary-card,
.service-card,
.row,
.log-box {
  position: relative;
  isolation: isolate;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  pointer-events: none;
  background: linear-gradient(120deg, transparent 8%, rgba(147, 197, 253, .72), rgba(34, 197, 94, .28), transparent 88%);
  background-size: 220% 220%;
  opacity: .35;
  animation: heroBorderSweep 7s var(--motion-ease) infinite;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
}

.hero::after {
  content: "";
  position: absolute;
  left: 5%;
  right: 5%;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(147, 197, 253, .8), transparent);
  opacity: .75;
  animation: scanline 5.8s ease-in-out infinite;
}

@keyframes heroBorderSweep {
  0%, 100% { background-position: 0% 50%; opacity: .28; }
  50% { background-position: 100% 50%; opacity: .55; }
}

@keyframes scanline {
  0%, 100% { transform: translateY(0); opacity: .15; }
  50% { transform: translateY(86px); opacity: .85; }
}

.motion-ready .hero,
.motion-ready .summary-card,
.motion-ready .panel,
.motion-ready .log-box,
.motion-ready .footer {
  opacity: 0;
  transform: translateY(18px) scale(.985);
  filter: blur(7px);
}

.motion-ready .in-view {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
  transition:
    opacity var(--motion-med) var(--motion-ease),
    transform var(--motion-med) var(--motion-ease),
    filter var(--motion-med) var(--motion-ease),
    border-color var(--motion-fast) ease,
    background var(--motion-fast) ease,
    box-shadow var(--motion-fast) ease;
  transition-delay: var(--stagger, 0ms);
}

.tilt-ready {
  transform-style: preserve-3d;
}

.tilt-ready:hover {
  transform:
    perspective(1000px)
    rotateX(var(--rx, 0deg))
    rotateY(var(--ry, 0deg))
    translateY(-4px)
    scale(1.01);
  border-color: rgba(147, 197, 253, .42);
  box-shadow:
    0 20px 70px rgba(0, 0, 0, .35),
    0 0 0 1px rgba(147, 197, 253, .08),
    0 0 34px rgba(59, 130, 246, .12);
}

.tilt-ready::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  background:
    radial-gradient(360px circle at var(--mx, 50%) var(--my, 50%), rgba(147, 197, 253, .15), transparent 45%);
  transition: opacity 180ms ease;
}

.tilt-ready:hover::before {
  opacity: 1;
}

.status-pill.good {
  position: relative;
  box-shadow: 0 0 28px rgba(34, 197, 94, .12);
}

.status-pill.good::after {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 999px;
  border: 1px solid rgba(134, 239, 172, .32);
  animation: statusPulse 2.7s ease-out infinite;
}

@keyframes statusPulse {
  0% { transform: scale(.96); opacity: .72; }
  70% { transform: scale(1.18); opacity: 0; }
  100% { transform: scale(1.18); opacity: 0; }
}

.badge.good {
  box-shadow: 0 0 18px rgba(34, 197, 94, .08);
}

.service-card {
  min-height: 112px;
}

.service-card .service-name,
.row-title,
.summary-card strong {
  text-shadow: 0 0 24px rgba(147, 197, 253, .08);
}

.summary-card strong {
  transition: opacity 220ms ease, transform 220ms ease;
}

.summary-card strong.counting {
  opacity: .72;
  transform: translateY(-1px);
}

.motion-dock {
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 50;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px;
  border: 1px solid rgba(148, 163, 184, .20);
  border-radius: 999px;
  background: rgba(2, 6, 23, .58);
  backdrop-filter: blur(18px);
  box-shadow:
    0 20px 70px rgba(0, 0, 0, .36),
    inset 0 1px 0 rgba(255, 255, 255, .05);
}

.motion-dock button {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 999px;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  cursor: pointer;
  color: #dbeafe;
  background: rgba(15, 23, 42, .72);
  font-weight: 850;
  font-size: .78rem;
  transition:
    transform 170ms var(--motion-ease),
    background 170ms ease,
    border-color 170ms ease,
    color 170ms ease;
}

.motion-dock button:hover,
.motion-dock button:focus-visible {
  transform: translateY(-4px) scale(1.06);
  background: rgba(37, 99, 235, .32);
  border-color: rgba(147, 197, 253, .36);
  color: white;
  outline: none;
}

.motion-dock .dock-cmd {
  color: #86efac;
}

.cmdk {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  place-items: start center;
  padding-top: 13vh;
  background: rgba(2, 6, 23, .55);
  backdrop-filter: blur(14px);
}

.cmdk.open {
  display: grid;
  animation: cmdBackdrop 160ms ease both;
}

.cmdk-dialog {
  width: min(760px, calc(100vw - 28px));
  max-height: min(680px, 76vh);
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, .24);
  border-radius: 26px;
  background:
    radial-gradient(circle at 20% 0%, rgba(59, 130, 246, .18), transparent 34%),
    rgba(15, 23, 42, .94);
  box-shadow:
    0 32px 110px rgba(0, 0, 0, .55),
    inset 0 1px 0 rgba(255, 255, 255, .06);
  animation: cmdEnter 220ms var(--motion-ease) both;
}

.cmdk-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid rgba(148, 163, 184, .16);
}

.cmdk-head span {
  color: #93c5fd;
  font-weight: 950;
}

.cmdk input {
  flex: 1;
  width: 100%;
  border: 0;
  outline: 0;
  color: #e5e7eb;
  background: transparent;
  font-size: 1rem;
  font-weight: 700;
}

.cmdk input::placeholder {
  color: rgba(148, 163, 184, .78);
}

.cmdk-list {
  display: grid;
  gap: 8px;
  max-height: 530px;
  overflow: auto;
  padding: 12px;
}

.cmdk-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 13px;
  border: 1px solid rgba(148, 163, 184, .14);
  border-radius: 17px;
  color: inherit;
  text-decoration: none;
  background: rgba(2, 6, 23, .35);
  transition: transform 150ms var(--motion-ease), background 150ms ease, border-color 150ms ease;
}

.cmdk-item:hover,
.cmdk-item:focus-visible {
  transform: translateY(-2px);
  background: rgba(37, 99, 235, .18);
  border-color: rgba(147, 197, 253, .34);
  outline: none;
}

.cmdk-title {
  font-weight: 900;
}

.cmdk-desc {
  margin-top: 4px;
  color: #94a3b8;
  font-size: .86rem;
}

.cmdk-key {
  color: #86efac;
  font-size: .78rem;
  font-weight: 900;
}

.cmdk-empty {
  padding: 22px;
  color: #94a3b8;
  text-align: center;
}

@keyframes cmdBackdrop {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes cmdEnter {
  from { opacity: 0; transform: translateY(16px) scale(.97); filter: blur(8px); }
  to { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

.log-box {
  border-color: rgba(147, 197, 253, .16);
  box-shadow: inset 0 0 42px rgba(15, 23, 42, .68);
}

@media (max-width: 760px) {
  .motion-dock {
    left: 12px;
    right: 12px;
    bottom: 12px;
    transform: none;
    justify-content: space-between;
    overflow-x: auto;
    border-radius: 22px;
  }

  .motion-dock button {
    min-width: 40px;
    padding: 0 10px;
  }

  .motion-dock button span {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .001ms !important;
  }

  .motion-ready .hero,
  .motion-ready .summary-card,
  .motion-ready .panel,
  .motion-ready .service-card,
  .motion-ready .row,
  .motion-ready .log-box,
  .motion-ready .footer {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }

  .motion-dock {
    backdrop-filter: none;
  }
}


/* Dynamic content visibility guard */
.motion-ready .service-card,
.motion-ready .row {
  opacity: 1;
  filter: none;
}

