@import url("https://fonts.googleapis.com/css2?family=Chakra+Petch:wght@300;400;500;600;700&display=swap");

:root {
  --bg: #008000;
  --globe: #ffd500;
  --dot: #ffffff;
  --size: min(68vmin, 620px);
  --font-main: "Chakra Petch", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  font-family: var(--font-main);
  perspective: 900px;
}

.globe-close {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.globe-close img {
  display: block;
  width: 42px;
  height: 42px;
}

.stage {
  width: min(92vw, 980px);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(22px, 3.8vmin, 44px);
}

.scene {
  position: relative;
  width: var(--size);
  height: var(--size);
  flex: 0 0 auto;
  transform-style: preserve-3d;
  transform: scale(var(--zoom, 1));
  transition: transform 160ms ease-out;
}

.headline {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(30px, 3.1vw, 44px);
  font-weight: 600;
  line-height: 1.1;
  text-align: center;
}

.core {
  position: absolute;
  inset: 6%;
  border-radius: 50%;
  pointer-events: none;
  background:
    radial-gradient(circle at 34% 27%, rgba(255, 255, 255, 0.5), transparent 24%),
    radial-gradient(circle at 68% 76%, rgba(126, 95, 0, 0.34), transparent 55%),
    rgba(255, 213, 0, 0.68);
  box-shadow:
    inset -34px -42px 76px rgba(86, 65, 0, 0.24),
    inset 18px 20px 48px rgba(255, 255, 255, 0.2),
    0 30px 70px rgba(0, 0, 0, 0.24);
  z-index: 2;
}

.globe {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  transform-style: preserve-3d;
  transform: rotateX(var(--rx, -12deg)) rotateY(var(--ry, 20deg));
  transition: transform 180ms ease-out;
  animation: drift 18s linear infinite;
}

.dot {
  position: absolute;
  top: 50%;
  left: 50%;
  width: clamp(4px, 1.1vmin, 8px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--dot);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.7);
  opacity: 0.92;
  transform:
    translate3d(-50%, -50%, 0)
    rotateY(var(--lon))
    rotateX(var(--lat))
    translateZ(calc(var(--size) * 0.46));
}

.halo {
  position: absolute;
  inset: -12%;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.28);
  transform: rotateX(72deg);
  pointer-events: none;
}

.halo:nth-child(2) {
  transform: rotateY(66deg);
}

.halo:nth-child(3) {
  transform: rotateX(24deg) rotateY(-30deg);
}

.type-line {
  width: min(86vw, 920px);
  min-height: 3.6em;
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: clamp(15px, 1.55vw, 22px);
  font-weight: 400;
  line-height: 1.45;
  text-align: center;
}

.type-line::after {
  content: "";
  display: inline-block;
  width: 0.08em;
  height: 1em;
  margin-left: 0.22em;
  transform: translateY(0.16em);
  background: rgba(255, 255, 255, 0.58);
  animation: cursor 800ms steps(2, end) infinite;
}

@keyframes drift {
  from {
    rotate: 0 1 0 0deg;
  }

  to {
    rotate: 0 1 0 360deg;
  }
}

@keyframes cursor {
  50% {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .globe,
  .scene {
    transition: none;
  }

  .globe {
    animation: none;
  }
}
