/* CHELATE photography and narrow-screen layout review v0.1.0. */
.stage-frame.journey-frame { aspect-ratio: 3 / 2; }
.journey-frame > img[data-stage] {
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--journey-scale, 100%);
  height: auto;
  max-width: none;
  transform: translate(var(--journey-x, -50%), var(--journey-y, -50%));
}
.journey-frame > img[hidden] { display: none; }
.journey-frame > [data-stage="cherry"],
.journey-frame > [data-stage="inside"] { --journey-x: -54%; }
.journey-frame > [data-stage="green"],
.journey-frame > [data-stage="roast"] {
  --journey-x: -52.5%;
  --journey-scale: 88%;
}
.journey-frame > [data-stage="pack"] { --journey-y: -48%; }
#tree-to-cup .stage-text { min-height: 6.25rem; }

@media (min-width: 800px) {
  #tree-to-cup { grid-template-columns: minmax(0, 1.18fr) minmax(0, 1fr); }
}

@media (max-width: 599px) {
  .hero {
    height: calc(150vw + 208px);
    min-height: 0;
  }
  .hero .hero-opening {
    top: clamp(91px, 25vw, 132px);
    width: calc(40vw - var(--gutter) - 8px);
    font-size: clamp(20px, 6vw, 30px);
    text-wrap: initial;
  }
  .hero .hero-ending {
    top: calc(150vw + 8px);
    max-width: none;
    font-size: clamp(29px, 8.6vw, 42px);
  }
  .hero .hero-line { top: calc(150vw + 62px); }
  .hero .hero-copy > .cta {
    top: auto;
    bottom: var(--space-m);
  }
}

@media (max-width: 360px) {
  .hero { height: calc(150vw + 232px); }
}

@media (min-width: 600px) and (max-width: 799px) {
  .hero {
    height: clamp(580px, 90svh, 760px);
    min-height: 0;
  }
  .hero .hero-photo { width: min(61vw, 430px); }
  .hero .hero-opening,
  .hero .hero-ending,
  .hero .hero-line {
    left: var(--gutter);
    right: auto;
    width: calc(39vw - var(--gutter));
  }
  .hero .hero-opening {
    top: 158px;
    font-size: clamp(33px, 5.8vw, 44px);
  }
  .hero .hero-ending {
    top: 262px;
    font-size: clamp(32px, 5.6vw, 42px);
  }
  .hero .hero-line { top: 382px; }
  .hero .hero-copy > .cta { top: 500px; }
}

@media (max-width: 799px) {
  #tree-to-cup .stage-choices {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  #tree-to-cup .stage-choices button {
    padding-inline: .25rem;
    min-height: 44px;
  }
}
