/*
 * More-about-me page: title, then the world map as a card that expands to fill
 * the screen when clicked. Expanded: zoom on the right, the ticker of places
 * along the bottom, and a panel (right side on wide screens, bottom sheet on
 * phones) for the selected place. Reuses the tokens,
 * placard type and neon buttons from ascii-hero.css.
 */
.travel-page { margin: 0; background: #000; color: var(--text); }

/* Text on the left, the map card on the right; stacked on narrow screens. */
.travel-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.6fr);
  align-items: center;
  gap: clamp(24px, 4vw, 56px);
  max-width: 1360px;
  min-height: min(100svh, 820px);
  margin: 0 auto;
  padding: clamp(20px, 3vw, 36px) clamp(20px, 5vw, 56px);
}
.travel-hero .travel__head { max-width: none; margin: 0; padding: 0; }
.travel-hero .travel { width: auto; height: clamp(340px, 66svh, 640px); margin: 0; }
.travel-hero .travel.is-expanded { height: auto; }
@media (max-width: 820px) {
  .travel-hero { grid-template-columns: 1fr; align-items: start; min-height: 0; gap: 24px; }
  .travel-hero .travel { height: clamp(280px, 52svh, 520px); }
}

/* The map is a card in the page until it is opened... */
.travel {
  position: relative;
  width: min(1100px, calc(100% - 2 * clamp(20px, 6vw, 64px)));
  height: clamp(280px, 52svh, 520px);
  margin: 0 auto;
  border: 1px solid rgba(95, 233, 255, 0.28);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 0 1px rgba(95, 233, 255, 0.6), 0 0 32px rgba(95, 233, 255, 0.08);
  background:
    radial-gradient(ellipse 70% 60% at 50% 50%, rgba(95, 233, 255, 0.05), transparent 70%),
    #000;
}
/* ...then it fills the screen */
.travel.is-expanded {
  position: fixed; inset: 0;
  width: auto; height: auto;
  margin: 0; border: 0; border-radius: 0; box-shadow: none;
  z-index: 50;
}

/* collapsed: the whole card is one big "open" button; the dots, zoom and panel wait for the full view */
.travel__open {
  position: absolute; inset: 0; z-index: 2;
  display: flex; align-items: flex-start; justify-content: flex-end;
  padding: 14px;
  border: 0; background: transparent;
  cursor: zoom-in;
}
.travel__open-label, .travel__close {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 40px; padding: 0 14px;
  border: 1px solid rgba(95, 233, 255, 0.55);
  border-radius: 999px;
  background: rgba(3, 4, 7, 0.88);
  color: var(--aqua);
  font: 500 12px/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase;
  box-shadow: 0 0 14px rgba(95, 233, 255, 0.2);
}
.travel__open svg, .travel__close svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.travel__open:hover .travel__open-label, .travel__close:hover { color: #fff; border-color: var(--aqua); box-shadow: 0 0 20px rgba(95, 233, 255, 0.45); }
.travel__open:focus-visible { outline: 2px solid var(--aqua); outline-offset: -4px; border-radius: 16px; }
.travel__close {
  position: absolute; z-index: 6;
  left: max(16px, env(safe-area-inset-left)); top: max(16px, env(safe-area-inset-top));
  cursor: pointer;
}
.travel__close:focus-visible { outline: 2px solid var(--aqua); outline-offset: 2px; }
.travel__open[hidden], .travel__close[hidden] { display: none; }
.travel:not(.is-expanded) .travel__zoom,
.travel:not(.is-expanded) .place { display: none; }
.travel:not(.is-expanded) .tmap__pins { pointer-events: none; }
.travel:not(.is-expanded) .tmap__pin, .travel:not(.is-expanded) .tmap__cluster { pointer-events: none; }

/* ------------------------------------------------------------------ map */
.travel__map { position: absolute; inset: 0; cursor: grab; }   /* touch-action is set by travel-map.js */
.travel__map:active { cursor: grabbing; }
.tmap__canvas { position: absolute; inset: 0; display: block; }
.tmap__pins { position: absolute; inset: 0; pointer-events: none; }
.tmap__status {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  margin: 0; font: 500 12px/1.4 var(--mono); letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-dim); text-align: center;
}

/* a place: a small dot (the visited countries carry the colour), with an invisible
   28 px hit area around it so it is still easy to tap. The name shows on hover/focus. */
.tmap__pin {
  position: absolute; left: -14px; top: -14px;
  width: 28px; height: 28px;
  padding: 0; border: 0; border-radius: 50%;
  background: transparent;
  pointer-events: auto;
  cursor: pointer;
}
.tmap__dot {
  position: absolute; left: 50%; top: 50%;
  width: 6px; height: 6px; margin: -3px 0 0 -3px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 1.5px rgba(0, 0, 0, 0.65), 0 0 8px 1px rgba(255, 255, 255, 0.55);
  transition: transform 140ms ease, background 140ms ease;
}
.tmap__pin:hover .tmap__dot,
.tmap__pin:focus-visible .tmap__dot { transform: scale(1.6); background: #5fe9ff; }
.tmap__pin.is-selected .tmap__dot {
  transform: scale(1.6);
  background: #fff;
  box-shadow: 0 0 0 2px #ff4fa3, 0 0 12px 2px rgba(255, 79, 163, 0.8);
}
.tmap__pin:focus-visible { outline: 2px solid var(--aqua); outline-offset: 2px; }
.tmap__label {
  position: absolute; left: 22px; top: 50%;
  transform: translateY(-50%);
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid rgba(95, 233, 255, 0.35);
  background: rgba(0, 0, 0, 0.85);
  white-space: nowrap;
  font: 500 11px/1 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
  opacity: 0;
  transition: opacity 140ms ease;
  pointer-events: none;
  z-index: 2;
}
.tmap__pin:hover, .tmap__pin:focus-visible, .tmap__pin.is-selected { z-index: 3; }
.tmap__pin:hover .tmap__label,
.tmap__pin:focus-visible .tmap__label,
.tmap__pin.is-selected .tmap__label { opacity: 1; }

/* several places too close to tell apart at this zoom: one small numbered dot */
.tmap__cluster {
  position: absolute; left: -11px; top: -11px;
  width: 22px; height: 22px;
  padding: 0;
  border: 1.5px solid #fff;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  font: 600 10px/1 var(--mono);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.4);
  pointer-events: auto;
  cursor: zoom-in;
}
.tmap__cluster:hover { background: #5fe9ff; border-color: #5fe9ff; color: #000; }
.tmap__cluster:focus-visible { outline: 2px solid var(--aqua); outline-offset: 2px; }

/* ------------------------------------------------------------------ title */
.travel__head {
  max-width: 1100px;
  margin: 0 auto;
  padding: clamp(20px, 3vw, 32px) clamp(20px, 6vw, 64px) clamp(22px, 3vw, 36px);
}
.travel__nav { margin: 0 0 22px; }
.travel__nav a { min-height: 44px; }
.travel__title { font-size: clamp(38px, 4.4vw, 64px); }   /* a full sentence: smaller than a one-word title */
.travel__intro {
  margin: 14px 0 0;
  max-width: 34ch;
  font: 400 clamp(15px, 1.2vw, 18px)/1.55 var(--serif);
  color: var(--text-dim);
}

/* ------------------------------------------------------------------ zoom */
.travel__zoom {
  position: absolute; right: max(16px, env(safe-area-inset-right)); top: 50%;
  transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 6px;
}
.travel__zoom button {
  width: 44px; height: 44px;
  border: 1px solid rgba(95, 233, 255, 0.45);
  border-radius: 50%;
  background: rgba(3, 4, 7, 0.85);
  color: var(--aqua);
  font: 400 20px/1 var(--mono);
  cursor: pointer;
  box-shadow: 0 0 12px rgba(95, 233, 255, 0.18);
}
.travel__zoom button:hover { color: #fff; border-color: var(--aqua); }
.travel__zoom button:focus-visible { outline: 2px solid var(--aqua); outline-offset: 2px; }

/* ------------------------------------------------------------------ list */
.travel__list {
  position: absolute; left: 0; right: 0; bottom: 0;
  z-index: 3;
  padding: 28px clamp(16px, 5vw, 56px) calc(16px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 35%, transparent);
  display: flex; align-items: center; gap: 14px;
}
.travel__list-title {
  margin: 0 14px 0 0; flex: none; position: relative; z-index: 1; padding-right: 10px; background: rgba(0, 0, 0, 0.9);
  font: 500 11px/1 var(--mono); letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--aqua);
}
/* the ticker: names scroll right to left like a news crawl, fading at both edges */
.travel__ticker {
  flex: 1; min-width: 0; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 40px, #000 calc(100% - 40px), transparent);
  mask-image: linear-gradient(90deg, transparent, #000 40px, #000 calc(100% - 40px), transparent);
}
.travel__list ol {
  display: flex; width: max-content; margin: 0; padding: 4px 0; list-style: none;
  animation: ticker var(--ticker-time, 60s) linear infinite;
}
.travel__list li { margin-right: 8px; }          /* margin, not gap, so one copy is exactly half the width */
@keyframes ticker { to { transform: translateX(-50%); } }
/* pause while someone is pointing at it, tabbing through it, or reading a place */
.travel__ticker:hover ol,
.travel__ticker:focus-within ol,
.travel:has(.place.is-open) .travel__list ol { animation-play-state: paused; }
.travel__list button {
  min-height: 40px; padding: 0 16px;
  border: 1px solid rgba(255, 79, 163, 0.45);
  border-radius: 999px;
  background: rgba(3, 4, 7, 0.85);
  color: var(--text);
  white-space: nowrap;
  font: 500 12px/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase;
  cursor: pointer;
}
.travel__list button:hover, .travel__list button[aria-current="true"] {
  color: #fff; border-color: #ff4fa3; box-shadow: 0 0 14px rgba(255, 79, 163, 0.4);
}
.travel__list button:focus-visible { outline: 2px solid var(--aqua); outline-offset: 2px; }
.travel__empty { font: 400 15px var(--serif); color: var(--text-dim); }


/* ------------------------------------------------------------------ sections below the map */
html { scroll-behavior: smooth; }
.about {
  max-width: 1100px;
  margin: 0 auto;
  padding: clamp(56px, 9vw, 120px) clamp(20px, 6vw, 64px);
  min-height: 60svh;
}
.about + .about { padding-top: 0; }
.about__title {
  margin: 0;
  font: 300 clamp(36px, 4.4vw, 64px)/1.05 var(--serif); font-style: italic;
  color: #fff;
}
.about__text {
  margin: 18px 0 0; max-width: 56ch;
  font: 400 clamp(16px, 1.3vw, 19px)/1.6 var(--serif);
  color: var(--text-dim);
}

/* ------------------------------------------------------------------ place panel */
.place {
  position: absolute; top: 16px; right: 76px; bottom: 16px;
  width: min(420px, calc(100vw - 110px));
  overflow-y: auto; overscroll-behavior: contain;
  padding: 26px 24px 30px;
  border: 1px solid rgba(95, 233, 255, 0.28);
  border-radius: 16px;
  background: rgba(5, 7, 11, 0.92);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: 0 0 1px rgba(95, 233, 255, 0.6), 0 0 40px rgba(95, 233, 255, 0.10), 0 20px 60px rgba(0, 0, 0, 0.6);
  opacity: 0; transform: translateX(16px);
  transition: opacity 260ms ease, transform 320ms cubic-bezier(0.2, 0.8, 0.2, 1);
  z-index: 5;
}
.place.is-open { opacity: 1; transform: none; }
.place:focus { outline: none; }
.place__close {
  position: absolute; top: 12px; right: 12px;
  width: 40px; height: 40px;
  border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text); cursor: pointer;
  display: grid; place-items: center;
}
.place__close svg, .lightbox__close svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.place__close:hover { background: rgba(255, 255, 255, 0.14); color: #fff; }
.place__close:focus-visible { outline: 2px solid var(--aqua); outline-offset: 2px; }
.place__meta { margin-bottom: 10px; padding-right: 44px; min-height: 1em; }
.place__title {
  margin: 0; padding-right: 44px;
  font: 300 clamp(36px, 4vw, 52px)/1 var(--serif); font-style: italic;
  color: #fff; text-shadow: 0 0 30px rgba(255, 79, 163, 0.35);
}

.place__photos {
  display: grid; grid-auto-flow: column; grid-auto-columns: 86%; gap: 10px;
  margin: 22px -24px 0; padding: 0 24px 6px;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 24px;
  scrollbar-width: thin;
}
.place__photos figure { margin: 0; scroll-snap-align: start; }
.place__photo {
  display: block; width: 100%; padding: 0; border: 0; border-radius: 10px; overflow: hidden;
  background: #0a0c10; cursor: zoom-in;
}
.place__photo img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.place__photo:focus-visible { outline: 2px solid var(--aqua); outline-offset: 2px; }
.place__photos figcaption { margin-top: 6px; font: italic 400 14px/1.45 var(--serif); color: var(--text-dim); }

.place__lessons-title {
  margin: 26px 0 12px;
  font: 500 11px/1 var(--mono); letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--pink);
}
.place__lessons { margin: 0; padding: 0; list-style: none; counter-reset: lesson; }
.place__lessons li {
  counter-increment: lesson;
  position: relative;
  padding: 0 0 16px 40px;
  font: 400 17px/1.55 var(--serif);
  color: var(--text);
}
.place__lessons li::before {
  content: counter(lesson, decimal-leading-zero);
  position: absolute; left: 0; top: 4px;
  font: 500 12px/1 var(--mono); letter-spacing: 0.08em;
  color: var(--aqua);
}

.place__soon { margin: 22px 0 0; font: italic 400 16px/1.5 var(--serif); color: var(--text-dim); }

/* ------------------------------------------------------------------ lightbox */
.lightbox {
  max-width: min(1100px, 94vw); max-height: 92vh;
  padding: 0; border: 1px solid rgba(95, 233, 255, 0.3); border-radius: 14px;
  background: #050709; color: var(--text);
}
.lightbox::backdrop { background: rgba(0, 0, 0, 0.82); }
.lightbox img { display: block; max-width: 100%; max-height: 82vh; margin: 0 auto; }
.lightbox p { margin: 0; padding: 12px 16px 14px; font: italic 400 16px/1.4 var(--serif); color: var(--text-dim); }
.lightbox p:empty { display: none; }
.lightbox form { position: absolute; top: 10px; right: 10px; margin: 0; }
.lightbox__close {
  width: 40px; height: 40px; border: 0; border-radius: 50%;
  background: rgba(0, 0, 0, 0.6); color: #fff; cursor: pointer; display: grid; place-items: center;
}

/* ------------------------------------------------------------------ phones */
@media (max-width: 820px) {
  .travel__intro { font-size: 15px; }
  .travel__zoom { top: auto; bottom: calc(86px + env(safe-area-inset-bottom)); transform: none; }
  .place {
    top: auto; right: 0; left: 0; bottom: 0;
    width: auto; max-height: 74svh;
    border-radius: 18px 18px 0 0;
    padding-bottom: calc(30px + env(safe-area-inset-bottom));
    transform: translateY(24px);
  }
  .place__photos { grid-auto-columns: 88%; }
}
@media (orientation: landscape) and (max-height: 520px) {
  .travel__title { font-size: 40px; }
  .place { top: 10px; bottom: 10px; right: 66px; left: auto; width: min(380px, 55vw); max-height: none; border-radius: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .place, .tmap__label, .tmap__dot { transition: none; }
  html { scroll-behavior: auto; }
  /* no crawl: a plain list you scroll sideways yourself, shown once */
  .travel__list ol { animation: none; }
  .travel__ticker { overflow-x: auto; scrollbar-width: none; }
  .travel__list li[aria-hidden="true"] { display: none; }
}
