/* Contact page (/contact): the "how can we help" journey (.journey). One panel shows at a time
   (is-active, set by pages/contact.js); without JavaScript every panel shows. */

.journey {
  padding: clamp(5rem, 12vh, 8.75rem) var(--pad-x);
}

.journey__meter {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.5vw, 1.75rem);
  margin: 0 0 clamp(1.875rem, 5vh, 3rem);
}

.journey__track {
  flex: 1;
  height: 2px;
  background: var(--ink-12);
  overflow: hidden;
}

.journey__bar {
  display: block;
  height: 100%;
  background: var(--teal);
  transform-origin: 0 50%;
}

.journey__panel[data-step='1'] .journey__bar {
  width: 33.4%;
}

.journey__panel[data-step='2'] .journey__bar {
  width: 66.7%;
}

.journey__panel[data-step='3'] .journey__bar {
  width: 100%;
}

.journey__panel.is-active .journey__bar {
  animation: journey-fill 0.7s var(--e-spring) 0.12s both;
}

@keyframes journey-fill {
  from {
    transform: scaleX(0);
  }

  to {
    transform: scaleX(1);
  }
}

.journey__step {
  font-family: var(--disp);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.14em;
  color: var(--navy);
  white-space: nowrap;
}

.journey__step em {
  font-style: normal;
  color: var(--orange);
}

.journey__panel {
  display: none;
}

.journey__panel.is-active {
  display: block;
  animation: journey-in 0.55s var(--e-spring) both;
}

@keyframes journey-in {
  from {
    opacity: 0;
    transform: translateY(26px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

.journey__question {
  font-family: var(--disp);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  font-size: clamp(1.9rem, 4vw, 3.4rem);
  line-height: 1.04;
  color: var(--navy);
  margin: 0 0 clamp(1.125rem, 3.2vh, 1.75rem);
  outline: none;
}

.journey__options {
  border-block-start: 1px solid var(--ink-12);
}

.journey__option {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: clamp(1rem, 3vw, 2.125rem);
  width: 100%;
  text-align: start;
  background: transparent;
  border: 0;
  border-block-end: 1px solid var(--ink-12);
  padding: clamp(1.375rem, 3.6vh, 2rem) clamp(0.625rem, 1.2vw, 1.125rem);
  cursor: pointer;
  transition: background-color 0.35s var(--e-spring);
}

.journey__option-num {
  font-family: var(--disp);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.14em;
  color: var(--orange);
  transition: color 0.3s;
}

.journey__option-title {
  display: block;
  font-family: var(--disp);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  font-size: clamp(1.15rem, 2vw, 1.7rem);
  color: var(--navy);
  transition: color 0.3s;
}

.journey__option-text {
  display: block;
  font-weight: 300;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ink-muted);
  margin-block-start: 0.375rem;
  transition: color 0.3s;
}

.journey__option-arrow {
  color: var(--navy);
  transition:
    color 0.3s,
    transform 0.35s var(--e-spring);
}

/* Hover and keyboard focus fill the option with its random brand colour (--hue, contact.js). */
.journey__option:hover,
.journey__option:focus-visible {
  background: var(--hue, var(--blue));
}

.journey__option:hover .journey__option-title,
.journey__option:focus-visible .journey__option-title,
.journey__option:hover .journey__option-num,
.journey__option:focus-visible .journey__option-num,
.journey__option:hover .journey__option-arrow,
.journey__option:focus-visible .journey__option-arrow {
  color: var(--white);
}

.journey__option:hover .journey__option-text,
.journey__option:focus-visible .journey__option-text {
  color: var(--white-85);
}

.journey__option:hover .journey__option-arrow,
.journey__option:focus-visible .journey__option-arrow {
  transform: translateX(6px);
}

/* Back and Start over: small text buttons. */
.journey__back,
.journey__restart {
  background: transparent;
  border: 0;
  cursor: pointer;
  font-family: var(--disp);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
  transition: color 0.3s;
}

.journey__back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0 0 1.125rem;
}

/* Without JS every panel shows at once, so there is nothing to go back to or restart. */
:where(html:not(.js)) .journey__back {
  display: none;
}

.journey__back:hover {
  color: var(--blue);
}

.journey__crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1.625rem;
}

.journey__crumb {
  font-family: var(--disp);
  font-weight: 600;
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--navy);
  border: 1px solid var(--ink-12);
  border-radius: var(--radius-pill);
  padding: 0.4375rem 0.875rem;
}

.journey__mail {
  display: inline-block;
  font-family: var(--disp);
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: clamp(1.5rem, 3.6vw, 3rem);
  color: var(--blue);
  word-break: break-all;
  margin: 0 0 0.625rem;
  transition: color 0.3s;
}

.journey__mail:hover {
  color: var(--teal);
}

.journey__note {
  font-weight: 300;
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--ink-70);
  max-width: 60ch;
  margin: 0 0 1.625rem;
}

.journey__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.125rem;
}

:where(html:not(.js)) .journey__restart {
  display: none;
}

.journey__restart:hover {
  color: var(--blue);
}

@media (prefers-reduced-motion: reduce) {
  .journey__panel.is-active,
  .journey__panel.is-active .journey__bar {
    animation: none;
  }
}

/* Without JS (no html.js class from loader.js), show every step of the journey. :where() keeps
   the specificity of .journey__panel, so source order decides. */
:where(html:not(.js)) .journey__panel {
  display: block;
  margin-block-end: 2.5rem;
}

:where(html:not(.js)) .journey__meter {
  display: none;
}

/* The focus ring is drawn inside, in teal: focus fills the option with a dark brand colour. */
.journey__option:focus-visible {
  --focus-offset: var(--focus-offset-inside);
  --focus-color: var(--teal);
}
