/* ═══════════════════════════════════════════════════════════════════════════
   RECRUIT SECTION — CIA/KGB Cinematic Onboarding
   Broken UFO: OSINT Hollywood-grade briefing
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── Search bar 15% bigger ─── */
.hb-search__wrapper--xl {
  min-height: 56px;
}

.hb-search__input--xl {
  padding: 1rem 0 1rem 0 !important;
  font-size: 0.9rem !important;
}

.hb-search__btn--xl {
  padding: 0.72rem 1.2rem;
  font-size: 0.68rem;
}

.hb-search__wrapper--xl .hb-search__icon-wrap {
  width: 52px;
}

.hb-search__wrapper--xl .hb-search__icon-wrap svg {
  width: 19px;
  height: 19px;
}

/* When scramble is typing inside, give it the green monospace look */
.hb-search__input--xl:not(:focus) {
  color: rgba(34, 197, 94, 0.7) !important;
}
.hb-search__input--xl:focus {
  color: var(--hb-text-80, rgba(255,255,255,0.8)) !important;
}

/* ─── Recruit container ─── */
.bufo-recruit {
  position: relative;
  margin-top: 2rem;
  padding: 0;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(34, 197, 94, 0.12);
  overflow: hidden;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* Scanline effect */
.bufo-recruit__scanline {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, rgba(34, 197, 94, 0.25) 30%, rgba(34, 197, 94, 0.5) 50%, rgba(34, 197, 94, 0.25) 70%, transparent 100%);
  animation: recruit-scan 6s ease-in-out infinite;
  z-index: 5;
  pointer-events: none;
  filter: blur(0.5px);
}

@keyframes recruit-scan {
  0%   { top: -2px; opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}

/* Corner brackets */
.bufo-recruit__bracket {
  position: absolute;
  width: 16px;
  height: 16px;
  z-index: 3;
  pointer-events: none;
}

.bufo-recruit__bracket::before,
.bufo-recruit__bracket::after {
  content: '';
  position: absolute;
  background: rgba(34, 197, 94, 0.35);
}

.bufo-recruit__bracket--tl { top: 0; left: 0; }
.bufo-recruit__bracket--tl::before { top: 0; left: 0; width: 16px; height: 1px; }
.bufo-recruit__bracket--tl::after  { top: 0; left: 0; width: 1px; height: 16px; }

.bufo-recruit__bracket--tr { top: 0; right: 0; }
.bufo-recruit__bracket--tr::before { top: 0; right: 0; width: 16px; height: 1px; }
.bufo-recruit__bracket--tr::after  { top: 0; right: 0; width: 1px; height: 16px; }

.bufo-recruit__bracket--bl { bottom: 0; left: 0; }
.bufo-recruit__bracket--bl::before { bottom: 0; left: 0; width: 16px; height: 1px; }
.bufo-recruit__bracket--bl::after  { bottom: 0; left: 0; width: 1px; height: 16px; }

.bufo-recruit__bracket--br { bottom: 0; right: 0; }
.bufo-recruit__bracket--br::before { bottom: 0; right: 0; width: 16px; height: 1px; }
.bufo-recruit__bracket--br::after  { bottom: 0; right: 0; width: 1px; height: 16px; }

/* ─── Top bar ─── */
.bufo-recruit__topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1.25rem;
  background: rgba(0, 0, 0, 0.5);
  border-bottom: 1px solid rgba(34, 197, 94, 0.1);
}

.bufo-recruit__topbar-left {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.bufo-recruit__signal-icon {
  position: relative;
  width: 8px;
  height: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bufo-recruit__signal-dot {
  width: 6px;
  height: 6px;
  background: #22c55e;
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.6);
  animation: recruit-pulse 2s ease-in-out infinite;
}

@keyframes recruit-pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 6px rgba(34,197,94,0.5); }
  50%      { opacity: 0.6; box-shadow: 0 0 12px rgba(34,197,94,0.8); }
}

.bufo-recruit__topbar-label {
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(34, 197, 94, 0.85);
}

.bufo-recruit__topbar-sep {
  color: rgba(255, 255, 255, 0.12);
  font-size: 0.6rem;
}

.bufo-recruit__topbar-class {
  font-family: var(--font-mono, monospace);
  font-size: 0.55rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
}

.bufo-recruit__topbar-right {
  display: flex;
  align-items: center;
}

.bufo-recruit__topbar-id {
  font-family: var(--font-mono, monospace);
  font-size: 0.52rem;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.2);
}

/* ─── Phase timeline ─── */
.bufo-recruit__timeline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 1rem 1.25rem 0.75rem;
}

.bufo-recruit__phase {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.7rem;
  border-radius: 3px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.2);
  transition: all 0.4s ease;
  user-select: none;
}

.bufo-recruit__phase:hover {
  border-color: rgba(34, 197, 94, 0.2);
}

.bufo-recruit__phase--active {
  border-color: rgba(34, 197, 94, 0.35);
  background: rgba(34, 197, 94, 0.06);
}

.bufo-recruit__phase--done {
  border-color: rgba(34, 197, 94, 0.15);
}

.bufo-recruit__phase-num {
  font-family: var(--font-mono, monospace);
  font-size: 0.6rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.2);
  transition: color 0.4s ease;
}

.bufo-recruit__phase--active .bufo-recruit__phase-num {
  color: #22c55e;
  text-shadow: 0 0 8px rgba(34, 197, 94, 0.4);
}

.bufo-recruit__phase--done .bufo-recruit__phase-num {
  color: rgba(34, 197, 94, 0.5);
}

.bufo-recruit__phase-label {
  font-family: var(--font-mono, monospace);
  font-size: 0.55rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.25);
  transition: color 0.4s ease;
}

.bufo-recruit__phase--active .bufo-recruit__phase-label {
  color: rgba(255, 255, 255, 0.85);
}

.bufo-recruit__phase--done .bufo-recruit__phase-label {
  color: rgba(255, 255, 255, 0.4);
}

/* Connector lines between phases */
.bufo-recruit__phase-connector {
  width: 50px;
  height: 1px;
  background: rgba(255, 255, 255, 0.06);
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.bufo-recruit__phase-connector-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: rgba(34, 197, 94, 0.5);
  box-shadow: 0 0 6px rgba(34, 197, 94, 0.3);
  transition: width 0.6s ease;
}

/* ─── Panels ─── */
.bufo-recruit__panels {
  position: relative;
  min-height: 280px;
  padding: 0 1.5rem 1rem;
}

.bufo-recruit__panel {
  position: absolute;
  inset: 0;
  padding: 0.5rem 1.5rem 1rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.5s ease, visibility 0.5s ease, transform 0.5s ease;
}

.bufo-recruit__panel--active {
  position: relative;
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.bufo-recruit__panel-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .bufo-recruit__panel-grid {
    grid-template-columns: 1.4fr 1fr;
    gap: 2rem;
  }
}

.bufo-recruit__panel-main--full {
  max-width: 100%;
}

/* ─── Terminal line / typing ─── */
.bufo-recruit__terminal-line {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
  font-family: var(--font-mono, monospace);
  font-size: 0.65rem;
  overflow: hidden;
}

.bufo-recruit__prompt {
  color: rgba(34, 197, 94, 0.5);
  flex-shrink: 0;
  white-space: nowrap;
}

.bufo-recruit__typed-text {
  color: rgba(34, 197, 94, 0.8);
  white-space: nowrap;
  overflow: hidden;
}

.bufo-recruit__cursor-blink {
  color: rgba(34, 197, 94, 0.8);
  animation: recruit-cursor 1s steps(1) infinite;
}

@keyframes recruit-cursor {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

/* ─── Headlines and body ─── */
.bufo-recruit__headline {
  font-family: var(--font-heading, var(--font-mono, monospace));
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.92);
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}

.bufo-recruit__headline em {
  font-style: normal;
  color: #22c55e;
}

.bufo-recruit__redacted {
  position: relative;
  display: inline-block;
}

.bufo-recruit__redacted::after {
  content: '';
  position: absolute;
  left: -2px;
  right: -2px;
  top: 50%;
  height: 2px;
  background: rgba(239, 68, 68, 0.75);
  transform: rotate(-1deg);
}

.bufo-recruit__body {
  font-family: var(--font-sans, system-ui);
  font-size: 0.82rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.55);
  max-width: 540px;
  margin-bottom: 1rem;
}

.bufo-recruit__body strong {
  color: rgba(255, 255, 255, 0.85);
}

/* ─── Reveal animation ─── */
.bufo-recruit__reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.bufo-recruit__reveal--d1 { transition-delay: 0.15s; }
.bufo-recruit__reveal--d2 { transition-delay: 0.3s; }
.bufo-recruit__reveal--d3 { transition-delay: 0.45s; }

.bufo-recruit__reveal--visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─── Stats row ─── */
.bufo-recruit__stats-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 0.5rem;
}

.bufo-recruit__stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
}

.bufo-recruit__stat-val {
  font-family: var(--font-mono, monospace);
  font-size: 1.4rem;
  font-weight: 800;
  color: #22c55e;
  text-shadow: 0 0 12px rgba(34, 197, 94, 0.25);
  line-height: 1;
}

.bufo-recruit__stat-label {
  font-family: var(--font-mono, monospace);
  font-size: 0.5rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.3);
}

.bufo-recruit__stat-sep {
  width: 1px;
  height: 28px;
  background: rgba(255, 255, 255, 0.06);
}

/* ─── Dossier preview card ─── */
.bufo-recruit__dossier {
  border: 1px solid rgba(34, 197, 94, 0.12);
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.4);
  overflow: hidden;
  position: relative;
}

.bufo-recruit__dossier::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(34, 197, 94, 0.2), transparent);
}

.bufo-recruit__dossier-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  background: rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.bufo-recruit__dossier-stamp {
  font-family: var(--font-mono, monospace);
  font-size: 0.48rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(239, 68, 68, 0.7);
  padding: 0.15rem 0.4rem;
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: 2px;
}

.bufo-recruit__dossier-id {
  font-family: var(--font-mono, monospace);
  font-size: 0.5rem;
  color: rgba(255, 255, 255, 0.2);
  letter-spacing: 0.06em;
}

.bufo-recruit__dossier-img {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.bufo-recruit__dossier-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(0.3) contrast(1.1);
  transition: filter 0.4s ease;
}

.bufo-recruit__dossier:hover .bufo-recruit__dossier-img img {
  filter: grayscale(0) contrast(1);
}

.bufo-recruit__dossier-img-scan {
  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) 4px
  );
  pointer-events: none;
}

.bufo-recruit__dossier-img--empty {
  background: rgba(34, 197, 94, 0.03);
  display: flex;
  align-items: center;
  justify-content: center;
}

.bufo-recruit__dossier-img--empty svg {
  width: 32px;
  height: 32px;
  color: rgba(34, 197, 94, 0.2);
}

.bufo-recruit__dossier-meta {
  padding: 0.6rem 0.75rem 0.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.bufo-recruit__dossier-title {
  font-family: var(--font-mono, monospace);
  font-size: 0.7rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.3;
}

.bufo-recruit__dossier-sector {
  font-family: var(--font-mono, monospace);
  font-size: 0.48rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(34, 197, 94, 0.5);
}

.bufo-recruit__dossier-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.5rem 0.75rem;
  margin: 0.4rem 0.6rem 0.6rem;
  border-radius: 3px;
  border: 1px solid rgba(34, 197, 94, 0.2);
  background: rgba(34, 197, 94, 0.05);
  font-family: var(--font-mono, monospace);
  font-size: 0.52rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #22c55e;
  text-decoration: none;
  transition: all 0.3s ease;
}

.bufo-recruit__dossier-link:hover {
  background: #22c55e;
  color: #000;
  border-color: #22c55e;
  box-shadow: 0 0 16px rgba(34, 197, 94, 0.25);
}

.bufo-recruit__dossier-link svg {
  width: 12px;
  height: 12px;
  transition: transform 0.25s ease;
}

.bufo-recruit__dossier-link:hover svg {
  transform: translateX(3px);
}

/* ─── Ops grid (phase 2) ─── */
.bufo-recruit__ops-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

@media (min-width: 640px) {
  .bufo-recruit__ops-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.bufo-recruit__op {
  display: flex;
  gap: 0.65rem;
  padding: 0.85rem;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.04);
  transition: border-color 0.3s ease;
}

.bufo-recruit__op:hover {
  border-color: rgba(34, 197, 94, 0.15);
}

.bufo-recruit__op-icon {
  width: 32px;
  height: 32px;
  border-radius: 4px;
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.bufo-recruit__op-icon svg {
  width: 15px;
  height: 15px;
  color: #22c55e;
}

.bufo-recruit__op-text strong {
  display: block;
  font-family: var(--font-mono, monospace);
  font-size: 0.68rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 0.3rem;
  letter-spacing: 0.02em;
}

.bufo-recruit__op-text p {
  font-family: var(--font-sans, system-ui);
  font-size: 0.72rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.4);
  margin: 0;
}

/* ─── Actions (phase 3) ─── */
.bufo-recruit__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.25rem;
  margin-bottom: 1rem;
}

.bufo-recruit__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.1rem;
  border-radius: 3px;
  font-family: var(--font-mono, monospace);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.bufo-recruit__btn svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.bufo-recruit__btn--primary {
  background: #22c55e;
  color: #000;
  border: 1px solid #22c55e;
  box-shadow: 0 0 20px rgba(34, 197, 94, 0.15);
}

.bufo-recruit__btn--primary:hover {
  background: #16a34a;
  box-shadow: 0 0 30px rgba(34, 197, 94, 0.3);
  transform: translateY(-1px);
}

.bufo-recruit__btn--secondary {
  background: transparent;
  color: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.bufo-recruit__btn--secondary:hover {
  border-color: rgba(34, 197, 94, 0.35);
  color: #22c55e;
  background: rgba(34, 197, 94, 0.06);
}

/* ─── Clearance row ─── */
.bufo-recruit__clearance {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.04);
  font-family: var(--font-mono, monospace);
  font-size: 0.6rem;
  color: rgba(255, 255, 255, 0.4);
}

.bufo-recruit__clearance-icon {
  color: rgba(34, 197, 94, 0.5);
  font-size: 0.75rem;
}

.bufo-recruit__clearance strong {
  color: #22c55e;
}

.bufo-recruit__clearance-hint {
  color: rgba(255, 255, 255, 0.2);
  font-size: 0.52rem;
}

/* ─── Progress bar ─── */
.bufo-recruit__progress {
  height: 2px;
  background: rgba(255, 255, 255, 0.03);
  position: relative;
  overflow: hidden;
}

.bufo-recruit__progress-bar {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, rgba(34, 197, 94, 0.3), rgba(34, 197, 94, 0.7));
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.2);
}

/* ─── Responsive ─── */
@media (max-width: 640px) {
  .bufo-recruit__timeline {
    padding: 0.75rem 0.75rem 0.5rem;
    gap: 0;
  }

  .bufo-recruit__phase-connector {
    width: 24px;
  }

  .bufo-recruit__phase-label {
    font-size: 0.45rem;
  }

  .bufo-recruit__panels {
    padding: 0 0.75rem 0.75rem;
    min-height: auto;
  }

  .bufo-recruit__panel {
    padding: 0.5rem 0.75rem 0.75rem;
  }

  .bufo-recruit__headline {
    font-size: 0.95rem;
  }

  .bufo-recruit__dossier {
    margin-top: 0.75rem;
  }

  .bufo-recruit__ops-grid {
    grid-template-columns: 1fr;
  }

  .bufo-recruit__actions {
    flex-direction: column;
  }
}

/* ─── Reduced motion ─── */
@media (prefers-reduced-motion: reduce) {
  .bufo-recruit__scanline,
  .bufo-recruit__signal-dot,
  .bufo-recruit__cursor-blink {
    animation: none !important;
  }

  .bufo-recruit__reveal {
    opacity: 1 !important;
    transform: none !important;
  }

  .bufo-recruit__panel {
    transition: none !important;
  }
}
