:root {
  --hub-bg: #fff6e9;
  --hub-bg-2: #fff0f7;
  --hub-ink: #3a2e2a;
  --hub-ink-soft: #8a7a72;
  --hub-radius: 28px;
  --hub-shadow: 0 14px 28px rgba(58, 46, 42, 0.14);
  --hub-shadow-hover: 0 20px 36px rgba(58, 46, 42, 0.2);
  --hub-font-display: "Fredoka", "Baloo 2", "Comic Sans MS", ui-rounded, system-ui, sans-serif;
  --hub-font-body: "Baloo 2", "Comic Sans MS", "Segoe UI Rounded", "SF Rounded", ui-rounded, system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  position: relative;
  background: radial-gradient(circle at 15% 0%, var(--hub-bg-2), transparent 55%),
    radial-gradient(circle at 85% 100%, #eaf6ff, transparent 55%), var(--hub-bg);
  color: var(--hub-ink);
  font-family: var(--hub-font-body);
  overflow-x: hidden;
}

/* ---------- decorative background layer ---------- */

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

.hub-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
  opacity: 0.5;
}

.hub-blob--1 {
  width: 320px;
  height: 320px;
  top: -80px;
  left: -100px;
  background: radial-gradient(circle at 30% 30%, #ffe1a8, transparent 70%);
}

.hub-blob--2 {
  width: 260px;
  height: 260px;
  bottom: -60px;
  right: -60px;
  background: radial-gradient(circle at 60% 40%, #c9e7ff, transparent 70%);
}

.hub-blob--3 {
  width: 200px;
  height: 200px;
  top: 40%;
  right: 8%;
  background: radial-gradient(circle at 50% 50%, #ffd6ec, transparent 70%);
}

.hub-cloud {
  position: absolute;
  font-size: 2.6rem;
  opacity: 0.55;
  animation: hub-drift 34s linear infinite;
}

.hub-cloud--1 {
  top: 8%;
  left: -10%;
  animation-duration: 40s;
}

.hub-cloud--2 {
  top: 22%;
  left: -15%;
  font-size: 2rem;
  animation-duration: 52s;
  animation-delay: -12s;
}

.hub-cloud--3 {
  top: 66%;
  left: -12%;
  font-size: 2.2rem;
  animation-duration: 60s;
  animation-delay: -30s;
}

@keyframes hub-drift {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(130vw);
  }
}

.hub-sparkle {
  position: absolute;
  color: #ffcf5c;
  font-size: 1.4rem;
  animation: hub-twinkle 2.6s ease-in-out infinite;
}

.hub-sparkle--1 {
  top: 12%;
  left: 12%;
  animation-delay: 0s;
}

.hub-sparkle--2 {
  top: 18%;
  right: 16%;
  animation-delay: 0.6s;
  color: #7fd8ff;
}

.hub-sparkle--3 {
  bottom: 20%;
  left: 8%;
  animation-delay: 1.2s;
  color: #ff9fd0;
}

.hub-sparkle--4 {
  bottom: 14%;
  right: 10%;
  animation-delay: 1.8s;
}

@keyframes hub-twinkle {
  0%,
  100% {
    opacity: 0.25;
    transform: scale(0.8) rotate(0deg);
  }
  50% {
    opacity: 1;
    transform: scale(1.15) rotate(15deg);
  }
}

/* ---------- layout ---------- */

.hub {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 56px 20px 32px;
  gap: 40px;
}

.hub-header {
  text-align: center;
  max-width: 560px;
}

.hub-mascot {
  font-size: 3.2rem;
  display: inline-block;
  animation: hub-bounce 2.4s ease-in-out infinite;
  filter: drop-shadow(0 8px 10px rgba(58, 46, 42, 0.18));
}

@keyframes hub-bounce {
  0%,
  100% {
    transform: translateY(0) rotate(-4deg);
  }
  50% {
    transform: translateY(-10px) rotate(4deg);
  }
}

.hub-kicker {
  margin: 4px 0 0;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.8rem;
  color: #ff9f1c;
}

.hub-title {
  font-family: var(--hub-font-display);
  font-size: clamp(2.4rem, 6vw, 3.4rem);
  font-weight: 700;
  margin: 6px 0 10px;
  background: linear-gradient(120deg, #ff6b6b, #ff9f1c 45%, #3b82f6 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hub-title-dot {
  color: #ff6b6b;
  -webkit-text-fill-color: #ff6b6b;
}

.hub-subtitle {
  color: var(--hub-ink-soft);
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0;
}

.hub-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  justify-content: center;
  max-width: 940px;
}

.hub-loading {
  color: var(--hub-ink-soft);
  font-weight: 600;
}

/* ---------- cards ---------- */

.hub-card {
  --accent: #ffb703;
  --accent-soft: #ffe3b8;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 240px;
  padding: 32px 22px 26px;
  border-radius: var(--hub-radius);
  background: linear-gradient(180deg, #ffffff, var(--accent-soft) 180%);
  box-shadow: var(--hub-shadow);
  border: 4px solid var(--accent);
  text-decoration: none;
  color: var(--hub-ink);
  overflow: hidden;
  opacity: 0;
  transform: translateY(18px) scale(0.96);
  animation: hub-card-in 560ms cubic-bezier(0.2, 0.9, 0.3, 1.3) forwards;
  animation-delay: calc(var(--i, 0) * 110ms + 80ms);
  transition: transform 200ms ease-out, box-shadow 200ms ease-out;
}

@keyframes hub-card-in {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.hub-card:hover,
.hub-card:focus-visible {
  transform: translateY(-6px) rotate(-1deg) scale(1.035);
  box-shadow: var(--hub-shadow-hover);
  outline: none;
}

.hub-card:active {
  transform: translateY(-2px) scale(0.99);
}

.hub-card-shine {
  position: absolute;
  top: -60%;
  left: -60%;
  width: 60%;
  height: 220%;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  transform: rotate(20deg);
  transition: left 550ms ease;
  pointer-events: none;
}

.hub-card:hover .hub-card-shine {
  left: 130%;
}

.hub-card-badge {
  position: absolute;
  top: 14px;
  right: -30px;
  transform: rotate(38deg);
  background: var(--accent);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 3px 34px;
  text-align: center;
  text-transform: uppercase;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.hub-card-emoji-wrap {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffffff, var(--accent-soft));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
  box-shadow: inset 0 -4px 8px rgba(0, 0, 0, 0.06), 0 4px 10px rgba(0, 0, 0, 0.08);
}

.hub-card-emoji {
  font-size: 2.8rem;
  line-height: 1;
  display: inline-block;
  filter: drop-shadow(0 4px 4px rgba(0, 0, 0, 0.12));
  transition: transform 220ms ease-out;
}

.hub-card:hover .hub-card-emoji {
  transform: scale(1.12) rotate(-6deg);
}

.hub-card-name {
  font-family: var(--hub-font-display);
  font-size: 1.35rem;
  font-weight: 600;
  text-align: center;
}

.hub-card-tagline {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--hub-ink-soft);
  text-align: center;
  min-height: 2.4em;
}

.hub-card-cta {
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  background: var(--accent);
  padding: 8px 18px;
  border-radius: 999px;
  transition: gap 160ms ease-out, transform 160ms ease-out;
}

.hub-card:hover .hub-card-cta {
  gap: 10px;
  transform: translateX(2px);
}

/* ---------- footer ---------- */

.hub-footer {
  margin-top: auto;
  color: var(--hub-ink-soft);
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
}

.hub-footer-heart {
  display: inline-block;
  animation: hub-twinkle 1.8s ease-in-out infinite;
}

/* ---------- motion & small-screen accessibility ---------- */

@media (prefers-reduced-motion: reduce) {
  .hub-mascot,
  .hub-cloud,
  .hub-sparkle,
  .hub-footer-heart,
  .hub-card {
    animation: none !important;
  }

  .hub-card {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 420px) {
  .hub-card {
    width: 100%;
    max-width: 300px;
  }
}
