:root {
  color-scheme: dark;
  --gold: #e7bd5f;
  --panel: rgba(4, 10, 18, 0.88);
  --border: rgba(255, 255, 255, 0.16);
  --mx: 0;
  --my: 0;
}

* { box-sizing: border-box; }

html,
body {
  margin: 0;
  width: 100%;
  min-height: 100%;
  background: #02060b;
}

body.world-home {
  min-height: 100svh;
  display: grid;
  place-items: center;
  overflow: hidden;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #02060b;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.world-backdrop {
  position: fixed;
  z-index: 0;
  inset: -48px;
  background: #02060b center / cover no-repeat;
  opacity: 0;
  filter: blur(30px) saturate(.9) brightness(.38);
  transform: scale(1.08);
  transition: opacity 420ms ease;
  pointer-events: none;
}

.world-home.is-ready .world-backdrop { opacity: .88; }

.world-stage {
  position: relative;
  z-index: 1;
  width: min(100vw, 150svh);
  aspect-ratio: 3 / 2;
  overflow: hidden;
  isolation: isolate;
  background: #030913;
  box-shadow: 0 0 90px rgba(0, 0, 0, 0.7);
}

.world-image,
.world-depth {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}

.world-image {
  z-index: 1;
  opacity: 0;
  transition: opacity 260ms ease;
}

.world-home.is-ready .world-image { opacity: 1; }

.world-depth {
  z-index: 2;
  opacity: 0;
  background: center / 100% 100% no-repeat;
  pointer-events: none;
  will-change: transform, opacity;
  transition: opacity 280ms ease, transform 110ms ease-out;
}

.depth-sky {
  clip-path: polygon(0 0, 100% 0, 100% 57%, 0 57%);
  transform: translate(calc(var(--mx) * -3px), calc(var(--my) * -2px)) scale(1.006);
}

.depth-mid {
  clip-path: polygon(0 28%, 100% 28%, 100% 82%, 0 82%);
  transform: translate(calc(var(--mx) * 1.5px), calc(var(--my) * 1px)) scale(1.004);
}

.depth-foreground {
  clip-path: polygon(0 77%, 100% 77%, 100% 100%, 0 100%);
  transform: translate(calc(var(--mx) * 4px), calc(var(--my) * 2.5px)) scale(1.008);
}

.world-home.live-world .world-depth { opacity: .22; }

.world-effects {
  position: absolute;
  z-index: 3;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 300ms ease;
}

.world-home.live-world .world-effects { opacity: 1; }

.world-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(8px);
  mix-blend-mode: screen;
  opacity: .46;
  animation: worldPulse 4.8s ease-in-out infinite alternate;
}

.glow-lion { left: 14%; top: 12%; width: 19%; height: 23%; background: radial-gradient(circle, rgba(255,185,95,.28), transparent 67%); }
.glow-sun { left: 47.5%; top: 31%; width: 10%; height: 13%; background: radial-gradient(circle, rgba(255,214,141,.34), transparent 69%); animation-delay: .9s; }
.glow-ai { right: 9%; top: 8%; width: 25%; height: 28%; background: radial-gradient(circle, rgba(66,174,255,.20), transparent 68%); animation-delay: 1.5s; }
.glow-city { left: 55%; top: 23%; width: 15%; height: 27%; background: radial-gradient(ellipse, rgba(73,178,255,.15), transparent 70%); animation-delay: .35s; }
.glow-drone { left: 23%; top: 31%; width: 9%; height: 10%; background: radial-gradient(circle, rgba(255,224,163,.15), transparent 66%); animation-delay: 2s; }

@keyframes worldPulse {
  from { transform: scale(.98); opacity: .30; }
  to { transform: scale(1.05); opacity: .56; }
}

.world-hotspot {
  position: absolute;
  z-index: 5;
  display: block;
  border: 0;
  margin: 0;
  padding: 0;
  background: transparent;
  color: transparent;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.world-hotspot:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-radius: 999px;
  background: rgba(231, 189, 95, 0.06);
}

.hs-logo { left: 5.4%; top: 1.1%; width: 6.2%; height: 7.4%; }
.hs-nav-1 { left: 34.5%; top: 2%; width: 4.4%; height: 5%; }
.hs-nav-2 { left: 40.4%; top: 2%; width: 4.4%; height: 5%; }
.hs-nav-3 { left: 46.2%; top: 2%; width: 4.4%; height: 5%; }
.hs-nav-4 { left: 52.0%; top: 2%; width: 4.4%; height: 5%; }
.hs-nav-5 { left: 57.8%; top: 2%; width: 4.4%; height: 5%; }
.hs-search { left: 73.1%; top: 1.5%; width: 4.0%; height: 6.2%; }
.hs-menu { left: 77.2%; top: 1.5%; width: 4.2%; height: 6.2%; }
.hs-luama { left: 83.2%; top: 1.4%; width: 10.4%; height: 6.2%; }

.hs-card-1 { left: 3.0%; top: 65.7%; width: 18.3%; height: 15.5%; }
.hs-card-2 { left: 21.8%; top: 65.7%; width: 18.2%; height: 15.5%; }
.hs-card-3 { left: 41.0%; top: 65.7%; width: 18.2%; height: 15.5%; }
.hs-card-4 { left: 60.1%; top: 65.7%; width: 18.2%; height: 15.5%; }
.hs-card-5 { left: 79.2%; top: 65.7%; width: 18.0%; height: 15.5%; }

.world-overlay {
  position: fixed;
  z-index: 30;
  inset: 0;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: max(72px, 9svh) 20px 20px;
  background: rgba(0, 5, 12, 0.56);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.world-overlay.is-open { display: flex; }

.world-dialog {
  width: min(680px, 94vw);
  max-height: 78svh;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 18px;
  color: #f4f6f8;
  background: var(--panel);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.48);
}

.world-dialog-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.world-dialog input {
  flex: 1;
  min-width: 0;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 14px;
  padding: 14px 16px;
  color: white;
  background: rgba(255,255,255,.07);
  font: inherit;
  outline: none;
}

.world-dialog input:focus { border-color: rgba(231,189,95,.65); }

.world-close {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 50%;
  color: white;
  background: rgba(255,255,255,.06);
  font-size: 26px;
  cursor: pointer;
}

.world-motion-toggle {
  display: grid;
  width: 100%;
  gap: 3px;
  margin-top: 12px;
  padding: 13px 15px;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 14px;
  color: #eef3f7;
  text-align: left;
  background: rgba(255,255,255,.035);
  cursor: pointer;
}

.world-motion-toggle span { font: 600 14px/1.2 inherit; }
.world-motion-toggle small { color: rgba(236,243,248,.58); }
.world-motion-toggle[aria-pressed="true"] { border-color: rgba(231,189,95,.38); background: rgba(231,189,95,.075); }

.world-links {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.world-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 15px;
  border: 1px solid transparent;
  border-radius: 14px;
  color: #eef3f7;
  text-decoration: none;
  background: rgba(255,255,255,.035);
}

.world-links a:hover,
.world-links a:focus-visible {
  border-color: rgba(231,189,95,.36);
  background: rgba(231,189,95,.075);
  outline: none;
}

.world-links small { color: rgba(236,243,248,.58); }

.world-load-failed {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: none;
  place-items: center;
  padding: 24px;
  text-align: center;
  color: rgba(255,255,255,.74);
  background: #040b14;
}

.world-home.has-error .world-load-failed { display: grid; }

@media (max-width: 760px) {
  body.world-home {
    display: block;
    min-height: 100svh;
    overflow-x: hidden;
    overflow-y: auto;
  }

  .world-stage {
    width: 100vw;
    min-width: 100vw;
    margin: 0;
  }

  .world-backdrop { position: absolute; min-height: 100svh; }
  .world-overlay { padding-top: max(28px, env(safe-area-inset-top)); }
  .world-dialog { max-height: 88svh; }
}

@media (prefers-reduced-motion: reduce) {
  .world-image,
  .world-depth,
  .world-effects,
  .world-backdrop { transition: none; animation: none; }
  .world-home.live-world .world-depth,
  .world-home.live-world .world-effects { opacity: 0; }
}
