:root {
  --bg: #081019;
  --bg-soft: #0e1724;
  --panel: rgba(255, 255, 255, 0.08);
  --panel-strong: rgba(14, 23, 36, 0.92);
  --border: rgba(160, 195, 255, 0.16);
  --text: #edf4ff;
  --muted: rgba(237, 244, 255, 0.68);
  --accent: #36c7ff;
  --accent-2: #4f79ff;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", system-ui, sans-serif;
  color: var(--text);
  overflow-x: hidden;
  background:
    radial-gradient(circle at top, rgba(54, 199, 255, 0.16), transparent 28%),
    radial-gradient(circle at 85% 10%, rgba(79, 121, 255, 0.18), transparent 30%),
    linear-gradient(180deg, #050b12 0%, #09121d 40%, #0b1018 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.38), transparent 90%);
}

.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 20px auto;
  padding: 26px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(8, 16, 25, 0.96), rgba(8, 16, 25, 0.88));
  box-shadow: var(--shadow);
}

.topbar,
.hero,
.section-head,
.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background:
    radial-gradient(circle at 28% 34%, #dff7ff 0 10%, transparent 11%),
    radial-gradient(circle at 72% 72%, #7de4ff 0 12%, transparent 13%),
    linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 24px rgba(54, 199, 255, 0.45);
}

.nav-links {
  display: flex;
  gap: 26px;
  flex-wrap: wrap;
}

.nav-links a,
.footer-link {
  color: var(--muted);
  text-decoration: none;
  transition: color 180ms ease, transform 180ms ease;
}

.nav-links a:hover,
.footer-link:hover {
  color: var(--text);
  transform: translateY(-1px);
}

.hero {
  margin-top: 42px;
  padding: 34px 0 26px;
  min-height: 440px;
}

.hero-copy {
  flex: 1 1 540px;
  max-width: 620px;
}

.eyebrow,
.section-kicker {
  margin: 0 0 12px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
}

h1,
h2,
.footer-title {
  margin: 0;
  line-height: 0.95;
}

h1 {
  font-size: clamp(3rem, 7vw, 5.4rem);
  letter-spacing: -0.06em;
  max-width: 12ch;
}

.hero-text,
.section-note,
.footer-text {
  color: var(--muted);
  line-height: 1.7;
  font-size: 1rem;
}

.hero-text {
  max-width: 56ch;
  margin: 20px 0 0;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 28px;
}

.hero-stats div {
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(16px);
}

.hero-stats strong {
  display: block;
  font-size: 1.55rem;
  margin-bottom: 6px;
}

.hero-stats span {
  color: var(--muted);
  font-size: 0.9rem;
}

.hero-art {
  position: relative;
  flex: 0 1 360px;
  min-height: 360px;
  overflow: visible;
}

.world-model {
  position: absolute;
  inset: 12px;
  border-radius: 28px;
  background: transparent;
  box-shadow: none;
}

.planet-core,
.planet-atmosphere,
.orbit,
.body {
  position: absolute;
  border-radius: 999px;
}

.planet-core {
  width: min(260px, 76%);
  aspect-ratio: 1;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -46%);
  background:
    radial-gradient(circle at 30% 28%, rgba(160, 211, 255, 0.82), rgba(84, 150, 216, 0.35) 30%, transparent 62%),
    radial-gradient(circle at 64% 72%, rgba(58, 114, 181, 0.5), transparent 58%),
    linear-gradient(170deg, #345f97, #0c315f 62%, #051a37);
  border: 1px solid rgba(152, 204, 255, 0.26);
  box-shadow: 0 22px 70px rgba(7, 26, 52, 0.8), inset -28px -22px 44px rgba(3, 10, 24, 0.75);
}

.planet-atmosphere {
  width: min(302px, 88%);
  aspect-ratio: 1;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -46%);
  border: 1px solid rgba(133, 187, 255, 0.28);
  background: radial-gradient(circle at 50% 50%, rgba(103, 169, 255, 0.14), transparent 70%);
  box-shadow: 0 0 40px rgba(64, 134, 255, 0.18);
}

.orbit {
  left: 50%;
  top: 50%;
  transform: translate(-50%, -46%);
  border: 1px dashed rgba(148, 196, 255, 0.24);
}

.orbit-sun {
  width: min(332px, 96%);
  aspect-ratio: 1;
  animation: spin-orbit 14s linear infinite;
}

.orbit-moon {
  width: min(268px, 78%);
  aspect-ratio: 1;
  animation: spin-orbit 7.5s linear infinite reverse;
}

.body {
  left: 50%;
  top: 0;
  transform: translate(-50%, -50%);
}

.sun {
  width: 72px;
  aspect-ratio: 1;
  background: radial-gradient(circle at 36% 36%, #fff0bf 0 28%, #ffbf4d 64%, #ff8a33 100%);
  box-shadow: 0 0 32px rgba(255, 168, 66, 0.52), 0 0 64px rgba(255, 139, 59, 0.2);
}

.moon {
  width: 34px;
  aspect-ratio: 1;
  background:
    radial-gradient(circle at 30% 28%, rgba(246, 250, 255, 0.95), rgba(187, 199, 220, 0.8) 50%, rgba(116, 132, 164, 0.8) 100%),
    #c5d3ea;
  box-shadow: 0 0 18px rgba(170, 190, 223, 0.3);
}

@keyframes spin-orbit {
  from {
    transform: translate(-50%, -46%) rotate(0deg);
  }

  to {
    transform: translate(-50%, -46%) rotate(360deg);
  }
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 18px 0 30px;
}

.chip {
  border: 1px solid rgba(149, 186, 255, 0.16);
  border-radius: 999px;
  padding: 12px 18px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  font: inherit;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, color 180ms ease, background 180ms ease;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.chip:hover {
  transform: translateY(-1px);
  color: var(--text);
}

.chip.is-active {
  color: #081019;
  border-color: transparent;
  background: linear-gradient(135deg, #7ee0ff, #4b7cff);
  box-shadow: 0 10px 30px rgba(54, 199, 255, 0.28);
}

.chip-icon {
  width: 18px;
  height: 18px;
  border-radius: 6px;
  flex: 0 0 18px;
  object-fit: cover;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}

.stock-layout {
  padding: 10px 0 24px;
}

.section-head {
  margin-bottom: 18px;
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.05em;
}

.stock-grid {
  display: grid;
  gap: 22px;
}

.category-group {
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.03);
}

.category-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.category-head h3 {
  margin: 0;
  font-size: 1.2rem;
  letter-spacing: -0.03em;
}

.category-head span {
  color: var(--muted);
  font-size: 0.92rem;
}

.stock-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}

.stock-card {
  padding: 18px;
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(238, 243, 255, 0.88));
  color: #101827;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.22);
}

.stock-icon {
  display: block;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  margin-bottom: 18px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
  object-fit: cover;
}

.stock-card h4 {
  margin: 0 0 10px;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.stock-meta {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 10px;
}

.stock-count {
  font-size: 2.15rem;
  font-weight: 700;
  line-height: 1;
}

.stock-label {
  color: rgba(16, 24, 39, 0.62);
  font-size: 0.84rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.stock-card p {
  margin: 14px 0 0;
  color: rgba(16, 24, 39, 0.72);
  line-height: 1.5;
  font-size: 0.92rem;
}

.footer {
  margin-top: 26px;
  padding: 22px 0 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-title {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.footer-link {
  padding: 12px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

.is-hidden {
  display: none !important;
}

@media (max-width: 900px) {
  .topbar,
  .hero,
  .section-head,
  .footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero {
    min-height: auto;
  }

  .hero-art {
    width: 100%;
    min-height: 300px;
  }

  .sun {
    width: 60px;
  }

  .filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 8px;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
  }

  .filters::-webkit-scrollbar {
    height: 8px;
  }

  .filters::-webkit-scrollbar-thumb {
    background: rgba(160, 195, 255, 0.2);
    border-radius: 999px;
  }

  .chip {
    scroll-snap-align: start;
  }

  .section-note {
    margin: 0;
  }

  .category-head {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 18px, 1180px);
    margin: 9px auto;
    padding: 18px;
    border-radius: 22px;
  }

  .nav-links {
    width: 100%;
    gap: 16px;
  }

  .nav-links a {
    width: 100%;
  }

  .hero {
    padding-top: 18px;
  }

  .hero-art {
    min-height: 220px;
  }

  .world-model {
    inset: 4px;
    border-radius: 22px;
  }

  .sun {
    width: 52px;
  }

  .moon {
    width: 28px;
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }

  .stock-cards {
    grid-template-columns: 1fr;
  }

  .category-group {
    padding: 16px;
  }
}
