/* =========================
   Illustrated Hero Section
   Unique illustration styles for landing page hero
   ========================= */

.hero-illustrated {
  padding: 2rem;
  padding-top: 2rem;
  background: var(--color-bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.hero-illustrated__container {
  position: relative;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
}

.pain-scene {
  position: relative;
  height: 420px;
}

/* Cloud and tools container */
.chaos-cloud {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 380px;
  height: 300px;
}

.cloud-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
}

/* Tools pile - absolute positioned for real overlap like Basecamp */
.tools-grid {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 255px;
  height: 200px;
  z-index: 2;
}

.tool-card {
  background: var(--color-bg);
  border-radius: 14px;
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.08),
    0 2px 4px rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.04);
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  position: absolute;
  width: 80px;
  animation: toolCardFloat 5s ease-in-out infinite;
  opacity: 0.85;
}

@keyframes toolCardFloat {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -2px;
  }
}

/* Scattered pile positions - each card overlaps others */
/* Randomized animation delays and durations for organic floating */
.tool-card:nth-child(1) {
  top: 0;
  left: 0;
  transform: rotate(-8deg);
  z-index: 3;
  animation-delay: 0.2s;
  animation-duration: 4.5s;
}
.tool-card:nth-child(2) {
  top: -7px;
  left: 70px;
  transform: rotate(5deg);
  z-index: 5;
  animation-delay: 1.8s;
  animation-duration: 5.2s;
}
.tool-card:nth-child(3) {
  top: 7px;
  left: 148px;
  transform: rotate(-3deg);
  z-index: 2;
  animation-delay: 0.7s;
  animation-duration: 4.8s;
}
.tool-card:nth-child(4) {
  top: 64px;
  left: -14px;
  transform: rotate(6deg);
  z-index: 4;
  animation-delay: 2.3s;
  animation-duration: 5.5s;
}
.tool-card:nth-child(5) {
  top: 58px;
  left: 78px;
  transform: rotate(-2deg);
  z-index: 9;
  animation-delay: 0s;
  animation-duration: 4.2s;
}
.tool-card:nth-child(6) {
  top: 72px;
  left: 164px;
  transform: rotate(7deg);
  z-index: 6;
  animation-delay: 1.1s;
  animation-duration: 5.8s;
}
.tool-card:nth-child(7) {
  top: 128px;
  left: 7px;
  transform: rotate(-5deg);
  z-index: 1;
  animation-delay: 2.9s;
  animation-duration: 4.6s;
}
.tool-card:nth-child(8) {
  top: 122px;
  left: 86px;
  transform: rotate(4deg);
  z-index: 7;
  animation-delay: 0.4s;
  animation-duration: 5.1s;
}
.tool-card:nth-child(9) {
  top: 136px;
  left: 158px;
  transform: rotate(-6deg);
  z-index: 8;
  animation-delay: 1.5s;
  animation-duration: 4.9s;
}

.tool-icon {
  width: 40px;
  height: 40px;
}

.tool-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-ink-muted);
}

.signpost-overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
  pointer-events: none;
}

@media (max-width: 640px) {
  .signpost-overlay {
    display: none;
  }
}

/* Pain bubbles with people */
.pain-point {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 10;
}

.pain-point.right {
  flex-direction: row-reverse;
}

.person-illustration {
  width: 100px;
  height: 100px;
  flex-shrink: 0;
}

/* Simple speech text with fuzzy translucent cloud - Basecamp style */
.speech-bubble {
  position: relative;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.75);
  padding: 6px 14px;
  border-radius: 20px;
  /* Fuzzy, cloud-like edges */
  box-shadow:
    0 0 8px 4px rgba(255, 255, 255, 0.6),
    0 0 16px 8px rgba(255, 255, 255, 0.3);
}

.speech-bubble p {
  font-size: var(--font-small-medium-responsive);
  font-weight: 700;
  color: var(--color-ink-dark);
  margin: 0;
  font-style: italic;
}

/* Pain point positioning */
.pain-point.top-left {
  top: 20px;
  left: 20px;
}
.pain-point.mid-left {
  top: 50%;
  left: 0;
  transform: translateY(-50%);
}
.pain-point.bottom-left {
  bottom: 30px;
  left: 20px;
}
.pain-point.top-right {
  top: 20px;
  right: 20px;
}
.pain-point.mid-right {
  top: 50%;
  right: 0;
  transform: translateY(-50%);
}
.pain-point.bottom-right {
  bottom: 30px;
  right: 25px;
}

.hero-illustrated .headline-main {
  font-size: var(--font-xxx-large-responsive);
  color: var(--color-ink-dark);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0;
}

.hero-illustrated .headline-sub {
  font-size: var(--font-x-large-responsive);
  color: var(--color-gray-dark);
  line-height: 1.2;
  margin: 0.25rem 0 0 0;
}

.hero-illustrated .description {
  text-align: center;
  margin-top: 1.5rem;
  font-size: var(--font-medium-responsive);
  color: var(--color-ink-muted);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

.hero-illustrated .cta-section {
  text-align: center;
  margin-top: 2rem;
}

/* Illustrated hero responsive */
@media (max-width: 900px) {
  .chaos-cloud {
    width: 320px;
    height: 260px;
  }

  .tools-grid {
    width: 160px;
    height: 125px;
  }

  .tool-card {
    width: 50px;
    padding: 6px 8px;
    border-radius: 10px;
  }

  /* Scale down positions proportionally */
  .tool-card:nth-child(1) {
    top: 0;
    left: 0;
  }
  .tool-card:nth-child(2) {
    top: -4px;
    left: 44px;
  }
  .tool-card:nth-child(3) {
    top: 4px;
    left: 92px;
  }
  .tool-card:nth-child(4) {
    top: 40px;
    left: -8px;
  }
  .tool-card:nth-child(5) {
    top: 35px;
    left: 48px;
  }
  .tool-card:nth-child(6) {
    top: 44px;
    left: 100px;
  }
  .tool-card:nth-child(7) {
    top: 80px;
    left: 4px;
  }
  .tool-card:nth-child(8) {
    top: 75px;
    left: 52px;
  }
  .tool-card:nth-child(9) {
    top: 84px;
    left: 96px;
  }

  .tool-icon {
    width: 24px;
    height: 24px;
  }

  .tool-label {
    font-size: 7px;
  }

  .person-illustration {
    width: 80px;
    height: 80px;
  }
}

@media (max-width: 640px) {
  .pain-scene {
    height: 380px;
  }

  .chaos-cloud {
    width: 240px;
    height: 200px;
  }

  .tools-grid {
    width: 120px;
    height: 95px;
  }

  .tool-card {
    width: 38px;
    padding: 4px 5px;
    border-radius: 8px;
  }

  /* Scale down positions for mobile */
  .tool-card:nth-child(1) {
    top: 0;
    left: 0;
  }
  .tool-card:nth-child(2) {
    top: -3px;
    left: 33px;
  }
  .tool-card:nth-child(3) {
    top: 3px;
    left: 70px;
  }
  .tool-card:nth-child(4) {
    top: 30px;
    left: -6px;
  }
  .tool-card:nth-child(5) {
    top: 27px;
    left: 36px;
  }
  .tool-card:nth-child(6) {
    top: 33px;
    left: 76px;
  }
  .tool-card:nth-child(7) {
    top: 60px;
    left: 3px;
  }
  .tool-card:nth-child(8) {
    top: 57px;
    left: 40px;
  }
  .tool-card:nth-child(9) {
    top: 63px;
    left: 73px;
  }

  .tool-icon {
    width: 18px;
    height: 18px;
  }

  .tool-label {
    font-size: 5px;
  }

  .person-illustration {
    width: 56px;
    height: 56px;
  }

  /* Stack person and bubble vertically on mobile */
  /* Left side: person on top, bubble below */
  .pain-point:not(.right) {
    flex-direction: column;
    align-items: flex-start;
  }

  /* Right side: bubble on top, person below */
  .pain-point.right {
    flex-direction: column-reverse;
    align-items: flex-end;
  }
}
