/* Neko-globe visual rules, carried over from the handoff app/globals.css
   (tailwind import, global reset, html/body rules dropped — the site owns
   those). The globe canvas is transparent; .globe-page provides the dark
   stage the flares read against. */
.globe-page {
  --paper: #ffffff;
  --void: #050505;
  --dim: rgba(255, 255, 255, 0.48);
  --line: rgba(255, 255, 255, 0.24);
  --control-bg: rgba(5, 5, 5, 0.48);
  --stage-fill: radial-gradient(
    circle at 50% 47%,
    #121212 0,
    #050505 56%,
    #000000 100%
  );
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  background:
    linear-gradient(var(--line), var(--line)) 50% 0 / 1px 100% no-repeat,
    linear-gradient(90deg, var(--line), var(--line)) 0 50% / 100% 1px no-repeat,
    var(--stage-fill);
  color: var(--paper);
  isolation: isolate;
}

.globe-page[data-background-mode="light"],
[data-background-mode="light"] .globe-page {
  --paper: #111111;
  --void: #ffffff;
  --dim: rgba(17, 17, 17, 0.52);
  --line: rgba(17, 17, 17, 0.2);
  --control-bg: rgba(236, 236, 232, 0.68);
  --stage-fill: radial-gradient(
    circle at 50% 47%,
    #ffffff 0,
    #e7e7e3 62%,
    #d8d8d3 100%
  );
}

.globe-page[data-background-mode="dual"],
[data-background-mode="dual"] .globe-page {
  --paper: #ffffff;
  --void: #050505;
  --dim: rgba(255, 255, 255, 0.54);
  --line: rgba(255, 255, 255, 0.22);
  --control-bg: rgba(5, 5, 5, 0.62);
  --stage-fill: linear-gradient(
    90deg,
    #050505 0,
    #050505 49.9%,
    #ffffff 50.1%,
    #ffffff 100%
  );
}

.globe-page::before,
.globe-page::after {
  position: absolute;
  z-index: 2;
  width: 11px;
  height: 11px;
  content: "";
  pointer-events: none;
  border-color: var(--paper);
  opacity: 0.75;
}

.globe-page::before {
  top: 24px;
  right: 24px;
  border-top: 1px solid;
  border-right: 1px solid;
}

.globe-page::after {
  bottom: 24px;
  left: 24px;
  border-bottom: 1px solid;
  border-left: 1px solid;
}

.site-label {
  position: absolute;
  z-index: 3;
  top: clamp(22px, 4vw, 48px);
  left: clamp(22px, 4vw, 52px);
  user-select: none;
}

.site-label p {
  margin: 0 0 7px;
  color: var(--dim);
  font-size: 10px;
  line-height: 1;
  letter-spacing: 0.18em;
}

.site-label h1 {
  margin: 0;
  font-size: clamp(25px, 3vw, 42px);
  font-weight: 400;
  letter-spacing: -0.06em;
}

.site-label h1 span {
  color: var(--dim);
  font-size: 0.35em;
  letter-spacing: 0.11em;
  vertical-align: middle;
}

.globe-stage,
.globe-canvas {
  position: absolute;
  inset: 0;
}

.globe-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  color: var(--dim);
  font-size: 9px;
  letter-spacing: 0.16em;
  white-space: nowrap;
  transform: translate(-50%, -50%);
}

.globe-canvas canvas {
  position: absolute;
  z-index: 0;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
  touch-action: none;
}

.globe-canvas canvas:active {
  cursor: grabbing;
}

.globe-canvas canvas[data-aircraft-hover="true"] {
  cursor: crosshair;
}

.light-leak,
.sun-effects {
  position: absolute;
  z-index: 2;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.light-leak {
  z-index: 1;
  background:
    radial-gradient(
      ellipse 45% 11% at var(--sun-x, 75%) var(--sun-y, 25%),
      rgba(255, 255, 255, 0.2) 0,
      rgba(255, 255, 255, 0.055) 26%,
      transparent 72%
    ),
    linear-gradient(
      90deg,
      transparent 12%,
      rgba(255, 255, 255, 0.025) 50%,
      transparent 88%
    );
  mix-blend-mode: screen;
  filter: blur(7px);
  opacity: var(--leak-opacity, 0);
  transition: opacity 100ms linear;
}

.sun-effects {
  mix-blend-mode: screen;
  opacity: var(--flare-opacity, 0);
  transition: opacity 80ms linear;
}

.sun-effects::before,
.sun-effects::after {
  position: absolute;
  top: var(--sun-y, 25%);
  left: var(--sun-x, 75%);
  content: "";
  pointer-events: none;
  transform: translate(-50%, -50%);
}

.sun-effects::before {
  width: clamp(20px, 3vw, 44px);
  aspect-ratio: 1;
  background: radial-gradient(
    circle,
    #fff 0 3%,
    rgba(255, 255, 255, 0.7) 7%,
    rgba(255, 255, 255, 0.11) 31%,
    transparent 68%
  );
  border-radius: 50%;
  filter: blur(1.8px);
}

.sun-effects::after {
  width: clamp(380px, 72vw, 1120px);
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.05) 29%,
    rgba(255, 255, 255, 0.52) 49.5%,
    #fff 50%,
    rgba(255, 255, 255, 0.52) 50.5%,
    rgba(255, 255, 255, 0.05) 71%,
    transparent
  );
  box-shadow: 0 0 20px 2px rgba(120, 170, 255, 0.055);
  filter: blur(1.3px);
}

.flare-texture {
  position: absolute;
  top: var(--sun-y, 25%);
  left: var(--sun-x, 75%);
  display: block;
  aspect-ratio: 1;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  filter: grayscale(1) brightness(1.28) contrast(1.04);
}

.flare-source {
  width: clamp(170px, 29vw, 470px);
  opacity: 0.17;
  filter: grayscale(1) brightness(1.25) blur(3.2px);
  transform: translate(-50%, -50%) scaleX(2.35) scaleY(0.13);
}

.flare-iris {
  top: var(--ghost-two-y, 62%);
  left: var(--ghost-two-x, 28%);
  width: clamp(54px, 7vw, 108px);
  opacity: 0.075;
  filter: grayscale(0.4) sepia(0.18) hue-rotate(165deg) saturate(1.5)
    blur(4.5px);
  transform: translate(-50%, -50%) scaleX(1.55) scaleY(0.7);
}

.flare-ghost-chain,
.flare-aperture,
.flare-diffraction {
  position: absolute;
  display: block;
  pointer-events: none;
  mix-blend-mode: screen;
}

.flare-ghost-chain {
  top: var(--ghost-one-y, 56%);
  left: var(--ghost-one-x, 38%);
  width: clamp(170px, 24vw, 380px);
  height: clamp(28px, 4vw, 60px);
  background:
    radial-gradient(
      circle at 12% 50%,
      rgba(115, 175, 255, 0.16),
      transparent 7%
    ),
    radial-gradient(
      circle at 34% 50%,
      rgba(232, 189, 255, 0.1),
      transparent 10%
    ),
    radial-gradient(
      ellipse at 62% 50%,
      rgba(255, 211, 145, 0.075),
      transparent 13%
    ),
    radial-gradient(
      ellipse at 87% 50%,
      rgba(95, 184, 255, 0.09),
      transparent 8%
    );
  filter: blur(5.5px);
  opacity: 0.45;
  transform: translate(-50%, -50%) rotate(var(--flare-angle, 0deg));
}

.flare-aperture {
  top: var(--ghost-two-y, 62%);
  left: var(--ghost-two-x, 28%);
  width: clamp(72px, 9vw, 138px);
  aspect-ratio: 1;
  background: radial-gradient(
    circle,
    transparent 0 43%,
    rgba(255, 205, 126, 0.09) 46%,
    rgba(125, 177, 255, 0.1) 49%,
    transparent 54%
  );
  border-radius: 50%;
  filter: blur(3.5px);
  opacity: 0.52;
  transform: translate(-50%, -50%) scaleX(1.18);
}

.flare-diffraction {
  top: var(--ghost-one-y, 56%);
  left: var(--ghost-one-x, 38%);
  width: clamp(220px, 35vw, 560px);
  height: clamp(44px, 7vw, 100px);
  background:
    radial-gradient(
      circle,
      rgba(120, 185, 255, 0.2) 0 0.6px,
      transparent 1.6px
    )
      0 0 / 11px 8px,
    radial-gradient(
      circle,
      rgba(255, 156, 190, 0.14) 0 0.5px,
      transparent 1.5px
    )
      4px 3px / 17px 13px;
  filter: blur(1.7px);
  -webkit-mask-image: linear-gradient(
    90deg,
    transparent,
    #000 24%,
    #000 68%,
    transparent
  );
  mask-image: linear-gradient(
    90deg,
    transparent,
    #000 24%,
    #000 68%,
    transparent
  );
  opacity: 0.2;
  transform: translate(-50%, -50%) rotate(var(--flare-angle, 0deg))
    skewX(-18deg);
}

.aircraft-datapoint {
  --paper: #ffffff;
  --dim: rgba(255, 255, 255, 0.48);
  --data-x: 50%;
  --data-y: 50%;
  position: absolute;
  z-index: 5;
  top: var(--data-y);
  left: var(--data-x);
  width: clamp(248px, 27vw, 360px);
  padding: 11px;
  color: var(--paper);
  background: rgba(3, 3, 3, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.34);
  box-shadow: 0 13px 42px rgba(0, 0, 0, 0.38);
  opacity: 0;
  pointer-events: none;
  transform: translate(24px, calc(-50% - 3px)) scale(0.985);
  transform-origin: left center;
  transition:
    opacity 360ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 520ms cubic-bezier(0.16, 1, 0.3, 1);
}

.aircraft-datapoint::before,
.aircraft-datapoint::after {
  position: absolute;
  top: 50%;
  content: "";
}

.aircraft-datapoint::before {
  right: 100%;
  width: 24px;
  height: 1px;
  background: rgba(255, 255, 255, 0.68);
}

.aircraft-datapoint::after {
  right: calc(100% + 23px);
  width: 5px;
  height: 5px;
  border: 1px solid #fff;
  border-radius: 50%;
  transform: translate(50%, -50%);
}

.aircraft-datapoint[data-visible="true"] {
  opacity: 1;
  transform: translate(24px, -50%) scale(1);
}

.aircraft-datapoint[data-side="left"] {
  transform: translate(calc(-100% - 24px), calc(-50% - 3px)) scale(0.985);
  transform-origin: right center;
}

.aircraft-datapoint[data-side="left"][data-visible="true"] {
  transform: translate(calc(-100% - 24px), -50%) scale(1);
}

.aircraft-datapoint[data-side="left"]::before {
  right: auto;
  left: 100%;
}

.aircraft-datapoint[data-side="left"]::after {
  right: auto;
  left: calc(100% + 23px);
  transform: translate(-50%, -50%);
}

.aircraft-datapoint header {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.22);
}

.aircraft-datapoint header span {
  color: var(--dim);
  font-size: 8px;
  line-height: 1;
  letter-spacing: 0.12em;
}

.aircraft-datapoint header strong {
  font-size: 11px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.aircraft-image-slots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  margin: 8px 0;
}

.aircraft-image-slots span {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-width: 0;
  aspect-ratio: 4 / 3;
  padding: 5px;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.58);
  background:
    linear-gradient(
      135deg,
      transparent calc(50% - 0.5px),
      rgba(255, 255, 255, 0.12) 50%,
      transparent calc(50% + 0.5px)
    ),
    linear-gradient(
      45deg,
      transparent calc(50% - 0.5px),
      rgba(255, 255, 255, 0.12) 50%,
      transparent calc(50% + 0.5px)
    ),
    #0a0a0a;
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 7px;
  line-height: 1.15;
  letter-spacing: 0.08em;
}

.aircraft-image-slots span::before {
  position: absolute;
  top: 5px;
  left: 5px;
  width: 3px;
  height: 3px;
  content: "";
  background: #fff;
  opacity: 0.52;
}

.aircraft-datapoint p {
  margin: 0;
  color: rgba(255, 255, 255, 0.58);
  font-size: 8px;
  line-height: 1.45;
  letter-spacing: 0.06em;
}

.camera-controls,

.camera-controls {
  right: clamp(22px, 4vw, 52px);
  bottom: clamp(55px, 7vw, 78px);
}


.camera-controls button {
  width: 32px;
  height: 32px;
  padding: 0;
  color: var(--paper);
  background: var(--control-bg);
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  cursor: pointer;
}

.camera-controls button:last-child {
  border-right: 0;
  font-size: 10px;
}

.camera-controls button:hover,
.camera-controls button:focus-visible {
  color: var(--void);
  background: var(--paper);
  outline: 0;
}

.light-readout {
  position: absolute;
  z-index: 3;
  top: clamp(26px, 4vw, 50px);
  right: clamp(22px, 4vw, 52px);
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: var(--dim);
  font-size: 9px;
  line-height: 1.45;
  letter-spacing: 0.12em;
  text-align: right;
  user-select: none;
}

.light-readout div {
  display: flex;
  flex-direction: column;
}

.light-readout strong {
  color: var(--paper);
  font-size: inherit;
  font-weight: 400;
}

.instructions {
  position: absolute;
  z-index: 3;
  bottom: clamp(22px, 4vw, 44px);
  left: 50%;
  display: flex;
  gap: 22px;
  color: var(--dim);
  font-size: 9px;
  letter-spacing: 0.14em;
  white-space: nowrap;
  transform: translateX(-50%);
  user-select: none;
}

@media (max-width: 620px) {
  .site-label h1 {
    font-size: 28px;
  }

  .site-label h1 span,
  .light-readout span {
    display: none;
  }

  .camera-controls {
    right: 20px;
    bottom: 58px;
  }

  .aircraft-datapoint {
    width: min(248px, calc(100vw - 44px));
  }

  .instructions {
    left: 22px;
    flex-direction: column;
    gap: 3px;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
  }

  .light-leak,
  .sun-effects,
  .aircraft-datapoint {
    transition: none;
  }
}


/* Site chrome layered above the transparent WebGL canvas. */
.orb-head { position: relative; z-index: 6; display: flex; justify-content: space-between; gap: 18px; margin: clamp(72px, 9vh, 104px) clamp(24px, 5vw, 70px) 0; padding-bottom: 5px; border-bottom: 1px dotted currentColor; font-size: 11px; }
.orb-head nav { display: flex; gap: 14px; }
.orb-head a, .orb-head button { padding: 0; color: inherit; background: transparent; border: 0; font: inherit; cursor: pointer; }
.orb-head a:hover, .orb-head button:hover { text-decoration: underline; }
.globe-page > .copyright { position: fixed; z-index: 6; }


/* Aircraft panel = a set/mix card: cover art, and the whole panel is a link. */
.orb-cover { display:block; width:100%; max-height:190px; object-fit:cover; margin-bottom:6px; }
.aircraft-datapoint.is-linked { cursor:pointer; }
.aircraft-datapoint.is-linked:hover { outline:1px solid currentColor; outline-offset:2px; }
