/* WanderMile motion layer: parallax heroes, image reveals, page transitions, pinned stories,
   the experience rail, galleries, hover previews and the gold route map.
   Everything here has a still, readable resting state; reduced-motion keeps the layouts and drops the movement. */

/* ---------------------------------------------------------------- page-to-page transitions */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .45s; animation-timing-function: cubic-bezier(.22, .61, .36, 1); }
::view-transition-group(hero-img) { animation-duration: .7s; animation-timing-function: cubic-bezier(.22, .61, .36, 1); }
.hero__media img, .exp-hero__media img { view-transition-name: hero-img; }
.hdr { view-transition-name: site-header; }

/* ---------------------------------------------------------------- hero: parallax layers and headline */
.hero__media { will-change: transform; }
.hero__media img { animation: none; transform: none; }
.hero .word { display: inline-block; }
.hero.is-dusk::after { background: linear-gradient(180deg, rgba(60, 38, 30, .35) 0%, rgba(30, 30, 48, .55) 55%, rgba(20, 24, 40, .82) 100%); }
.hero__season { font-family: var(--font-caps); font-size: .7rem; letter-spacing: .2em; text-transform: uppercase; color: var(--gold-200); margin-top: 18px; }

/* ---------------------------------------------------------------- image reveal frame (JS adds .m-reveal) */
.m-mask { overflow: hidden; }

/* ---------------------------------------------------------------- experience rail */
.rail { position: relative; overflow: hidden; }
.rail__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.rail__track { display: flex; gap: clamp(18px, 2vw, 32px); padding: 8px var(--gutter) 24px; width: max-content; }
.rail .card--exp { width: clamp(250px, 23vw, 340px); flex: 0 0 auto; }
.rail .card--exp .card__media { aspect-ratio: 1 / 1; }
.rail.is-pinned .sec-head { margin-bottom: 24px; }
.rail__progress { height: 2px; margin: 8px var(--gutter) 0; background: var(--line); position: relative; overflow: hidden; border-radius: 2px; }
.rail__progress i { position: absolute; inset: 0; background: var(--metal); background-size: 200% 100%; transform-origin: 0 50%; transform: scaleX(var(--rp, .08)); }
.rail__hint { font-family: var(--font-caps); font-weight: 600; font-size: .68rem; letter-spacing: .18em; text-transform: uppercase; color: var(--gold-700); }
/* without the pinned scroll (phones, reduced motion, no GSAP) the rail is a native swipe row */
.rail:not(.is-pinned) .rail__viewport { overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.rail:not(.is-pinned) .card--exp { scroll-snap-align: start; }

/* ---------------------------------------------------------------- pinned story: sticky picture, steps scroll past */
.story { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 80px); align-items: start; }
.story__media { position: sticky; top: calc(var(--hdr-h) + 32px); aspect-ratio: 4 / 5; max-height: calc(100vh - var(--hdr-h) - 64px); border-radius: var(--radius); overflow: hidden; background: var(--navy); }
.story__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.06); transition: opacity .9s var(--ease), transform 1.6s var(--ease); }
.story__media img.is-on { opacity: 1; transform: none; }
.story__media::after { content: ""; position: absolute; inset: 14px; border: 1px solid rgba(237, 209, 144, .55); border-radius: 2px; pointer-events: none; }
.story__count { position: absolute; z-index: 2; left: 28px; bottom: 24px; font-family: var(--font-caps); font-weight: 600; letter-spacing: .2em; color: var(--ivory); font-size: .8rem; text-shadow: 0 1px 8px rgba(0, 0, 0, .4); }
.story__steps { display: grid; gap: 0; }
.story__step { min-height: 62vh; display: flex; flex-direction: column; justify-content: center; padding: 24px 0; border-top: 1px solid var(--line);  transition: opacity .5s var(--ease); }
.story__step:first-child { border-top: 0; }
.story__step { opacity: 1; box-shadow: inset 2px 0 0 transparent; padding-left: 18px; transition: box-shadow .5s var(--ease); }
.story__step h3 { transition: color .5s var(--ease); }
.story__step:not(.is-on) h3 { color: var(--muted); }
.story__step.is-on { box-shadow: inset 2px 0 0 var(--gold-500); }
.story__step .meta { margin-bottom: 10px; }
.story__step h3 { font-family: var(--font-display); font-size: clamp(1.7rem, 2.6vw, 2.4rem); color: var(--navy); margin-bottom: .4em; }
.story__step p { max-width: 30em; color: var(--muted); }
.story__step img { display: none; }
.band--dark .story__step h3 { color: var(--ivory); }
.band--dark .story__step { border-color: rgba(217, 184, 118, .2); }
.band--dark .story__step p { color: rgba(247, 243, 234, .8); }
.band--dark .story__step:not(.is-on) h3 { color: rgba(247, 243, 234, .72); }
@media (max-width: 900px) {
  .story { grid-template-columns: 1fr; }
  .story__media { display: none; }
  .story__step { min-height: 0; opacity: 1; padding: 28px 0; }
  .story__step img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius); margin-bottom: 18px; }
}

/* ---------------------------------------------------------------- gold route map */
.mapstory { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(28px, 4vw, 72px); align-items: start; }
.map { position: sticky; top: calc(var(--hdr-h) + 24px); }
.map svg { width: 100%; height: auto; display: block; border-radius: var(--radius); background: #16223a; }
.map__land { fill: #22324f; stroke: rgba(217, 184, 118, .55); stroke-width: .8; }
.map__route { fill: none; stroke: url(#goldline); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 6px rgba(237, 209, 144, .45)); }
.map__ghost { fill: none; stroke: rgba(237, 209, 144, .22); stroke-width: 1.5; stroke-dasharray: 2 6; }
.map__pin circle { fill: #16223a; stroke: var(--gold-300); stroke-width: 2; transition: r .4s var(--ease), fill .4s; }
.map__pin.is-on circle { fill: var(--gold-200); r: 9; }
.map__pin.is-partner circle { stroke-dasharray: 3 3; }
.map__pin text { fill: rgba(247, 243, 234, .7); font-family: var(--font-caps); font-weight: 600; font-size: 15px; letter-spacing: .08em; transition: fill .4s; paint-order: stroke; stroke: #16223a; stroke-width: 4px; }
.map__pin.is-on text { fill: var(--gold-100); }
.map__label { fill: rgba(247, 243, 234, .28); font-family: var(--font-display); font-size: 26px; font-style: italic; letter-spacing: .3em; }
.map__legend { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 14px; font-size: .85rem; color: rgba(247, 243, 234, .75); }
.map__legend i { display: inline-block; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--gold-300); margin-right: 6px; vertical-align: -1px; }
.map__legend i.dash { border-style: dashed; }
.mapstory__steps { display: grid; }
.mapstep { min-height: 54vh; display: flex; flex-direction: column; justify-content: center; gap: 10px; padding: 20px 0; border-top: 1px solid rgba(217, 184, 118, .2); box-shadow: inset 2px 0 0 transparent; padding-left: 18px; transition: box-shadow .5s var(--ease); color: var(--ivory); text-decoration: none; }
.mapstep:first-child { border-top: 0; }
.mapstep.is-on { box-shadow: inset 2px 0 0 var(--gold-400); }
.mapstep:not(.is-on) h3 { color: rgba(247, 243, 234, .72); }
.mapstep:not(.is-on) img { opacity: .55; transition: opacity .5s var(--ease); }
.mapstep img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); }
.mapstep h3 { font-family: var(--font-display); font-size: clamp(1.6rem, 2.4vw, 2.2rem); color: var(--ivory); margin: 4px 0 0; }
.mapstep p { margin: 0; color: rgba(247, 243, 234, .8); }
.mapstep .meta { color: var(--gold-on-dark); }
@media (max-width: 900px) {
  .mapstory { grid-template-columns: 1fr; }
  .map { position: sticky; top: var(--hdr-h); z-index: 2; margin-inline: calc(-1 * var(--gutter)); }
  .map svg { border-radius: 0; max-height: 42vh; }
  .map__legend { display: none; }
  .mapstep { min-height: 0; opacity: 1; padding: 28px 0; }
}

.map--zoom .map__land { stroke-width: .25; }
.map--zoom .map__route { stroke-width: 1; filter: drop-shadow(0 0 2px rgba(237, 209, 144, .5)); }
.map--zoom .map__ghost { stroke-width: .5; stroke-dasharray: .8 2; }
.map--zoom .map__pin circle { r: 2; stroke-width: .7; }
.map--zoom .map__pin.is-on circle { r: 3; }
.map--zoom .map__pin text { font-size: 5px; stroke-width: 1.4px; }

/* ---------------------------------------------------------------- gallery carousel */
.carousel { position: relative; }
.carousel__viewport { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; }
.carousel__viewport::-webkit-scrollbar { display: none; }
.carousel__viewport figure { margin: 0; flex: 0 0 min(78vw, 1100px); scroll-snap-align: center; position: relative; }
.carousel__viewport img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.carousel__viewport figcaption { position: static; padding: 14px 20px 4px; font-family: var(--font-body); font-size: .9rem; line-height: 1.5; letter-spacing: 0; text-transform: none; color: var(--navy); text-shadow: none; max-width: 68ch; }
.carousel__nav { display: flex; gap: 10px; justify-content: flex-end; padding: 16px var(--gutter) 0; }
.carousel__btn { width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--gold-500); background: transparent; color: var(--navy); cursor: pointer; font-size: 1.2rem; position: relative; overflow: hidden; isolation: isolate; transition: color .3s; }
.carousel__btn::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--metal); background-size: 260% 100%; transform: scale(0); border-radius: 50%; transition: transform .4s var(--ease); }
.carousel__btn:hover::before, .carousel__btn:focus-visible::before { transform: scale(1); }
.carousel__dots { display: flex; gap: 8px; align-items: center; margin-right: auto; padding-left: 4px; }
.carousel__dots i { width: 22px; height: 2px; background: var(--line-strong); transition: background .3s, width .3s; }
.carousel__dots i.is-on { width: 44px; background: var(--gold-500); }

/* ---------------------------------------------------------------- hover preview index */
.index-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.index-list a { display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: baseline; padding: 22px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--navy); transition: padding .4s var(--ease), color .3s; }
.index-list a strong { font-family: var(--font-display); font-weight: 400; font-size: clamp(1.6rem, 3vw, 2.6rem); line-height: 1.1; }
.index-list a span { font-family: var(--font-caps); font-weight: 600; font-size: .7rem; letter-spacing: .18em; text-transform: uppercase; color: var(--gold-700); }
.index-list a:hover, .index-list a:focus-visible { padding-left: 18px; color: var(--gold-700); }
.preview { position: fixed; z-index: 95; left: 0; top: 0; width: 300px; aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; pointer-events: none; opacity: 0; transform: translate(-50%, -50%) scale(.9); transition: opacity .3s, transform .4s var(--ease); box-shadow: 0 30px 60px -20px rgba(37, 53, 81, .55); }
.preview.is-on { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.preview img { width: 100%; height: 100%; object-fit: cover; }
.preview::after { content: ""; position: absolute; inset: 8px; border: 1px solid rgba(237, 209, 144, .7); }
@media (hover: none) { .preview { display: none; } }

/* ---------------------------------------------------------------- mega menu image swap */
.mega__feature img { transition: opacity .35s, transform 1s var(--ease); }
.mega__feature.is-swapping img { opacity: .2; }

/* ---------------------------------------------------------------- reduced motion */
@media (prefers-reduced-motion: reduce) {
  .story__media img { transition: none; }
  .story__step, .mapstep { opacity: 1; }
}

@media (max-width: 760px) { .proto-bar { bottom: 80px; } }

/* ---------------------------------------------------------------- route maps (rmap), 1 Nov 2026
   --u is set by maps.js: map units per screen pixel, so sizes below are in screen pixels at any zoom */
.rmap { margin: 0; }
.rmap__svg { width: 100%; height: auto; display: block; border-radius: var(--radius); --u: 1; }
.rmap__sea { fill: #13203a; }
.rmap__land { fill: #2d4166; stroke: rgba(217, 184, 118, .6); stroke-width: calc(var(--u) * .8px); stroke-linejoin: round; }
.rmap__borders { fill: none; stroke: rgba(237, 209, 144, .35); stroke-width: calc(var(--u) * 1px); stroke-dasharray: calc(var(--u) * 3px) calc(var(--u) * 3px); }
.rmap__ctx { font-family: var(--font-caps); font-weight: 600; font-size: calc(var(--u) * 11px); letter-spacing: .3em; fill: rgba(247, 243, 234, .32); text-anchor: middle; pointer-events: none; }
.rmap__ctx--sea { font-family: var(--font-display); font-style: italic; font-weight: 400; letter-spacing: .2em; fill: rgba(217, 184, 118, .45); font-size: calc(var(--u) * 14px); }
.rmap__ctx--city { letter-spacing: .12em; font-size: calc(var(--u) * 10px); }
.rmap__ctx.is-crowded { display: none; }
.rmap__ghost { fill: none; stroke: rgba(237, 209, 144, .22); stroke-width: calc(var(--u) * 1.2px); stroke-linecap: round; stroke-linejoin: round; }
.rmap__ghost--road { stroke-dasharray: calc(var(--u) * 4px) calc(var(--u) * 4px); }
.rmap__ghost--air { stroke-dasharray: calc(var(--u) * 1px) calc(var(--u) * 5px); }
.rmap__mask { fill: none; stroke: #fff; stroke-width: calc(var(--u) * 12px); stroke-linecap: round; stroke-linejoin: round; transition: stroke-dashoffset 1.3s var(--ease); }
.rmap__leg { fill: none; stroke: var(--gold-200); stroke-width: calc(var(--u) * 2.6px); stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 calc(var(--u) * 3px) rgba(237, 209, 144, .55)); }
.rmap__leg--road { stroke: var(--gold-300); stroke-dasharray: calc(var(--u) * 7px) calc(var(--u) * 5px); }
.rmap__leg--air { stroke: var(--ivory); stroke-width: calc(var(--u) * 2px); stroke-dasharray: calc(var(--u) * .5px) calc(var(--u) * 6px); }
.rmap__icos { transform: scale(var(--u)); }
.rmap__ico use { fill: #13203a; stroke: var(--gold-200); stroke-width: 1.4; stroke-linejoin: round; }
.rmap__ico { opacity: 0; transition: opacity .6s var(--ease) .5s; }
.rmap__ico.is-on, .rmap__ico.is-past { opacity: 1; }
.rmap__dot { r: calc(var(--u) * 6.5px); fill: #13203a; stroke: var(--gold-300); stroke-width: calc(var(--u) * 2px); transition: r .4s var(--ease), fill .4s; }
.rmap__hit { r: calc(var(--u) * 18px); fill: transparent; }
.rmap__n { font-family: var(--font-caps); font-weight: 600; font-size: calc(var(--u) * 8.5px); fill: var(--gold-200); text-anchor: middle; dominant-baseline: central; pointer-events: none; }
.rmap__pin.is-past .rmap__dot, .rmap__pin.is-on .rmap__dot { fill: var(--gold-200); }
.rmap__pin.is-past .rmap__n, .rmap__pin.is-on .rmap__n { fill: #13203a; }
.rmap__pin.is-on .rmap__dot { r: calc(var(--u) * 9px); }
.rmap__pin.is-partner .rmap__dot { stroke-dasharray: calc(var(--u) * 3px) calc(var(--u) * 2px); }
.rmap__pin--airport .rmap__dot { r: calc(var(--u) * 3.5px); stroke-width: calc(var(--u) * 1.4px); }
.rmap__pin--area .rmap__dot { stroke-dasharray: calc(var(--u) * 2px) calc(var(--u) * 2px); }
.rmap__pin.is-biz .rmap__dot { fill: var(--gold-300); }
.rmap__label { font-family: var(--font-caps); font-weight: 600; font-size: calc(var(--u) * 11.5px); letter-spacing: .08em; fill: rgba(247, 243, 234, .82); paint-order: stroke; stroke: #13203a; stroke-width: calc(var(--u) * 3.5px); stroke-linejoin: round; transition: fill .4s; }
.rmap__label.is-on { fill: var(--gold-100); }
.rmap__label--airport { font-size: calc(var(--u) * 9.5px); fill: rgba(247, 243, 234, .6); letter-spacing: .04em; }
.rmap__label.is-crowded { opacity: 0; }
.rmap__label.is-crowded.is-on { opacity: 1; }
.rmap__scale path { stroke: var(--gold-300); stroke-width: calc(var(--u) * 2px); }
.rmap__scale text { font-family: var(--font-caps); font-size: calc(var(--u) * 9.5px); letter-spacing: .1em; fill: rgba(247, 243, 234, .7); transform: translate(0, calc(var(--u) * -6px)); }
.rmap a:focus-visible .rmap__dot { stroke: #fff; stroke-width: calc(var(--u) * 3px); }
.rmap a:hover .rmap__dot { fill: var(--gold-200); }
.rmap__legend { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 12px; font-size: .85rem; color: rgba(247, 243, 234, .78); }
.rmap__legend i { display: inline-block; width: 22px; height: 0; border-top: 2px solid var(--gold-200); margin-right: 8px; vertical-align: middle; }
.rmap__legend i.k-road { border-top-style: dashed; border-color: var(--gold-300); }
.rmap__legend i.k-air { border-top-style: dotted; border-color: var(--ivory); }
.rmap__legend i.k-partner, .rmap__legend i.k-dot, .rmap__legend i.k-biz { width: 12px; height: 12px; border: 2px solid var(--gold-300); border-radius: 50%; }
.rmap__legend i.k-partner { border-style: dashed; }
.rmap__legend i.k-biz { background: var(--gold-300); }
.mapstep .legline { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 4px; font-size: .88rem; color: rgba(247, 243, 234, .7); }
.mapstep .legline li::before { content: ""; display: inline-block; width: 16px; height: 0; border-top: 1px solid var(--gold-300); margin-right: 10px; vertical-align: middle; }
.note--dark { color: rgba(247, 243, 234, .7); margin-top: 28px; }
@media (prefers-reduced-motion: reduce) { .rmap__mask, .rmap__ico { transition: none; } }
@media (max-width: 900px) {
  .map .rmap__svg { border-radius: 0; max-height: 44vh; width: auto; max-width: 100%; margin-inline: auto; }
  .map .rmap__legend { display: flex; padding: 0 var(--gutter); font-size: .75rem; gap: 4px 14px; margin-top: 8px; }
  .map { background: #0f1a30; padding-bottom: 8px; }
}
/* sample itineraries */
.itin-filters { display: grid; gap: 10px; margin-bottom: 14px; }
.itin-filters .chips { margin: 0; }
.itin-card.is-hidden { display: none; }
.itin-card.is-current .card__media { outline: 2px solid var(--gold-400); outline-offset: 4px; }
.itin-card.is-current .arrow::before { content: "Shown below · "; color: var(--gold-700); }
.itin[hidden] { display: none; }
.pinmap-band .rmap__svg { max-height: min(78vh, 760px); width: auto; max-width: 100%; margin-inline: auto; }
