:root {
  --primary-color: #526a98;
  --primary-hover: #435980;
  --bg-dark: #030f1f;
  --bg-panel: #131a28;
  --bg-section: #192233;
  --text-primary: #e6edf6;
  --text-secondary: #9aa4b2;
  --text-muted: #6b7280;
  --border-color: #263347;
}

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

html,
body {
  height: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

.hub-background {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.hub-background::before {
  content: "";
  position: absolute;
  inset: -10% 0 0 -10%;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180' viewBox='0 0 180 180'%3E%3Cpath d='M0 0H180M0 0V180' stroke='%239aa4b2' stroke-opacity='0.08' stroke-width='1'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='72' viewBox='0 0 72 72'%3E%3Cpath d='M0 0H72M0 0V72' stroke='%239aa4b2' stroke-opacity='0.04' stroke-width='1'/%3E%3C/svg%3E");
  background-size: 220px 220px, 80px 80px;
  opacity: 0.6;
  animation: gridDrift 80s linear infinite;
}

.hub-background::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cg fill='%23ffffff' fill-opacity='0.06'%3E%3Ccircle cx='8' cy='12' r='1'/%3E%3Ccircle cx='38' cy='22' r='1'/%3E%3Ccircle cx='90' cy='32' r='1'/%3E%3Ccircle cx='64' cy='72' r='1'/%3E%3Ccircle cx='18' cy='92' r='1'/%3E%3Ccircle cx='108' cy='90' r='1'/%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.35;
  animation: noiseShift 14s steps(6) infinite;
}

.hub-orbit {
  position: absolute;
  border-radius: 999px;
  border: 1px solid rgba(82, 106, 152, 0.22);
  box-shadow: inset 0 0 24px rgba(82, 106, 152, 0.08);
  opacity: 0.7;
}

.hub-orbit-one {
  width: 420px;
  height: 420px;
  top: -140px;
  right: -140px;
  animation: orbitFloat 26s ease-in-out infinite;
}

.hub-orbit-two {
  width: 560px;
  height: 560px;
  bottom: -220px;
  left: -220px;
  opacity: 0.45;
  animation: orbitFloat 34s ease-in-out infinite reverse;
}

.hub-container {
  min-height: 100vh;
  padding: 52px 20px 64px;
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 32px;
  position: relative;
  z-index: 1;
}

.hub-header {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hub-header::after {
  content: "";
  width: 120px;
  height: 2px;
  background: rgba(82, 106, 152, 0.5);
  margin: 4px auto 0;
  border-radius: 999px;
}

.hub-eyebrow {
  letter-spacing: 2px;
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-muted);
  display: inline-flex;
  gap: 8px;
  align-items: center;
  animation: headerSlide 0.6s ease both;
}

.hub-home-link {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.hub-home-link:hover {
  color: var(--text-primary);
}

.hub-title {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 700;
  animation: headerSlide 0.6s ease 0.08s both;
}

.hub-subtitle {
  max-width: 520px;
  color: var(--text-secondary);
  font-size: 15px;
  animation: headerSlide 0.6s ease 0.16s both;
}

.home-hero {
  display: flex;
  flex-direction: column;
  gap: 24px;
  animation: cardEnter 0.6s ease both;
}

.home-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.home-panel {
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 22px;
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.home-panel-label {
  font-size: 11px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--text-muted);
}

.home-panel-title {
  font-size: 18px;
  font-weight: 600;
}

.home-panel-desc {
  color: var(--text-secondary);
  font-size: 13px;
}

.home-panel-links {
  display: flex;
  gap: 10px;
}

.hub-link {
  text-decoration: none;
  color: var(--text-primary);
  background: var(--primary-color);
  padding: 8px 14px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 13px;
  transition: background 0.2s ease, transform 0.2s ease;
  display: inline-flex;
  align-items: center;
}

.hub-link:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.hub-link-ghost {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
}

.hub-link-ghost:hover {
  border-color: var(--primary-color);
  color: var(--text-primary);
  background: var(--bg-section);
}

.hub-footer {
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  margin-top: auto;
  padding-top: 24px;
}

@keyframes gridDrift {
  0% {
    transform: translate3d(0, 0, 0);
  }
  100% {
    transform: translate3d(120px, 120px, 0);
  }
}

@keyframes noiseShift {
  0%,
  100% {
    opacity: 0.3;
    transform: translate3d(0, 0, 0);
  }
  50% {
    opacity: 0.45;
    transform: translate3d(-10px, 10px, 0);
  }
}

@keyframes orbitFloat {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(18px, -12px, 0);
  }
}

@keyframes cardEnter {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@media (min-width: 900px) {
  .hub-header {
    text-align: left;
    align-items: flex-start;
  }

  .hub-header::after {
    margin-left: 0;
  }

  .home-hero {
    max-width: 640px;
  }
}

@media (max-width: 700px) {
  .hub-container {
    padding: 44px 18px 60px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hub-background::before,
  .hub-background::after,
  .hub-orbit,
  .hub-eyebrow,
  .hub-title,
  .hub-subtitle,
  .home-hero {
    animation: none;
  }

  .hub-link {
    transition: none;
  }
}
