/* Interactive process steps  homepage #process */

.process-interactive {
  position: relative;
  margin-top: 8px;
}

.process-timeline {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  position: relative;
  margin-bottom: 28px;
}

.process-connector {
  position: absolute;
  top: 29px;
  left: calc(16.666% + 29px);
  right: calc(16.666% + 29px);
  height: 2px;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.process-connector::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to right,
    var(--sand-line) 0 8px,
    transparent 8px 16px
  );
  opacity: 0.5;
}

.process-connector::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to right,
    var(--caramel) 0 8px,
    transparent 8px 16px
  );
  transform-origin: left center;
  transform: scaleX(0);
}

.process-interactive.is-line-drawn .process-connector::after {
  transform: scaleX(1);
  transition: transform 0.9s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.process-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  z-index: 1;
}

.process-step-btn {
  appearance: none;
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
  font: inherit;
  color: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
  border-radius: 16px;
  transition: transform 0.28s ease;
}

.process-step-btn:focus-visible {
  outline: 2px solid var(--caramel);
  outline-offset: 6px;
}

.process-step-num {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--white);
  border: 2px solid var(--caramel);
  color: var(--caramel-2);
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-soft);
  transition:
    background 0.3s ease,
    color 0.3s ease,
    border-color 0.3s ease,
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.process-step-btn.is-active .process-step-num,
.process-step-btn[aria-selected="true"] .process-step-num {
  background: var(--caramel);
  border-color: var(--caramel);
  color: var(--white);
  transform: scale(1.08);
  box-shadow: 0 12px 28px -10px rgba(9, 94, 63, 0.45);
}

.process-step-heading {
  font-size: 20px;
  font-weight: 600;
  color: var(--espresso);
  margin: 0 0 8px;
  line-height: 1.25;
}

.process-step-teaser {
  font-size: 15px;
  color: var(--mocha);
  line-height: 1.65;
  margin: 0;
  max-width: 280px;
}

.process-panels {
  background: var(--white);
  border: 1px solid var(--sand-line);
  border-radius: 20px;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.process-panels:not(:has(.process-panel.is-open)) {
  border-color: transparent;
  box-shadow: none;
  background: transparent;
}

.process-panel {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition:
    grid-template-rows 0.32s ease,
    opacity 0.32s ease;
}

.process-panel.is-open {
  grid-template-rows: 1fr;
  opacity: 1;
}

.process-panel-inner {
  overflow: hidden;
  min-height: 0;
}

.process-panel-content {
  padding: 32px 36px 36px;
}

.process-panel-content h4 {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--caramel-2);
  margin: 0 0 14px;
}

.process-panel-content h4:not(:first-child) {
  margin-top: 28px;
}

.process-panel-content p {
  font-size: 15.5px;
  color: var(--mocha);
  line-height: 1.75;
  margin: 0 0 12px;
}

.process-panel-content ul {
  margin: 0 0 12px;
  padding-left: 1.2em;
}

.process-panel-content li {
  font-size: 15.5px;
  color: var(--mocha);
  line-height: 1.7;
  margin-bottom: 8px;
}

.process-panel-content li:last-child {
  margin-bottom: 0;
}

.process-panel-promise {
  margin-top: 20px;
  padding: 16px 18px;
  background: var(--cream-2);
  border-radius: 12px;
  border-left: 3px solid var(--caramel);
  font-size: 15px;
  color: var(--cocoa);
  line-height: 1.7;
}

.process-step-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
}

@media (max-width: 900px) {
  .process-timeline {
    grid-template-columns: 1fr;
    gap: 0;
    margin-bottom: 20px;
  }

  .process-step-copy {
    align-items: flex-start;
    flex: 1;
    min-width: 0;
  }

  .process-connector {
    display: none;
  }

  .process-step {
    align-items: stretch;
    text-align: left;
    border-bottom: 1px solid var(--sand-line);
    padding: 20px 0;
  }

  .process-step:last-child {
    border-bottom: none;
    padding-bottom: 0;
  }

  .process-step-btn {
    flex-direction: row;
    align-items: flex-start;
    gap: 18px;
    text-align: left;
  }

  .process-step-num {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    font-size: 20px;
  }

  .process-step-teaser {
    max-width: none;
  }

  .process-panels {
    margin-top: 4px;
  }

  .process-panel-content {
    padding: 24px 22px 28px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .process-connector::after {
    transform: scaleX(1) !important;
    transition: none !important;
  }

  .process-step-num,
  .process-step-btn,
  .process-panel {
    transition: none !important;
  }

  .process-step-btn.is-active .process-step-num,
  .process-step-btn[aria-selected="true"] .process-step-num {
    transform: none;
  }
}
