/* Hero warehouse map */
.hero__visual {
  position: relative;
  min-height: 280px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.warehouse-map {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(145deg, rgba(52, 152, 219, 0.08) 0%, transparent 40%),
    linear-gradient(225deg, rgba(155, 89, 182, 0.08) 0%, transparent 45%),
    radial-gradient(ellipse at 30% 70%, rgba(231, 76, 60, 0.12) 0%, transparent 50%),
    #1e2a36;
}

.dept-pin {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  padding: 0;
  color: var(--text-primary);
  font-size: 0.65rem;
  font-weight: var(--fw-semibold);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
  z-index: 2;
  transition: transform 0.2s;
}
.dept-pin:hover,
.dept-pin:focus-visible {
  transform: scale(1.08);
  z-index: 3;
}
.dept-pin:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: var(--radius-sm);
}

.dept-pin__dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 12px currentColor;
  animation: pinPulse 2.5s ease-in-out infinite;
}

@keyframes pinPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.65; }
}

.dept-pin--lab { left: 12%; top: 22%; color: var(--lab-blue); }
.dept-pin--lab .dept-pin__dot { background: var(--lab-blue); }

.dept-pin--assembly { left: 38%; top: 18%; color: var(--assembly-yellow); }
.dept-pin--assembly .dept-pin__dot { background: var(--assembly-yellow); }

.dept-pin--quality { left: 68%; top: 25%; color: var(--quality-green); }
.dept-pin--quality .dept-pin__dot { background: var(--quality-green); }

.dept-pin--marketing { left: 82%; top: 48%; color: var(--marketing-purple); }
.dept-pin--marketing .dept-pin__dot { background: var(--marketing-purple); }

.dept-pin--automation { left: 55%; top: 55%; color: var(--automation-orange); }
.dept-pin--automation .dept-pin__dot { background: var(--automation-orange); }

.dept-pin--night { left: 22%; top: 62%; color: var(--night-lavender); }
.dept-pin--night .dept-pin__dot { background: var(--night-lavender); }

.dept-pin--slm { left: 42%; top: 78%; color: var(--slm-tech); }
.dept-pin--slm .dept-pin__dot { background: var(--slm-tech); }

.dept-pin.is-active .dept-pin__dot {
  animation: pinGlow 1s ease-in-out infinite alternate;
}

@keyframes pinGlow {
  from { box-shadow: 0 0 8px currentColor; }
  to { box-shadow: 0 0 20px currentColor; }
}

/* Department grid */
.dept-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .dept-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

/* Mobile carousel */
.dept-carousel {
  display: none;
  position: relative;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

@media (max-width: 767px) {
  .dept-carousel {
    display: flex;
  }
  .dept-grid {
    display: none;
  }
}

.dept-carousel__track {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  padding: 0.5rem 0 1rem;
  flex: 1;
  scrollbar-width: thin;
}
.dept-carousel__track::-webkit-scrollbar {
  height: 6px;
}
.dept-carousel__track::-webkit-scrollbar-thumb {
  background: var(--border-subtle);
  border-radius: 3px;
}

.dept-carousel__track .dept-card {
  flex: 0 0 min(88vw, 340px);
  scroll-snap-align: center;
}

.carousel__btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 1.25rem;
  line-height: 1;
  flex-shrink: 0;
}
.carousel__btn:hover {
  border-color: var(--lobster-red);
}
.carousel__btn:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

/* Department cards */
.dept-card {
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
  display: flex;
  flex-direction: column;
  height: 100%;
  outline: none;
}
.dept-card:hover,
.dept-card:focus-within {
  border-color: rgba(231, 76, 60, 0.35);
  box-shadow: var(--shadow-soft);
  transform: translateY(-4px);
}
@media (prefers-reduced-motion: reduce) {
  .dept-card:hover,
  .dept-card:focus-within {
    transform: none;
  }
}
.dept-card:focus-visible {
  box-shadow: var(--focus-ring), var(--shadow-soft);
}

.dept-card__visual {
  padding: 1rem;
  background: rgba(0, 0, 0, 0.2);
}

.department-head.placeholder .placeholder-box {
  aspect-ratio: 4 / 5;
  max-height: 200px;
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 1rem;
  text-align: center;
  color: #fff;
  font-weight: var(--fw-bold);
  font-size: 1rem;
  border: 2px dashed rgba(255, 255, 255, 0.25);
}
.placeholder-box__hint {
  font-size: 0.7rem;
  font-weight: var(--fw-regular);
  opacity: 0.85;
}

.dept-card__body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.65rem;
}

.dept-card__title {
  font-size: 1.15rem;
  font-weight: var(--fw-bold);
  color: var(--text-primary);
}

.dept-card__role {
  font-size: 0.85rem;
  font-weight: var(--fw-semibold);
  color: var(--accent, var(--lobster-red));
}

.dept-card__desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  flex: 1;
}

.dept-card__bullets {
  list-style: none;
  font-size: 0.88rem;
  color: var(--text-muted);
}
.dept-card__bullets li {
  position: relative;
  padding-left: 1rem;
  margin-bottom: 0.35rem;
}
.dept-card__bullets li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--accent, var(--lobster-red));
}

.dept-card__minions {
  font-size: 0.85rem;
  color: var(--text-primary);
  font-weight: var(--fw-medium);
}

.dept-card__more {
  align-self: flex-start;
  margin-top: 0.25rem;
}
