/* User-authored copy may be longer than the approved demo labels. Preserve
   the existing Rive composition without clipping words or shrinking targets. */
.contact-letter-page .letter-intro h1,
.contact-letter-page .letter-form-heading h2,
.contact-letter-page .letter-form-heading p,
.distilled-studio h1,
.distilled-studio h2,
.atlas-wayfinding h2,
.atlas-wayfinding .atlas-intro,
.atlas-route-copy,
.selector-heading h1 {
  overflow-wrap: anywhere;
}
.contact-letter-page .project-type label,
.contact-letter-page .letter-priority-options label {
  max-width: 100%;
  min-width: 0;
}
.contact-letter-page .project-type label > span,
.contact-letter-page .letter-priority-options label > span {
  box-sizing: border-box;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}

/* Replacement photographs cannot inherit the demo's pale sky/dark forest
   exceptions. Paper stays local to the reading, not over the whole scene. */
.journey-chapter[data-rive-customer-photo] {
  --rive-customer-paper: #f4f6f1;
  --rive-customer-ink: #193a36;
}
.journey-chapter[data-rive-customer-photo] .rive-customer-photograph {
  display: none;
}
body.bespoke-home
  .journey-chapter[data-rive-customer-photo]
  .passage-copy
  :is(.passage-question, .passage-description, .passage-project-link) {
  color: var(--rive-customer-ink) !important;
  background: var(--rive-customer-paper);
  box-shadow: 0 0 0 8px var(--rive-customer-paper);
  text-shadow: none !important;
  overflow-wrap: anywhere;
}
body.bespoke-home
  .journey-chapter[data-rive-customer-photo]
  .passage-title-face {
  color: var(--rive-customer-ink);
  background: var(--rive-customer-paper);
  box-shadow: 0 0 0 6px var(--rive-customer-paper);
}
body.bespoke-home
  .journey-chapter[data-rive-customer-photo]
  .passage-project-link {
  border-color: #193a3666 !important;
}
body.bespoke-home
  .journey-chapter[data-rive-customer-photo]
  .passage-copy::before,
body.bespoke-home
  .journey-chapter[data-rive-customer-photo]
  .passage-question::before {
  display: none;
}
body.bespoke-home .journey-chapter[data-rive-customer-photo] .scene-caption,
body.bespoke-home .journey-chapter[data-rive-customer-photo] .passage-label {
  color: var(--rive-customer-ink) !important;
  text-shadow: none !important;
}
body.bespoke-home
  .journey-chapter[data-rive-customer-photo]
  .scene-caption
  > span,
body.bespoke-home .journey-chapter[data-rive-customer-photo] .label-place {
  background: var(--rive-customer-paper);
  box-shadow: 0 0 0 6px var(--rive-customer-paper);
  overflow-wrap: anywhere;
}

/* The final print is the client's photograph, not a 3:2 demo maquette. */
.bespoke-coda[data-rive-customer-photo] .coda-model {
  min-width: 0;
  max-width: 100%;
  margin-left: 0;
  margin-right: 0;
  transform: none;
}
.bespoke-coda[data-rive-customer-photo] .coda-model img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: auto;
  object-fit: contain;
}
.bespoke-coda[data-rive-customer-photo]
  :is(
    .coda-copy h2,
    .coda-copy p,
    .coda-model figcaption,
    .coda-register strong
  ) {
  min-width: 0;
  overflow-wrap: anywhere;
}

/* Long customer copy cannot be safely overlaid at fixed absolute coordinates.
   Keep the same Rive photograph/type/links in normal flow instead. The global
   world pipeline, chapter keys and approved native compositions are untouched. */
body.bespoke-home .journey-chapter[data-rive-customer-reading="flow"] {
  height: auto;
  min-height: 0;
}
body.bespoke-home
  .journey-chapter[data-rive-customer-reading="flow"]
  .chapter-stage {
  position: relative;
  top: auto;
  height: auto;
  min-height: 0;
  padding: max(132px, calc(var(--site-header-height, 104px) + 28px))
    var(--space) 64px;
  background: var(--rive-customer-paper);
  color: var(--rive-customer-ink);
  isolation: isolate;
  overflow: visible;
  mask-image: none !important;
}
body.bespoke-home
  .journey-chapter[data-rive-customer-reading="flow"]
  .rive-customer-photograph {
  display: block;
  position: relative;
  z-index: 1;
  margin: 0 auto 28px;
  max-width: 1100px;
}
body.bespoke-home
  .journey-chapter[data-rive-customer-reading="flow"]
  .rive-customer-photograph
  img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}
body.bespoke-home
  .journey-chapter[data-rive-customer-reading="flow"]
  .passage-still {
  display: none;
}
body.bespoke-home
  .journey-chapter[data-rive-customer-reading="flow"]
  .scene-caption {
  position: static;
  max-width: 1100px;
  margin: 0 auto 24px;
}
body.bespoke-home
  .journey-chapter[data-rive-customer-reading="flow"]
  .chapter-copy.passage-copy {
  position: relative;
  inset: auto;
  width: 100%;
  height: auto;
  max-width: 1100px;
  margin: 0 auto;
  --passage-title-angle: 0deg;
  --passage-title-x: 0px !important;
  --passage-title-y: 0px !important;
  --passage-title-sx: 1 !important;
  --passage-title-opacity: 1 !important;
}
body.bespoke-home
  .journey-chapter[data-rive-customer-reading="flow"]
  .passage-copy
  :is(
    .passage-question,
    .passage-title,
    .passage-description,
    .passage-project-link
  ) {
  position: relative;
  inset: auto;
  width: fit-content;
  max-width: 100%;
  margin: 0 0 22px;
  text-align: left;
  color: var(--rive-customer-ink);
  opacity: 1 !important;
  translate: none !important;
  transform: none !important;
  text-shadow: none;
  background: transparent;
  box-shadow: none;
  overflow-wrap: anywhere;
}
body.bespoke-home
  .journey-chapter[data-rive-customer-reading="flow"]
  .passage-copy
  :is(.passage-question, .passage-description) {
  max-width: 660px;
  font-size: 16px;
  line-height: 1.75;
}
body.bespoke-home
  .journey-chapter[data-rive-customer-reading="flow"]
  .passage-title {
  font-size: clamp(62px, 8vw, 124px);
}
body.bespoke-home
  .journey-chapter[data-rive-customer-reading="flow"]
  .passage-title-face {
  max-width: 100%;
  white-space: normal;
  transform: none !important;
  opacity: 1 !important;
  background: transparent;
  box-shadow: none;
}
body.bespoke-home
  .journey-chapter[data-rive-customer-reading="flow"]
  :is(.scene-drag-zone, .passage-label, .passage-intention-line) {
  display: none;
}

/* Small screens and reduced motion always use the full photographic reading
   for replacement photos, even when the customer's sentences are short. */
@media (max-width: 680px), (prefers-reduced-motion: reduce) {
  body.bespoke-home .journey-chapter[data-rive-customer-photo] {
    height: auto;
    min-height: 0;
  }
  body.bespoke-home .journey-chapter[data-rive-customer-photo] .chapter-stage {
    position: relative;
    top: auto;
    height: auto;
    min-height: 0;
    padding: max(116px, calc(var(--site-header-height, 84px) + 28px))
      var(--space) 48px;
    background: var(--rive-customer-paper);
    color: var(--rive-customer-ink);
    isolation: isolate;
    overflow: visible;
    mask-image: none !important;
  }
  body.bespoke-home
    .journey-chapter[data-rive-customer-photo]
    .rive-customer-photograph {
    display: block;
    position: relative;
    z-index: 1;
    margin: 0 auto 26px;
    max-width: 1100px;
  }
  body.bespoke-home
    .journey-chapter[data-rive-customer-photo]
    .rive-customer-photograph
    img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
  }
  body.bespoke-home .journey-chapter[data-rive-customer-photo] .passage-still {
    display: none;
  }
  body.bespoke-home .journey-chapter[data-rive-customer-photo] .scene-caption {
    position: static;
    max-width: 1100px;
    margin: 0 auto 24px;
  }
  body.bespoke-home
    .journey-chapter[data-rive-customer-photo]
    .chapter-copy.passage-copy {
    position: relative;
    inset: auto;
    width: 100%;
    height: auto;
    max-width: 1100px;
    margin: 0 auto;
    --passage-title-angle: 0deg;
    --passage-title-x: 0px !important;
    --passage-title-y: 0px !important;
    --passage-title-sx: 1 !important;
    --passage-title-opacity: 1 !important;
  }
  body.bespoke-home
    .journey-chapter[data-rive-customer-photo]
    .passage-copy
    :is(
      .passage-question,
      .passage-title,
      .passage-description,
      .passage-project-link
    ) {
    position: relative;
    inset: auto;
    width: fit-content;
    max-width: 100%;
    margin: 0 0 22px;
    text-align: left;
    color: var(--rive-customer-ink);
    opacity: 1 !important;
    translate: none !important;
    transform: none !important;
    text-shadow: none;
    background: transparent;
    box-shadow: none;
    overflow-wrap: anywhere;
  }
  body.bespoke-home
    .journey-chapter[data-rive-customer-photo]
    .passage-copy
    :is(.passage-question, .passage-description) {
    max-width: 660px;
    font-size: 15px;
    line-height: 1.75;
  }
  body.bespoke-home .journey-chapter[data-rive-customer-photo] .passage-title {
    font-size: clamp(56px, 16vw, 94px);
  }
  body.bespoke-home
    .journey-chapter[data-rive-customer-photo]
    .passage-title-face {
    max-width: 100%;
    white-space: normal;
    transform: none !important;
    opacity: 1 !important;
    background: transparent;
    box-shadow: none;
  }
  body.bespoke-home
    .journey-chapter[data-rive-customer-photo]
    :is(.scene-drag-zone, .passage-label, .passage-intention-line) {
    display: none;
  }
}
