/* ===== 1. COLOURS (change here only) ===== */
:root {
  --bg: #f4f5ff;
  --white: #ffffff;
  --ink: #141a3c;
  --muted: #586087;
  --line: #e2e5f7;
  --violet: #6d4aff;
  --cyan: #14b8e6;
  --green: #18b87a;
  --orange: #ff8a1f;
  --pink: #f0508c;
  --blue: #2f6bff;
  --shadow: 0 16px 36px -22px rgba(20, 26, 60, 0.45);
}
/* ===== 2. BASE ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  background: var(--bg);
  color: var(--ink);
  font:
    17px/1.7 "Inter",
    system-ui,
    -apple-system,
    "Segoe UI",
    sans-serif;
  -webkit-font-smoothing: antialiased;
}
a {
  color: inherit;
}
:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 3px;
}
/* ===== 3. TOP BANNER ===== */
.hero {
  position: relative;
  overflow: hidden;
  text-align: center;
  color: #fff;
  padding: 72px 22px 96px;
  background: linear-gradient(135deg, #10163a 0%, #2a1f7a 55%, #4b2fd0 100%);
}
.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(8px);
  pointer-events: none;
}
.hero::before {
  width: 360px;
  height: 360px;
  left: -110px;
  top: -120px;
  background: radial-gradient(
    circle,
    rgba(20, 184, 230, 0.55),
    transparent 65%
  );
  animation: drift 9s ease-in-out infinite;
}
.hero::after {
  width: 420px;
  height: 420px;
  right: -140px;
  bottom: -190px;
  background: radial-gradient(circle, rgba(255, 138, 31, 0.5), transparent 65%);
  animation: drift 11s ease-in-out infinite reverse;
}
.hero > * {
  position: relative;
  z-index: 1;
}
.pill {
  display: inline-block;
  font:
    700 0.76rem "Inter",
    sans-serif;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #10163a;
  background: linear-gradient(90deg, #8fe3ff, #ffc38a);
  padding: 6px 16px;
  border-radius: 999px;
  margin-bottom: 20px;
}
h1 {
  font-family: "Sora", "Inter", sans-serif;
  font-weight: 800;
  font-size: clamp(2.2rem, 6vw, 3.8rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}
h1 span {
  background: linear-gradient(90deg, #7fe0ff, #ffb36b);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.subtitle {
  max-width: 60ch;
  margin: 0 auto 18px;
  font-size: 1.1rem;
  color: #d4d8ff;
}
.count {
  display: inline-block;
  font-weight: 700;
  font-size: 0.9rem;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 5px 16px;
  border-radius: 999px;
}
.count:empty {
  display: none;
}
/* ===== 4. TOPIC CARDS ===== */
.container {
  max-width: 1060px;
  width: 92%;
  margin: -52px auto 0;
  padding-bottom: 70px;
  position: relative;
  z-index: 2;
}
#topic-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  counter-reset: topic;
}
.topic-card {
  --c: var(--violet);
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 34px 30px 30px;
  box-shadow: var(--shadow);
  overflow: hidden;
  counter-increment: topic;
  opacity: 0;
  transform: translateY(24px);
  animation: rise 0.6s ease forwards;
  animation-delay: calc(var(--i) * 70ms);
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    border-color 0.25s ease;
}
.topic-card::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 6px;
  background: linear-gradient(
    90deg,
    var(--c),
    color-mix(in srgb, var(--c) 40%, white)
  );
}
.topic-card::after {
  content: counter(topic, decimal-leading-zero);
  position: absolute;
  right: 22px;
  top: 14px;
  font:
    800 3.4rem/1 "Sora",
    sans-serif;
  color: color-mix(in srgb, var(--c) 14%, white);
  pointer-events: none;
}
.topic-card:nth-child(6n + 2) {
  --c: var(--cyan);
}
.topic-card:nth-child(6n + 3) {
  --c: var(--green);
}
.topic-card:nth-child(6n + 4) {
  --c: var(--orange);
}
.topic-card:nth-child(6n + 5) {
  --c: var(--pink);
}
.topic-card:nth-child(6n + 6) {
  --c: var(--blue);
}
.topic-card:hover {
  transform: translateY(-6px);
  border-color: var(--c);
  box-shadow: 0 26px 44px -24px color-mix(in srgb, var(--c) 70%, #141a3c);
}
.topic-card h2 {
  position: relative;
  z-index: 1;
  font-family: "Sora", "Inter", sans-serif;
  font-weight: 700;
  font-size: 1.4rem;
  line-height: 1.25;
  margin-bottom: 12px;
  padding-right: 56px;
}
.topic-card p {
  position: relative;
  z-index: 1;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.75;
  margin-bottom: 26px;
  flex: 1;
}
/* ===== 5. BUTTON ===== */
.topic-btn {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  color: #fff;
  background: linear-gradient(
    135deg,
    var(--c),
    color-mix(in srgb, var(--c) 55%, #141a3c)
  );
  padding: 12px 24px;
  border-radius: 999px;
  box-shadow: 0 12px 22px -12px var(--c);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    gap 0.2s ease;
}
.topic-btn::after {
  content: "\2192";
  font-size: 1.1rem;
  line-height: 1;
  transition: transform 0.2s ease;
}
.topic-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 26px -12px var(--c);
}
.topic-btn:hover::after {
  transform: translateX(5px);
}
.topic-btn.disabled {
  background: #e7e9f6;
  color: #7d84a8;
  box-shadow: none;
  cursor: not-allowed;
}
.topic-btn.disabled::after {
  display: none;
}
.topic-btn.disabled:hover {
  transform: none;
}
.nojs {
  text-align: center;
  color: var(--muted);
  padding: 30px;
}
/* ===== 6. FOOTER ===== */
footer {
  background: #10163a;
  color: #b9bfea;
  text-align: center;
  padding: 30px 20px 40px;
  font-size: 0.95rem;
}
/* ===== 7. ANIMATION + MOBILE ===== */
@keyframes rise {
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes drift {
  50% {
    transform: translate(28px, 22px);
  }
}
@media (max-width: 760px) {
  #topic-list {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .hero {
    padding: 56px 20px 84px;
  }
  .topic-card {
    padding: 30px 22px 26px;
  }
  .topic-card h2 {
    font-size: 1.25rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  .topic-card {
    opacity: 1;
    transform: none;
  }
}
