/* /places — the personal side: one screen with a white globe of the places I've been, and a panel for each.
   Shares style.css with the about page (nav, type, palette). The page itself never scrolls. */

.places-page { background: var(--bone); color: var(--ink); overflow: hidden; height: 100%; }
html:has(.places-page) { height: 100%; overflow: hidden; overscroll-behavior: none; }
.places-page .nav { color: var(--ink); background: transparent; border-bottom: 0; -webkit-backdrop-filter: none; backdrop-filter: none; }

/* ---------- the globe fills the screen ---------- */
.places { position: fixed; inset: 0; }
.globe-wrap { position: absolute; inset: 0; }
#globe { display: block; width: 100%; height: 100%; touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.places, .globe-wrap { touch-action: none; }
#globe.dragging { cursor: grabbing; }
/* the relief (js/places-relief.js) multiplies over the vector globe; faint until zoomed in */
#relief { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; mix-blend-mode: multiply; }
#marks { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; } /* pins, stars and routes, over the imagery */
#globe.pick { cursor: pointer; }
.globe-loading { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; font-family: var(--mono); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--stone); pointer-events: none; }
.globe-loading[hidden] { display: none; }

.globe-tip {
  position: absolute; z-index: 2; pointer-events: none; padding: 6px 10px; border-radius: 6px;
  background: var(--ink); color: var(--bone); font-size: 14px; line-height: 1.35; white-space: nowrap;
  transform: translate(14px, 14px);
}
.globe-tip small { display: block; font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; opacity: .6; }
.globe-tip[hidden] { display: none; }

/* ---------- what sits over the globe: the title top left, the controls along the bottom ---------- */
.places-title { position: absolute; left: var(--gutter); top: 96px; max-width: 320px; pointer-events: none; }
.places-title > * { pointer-events: auto; }
.places-title .eyebrow { margin-bottom: 12px; }
.places-title .display { font-size: clamp(36px, 4.2vw, 60px); line-height: 1; margin: 0 0 16px; }
.places-title .display em { color: var(--moss-deep); }
.places-hint { margin: 0; font-size: 14.5px; line-height: 1.5; color: var(--stone-dark); }

/* once the relief is strong the imagery is dark: the title and the bar get a bone backing to stay readable */
.deep .places-title { background: rgba(236, 232, 223, .8); padding: 18px 20px; margin: -18px -20px; border-radius: 12px; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.deep .nav { background: rgba(236, 232, 223, .8); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.deep .places-title, .deep .nav { transition: background .4s; }
/* on a phone the blur behind the bar and the panel would be redone over the moving globe every frame,
   which is more than its GPU should carry: a more solid backing instead */
@media (hover: none) {
  .deep .places-title, .deep .nav, .place-panel { -webkit-backdrop-filter: none; backdrop-filter: none; }
  .deep .places-title, .deep .nav { background: rgba(236, 232, 223, .9); }
  .place-panel { background: rgba(252, 251, 248, .98); }
}

/* the title goes as soon as the globe is zoomed in a little (body.close, from places.js) */
.places-title { transition: opacity .4s; }
.close .places-title { opacity: 0; pointer-events: none; }

.globe-credit { position: absolute; right: var(--gutter); bottom: 68px; margin: 0; font-family: var(--mono); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--stone-dark); opacity: .7; pointer-events: none; }
.deep .globe-credit { color: var(--bone); text-shadow: 0 1px 2px rgba(13, 14, 12, .6); }

.globe-ctl { position: absolute; left: var(--gutter); right: var(--gutter); bottom: 28px; display: flex; align-items: center; gap: 12px; font-family: var(--mono); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--stone-dark); }
.globe-btn { display: inline-flex; align-items: center; gap: 8px; padding: 7px 13px; border: 1px solid rgba(13, 14, 12, .3); border-radius: 999px; background: rgba(236, 232, 223, .7); cursor: pointer; font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; transition: background .25s, color .25s, border-color .25s; }
.globe-btn:hover, .globe-btn[aria-expanded="true"] { background: var(--ink); color: var(--bone); border-color: var(--ink); }
.globe-btn[hidden] { display: none; }
.globe-count { opacity: .6; }
.globe-count:not(:empty)::before { content: "·"; margin-right: 8px; }
.globe-zoom { display: inline-flex; margin-left: auto; border: 1px solid rgba(13, 14, 12, .3); border-radius: 999px; overflow: hidden; background: rgba(236, 232, 223, .7); }
.globe-zoom button { width: 34px; height: 32px; border: 0; background: none; cursor: pointer; font: inherit; font-size: 15px; line-height: 1; color: inherit; transition: background .25s, color .25s; }
.globe-zoom button + button { border-left: 1px solid rgba(13, 14, 12, .3); }
.globe-zoom button:hover { background: var(--ink); color: var(--bone); }

/* ---------- the panel: a place, or the list of all of them ---------- */
.place-panel {
  position: absolute; top: 84px; right: var(--gutter); bottom: 84px; z-index: 3; width: min(400px, calc(100% - 2 * var(--gutter)));
  overflow-y: auto; padding: 26px 26px 30px; background: rgba(252, 251, 248, .94); color: var(--ink);
  border: 1px solid rgba(13, 14, 12, .1); border-radius: 14px; box-shadow: 0 24px 60px rgba(13, 14, 12, .14);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  animation: panel-in .45s var(--ease) both;
}
.place-panel[hidden] { display: none; }
@keyframes panel-in { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }
.place-close { position: absolute; top: 14px; right: 14px; width: 32px; height: 32px; border: 1px solid rgba(13, 14, 12, .18); border-radius: 50%; background: none; cursor: pointer; font-size: 18px; line-height: 1; display: grid; place-items: center; transition: background .25s, color .25s; }
.place-close:hover { background: var(--ink); color: var(--bone); }
.place-up { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 14px; padding: 0; border: 0; background: none; cursor: pointer; font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--stone-dark); }
.place-up:hover { color: var(--ink); }
.place-panel .eyebrow { margin-bottom: 10px; }
.place-title { font-family: var(--serif); font-weight: 400; font-size: 36px; line-height: 1; margin: 0 0 6px; letter-spacing: -.01em; }
.place-when { margin: 0 0 18px; font-family: var(--mono); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--stone-dark); }
.place-body p { margin: 0 0 12px; font-size: 16px; line-height: 1.6; }
.place-trips { list-style: none; margin: 18px 0 0; padding: 14px 0 0; border-top: 1px solid rgba(13, 14, 12, .12); }
.place-trips li { display: grid; grid-template-columns: 92px 1fr; gap: 12px; padding: 7px 0; font-size: 15px; line-height: 1.5; border-bottom: 1px solid rgba(13, 14, 12, .07); }
.place-trips .when { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--stone-dark); padding-top: 4px; }
.place-photos { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 20px; }
.place-photos figure { margin: 0; }
.place-photos img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; }
.place-photos figcaption { margin-top: 5px; font-family: var(--mono); font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--stone-dark); }
.place-empty { margin: 0; color: var(--stone-dark); font-style: italic; }
.place-go { display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; padding: 0; border: 0; background: none; cursor: pointer; font-family: var(--mono); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--moss-deep); }
.place-go:hover { text-decoration: underline; text-underline-offset: 4px; }

/* the list of every place, in the same panel, behind a three-way switch */
.list-tabs { display: flex; gap: 4px; margin: 2px 40px 18px 0; padding: 3px; border: 1px solid rgba(13, 14, 12, .18); border-radius: 999px; }
.list-tabs button { flex: 1; padding: 6px 10px; border: 0; border-radius: 999px; background: none; cursor: pointer; font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--stone-dark); transition: background .25s, color .25s; }
.list-tabs button:hover { color: var(--ink); }
.list-tabs button[aria-selected="true"] { background: var(--ink); color: var(--bone); }
.places-list h2 { margin: 22px 0 6px; font-family: var(--mono); font-size: 11px; font-weight: 400; letter-spacing: .08em; text-transform: uppercase; color: var(--stone-dark); }
.places-list h2:first-of-type { margin-top: 0; }
.places-list ul { list-style: none; margin: 0; padding: 0; }
.places-list li { border-bottom: 1px solid rgba(13, 14, 12, .08); }
.places-list button { display: flex; width: 100%; align-items: baseline; justify-content: space-between; gap: 12px; padding: 8px 0; border: 0; background: none; cursor: pointer; font: inherit; font-size: 16px; text-align: left; color: inherit; transition: color .25s; }
.places-list button:hover { color: var(--moss-deep); }
.places-list button .note { font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--stone); white-space: nowrap; }

@media (max-width: 760px) {
  .places-title { top: 72px; right: var(--gutter); max-width: none; }
  .places-title .display { font-size: 34px; margin-bottom: 8px; }
  .places-hint { font-size: 13px; }
  .globe-ctl { bottom: 18px; flex-wrap: wrap; }
  .place-panel {
    position: fixed; top: auto; left: 0; right: 0; bottom: 0; width: auto; max-height: 70svh;
    border-radius: 16px 16px 0 0; padding: 22px 20px 30px; animation-name: sheet-in;
  }
  @keyframes sheet-in { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
  .place-title { font-size: 30px; }
}
@media (prefers-reduced-motion: reduce) { .place-panel { animation: none; } }
