/* Front-end-only postcode interest journey. */

.pp-journey {
  width: min(760px, calc(100vw - 40px));
  max-width: none;
  max-height: min(880px, calc(100dvh - 40px));
  padding: 0;
  border: var(--pp-rule-solid) solid var(--pp-char);
  background: var(--pp-semolina);
  color: var(--pp-char);
  box-shadow: 12px 12px 0 rgba(22, 19, 15, 0.28);
  overflow: hidden;
}

.pp-journey::backdrop {
  background: rgba(14, 12, 10, 0.78);
  backdrop-filter: blur(3px);
}

body:has(.pp-journey[open]) {
  overflow: hidden;
}

.pp-journey__shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  max-height: inherit;
}

.pp-journey__header {
  display: grid;
  grid-template-columns: 1fr minmax(132px, 180px) 1fr;
  align-items: center;
  gap: var(--pp-space-3);
  min-height: 72px;
  padding: 12px 20px;
  border-bottom: var(--pp-rule-solid) solid var(--pp-char);
  background: var(--pp-paper);
}

.pp-journey__step-status {
  display: grid;
  gap: 7px;
  font-family: var(--pp-font-data);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-align: center;
  text-transform: uppercase;
}

.pp-journey__progress,
.pp-journey__progress > span {
  display: block;
  height: 5px;
}

.pp-journey__progress {
  background: var(--pp-crust);
}

.pp-journey__progress > span {
  width: 25%;
  background: var(--pp-ovenred);
  transition: width var(--pp-dur-base) var(--pp-ease);
}

.pp-journey__close {
  justify-self: end;
  width: 44px;
  height: 44px;
  padding: 0;
  border: var(--pp-rule-solid) solid var(--pp-char);
  background: transparent;
  color: var(--pp-char);
  font: 32px/1 var(--pp-font-body);
  cursor: pointer;
}

.pp-journey__close:hover {
  background: var(--pp-char);
  color: var(--pp-semolina);
}

.pp-journey__body {
  overflow: auto;
  overscroll-behavior: contain;
}

.pp-journey__step {
  padding: clamp(28px, 5vw, 56px);
}

.pp-journey__step[hidden],
.pp-journey__window[hidden],
.pp-journey__recognition[hidden],
.pp-field__error[hidden] {
  display: none;
}

.pp-journey__title {
  max-width: 650px;
  margin: 12px 0 18px;
  font-family: var(--pp-font-display);
  font-size: clamp(42px, 7vw, 68px);
  font-weight: 400;
  letter-spacing: var(--pp-display-track);
  line-height: 0.94;
  text-transform: uppercase;
}

.pp-journey__title:focus {
  outline: none;
}

.pp-journey__lede {
  max-width: 630px;
  margin: 0 0 28px;
  color: var(--pp-ink);
  font-family: var(--pp-font-body);
  font-size: var(--pp-body-m);
  line-height: var(--pp-body-m-lh);
}

.pp-journey__recognition {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--pp-space-3);
  margin-bottom: var(--pp-space-4);
  padding: 14px 16px;
  border-left: 5px solid var(--pp-basil);
  background: var(--pp-paper);
  font-family: var(--pp-font-data);
  font-size: 12px;
  line-height: 1.5;
}

.pp-journey__recognition-label {
  color: var(--pp-stone);
}

.pp-journey__recognition strong {
  flex: none;
  text-transform: uppercase;
}

.pp-journey__postcode-form {
  max-width: 620px;
}

.pp-journey__field-label,
.pp-journey__fieldset legend {
  display: block;
  margin-bottom: 10px;
  font-family: var(--pp-font-ui);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pp-journey__privacy {
  max-width: 620px;
  margin: 14px 0 0;
  color: var(--pp-stone);
  font-family: var(--pp-font-data);
  font-size: 10px;
  letter-spacing: 0.04em;
  line-height: 1.6;
}

.pp-journey__fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.pp-journey__fieldset + .pp-journey__fieldset {
  margin-top: var(--pp-space-5);
}

.pp-journey__fieldset > p {
  margin: -4px 0 14px;
  color: var(--pp-stone);
  font-size: var(--pp-body-s);
}

.pp-journey__choices {
  display: grid;
  gap: 10px;
}

.pp-journey__choices--days {
  grid-template-columns: repeat(4, 1fr);
}

.pp-journey__choices--windows {
  grid-template-columns: repeat(2, 1fr);
}

.pp-journey__choice {
  position: relative;
  display: block;
  min-width: 0;
  cursor: pointer;
}

.pp-journey__choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.pp-journey__choice span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 8px 10px;
  border: var(--pp-rule-solid) solid var(--pp-char);
  background: var(--pp-paper);
  font-family: var(--pp-font-ui);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-align: center;
  text-transform: uppercase;
  transition:
    background-color var(--pp-dur-fast) var(--pp-ease),
    color var(--pp-dur-fast) var(--pp-ease);
}

.pp-journey__choice:hover span {
  border-color: var(--pp-ovenred);
  color: var(--pp-ovenred);
}

.pp-journey__choice input:focus-visible + span {
  outline: 3px solid var(--pp-flame);
  outline-offset: 2px;
}

.pp-journey__choice input:checked + span {
  border-color: var(--pp-char);
  background: var(--pp-char);
  color: var(--pp-semolina);
}

.pp-journey__choice--wide {
  grid-column: span 2;
}

.pp-journey__window {
  animation: pp-journey-reveal var(--pp-dur-base) var(--pp-ease);
}

@keyframes pp-journey-reveal {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.pp-journey__actions {
  display: flex;
  justify-content: space-between;
  gap: var(--pp-space-3);
  margin-top: var(--pp-space-5);
  padding-top: var(--pp-space-4);
  border-top: var(--pp-rule-hair) solid var(--pp-crust);
}

.pp-journey__details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--pp-space-3);
}

.pp-journey__field {
  display: block;
}

.pp-journey__field--full {
  grid-column: 1 / -1;
}

.pp-journey__field .pp-input {
  width: 100%;
}

.pp-journey__field-label small {
  margin-left: 7px;
  color: var(--pp-stone);
  font-family: var(--pp-font-data);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.pp-journey__consent {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 12px;
  align-items: start;
  margin-top: var(--pp-space-4);
  color: var(--pp-ink);
  font-size: var(--pp-body-s);
  line-height: 1.5;
  cursor: pointer;
}

.pp-journey__consent input {
  width: 20px;
  height: 20px;
  margin: 1px 0 0;
  accent-color: var(--pp-ovenred);
}

.pp-journey__step--success {
  background:
    linear-gradient(var(--pp-semolina), var(--pp-semolina)) padding-box,
    var(--pp-semolina);
}

.pp-journey__count-card {
  margin-bottom: var(--pp-space-4);
  padding: 18px;
  border: var(--pp-rule-solid) solid var(--pp-char);
  background: var(--pp-paper);
}

.pp-journey__count-head {
  display: flex;
  justify-content: space-between;
  gap: var(--pp-space-3);
  margin-bottom: 12px;
  font-family: var(--pp-font-data);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pp-journey__count-track,
.pp-journey__count-track > span {
  display: block;
  height: 12px;
}

.pp-journey__count-track {
  background: var(--pp-crust-deep);
}

.pp-journey__count-track > span {
  width: 0;
  background: var(--pp-basil);
  transition: width var(--pp-dur-slow) var(--pp-ease);
}

/* Flame on char — the same pairing the manifesto mark uses, and the only one
   that carries this much weight. Char on ember was the right family of colour
   but far too quiet: the reward has to out-shout the progress bar above it and
   the share buttons below. */
.pp-journey__reward {
  position: relative;
  margin-bottom: var(--pp-space-4);
  padding: 24px;
  border: var(--pp-rule-solid) solid var(--pp-char);
  background: var(--pp-char);
  color: var(--pp-semolina);
}

.pp-journey__reward-kicker {
  color: var(--pp-flame);
  font-family: var(--pp-font-data);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.pp-journey__reward h3 {
  color: var(--pp-flame);
}

.pp-journey__reward p {
  color: var(--pp-ash);
}

/* Offer terms, folded away. Same <details> device as the FAQ, restyled for a
   char ground and sized down — it qualifies the promise above it without
   competing with it. */
.pp-journey__terms {
  margin-top: 14px;
  border-top: var(--pp-rule-hair) solid var(--pp-char-line);
}

.pp-journey__terms > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--pp-space-3);
  padding-top: 12px;
  color: var(--pp-flame);
  cursor: pointer;
  font-family: var(--pp-font-data);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  list-style: none;
  text-transform: uppercase;
}

.pp-journey__terms > summary::-webkit-details-marker { display: none; }

.pp-journey__terms > summary::after {
  content: "+";
  flex: none;
  font-size: 16px;
  line-height: 1;
}

.pp-journey__terms[open] > summary::after { content: "–"; }

.pp-journey__terms-body {
  padding-top: 10px;
}

.pp-journey__terms-body p {
  color: var(--pp-ash);
  font-size: var(--pp-body-s);
  line-height: var(--pp-body-s-lh);
}

.pp-journey__terms-body p + p {
  margin-top: 8px;
}

.pp-journey__reward h3,
.pp-journey__share-title {
  margin: 7px 0;
  font-family: var(--pp-font-ui);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.1;
  text-transform: uppercase;
}

.pp-journey__reward p,
.pp-journey__share-copy {
  margin: 0;
  font-size: var(--pp-body-s);
  line-height: var(--pp-body-s-lh);
}

/* Instagram cannot be shared to from the web; this note replaces the share
   sheet on browsers that have no navigator.share. */
.pp-journey__share-note {
  margin-top: 10px;
  color: var(--pp-stone);
  font-size: var(--pp-body-s);
  line-height: var(--pp-body-s-lh);
}

.pp-journey__qr-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 10px;
}

.pp-journey__share-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: var(--pp-space-4);
  align-items: end;
  margin-bottom: var(--pp-space-4);
}

.pp-journey__share-copy {
  margin-bottom: 14px;
  color: var(--pp-stone);
}

.pp-journey__share-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.pp-journey__share {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  padding: 8px 12px;
  border: var(--pp-rule-solid) solid var(--pp-char);
  color: #fff;
  font-family: var(--pp-font-ui);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}

.pp-journey__share:hover {
  filter: brightness(0.88);
}

.pp-journey__share--whatsapp { background: #128c4a; }
.pp-journey__share--facebook { background: #1877f2; }
.pp-journey__share--x { background: #000; }
.pp-journey__share--native { background: var(--pp-ovenred); }

.pp-journey__share img {
  flex: none;
}

.pp-journey__copy-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  margin-top: 10px;
}

.pp-journey__copy-row .pp-input {
  min-width: 0;
  border-right: 0;
  font-family: var(--pp-font-data);
  font-size: 10px;
}

.pp-journey__copy-status {
  min-height: 18px;
  margin: 7px 0 0;
  color: var(--pp-basil);
  font-family: var(--pp-font-data);
  font-size: 10px;
}

.pp-journey__qr {
  margin: 0;
  padding: 10px;
  border: var(--pp-rule-solid) solid var(--pp-char);
  background: #fff;
}

.pp-journey__qr img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  background: #fff;
}

.pp-journey__qr figcaption {
  margin-top: 8px;
  color: var(--pp-char);
  font-family: var(--pp-font-data);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
}

@media (max-width: 767px) {
  .pp-journey {
    width: 100vw;
    height: 100dvh;
    max-height: none;
    margin: 0;
    border: 0;
    box-shadow: none;
  }

  /* Bounded by the dialog, not merely floored by it. min-height let the shell
     grow past a dialog that clips its overflow, so a step taller than the
     screen pushed its own foot — the Continue button included — outside the
     dialog, where the body could not scroll to it and the page was locked
     behind it. The body row is what scrolls; it can only do that if the grid
     above it has a height to divide. */
  .pp-journey__shell {
    height: 100%;
  }

  .pp-journey__header {
    position: sticky;
    top: 0;
    z-index: 2;
    grid-template-columns: auto minmax(110px, 1fr) auto;
    min-height: 64px;
    padding: 8px 14px;
  }

  .pp-journey__header .pp-wordmark__type {
    display: none;
  }

  .pp-journey__step {
    padding: 30px 20px 40px;
  }

  .pp-journey__title {
    font-size: clamp(40px, 13vw, 56px);
  }

  .pp-journey__recognition {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .pp-journey__postcode-form .pp-inputgroup {
    display: grid;
    grid-template-columns: 1fr;
  }

  .pp-journey__postcode-form .pp-btn {
    width: 100%;
  }

  .pp-journey__choices--days {
    grid-template-columns: repeat(3, 1fr);
  }

  .pp-journey__choice--wide {
    grid-column: span 2;
  }

  .pp-journey__choices--windows,
  .pp-journey__details-grid,
  .pp-journey__share-layout {
    grid-template-columns: 1fr;
  }

  .pp-journey__field--full {
    grid-column: auto;
  }

  .pp-journey__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .pp-journey__actions .pp-btn {
    width: 100%;
    padding-inline: 12px;
  }

  .pp-journey__qr {
    width: min(220px, 100%);
    justify-self: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pp-journey__window {
    animation: none;
  }
}
