:root {
  --bg: #020408;
  --bg2: #050a12;
  --surface: rgba(8, 20, 38, 0.82);
  --border: rgba(56, 189, 248, 0.14);
  --cyan: #22d3ee;
  --blue: #0ea5e9;
  --blue-d: #0369a1;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --glow: 0 0 40px rgba(14, 165, 233, 0.35);
  --font: "DM Sans", system-ui, sans-serif;
  --display: "Syne", system-ui, sans-serif;
  --radius: 16px;
  --wrap: min(1140px, 92vw);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
}

/* Layered background effects — mouse vars set by particles.js */
.bg-effects {
  --mx: 50%;
  --my: 50%;
  --mdx: 0px;
  --mdy: 0px;
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  animation: orb-drift 18s ease-in-out infinite;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.bg-orb-1 {
  width: 55vw;
  height: 55vw;
  max-width: 600px;
  max-height: 600px;
  top: -15%;
  left: -10%;
  background: rgba(14, 165, 233, 0.22);
  animation-delay: 0s;
}

.bg-orb-2 {
  width: 45vw;
  height: 45vw;
  max-width: 500px;
  max-height: 500px;
  bottom: -20%;
  right: -5%;
  background: rgba(99, 102, 241, 0.18);
  animation-delay: -6s;
}

.bg-orb-3 {
  width: 35vw;
  height: 35vw;
  max-width: 400px;
  max-height: 400px;
  top: 40%;
  left: 30%;
  background: rgba(34, 211, 238, 0.12);
  animation-delay: -12s;
}

@keyframes orb-drift {
  0%, 100% {
    transform: translate(calc(var(--mdx) * 3), calc(var(--mdy) * 3)) scale(1);
  }
  33% {
    transform: translate(calc(var(--mdx) * 3 + 24px), calc(var(--mdy) * 3 + 18px)) scale(1.06);
  }
  66% {
    transform: translate(calc(var(--mdx) * 3 - 16px), calc(var(--mdy) * 3 + 12px)) scale(0.94);
  }
}

.bg-grid {
  position: absolute;
  inset: -60px;
  background-image:
    linear-gradient(rgba(56, 189, 248, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56, 189, 248, 0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  background-position: calc(var(--mdx) * -0.5) calc(var(--mdy) * -0.5);
  mask-image: radial-gradient(ellipse 80% 70% at var(--mx) var(--my), black 15%, transparent 70%);
  transition: background-position 0.2s ease-out;
}

.bg-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 30%, rgba(0, 0, 0, 0.75) 100%);
}

.bg-noise {
  position: absolute;
  inset: 0;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

#particles {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.85;
}

.cursor-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 420px;
  height: 420px;
  margin: -210px 0 0 -210px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  background: radial-gradient(
    circle,
    rgba(34, 211, 238, 0.14) 0%,
    rgba(14, 165, 233, 0.06) 35%,
    transparent 65%
  );
  transition: opacity 0.25s ease, width 0.2s ease, height 0.2s ease, margin 0.2s ease;
  will-change: transform, opacity;
  mix-blend-mode: screen;
}

.cursor-glow--active {
  width: 520px;
  height: 520px;
  margin: -260px 0 0 -260px;
  background: radial-gradient(
    circle,
    rgba(34, 211, 238, 0.22) 0%,
    rgba(99, 102, 241, 0.1) 40%,
    transparent 68%
  );
}

body.screen-shake .bg-effects,
body.screen-shake #particles {
  animation: screen-shake 0.18s ease-out;
}

@keyframes screen-shake {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(-3px, 2px); }
  50% { transform: translate(3px, -2px); }
  75% { transform: translate(-2px, -2px); }
}

@media (prefers-reduced-motion: reduce) {
  .bg-orb,
  .bg-grid,
  .cursor-glow {
    animation: none;
    transition: none;
  }

  #particles {
    opacity: 0.35;
  }

  body.screen-shake .bg-effects,
  body.screen-shake #particles {
    animation: none;
  }
}

.mesh {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg2) 50%, #030712 100%);
  pointer-events: none;
}

.wrap { width: var(--wrap); margin: 0 auto; position: relative; z-index: 2; }

#main { position: relative; z-index: 2; }

a { color: var(--cyan); text-decoration: none; transition: color 0.2s; }
a:hover { color: #fff; }

img { max-width: 100%; display: block; }

.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 999;
  padding: 0.6rem 1rem;
  background: var(--blue);
  color: #fff;
  border-radius: 8px;
  font-weight: 600;
}
.skip-link:focus { top: 1rem; }

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border);
  background: rgba(2, 4, 8, 0.75);
  backdrop-filter: blur(20px) saturate(1.2);
}

.nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 0;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: #fff;
  font-family: var(--display);
  font-size: 1.2rem;
  font-weight: 700;
  margin-right: auto;
}
.brand em { color: var(--cyan); font-style: normal; }
.brand-icon { filter: drop-shadow(0 0 8px rgba(34, 211, 238, 0.5)); }

.nav-menu {
  display: flex;
  list-style: none;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.nav-menu a {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.45rem 0.75rem;
  border-radius: 8px;
}
.nav-menu a:hover,
.nav-menu a[aria-current="page"] {
  color: #fff;
  background: rgba(14, 165, 233, 0.15);
}

.nav-toggle {
  display: none;
  background: var(--surface);
  border: 1px solid var(--border);
  color: #fff;
  padding: 0.5rem 0.85rem;
  border-radius: 8px;
  cursor: pointer;
  font-family: var(--font);
}

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .nav-menu {
    display: none;
    width: 100%;
    flex-direction: column;
    padding: 0.5rem 0;
  }
  .nav-menu.open { display: flex; }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.4rem;
  border-radius: 12px;
  font-family: var(--font);
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}
.btn:hover { transform: translateY(-2px); }

.btn-glow {
  background: linear-gradient(135deg, var(--cyan), var(--blue-d));
  color: #fff;
  box-shadow: var(--glow);
}
.btn-glow:hover { box-shadow: 0 0 60px rgba(34, 211, 238, 0.45); color: #fff; }

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--cyan); color: #fff; }

.btn-sm { padding: 0.45rem 1rem; font-size: 0.85rem; }
.btn-lg { padding: 0.9rem 1.75rem; font-size: 1.05rem; }
.btn-xl { padding: 1rem 2rem; font-size: 1.15rem; }

/* Hero */
.hero {
  padding: 4rem 0 5rem;
  position: relative;
  z-index: 1;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  align-items: center;
}

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
}

.hero h1,
.page-hero h1 {
  font-family: var(--display);
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.text-gradient {
  background: linear-gradient(90deg, var(--cyan), var(--blue), #818cf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.lead {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 36rem;
  margin-bottom: 1.5rem;
}

.pill-row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.25rem; }

.pill {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.15);
  border: 1px solid var(--border);
  color: var(--cyan);
}

.pill-hot {
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.25), rgba(14, 165, 233, 0.2));
  border-color: var(--cyan);
}

.hero-cta { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* Glass / cards */
.glass-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(16px) saturate(1.1);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.showcase { padding: 1.25rem; animation: float 6s ease-in-out infinite; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.showcase-top {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 1rem;
  font-size: 0.8rem;
  color: var(--muted);
}
.showcase-top .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #475569;
}
.showcase-top .dot:first-child { background: #ef4444; }
.showcase-top .dot:nth-child(2) { background: #eab308; }
.showcase-top .dot:nth-child(3) { background: #22c55e; }

.showcase-modules { list-style: none; }
.showcase-modules li {
  padding: 0.55rem 0.85rem;
  margin-bottom: 0.4rem;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 500;
  background: rgba(0, 0, 0, 0.25);
  color: var(--muted);
}
.showcase-modules li.on {
  background: linear-gradient(90deg, rgba(14, 165, 233, 0.3), transparent);
  color: var(--cyan);
  border-left: 3px solid var(--cyan);
}

.showcase-note { font-size: 0.8rem; color: var(--muted); margin-top: 1rem; }

/* Sections */
.section { padding: 4rem 0; position: relative; z-index: 1; }
.section-dark {
  background: rgba(0, 0, 0, 0.45);
  box-shadow: inset 0 1px 0 rgba(56, 189, 248, 0.06);
}

.section-requirements {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: rgba(14, 165, 233, 0.06);
}

.section-intro {
  text-align: center;
  max-width: 40rem;
  margin: -1rem auto 2rem;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.6;
}

.section-intro.center { margin-left: auto; margin-right: auto; }

.req-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}

.req-card {
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.req-card:hover {
  border-color: var(--cyan);
  box-shadow: var(--glow);
}

.req-card h3 {
  font-family: var(--display);
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}

.req-card h3 a { color: #fff; }
.req-card h3 a:hover { color: var(--cyan); }

.req-card p {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 1rem;
}

.req-link {
  font-size: 0.9rem;
  font-weight: 600;
}

.req-foot {
  margin-top: 1.75rem;
  font-size: 0.95rem;
  color: var(--muted);
}

.hero-req {
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 1rem;
  max-width: 32rem;
}

.hero-req a {
  font-weight: 600;
  color: var(--cyan);
}

.section-title {
  font-family: var(--display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  text-align: center;
  margin-bottom: 2rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}

.card {
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}

.card-3d:hover {
  transform: translateY(-4px) scale(1.01);
  border-color: var(--cyan);
  box-shadow: var(--glow);
}

.card-icon { font-size: 2rem; margin-bottom: 0.75rem; }
.card h3 { font-family: var(--display); font-size: 1.1rem; margin-bottom: 0.5rem; color: #fff; }
.card p { font-size: 0.9rem; color: var(--muted); }

/* Page hero */
.page-hero {
  padding: 3rem 0 2rem;
  position: relative;
  z-index: 1;
  text-align: center;
}
.page-hero .lead { margin: 0 auto 1.5rem; }
.page-hero .btn { margin-top: 0.5rem; }

/* Prose */
.prose { max-width: 42rem; margin: 0 auto; }
.prose h2 { font-family: var(--display); margin: 2rem 0 0.75rem; color: #fff; }
.prose h3 { margin: 1.5rem 0 0.5rem; color: var(--cyan); }
.prose p, .prose li { color: var(--muted); margin-bottom: 0.75rem; }
.prose ol, .prose ul { padding-left: 1.25rem; }

.check-list { list-style: none; padding: 0; }
.check-list li {
  padding: 0.65rem 0 0.65rem 1.75rem;
  position: relative;
  border-bottom: 1px solid var(--border);
}
.check-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--cyan);
  font-weight: 700;
}

/* Modules */
.category-tabs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.tab {
  font-family: var(--font);
  font-weight: 600;
  padding: 0.55rem 1.2rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s;
}

.tab:hover { color: #fff; border-color: var(--cyan); }
.tab.active {
  background: linear-gradient(135deg, var(--blue), var(--blue-d));
  border-color: transparent;
  color: #fff;
}

.modules-panel { min-height: 120px; }

.module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.module-card {
  padding: 1.1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: border-color 0.2s;
}
.module-card:hover { border-color: var(--cyan); }
.module-card h4 { color: var(--cyan); font-size: 0.95rem; margin-bottom: 0.35rem; }
.module-card p { font-size: 0.85rem; color: var(--muted); }

.module-tag {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  margin-bottom: 0.4rem;
  display: inline-block;
}
.tag-op { background: rgba(234, 179, 8, 0.2); color: #fbbf24; }
.tag-creative { background: rgba(236, 72, 153, 0.2); color: #f472b6; }

.module-section { margin-bottom: 2.5rem; }
.module-section h2 { font-family: var(--display); color: #fff; margin-bottom: 0.5rem; }
.module-list { list-style: none; }
.module-list li {
  padding: 0.75rem;
  margin-bottom: 0.5rem;
  background: var(--surface);
  border-radius: 10px;
  border: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--muted);
}
.module-list strong { color: #fff; display: block; margin-bottom: 0.2rem; }

/* Download */
.download-box {
  padding: 2rem;
  text-align: center;
  max-width: 32rem;
  margin: 1.5rem auto 0;
}
.dl-meta { margin-top: 1rem; font-size: 0.9rem; color: var(--muted); }
.dl-note { margin-top: 0.5rem; font-size: 0.85rem; color: var(--muted); }
code {
  background: rgba(0, 0, 0, 0.35);
  padding: 0.15em 0.4em;
  border-radius: 6px;
  font-size: 0.88em;
  color: var(--cyan);
}

/* Steps */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.step-card {
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  position: relative;
}
.step-card span {
  display: inline-flex;
  width: 2rem;
  height: 2rem;
  align-items: center;
  justify-content: center;
  background: var(--blue);
  color: #fff;
  font-weight: 700;
  border-radius: 50%;
  margin-bottom: 0.75rem;
}
.step-card h3 { font-family: var(--display); margin-bottom: 0.35rem; }
.step-card p { font-size: 0.9rem; color: var(--muted); }

/* CTA */
.cta-band {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.2), rgba(29, 78, 216, 0.15));
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.center { text-align: center; }
.mt { margin-top: 1.5rem; }

/* Breadcrumbs */
.breadcrumbs { padding: 0.75rem 0; font-size: 0.85rem; z-index: 1; position: relative; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; list-style: none; gap: 0.35rem; }
.breadcrumbs li:not(:last-child)::after { content: "/"; margin-left: 0.35rem; color: var(--muted); }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs [aria-current="page"] { color: var(--cyan); }

/* Footer */
.footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  padding: 2.5rem 0 1.5rem;
  margin-top: 2rem;
  background: rgba(0, 0, 0, 0.35);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr auto;
  gap: 2rem;
  align-items: start;
}

@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr; }
}

.footer-brand { font-family: var(--display); font-size: 1.1rem; color: #fff; display: block; margin-bottom: 0.35rem; }
.footer p { font-size: 0.9rem; color: var(--muted); }

.footer nav { display: flex; flex-direction: column; gap: 0.5rem; }
.footer nav a { color: var(--muted); font-size: 0.9rem; }

.footer-copy {
  text-align: center;
  font-size: 0.8rem;
  color: #64748b;
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

/* Reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible { opacity: 1; transform: none; }
.reveal.delay { transition-delay: 0.15s; }

/* Discord embed preview card */
.discord-embed {
  position: relative;
  padding: 1rem 1rem 1rem 1.25rem;
  overflow: hidden;
  text-align: left;
}

.discord-embed-bar {
  width: 4px;
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  background: var(--blue);
  border-radius: 4px 0 0 4px;
}

.discord-embed-site {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.35rem;
}

.discord-embed-title {
  font-family: var(--display);
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.35rem;
  line-height: 1.3;
}

.discord-embed-desc {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
  line-height: 1.45;
}

.discord-embed-img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
}
