:root {
  --paper: #313338;
  --ink: #f2f3f5;
  --muted: #b5bac1;
  --line: #3f4147;
  --card: #2b2d31;
  --indigo: #00a8fc;
  --indigo-soft: #1e1f22;
  --gold: #949ba4;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  --serif: "Newsreader", "Iowan Old Style", Palatino, Georgia, serif;
  --sans: "Noto Sans", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: #313338;
  font-family: var(--sans);
  font-size: 1.05rem;
  line-height: 1.65;
}

main { flex: 1 0 auto; }

a { color: var(--indigo); text-underline-offset: 0.18em; }

a:hover { color: #ffffff; }

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--ink);
  color: white;
  padding: 0.5rem 0.8rem;
  z-index: 5;
}

.skip:focus { top: 0.75rem; }

.wrap {
  width: min(760px, calc(100% - 2rem));
  margin: 0 auto;
}

.site-header {
  border-bottom: 1px solid var(--line);
  background: #2b2d31;
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 2;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.25rem;
}

.brand {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.01em;
}

nav { display: flex; gap: 1rem; }

nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
}

nav a[aria-current="page"],
nav a:hover { color: var(--indigo); }

nav a.add-nav,
a.add-bot {
  background: #5865f2;
  color: #fff;
  border-radius: 4px;
  font-weight: 600;
}

nav a.add-nav {
  padding: 0.32rem 0.7rem;
  font-size: 0.88rem;
}

a.add-bot {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin: 0.9rem 0 0;
  padding: 0.55rem 0.8rem;
  font-size: 0.92rem;
}

nav a.add-nav:hover,
a.add-bot:hover { background: #4752c4; color: #fff; }

.hero { padding: 3.2rem 0 1rem; }

.eyebrow {
  margin: 0 0 0.6rem;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.updated {
  margin: 0.9rem 0 0;
  color: var(--muted);
}

.lede {
  font-size: 1.18rem;
  max-width: 38rem;
}

.card-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  padding-bottom: 3rem;
}

.card {
  display: block;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 1.1rem;
  padding: 1.3rem 1.35rem 1.2rem;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
}

.card:hover { border-color: #5865f2; }

.card h2 {
  margin: 0 0 0.35rem;
  font-family: var(--serif);
  font-size: 1.7rem;
}

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

.card span {
  display: inline-block;
  margin-top: 0.9rem;
  color: var(--indigo);
  font-weight: 600;
}

article {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  padding: 1.4rem 1.3rem 0.4rem;
  box-shadow: var(--shadow);
  margin: 1.2rem 0 2.5rem;
}

h2 {
  margin: 1.6rem 0 0.4rem;
  font-family: var(--serif);
  font-size: 1.55rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

h2:first-child { margin-top: 0.2rem; }

p, li { color: #dbdee1; }

ul, ol { padding-left: 1.2rem; }

li + li { margin-top: 0.35rem; }

.note {
  background: var(--indigo-soft);
  border-radius: 0.8rem;
  padding: 0.85rem 1rem;
  color: #dbdee1;
}

.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--line);
  color: var(--muted);
  padding: 1.3rem 0 2rem;
  font-size: 0.92rem;
}

.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
  padding: 1.5rem 0 2rem;
}

.discord {
  width: min(400px, 100%);
  margin: 0 0 0 auto;
  background: #111214;
  color: #f2f3f5;
  border-radius: 8px;
  overflow: hidden;
  font-family: "gg sans", "Noto Sans", "Segoe UI", sans-serif;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
}

.discord-banner {
  height: 120px;
  background: linear-gradient(90deg, #3b82f6 0%, #6366f1 52%, #8b5cf6 100%);
}

.discord-body { position: relative; padding: 62px 16px 16px; }

.discord-avatar {
  position: absolute;
  left: 16px;
  top: -48px;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  border: 6px solid #111214;
  object-fit: cover;
  background: #111214;
}

.discord-status {
  position: absolute;
  left: 86px;
  top: 22px;
  width: 16px;
  height: 16px;
  border: 4px solid #111214;
  border-radius: 50%;
  background: #f0b429;
}

.discord-status[data-state="online"] {
  background: #23a55a;
  box-shadow: 0 0 0 0 rgba(35, 165, 90, 0.55);
  animation: pulse 1.8s ease-out infinite;
}
.discord-status[data-state="offline"] { background: #f23f43; animation: none; }

.discord-name {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  color: #f2f3f5;
  font-family: "gg sans", "Noto Sans", "Segoe UI", sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.2;
}

.app-badge {
  display: inline-flex;
  align-items: center;
  height: 0.95rem;
  padding: 0 0.28rem;
  border-radius: 0.25rem;
  background: #5865f2;
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1;
}

.discord-handle {
  margin: 0.15rem 0 0;
  color: #b5bac1;
  font-size: 0.92rem;
}

.discord-disc {
  margin: 0;
  color: #80848e;
  font-size: 0.86rem;
}

.discord-custom {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0.85rem 0 0;
  color: #dbdee1;
  font-size: 0.92rem;
}

.bang {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background: #f0b429;
  color: #111214;
  font-size: 0.72rem;
  font-weight: 700;
}

.discord h2 {
  margin: 1.15rem 0 0.35rem;
  color: #b5bac1;
  font-family: "gg sans", "Noto Sans", "Segoe UI", sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.discord-about {
  margin: 0;
  color: #dbdee1;
  font-size: 0.92rem;
  line-height: 1.45;
}

.discord-live {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1rem;
  padding: 0.75rem 0.8rem;
  border-radius: 8px;
  background: #1e1f22;
}

.discord-meta {
  margin: 0.75rem 0 0;
  color: #949ba4;
  font-size: 0.8rem;
}

.discord-meta a { color: #c9cdfb; }

.presence {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0;
  font-weight: 600;
}

.dot {
  width: 0.62rem;
  height: 0.62rem;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 0 rgba(154, 107, 36, 0.45);
}

.dot[data-state="online"] {
  background: #1f9d62;
  animation: pulse 1.8s ease-out infinite;
}

.dot[data-state="offline"] { background: #b42318; box-shadow: none; animation: none; }

@keyframes pulse {
  70% { box-shadow: 0 0 0 8px rgba(31, 157, 98, 0); }
  100% { box-shadow: 0 0 0 0 rgba(31, 157, 98, 0); }
}

.discord .presence { color: #f2f3f5; font-size: 0.92rem; }

.latency { text-align: right; }

.discord .latency strong {
  display: block;
  color: #f2f3f5;
  font-family: "gg sans", "Noto Sans", "Segoe UI", sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.discord .latency span { color: #949ba4; font-size: 0.75rem; }

.section-title {
  margin: 0.2rem 0 0.7rem;
  font-family: var(--serif);
  font-size: 1.7rem;
}

.commands {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.7rem;
  margin: 0 0 1.5rem;
  padding: 0;
  list-style: none;
}

.commands li {
  margin: 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 0.95rem;
  padding: 0.85rem 1rem;
}

.commands code {
  display: block;
  color: var(--indigo);
  font-weight: 600;
  font-size: 0.98rem;
}

.commands p { margin: 0.2rem 0 0; color: var(--muted); }

.owner-note { margin: -0.4rem 0 1.5rem; color: var(--muted); }

@media (min-width: 720px) {
  .card-row { grid-template-columns: 1fr 1fr; }
  article { padding: 2rem 2.1rem 0.8rem; }
  .wrap { width: min(820px, calc(100% - 3rem)); }
}

@media (min-width: 900px) {
  body.home .wrap.stage {
    width: min(1120px, calc(100% - 2rem));
    grid-template-columns: minmax(0, 1fr) minmax(300px, 400px);
  }
  .stage-copy { grid-column: 1; grid-row: 1; }
  .stage-profile {
    grid-column: 2;
    grid-row: 1;
    position: sticky;
    top: 5.4rem;
  }
}

@media (min-width: 1100px) {
  .commands { grid-template-columns: 1fr 1fr; }
}
