/* Travel page: full-bleed pan/zoom map, pins, year picker, day-by-day itinerary.
   Colours come from the site tokens in styles.css so dark mode just works. */

.travel-main {
  --map-sea: color-mix(in srgb, var(--steel) 12%, var(--paper));
  --map-land: var(--paper-raised);
  --map-visited: color-mix(in srgb, var(--accent) 20%, var(--paper-raised));
  --map-line: color-mix(in srgb, var(--steel) 55%, transparent);
  padding: 0;
}

/* ----- map ----- */
.travel-map { position: relative; }
.travel-stage {
  position: relative;
  height: max(420px, calc(100vh - 190px));
  height: max(420px, calc(100dvh - 190px));
  overflow: hidden;
  background: var(--map-sea);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  cursor: grab;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}
.travel-stage:active { cursor: grabbing; }
.travel-stage.is-zoomed { touch-action: none; }
.travel-status {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--steel);
}
.travel-svg { display: block; }
.map-sphere { fill: var(--map-sea); }
.map-country { fill: var(--map-land); stroke: none; }
.map-country.visited { fill: var(--map-visited); }
.map-borders {
  fill: none;
  stroke: var(--map-line);
  stroke-width: 0.6;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
.map-province,
.map-state {
  fill: transparent;
  stroke: var(--map-line);
  stroke-width: 0.45;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
.map-province.visited,
.map-state.visited { fill: var(--map-visited); }

.travel-controls {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.travel-controls button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  font-family: var(--font-mono);
  font-size: 1.05rem;
  line-height: 1;
  color: var(--ink);
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.travel-controls button:hover { background: var(--ink); color: var(--paper); }
.travel-controls svg { width: 15px; height: 15px; }
.travel-hint {
  position: absolute;
  left: 14px;
  bottom: 10px;
  z-index: 5;
  margin: 0;
  padding: 3px 8px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--ink-soft);
  background: color-mix(in srgb, var(--paper-raised) 80%, transparent);
  border-radius: 4px;
  pointer-events: none;
  opacity: 0.85;
  transition: opacity 0.4s;
}
.travel-hint.show { opacity: 1; color: var(--ink); background: var(--paper-raised); }

/* ----- pins ----- */
.pins { position: absolute; inset: 0; pointer-events: none; }
.pin {
  position: absolute;
  left: 0;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  margin: -17px 0 0 -17px;
  padding: 0;
  background: transparent;
  border: 0;
  cursor: pointer;
  pointer-events: auto;
}
.pin:hover, .pin:focus-visible { z-index: 4; }
.pin:focus-visible { outline: none; }
.pin-dot {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--paper-raised);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 65%, transparent), 0 2px 6px rgba(0, 0, 0, 0.28);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  color: #fff;
  transition: transform 0.15s ease;
}
.pin:hover .pin-dot,
.pin:focus-visible .pin-dot { transform: scale(1.4); }
.pin:focus-visible .pin-dot { box-shadow: 0 0 0 3px var(--paper), 0 0 0 5px var(--accent); }
.pin--cluster .pin-dot { width: 26px; height: 26px; }
.pin-count {
  position: absolute;
  top: 2px;
  right: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 15px;
  height: 15px;
  padding: 0 3px;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--paper);
  background: var(--ink);
  border-radius: 8px;
  pointer-events: none;
}
.pin-label {
  position: absolute;
  bottom: calc(100% - 4px);
  left: 50%;
  padding: 4px 9px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  white-space: nowrap;
  color: var(--paper);
  background: var(--ink);
  border-radius: 4px;
  transform: translate(-50%, -2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
}
.pin:hover .pin-label,
.pin:focus-visible .pin-label { opacity: 1; }

/* ----- trip menu ----- */
.trip-menu {
  position: absolute;
  z-index: 20;
  min-width: 230px;
  max-width: min(320px, calc(100% - 16px));
  padding: 8px;
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 16px 40px -14px rgba(20, 33, 61, 0.38);
}
.trip-menu[hidden] { display: none; }
.trip-menu-title { margin: 6px 8px 0; font-family: var(--font-display); font-size: 0.98rem; font-weight: 600; color: var(--ink); }
.trip-menu-sub { margin: 0 8px 6px; font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--accent); }
.trip-menu-item {
  display: flex;
  width: 100%;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 8px;
  font-family: var(--font-body);
  font-size: 0.92rem;
  color: var(--ink);
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s;
}
.trip-menu-item:hover, .trip-menu-item:focus-visible { background: var(--line); outline: none; }
.trip-menu-count { font-family: var(--font-mono); font-size: 0.72rem; color: var(--steel); white-space: nowrap; }

/* ----- itinerary modal ----- */
html.trip-open { overflow: hidden; }
.trip-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: none;
  overflow-y: auto;
  background: color-mix(in srgb, var(--paper) 97%, transparent);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.trip-modal.open { display: block; }
.trip-panel { max-width: 1280px; margin: 0 auto; padding: 0 24px 80px; }
.trip-head {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin: 0 -24px 8px;
  padding: 20px 24px 14px;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.trip-eyebrow { margin: 0 0 4px; font-family: var(--font-mono); font-size: 0.76rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.trip-eyebrow[hidden] { display: none; }
.trip-title { font-size: clamp(1.5rem, 3.4vw, 2.1rem); }
.trip-meta { margin: 4px 0 0; font-family: var(--font-mono); font-size: 0.8rem; color: var(--steel); }
.trip-close {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  padding: 0;
  font-size: 1.7rem;
  line-height: 1;
  color: var(--ink);
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.trip-close:hover { background: var(--ink); color: var(--paper); }

.trip-section-title {
  margin: 36px 0 0;
  padding-bottom: 8px;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--ink);
  border-bottom: 2px solid var(--accent);
}
.trip-day { margin-top: 28px; }
.trip-day-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 14px;
  margin-bottom: 8px;
}
.trip-day-date { margin: 0; font-family: var(--font-mono); font-size: 0.74rem; font-weight: 400; letter-spacing: 0.02em; color: var(--ink-soft); }
.trip-day-count { font-family: var(--font-mono); font-size: 0.74rem; color: var(--steel); }
.trip-thumb {
  position: relative;
  display: block;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  background: var(--paper-raised);
  border: 0;
  cursor: pointer;
}
.trip-thumb img { display: block; width: 100%; height: 100%; object-fit: contain; transition: transform 0.35s ease; }
.trip-thumb:hover img { transform: scale(1.03); }
.trip-thumb:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }

@media (max-width: 760px) {
  .trip-panel { padding: 0 14px 64px; }
  .trip-head { margin: 0 -14px 6px; padding: 14px 14px 12px; }
  .travel-stage { height: max(400px, calc(100dvh - 170px)); }
}
@media (prefers-reduced-motion: reduce) {
  .pin-dot, .trip-thumb img, .travel-hint { transition: none; }
}

/* ----- "photos coming soon" ----- */
.trip-soon {
  display: grid;
  place-items: center;
  min-height: 55vh;
  text-align: center;
}
.trip-soon p {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3.4vw, 2rem);
  font-weight: 600;
  color: var(--ink-soft);
}
.trip-soon-note {
  margin: 14px 0 0;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--steel);
}
