:root {
  --bg-1: #0f0b16;
  --bg-2: #1a1327;
  --bg-3: #251f30;
  --accent: #8b5cf6;
  --accent-2: #6d46b2;
  --accent-3: #c084fc;
  --text: #f8f7fb;
  --muted: rgba(255, 255, 255, 0.72);
  --card-bg: rgba(255, 255, 255, 0.08);
  --card-border: rgba(255, 255, 255, 0.16);
  --card-hover: rgba(255, 255, 255, 0.12);
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  --glow: 0 0 30px rgba(139, 92, 246, 0.22);
}

* {
  box-sizing: border-box;
}

/* 🌌 Star Background Layer */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;

  background-image:
    radial-gradient(2px 2px at 20% 30%, rgba(255,255,255,1), transparent),
    radial-gradient(1.5px 1.5px at 70% 60%, rgba(255,255,255,0.9), transparent),
    radial-gradient(1px 1px at 40% 80%, rgba(255,255,255,0.85), transparent),
    radial-gradient(1.2px 1.2px at 80% 20%, rgba(255,255,255,0.9), transparent),
    radial-gradient(1px 1px at 10% 70%, rgba(255,255,255,0.8), transparent),
    radial-gradient(1px 1px at 25% 50%, rgba(255,255,255,0.85), transparent),
    radial-gradient(1.3px 1.3px at 60% 20%, rgba(255,255,255,0.9), transparent),
    radial-gradient(1px 1px at 85% 75%, rgba(255,255,255,0.85), transparent),
    radial-gradient(1.5px 1.5px at 15% 85%, rgba(255,255,255,0.8), transparent),
    radial-gradient(1px 1px at 55% 45%, rgba(255,255,255,0.8), transparent),
    radial-gradient(1px 1px at 35% 15%, rgba(255,255,255,0.85), transparent),
    radial-gradient(1.2px 1.2px at 75% 35%, rgba(255,255,255,0.9), transparent);

  background-repeat: repeat;
  background-size: 140px 140px;
  opacity: 0.5;
  animation: twinkle 6s ease-in-out infinite;
}

@keyframes twinkle {
  0%, 100% { opacity: 0.52; }
  50% { opacity: 0.72; }
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(139, 92, 246, 0.18), transparent 28%),
    radial-gradient(circle at bottom right, rgba(192, 132, 252, 0.12), transparent 24%),
    linear-gradient(135deg, var(--bg-1), var(--bg-2) 45%, var(--bg-3));
  overflow-x: hidden;
}

.hub-header,
.hub-main {
  position: relative;
  z-index: 1;
}

body {
  position: relative;
}

.hub-shell {
  width: min(1280px, calc(100% - 40px));
  margin: 0 auto;
}

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

.glow {
  position: absolute;
  border-radius: 999px;
  filter: blur(100px);
  opacity: 0.65;
}

.glow-1 {
  width: 340px;
  height: 340px;
  background: rgba(139, 92, 246, 0.18);
  top: 40px;
  left: -80px;
}

.glow-2 {
  width: 280px;
  height: 280px;
  background: rgba(192, 132, 252, 0.14);
  right: 40px;
  top: 140px;
}

.glow-3 {
  width: 420px;
  height: 420px;
  background: rgba(109, 70, 178, 0.12);
  left: 35%;
  bottom: -120px;
}

.hub-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px);
  background: rgba(10, 8, 16, 0.35);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.header-inner {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand-block {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-mark {
  font-size: 1.85rem;
  font-weight: 800;
  line-height: 1;
  color: #fff;
}

.brand-mark span {
  color: var(--accent-3);
}

.brand-subtitle {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 18px;
}

.header-nav a {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  opacity: 0.86;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.header-nav a:hover {
  opacity: 1;
  transform: translateY(-1px);
}

.hub-main {
  position: relative;
  z-index: 1;
  padding: 36px 0 70px;
}

.hero-section {
  padding: 28px 0 18px;
}

.hero-inner {
  text-align: center;
  max-width: 980px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent-3);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.hero-inner h1 {
  margin: 0;
  font-size: clamp(2.4rem, 5vw, 4.5rem);
  line-height: 1.02;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.hero-copy {
  margin: 18px auto 0;
  max-width: 780px;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.75;
}

.tool-grid-section {
  padding-top: 26px;
}

.primary-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 22px;
  align-items: stretch;
}

.feature-card {
  position: relative;
  min-height: 340px;
  border-radius: 30px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  overflow: hidden;
  transition:
    transform 0.28s ease,
    border-color 0.28s ease,
    box-shadow 0.28s ease,
    background 0.28s ease;
}

.feature-card:hover {
  transform: translateY(-8px) scale(1.012);
  border-color: rgba(192, 132, 252, 0.38);
  box-shadow:
    0 28px 70px rgba(0, 0, 0, 0.4),
    0 0 24px rgba(139, 92, 246, 0.18);
  background: var(--card-hover);
}

.feature-card::before,
.tool-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.06), transparent 35%, transparent 65%, rgba(139,92,246,0.06));
  opacity: 0.9;
  pointer-events: none;
}

.feature-card-inner {
  position: relative;
  z-index: 1;
  height: 100%;
  padding: 28px;
  display: flex;
  flex-direction: column;
}

.feature-top {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.feature-icon,
.tool-icon {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.14);
  font-size: 1.55rem;
  box-shadow: var(--glow);
  flex-shrink: 0;
}

.tool-tag {
  margin: 0 0 8px;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--accent-3);
}

.feature-card h2,
.tool-content h2 {
  margin: 0;
  font-size: 1.65rem;
  line-height: 1.1;
  font-weight: 800;
}

.feature-summary {
  margin: 0 0 20px;
  color: rgba(255,255,255,0.9);
  font-size: 1rem;
  line-height: 1.65;
  max-width: 95%;
}

.connect-card {
  background:
    linear-gradient(135deg, rgba(109, 70, 178, 0.18), rgba(255,255,255,0.06));
}

.connect-split {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 18px;
  margin-top: auto;
  align-items: stretch;
}

.connect-option {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 22px;
  padding: 18px;
  min-height: 165px;
  transition: transform 0.24s ease, background 0.24s ease;
}

.connect-option:hover {
  background: rgba(255,255,255,0.1);
  transform: translateY(-4px);
}

.option-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.option-icon {
  font-size: 1.1rem;
}

.option-header h3 {
  margin: 0;
  font-size: 1.06rem;
  font-weight: 800;
}

.connect-option p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  font-size: 0.95rem;
}

.connect-divider {
  width: 1px;
  background: linear-gradient(to bottom, transparent, rgba(255,255,255,0.18), transparent);
}

.mini-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.mini-chips span {
  display: inline-flex;
  align-items: center;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.9);
  font-size: 0.8rem;
  font-weight: 700;
}

.feature-footer {
  margin-top: 16px;
}

.footer-note {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
}

.analytics-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background:
    linear-gradient(135deg, rgba(109, 70, 178, 0.26), rgba(255,255,255,0.08));
}

.analytics-card-inner {
  position: relative;
  justify-content: flex-end;
}

.analytics-preview {
  position: absolute;
  inset: 18px 18px auto 18px;
  height: 150px;
  pointer-events: none;
  opacity: 0.95;
}

.preview-panel {
  position: absolute;
  border-radius: 24px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.14);
}

.panel-a {
  top: 0;
  left: 18px;
  width: 72%;
  height: 82px;
  background: rgba(255,255,255,0.08);
  transform: rotate(-4deg);
}

.panel-b {
  top: 32px;
  right: 6px;
  width: 58%;
  height: 76px;
  background: rgba(255,255,255,0.06);
  transform: rotate(6deg);
}

.preview-bars {
  position: absolute;
  left: 40px;
  right: 46px;
  bottom: 10px;
  height: 56px;
  display: flex;
  align-items: flex-end;
  gap: 10px;
  filter: blur(1px);
}

.preview-bars span {
  flex: 1;
  border-radius: 10px 10px 0 0;
  background: linear-gradient(to top, rgba(192,132,252,0.75), rgba(255,255,255,0.22));
}

.preview-bars span:nth-child(1) { height: 34%; }
.preview-bars span:nth-child(2) { height: 62%; }
.preview-bars span:nth-child(3) { height: 48%; }
.preview-bars span:nth-child(4) { height: 82%; }
.preview-bars span:nth-child(5) { height: 56%; }
.preview-bars span:nth-child(6) { height: 72%; }

.analytics-chips {
  margin-top: 10px;
  margin-bottom: 8px;
}

.large-arrow {
  margin-top: 22px;
  font-size: 1.6rem;
}

.secondary-section-label {
  margin-top: 34px;
  margin-bottom: 16px;
}

.secondary-section-label p {
  margin: 0;
  color: var(--accent-3);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.secondary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.tool-card {
  min-height: 250px;
  position: relative;
  text-decoration: none;
  color: inherit;
  border-radius: 28px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  overflow: hidden;
  transition:
    transform 0.28s ease,
    border-color 0.28s ease,
    box-shadow 0.28s ease,
    background 0.28s ease;
}

.tool-card:hover {
  transform: translateY(-8px) scale(1.015);
  border-color: rgba(192, 132, 252, 0.38);
  box-shadow:
    0 28px 70px rgba(0, 0, 0, 0.4),
    0 0 24px rgba(139, 92, 246, 0.18);
  background: var(--card-hover);
}

.tool-card-inner {
  position: relative;
  z-index: 1;
  height: 100%;
  padding: 24px;
  display: flex;
  flex-direction: column;
}

.tool-content {
  flex: 1;
}

.tool-summary {
  margin: 14px 0 0;
  font-size: 1rem;
  line-height: 1.6;
  color: rgba(255,255,255,0.9);
  max-width: 95%;
}

.tool-description {
  margin: 16px 0 0;
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--muted);
  max-width: 95%;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transform: translateY(8px);
  transition:
    max-height 0.28s ease,
    opacity 0.28s ease,
    transform 0.28s ease;
}

.tool-card:hover .tool-description {
  max-height: 180px;
  opacity: 1;
  transform: translateY(0);
}

.tool-arrow {
  margin-top: 18px;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--accent-3);
  transition: transform 0.22s ease;
}

.tool-card:hover .tool-arrow,
.feature-card:hover .tool-arrow {
  transform: translateX(6px);
}

@media (max-width: 1100px) {
  .primary-grid,
  .secondary-grid {
    grid-template-columns: 1fr;
  }

  .connect-split {
    grid-template-columns: 1fr;
  }

  .connect-divider {
    width: 100%;
    height: 1px;
  }
}

@media (max-width: 760px) {
  .hub-shell {
    width: min(100% - 20px, 1280px);
  }

  .header-inner {
    flex-direction: column;
    align-items: flex-start;
    padding: 12px 0;
  }

  .header-nav {
    flex-wrap: wrap;
    gap: 12px;
  }

  .feature-card,
  .tool-card {
    min-height: auto;
  }

  .feature-card-inner,
  .tool-card-inner {
    padding: 22px;
  }

  .feature-card h2,
  .tool-content h2 {
    font-size: 1.4rem;
  }

  .analytics-preview {
    height: 120px;
  }
}
