:root {
  --ink: #1b1f2a;
  --sub: #5d6374;
  --text: #3a4050;
  --bg: #e8ebf2;
  --accent: #3b48b0;
  --accent-dark: #1f2a85;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  font-family: 'Manrope', sans-serif;
  color: var(--ink);
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); }

.scene {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  min-height: 760px;
  overflow: hidden;
  background: var(--bg);
  color: var(--ink);
}

.stage {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(100%, 160vh);
  aspect-ratio: 1440 / 900;
  transform: translate(-50%, -50%);
}

#city { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

.bld { cursor: pointer; }
.hov { opacity: 0; transition: opacity .3s; pointer-events: none; }
.bld:hover .hov, .bld.on .hov { opacity: 1; }

@keyframes hpulse { 0%, 100% { opacity: .5; } 50% { opacity: 1; } }
@keyframes hblink { 0%, 100% { opacity: 1; } 50% { opacity: .15; } }
.hpulse { animation: hpulse 1.4s ease-in-out infinite; }
.hblink { animation: hblink .9s steps(2, end) infinite; }

/* floating building card */
.bcard {
  position: absolute;
  z-index: 3;
  width: 250px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(27, 31, 42, .18);
  padding: 14px 16px;
  display: none;
}
.bcard::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -7px;
  width: 14px;
  height: 14px;
  background: #ffffff;
  transform: translateX(-50%) rotate(45deg);
}
.bcard.below::after { bottom: auto; top: -7px; }
.bcard.side-left::after { left: auto; right: -7px; bottom: auto; top: 10%; transform: translateY(-50%) rotate(45deg); }
.bcard.side-right::after { left: -7px; bottom: auto; top: 50%; transform: translateY(-50%) rotate(45deg); }
.bcard .card-meta { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; color: var(--sub); }
.bcard .card-dot { width: 10px; height: 10px; border-radius: 3px; }
.bcard .card-role { margin-top: 4px; font-size: 16px; font-weight: 800; color: var(--ink); }
.bcard .card-short { margin: 6px 0 12px; font-size: 13px; line-height: 1.45; color: var(--text); }

.more {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: #ffffff;
  font-family: 'Manrope', sans-serif;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.more:hover { background: var(--accent); }

/* header */
.site-header {
  position: absolute;
  top: 0; left: 0; right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 20px 48px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; color: var(--ink); }
.brand .by { font-weight: 500; font-size: 14px; color: var(--sub); }
.site-nav { display: flex; gap: 24px; font-size: 15px; font-weight: 500; align-items: center; }
.navlinks { color: var(--text); }
.lang-btn {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  cursor: pointer;
}
.contact-btn {
  display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 0 16px 0 14px;
  border-radius: 999px; background: var(--ink); color: #ffffff;
}

.hero { position: absolute; left: 48px; top: 104px; width: 340px; transition: opacity .35s ease; }
.hero h1 { margin: 0; font-size: 32px; line-height: 1.1; font-weight: 800; letter-spacing: -.02em; }

/* sliding detail panel */
.panel {
  position: absolute;
  top: 0; bottom: 0;
  width: 50%;
  min-width: 360px;
  max-width: 720px;
  background: #ffffff;
  box-shadow: 0 0 40px rgba(27, 31, 42, .18);
  overflow-y: auto;
  padding: 28px 32px 40px;
  z-index: 5;
  visibility: hidden;
}
.panel-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.panel-meta { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--sub); }
.panel-dot { width: 12px; height: 12px; border-radius: 3px; }
.panel h2 { margin: 10px 0 0; font-size: 32px; line-height: 1.1; font-weight: 800; letter-spacing: -.02em; }
.panel-close {
  flex: none; width: 44px; height: 44px; border-radius: 50%; border: 0;
  background: #eceef3; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.panel-desc { margin: 18px 0 0; font-size: 17px; line-height: 1.6; color: var(--text); }
.panel h3 { margin: 28px 0 0; font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--sub); }
.panel ul { margin: 10px 0 0; padding-left: 20px; font-size: 15px; line-height: 1.65; color: var(--text); }
.shots { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 12px; align-items: flex-start; }
.shot {
  background: #eceef3; border: 1px solid #d5d9e2; display: flex; align-items: center;
  justify-content: center; text-align: center; padding: 12px; font-size: 13px; color: var(--sub);
}
.shot.web { flex: 1 1 240px; aspect-ratio: 16 / 10; border-radius: 12px; }
.shot.bot { flex: 0 0 150px; aspect-ratio: 9 / 16; border-radius: 20px; }
.shot img { width: 100%; height: 100%; object-fit: contain; border-radius: inherit; display: block; }
.stack { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.stack span { font-size: 13px; font-weight: 500; padding: 6px 12px; border-radius: 999px; background: #eceef3; color: var(--text); }
.panel-link {
  margin-top: 28px; display: inline-flex; align-items: center; min-height: 48px; padding: 0 22px;
  border-radius: 999px; background: var(--ink); color: #ffffff; font-weight: 700; font-size: 15px;
}

/* city overlay animations */
@keyframes sweep { from { transform: rotate(-18deg); } to { transform: rotate(18deg); } }
@keyframes rise { 0% { transform: translate(0, 0) scale(.6); opacity: .85; } 100% { transform: translate(8px, -46px) scale(1.5); opacity: 0; } }
@keyframes wave { 0%, 100% { transform: scaleX(1) skewY(0deg); } 50% { transform: scaleX(.86) skewY(5deg); } }
@keyframes signal { to { stroke-dashoffset: -28; } }
@keyframes ripple { to { stroke-dashoffset: -48; } }
@keyframes drift { from { transform: translateX(-320px); } to { transform: translateX(1800px); } }
@keyframes spin { 0%, 100% { transform: scaleX(1); } 50% { transform: scaleX(-1); } }
@keyframes draw { 0% { stroke-dashoffset: 120; } 70%, 100% { stroke-dashoffset: 0; } }
@keyframes rot { to { transform: rotate(360deg); } }
@keyframes msg { 0% { opacity: 0; transform: translateY(6px); } 3%, 17% { opacity: 1; transform: translateY(0); } 20%, 100% { opacity: 0; transform: translateY(-6px); } }

.beam { transform-box: view-box; animation: sweep 5s ease-in-out infinite alternate; }
.steam, .smoke { transform-box: fill-box; transform-origin: center; animation: rise 2.6s ease-out infinite; }
.smoke { animation-duration: 3.4s; }
.flag { transform-box: view-box; animation: wave 1.8s ease-in-out infinite; }
.signal { animation: signal 1.4s linear infinite; }
.ripple { animation: ripple 5s linear infinite; }
.cloud { animation: drift 70s linear infinite; }
.radar { transform-box: fill-box; transform-origin: center; animation: spin 3s linear infinite; }
.chart { stroke-dasharray: 120; animation: draw 4s ease-out infinite; }
.msg { opacity: 0; animation: msg 15s ease-in-out infinite; }
.rotor { animation: rot .45s linear infinite; }

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

/* mobile bottom card (replaces the floating hover card on narrow screens) */
.mcard {
  display: none;
  position: absolute;
  z-index: 3;
  left: 12px; right: 12px; bottom: max(16px, env(safe-area-inset-bottom, 0px) + 10px);
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(27, 31, 42, .18);
  padding: 16px;
  box-sizing: border-box;
}
.mcard-close {
  position: absolute; top: 8px; right: 8px; width: 44px; height: 44px; border-radius: 50%; border: 0;
  background: transparent; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.mcard-nav { display: flex; gap: 8px; align-items: center; margin-top: 2px; }
.mcard-arrow {
  flex: none; width: 44px; height: 44px; border-radius: 50%; border: 0;
  background: #eceef3; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.panel-handle { display: none; }

@media (max-width: 720px) {
  .hero { left: 16px !important; right: 16px !important; width: auto !important; }
  .hero.dim { opacity: 0; }
  .panel { width: 100% !important; min-width: 0 !important; }
  .navlinks { display: none !important; }
  .bcard { display: none !important; }
  .panel-handle { display: block; width: 40px; height: 5px; border-radius: 3px; background: #d5d9e2; margin: 0 auto 14px; }
  .stage { touch-action: none; }
  .scene { min-height: 0; }
}
