/* ==========================================================================
   PROCESS SECTION
   Sticky left column with animated mock chat, vertical timeline on right.
   ========================================================================== */

#process {
  position: relative;
  overflow: hidden;
}

.process-container {
  display: grid;
  gap: var(--sp-3xl);
  align-items: flex-start;
}

@media (min-width: 1024px) {
  .process-container {
    grid-template-columns: 1fr 1.2fr;
  }
}

/* -- Sticky Left Column -------------------------------------------------- */
.process-sticky {
  position: sticky;
  top: 120px; /* Accounts for fixed nav */
  padding-bottom: var(--sp-2xl);
}

.process-sticky .section-headline {
  max-width: 18ch;
}

/* -- Mock Chat Animation ------------------------------------------------- */
.mock-chat {
  margin-top: var(--sp-2xl);
  display: flex;
  flex-direction: column;
  gap: var(--sp-md);
  padding: var(--sp-xl);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  position: relative;
}

.chat-msg {
  display: flex;
  align-items: flex-end;
  gap: var(--sp-sm);
  max-width: 85%;
}

.chat-msg--client {
  align-self: flex-start;
}

.chat-msg--agency {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.chat-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--c-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--c-text-2);
  flex-shrink: 0;
  overflow: hidden;
}

.chat-msg--agency .chat-avatar {
  background: var(--c-bg); /* Agency avatar container */
}

.chat-bubble {
  padding: 12px 16px;
  border-radius: 18px;
  font-size: var(--fs-body-sm);
  line-height: var(--lh-snug);
  color: var(--c-text);
}

.chat-msg--client .chat-bubble {
  background: var(--c-bg-alt);
  border-bottom-left-radius: 4px;
}

.chat-msg--agency .chat-bubble {
  background: var(--c-primary);
  color: #ffffff;
  border-bottom-right-radius: 4px;
  box-shadow: var(--shadow-glow);
}

.chat-reaction {
  position: absolute;
  bottom: 12px;
  left: 20%;
  background: var(--c-surface-raised);
  border: 1px solid var(--c-border);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  box-shadow: var(--shadow-md);
  transform: translateY(10px);
  opacity: 0;
}

.mock-chat.revealed .chat-reaction {
  animation: pop-in 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
  animation-delay: 1.4s;
}

.mock-chat.revealed .chat-msg:nth-child(1) {
  transition-delay: 0.2s;
}

.mock-chat.revealed .chat-msg:nth-child(2) {
  transition-delay: 0.8s;
}

@keyframes pop-in {
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* -- Vertical Timeline --------------------------------------------------- */
.process-steps {
  position: relative;
  padding-left: 32px;
  display: flex;
  flex-direction: column;
  gap: var(--sp-xl);
}

@media (min-width: 640px) {
  .process-steps {
    padding-left: 48px;
  }
}

.timeline-track {
  position: absolute;
  top: 24px; /* offset to start below first marker */
  bottom: 24px;
  left: 15px;
  width: 2px;
  background: linear-gradient(to bottom, var(--c-primary) 0%, var(--c-border) 100%);
  border-radius: 2px;
}

@media (min-width: 640px) {
  .timeline-track {
    left: 19px; /* slightly wider on tablet/desktop */
  }
}

.timeline-step {
  position: relative;
}

.step-marker {
  position: absolute;
  left: -48px; /* Pulled exactly over the track */
  top: 12px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--c-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  z-index: 2;
  box-shadow: 0 0 0 4px var(--c-bg-alt); /* Creates a cutout effect over the track */
  transition: transform var(--duration) var(--ease-spring),
              box-shadow var(--duration) var(--ease-out);
}

@media (max-width: 639px) {
  .step-marker {
    left: -32px; /* Pulled exactly over the track on mobile */
  }
}

.timeline-step:hover .step-marker {
  transform: scale(1.15);
  box-shadow: 0 0 0 6px var(--c-bg-alt), var(--shadow-glow);
}

.step-content.card {
  padding: var(--sp-lg);
}

.step-content .card__title {
  margin-bottom: var(--sp-xs);
}

.step-content .card__text {
  margin-bottom: 0;
}
