.adventure {
  --night: #100d1d;
  --lilac: #e2cdff;
  --lavender: #bd9df4;
  --paper: #ffe28b;
  --paper-ink: #2e2117;
  background: var(--night);
  color: #fbf8ff;
  overflow: clip;
}

.adventure-hero, .journey-step, .journey-demo {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(28px, 6vw, 100px);
}

.adventure-hero {
  min-height: min(780px, 87svh);
  padding-block: clamp(44px, 7vw, 104px);
}

.adventure h1, .adventure h2 {
  margin: 0;
  letter-spacing: -.07em;
  line-height: .99;
  text-wrap: balance;
}

.adventure h1 { max-width: 10ch; font-size: clamp(58px, 8.3vw, 126px); }
.adventure h2 { max-width: 13ch; font-size: clamp(40px, 5.6vw, 83px); }

.adventure-copy p {
  max-width: 39ch;
  margin: 22px 0 0;
  color: #d7cde4;
  font-size: clamp(17px, 1.6vw, 22px);
  line-height: 1.55;
}

.adventure-actions { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 30px; align-items: center; }
.adventure .button-primary { background: var(--lilac); color: #28113e; }
.adventure .text-link { gap: .36em; color: var(--lilac); }

.journey-visual {
  position: relative;
  isolation: isolate;
  min-width: 0;
  margin: 0;
  aspect-ratio: 1 / 1;
  border: 1px solid #6b518583;
  border-radius: 26px;
  background: #241835;
  box-shadow: 0 24px 64px #08061196;
}

.journey-visual > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

.journey-visual::after {
  position: absolute;
  z-index: 1;
  inset: 38% 0 0;
  border-radius: inherit;
  background: linear-gradient(transparent, #110b1ccc);
  content: '';
  pointer-events: none;
}

.hero-visual { aspect-ratio: 1 / 1.04; }
.hero-visual > img { object-position: 50% 56%; }
.hero-visual .journey-note { top: 25%; }
.journey-visual figcaption { position: absolute; z-index: 2; right: 24px; bottom: 20px; left: 24px; color: #fbf8ff; font-size: 14px; font-weight: 650; }

.journey-note {
  position: absolute;
  z-index: 3;
  top: 30%;
  left: 13%;
  width: min(61%, 246px);
  min-height: 128px;
  margin: 0;
  padding: clamp(18px, 3.1vw, 34px);
  transform: rotate(-7deg);
  border-radius: 3px 3px 14px 3px;
  background: var(--paper);
  box-shadow: 5px 14px 24px #140b226b;
  color: var(--paper-ink);
  font: 650 clamp(21px, 2.8vw, 35px)/1.12 "Avenir Next", Avenir, system-ui, sans-serif;
  letter-spacing: -.04em;
}

.journey-note::before {
  position: absolute;
  top: -13px;
  left: calc(50% - 10px);
  width: 20px;
  height: 20px;
  border: 4px solid #f4e7ff;
  border-radius: 50%;
  background: #8042de;
  box-shadow: 2px 4px 10px #20102cab;
  content: '';
}

.journey-note--violet { top: 33%; left: 36%; width: min(56%, 246px); background: #e2c8ff; color: #321848; transform: rotate(6deg); }
.journey-note--rose { top: 31%; left: 18%; background: #f9d6e8; color: #3b172d; transform: rotate(-6deg); }

.journey-step, .journey-demo {
  min-height: clamp(560px, 83svh, 820px);
  padding-block: clamp(56px, 8vw, 120px);
  border-top: 1px solid #453956;
  scroll-margin-top: 16px;
}

.journey-step:nth-of-type(even) .adventure-copy { grid-column: 2; }
.journey-step:nth-of-type(even) .journey-visual { grid-area: 1 / 1; }
.journey-step .journey-visual { align-self: start; }
.journey-demo .map-panel { margin: 0; }
.journey-demo .map-frame { height: clamp(300px, 45vw, 492px); }

.adventure-outro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .7fr);
  align-items: center;
  gap: clamp(20px, 6vw, 80px);
  margin-bottom: clamp(40px, 7vw, 100px);
  padding: clamp(26px, 6vw, 80px);
  border: 1px solid #745792;
  border-radius: 25px;
  background: #2b1c42;
}

.adventure-outro h2 { font-size: clamp(34px, 5vw, 68px); }
.adventure-outro p { margin: 0; }
.adventure-outro .adventure-actions { margin-top: 18px; }

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .journey-step .journey-note {
      animation-name: pin-note;
      animation-duration: 1ms;
      animation-fill-mode: both;
      animation-timing-function: linear;
      animation-timeline: view(block);
      animation-range: entry 0% entry 90%;
    }
    @keyframes pin-note {
      from { translate: 0 -42px; scale: .92; opacity: .2; }
      to { translate: 0 0; scale: 1; opacity: 1; }
    }
  }
}

@media (min-width: 721px) {
  .journey-step .journey-visual { position: sticky; top: 10vh; }
}

@media (max-width: 720px) {
  .adventure-hero, .journey-step, .journey-demo, .adventure-outro { grid-template-columns: minmax(0, 1fr); }
  .adventure-hero, .journey-step, .journey-demo { min-height: 0; }
  .journey-step:nth-of-type(even) .adventure-copy, .journey-step:nth-of-type(even) .journey-visual { grid-area: auto; }
  .adventure h1 { max-width: 11ch; font-size: clamp(49px, 11vw, 90px); }
  .adventure h2 { max-width: 16ch; }
  .journey-visual { aspect-ratio: 1 / .88; }
  .journey-note { min-height: 0; padding: 22px; }
  .adventure-outro { gap: 18px; }
}
