/* ----------------------------------------------------------
   GLOBAL RESET
---------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #e5f0ff 0%, #0f172a 85%);
  color: #f9fafb;
  -webkit-font-smoothing: antialiased;
}

/* Wrapper for any page */
.page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

/* ----------------------------------------------------------
   TITLES
---------------------------------------------------------- */
.hub-title, .community-title {
  text-align: center;
  font-size: 2.4rem;
  font-weight: 700;
  margin: 0 0 2rem;
}

/* ----------------------------------------------------------
   GRID LAYOUT FOR LAUNCHER CARDS
---------------------------------------------------------- */
.launcher-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  padding-bottom: 4rem;
}

/* ----------------------------------------------------------
   LAUNCHER CARD (used for Mamaweswen hub)
---------------------------------------------------------- */
.launcher-card {
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.35);
  padding: 1.4rem;
  border-radius: 1.25rem;
  color: #f9fafb;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  transition: 0.2s ease;
  position: relative;
  overflow: hidden;
}

.launcher-card:hover {
  transform: translateY(-4px);
  border-color: rgba(96, 165, 250, 1);
  box-shadow: 0 16px 32px rgba(0,0,0,0.35);
}

.launcher-card img {
  width: 56px;
  height: 56px;
  border-radius: 1rem;
  background: rgba(0,0,0,0.28);
  object-fit: contain;
  padding: 0.4rem;
  margin-bottom: 1rem;
  border: 1px solid rgba(148,163,184,0.5);
}

.launcher-card h2 {
  margin: 0 0 0.25rem;
  font-size: 1.25rem;
  font-weight: 600;
}

.launcher-card p {
  margin: 0;
  font-size: 0.9rem;
  color: #d1d5db;
}

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

/* ----------------------------------------------------------
   COMMUNITY PAGE CARD (name-agnostic)
---------------------------------------------------------- */
.community-card, .hub-card {
  max-width: 880px;
  margin: 2.5rem auto;
  padding: 2rem 2rem 2.2rem;
  border-radius: 1.75rem;
  background: #020617;
  border: 1px solid rgba(148, 163, 184, 0.4);
  box-shadow:
    0 20px 40px rgba(15, 23, 42, 0.65),
    0 0 0 1px rgba(15, 23, 42, 0.15);
  position: relative;
  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 60%),
    radial-gradient(circle at bottom right, rgba(56,189,248,0.22), transparent 60%);
  opacity: 0.8;
}

.community-card__brand {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 5;
}

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

.community-card__title {
  font-size: clamp(1.8rem, 3vw, 2.2rem);
  font-weight: 700;
  margin: 0;
}

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

.community-card__description {
  font-size: 1rem;
  color: #d8dee9;
  margin-top: 0.3rem;
}

/* ----------------------------------------------------------
   MODULE TILES (on community page)
---------------------------------------------------------- */
.community-modules {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.2rem;
  margin-top: 1.6rem;
  position: relative;
  z-index: 5;
}

/* Reuse launcher-card for module tiles */
.community-modules .launcher-card {
  background: rgba(15,23,42,0.85);
}

/* ----------------------------------------------------------
   ASSET HUB METRICS
---------------------------------------------------------- */
.hub-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.5rem;
  margin-top: 1.6rem;
  position: relative;
  z-index: 5;
}

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

.hub-metric__label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #9ca3af;
  margin-bottom: 0.4rem;
}

.hub-metric__value {
  font-size: 1.8rem;
  font-weight: 700;
}

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

/* ----------------------------------------------------------
   QUIET BACK LINK
---------------------------------------------------------- */
.hub-card__footer {
  margin-top: 2rem;
  position: relative;
  z-index: 5;
}

.hub-back {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.85rem;
  text-decoration: none;
  color: #9ca3af;
  border: 1px solid rgba(148,163,184,0.45);
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgba(15,23,42,0.7);
  opacity: 0.85;
  transition: 0.15s ease;
}

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

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

/* ----------------------------------------------------------
   RESPONSIVE
---------------------------------------------------------- */
@media (max-width: 640px) {

  .hub-title {
    font-size: 1.9rem;
  }

  .launcher-grid {
    grid-template-columns: 1fr;
  }

  .community-card,
  .hub-card {
    margin: 1.5rem 1rem;
    padding: 1.75rem 1.4rem;
    border-radius: 1.4rem;
  }

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

  .community-card__logo {
    width: 54px;
    height: 54px;
  }

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