/*
 * AH Digital — Homepage Process Timeline
 */

.ah-process {
  position: relative;
  padding-block: clamp(104px, 12vw, 184px);
  background: var(--ah-color-bg);
}

.ah-process__intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 40px;
}

.ah-process .ah-section-heading__title {
  max-width: 15ch;
}

.ah-process__legend {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ah-color-text-muted);
  font-family: var(--ah-font-mono);
  font-size: 0.58rem;
  font-weight: 650;
}

.ah-process__legend i {
  width: 70px;
  height: 1px;
  background: linear-gradient(
    90deg,
    var(--ah-color-brand),
    var(--ah-color-intelligence)
  );
}

.ah-process__layout {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(420px, 1.08fr);
  align-items: start;
  gap: clamp(56px, 7vw, 108px);
  margin-block-start: clamp(70px, 8vw, 110px);
}

.ah-process__steps {
  min-width: 0;
}

.ah-process-step {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 22px;
  min-height: 245px;
  opacity: 0.48;
  transition:
    opacity var(--ah-duration-base) var(--ah-ease-standard),
    transform var(--ah-duration-base) var(--ah-ease-standard);
}

.ah-process-step.is-active {
  opacity: 1;
  transform: translateX(4px);
}

.ah-process-step__rail {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.ah-process-step__dot {
  position: relative;
  z-index: 2;
  width: 11px;
  height: 11px;
  margin-block-start: 6px;
  border: 2px solid var(--ah-color-border-strong);
  border-radius: 50%;
  background: var(--ah-color-bg);
  transition:
    border-color var(--ah-duration-base) var(--ah-ease-standard),
    background-color var(--ah-duration-base) var(--ah-ease-standard),
    box-shadow var(--ah-duration-base) var(--ah-ease-standard);
}

.ah-process-step.is-active .ah-process-step__dot {
  border-color: var(--ah-color-brand);
  background: var(--ah-color-brand);
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--ah-color-brand) 10%, transparent);
}

.ah-process-step__line {
  width: 1px;
  flex: 1;
  margin-block-start: 8px;
  background: var(--ah-color-border);
}

.ah-process-step:last-child .ah-process-step__line {
  display: none;
}

.ah-process-step__content {
  max-width: 620px;
  padding-block-end: 56px;
}

.ah-process-step__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-block-end: 12px;
}

.ah-process-step__meta span,
.ah-process-step__meta small {
  font-family: var(--ah-font-mono);
  font-size: 0.56rem;
  font-weight: 650;
  letter-spacing: 0.08em;
}

.ah-process-step__meta span {
  color: var(--ah-color-brand);
}

.ah-process-step__meta small {
  color: var(--ah-color-text-muted);
}

.ah-process-step h3 {
  color: var(--ah-color-text);
  font-size: clamp(1.55rem, 2.5vw, 2.35rem);
  letter-spacing: -0.04em;
}

.ah-process-step h4 {
  max-width: 22ch;
  margin-block-start: 8px;
  color: var(--ah-color-text);
  font-size: 1rem;
  font-weight: 620;
  letter-spacing: -0.015em;
  line-height: 1.5;
}

.ah-process-step p {
  max-width: 56ch;
  margin-block-start: 14px;
  color: var(--ah-color-text-secondary);
  font-size: 0.9rem;
  line-height: 1.72;
}

.ah-process__visual {
  position: sticky;
  inset-block-start: 110px;
}

.ah-process-system {
  overflow: hidden;
  border: 1px solid var(--ah-color-border);
  border-radius: var(--ah-radius-xl);
  background: var(--ah-color-surface);
  box-shadow: var(--ah-shadow-feature);
}

.ah-process-system__top {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-block-end: 1px solid var(--ah-color-border);
  color: var(--ah-color-text-muted);
  font-family: var(--ah-font-mono);
  font-size: 0.55rem;
  font-weight: 650;
  letter-spacing: 0.075em;
  padding-inline: 18px;
}

.ah-process-system__body {
  display: grid;
  min-height: 540px;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 20px;
  padding: 28px;
}

.ah-process-system__progress {
  position: relative;
  width: 2px;
  height: 100%;
  margin-inline: auto;
  border-radius: var(--ah-radius-pill);
  background: var(--ah-color-border);
}

.ah-process-system__progress-fill {
  position: absolute;
  inset-block-start: 0;
  inset-inline: 0;
  border-radius: inherit;
  background: linear-gradient(
    180deg,
    var(--ah-color-brand),
    var(--ah-color-intelligence),
    var(--ah-color-signal)
  );
  transition: height var(--ah-duration-base) var(--ah-ease-standard);
}

.ah-process-system__stages {
  display: grid;
  align-content: stretch;
}

.ah-process-system__stage {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border-block-end: 1px solid var(--ah-color-border);
  opacity: 0.44;
  transition:
    opacity var(--ah-duration-base) var(--ah-ease-standard),
    transform var(--ah-duration-base) var(--ah-ease-standard);
}

.ah-process-system__stage:last-child {
  border-block-end: 0;
}

.ah-process-system__stage.is-active {
  opacity: 1;
  transform: translateX(4px);
}

.ah-process-system__stage span {
  color: var(--ah-color-brand);
  font-family: var(--ah-font-mono);
  font-size: 0.56rem;
  font-weight: 700;
}

.ah-process-system__stage strong {
  color: var(--ah-color-text);
  font-size: 0.8rem;
  letter-spacing: -0.01em;
}

.ah-process-system__stage small {
  color: var(--ah-color-text-muted);
  font-family: var(--ah-font-mono);
  font-size: 0.48rem;
  font-weight: 650;
  letter-spacing: 0.06em;
}

.ah-process-system__footer {
  display: flex;
  flex-wrap: wrap;
  min-height: 58px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border-block-start: 1px solid var(--ah-color-border);
  color: var(--ah-color-text-muted);
  font-family: var(--ah-font-mono);
  font-size: 0.54rem;
  padding: 12px 16px;
}

.ah-process-system__footer strong {
  color: var(--ah-color-text);
}

@media (max-width: 1023px) {
  .ah-process__intro {
    grid-template-columns: minmax(0, 1fr);
  }

  .ah-process__legend {
    display: none;
  }

  .ah-process__layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .ah-process__visual {
    position: static;
    width: min(100%, 720px);
    margin-inline: auto;
  }

  .ah-process-step {
    min-height: 210px;
  }
}

@media (max-width: 767px) {
  .ah-process {
    padding-block: 80px;
  }

  .ah-process__layout {
    margin-block-start: 54px;
  }

  .ah-process-step {
    min-height: 0;
    opacity: 1;
  }

  .ah-process-step.is-active {
    transform: none;
  }

  .ah-process-step__content {
    padding-block-end: 44px;
  }

  .ah-process__visual {
    display: none;
  }
}

@supports not (color: color-mix(in srgb, black, white)) {
  .ah-process-step.is-active .ah-process-step__dot {
    box-shadow: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ah-process-step,
  .ah-process-step__dot,
  .ah-process-system__progress-fill,
  .ah-process-system__stage {
    transition: none;
  }

  .ah-process-step.is-active,
  .ah-process-system__stage.is-active {
    transform: none;
  }
}
/* AH Process Timeline — readability patch v1
 * Enlarges micro-copy, step numbers and stage labels on desktop/laptop.
 */

@media (min-width: 768px) {
  .ah-process__legend {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.07em;
  }

  .ah-process-step__meta span,
  .ah-process-step__meta small {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.075em;
  }

  .ah-process-system__top {
    min-height: 64px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    padding-inline: 20px;
  }

  .ah-process-system__body {
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 22px;
    padding: 30px;
  }

  .ah-process-system__stage {
    grid-template-columns: 42px minmax(0, 1fr) auto;
    gap: 14px;
    min-height: 76px;
  }

  .ah-process-system__stage span {
    font-size: 0.70rem;
    font-weight: 800;
    letter-spacing: 0.035em;
  }

  .ah-process-system__stage strong {
    font-size: 0.98rem;
    font-weight: 700;
    letter-spacing: -0.015em;
  }

  .ah-process-system__stage small {
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0.055em;
  }

  .ah-process-system__stage.is-active strong {
    font-size: 1.02rem;
  }

  .ah-process-system__footer {
    min-height: 64px;
    gap: 10px;
    font-size: 0.64rem;
    font-weight: 650;
    line-height: 1.5;
    padding: 14px 18px;
  }
}

@media (min-width: 1024px) and (max-width: 1280px) {
  .ah-process-system__stage strong {
    font-size: 0.92rem;
  }

  .ah-process-system__stage small {
    font-size: 0.60rem;
  }
}
