/* A fixed atlas; the journal passes across it like translucent paper. */
.travel-campus {
  --travel-header: 84px;
  --hero-height: max(780px, calc(100svh - var(--travel-header)));
  --globe-size: min(84vw, calc(var(--hero-height) - 85px), 980px);
  --globe-opacity: 1;
  --globe-scale: 1;
  --landscape-opacity: .32;
  --botanical-opacity: 1;
}
.travel-campus .site-head { z-index: 4; }
.travel-campus .atmosphere { opacity: .25; }
.travel-page { width: 100%; padding: 0; }
.travel-scenery .chapter-art {
  position: absolute; inset: auto 0 0; height: 94%; object-fit: cover;
  object-position: center bottom; opacity: var(--landscape-opacity);
  mask-image: linear-gradient(transparent, #000 35%);
}
.travel-scenery::after {
  background: radial-gradient(ellipse at 50% 42%, var(--paper), color-mix(in oklch, var(--paper) 42%, transparent) 40%, transparent 74%);
}
:root[data-theme=dark] .travel-scenery .chapter-art { opacity: calc(var(--landscape-opacity) * .55); }
.travel-hero { position: relative; height: var(--hero-height); pointer-events: none; }
.travel-heading { --travel-side:clamp(32px,4vw,88px); position:relative; z-index:2; width:calc(100% - var(--travel-side) * 2); max-width:none; margin-inline:var(--travel-side); padding-top:112px; }
.travel-heading .crumb { position: absolute; top: 40px; left: 0; margin: 0; pointer-events: auto; }
.travel-heading .masthead { width:220px; max-width:100%; margin:0; text-align:left; pointer-events:auto; }
.travel-heading h1 { font-size: clamp(54px, 6vw, 78px); margin: 0 0 8px; font-weight: 480; letter-spacing: -.04em; }
.travel-heading .lede { font-size: 15px; letter-spacing: .06em; line-height: 1.8; text-wrap: balance; }
.travel-heading .masthead { text-shadow: 0 2px 18px var(--paper), 0 0 32px var(--paper); }
.globe-view {
  position: fixed; z-index: 0; left: 50%;
  top: calc(var(--globe-top, 50vh) + var(--globe-title-clearance,0px));
  width: var(--globe-size); height: var(--globe-size);
  transform: translate(-50%, -50%) scale(var(--globe-scale));
  opacity: var(--globe-opacity); pointer-events: auto; will-change: opacity, transform;
}
.globe-view svg { display: block; width: 100%; height: 100%; touch-action: pan-y; cursor: grab; }
.globe-view svg:active { cursor: grabbing; }
.travel-campus.is-reading .globe-view { pointer-events: none; }
.globe-ocean { fill: color-mix(in oklch, var(--paper) 10%, transparent); stroke: color-mix(in oklch, var(--moss) 46%, transparent); stroke-width: .65; }
.globe-grid { fill: none; stroke: var(--moss); stroke-width: .34; opacity: .26; pointer-events: none; }
.country-shape { fill: color-mix(in oklch, var(--moss) 8%, transparent); stroke: color-mix(in oklch, var(--moss) 76%, transparent); stroke-width: .48; cursor: pointer; transition: fill .3s, stroke .3s; }
.country-shape.visited { fill: color-mix(in oklch, var(--ember) 18%, transparent); stroke: var(--ember); }
.country-shape:hover { fill: color-mix(in oklch, var(--ember) 30%, transparent); stroke: var(--ember); stroke-width: .85; }
.globe-route { fill: none; stroke: var(--ember); stroke-width: .8; opacity: .52; stroke-dasharray: 2 5; pointer-events: none; }
.globe-point { fill: var(--ember); stroke: var(--paper); stroke-width: 1.3; pointer-events: none; }
.globe-wish { fill: none; stroke: var(--moss); stroke-width: 1.2; pointer-events: none; }
.globe-orbit { fill: none; stroke: var(--moss); stroke-width: .6; opacity: .3; stroke-dasharray: .6 5; pointer-events: none; }
.atlas-controls { position: absolute; z-index: 2; bottom: 23px; left: 50%; transform: translateX(-50%); width: max-content; max-width: calc(100% - 40px); text-align: center; pointer-events: auto; }
.atlas-controls::before { content: ''; position: absolute; z-index: -1; inset: -25px -65px; pointer-events: none; background: radial-gradient(ellipse, color-mix(in oklch, var(--paper) 90%, transparent) 20%, transparent 70%); }
.globe-caption { color: var(--muted); font-size: 12px; letter-spacing: .045em; min-height: 22px; margin-bottom: 8px; }
.atlas-tools { display: flex; justify-content: center; align-items: center; gap: 18px; }
.atlas-tools select { max-width: 100%; width: 200px; padding: 5px 0; font: 14px Newsreader, var(--serif-cn); color: var(--ink); background: transparent; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; }
.atlas-tools select:focus-visible { outline: 1px solid var(--ember); outline-offset: 5px; }
.atlas-tools option { background: var(--paper); }
.atlas button, .travel-log button { color: inherit; font: inherit; border: 0; background: transparent; }
.atlas-tools button { padding: 5px 0; font-size: 13px; color: var(--muted); }
.atlas-tools button:hover { color: var(--ember); }
.atlas-tool-divider { width: 1px; height: 13px; background: var(--line); }
.journey-scroll { display: inline-flex; align-items: center; gap: 12px; margin-top: 20px; font-size: 11px; letter-spacing: .12em; color: var(--moss); }
.journey-scroll span { display: inline-block; font-size: 17px; transition: transform .4s var(--ease); }
.journey-scroll:hover span { transform: translateY(4px); }

/* A country opens above the atlas without losing the reader's scroll position. */
.country-dialog { width: min(1020px, calc(100% - 64px)); max-height: calc(100svh - 80px); padding: 24px 34px 34px; overflow: auto; color: var(--ink); background: color-mix(in oklch, var(--paper) 96%, transparent); border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 24px 100px color-mix(in oklch, var(--ink) 12%, transparent); pointer-events: auto; }
.country-dialog::backdrop { background: color-mix(in oklch, var(--paper) 72%, transparent); backdrop-filter: blur(9px); }
.country-dialog[open] { animation: atlas-unfold .5s var(--ease) both; }
.country-dialog-top { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.country-dialog-top button { display: flex; align-items: center; gap: 15px; padding: 5px 0 5px 12px; font-size: 13px; color: var(--muted); }
.country-dialog-top button span { font: 26px/1 Georgia, serif; }
.country-dialog-top button:hover { color: var(--ember); }
.country-view { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(210px, 1fr); gap: 30px; align-items: center; padding-top: 20px; }
.country-map { width: 100%; height: 460px; }
.region-shape { fill: color-mix(in oklch, var(--moss) 13%, transparent); stroke: var(--moss); stroke-width: 1.1; vector-effect: non-scaling-stroke; }
.city-pin { cursor: pointer; }
.city-pin circle { fill: var(--ember); stroke: var(--paper); stroke-width: 2; }
.city-pin text { fill: var(--ink); font: 13px Newsreader, var(--serif-cn); paint-order: stroke; stroke: var(--paper); stroke-width: 4px; stroke-linejoin: round; }
.city-pin.active circle { r: 7; }
.city-pin:focus-visible { outline: 1px solid var(--ember); outline-offset: 6px; }
.country-copy h2 { font: 500 36px/1.3 Fraunces, var(--serif-cn); margin: 8px 0 15px; }
.city-list { list-style: none; padding: 0; margin: 18px 0; display: flex; gap: 9px; flex-wrap: wrap; }
.city-list button { padding: 5px 14px; border: 1px solid var(--line); border-radius: 20px; font-size: 15px; }
.city-list button[aria-pressed=true] { color: var(--ember); border-color: var(--ember); }
.city-note { min-height: 90px; color: var(--muted); font-size: 16px; }
body.country-open { overflow: hidden; }

.travel-journal { position: relative; z-index: 2; padding: 110px 24px 100px; }
.travel-journal::before { content: ''; position: absolute; z-index: -1; inset: 0; pointer-events: none; background: linear-gradient(transparent, color-mix(in oklch, var(--paper) 40%, transparent) 180px); }
.travel-journal-inner { max-width: 880px; margin: auto; }
.travel-stats { display: flex; flex-wrap: wrap; justify-content: center; gap: 30px clamp(45px, 9vw, 140px); text-align: center; }
.travel-stat strong { display: block; color: var(--ember); font: 440 52px/1.2 Fraunces, serif; }
/* Only the label is a block; the hover animation's nested glyphs stay inline. */
.travel-stat > span { display: block; color: var(--muted); font-size: 13px; margin-top: 8px; white-space: nowrap; }
.travel-demo { display: block; text-align: center; color: var(--muted); font-size: 11px; letter-spacing: .04em; margin-top: 24px; }
.travel-demo[hidden] { display: none; }
.travel-log { margin-top: 80px; scroll-margin-top: 80px; }
.travel-log .chapter-head h2 { font: 480 30px/1.4 Fraunces, var(--serif-cn); }
.travel-log-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 38px; padding-top: 36px; }
.travel-card { position: relative; padding: 0 0 32px; border-bottom: 1px solid var(--line); }
.travel-card button { display: inline-flex; align-items: center; gap: 15px; text-align: left; padding: 0; font: 480 28px Fraunces, var(--serif-cn); }
.travel-card button::after { content: '↗'; color: var(--ember); font: 16px Newsreader, serif; opacity: .65; transition: transform .35s var(--ease), opacity .35s; }
.travel-card button:hover { color: var(--ember); }
.travel-card button:hover::after { transform: translate(3px, -3px); opacity: 1; }
.travel-card p { font-size: 15px; color: var(--muted); margin-top: 14px; }
.travel-wishes { margin-top: 96px; }
.wish-list { display: flex; flex-wrap: wrap; gap: 18px; padding: 32px 0; }
.wish-list button { display: flex; align-items: center; gap: 12px; padding: 10px 24px; border: 1px solid color-mix(in oklch, var(--moss) 30%, transparent); border-radius: 30px; color: var(--moss); font-size: 19px; transition: border-color .3s, background .3s; }
.wish-list button::before { content: ''; width: 5px; height: 5px; border: 1px solid currentColor; border-radius: 50%; }
.wish-list button:hover { border-color: var(--moss); background: color-mix(in oklch, var(--moss) 5%, transparent); }
.map-note { font-size: 11px; color: var(--muted); margin: 90px 0 0; text-align: center; }

@keyframes atlas-unfold { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
@media (max-width: 1100px) {
  .travel-campus { --globe-size:min(76vw,calc(var(--hero-height) - 180px),780px); --globe-title-clearance:55px; }
  .travel-heading { padding-top:85px; }
  .travel-heading .masthead { width:180px; }
  .travel-heading h1 { font-size:54px; }
  .travel-campus .daily-panel { position: absolute; top: 110px; right: 18px; width: 230px; margin: 0; padding: 10px; }
  .travel-campus .daily-panel blockquote { font-size: 12px; }
}
@media (min-width: 761px) and (max-width: 960px) { .travel-campus { --travel-header: 130px; } }
@media (max-width: 760px) {
  .travel-campus { --hero-height:max(760px,calc(100svh - var(--travel-header))); --globe-size:min(78vw,600px); --globe-title-clearance:70px; }
  .travel-heading { padding-top: 94px; }
  .travel-heading .crumb { top: 25px; }
  .travel-heading h1 { font-size: 54px; }
  .travel-heading .lede { font-size: 13px; }
  .travel-campus .daily-panel { top: 100px; width: 215px; }
  .travel-campus .daily-verse { display: none; }
  .travel-journal { padding: 80px 24px; }
  .travel-stats { gap: 30px; }
  .travel-stat strong { font-size: 40px; }
  .travel-stat > span { font-size: 11px; }
  .travel-log-list { grid-template-columns: 1fr; gap: 28px; }
  .country-dialog { width: calc(100% - 28px); padding: 20px; max-height: calc(100svh - 36px); }
  .country-view { grid-template-columns: 1fr; gap: 0; }
  .country-map { height: 310px; }
}
@media (prefers-reduced-motion: reduce) {
  .country-dialog[open] { animation: none; }
  .globe-view { transform: translate(-50%, -50%); will-change: opacity; }
  .journey-scroll:hover span, .travel-card button:hover::after { transform: none; }
}

.atlas [hidden] { display: none !important; }
#atlas-retry { color: var(--ember); text-decoration: underline; font-size: 13px; }
