/* Itinerary: a side-scrolling walk across the painted grass (driven by js/itinerary.js) */
.itinerary { --it-paper: #FAF6EE; --it-plum: #7F2C44; --it-sage: #757D44; --it-display: "Cormorant Garamond", Georgia, serif;
  background: var(--it-paper); }
.it-intro { padding-bottom: clamp(20px, 4vw, 48px); }
.it-track { position: relative; }
.it-stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; background: var(--it-paper); }
.it-world { position: absolute; left: 0; top: 0; width: 0; height: 100%; will-change: transform; }
.it-sky { position: absolute; left: 0; top: 0; height: 100%; z-index: 0; pointer-events: none; }
.it-sky img { position: absolute; display: block; height: auto; width: clamp(70px, 9vw, 120px); transform: translate(-50%, -50%); opacity: 0; }
.it-grass { position: absolute; z-index: 1; pointer-events: none; }
.it-grass img { position: absolute; top: 0; height: 100%; display: block; max-width: none; }
.it-scene { position: absolute; z-index: 2; display: block; height: auto; max-width: none; }

/* words on the grass: calendar day on the left, the activity to its right */
.it-words { position: absolute; z-index: 3; display: flex; align-items: flex-start; gap: 18px; opacity: .45; transition: opacity 400ms; }
.it-words.is-here { opacity: 1; }
/* the painted Chinese wall calendar, with the day written on it */
.it-cal { flex: none; position: relative; width: 82px; aspect-ratio: 1384 / 2030; background: url("../images/itinerary/calendar.webp") center / 100% 100% no-repeat;
  transform: rotate(-2deg); color: var(--it-plum); text-align: center; }
.it-cal > * { position: absolute; left: 6%; right: 14%; display: block; }
.it-cal .top { top: 14%; color: #F9F4EC; font: 500 .6rem/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; }
.it-cal b { top: 38%; font: 600 2.3rem/1 var(--it-display); }
.it-cal .bot { top: 66%; font: italic 500 .92rem/1 var(--it-display); color: #85364C; }
.it-what { min-width: 0; }
.it-what .when { display: block; font: 500 .62rem/1.2 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--it-sage); }
.it-what h3 { font: italic 600 clamp(1.9rem, 3vw, 2.5rem)/1.05 var(--it-display); color: var(--it-plum); margin: 3px 0 4px; letter-spacing: 0; }
.it-what p { margin: 0; max-width: 34ch; font: 500 1.12rem/1.35 var(--it-display); color: var(--ink-soft); }

/* the two of us */
.it-pair { position: absolute; left: 0; top: 0; z-index: 4; pointer-events: none; }
.it-pair .flip, .it-pair .bob { position: absolute; inset: 0; }
.it-pair .flip { transition: transform 260ms var(--ease-out); }
.it-pair .bob { transform-origin: 50% 100%; }
.it-pair img { position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); visibility: hidden; max-width: none; }
.it-pair img.on { visibility: visible; }
.it-poof { position: absolute; left: 50%; top: 45%; width: 0; height: 0; }
.it-poof i { position: absolute; left: -7px; top: -7px; width: 14px; height: 14px; opacity: 0; background: #D4C28F;
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); }
.it-pair.poofing .it-poof i { animation: it-poof 900ms var(--ease-out) forwards; }
.it-poof i:nth-child(1) { --tx: -46px; --ty: -40px; } .it-poof i:nth-child(2) { --tx: 48px; --ty: -36px; animation-delay: 60ms !important; }
.it-poof i:nth-child(3) { --tx: -54px; --ty: 6px; animation-delay: 120ms !important; } .it-poof i:nth-child(4) { --tx: 56px; --ty: 10px; animation-delay: 40ms !important; }
.it-poof i:nth-child(5) { --tx: -8px; --ty: -62px; animation-delay: 90ms !important; } .it-poof i:nth-child(6) { --tx: 14px; --ty: 44px; animation-delay: 150ms !important; background: #CA7C87; }
@keyframes it-poof { 0% { opacity: 0; transform: translate(0, 0) scale(.3); } 30% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--tx), var(--ty)) scale(1) rotate(90deg); } }

@media (max-width: 760px) {
  .it-words { gap: 14px; }
  .it-cal { width: 68px; }
  .it-cal .top { font-size: .52rem; letter-spacing: .14em; }
  .it-cal b { font-size: 1.9rem; }
  .it-cal .bot { font-size: .76rem; }
  .it-what h3 { font-size: 1.75rem; }
  .it-what p { font-size: 1.02rem; }
}
@media (prefers-reduced-motion: reduce) { .it-pair .flip { transition: none; } .it-words { transition: none; } }
.itinerary .visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
