@font-face {
  font-family: 'Syne';
  src: url('./vendor/fonts/Syne-latin.woff2') format('woff2');
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  src: url('./vendor/fonts/PlusJakartaSans-latin.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('./vendor/fonts/Inter-latin.woff2') format('woff2');
  font-display: swap;
}

:root {
  --font-display: 'Syne', 'Plus Jakarta Sans', sans-serif;
  --font-sans: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --bg-glass: rgba(13, 25, 19, 0.76);
  --bg-glass-strong: rgba(11, 22, 16, 0.88);
  --border-glass: rgba(235, 226, 198, 0.16);
  --border-highlight: rgba(242, 206, 128, 0.48);
  --accent-gold: #f0ca78;
  --accent-gold-soft: rgba(240, 202, 120, 0.18);
  --text-primary: #f4f1e6;
  --text-muted: rgba(232, 228, 212, 0.68);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 13px;
  background: #122019;
  -webkit-font-smoothing: antialiased;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  overflow: hidden;
}

button, a, input {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
  color: inherit;
  border: 0;
  background: none;
  cursor: pointer;
}

button:focus-visible, a:focus-visible, input:focus-visible, canvas:focus-visible {
  outline: 2px solid var(--accent-gold);
  outline-offset: 3px;
}

canvas#scene {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  touch-action: none;
}

.shade {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(7, 16, 11, 0.42) 0%, transparent 18%, transparent 68%, rgba(6, 14, 10, 0.68) 100%),
    radial-gradient(circle at 50% 50%, transparent 55%, rgba(6, 14, 10, 0.28) 100%);
}

/* Header & Top Controls */
header {
  position: fixed;
  top: 22px;
  left: 28px;
  right: 28px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

header > * {
  pointer-events: auto;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
}

.wordmark strong {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13.5px;
  letter-spacing: -0.02em;
}

.wordmark-badge {
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(240, 202, 120, 0.14);
  color: var(--accent-gold);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.time-pills {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  border-radius: 999px;
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
}

.time-pills button {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--text-muted);
  transition: background 0.2s, color 0.2s;
}

.time-pills button:hover {
  color: #fff;
}

.time-pills button.active {
  background: var(--accent-gold);
  color: #122118;
  box-shadow: 0 2px 8px rgba(240, 202, 120, 0.35);
}

.hud-pill {
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-primary);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
}

.hud-pill:hover {
  background: rgba(24, 44, 34, 0.88);
  border-color: var(--border-highlight);
}

.hud-pill-subtle {
  color: var(--text-muted);
}

/* Intro Hero Overlay */
.intro {
  position: fixed;
  left: 5.5vw;
  top: 23%;
  z-index: 15;
  pointer-events: none;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.intro button {
  pointer-events: auto;
}

body:not(.clean) .intro {
  display: none;
}

.eyebrow {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--accent-gold);
  margin: 0 0 18px;
}

h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(50px, 6vw, 92px);
  line-height: 0.94;
  letter-spacing: -0.035em;
  margin: 0 0 22px;
}

h1 em {
  font-style: normal;
  font-weight: 600;
  color: var(--accent-gold);
}

.description {
  font-size: 13px;
  line-height: 1.75;
  color: var(--text-muted);
  max-width: 390px;
}

.primary {
  display: inline-flex;
  gap: 28px;
  align-items: center;
  padding: 13px 22px;
  border-radius: 999px;
  background: var(--accent-gold);
  color: #122118;
  font-weight: 700;
  font-size: 13px;
  margin-top: 24px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}

.primary span {
  font-size: 17px;
}

.walking .intro {
  opacity: 0;
  transform: translateY(-15px);
  pointer-events: none;
}

/* Footer 3-Column Modern HUD: Minimap (Left), Walk Dock (Center), Location Card (Right) */
footer {
  position: fixed;
  left: 28px;
  right: 28px;
  bottom: 24px;
  z-index: 20;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  pointer-events: none;
}

footer > * {
  pointer-events: auto;
}

/* 1. Bottom-Left Bird's-Eye Minimap Card */
.minimap-card {
  width: 252px;
  flex-shrink: 0;
  padding: 10px 10px 11px;
  border-radius: 16px;
  background: var(--bg-glass);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--border-glass);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.38);
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.minimap-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2px;
}

.minimap-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--text-muted);
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-gold);
  box-shadow: 0 0 8px var(--accent-gold);
}

.minimap-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

#minimap-pct {
  font-size: 10px;
  font-weight: 700;
  color: var(--accent-gold);
  font-variant-numeric: tabular-nums;
}

#minimap-expand {
  font-size: 10px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-primary);
  transition: background 0.2s, border-color 0.2s;
}

#minimap-expand:hover, #minimap-expand.active {
  background: var(--accent-gold-soft);
  border-color: var(--border-highlight);
  color: var(--accent-gold);
}

.minimap-stage {
  position: relative;
  width: 230px;
  height: 192px;
  margin: 0 auto;
  border-radius: 11px;
  background: radial-gradient(circle at 50% 45%, rgba(26, 48, 36, 0.72), rgba(9, 19, 14, 0.92));
  border: 1px solid rgba(235, 226, 198, 0.1);
  overflow: hidden;
  cursor: pointer;
}

#minimap-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.minimap-pins {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.minimap-pin {
  position: absolute;
  transform: translate(-50%, -50%);
  pointer-events: auto;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: rgba(18, 34, 26, 0.92);
  border: 1.5px solid rgba(234, 224, 194, 0.55);
  color: var(--text-primary);
  display: grid;
  place-items: center;
  padding: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
  transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}

.minimap-pin .pin-letter {
  font-size: 9.5px;
  font-weight: 700;
  line-height: 1;
}

.minimap-pin .pin-tooltip {
  position: absolute;
  bottom: calc(100% + 5px);
  left: 50%;
  transform: translateX(-50%) translateY(3px);
  background: rgba(11, 22, 16, 0.95);
  border: 1px solid var(--border-highlight);
  color: var(--text-primary);
  font-size: 9.5px;
  font-weight: 600;
  white-space: nowrap;
  padding: 3px 7px;
  border-radius: 6px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  z-index: 5;
}

.minimap-pin:hover {
  transform: translate(-50%, -50%) scale(1.18);
  border-color: var(--accent-gold);
  z-index: 4;
}

.minimap-pin:hover .pin-tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.minimap-pin.active {
  background: var(--accent-gold);
  border-color: #fff;
  color: #122118;
  transform: translate(-50%, -50%) scale(1.16);
  box-shadow: 0 0 12px rgba(240, 202, 120, 0.65);
  z-index: 3;
}

.minimap-footer {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 1px 2px 0;
}

#minimap-active-label {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

input#progress[type=range] {
  display: block;
  width: 100%;
  margin: 0;
  accent-color: var(--accent-gold);
  height: 3px;
  cursor: pointer;
}

/* 2. Bottom-Center Floating Walk & Destination Dock */
.tour {
  flex: 1;
  max-width: 680px;
  padding: 12px 16px;
  border-radius: 16px;
  background: var(--bg-glass);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--border-glass);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.36);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tour-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.tour-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-walk-primary {
  padding: 7px 16px;
  border-radius: 999px;
  background: var(--accent-gold);
  color: #122118;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn-walk-primary:hover {
  color: #0b1610;
  box-shadow: 0 4px 14px rgba(240, 202, 120, 0.4);
}

.btn-walk-secondary {
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--text-primary);
  font-size: 11.5px;
  font-weight: 600;
  transition: background 0.15s, border-color 0.15s;
}

.btn-walk-secondary:hover, .btn-walk-secondary[aria-pressed="true"] {
  background: var(--accent-gold-soft);
  border-color: var(--border-highlight);
  color: var(--accent-gold);
}

.tour-help {
  font-size: 10.5px;
  color: var(--text-muted);
  white-space: nowrap;
}

nav#stops {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding-top: 8px;
  border-top: 1px solid rgba(235, 226, 198, 0.1);
}

nav#stops button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid transparent;
  font-size: 10.5px;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

nav#stops button span {
  font-size: 9.5px;
  font-weight: 700;
  color: var(--accent-gold);
  opacity: 0.85;
}

nav#stops button:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

nav#stops button[aria-current="true"] {
  background: var(--accent-gold-soft);
  border-color: var(--border-highlight);
  color: #fff;
  font-weight: 600;
}

/* Walk controls when in manual mode */
.walk-controls {
  display: flex;
  gap: 8px;
  align-items: center;
}

.walk-controls[hidden] {
  display: none;
}

.walk-controls button {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border-glass);
  background: rgba(255, 255, 255, 0.07);
  font-size: 11px;
  font-weight: 600;
  touch-action: none;
  user-select: none;
}

.walk-controls button:active {
  background: var(--accent-gold-soft);
  border-color: var(--border-highlight);
}

/* 3. Bottom-Right Architectural Location Card */
.location {
  width: 288px;
  flex-shrink: 0;
  padding: 15px 18px;
  border-radius: 16px;
  background: var(--bg-glass);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--border-glass);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.36);
  text-align: left;
}

.location > span {
  display: inline-block;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-gold);
}

.location h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 21px;
  line-height: 1.15;
  letter-spacing: -0.025em;
  margin: 6px 0 7px;
  color: #fff;
}

.location p {
  font-size: 11.5px;
  line-height: 1.55;
  color: var(--text-muted);
  margin: 0;
}

/* 3D Layout Aerial Map Labels */
.site-label {
  position: fixed;
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 7px;
  transform: translate(-50%, -50%);
  padding: 4px 10px 4px 4px;
  background: var(--bg-glass-strong);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-highlight);
  border-radius: 999px;
  color: var(--text-primary);
  font-size: 11px;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  transition: transform 0.15s, background 0.15s;
}

.site-label[hidden] {
  display: none;
}

.site-label b {
  display: grid;
  place-items: center;
  min-width: 21px;
  height: 21px;
  border-radius: 50%;
  background: var(--accent-gold);
  color: #122118;
  font-size: 10.5px;
  font-weight: 700;
}

.site-label:hover {
  background: #1f382c;
  transform: translate(-50%, -50%) scale(1.06);
}

/* Clean / Cinema Mode */
body.clean header,
body.clean main,
body.clean aside,
body.clean footer,
body.clean .shade {
  display: none;
}

#show {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 30;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--bg-glass-strong);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-glass);
  font-size: 11.5px;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

/* Loading Screen */
#loading {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: radial-gradient(circle at 50% 42%, #1b3025 0%, #0e1a14 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: opacity 0.6s ease;
}

#loading > span {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.26em;
  color: var(--accent-gold);
}

#loading h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(32px, 4.2vw, 48px);
  letter-spacing: -0.03em;
  margin: 18px 0;
  color: var(--text-primary);
}

#loading p {
  font-size: 12px;
  color: var(--text-muted);
}

#loading.done {
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 1120px) {
  footer {
    flex-wrap: wrap;
  }
  .location {
    position: fixed;
    right: 24px;
    bottom: 158px;
    width: 260px;
  }
}

@media (max-width: 760px) {
  header {
    top: 14px;
    left: 14px;
    right: 14px;
  }
  .wordmark-badge, #hide {
    display: none;
  }
  .time-pills button {
    padding: 5px 8px;
    font-size: 9.5px;
  }
  footer {
    left: 14px;
    right: 14px;
    bottom: 14px;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .minimap-card {
    width: 196px;
    padding: 8px;
  }
  .minimap-stage {
    width: 178px;
    height: 146px;
  }
  .location {
    bottom: auto;
    top: 66px;
    right: 14px;
    width: 220px;
    padding: 10px 13px;
  }
  .location h2 {
    font-size: 16px;
  }
  .location p, .tour-help {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
