
:root {
  --bg: #090710;
  --bg-2: #120d1d;
  --surface: rgba(30, 21, 48, 0.86);
  --surface-2: rgba(19, 13, 31, 0.92);
  --surface-3: rgba(39, 27, 64, 0.94);
  --card-border: rgba(186, 158, 255, 0.18);
  --text: #f4f1fb;
  --muted: #c6bdd9;
  --line: rgba(255, 255, 255, 0.08);
  --purple: #7c56ff;
  --purple-2: #5428c0;
  --gold: #f4b546;
  --crimson: #cf4665;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.45);
  --radius: 24px;
  --radius-sm: 16px;
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top, rgba(123, 86, 255, 0.20), transparent 32%),
    radial-gradient(circle at 90% 10%, rgba(244, 181, 70, 0.10), transparent 20%),
    linear-gradient(180deg, #0b0812 0%, #0c0914 45%, #0a0710 100%);
  min-height: 100vh;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
p { color: var(--muted); line-height: 1.7; margin: 0 0 1rem; }
h1, h2, h3, h4 { margin: 0 0 0.8rem; line-height: 1.08; font-weight: 800; }
h1 { font-size: clamp(2.4rem, 5vw, 4.7rem); letter-spacing: -0.04em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); letter-spacing: -0.03em; }
h3 { font-size: 1.2rem; }
ul { margin: 0; padding-left: 1.2rem; }
.small { font-size: 0.92rem; }

.page-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 20% 30%, rgba(124, 86, 255, 0.12), transparent 26%),
    radial-gradient(circle at 80% 70%, rgba(207, 70, 101, 0.10), transparent 18%);
  z-index: -1;
}
.container { width: min(calc(100% - 2rem), var(--max)); margin: 0 auto; }
.section { padding: 1.3rem 0 4rem; }
.page-shell { padding-bottom: 2rem; }
.stack { display: grid; gap: 1.2rem; }
.three-up, .two-up, .server-grid, .members-grid, .dnd-grid {
  display: grid; gap: 1.2rem;
}
.three-up { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.two-up { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
.server-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.members-grid, .dnd-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.split-grid, .hero-grid, .split-hero {
  display: grid; gap: 1.6rem; align-items: center;
}
.hero-grid { grid-template-columns: 1.08fr 0.92fr; }
.split-grid { grid-template-columns: 1fr 1fr; }
.split-hero { grid-template-columns: 1fr 0.95fr; }

.panel {
  background: linear-gradient(180deg, rgba(31, 22, 49, 0.96), rgba(16, 12, 28, 0.96));
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 1.35rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}
.slim-panel { padding: 1.1rem 1.2rem; }
.prose-panel p:last-child, .panel p:last-child { margin-bottom: 0; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px);
  background: rgba(11, 8, 18, 0.74);
  border-bottom: 1px solid var(--line);
}
.nav-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 82px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.brand img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  border-radius: 14px;
  box-shadow: 0 10px 25px rgba(124, 86, 255, 0.25);
}
.brand-wordmark { font-size: 1.22rem; }
.site-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.nav-link {
  padding: 0.72rem 1rem;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 600;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.nav-link:hover, .nav-link.active {
  color: var(--text);
  background: rgba(124, 86, 255, 0.12);
}
.nav-toggle {
  display: none;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.7rem 1rem;
  font: inherit;
}

.hero, .page-hero { padding: 3.2rem 0 2rem; }
.hero-home { padding-top: 4rem; }
.hero-logo-panel {
  padding: 1.6rem;
  display: grid;
  place-items: center;
  min-height: 100%;
}
.hero-logo-panel img {
  width: min(100%, 540px);
  filter: drop-shadow(0 18px 40px rgba(124, 86, 255, 0.25));
}
.hero-copy p, .page-hero p { font-size: 1.05rem; max-width: 60ch; }
.button-row, .tag-row, .chip-row {
  display: flex; gap: 0.8rem; flex-wrap: wrap; align-items: center;
}
.button, .chip-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.95rem 1.2rem;
  font-weight: 700;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.button:hover, .chip-link:hover { transform: translateY(-2px); }
.button.primary {
  color: white;
  background: linear-gradient(135deg, var(--purple), var(--purple-2));
  box-shadow: 0 16px 35px rgba(124, 86, 255, 0.24);
}
.button.secondary, .chip-link {
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: #e8ddff;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  font-size: 0.75rem;
  font-weight: 800;
  margin-bottom: 0.9rem;
}
.eyebrow::before {
  content: "";
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--gold), var(--purple));
  box-shadow: 0 0 18px rgba(124, 86, 255, 0.5);
}
.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
  margin-top: 1.4rem;
}
.stats-strip div {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 1rem;
  background: rgba(255, 255, 255, 0.03);
}
.stats-strip strong {
  display: block;
  font-size: 1.6rem;
  margin-bottom: 0.15rem;
}
.stats-strip span { color: var(--muted); font-size: 0.95rem; }

.section-header { margin-bottom: 1.25rem; }
.feature-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.tag {
  display: inline-flex;
  padding: 0.46rem 0.76rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  color: #eadfff;
  font-size: 0.84rem;
  font-weight: 700;
}
.tag.current {
  background: rgba(244, 181, 70, 0.12);
  border-color: rgba(244, 181, 70, 0.26);
  color: #ffd48b;
}
.text-link {
  color: #cbb8ff;
  text-decoration: underline;
  text-decoration-color: rgba(203, 184, 255, 0.35);
  text-underline-offset: 0.2em;
}
.muted { color: var(--muted); }

.member-card {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 1.1rem;
  align-items: start;
}
.member-avatar, .dnd-thumb, .cover-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}
.small-avatar { width: 92px; height: 92px; }
.member-copy h4 {
  font-size: 0.95rem;
  margin-top: 0.9rem;
  color: #f1eaff;
}
.mini-list {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 1rem;
}
.server-card h2 { margin-bottom: 0.45rem; }
.server-note {
  margin-top: 1rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--line);
  color: #f0e8ff;
  font-weight: 700;
}
.media-panel { padding: 1rem; }
.cover-image.contain { object-fit: contain; }
.cover-image { border-radius: 20px; }

.twitch-card-top, .compact-character {
  display: flex;
  gap: 1rem;
  align-items: center;
}
.embed-shell {
  margin: 1rem 0 1rem;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.24);
  min-height: 340px;
}
.embed-shell iframe { width: 100%; height: 100%; min-height: 340px; border: 0; }
.embed-fallback {
  display: grid;
  place-items: center;
  min-height: 340px;
  padding: 1.5rem;
  text-align: center;
}

.dnd-card {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 1rem;
  align-items: start;
}
.session-block h3 { margin-bottom: 0.7rem; }
.narrow { width: min(calc(100% - 2rem), 860px); margin: 0 auto; }
.character-hero .media-panel { align-self: stretch; }

.site-footer {
  margin-top: 2rem;
  border-top: 1px solid var(--line);
  padding: 2rem 0 3rem;
  background: rgba(9, 7, 16, 0.56);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 1.5rem;
}
.footer-grid h3 {
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #efe7ff;
}
.footer-grid a {
  display: block;
  color: var(--muted);
  margin-bottom: 0.55rem;
}
.footer-grid a:hover { color: var(--text); }
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 0.8rem;
}
.footer-brand img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

@media (max-width: 980px) {
  .hero-grid, .split-grid, .split-hero, .three-up, .footer-grid, .server-grid, .members-grid, .dnd-grid, .two-up {
    grid-template-columns: 1fr;
  }
  .member-card, .dnd-card {
    grid-template-columns: 1fr;
  }
  .stats-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 760px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    display: none;
    position: absolute;
    left: 1rem;
    right: 1rem;
    top: calc(100% + 0.6rem);
    flex-direction: column;
    align-items: stretch;
    padding: 0.7rem;
    background: rgba(20, 14, 32, 0.97);
    border: 1px solid var(--card-border);
    border-radius: 22px;
    box-shadow: var(--shadow);
  }
  .site-nav.open { display: flex; }
  .nav-link { width: 100%; }
  h1 { font-size: 2.3rem; }
  .feature-banner, .twitch-card-top, .compact-character {
    flex-direction: column;
    align-items: flex-start;
  }
}
