@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Space+Grotesk:wght@500;600;700&display=swap');

:root {
  --ink: #071c2c;
  --cyan: #00d4ff;
  --cyan-deep: #00a7cf;
  --lime: #a7f000;
  --paper: #f4f8fa;
  --muted: #6d7c87;
  --glass: rgba(7, 28, 44, .84);
}

* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; }
body { font-family: Manrope, sans-serif; color: white; background: var(--ink); }
button, a { font: inherit; }
button { cursor: pointer; }
.app-shell { position: relative; width: 100%; height: 100%; }
.map-stage, #map { position: absolute; inset: 0; }
#map { background: #b8ced4; }
.map-shade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgba(2,15,25,.83) 0%, rgba(2,15,25,.25) 31%, transparent 52%), linear-gradient(0deg, rgba(2,15,25,.62) 0%, transparent 30%); opacity: .72; }

.topbar { position: absolute; top: 0; left: 0; right: 0; height: 92px; display: flex; align-items: center; justify-content: space-between; padding: 0 42px; z-index: 5; background: linear-gradient(180deg, rgba(4,20,31,.78), transparent); }
.brand { display: flex; align-items: center; gap: 14px; }
.brand-logo { display: block; width: 138px; height: 62px; object-fit: contain; filter: drop-shadow(0 0 14px rgba(0,174,239,.2)); }
.brand-divider { width: 1px; height: 34px; background: rgba(255,255,255,.25); }
.brand-location strong { display: block; font: 700 12px/1 Space Grotesk; letter-spacing: .12em; }
.brand-location small { display: block; margin-top: 6px; color: #d8eef4; font-size: 11px; font-weight: 700; letter-spacing: .18em; }
.live-pill { padding: 10px 16px; border: 1px solid rgba(255,255,255,.28); border-radius: 999px; background: rgba(3,20,32,.86); backdrop-filter: blur(12px); color: #f2fbff; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.live-pill i { display: inline-block; width: 7px; height: 7px; margin-right: 8px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 5px rgba(167,240,0,.11); }

.hero-copy { position: absolute; z-index: 4; left: 44px; top: 20%; width: min(460px, calc(100vw - 88px)); transition: opacity .45s, transform .45s; }
.hero-copy.hidden { opacity: 0; transform: translateX(-24px); pointer-events: none; }
.eyebrow { display: inline-block; width: fit-content; padding: 6px 10px; color: #30363a; border-radius: 5px; background: rgba(245,249,250,.9); font-size: 12px; font-weight: 800; letter-spacing: .22em; box-shadow: 0 6px 18px rgba(0,18,28,.16); }
.hero-copy h1 { margin: 12px 0 18px; font: 600 clamp(44px, 5.2vw, 76px)/.98 Space Grotesk; letter-spacing: -.055em; }
.hero-copy h1 .hero-gray { color: #000a6f; text-shadow: 0 1px 1px rgba(222,231,255,.68), 0 3px 18px rgba(0,5,45,.68); }
.hero-copy h1 em { color: #000a6f; font-style: normal; text-shadow: 0 1px 1px rgba(222,231,255,.68), 0 3px 18px rgba(0,5,45,.68); }
.hero-copy > p:not(.eyebrow) { max-width: 430px; padding: 0; color: #30363a; border-radius: 0; background: transparent; font-size: 16px; font-weight: 700; line-height: 1.6; text-shadow: 0 1px 2px rgba(255,255,255,.78), 0 3px 14px rgba(255,255,255,.48); box-shadow: none; }
.primary-btn { margin-top: 18px; display: inline-flex; gap: 12px; align-items: center; padding: 15px 22px; color: var(--ink); border: 0; border-radius: 999px; background: var(--cyan); font-weight: 800; box-shadow: 0 14px 34px rgba(0,212,255,.22); transition: .2s; }
.primary-btn:hover { transform: translateY(-2px); background: #53e3ff; box-shadow: 0 18px 42px rgba(0,212,255,.34); }
.primary-btn svg { width: 20px; fill: currentColor; }

.locations { position: absolute; z-index: 7; right: 0; top: 92px; bottom: 0; width: 350px; background: rgba(244,248,250,.95); color: var(--ink); backdrop-filter: blur(16px); border-left: 1px solid rgba(255,255,255,.6); box-shadow: -20px 0 60px rgba(0,20,33,.1); transition: transform .35s; }
.locations.collapsed { transform: translateX(calc(100% - 56px)); }
.locations-head { height: 86px; display: flex; justify-content: space-between; align-items: center; padding: 0 22px; border-bottom: 1px solid #dce7eb; }
.locations-head span { display: block; color: var(--cyan-deep); font-size: 10px; font-weight: 800; letter-spacing: .2em; }
.locations-head strong { display: block; margin-top: 6px; font: 700 20px Space Grotesk; }
.locations-head button { width: 34px; height: 34px; border-radius: 50%; border: 1px solid #d5e2e7; background: white; color: var(--ink); font-size: 21px; }
.locations.collapsed .locations-head button { transform: rotate(90deg); }
.location-list { height: calc(100% - 86px); overflow-y: auto; padding: 10px 12px 34px; scrollbar-width: thin; scrollbar-color: #b5c9d0 transparent; }
.location-item { width: 100%; display: grid; grid-template-columns: 38px 1fr 26px; gap: 10px; align-items: center; padding: 13px 10px; border: 0; border-bottom: 1px solid #dfe9ed; text-align: left; color: inherit; background: transparent; border-radius: 9px; transition: .18s; }
.location-item:hover, .location-item.active { background: white; box-shadow: 0 5px 20px rgba(13,51,67,.09); transform: translateX(-3px); }
.location-item.active { box-shadow: inset 3px 0 var(--cyan), 0 5px 20px rgba(13,51,67,.09); }
.location-number { width: 31px; height: 31px; display: grid; place-items: center; color: white; border-radius: 50%; font: 700 11px Space Grotesk; background: var(--ink); }
.location-item.active .location-number { color: var(--ink); background: var(--cyan); }
.location-name { display: block; font-size: 14px; font-weight: 800; line-height: 1.3; }
.location-sponsor { display: block; margin-top: 4px; color: #455c67; font-size: 12px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.location-arrow { color: #9db0b8; font-size: 18px; }

.map-tools { position: absolute; z-index: 5; right: 370px; top: 116px; display: flex; flex-direction: column; gap: 8px; }
.map-tools button { width: 44px; height: 44px; display: grid; place-items: center; color: white; border: 1px solid rgba(255,255,255,.16); border-radius: 12px; background: var(--glass); backdrop-filter: blur(12px); }
.map-tools svg { width: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.hint { position: absolute; z-index: 3; left: 44px; bottom: 28px; color: rgba(255,255,255,.9); font-size: 12px; font-weight: 700; letter-spacing: .04em; text-shadow: 0 2px 8px rgba(0,12,21,.7); }

.totem-model-marker { position: relative; width: 110px; height: 165px; pointer-events: none; opacity: 0; transition: opacity .22s ease; }
.totem-model-marker.visible { opacity: 1; }
.totem-rise { position: absolute; left: 50%; bottom: 2px; width: 100%; height: 100%; transform: translateX(-50%); transform-origin: 50% 100%; }
.totem-rise img { display: block; width: 100%; height: 100%; object-fit: contain; object-position: center bottom; filter: drop-shadow(0 10px 10px rgba(0,20,30,.48)); }
.totem-ground-shadow { position: absolute; z-index: -1; left: 50%; bottom: 0; width: 44%; height: 8px; border-radius: 50%; background: rgba(0,20,30,.48); filter: blur(4px); transform: translateX(-50%) scaleX(.15); opacity: 0; }
.totem-model-marker.rising .totem-rise { animation: totem-rise 1.05s cubic-bezier(.16,.82,.22,1) both; }
.totem-model-marker.rising .totem-ground-shadow { animation: totem-shadow 1.05s ease-out both; }
@keyframes totem-rise {
  0% { opacity: 0; clip-path: inset(100% 0 0 0); transform: translate(-50%,18px) scale(.72,.08); }
  55% { opacity: 1; clip-path: inset(0 0 0 0); transform: translate(-50%,-7px) scale(1.03,1.04); }
  78% { transform: translate(-50%,2px) scale(.99,.98); }
  100% { opacity: 1; clip-path: inset(0 0 0 0); transform: translate(-50%,0) scale(1); }
}
@keyframes totem-shadow {
  0% { opacity: 0; transform: translateX(-50%) scaleX(.15); }
  70%,100% { opacity: .72; transform: translateX(-50%) scaleX(1); }
}

.detail-card { position: absolute; z-index: 8; left: 44px; bottom: 66px; width: min(390px, calc(100vw - 88px)); overflow: hidden; color: var(--ink); border-radius: 20px; background: rgba(247,251,252,.97); box-shadow: 0 25px 70px rgba(0,20,33,.35); opacity: 0; transform: translateY(24px); pointer-events: none; transition: .35s; }
.detail-card.visible { opacity: 1; transform: none; pointer-events: auto; }
.detail-card.dragging { transition: none; }
.sheet-head { position: relative; width: 100%; height: 54px; display: grid; grid-template-columns: 1fr auto; grid-template-rows: 16px 22px; align-items: center; padding: 12px 58px 8px 18px; color: var(--ink); border: 0; border-bottom: 1px solid #cbdde3; background: rgba(247,251,252,.99); text-align: left; cursor: grab; touch-action: none; user-select: none; }
.sheet-head:active { cursor: grabbing; }
.sheet-head strong { grid-column: 1; grid-row: 2; overflow: hidden; font: 800 14px/1.2 Space Grotesk; white-space: nowrap; text-overflow: ellipsis; }
.sheet-head small { grid-column: 2; grid-row: 2; color: #425a65; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.sheet-grip { position: absolute; top: 6px; left: 50%; width: 40px; height: 4px; border-radius: 4px; background: #7895a0; transform: translateX(-50%); }
.close-btn { position: absolute; z-index: 2; right: 12px; top: 12px; width: 32px; height: 32px; border: 0; border-radius: 50%; color: white; background: rgba(4,20,31,.76); font-size: 20px; }
.detail-image { height: 190px; display: grid; place-items: center; overflow: hidden; background: linear-gradient(135deg,#0b3b52,#00bddd); }
.detail-image img { width: 100%; height: 100%; object-fit: cover; }
.detail-image iframe { display: block; width: 100%; height: 100%; border: 0; background: linear-gradient(135deg,#0b3b52,#00bddd); }
.detail-image span { color: rgba(255,255,255,.9); font: 800 48px Space Grotesk; letter-spacing: .08em; }
.streetview-caption { display: flex; justify-content: space-between; align-items: center; padding: 8px 14px; color: #3f5661; border-bottom: 1px solid #d2e0e5; background: #edf4f6; font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.streetview-caption span { display: inline-flex; align-items: center; gap: 6px; }
.streetview-caption i { width: 6px; height: 6px; border-radius: 50%; background: var(--cyan-deep); box-shadow: 0 0 0 3px rgba(0,167,207,.12); }
.detail-body { padding: 18px 20px 20px; }
.detail-meta { display: flex; justify-content: space-between; color: #007f9e; font-size: 11px; font-weight: 800; letter-spacing: .1em; }
.detail-body h2 { margin: 10px 0 4px; font: 700 20px/1.2 Space Grotesk; letter-spacing: -.02em; }
.detail-body p { margin: 0; color: #405761; font-size: 13px; font-weight: 700; }
.coords { margin: 14px 0 12px; color: #526973; font-size: 11px; font-weight: 700; }
.detail-body a { color: #006f89; font-size: 13px; font-weight: 800; text-decoration: none; }

.tour-panel { position: absolute; z-index: 9; left: 50%; bottom: 28px; width: min(520px, calc(100vw - 80px)); display: grid; grid-template-columns: 46px 110px 1fr auto; gap: 14px; align-items: center; padding: 11px 14px; border: 1px solid rgba(255,255,255,.14); border-radius: 18px; background: var(--glass); backdrop-filter: blur(16px); opacity: 0; transform: translate(-50%, 30px); pointer-events: none; transition: .35s; }
.tour-panel.visible { opacity: 1; transform: translate(-50%,0); pointer-events: auto; }
.tour-panel button { border: 0; color: white; background: transparent; }
#tourToggle { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; color: var(--ink); background: var(--cyan); }
#tourToggle svg { width: 18px; fill: currentColor; }
.play-icon { display: none; }
.tour-panel.paused .pause-icon { display: none; }
.tour-panel.paused .play-icon { display: block; }
.tour-panel small { display: block; color: #7fa5b2; font-size: 8px; letter-spacing: .15em; }
.tour-panel strong { font-size: 12px; }
.tour-progress { height: 3px; border-radius: 3px; background: rgba(255,255,255,.13); overflow: hidden; }
.tour-progress i { display: block; width: 0; height: 100%; background: var(--lime); transition: width .4s; }
.tour-stop { font-size: 11px!important; color: #b9d0d8!important; }

.maplibregl-ctrl-bottom-right { right: 360px; }
.maplibregl-ctrl-logo { opacity: .7; }
.maplibregl-ctrl-attrib.maplibregl-compact:not(.maplibregl-compact-show) .maplibregl-ctrl-attrib-inner { display: none; }
.maplibregl-ctrl-attrib.maplibregl-compact:not(.maplibregl-compact-show) { width: 28px; min-height: 28px; overflow: hidden; border-radius: 7px 0 0 0; }
.maplibregl-popup-content { padding: 9px 12px; color: var(--ink); border-radius: 10px; font: 700 12px Manrope; }
.maplibregl-popup-close-button { display: none; }

@media (max-width: 760px) {
  .topbar { height: 76px; padding: 0 16px; }
  .brand-logo { width: 104px; height: 48px; }
  .brand-divider { height: 28px; }
  .brand-location strong { font-size: 9px; }
  .brand-location small { font-size: 10px; }
  .live-pill { padding: 8px 10px; font-size: 11px; }
  .hero-copy { left: 20px; top: 16%; width: calc(100vw - 40px); }
  .hero-copy h1 { font-size: clamp(42px, 15vw, 64px); }
  .hero-copy > p:not(.eyebrow) { width: 86%; font-size: 15px; }
  .locations { top: auto; left: 0; right: 0; bottom: 0; width: 100%; height: 142px; border-left: 0; border-top: 1px solid white; transform: none; }
  .locations.collapsed { transform: translateY(calc(100% - 48px)); }
  .locations-head { height: 48px; padding: 0 12px; }
  .locations-head strong { display: inline; margin-left: 6px; font-size: 13px; }
  .locations-head span { display: inline; font-size: 9px; }
  .locations-head button { width: 30px; height: 30px; }
  .location-list { height: 94px; display: flex; gap: 7px; padding: 6px 10px 10px; overflow-x: auto; overflow-y: hidden; }
  .location-item { min-width: 205px; grid-template-columns: 30px 1fr 18px; gap: 7px; padding: 8px; border: 1px solid #dfe9ed; background: white; }
  .location-number { width: 28px; height: 28px; font-size: 10px; }
  .location-name { font-size: 12px; line-height: 1.2; }
  .location-sponsor { margin-top: 2px; font-size: 11px; }
  .map-tools { right: 14px; top: 92px; }
  .totem-model-marker { width: 94px; height: 141px; }
  .maplibregl-ctrl-bottom-right { right: 0; bottom: 142px; }
  .hint { display: none; }
  .detail-card { left: 10px; bottom: 58px; width: calc(100vw - 20px); max-height: min(340px, calc(100dvh - 132px)); border-radius: 15px; touch-action: none; }
  .detail-card.visible { transform: translateY(0); }
  .detail-card.minimized { transform: translateY(calc(100% - 50px)); }
  .sheet-head { height: 50px; grid-template-rows: 14px 20px; padding: 11px 52px 6px 14px; }
  .sheet-head strong { font-size: 12px; }
  .sheet-head small { font-size: 10px; }
  .sheet-grip { top: 5px; width: 34px; }
  .close-btn { top: 10px; right: 11px; width: 29px; height: 29px; font-size: 18px; }
  .detail-image { height: 108px; }
  .streetview-caption { padding: 5px 10px; font-size: 10px; }
  .detail-body { padding: 10px 14px 13px; }
  .detail-meta { font-size: 10px; }
  .detail-body h2 { margin: 7px 0 3px; font-size: 15px; }
  .detail-body p { font-size: 12px; }
  .coords { margin: 8px 0 7px; font-size: 10px; }
  .detail-body a { font-size: 12px; }
  .tour-panel { bottom: 60px; grid-template-columns: 38px 90px 1fr; gap: 9px; width: calc(100vw - 20px); padding: 8px 10px; }
  .tour-stop { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms!important; animation-iteration-count: 1!important; scroll-behavior: auto!important; }
}
