/* ============================================
   KYRVO — Cosmic Observatory Design System
   ============================================ */

:root {
  --cosmic-black: #06111F;
  --ice-cyan: #7FF5F0;
  --bg-deep: #03060A;
  --text-primary: #E8F4F7;
  --accent: #57D8FF;
  --text-muted: rgba(232, 244, 247, 0.55);
  --border-subtle: rgba(127, 245, 240, 0.12);
  --glow-cyan: rgba(127, 245, 240, 0.25);
  --glow-accent: rgba(87, 216, 255, 0.35);

  --font-heading: 'Orbitron', 'Space Grotesk', sans-serif;
  --font-body: 'Inter', 'IBM Plex Sans', sans-serif;

  --dial-size: 56px;
  --section-padding: clamp(4rem, 10vh, 8rem) clamp(1.5rem, 5vw, 4rem);
  --transition-smooth: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 10000;
  padding: 0.75rem 1.25rem;
  background: var(--cosmic-black);
  color: var(--ice-cyan);
  border: 1px solid var(--ice-cyan);
  text-decoration: none;
  font-size: 0.875rem;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 1rem;
}

#starfield {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

main {
  position: relative;
  z-index: 1;
}

h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 500;
  letter-spacing: 0.08em;
  line-height: 1.2;
}

h2 {
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  color: var(--text-primary);
}

h3 {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--ice-cyan);
}

.section-header {
  text-align: center;
  margin-bottom: clamp(2rem, 5vh, 4rem);
  max-width: 640px;
  margin-inline: auto;
}

.section-tag {
  font-family: var(--font-heading);
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.section-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-top: 0.75rem;
}

.section {
  position: relative;
  padding: var(--section-padding);
  min-height: 100vh;
}

/* DIAL NAVIGATION */
.dial-nav {
  position: fixed;
  left: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 9000;
  width: var(--dial-size);
  height: var(--dial-size);
}

.dial-toggle {
  position: relative;
  width: var(--dial-size);
  height: var(--dial-size);
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
  z-index: 2;
}

.dial-ring {
  position: absolute;
  inset: 0;
  border: 1px solid var(--border-subtle);
  border-radius: 50%;
  background: rgba(6, 17, 31, 0.85);
  backdrop-filter: blur(8px);
  transition: border-color var(--transition-smooth), box-shadow var(--transition-smooth);
}

.dial-core {
  position: absolute;
  inset: 30%;
  border-radius: 50%;
  background: var(--cosmic-black);
  border: 1px solid var(--ice-cyan);
  opacity: 0.6;
  transition: opacity var(--transition-smooth);
}

.dial-indicator {
  position: absolute;
  top: 6px;
  left: 50%;
  width: 4px;
  height: 8px;
  margin-left: -2px;
  background: var(--ice-cyan);
  border-radius: 1px;
  transition: transform var(--transition-smooth);
}

.dial-toggle:hover .dial-ring,
.dial-toggle:focus-visible .dial-ring {
  border-color: var(--ice-cyan);
  box-shadow: 0 0 20px var(--glow-cyan);
}

.dial-toggle[aria-expanded="true"] .dial-indicator {
  transform: rotate(180deg);
}

.dial-toggle[aria-expanded="true"] .dial-core {
  opacity: 1;
}

.dial-menu {
  position: absolute;
  inset: -100px;
  list-style: none;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--transition-smooth);
}

.dial-menu:not([hidden]) {
  pointer-events: auto;
  opacity: 1;
}

.dial-menu a {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(var(--angle, 0deg)) translateY(calc(-1 * var(--radius, 90px))) rotate(calc(-1 * var(--angle, 0deg)));
  font-family: var(--font-heading);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  white-space: nowrap;
  padding: 0.35rem 0.5rem;
  transition: color 0.25s, text-shadow 0.25s;
}

.dial-menu a::before {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: 0.4rem;
  vertical-align: middle;
  opacity: 0.4;
  transition: opacity 0.25s, box-shadow 0.25s;
}

.dial-menu a:hover,
.dial-menu a:focus-visible {
  color: var(--ice-cyan);
  text-shadow: 0 0 12px var(--glow-cyan);
}

.dial-menu a:hover::before,
.dial-menu a:focus-visible::before {
  opacity: 1;
  box-shadow: 0 0 8px var(--accent);
}

/* SIGNAL DETECTOR */
.signal-detector {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 2rem;
  overflow: hidden;
}

.radar-container {
  position: relative;
  width: min(90vw, 560px);
  aspect-ratio: 1;
}

.radar-grid {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(6, 17, 31, 0.6) 0%, rgba(3, 6, 10, 0.9) 70%);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
}

.radar-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(127, 245, 240, 0.08);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.ring-1 { width: 25%; height: 25%; }
.ring-2 { width: 50%; height: 50%; }
.ring-3 { width: 75%; height: 75%; }
.ring-4 { width: 100%; height: 100%; border-color: rgba(127, 245, 240, 0.15); }

.radar-crosshair::before,
.radar-crosshair::after {
  content: '';
  position: absolute;
  background: rgba(127, 245, 240, 0.06);
}

.radar-crosshair::before {
  top: 50%;
  left: 5%;
  right: 5%;
  height: 1px;
  transform: translateY(-50%);
}

.radar-crosshair::after {
  left: 50%;
  top: 5%;
  bottom: 5%;
  width: 1px;
  transform: translateX(-50%);
}

.radar-sweep {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0deg, transparent 340deg, rgba(127, 245, 240, 0.03) 350deg, rgba(127, 245, 240, 0.15) 360deg);
  animation: radar-sweep 4s linear infinite;
}

@keyframes radar-sweep {
  to { transform: rotate(360deg); }
}

.signal-lock {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  z-index: 2;
  transition: filter 0.6s ease;
}

.signal-pulse {
  position: absolute;
  inset: -40px;
  border-radius: 50%;
  border: 1px solid var(--ice-cyan);
  opacity: 0;
  animation: signal-pulse 2.5s ease-out infinite;
}

@keyframes signal-pulse {
  0% { transform: scale(0.8); opacity: 0.6; }
  100% { transform: scale(1.8); opacity: 0; }
}

.kyrvo-logo {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: 700;
  letter-spacing: 0.35em;
  color: var(--ice-cyan);
  text-shadow: 0 0 30px var(--glow-cyan);
  margin-left: 0.35em;
}

.signal-status {
  font-family: var(--font-heading);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: var(--text-muted);
  margin-top: 0.75rem;
  transition: color 0.5s;
}

.signal-detector.locked .signal-status {
  color: var(--accent);
}

.signal-detector.locked .signal-lock {
  filter: drop-shadow(0 0 20px var(--glow-accent));
}

.radar-annotations {
  position: absolute;
  inset: -60px;
  pointer-events: none;
}

.annotation {
  position: absolute;
  font-family: var(--font-heading);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  color: rgba(127, 245, 240, 0.35);
  white-space: nowrap;
}

.ann-1 { top: 0; left: 50%; transform: translateX(-50%); }
.ann-2 { top: 15%; right: -10px; }
.ann-3 { top: 50%; right: -30px; transform: translateY(-50%); }
.ann-4 { bottom: 15%; right: 0; }
.ann-5 { bottom: 0; left: 50%; transform: translateX(-50%); }
.ann-6 { bottom: 15%; left: -10px; }
.ann-7 { top: 50%; left: -30px; transform: translateY(-50%); }
.ann-8 { top: 15%; left: 0; }

.radar-blips .blip {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 4px;
  height: 4px;
  background: var(--accent);
  border-radius: 50%;
  opacity: 0.5;
  animation: blip-fade 3s ease-in-out infinite;
}

@keyframes blip-fade {
  0%, 100% { opacity: 0.2; }
  50% { opacity: 0.8; box-shadow: 0 0 6px var(--accent); }
}

.scroll-hint {
  position: absolute;
  bottom: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  opacity: 0.7;
  animation: hint-bob 2s ease-in-out infinite;
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--ice-cyan), transparent);
}

@keyframes hint-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

.signal-detector.locked .scroll-hint {
  opacity: 0;
  transition: opacity 0.5s;
}

/* TRANSMISSION STREAM */
.transmission-stream {
  background: linear-gradient(180deg, transparent, rgba(6, 17, 31, 0.4) 20%, rgba(6, 17, 31, 0.4) 80%, transparent);
}

.transmission-field {
  position: relative;
  min-height: 70vh;
  max-width: 1200px;
  margin: 0 auto;
}

.fragment {
  position: absolute;
  padding: 0.75rem 1rem;
  background: rgba(6, 17, 31, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: 2px;
  cursor: default;
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
  max-width: 220px;
  outline: none;
}

.fragment-raw {
  font-family: monospace;
  font-size: 0.75rem;
  color: rgba(127, 245, 240, 0.4);
  letter-spacing: 0.05em;
  display: block;
  transition: opacity 0.3s;
}

.fragment-decoded {
  position: absolute;
  inset: 0;
  padding: 0.75rem 1rem;
  background: rgba(6, 17, 31, 0.95);
  border-radius: 2px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.fragment-label {
  font-family: var(--font-heading);
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  color: var(--accent);
  text-transform: uppercase;
}

.fragment-decoded p {
  font-size: 0.8rem;
  color: var(--text-primary);
  line-height: 1.45;
}

.fragment:hover,
.fragment:focus-visible,
.fragment.decoded {
  border-color: var(--ice-cyan);
  box-shadow: 0 0 20px var(--glow-cyan);
  transform: scale(1.02);
  z-index: 10;
}

.fragment:hover .fragment-raw,
.fragment:focus-visible .fragment-raw,
.fragment.decoded .fragment-raw {
  opacity: 0;
}

.fragment:hover .fragment-decoded,
.fragment:focus-visible .fragment-decoded,
.fragment.decoded .fragment-decoded {
  opacity: 1;
  pointer-events: auto;
}

/* CELESTIAL ARCHIVE */
.celestial-archive {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.archive-tower {
  position: relative;
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  padding-bottom: 4rem;
}

.tower-spine {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  transform: translateX(-50%);
  background: linear-gradient(to top, var(--ice-cyan), transparent 90%);
  opacity: 0.3;
}

.archive-floor {
  position: relative;
  width: min(90vw, 480px);
  padding: 1.5rem 2rem;
  margin: 1rem 0;
  background: rgba(6, 17, 31, 0.6);
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--ice-cyan);
  opacity: 0.4;
  transform: translateX(20px);
  transition: opacity 0.6s ease, transform 0.6s ease, border-color 0.3s;
}

.archive-floor.visible {
  opacity: 1;
  transform: translateX(0);
}

.archive-floor:hover {
  border-color: var(--ice-cyan);
  box-shadow: -4px 0 20px var(--glow-cyan);
}

.floor-number {
  font-family: var(--font-heading);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: var(--accent);
  display: block;
  margin-bottom: 0.5rem;
}

.archive-floor p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.floor-meta {
  display: block;
  margin-top: 0.75rem;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: rgba(127, 245, 240, 0.35);
}

.tower-apex {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
}

.tower-apex span {
  display: block;
  font-size: 1.5rem;
  color: var(--ice-cyan);
  opacity: 0.4;
  margin-bottom: 0.5rem;
}

/* ORBITAL SYSTEM */
.orbital-system {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

.orbit-stage {
  position: relative;
  width: min(90vw, 600px);
  aspect-ratio: 1;
}

.central-sphere {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80px;
  height: 80px;
  z-index: 1;
}

.sphere-core {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, var(--accent), var(--cosmic-black) 70%);
  border: 1px solid var(--ice-cyan);
}

.sphere-glow {
  position: absolute;
  inset: -20px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--glow-accent) 0%, transparent 70%);
  animation: sphere-breathe 4s ease-in-out infinite;
}

@keyframes sphere-breathe {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(1.1); }
}

.orbit {
  position: absolute;
  inset: 0;
  animation: orbit-spin var(--speed, 20s) linear infinite;
  animation-play-state: running;
}

.orbit-1 { --speed: 18s; }
.orbit-2 { --speed: 25s; inset: -30px; }
.orbit-3 { --speed: 32s; inset: -60px; }
.orbit-4 { --speed: 40s; inset: -90px; }
.orbit-5 { --speed: 50s; inset: -120px; }

.orbit:hover,
.orbit:focus-within {
  animation-play-state: paused;
  z-index: 5;
}

@keyframes orbit-spin {
  to { transform: rotate(360deg); }
}

.orbit-path {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px dashed rgba(127, 245, 240, 0.1);
}

.orbit-body {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  outline: none;
  animation: counter-spin var(--speed, 20s) linear infinite;
  animation-play-state: inherit;
}

@keyframes counter-spin {
  to { transform: translateX(-50%) rotate(-360deg); }
}

.orbit-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--ice-cyan);
  border: 2px solid var(--cosmic-black);
  box-shadow: 0 0 10px var(--glow-cyan);
  transition: transform 0.3s, box-shadow 0.3s;
}

.orbit:hover .orbit-dot,
.orbit:focus-within .orbit-dot {
  transform: scale(1.5);
  box-shadow: 0 0 20px var(--accent);
}

.orbit-info {
  position: absolute;
  top: 24px;
  width: 200px;
  padding: 1rem;
  background: rgba(6, 17, 31, 0.95);
  border: 1px solid var(--border-subtle);
  border-radius: 2px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.35s, transform 0.35s;
  text-align: center;
}

.orbit-info h3 {
  margin-bottom: 0.35rem;
  font-size: 0.85rem;
}

.orbit-info p {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.orbit:hover .orbit-info,
.orbit:focus-within .orbit-info {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* STAR CHAMBER */
.chamber-canvas {
  position: relative;
  width: min(95vw, 800px);
  height: 500px;
  margin: 0 auto;
  background: radial-gradient(ellipse at center, rgba(6, 17, 31, 0.5) 0%, transparent 70%);
  border: 1px solid var(--border-subtle);
}

.constellation-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.constellation-line {
  stroke: rgba(127, 245, 240, 0.08);
  stroke-width: 1;
  transition: stroke 0.4s;
}

.chamber-canvas.active .constellation-line {
  stroke: rgba(127, 245, 240, 0.35);
  stroke-width: 1.5;
}

.star-node {
  position: absolute;
  left: var(--sx);
  top: var(--sy);
  transform: translate(-50%, -50%);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  outline: none;
}

.star-glow {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--ice-cyan);
  box-shadow: 0 0 12px var(--glow-cyan);
  transition: transform 0.3s, box-shadow 0.3s;
}

.star-label {
  font-family: var(--font-heading);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  text-transform: uppercase;
  transition: color 0.3s;
  white-space: nowrap;
}

.star-node:hover .star-glow,
.star-node:focus-visible .star-glow {
  transform: scale(1.6);
  box-shadow: 0 0 24px var(--accent);
}

.star-node:hover .star-label,
.star-node:focus-visible .star-label {
  color: var(--ice-cyan);
}

/* COSMIC TIMELINE */
.cosmic-timeline {
  overflow: hidden;
  padding-bottom: 6rem;
}

.timeline-track {
  display: flex;
  gap: clamp(3rem, 8vw, 6rem);
  padding: 3rem clamp(2rem, 8vw, 6rem);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: var(--ice-cyan) var(--cosmic-black);
  position: relative;
  z-index: 1;
}

.timeline-planet {
  flex: 0 0 auto;
  scroll-snap-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  cursor: default;
  outline: none;
  transition: transform 0.4s;
}

.timeline-planet:hover,
.timeline-planet:focus-visible {
  transform: translateY(-8px);
}

.planet-sphere {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, var(--accent), var(--cosmic-black) 65%);
  border: 1px solid rgba(127, 245, 240, 0.3);
  box-shadow: 0 0 20px var(--glow-cyan);
  transition: box-shadow 0.4s;
}

.timeline-planet:nth-child(2) .planet-sphere { background: radial-gradient(circle at 30% 30%, #5a9eb8, var(--cosmic-black) 65%); }
.timeline-planet:nth-child(3) .planet-sphere { width: 72px; height: 72px; }
.timeline-planet:nth-child(4) .planet-sphere { background: radial-gradient(circle at 30% 30%, #7aa8c4, var(--cosmic-black) 65%); }
.timeline-planet:nth-child(5) .planet-sphere { width: 56px; height: 56px; }
.timeline-planet:nth-child(6) .planet-sphere { background: radial-gradient(circle at 30% 30%, var(--ice-cyan), var(--cosmic-black) 65%); width: 80px; height: 80px; }

.timeline-planet:hover .planet-sphere,
.timeline-planet:focus-visible .planet-sphere {
  box-shadow: 0 0 40px var(--glow-accent);
}

.planet-info {
  text-align: center;
  max-width: 200px;
  opacity: 0.7;
  transition: opacity 0.4s;
}

.timeline-planet:hover .planet-info,
.timeline-planet:focus-visible .planet-info {
  opacity: 1;
}

.planet-info time {
  font-family: var(--font-heading);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  color: var(--accent);
}

.planet-info h3 {
  margin: 0.35rem 0;
  font-size: 0.95rem;
}

.planet-info p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.planet-note {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  color: rgba(127, 245, 240, 0.4);
  font-style: italic;
}

.timeline-rail {
  position: absolute;
  bottom: 4rem;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-subtle) 10%, var(--border-subtle) 90%, transparent);
}

/* OBSERVATION DECK */
.deck-platform {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem;
  background: rgba(6, 17, 31, 0.5);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  overflow: hidden;
}

.deck-horizon {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(to bottom, rgba(87, 216, 255, 0.05), transparent);
  pointer-events: none;
}

.telescope-array {
  display: flex;
  justify-content: center;
  gap: clamp(1rem, 4vw, 2.5rem);
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.telescope-lens {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  outline: none;
}

.lens-ring {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid var(--border-subtle);
  background: radial-gradient(circle, rgba(6, 17, 31, 0.8) 40%, transparent 70%);
  transition: border-color 0.3s, box-shadow 0.3s;
}

.telescope-lens.active .lens-ring {
  border-color: var(--accent);
  box-shadow: 0 0 20px var(--glow-accent), inset 0 0 15px var(--glow-cyan);
}

.lens-label {
  font-family: var(--font-heading);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.telescope-lens.active .lens-label {
  color: var(--ice-cyan);
}

.lens-viewport {
  position: relative;
  min-height: 220px;
  padding: 1.5rem;
  border: 1px solid var(--border-subtle);
  background: rgba(3, 6, 10, 0.6);
}

.lens-content {
  display: none;
}

.lens-content.active {
  display: block;
  animation: lens-fade 0.5s ease;
}

@keyframes lens-fade {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.lens-content p {
  font-size: 0.9rem;
  color: var(--text-muted);
  max-width: 600px;
}

.spectral-chart {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 60px;
  margin-top: 1.25rem;
}

.spectral-chart span {
  flex: 1;
  height: var(--h);
  background: linear-gradient(to top, var(--accent), transparent);
  opacity: 0.6;
  border-radius: 1px 1px 0 0;
}

.deep-field {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 8px;
  align-items: center;
  height: 60px;
  margin-top: 1.25rem;
}

.deep-field span {
  width: 3px;
  height: 3px;
  background: var(--ice-cyan);
  border-radius: 50%;
  opacity: 0.4;
}

.deep-field span:nth-child(3n) { opacity: 0.8; width: 4px; height: 4px; }

.radio-wave svg {
  width: 100%;
  height: 60px;
  color: var(--accent);
  margin-top: 1.25rem;
}

.ir-gradient {
  height: 60px;
  margin-top: 1.25rem;
  background: linear-gradient(90deg, #1a0a2e, #4a1942, #7a2048, #c74b50, #e8846b);
  opacity: 0.5;
  border-radius: 2px;
}

.scan-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.4;
  animation: scan-sweep 3s ease-in-out infinite;
}

@keyframes scan-sweep {
  0% { top: 20%; opacity: 0; }
  10% { opacity: 0.4; }
  90% { opacity: 0.4; }
  100% { top: 80%; opacity: 0; }
}

/* DEEP SPACE WALL */
.deep-space-wall {
  background: rgba(6, 17, 31, 0.3);
}

.transmission-wall {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 800px;
  margin: 0 auto;
}

.transmission-entry {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 1.5rem;
  padding: 1.25rem;
  border: 1px solid var(--border-subtle);
  background: rgba(3, 6, 10, 0.5);
  transition: border-color 0.3s;
}

.transmission-entry:hover {
  border-color: rgba(127, 245, 240, 0.25);
}

.waveform {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 40px;
}

.waveform span {
  flex: 1;
  background: var(--accent);
  opacity: 0.4;
  border-radius: 1px;
  animation: wave-bar 1.2s ease-in-out infinite;
}

.waveform span:nth-child(1) { height: 30%; animation-delay: 0s; }
.waveform span:nth-child(2) { height: 60%; animation-delay: 0.1s; }
.waveform span:nth-child(3) { height: 45%; animation-delay: 0.2s; }
.waveform span:nth-child(4) { height: 80%; animation-delay: 0.3s; }
.waveform span:nth-child(5) { height: 55%; animation-delay: 0.4s; }
.waveform span:nth-child(6) { height: 70%; animation-delay: 0.5s; }
.waveform span:nth-child(7) { height: 40%; animation-delay: 0.6s; }
.waveform span:nth-child(8) { height: 90%; animation-delay: 0.7s; }
.waveform span:nth-child(9) { height: 50%; animation-delay: 0.8s; }
.waveform span:nth-child(10) { height: 35%; animation-delay: 0.9s; }

@keyframes wave-bar {
  0%, 100% { transform: scaleY(1); opacity: 0.4; }
  50% { transform: scaleY(1.3); opacity: 0.7; }
}

.freq-chart {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 40px;
}

.freq-chart span {
  flex: 1;
  height: var(--f);
  background: linear-gradient(to top, var(--ice-cyan), transparent);
  opacity: 0.5;
  border-radius: 1px 1px 0 0;
}

.transmission-entry blockquote p {
  font-size: 0.95rem;
  font-style: italic;
  color: var(--text-primary);
  line-height: 1.55;
}

.transmission-entry footer {
  margin-top: 0.75rem;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

/* UNKNOWN REGION */
.exploration-field {
  position: relative;
  width: min(95vw, 900px);
  height: min(70vh, 560px);
  margin: 0 auto;
  background: #010204;
  border: 1px solid rgba(127, 245, 240, 0.06);
  overflow: hidden;
  cursor: crosshair;
  touch-action: none;
}

.dark-zone {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(6, 17, 31, 0.3) 0%, #010204 60%);
}

.reveal-spotlight {
  position: absolute;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(127, 245, 240, 0.08) 0%, transparent 70%);
  transform: translate(-50%, -50%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
}

.exploration-field.active .reveal-spotlight {
  opacity: 1;
}

.hidden-discovery {
  position: absolute;
  left: var(--hx);
  top: var(--hy);
  transform: translate(-50%, -50%);
  max-width: 220px;
  padding: 1rem;
  background: rgba(6, 17, 31, 0.9);
  border: 1px solid var(--border-subtle);
  opacity: 0;
  transition: opacity 0.5s, border-color 0.3s;
  pointer-events: none;
  z-index: 2;
}

.hidden-discovery.revealed {
  opacity: 1;
  pointer-events: auto;
  border-color: var(--ice-cyan);
  box-shadow: 0 0 24px var(--glow-cyan);
}

.hidden-discovery p {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.exploration-hint {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  color: rgba(127, 245, 240, 0.25);
  pointer-events: none;
}

/* FINAL OBSERVATORY */
.final-observatory {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.observatory-window {
  position: relative;
  width: min(92vw, 640px);
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.window-frame {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

.window-ring {
  position: absolute;
  border-radius: 50%;
  border: 2px solid rgba(127, 245, 240, 0.2);
}

.ring-outer { inset: 0; }
.ring-inner { inset: 12px; border-width: 1px; border-color: rgba(127, 245, 240, 0.1); }

.window-crosshair::before,
.window-crosshair::after {
  content: '';
  position: absolute;
  background: rgba(127, 245, 240, 0.06);
}

.window-crosshair::before {
  top: 50%;
  left: 8%;
  right: 8%;
  height: 1px;
}

.window-crosshair::after {
  left: 50%;
  top: 8%;
  bottom: 8%;
  width: 1px;
}

.cosmic-panorama {
  position: absolute;
  inset: 24px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--cosmic-black);
}

.panorama-layer {
  position: absolute;
  inset: 0;
  border-radius: 50%;
}

.layer-1 {
  background: radial-gradient(ellipse at 30% 40%, rgba(87, 216, 255, 0.15) 0%, transparent 50%);
  animation: panorama-drift 20s ease-in-out infinite;
}

.layer-2 {
  background: radial-gradient(ellipse at 70% 60%, rgba(127, 245, 240, 0.08) 0%, transparent 45%);
  animation: panorama-drift 25s ease-in-out infinite reverse;
}

.layer-3 {
  background: radial-gradient(circle at 50% 80%, rgba(6, 17, 31, 0.8) 0%, transparent 60%);
}

.panorama-nebula {
  position: absolute;
  inset: 10%;
  border-radius: 50%;
  background:
    radial-gradient(circle at 40% 35%, rgba(87, 216, 255, 0.12) 0%, transparent 30%),
    radial-gradient(circle at 65% 55%, rgba(127, 245, 240, 0.08) 0%, transparent 25%);
  animation: nebula-shift 30s linear infinite;
}

@keyframes panorama-drift {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(3%, -2%); }
}

@keyframes nebula-shift {
  to { transform: rotate(360deg); }
}

.window-content {
  position: relative;
  z-index: 4;
  text-align: center;
  padding: 2rem;
}

.window-content h2 {
  font-size: clamp(1.25rem, 3.5vw, 1.75rem);
  letter-spacing: 0.12em;
  margin-bottom: 0.75rem;
  text-shadow: 0 0 30px rgba(0, 0, 0, 0.8);
}

.final-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.explore-control {
  position: relative;
  width: 140px;
  height: 140px;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  outline: none;
}

.control-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--ice-cyan);
  opacity: 0.6;
  animation: control-pulse 3s ease-in-out infinite;
}

.control-core {
  position: absolute;
  inset: 20%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(127, 245, 240, 0.2) 0%, rgba(6, 17, 31, 0.9) 70%);
  border: 1px solid var(--accent);
  transition: box-shadow 0.3s;
}

.control-label {
  position: relative;
  z-index: 1;
  font-family: var(--font-heading);
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  color: var(--ice-cyan);
  text-transform: uppercase;
  max-width: 80px;
  line-height: 1.4;
}

.explore-control:hover .control-core,
.explore-control:focus-visible .control-core {
  box-shadow: 0 0 30px var(--glow-accent);
}

@keyframes control-pulse {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50% { transform: scale(1.05); opacity: 0.9; }
}

.site-footer {
  margin-top: 3rem;
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
}

.site-footer a {
  color: var(--accent);
  text-decoration: none;
}

@media (max-width: 768px) {
  .dial-nav { left: 0.75rem; --dial-size: 48px; }
  .dial-menu a { font-size: 0.55rem; --radius: 75px; }
  .ann-2, .ann-4, .ann-6, .ann-8 { display: none; }
  .fragment { max-width: 180px; }
  .orbit-stage { width: min(95vw, 400px); }
  .orbit-4, .orbit-5 { display: none; }
  .chamber-canvas { height: 400px; }
  .transmission-entry { grid-template-columns: 1fr; }
  .exploration-field { height: 60vh; }
  .reveal-spotlight { width: 150px; height: 150px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  .orbit, .orbit .orbit-body { animation: none; }
}
