* {
  box-sizing: border-box;
}

:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-soft: #fafafa;
  --text: #111111;
  --muted: #5f6368;
  --line: #e9e9e9;
  --shadow: 0 24px 60px rgba(17, 17, 17, 0.06);
  --radius: 24px;
  --radius-sm: 18px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

.container {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.demo-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(233, 233, 233, 0.9);
}

.nav {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand img {
  height: 73px;
  width: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
}

.nav-links a,
.footer-links a {
  color: var(--muted);
  font-weight: 600;
  transition: color 0.25s ease;
}

.nav-links a:hover,
.footer-links a:hover {
  color: var(--text);
}

.planet-hero {
  padding: 92px 0 70px;
  background:
    radial-gradient(circle at top left, rgba(0, 0, 0, 0.045), transparent 34%),
    linear-gradient(180deg, #ffffff 0%, #fcfcfc 100%);
}

.planet-layout {
  display: grid;
  grid-template-columns: 0.96fr 1.04fr;
  gap: 40px;
  align-items: start;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  margin: 0 0 14px;
  color: #6b6b6b;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 14px;
  font-size: clamp(2.7rem, 6vw, 5rem);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

h2 {
  margin-bottom: 12px;
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1.06;
  letter-spacing: -0.05em;
}

.hero-text,
.sources p,
.footer-text,
.data-list p,
.body-card p {
  color: var(--muted);
}

.hero-text {
  max-width: 640px;
  font-size: clamp(1.05rem, 2vw, 1.22rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  color: #ffffff;
  background: #111111;
  box-shadow: var(--shadow);
}

.btn-secondary {
  color: #111111;
  background: #ffffff;
  border: 1px solid var(--line);
}

.object-panel,
.scene-shell,
.body-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.object-panel {
  padding: 28px;
}

.panel-label,
.quick-stats span,
.data-list span {
  display: block;
  margin-bottom: 8px;
  color: #777777;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.object-panel h2 {
  margin-bottom: 8px;
}

.quick-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 24px 0;
}

.quick-stats article {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #ffffff;
}

.quick-stats strong {
  display: block;
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.2;
}

.data-list {
  display: grid;
  gap: 16px;
}

.data-list div {
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.data-list p {
  margin-bottom: 0;
}

.scene-shell {
  margin-top: 44px;
  overflow: hidden;
}

.scene-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 24px;
  border-bottom: 1px solid var(--line);
}

.scene-toolbar strong {
  display: block;
  font-size: 1rem;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.legend-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}

.legend-dot.earth {
  background: #2e6fba;
}

.legend-dot.venus {
  background: #d8c08a;
}

.legend-dot.mars {
  background: #b85a3a;
}

.legend-dot.moon {
  background: #c8c8c8;
}

.legend-dot.marker {
  background: #ffffff;
  border: 2px solid #111111;
}

.canvas-wrap {
  position: relative;
  height: min(68vh, 680px);
  min-height: 500px;
  background: #050505;
}

#planetCanvas {
  width: 100%;
  height: 100%;
  display: block;
}

.loader {
  position: absolute;
  inset: auto 24px 24px auto;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  color: #ffffff;
  background: rgba(17, 17, 17, 0.74);
  font-size: 0.88rem;
  font-weight: 700;
}

.loader.is-hidden {
  display: none;
}

.section {
  padding: 88px 0;
}

.alt-section {
  background: var(--surface-soft);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-heading {
  margin-bottom: 28px;
}

.centered {
  max-width: 820px;
  margin-inline: auto;
  text-align: center;
}

.body-grid {
  display: grid;
  gap: 16px;
}

.body-group {
  display: grid;
  gap: 14px;
}

.body-group h3 {
  margin: 18px 0 0;
  color: #6b6b6b;
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.body-card-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.body-card {
  padding: 22px;
  cursor: pointer;
  text-align: left;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.body-card:hover,
.body-card.is-selected {
  border-color: #111111;
  transform: translateY(-2px);
}

.body-card span {
  color: #777777;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.body-card h3 {
  margin: 8px 0;
  font-size: 1.12rem;
}

.body-card p {
  margin-bottom: 0;
  font-size: 0.95rem;
}

.sources {
  max-width: 900px;
}

.source-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.source-links a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #111111;
  background: #ffffff;
  font-weight: 700;
}

.source-notes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 26px;
}

.source-notes article {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #ffffff;
}

.source-notes h3 {
  margin-bottom: 8px;
  font-size: 1rem;
}

.source-notes p {
  margin-bottom: 0;
  font-size: 0.94rem;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 34px 0 24px;
}

.footer-wrap {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  align-items: flex-start;
}

.footer-logo-img {
  height: 73px;
  width: auto;
  margin-bottom: 12px;
}

.footer-text {
  max-width: 420px;
}

.footer-text a {
  color: inherit;
}

.footer-links {
  display: grid;
  gap: 12px;
  text-align: right;
}

.footer-bottom {
  margin-top: 24px;
  color: var(--muted);
  font-size: 0.9rem;
}

@media (max-width: 980px) {

  .planet-layout,
  .source-notes,
  .body-card-list {
    grid-template-columns: 1fr;
  }

  .scene-toolbar,
  .footer-wrap {
    align-items: flex-start;
    flex-direction: column;
  }

  .legend {
    justify-content: flex-start;
  }

  .footer-links {
    text-align: left;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(1120px, calc(100% - 28px));
  }

  .nav {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 0;
  }

  .nav-links {
    flex-wrap: wrap;
    gap: 14px;
  }

  .planet-hero,
  .section {
    padding: 66px 0;
  }

  .object-panel,
  .scene-toolbar,
  .body-card {
    padding: 20px;
  }

  .quick-stats {
    grid-template-columns: 1fr;
  }

  .canvas-wrap {
    height: 62vh;
    min-height: 420px;
  }
}
