/* Memoroam — Globe */
/* ── GLOBE HOME PAGE ── */
#pageHome{background:#1a1f2e;position:relative;}
#pageHome .page-scroll{padding:0;overflow:hidden;height:100%;position:relative;}
.home-globe-wrap{position:absolute;inset:0;background:radial-gradient(ellipse at 50% 42%, #1e2535 0%, #111520 100%);}
#globeSvg{display:block;cursor:grab;touch-action:none;}
#globeSvg:active{cursor:grabbing;}

/* Stars background */
.globe-stars{position:absolute;inset:0;overflow:hidden;pointer-events:none;}
.star-twinkle{animation:starTwinkle 5s ease-in-out infinite;}
@keyframes starTwinkle{
  0%,100%{opacity:var(--star-base,0.3);}
  50%{opacity:0.05;}
}

/* Stats bar — frosted pill over globe */
.home-stats-bar{position:absolute;top:0;left:0;right:0;z-index:30;padding:52px 28px 0;pointer-events:none;}
.home-stats-inner{display:flex;align-items:center;justify-content:center;background:rgba(240,235,227,.12);backdrop-filter:blur(16px);border-radius:50px;padding:10px 0;border:1px solid rgba(255,255,255,.1);box-shadow:0 2px 20px rgba(0,0,0,.3);}
.hs-stat{display:flex;flex-direction:column;align-items:center;gap:3px;flex:1;}
.hs-num{font-family:'IBM Plex Mono',monospace;font-size:20px;font-weight:700;color:#E8D5A0;line-height:1;}
.hs-lbl{font-size:9px;font-weight:600;color:rgba(255,255,255,.45);letter-spacing:1.2px;text-transform:uppercase;}
.hs-divider{width:1px;height:28px;background:rgba(255,255,255,.12);}

/* Gallery button — bottom-left frosted pill */
.globe-gallery-btn{
  position:absolute;bottom:32px;left:20px;
  display:flex;align-items:center;gap:7px;
  padding:9px 14px 9px 11px;border-radius:40px;
  background:rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.1);
  backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);
  cursor:pointer;z-index:30;
  transition:all .18s ease;
  -webkit-tap-highlight-color:transparent;
}
.globe-gallery-btn svg{color:rgba(255,255,255,.5);flex-shrink:0;}
.globe-gallery-btn:active{transform:scale(.94);background:rgba(255,255,255,.14);}
.gallery-btn-label{
  font-family:'DM Sans',sans-serif;font-size:12px;font-weight:600;
  color:rgba(255,255,255,.5);letter-spacing:.3px;
}

/* Gallery toast — appears above gallery button */
.globe-gallery-toast{
  position:absolute;bottom:76px;left:20px;
  padding:7px 14px;border-radius:10px;
  background:rgba(30,37,53,.92);
  border:1px solid rgba(255,255,255,.1);
  backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);
  font-family:'DM Sans',sans-serif;font-size:11.5px;font-weight:500;
  color:rgba(255,255,255,.55);
  opacity:0;transform:translateY(6px);
  transition:opacity .25s ease,transform .25s ease;
  pointer-events:none;z-index:30;
}
.globe-gallery-toast.show{
  opacity:1;transform:translateY(0);
}

/* FAB — gold circle */
.home-fab{
  position:absolute;bottom:24px;right:20px;
  width:54px;height:54px;border-radius:50%;
  background:#E8D5A0;border:none;cursor:pointer;
  display:flex;align-items:center;justify-content:center;
  box-shadow:0 4px 24px rgba(232,213,160,.45);
  z-index:40;
  transition:background .25s, box-shadow .25s;
}
.home-fab:active{transform:scale(.91);}
.home-fab svg{
  color:#1a1f2e;
  transition:transform .42s cubic-bezier(.34,1.56,.64,1);
}
/* + rotates 135deg → clean diagonal x */
.home-fab.open svg{ transform:rotate(135deg); }
.home-fab.open{ background:#c8b06a; box-shadow:0 6px 28px rgba(200,176,106,.5); }

/* FAB action buttons — icon + label */
.home-fab-menu{
  position:absolute;bottom:88px;right:20px;
  display:flex;flex-direction:column;align-items:flex-end;gap:12px;
  z-index:41;pointer-events:none;
}
.fab-action{
  display:flex;align-items:center;gap:10px;
  cursor:pointer;pointer-events:none;
  opacity:0;
  transform:translateY(30px) scale(0.45);
  transition:opacity .18s ease, transform .2s cubic-bezier(.4,0,1,1);
}
.fab-icon{
  width:46px;height:46px;border-radius:50%;flex-shrink:0;
  background:#1e2535;border:1px solid rgba(255,255,255,.12);
  display:flex;align-items:center;justify-content:center;
  box-shadow:0 4px 18px rgba(0,0,0,.45);
}
.fab-icon svg{ color:#E8D5A0; }
.fab-label{
  padding:7px 14px;border-radius:10px;
  background:rgba(30,37,53,.92);
  border:1px solid rgba(255,255,255,.1);
  backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);
  font-family:'DM Sans',sans-serif;font-size:12.5px;font-weight:500;
  color:rgba(255,255,255,.7);white-space:nowrap;
  box-shadow:0 2px 12px rgba(0,0,0,.3);
}
.fab-action:active{ opacity:.7 !important; }
/* Open: spring up */
.home-fab-menu.open .fab-action{
  opacity:1;
  transform:translateY(0) scale(1);
  pointer-events:all;
  transition:opacity .28s ease, transform .38s cubic-bezier(.34,1.5,.64,1);
}
/* Stagger open — camera (child 2, nearest FAB) first */
.home-fab-menu.open .fab-action:nth-child(2){ transition-delay:0s;   }
.home-fab-menu.open .fab-action:nth-child(1){ transition-delay:.09s; }

/* Country reveal — smooth fill transition when the plane lands */
#globeSvg .countries path{ transition: fill .6s ease-out; }

/* ── Flight landing animation ── */
.flight-arcs{ pointer-events:none; }
.flight-plane{ filter:drop-shadow(0 2px 8px rgba(232,213,160,.55)); }
.flight-trail{
  filter:drop-shadow(0 0 4px rgba(232,213,160,.45));
  animation: flightTrailDash .55s linear infinite;
}
.flight-trail-glow{
  filter:blur(3px);
  mix-blend-mode:screen;
}
.flight-plane-halo{
  animation: flightHaloPulse 1.2s ease-out infinite;
  transform-origin: center;
}
@keyframes flightTrailDash {
  to { stroke-dashoffset: -12; }
}
@keyframes flightHaloPulse {
  0%   { r:11; opacity:0.9; }
  60%  { r:24; opacity:0.15; }
  100% { r:28; opacity:0; }
}

/* Full-screen interaction blocker during animation */
.plane-anim-blocker{
  position:fixed;inset:0;z-index:9500;
  background:transparent;
  touch-action:none;
  -webkit-user-select:none;user-select:none;
  display:none;
}

/* ── Arrival prompt bottom-sheet (plan-your-trip widget) ── */
.arrival-prompt-sheet{
  position:fixed;left:14px;right:14px;bottom:14px;
  padding:12px 18px 18px;
  background:linear-gradient(180deg,rgba(22,30,46,0.96) 0%,rgba(14,21,32,0.98) 100%);
  border:1px solid rgba(232,213,160,0.22);
  border-radius:22px;
  box-shadow:0 22px 60px rgba(0,0,0,0.6), 0 0 0 1px rgba(0,0,0,0.35);
  backdrop-filter:blur(22px);-webkit-backdrop-filter:blur(22px);
  z-index:9600;
  transform:translateY(calc(100% + 32px));
  opacity:0;
  transition:transform .45s cubic-bezier(.34,1.3,.64,1), opacity .3s ease;
  pointer-events:all;
}
.arrival-prompt-sheet.open{
  transform:translateY(0);
  opacity:1;
}
.arrival-prompt-grabber{
  width:36px;height:4px;
  background:rgba(255,255,255,0.22);
  border-radius:2px;
  margin:0 auto 14px;
}
.arrival-prompt-header{
  display:flex;align-items:center;gap:12px;
  margin-bottom:12px;
}
.arrival-prompt-flag{
  font-size:30px;line-height:1;
  flex:0 0 auto;
  filter:drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}
.arrival-prompt-heading{
  flex:1;min-width:0;
}
.arrival-prompt-eyebrow{
  color:#E8D5A0;
  font-family:'DM Sans',sans-serif;
  font-size:10px;font-weight:600;
  letter-spacing:1.2px;
  text-transform:uppercase;
  margin-bottom:2px;
  opacity:0.85;
}
.arrival-prompt-title{
  color:#fff;
  font-family:'Playfair Display',serif;
  font-size:19px;font-weight:600;
  letter-spacing:0.1px;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.arrival-prompt-close{
  flex:0 0 auto;
  width:30px;height:30px;
  border-radius:50%;
  background:rgba(255,255,255,0.06);
  border:1px solid rgba(255,255,255,0.1);
  color:rgba(255,255,255,0.55);
  display:flex;align-items:center;justify-content:center;
  cursor:pointer;
  padding:0;
}
.arrival-prompt-close:active{opacity:0.6;}
.arrival-prompt-meta{
  display:flex;flex-wrap:wrap;gap:6px;
  margin-bottom:12px;
}
.arrival-prompt-meta-pill{
  padding:5px 10px;
  background:rgba(232,213,160,0.08);
  border:1px solid rgba(232,213,160,0.18);
  border-radius:10px;
  color:rgba(255,255,255,0.82);
  font-family:'DM Sans',sans-serif;
  font-size:11.5px;font-weight:500;
  letter-spacing:0.2px;
  white-space:nowrap;
}
.arrival-prompt-body{
  color:rgba(255,255,255,0.6);
  font-family:'DM Sans',sans-serif;
  font-size:13px;line-height:1.5;
  margin-bottom:14px;
}
.arrival-prompt-actions{
  display:flex;gap:10px;
}
.arrival-prompt-primary{
  flex:1;
  padding:13px 18px;
  background:linear-gradient(135deg,#E8D5A0 0%,#C8B06A 100%);
  color:#1a1a2e;
  border:none;border-radius:13px;
  font-family:'DM Sans',sans-serif;
  font-size:14px;font-weight:600;
  letter-spacing:0.3px;
  cursor:pointer;
  display:flex;align-items:center;justify-content:center;gap:8px;
  box-shadow:0 4px 16px rgba(232,213,160,0.28);
  transition:transform .12s ease, box-shadow .12s ease;
}
.arrival-prompt-primary:active{
  transform:scale(0.98);
  box-shadow:0 2px 8px rgba(232,213,160,0.2);
}
.arrival-prompt-secondary{
  padding:13px 18px;
  background:transparent;
  color:rgba(255,255,255,0.65);
  border:1px solid rgba(255,255,255,0.15);
  border-radius:13px;
  font-family:'DM Sans',sans-serif;
  font-size:13.5px;font-weight:500;
  letter-spacing:0.2px;
  cursor:pointer;
  transition:opacity .12s ease;
}
.arrival-prompt-secondary:active{opacity:0.55;}

.landing-toast{
  position:fixed;left:50%;top:14%;transform:translate(-50%,-20px);
  background:rgba(14,21,32,.92);color:#E8D5A0;
  font-family:'DM Sans',sans-serif;font-size:13px;font-weight:500;
  padding:10px 18px;border-radius:14px;
  border:1px solid rgba(232,213,160,.25);
  backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);
  box-shadow:0 8px 28px rgba(0,0,0,.45);
  opacity:0;pointer-events:none;z-index:9999;
  transition:opacity .3s ease, transform .3s cubic-bezier(.34,1.5,.64,1);
  white-space:nowrap;
}
.landing-toast.show{ opacity:1;transform:translate(-50%,0); }

.fab-dim{position:absolute;inset:0;z-index:39;display:none;}
.fab-dim.active{display:block;}

/* ── Pin pulse animations ── */
/* Default pin — slow, ethereal outward pulse */
@keyframes pinPulse {
  0%   { transform:scale(1);   opacity:0;    }
  15%  { opacity:.5; }
  100% { transform:scale(3.2); opacity:0;    }
}
/* Selected pin rings — two-ring ripple, reduced start opacity so gold dot shows through */
@keyframes pinRippleA {
  0%   { transform:scale(1);   opacity:.35; }
  100% { transform:scale(2.8); opacity:0;  }
}
@keyframes pinRippleB {
  0%   { transform:scale(1);   opacity:.2; }
  100% { transform:scale(2.2); opacity:0;  }
}

/* ═══════════════════════════════════════════
   Gallery Overlay
   ═══════════════════════════════════════════ */
.gallery-overlay{
  position:absolute;inset:0;z-index:800;
  background:var(--bg);
  transform:translateY(100%);
  transition:transform .38s cubic-bezier(.32,.72,0,1);
  display:flex;flex-direction:column;
  overflow:hidden;
}
.gallery-overlay.open{transform:translateY(0);}

/* Header */
.gallery-header{
  display:flex;align-items:center;gap:12px;
  padding:52px 20px 0;flex-shrink:0;
}
.gallery-back{
  width:40px;height:40px;border-radius:50%;
  background:none;border:none;cursor:pointer;
  display:flex;align-items:center;justify-content:center;
  color:var(--text);transition:background .12s;
}
.gallery-back:active{background:rgba(0,0,0,.05);}
.gallery-title{
  font-family:'Playfair Display',serif;font-size:24px;font-weight:700;
  color:var(--text);flex:1;letter-spacing:-.3px;
}
.gallery-count{
  font-family:'IBM Plex Mono',monospace;font-size:11px;font-weight:500;
  color:var(--muted);letter-spacing:.3px;
}

/* Search — collapsible */
.gallery-search-wrap{
  position:relative;margin:0 20px;flex-shrink:0;
  max-height:0;overflow:hidden;
  transition:max-height .3s cubic-bezier(.32,.72,0,1), margin-top .3s ease, opacity .25s ease;
  opacity:0;
}
.gallery-search-wrap.open{
  max-height:56px;margin-top:16px;opacity:1;
}
.gallery-search-icon{
  position:absolute;left:14px;top:50%;transform:translateY(-50%);
  color:var(--muted);pointer-events:none;
}
.gallery-search{
  width:100%;padding:12px 14px 12px 40px;
  font-family:'DM Sans',sans-serif;font-size:14px;
  color:var(--text);background:var(--card);
  border:1px solid var(--border);border-radius:16px;
  outline:none;box-sizing:border-box;
  transition:border-color .15s;
}
.gallery-search::placeholder{color:var(--muted);}
.gallery-search:focus{border-color:rgba(74,140,138,.4);}

/* Search toggle button in header */
.gallery-search-toggle{
  width:40px;height:40px;border-radius:50%;
  background:none;border:none;cursor:pointer;
  display:flex;align-items:center;justify-content:center;
  color:var(--muted);transition:all .15s;
}
.gallery-search-toggle:active{background:rgba(0,0,0,.05);}
.gallery-search-toggle.active{color:var(--text);}

/* City filter pills */
.gallery-filters{
  display:flex;gap:8px;
  padding:18px 20px 0;flex-shrink:0;
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
  scrollbar-width:none;
}
.gallery-filters::-webkit-scrollbar{display:none;}
.gallery-pill{
  flex-shrink:0;
  padding:8px 18px;border-radius:24px;
  font-family:'DM Sans',sans-serif;font-size:12px;font-weight:500;
  color:var(--muted);background:var(--card);
  border:1px solid var(--border);
  cursor:pointer;white-space:nowrap;
  transition:all .2s cubic-bezier(.32,.72,0,1);
}
.gallery-pill.active{
  color:#fff;background:#4A8C8A;
  border-color:#4A8C8A;font-weight:600;
  box-shadow:0 2px 12px rgba(74,140,138,.25);
}
.gallery-pill:active{transform:scale(.96);}

/* Toolbar: sort toggle — minimal */
.gallery-toolbar{
  display:flex;align-items:center;justify-content:space-between;
  padding:16px 20px 0;flex-shrink:0;
}

/* Sort buttons (pill-style with label) */
.gallery-sort-group{
  display:flex;gap:6px;
}
.gallery-sort-btn{
  display:flex;align-items:center;gap:5px;
  padding:7px 14px;border:none;
  background:var(--card);border-radius:20px;
  font-family:'DM Sans',sans-serif;font-size:11px;font-weight:500;
  color:var(--muted);cursor:pointer;
  transition:all .15s;
  box-shadow:0 1px 3px rgba(0,0,0,.04);
}
.gallery-sort-btn.active{
  background:var(--text);color:var(--bg);
  font-weight:600;
  box-shadow:0 2px 8px rgba(0,0,0,.12);
}
.gallery-sort-btn.active svg{stroke:var(--bg);}
.gallery-sort-btn:active{transform:scale(.96);}

/* View buttons — hidden, masonry is default */
.gallery-view-group{display:none;}
.gallery-view-btn{display:none;}

/* Scrollable content */
.gallery-scroll{
  flex:1;overflow-y:auto;
  padding:18px 16px 100px;
  -webkit-overflow-scrolling:touch;
}

/* 2-col row-major grid — tiles 0/1 fill the top row together, 2/3 the next, etc.
   Row-major makes the index-based animation stagger match visual reading order,
   so both columns populate together instead of left-then-right. */
.gallery-grid{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:10px;
}

/* Vertical view — keep as fallback */
.gallery-vertical{
  display:flex;flex-direction:column;
  gap:20px;padding:0 4px;
}
.gallery-vertical .gallery-tile{
  aspect-ratio:auto;
  border-radius:14px;
  box-shadow:0 4px 20px rgba(0,0,0,.08);
  overflow:hidden;
}
.gallery-vertical .gallery-tile img{
  width:100%;height:auto;object-fit:cover;
}
.gallery-vertical .gallery-tile-info{
  padding:28px 14px 12px;
}
.gallery-vertical .gallery-tile-city{
  font-size:11px;
}
.gallery-vertical .gallery-tile-date{
  font-size:10px;
}

/* Tile (shared) */
.gallery-tile{
  overflow:hidden;
  border-radius:12px;cursor:pointer;
  position:relative;
  background:rgba(0,0,0,.04);
  transition:transform .2s ease;
}
.gallery-tile img{
  width:100%;height:auto;aspect-ratio:1/1;object-fit:cover;display:block;
  transition:transform .25s cubic-bezier(.32,.72,0,1);
}
.gallery-tile:active img{transform:scale(1.04);}

/* Tile overlay — refined with city + date */
.gallery-tile-info{
  position:absolute;bottom:0;left:0;right:0;
  padding:32px 10px 8px;
  background:linear-gradient(to top,rgba(0,0,0,.55) 0%,rgba(0,0,0,.15) 60%,transparent 100%);
  pointer-events:none;
}
.gallery-tile-city{
  font-family:'Playfair Display',serif;font-size:12px;font-weight:600;
  color:white;line-height:1.2;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
  text-shadow:0 1px 4px rgba(0,0,0,.3);
}
.gallery-tile-date{
  font-family:'IBM Plex Mono',monospace;font-size:9px;font-weight:400;
  color:rgba(255,255,255,.65);margin-top:2px;
  letter-spacing:.3px;
}

/* All tiles fade up together as a single smooth motion */
@keyframes galleryTileIn{
  from{opacity:0;transform:translateY(12px);}
  to{opacity:1;transform:translateY(0);}
}
.gallery-tile{
  animation:galleryTileIn .5s cubic-bezier(.22,.7,.3,1) both;
}

/* City section (location sort mode) */
.gallery-city-section{margin-bottom:24px;}
.gallery-city-heading{
  display:flex;align-items:baseline;gap:8px;
  padding:4px 4px 12px;
}
.gallery-city-name{
  font-family:'Playfair Display',serif;font-size:18px;font-weight:700;
  color:var(--text);letter-spacing:-.2px;
}
.gallery-city-count{
  font-family:'IBM Plex Mono',monospace;font-size:10px;
  color:var(--muted);letter-spacing:.3px;
}

/* Empty state */
.gallery-empty{
  flex:1;display:flex;flex-direction:column;
  align-items:center;justify-content:center;gap:12px;
  padding:60px 40px;min-height:240px;
}
.gallery-empty-text{
  font-family:'Playfair Display',serif;font-size:20px;font-weight:700;
  color:var(--muted);
}
.gallery-empty-sub{
  font-family:'DM Sans',sans-serif;font-size:13px;
  color:var(--muted);opacity:.5;text-align:center;line-height:1.5;
}

/* ═══════════════════════════════════════════
   Gallery Lightbox (full photo view)
   ═══════════════════════════════════════════ */
.gallery-lightbox{
  position:absolute;inset:0;z-index:850;
  background:rgba(0,0,0,.97);
  display:flex;flex-direction:column;
  align-items:center;justify-content:center;
  opacity:0;pointer-events:none;
  transition:opacity .3s ease;
  backdrop-filter:blur(20px);-webkit-backdrop-filter:blur(20px);
}
.gallery-lightbox.open{opacity:1;pointer-events:auto;}

.gallery-lb-close{
  position:absolute;top:52px;right:20px;z-index:5;
  width:40px;height:40px;border-radius:50%;
  background:rgba(255,255,255,.08);border:none;
  display:flex;align-items:center;justify-content:center;
  cursor:pointer;color:rgba(255,255,255,.7);
  transition:all .15s;
}
.gallery-lb-close:active{background:rgba(255,255,255,.15);color:white;}

.gallery-lb-photo-wrap{
  width:100%;max-width:100%;padding:92px 12px 0;
  flex:1;display:flex;align-items:center;justify-content:center;
  min-height:0;overflow:hidden;
}
.gallery-lb-photo{
  max-width:100%;max-height:100%;border-radius:10px;display:block;
  object-fit:contain;
  box-shadow:0 8px 40px rgba(0,0,0,.4);
  animation:galleryLbIn .4s cubic-bezier(.32,.72,0,1);
}
@keyframes galleryLbIn{
  from{opacity:0;transform:scale(.92) translateY(12px);}
  to{opacity:1;transform:scale(1) translateY(0);}
}

.gallery-lb-info{
  text-align:center;padding:20px 32px;flex-shrink:0;
  padding-bottom:max(20px, env(safe-area-inset-bottom, 20px));
}
.gallery-lb-city{
  font-family:'Playfair Display',serif;font-size:20px;font-weight:700;
  color:white;letter-spacing:-.2px;
}
.gallery-lb-date{
  font-family:'IBM Plex Mono',monospace;font-size:11px;
  color:rgba(255,255,255,.35);margin-top:6px;letter-spacing:.5px;
}
.gallery-lb-note{
  font-family:'DM Sans',sans-serif;font-size:14px;
  color:rgba(255,255,255,.55);margin-top:12px;
  font-style:italic;line-height:1.5;
}

/* ── Dark Mode ── */
[data-theme="dark"] .home-stats-inner{background:rgba(26,23,20,.12);}
