Service + region (and optional bucket) decoded from a Host header.
Covers both the LocalStack hostname convention
(<service>.<region>.localhost.localstack.cloud[:port],
<bucket>.s3.<region>.localhost.localstack.cloud[:port]) and real AWS
service hostnames (<service>.<region>.amazonaws.com, S3 path-style
and virtual-hosted-style including the legacy no-region
s3.amazonaws.com / <bucket>.s3.amazonaws.com forms and the older
dash-separated s3-<region>.amazonaws.com form).
Parse a Host header value for a LocalStack- or AWS-shaped hostname.
Returns None for anything that doesn’t match — callers fall through
to their existing detection path.