/* ==========================================================================
   EXPERIENCE MAP — interactive MapTiler/Mapbox GL map, destination rail,
   editorial gallery itinerary, and closing video/Three.js terrain sections.
   Ported from the "experience new" prototype and scoped entirely under
   #journey-map-section so its variables/resets can't leak into the rest
   of the site. The section's own header (title/divider/metrics/route)
   stays on the original journey-section-header rules in artisan-map.css.
   ========================================================================== */

#journey-map-section {
  --bg:            #0e0d0b;
  --taupe:         #b8a790;
  --taupe-solid:   #a3937c;
  --taupe-line:    rgba(184, 167, 144, 0.55);
  --taupe-faint:   rgba(184, 167, 144, 0.18);
  --gold:          #d4b06a;
  --gold-solid:    #c9a05a;
  --gold-line:     rgba(212, 176, 106, 0.75);
  --cream:         #f3efe6;
  --ink:           #f6f2ea;
  --ink-dim:       rgba(246, 242, 234, 0.55);
  --spring:        cubic-bezier(0.25, 1, 0.5, 1);
  --glass-bg:      rgba(255, 255, 255, 0.08);
  --glass-bg-hi:   rgba(255, 255, 255, 0.16);
  --glass-line:    rgba(255, 255, 255, 0.28);

  /* Kudanil editorial design system */
  --bg-cream:      #fdfbf7;
  --text-dark:     #1c1c1c;
  --section-bg:    #1c1c1c;   /* raw cover background (sits under a dark vignette overlay) */
  --body-bg:       #141414;   /* darkened to visually match the vignette-darkened cover */
  --text-muted:    #767676;
  --accent-gold:   #b3925c;
  --border-light:  rgba(28, 28, 28, 0.1);
  --font-serif:    'Cormorant Garamond', serif;
  --font-sans:     'Inter', sans-serif;
  --transition-smooth: all 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

#journey-map-section *,
#journey-map-section *::before,
#journey-map-section *::after {
  box-sizing: border-box;
}

/* Map occupies a full-viewport section; the editorial itinerary flows beneath it */
.map-section {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  background-color: var(--bg);
  color: var(--ink);
  font-family: 'Jost', sans-serif;
}

#map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* ---- Selected destination label (bottom-left, above the card rail) ---- */
.headline {
  position: absolute;
  left: 46px;
  bottom: 225px;
  z-index: 4;
  pointer-events: none;
  max-width: 620px;
}
.headline h1 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
  font-size: clamp(42px, 6vw, 76px);
  line-height: 0.98;
  letter-spacing: 0.01em;
  transition: opacity 0.45s var(--spring), transform 0.45s var(--spring);
}
.headline .region {
  margin-top: 16px;
  font-size: 12px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.headline .desc {
  margin-top: 18px;
  font-size: 15px;
  line-height: 1.7;
  font-weight: 300;
  color: var(--ink-dim);
  max-width: 500px;
  transition: opacity 0.45s var(--spring), transform 0.45s var(--spring);
}

/* ---- Discover CTA (frosted glass) ---- */
.discover-btn {
  pointer-events: auto;
  margin-top: 26px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  font-family: 'Jost', sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--glass-bg);
  border: 1px solid var(--glass-line);
  border-radius: 999px;
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  cursor: pointer;
  transition: all 0.35s var(--spring);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}
.discover-btn:hover {
  background: var(--glass-bg-hi);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-3px);
}
.discover-btn .arrow {
  transition: transform 0.35s var(--spring);
}
.discover-btn:hover .arrow {
  transform: translateX(4px);
}
/* Fade transition for the DISCOVER -> EXPERIENCE label swap */
.discover-btn .label,
.discover-btn .arrow {
  transition: opacity 0.3s ease, transform 0.35s var(--spring);
}
.discover-btn.swapping .label,
.discover-btn.swapping .arrow {
  opacity: 0;
}

/* ---- Live weather widget (top-right) ---- */
.weather-widget {
  position: absolute;
  top: 26px;
  right: 40px;
  z-index: 6;
  min-width: 220px;
  padding: 18px 22px;
  border-radius: 20px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-line);
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
  transition: opacity 0.4s var(--spring), transform 0.4s var(--spring);
}
.weather-widget.visible {
  opacity: 1;
  transform: translateY(0);
}
.ww-time-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 14px;
}
.ww-tz-label {
  font-size: 10px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.ww-clock {
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.ww-place-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.ww-place {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
  font-size: 22px;
  color: var(--ink);
}
.ww-icon { font-size: 18px; }
.ww-temp-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 12px;
}
.ww-temp {
  font-family: 'Cormorant Garamond', serif;
  font-size: 36px;
  color: var(--gold);
  line-height: 1;
}
.ww-condition {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.ww-meter {
  position: relative;
  height: 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.14);
  overflow: hidden;
  margin-bottom: 12px;
}
.ww-meter-fill {
  position: absolute;
  inset: 0;
  width: 0%;
  background: linear-gradient(90deg, #6fa8dc, var(--gold));
  transition: width 0.6s var(--spring);
}
.ww-meta {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

/* ---- Custom HTML markers ---- */
.dest-marker {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(212, 176, 106, 0.08);
  border: 1px solid var(--gold-line);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
  backdrop-filter: blur(2px);
  transform: scale(1);
}
.dest-marker::after {
  content: "";
  position: absolute;
  inset: -10px;               /* larger invisible hit area */
}
.dest-marker:hover {
  background: var(--gold-solid);
  transform: scale(1.25);
}
.dest-marker.active {
  background: var(--gold-solid);
  transform: scale(1.25);
  box-shadow: 0 0 0 4px rgba(201, 160, 90, 0.25);
}

/* ---- Bottom card rail ---- */
.rail {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 5;
  padding: 0 0 30px;
  background: linear-gradient(to top, rgba(14,13,11,0.82), rgba(14,13,11,0.35) 60%, transparent);
}
.cards {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;   /* momentum scroll on iOS */
  overscroll-behavior-x: contain;
  touch-action: pan-x;                  /* let horizontal swipes drive the rail */
  padding: 6px 40px 10px;
  scroll-padding: 0 40px;
  scrollbar-width: none;
}
.cards::-webkit-scrollbar { display: none; }

/* Mobile / touch: turn the rail into a snap carousel that swipes card-by-card */
@media (hover: none) and (pointer: coarse) {
  .cards {
    scroll-snap-type: x mandatory;
    padding: 6px 24px 10px;
    scroll-padding-inline: 24px;
  }
  .card { scroll-snap-align: center; }
}

.card {
  position: relative;
  flex: 0 0 auto;
  width: 236px;
  height: 132px;
  padding: 18px;
  cursor: pointer;
  border-radius: 22px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-line);
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.4s var(--spring);
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--gold-solid);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.4s var(--spring);
}
.card:hover,
.card.active {
  background: var(--glass-bg-hi);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-6px);
}
.card:hover::before,
.card.active::before {
  transform: scaleY(1);
}
.card .idx {
  font-size: 10px;
  letter-spacing: 0.28em;
  color: var(--gold);
}
.card .name {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
  font-size: 21px;
  line-height: 1.05;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card .isle {
  font-size: 10px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

/* Hide mapbox logo tidily but keep attribution obligations minimal for demo */
.mapboxgl-ctrl-logo { opacity: 0.35; }

/* ============================================================
   EDITORIAL ITINERARY  (Kudanil Explorer framework)
   Full-screen cover reveal + multi-column editorial context
   ============================================================ */
#main-parent-wrapper {
  position: relative;
  width: 100%;
  overflow: visible;                   /* page scrolls naturally */
}

.expedition-container {
  background-color: var(--body-bg);
  color: #f5efe6;
  font-family: var(--font-sans);
  position: relative;
  width: 100%;
}

/* Each section is a clean scroll-trigger anchor in natural flow */
.editorial-section-node { position: relative; }

/* --- PHASE A: SCROLL-DRIVEN COVER EXPANSION (small box → full-bleed) --- */
.destination-cover-wrapper {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--section-bg);
}
.destination-cover-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background-color: var(--section-bg);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  object-fit: cover;
  /* Initial state: a small, crisp, centred box (50vw x 50vh) that the
     scroll engine expands out to inset(0%) — a full-bleed hero. */
  clip-path: inset(25% 25% round 10px);
  transform: scale(1.06);
  will-change: transform, clip-path;
}
.destination-cover-wrapper::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.45) 100%);
  z-index: 1;
  pointer-events: none;
}
.cover-title-canvas {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  pointer-events: none;
  will-change: transform;             /* decoupled vertical parallax */
}
.cover-title-canvas h2 {
  font-family: var(--font-serif);
  font-size: clamp(3.5rem, 8vw, 7rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1;
  text-shadow: 0 2px 30px rgba(0, 0, 0, 0.35);
}

/* --- PHASE B: MULTI-COLUMN EDITORIAL CONTEXT GRID --- */
.editorial-layout-grid {
  max-width: 1600px;
  margin: 0 auto;
  padding: 140px 4% 180px 300px;   /* left gutter reserves room for the fixed nav */
  position: relative;
}

/* --- SINGLE PERSISTENT NAV (one direction, never alternates) --- */
.itinerary-nav {
  position: fixed;
  left: 46px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 40;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}
.itinerary-nav.visible {
  opacity: 1;
  pointer-events: auto;
}
.sticky-itinerary-menu {
  display: flex;
  flex-direction: column;
  gap: 16px;
  list-style: none;
}
.sticky-menu-item {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(245, 239, 230, 0.35);
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  gap: 12px;
  filter: blur(2.5px);      /* only the active place stays crisp */
  opacity: 0.5;
  will-change: filter, opacity;
}
.sticky-menu-item span { font-size: 9px; opacity: 0.6; }
.sticky-menu-item.is-active {
  color: #ffffff;
  transform: translateX(8px);
  filter: blur(0);
  opacity: 1;
}

.editorial-content-stream {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 40px;
  align-items: start;
}
.text-block-pane {
  grid-column: span 5;
  order: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.gallery-display-pane {
  grid-column: span 7;
  order: 2;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
}

/* Alternating text/photo sides only — the nav above stays fixed in place */
.editorial-section-node:nth-of-type(even) .text-block-pane   { order: 2; }
.editorial-section-node:nth-of-type(even) .gallery-display-pane { order: 1; }

/* --- SCROLL-REVEAL: gallery images rise/fade in once --- */
.media-overflow-frame {
  opacity: 0;
  transform: translateY(48px);
  transition: opacity 0.9s var(--spring), transform 0.9s var(--spring);
  will-change: opacity, transform;
}
.media-overflow-frame.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* --- SCROLL-REVEAL: blurry text + itinerary buttons rise/sharpen in once --- */
.text-block-pane,
.editorial-btn-row {
  opacity: 0;
  transform: translateY(48px);
  filter: blur(14px);
  transition: opacity 1s var(--spring), transform 1s var(--spring), filter 1s var(--spring);
  will-change: opacity, transform, filter;
}
.text-block-pane.revealed,
.editorial-btn-row.revealed {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}
/* Buttons sharpen in a beat after the text block for a staggered feel */
.editorial-btn-row { transition-delay: 0.25s; }

/* --- TYPOGRAPHY & BUTTON ASSETS --- */
.tracker-tag-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 30px;
}
.editorial-headline {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 4vw, 4.5rem);
  font-weight: 400;
  line-height: 1.1;
  margin-bottom: 12px;
  color: #f5efe6;
}
.editorial-sub-caption {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.5rem;
  color: #FDFBF7;                       /* Koru Cream */
  margin-bottom: 40px;
}
.narrative-paragraph {
  font-size: 16px;
  line-height: 1.75;
  color: rgba(245, 239, 230, 0.72);
  margin-bottom: 50px;
  font-weight: 300;
  max-width: 90%;
}
.editorial-btn-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

/* Frosted-glass look, matching the map's Discover/Explore CTA */
.request-itinerary-btn,
.view-in-map-btn {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--glass-line);
  background: var(--glass-bg);
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  color: #FDFBF7;                       /* Koru Cream */
  padding: 16px 36px;
  font-family: 'Jost', sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 999px;
}
.request-itinerary-btn:hover,
.view-in-map-btn:hover {
  background: var(--glass-bg-hi);
  border-color: rgba(255, 255, 255, 0.4);
  color: #fff;
}

/* View in Map — secondary/outline variant so it reads as the alternate
   action next to the primary "View Full Itinerary" button */
.view-in-map-btn {
  background: transparent;
  color: var(--ink-dim);
}
.view-in-map-btn:hover {
  background: var(--glass-bg);
  color: #FDFBF7;                       /* Koru Cream */
}

/* Ambient-audio toggle — small frosted-glass play/pause circle + a text
   label, reused for the map section's "Hear the Great Kiwi" and each
   destination's own ambient-sound row. See initAmbientAudioToggles() in
   experience-map.js. */
.audio-toggle {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 22px;
}
.audio-toggle-btn {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--glass-line);
  background: var(--glass-bg);
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  color: #FDFBF7;
  cursor: pointer;
  transition: background-color 0.25s ease, border-color 0.25s ease;
}
.audio-toggle-btn:hover {
  background: var(--glass-bg-hi);
  border-color: rgba(255, 255, 255, 0.4);
}
.audio-toggle-icon.icon-play  { display: block; margin-left: 2px; } /* optical centring for the triangle */
.audio-toggle-icon.icon-pause { display: none; }
.audio-toggle-btn.is-playing .icon-play  { display: none; }
.audio-toggle-btn.is-playing .icon-pause { display: block; margin-left: 0; }
.audio-toggle-label {
  font-family: 'Avenir Next Arabic', 'Avenir Next', 'Avenir', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #FDFBF7;
}

/* --- VISUAL MEDIA GALLERY FRAMEWORKS --- */
.media-overflow-frame {
  overflow: hidden;
  pointer-events: auto;
  border-radius: 4px;
  position: relative;
  background-color: var(--body-bg);
  border: 1px solid rgba(212, 176, 106, 0.45);   /* golden box frame */
}
.media-overflow-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 1.2s cubic-bezier(0.25, 1, 0.5, 1);
}
.media-overflow-frame:hover img { transform: scale(1.05); }

/* On-scroll expanding animation for the larger hero photo — a separate
   wrapper so its continuous scroll-linked reveal doesn't fight the
   one-time fade/rise reveal transform on .img-primary-hero itself.
   Driven by clip-path (crop), not transform: scale() — scaling a raster
   photo that much makes the compositor rescale a bitmap and blur it
   mid-animation; clip-path only crops the already full-resolution image,
   so it stays perfectly sharp throughout while still growing outward
   from the top-left corner to fill the frame. */
.hero-scale-wrap {
  width: 100%;
  height: 100%;
  will-change: clip-path;
}

.img-primary-hero {
  grid-column: span 12;
  height: 520px;
  margin-bottom: 12px;
  border: none;   /* no golden frame on the hero photo */
}
.img-secondary-sub {
  grid-column: span 6;
  height: 300px;
}

/* --- Local video sections, stacked beneath the final gallery section ---
   Each is a genuine full-screen frame (100vw x 100vh) on both desktop
   and mobile; object-fit: cover fills the frame without distortion
   regardless of the source video's own aspect ratio. */
.video-embed-section {
  background-color: var(--body-bg);
  width: 100%;
  display: flex;
  flex-direction: column;
}
.video-embed-block {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}
.video-embed-block video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Interactive Landscape — full-frame Three.js terrain section, dropped between
   the two video blocks. Genuinely 100vw x 100vh on both desktop and mobile
   (unlike the video blocks, a WebGL canvas has no native aspect ratio to
   letterbox, so there's no reason to shrink it on small screens). */
.landscape-section {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  background-color: var(--body-bg);
}
.landscape-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
/* Fallback when WebGL is unavailable (context creation failure, disabled
   GPU, THREE never loaded) — a static brand-palette gradient stands in for
   the terrain animation instead of a blank #body-bg box. See the guard in
   experience-map.js. */
.landscape-section.landscape-fallback {
  background: radial-gradient(ellipse at center 38%, #f3efe6 0%, #d4b06a 22%, #b8a790 42%, #2A4D53 68%, #1c1c1c 100%);
}
.landscape-section.landscape-fallback .landscape-canvas {
  display: none;
}
.landscape-overlay-text {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0 6vw clamp(48px, 14vh, 160px);
  pointer-events: none;
}
.landscape-overlay-text h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 500;
  font-style: normal;
  text-transform: none;
  white-space: nowrap;
  letter-spacing: 0.04em;
  font-size: clamp(1.6rem, 6vw, 5.5rem);
  color: #FDFBF7;
  text-shadow: 0 4px 40px rgba(0, 0, 0, 0.55), 0 1px 2px rgba(0, 0, 0, 0.4);
}
.landscape-overlay-text h2 em {
  font-style: italic;
  font-weight: 500;
}
.landscape-overlay-text h2 strong {
  font-style: normal;
  font-weight: 700;
}

/* "View the Full Itinerary" CTA overlaid on the itinerary-button video */
.video-cta {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: clamp(48px, 10vh, 120px);
  pointer-events: none;
  background: linear-gradient(to top, rgba(0,0,0,0.45) 0%, transparent 45%);
}
.video-cta-btn {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 18px 40px;
  font-family: 'Jost', sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  text-decoration: none;
  color: #fff;
  background: var(--glass-bg);
  border: 1px solid var(--glass-line);
  border-radius: 999px;
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.28);
  transition: all 0.4s var(--spring);
}
.video-cta-btn:hover {
  background: var(--glass-bg-hi);
  border-color: rgba(255, 255, 255, 0.45);
  transform: translateY(-3px);
}
.video-cta-btn .arrow { transition: transform 0.4s var(--spring); }
.video-cta-btn:hover .arrow { transform: translateX(5px); }

@media (max-width: 1100px) {
  .itinerary-nav { display: none; }
  .editorial-layout-grid { padding: 80px 4%; }
  .editorial-content-stream { grid-column: span 12; gap: 50px; }
  .text-block-pane, .gallery-display-pane { grid-column: span 12; order: initial; margin-bottom: 40px; }
  .editorial-section-node:nth-of-type(even) .text-block-pane,
  .editorial-section-node:nth-of-type(even) .gallery-display-pane { order: initial; }
}

@media (max-width: 640px) {
  /* Hide the name/region/description text over the map (no room), but
     keep the Discover/Explore button itself — it appears with a reveal
     animation once the user taps a destination card below. */
  .headline h1, .headline .region, .headline .desc { display: none; }
  .headline {
    left: 0;
    right: 0;
    bottom: 210px;
    display: flex;
    justify-content: center;
  }
  .discover-btn {
    margin-top: 0;
    opacity: 0;
    transform: translateY(14px) scale(0.96);
    pointer-events: none;
    transition: opacity 0.45s var(--spring), transform 0.45s var(--spring);
    will-change: opacity, transform;
  }
  .discover-btn.mobile-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
  }
  .cards { padding-left: 22px; padding-right: 22px; }

  /* --- Editorial section: left-aligned + properly fit for narrow screens --- */
  .editorial-layout-grid { padding: 60px 6% 90px; }
  /* Drop the 12-column grid on mobile — with everything stacked full-width
     anyway, the grid's fr-track sizing was collapsing to 0px and letting
     the text pane overflow past its container's right edge, shifting the
     whole section visibly off-centre. A simple block stack is exact and
     stays perfectly centred within the layout-grid's own padding. */
  .editorial-content-stream {
    display: block;
    width: 100%;
  }
  .text-block-pane {
    display: flex;
    width: 100%;
    align-items: flex-start;
    text-align: left;
    margin-bottom: 32px;
  }
  .tracker-tag-label, .editorial-headline, .editorial-sub-caption, .narrative-paragraph {
    text-align: left;
  }
  .narrative-paragraph { max-width: 100%; }
  .request-itinerary-btn { align-self: flex-start; }
  .cover-title-canvas h2 { font-size: clamp(2.25rem, 13vw, 4.5rem); }

  /* Smaller gallery images, inset from the edges rather than edge-to-edge,
     so each photo reads as a distinct framed shot instead of filling the
     whole screen width. */
  .gallery-display-pane {
    grid-template-columns: 1fr;
    gap: 14px;
    justify-items: center;
    padding: 0 4%;
  }
  .img-primary-hero, .img-secondary-sub {
    grid-column: 1 / -1;
    width: 100%;
    max-width: 420px;
    height: auto;
    aspect-ratio: 4 / 3;
    margin-bottom: 0;
  }
  /* Hero reveal uses clip-path — reset any leftover crop on mobile so the
     full image is always visible once stacked. */
  .hero-scale-wrap { clip-path: none !important; }

  /* Compact, safe-area-aware weather widget so it never overflows a phone. */
  .weather-widget {
    top: calc(env(safe-area-inset-top, 0px) + 14px);
    right: 14px;
    left: auto;
    min-width: 0;
    width: 168px;
    padding: 13px 15px;
    border-radius: 16px;
  }
  .ww-place { font-size: 18px; }
  .ww-temp { font-size: 28px; }

  /* Editorial: keep everything left-aligned and comfortably readable. */
  .editorial-headline { font-size: clamp(2.1rem, 10vw, 3rem); }
  .editorial-sub-caption { font-size: 1.25rem; }
  .narrative-paragraph { font-size: 15px; line-height: 1.7; }
  .request-itinerary-btn { align-self: flex-start; }

  /* The source videos are widescreen (~16:9). A 100vh-tall frame with
     object-fit:contain left them tiny, centred in a sea of empty space.
     Sizing the frame itself to the video's own ratio makes it fill the
     frame at full device width — much larger — while still showing the
     whole frame (no crop) and sitting flush to the left. */
  .video-embed-section { gap: 0; }
  .video-embed-block {
    height: auto;
    aspect-ratio: 16 / 9;
    background-color: var(--body-bg);
  }
  .video-embed-block video {
    object-fit: contain;
    object-position: left center;
  }
  /* #curators-cta carries the CTA text/icons, not just decorative footage —
     keep it a genuine full-bleed cover frame on mobile instead of the
     letterboxed 16:9 treatment the other two video blocks get. */
  #curators-cta {
    height: 100vh;
    aspect-ratio: auto;
  }
  #curators-cta video {
    object-fit: cover;
    /* Full-left cropped the couple half out of frame — 25% keeps them
       roughly centred while still favouring the left/dock side of the shot. */
    object-position: 25% center;
  }
  .video-cta { padding-bottom: clamp(16px, 6vh, 32px); }
  .video-cta-btn {
    padding: 15px 28px;
    font-size: 11px;
    letter-spacing: 0.2em;
  }
  .landscape-overlay-text h2 {
    font-size: clamp(1.5rem, 8vw, 3rem);
    letter-spacing: 0.06em;
  }
}

/* Small-phone safety: keep the hero title and cards from overflowing. */
@media (max-width: 400px) {
  .cover-title-canvas h2 { font-size: clamp(2rem, 15vw, 3rem); }
  .card { width: 200px; }
}
