:root {
  /* Discord invite page theme tokens. */
  --bg: #eef7f8;
  --ink: #152a2f;
  --muted: #607982;
  --surface: #ffffff;
  --discord: #497fa3;
  --discord-dark: #2f6584;
  --mint: #d8f4ec;
  --lavender: #e4f1f6;
  --line: rgba(78, 129, 143, 0.16);
  --shadow: 0 20px 54px rgba(34, 83, 94, 0.14);
}

/* Base reset and typography. */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", Arial, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 84% 12%, rgba(42, 168, 137, 0.16), transparent 28rem),
    radial-gradient(circle at top left, rgba(73, 127, 163, 0.16), transparent 34rem),
    linear-gradient(180deg, #f9fdfd 0%, var(--bg) 42%, #e8f7f2 100%);
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid rgba(42, 168, 137, 0.3);
  outline-offset: 3px;
}

.hero {
  /* Desktop layout pairs the invite copy with a compact invite card. */
  max-width: 1220px;
  min-height: 650px;
  margin: 0 auto;
  padding: 78px 20px 58px;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(340px, 0.92fr);
  gap: 34px;
  align-items: center;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--discord);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(2.45rem, 6vw, 5.25rem);
  line-height: 0.98;
}

.hero-content > p:not(.eyebrow),
.about-copy,
.join-panel > p,
.footer p {
  color: var(--muted);
}

.hero-content > p:not(.eyebrow) {
  max-width: 660px;
  margin-top: 20px;
  font-size: 1.08rem;
}

.hero-actions,
.join-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button {
  /* Shared button treatment for invite links and the copy action. */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 18px;
  border: 0;
  border-radius: 8px;
  font-weight: 900;
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.primary {
  background: var(--discord);
  color: #fff;
}

.primary:hover {
  background: var(--discord-dark);
}

.secondary {
  background: var(--lavender);
  color: var(--discord-dark);
}

.invite-card,
.steps article,
.join-panel,
.path-result {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.invite-card {
  position: relative;
  overflow: hidden;
  padding: 30px;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.94), rgba(216, 244, 236, 0.82)),
    #fff;
}

.invite-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 12% 12%, rgba(73, 127, 163, 0.18), transparent 10rem),
    radial-gradient(circle at 90% 0%, rgba(42, 168, 137, 0.2), transparent 12rem);
}

.invite-card > * {
  position: relative;
}

.discord-mark {
  display: grid;
  place-items: center;
  width: 70px;
  height: 70px;
  border-radius: 18px;
  background: var(--discord);
  color: #fff;
  font-size: 2rem;
  font-weight: 900;
}

.invite-label {
  margin: 24px 0 0;
  color: var(--discord);
  font-size: 0.85rem;
  font-weight: 900;
  text-transform: uppercase;
}

.invite-card h2 {
  margin: 6px 0 8px;
  font-size: 2rem;
}

.invite-card p {
  color: var(--muted);
}

.aura-list {
  display: grid;
  gap: 9px;
  margin: 22px 0 0;
}

.aura-list span {
  padding: 10px 12px;
  border: 1px solid rgba(78, 129, 143, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.68);
  color: var(--discord-dark);
  font-weight: 900;
}

.card-button {
  width: 100%;
  margin-top: 18px;
  background: var(--mint);
  color: #176f67;
}

.section {
  /* Main content container. Experience uses a full-width band below. */
  max-width: 1160px;
  margin: 0 auto;
  padding: 72px 20px;
}

.section h2,
.join-panel h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.15rem);
  line-height: 1.08;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 28px;
}

.about {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 34px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.personalization {
  padding-top: 34px;
}

.path-builder {
  display: grid;
  grid-template-columns: minmax(260px, 0.82fr) minmax(0, 1.18fr);
  gap: 18px;
  align-items: stretch;
}

.path-controls {
  display: grid;
  gap: 10px;
}

.path-button {
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid rgba(78, 129, 143, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--muted);
  font-weight: 900;
  text-align: left;
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease, color 180ms ease;
}

.path-button:hover {
  transform: translateY(-2px);
}

.path-button.active {
  background: var(--discord);
  color: #fff;
}

.path-result {
  min-height: 260px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 28px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(228, 241, 246, 0.82)),
    #fff;
}

.path-result span {
  color: var(--discord);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.path-result h3 {
  margin: 10px 0 8px;
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1;
}

.path-result p {
  max-width: 680px;
  color: var(--muted);
}

.path-result .button {
  width: fit-content;
  margin-top: 14px;
}

.server-map {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.channel-group {
  padding: 18px;
  border: 1px solid rgba(78, 129, 143, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.channel-group:hover {
  transform: translateY(-2px);
  border-color: rgba(42, 168, 137, 0.3);
}

.channel-group.highlight {
  border-color: rgba(42, 168, 137, 0.32);
  background: rgba(216, 244, 236, 0.84);
}

.channel-group h3 {
  margin: 0 0 12px;
  color: var(--discord-dark);
  font-size: 0.9rem;
}

.channel-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.channel-list li {
  min-height: 36px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 9px;
  border-radius: 8px;
  color: var(--muted);
  font-weight: 800;
  overflow-wrap: anywhere;
}

.channel-list li.active {
  color: var(--ink);
  background: linear-gradient(90deg, var(--lavender), rgba(216, 244, 236, 0.72));
}

.channel-list span {
  color: var(--discord);
  font-weight: 900;
}

.channel-list strong {
  margin-left: auto;
  min-width: 44px;
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  padding: 4px 9px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--discord), var(--primary, #2aa889));
  color: #fff;
  font-size: 0.7rem;
  line-height: 1;
  white-space: nowrap;
  box-shadow: 0 8px 18px rgba(73, 127, 163, 0.22);
}

.steps h3 {
  margin: 16px 0 8px;
}

.steps p {
  color: var(--muted);
}

.experience {
  /* Full-width middle band for the joining rhythm. */
  max-width: none;
  padding-left: max(20px, calc((100vw - 1160px) / 2 + 20px));
  padding-right: max(20px, calc((100vw - 1160px) / 2 + 20px));
  background: rgba(216, 244, 236, 0.62);
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.steps article {
  padding: 24px;
}

.steps strong {
  color: var(--discord);
  font-size: 0.9rem;
}

.rules {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 34px;
}

.rule-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}

.rule-list li {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-weight: 800;
}

.join-section {
  padding: 76px 20px;
}

.join-panel {
  max-width: 960px;
  margin: 0 auto;
  padding: 38px;
  text-align: center;
}

.join-actions {
  justify-content: center;
}

.copy-status {
  /* JavaScript updates this after copying or when clipboard access is unavailable. */
  margin: 18px 0 0;
  color: var(--discord-dark);
  font-weight: 800;
}

.footer {
  padding: 28px 20px;
  text-align: center;
  border-top: 1px solid var(--line);
}

@media (max-width: 900px) {
  .hero,
  .about,
  .rules,
  .path-builder {
    grid-template-columns: 1fr;
  }

  .server-map,
  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .path-result .button {
    width: 100%;
  }
}

@media (max-width: 680px) {
  .hero {
    min-height: auto;
    padding-top: 52px;
  }

  .hero h1 {
    font-size: 2.3rem;
  }

  .hero-actions,
  .hero-actions .button,
  .join-actions,
  .join-actions .button {
    width: 100%;
  }

  .server-map,
  .steps {
    grid-template-columns: 1fr;
  }

  .join-panel {
    padding: 28px 20px;
  }
}
