/* Basic reset */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

/* Shared backgrounds */
.community-body,
.hub-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at top, #e5f0ff 0, #0f172a 85%);
}

/* Shared card styling */
.community-card,
.hub-card {
  position: relative;
  max-width: 880px;
  width: 100%;
  margin: 2rem 1.25rem;
  padding: 2.25rem 2rem 2rem;
  border-radius: 1.75rem;
  background: #020617;
  color: #f9fafb;
  border: 1px solid rgba(148, 163, 184, 0.45);
  box-shadow:
    0 20px 40px rgba(15, 23, 42, 0.7),
    0 0 0 1px rgba(15, 23, 42, 0.2);
  overflow: hidden;
}

.community-card::before,
.hub-card::before {
  content: "";
  position: absolute;
  inset: -40%;
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.18), transparent 55%),
    radial-gradient(circle at bottom right, rgba(56, 189, 248, 0.2), transparent 55%);
  opacity: 0.9;
  pointer-events: none;
}

/* Community card header */
.community-card__header {
  position: relative;
  z-index: 1;
  margin-bottom: 1.9rem;
}

.community-card__brand {
  display: flex;
  align-items: center;
  gap: 1.1rem;
}

.community-card__logo {
  width: 56px;
  height: 56px;
  border-radius: 1.25rem;
  background: rgba(15, 23, 42, 0.9);
  padding: 0.4rem;
  border: 1px solid rgba(148, 163, 184, 0.7);
  object-fit: contain;
}

.community-card__brand-text {
  display: flex;
  flex-direction: column;
}

.community-card__eyebrow {
  margin: 0 0 0.25rem;
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #9ca3af;
}

.community-card__title {
  margin: 0 0 0.35rem;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 600;
}

.community-card__description {
  margin: 0;
  font-size: 0.95rem;
  color: #e5e7eb;
}

/* Modules grid */
.community-modules {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}

.community-modules__placeholder {
  margin: 0;
  color: #9ca3af;
}

/* Launcher cards (used on community page) */
.launcher-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.3rem 1.25rem;
  border-radius: 1.25rem;
  text-decoration: none;
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(148, 163, 184, 0.6);
  color: #f9fafb;
  transition:
    transform 140ms ease-out,
    box-shadow 140ms ease-out,
    border-color 140ms ease-out,
    background 140ms ease-out;
}

.launcher-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 26px rgba(15, 23, 42, 0.7);
  border-color: rgba(96, 165, 250, 0.9);
  background: rgba(15, 23, 42, 1);
}

.launcher-card__eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: #9ca3af;
}

.launcher-card__title {
  margin: 0 0 0.3rem;
  font-size: 1.1rem;
  font-weight: 600;
}

.launcher-card__label {
  margin: 0;
  font-size: 0.9rem;
  color: #e5e7eb;
}

.launcher-card__cta {
  align-self: flex-start;
  margin-top: 1.1rem;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

/* Asset Hub headings & metrics */
.hub-card__header {
  position: relative;
  z-index: 1;
  margin-bottom: 1.75rem;
}

.hub-card__eyebrow {
  margin: 0 0 0.25rem;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: #9ca3af;
}

.hub-card__title {
  margin: 0 0 0.4rem;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 600;
}

.hub-card__community-label {
  margin: 0;
  font-size: 0.9rem;
  color: #cbd5f5;
}

/* Metrics block */
.hub-metrics {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.5rem;
}

.hub-metric {
  padding: 1.15rem 1.2rem 1rem;
  border-radius: 1.25rem;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.55);
  backdrop-filter: blur(8px);
}

.hub-metric__label {
  margin: 0 0 0.5rem;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #9ca3af;
}

.hub-metric__value {
  margin: 0;
  font-size: 1.7rem;
  font-weight: 600;
}

.hub-metric__value--large {
  font-size: 1.9rem;
}

/* Quiet back-to-community link */
.hub-card__footer {
  position: relative;
  z-index: 1;
  margin-top: 2rem;
  display: flex;
  justify-content: flex-start;
}

.hub-back {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.8rem;
  text-decoration: none;
  color: #9ca3af;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(15, 23, 42, 0.85);
  opacity: 0.9;
  transition:
    background 120ms ease-out,
    opacity 120ms ease-out,
    transform 120ms ease-out;
}

.hub-back__icon {
  font-size: 0.9rem;
}

.hub-back:hover {
  opacity: 1;
  background: rgba(15, 23, 42, 1);
  transform: translateY(-1px);
}

/* Responsive tweaks */
@media (max-width: 640px) {
  .community-card,
  .hub-card {
    margin: 1.5rem 1rem;
    padding: 1.9rem 1.5rem 1.6rem;
    border-radius: 1.4rem;
  }

  .community-card__brand {
    align-items: flex-start;
  }

  .hub-metrics {
    grid-template-columns: 1fr;
  }
}
