:root {
  --bg: #131210;
  --gold: #c8a565;
  --gold-bright: #e0bd7e;
  --gold-dim: #6d5c3c;
  --cyan: #5fd8d4;
  --cyan-bright: #8ff0ec;
  --text: #eae5d9;
  --text-muted: #948e7f;
}

* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

body::before {
  background-image:
    radial-gradient(1.5px 1.5px at 12% 22%, rgba(234, 229, 217, 0.55), transparent),
    radial-gradient(1px 1px at 28% 68%, rgba(95, 216, 212, 0.45), transparent),
    radial-gradient(1.5px 1.5px at 42% 12%, rgba(234, 229, 217, 0.35), transparent),
    radial-gradient(1px 1px at 58% 80%, rgba(200, 165, 101, 0.4), transparent),
    radial-gradient(1.5px 1.5px at 72% 34%, rgba(234, 229, 217, 0.4), transparent),
    radial-gradient(1px 1px at 85% 62%, rgba(95, 216, 212, 0.4), transparent),
    radial-gradient(1.5px 1.5px at 93% 15%, rgba(234, 229, 217, 0.3), transparent),
    radial-gradient(1px 1px at 8% 88%, rgba(200, 165, 101, 0.35), transparent),
    radial-gradient(1.5px 1.5px at 50% 50%, rgba(234, 229, 217, 0.25), transparent),
    radial-gradient(1px 1px at 65% 5%, rgba(95, 216, 212, 0.3), transparent),
    radial-gradient(1.5px 1.5px at 20% 45%, rgba(234, 229, 217, 0.4), transparent),
    radial-gradient(1px 1px at 36% 90%, rgba(200, 165, 101, 0.35), transparent),
    radial-gradient(1.5px 1.5px at 48% 28%, rgba(234, 229, 217, 0.3), transparent),
    radial-gradient(1px 1px at 62% 55%, rgba(95, 216, 212, 0.35), transparent),
    radial-gradient(1.5px 1.5px at 78% 78%, rgba(234, 229, 217, 0.45), transparent),
    radial-gradient(1px 1px at 90% 40%, rgba(200, 165, 101, 0.3), transparent),
    radial-gradient(1.5px 1.5px at 5% 60%, rgba(95, 216, 212, 0.3), transparent),
    radial-gradient(1px 1px at 15% 5%, rgba(234, 229, 217, 0.35), transparent),
    radial-gradient(1.5px 1.5px at 32% 32%, rgba(200, 165, 101, 0.3), transparent),
    radial-gradient(1px 1px at 55% 95%, rgba(234, 229, 217, 0.3), transparent);
  background-repeat: no-repeat;
  animation: star-drift 120s linear infinite, star-twinkle 7s ease-in-out infinite;
  will-change: transform, opacity;
}

/* Second, finer layer — smaller/dimmer dots, drifting at a different rate for depth */
body::after {
  background-image:
    radial-gradient(1px 1px at 6% 15%, rgba(234, 229, 217, 0.2), transparent),
    radial-gradient(1px 1px at 22% 40%, rgba(95, 216, 212, 0.2), transparent),
    radial-gradient(1px 1px at 38% 75%, rgba(234, 229, 217, 0.18), transparent),
    radial-gradient(1px 1px at 46% 20%, rgba(200, 165, 101, 0.2), transparent),
    radial-gradient(1px 1px at 60% 62%, rgba(234, 229, 217, 0.18), transparent),
    radial-gradient(1px 1px at 68% 88%, rgba(95, 216, 212, 0.2), transparent),
    radial-gradient(1px 1px at 76% 10%, rgba(234, 229, 217, 0.22), transparent),
    radial-gradient(1px 1px at 82% 48%, rgba(200, 165, 101, 0.18), transparent),
    radial-gradient(1px 1px at 95% 72%, rgba(234, 229, 217, 0.2), transparent),
    radial-gradient(1px 1px at 3% 82%, rgba(95, 216, 212, 0.18), transparent),
    radial-gradient(1px 1px at 18% 92%, rgba(234, 229, 217, 0.2), transparent),
    radial-gradient(1px 1px at 30% 8%, rgba(200, 165, 101, 0.2), transparent),
    radial-gradient(1px 1px at 44% 55%, rgba(234, 229, 217, 0.18), transparent),
    radial-gradient(1px 1px at 52% 82%, rgba(95, 216, 212, 0.2), transparent),
    radial-gradient(1px 1px at 70% 30%, rgba(234, 229, 217, 0.2), transparent),
    radial-gradient(1px 1px at 88% 92%, rgba(200, 165, 101, 0.18), transparent);
  background-repeat: no-repeat;
  animation: star-drift 180s linear infinite reverse, star-twinkle 9s ease-in-out infinite;
  animation-delay: 0s, 2s;
}

@keyframes star-drift {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-1.5%, -1%, 0); }
}

@keyframes star-twinkle {
  0%, 100% { opacity: 0.75; }
  50% { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  body::before,
  body::after {
    animation: none;
  }
}

.banner {
  position: relative;
  width: 100%;
  line-height: 0;
  overflow: hidden;
  background: #05070a;
}

.banner img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 360px;
  object-fit: cover;
  object-position: center 32%;
}

.banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(19, 18, 16, 0) 55%, var(--bg) 100%);
  pointer-events: none;
}

.banner::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--gold-dim), var(--cyan), var(--gold-bright));
  z-index: 1;
}

.page {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px 24px 48px;
  overflow: hidden;
}

.clan-name {
  position: relative;
  margin: 0 0 10px;
  font-size: clamp(24px, 4.4vw, 34px);
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text);
}

.clan-name,
.tagline,
.tags,
.page > .nav-link,
.divider,
.join {
  animation: fade-up 0.6s ease both;
}

.clan-name { animation-delay: 0.05s; }
.tagline { animation-delay: 0.15s; }
.tags { animation-delay: 0.25s; }
.page > .nav-link { animation-delay: 0.32s; margin-top: 20px; }
.divider { animation-delay: 0.35s; }
.join { animation-delay: 0.45s; }

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .clan-name,
  .tagline,
  .tags,
  .page > .nav-link,
  .divider,
  .join {
    animation: none;
  }
}

.tagline {
  position: relative;
  margin: 0;
  font-size: 14px;
  color: var(--text-muted);
}

.highlight {
  color: var(--cyan-bright);
  font-weight: 600;
  text-shadow: 0 0 14px rgba(95, 216, 212, 0.45);
}

.tags {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 20px 0 0;
  max-width: 400px;
}

.tag {
  padding: 5px 12px;
  border: 1px solid var(--gold-dim);
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
  transition: border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.tag:hover {
  border-color: var(--cyan);
  color: var(--cyan-bright);
  box-shadow: 0 0 10px rgba(95, 216, 212, 0.2);
}

.divider {
  width: 64px;
  height: 1px;
  margin: 32px 0 36px;
  border: none;
  background: linear-gradient(90deg, transparent, var(--gold-dim), transparent);
}

.join {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.join-text {
  margin: 0 0 22px;
  max-width: 380px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-muted);
}

.discord-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 26px;
  border: 1px solid var(--gold);
  border-radius: 6px;
  color: var(--gold-bright);
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.discord-btn:hover,
.discord-btn:focus-visible {
  background-color: var(--gold);
  border-color: var(--cyan);
  color: #131210;
  box-shadow: 0 0 22px rgba(95, 216, 212, 0.35);
}

.discord-icon {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.discord-stats {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 14px;
  margin: 16px 0 0;
  font-size: 12px;
  color: var(--text-muted);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.discord-stats.is-loaded {
  opacity: 1;
}

.discord-stats.is-loaded::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 8px 1px rgba(95, 216, 212, 0.7);
  animation: dot-pulse 2.2s ease-in-out infinite;
}

@keyframes dot-pulse {
  0%, 100% {
    box-shadow: 0 0 8px 1px rgba(95, 216, 212, 0.7);
    opacity: 1;
  }
  50% {
    box-shadow: 0 0 14px 4px rgba(95, 216, 212, 0.9);
    opacity: 0.7;
  }
}

@media (prefers-reduced-motion: reduce) {
  .discord-stats.is-loaded::before {
    animation: none;
  }
}

.credits {
  margin: 0;
  padding: 0 24px;
  text-align: center;
  font-size: 11px;
  line-height: 1.6;
  color: var(--gold-dim);
}

.credits a {
  color: var(--gold-dim);
  text-decoration: underline;
}

.credits a:hover,
.credits a:focus-visible {
  color: var(--gold);
}

.site-footer {
  padding: 18px 24px 26px;
  text-align: center;
  font-size: 12px;
  color: var(--gold-dim);
}

.site-footer p {
  margin: 0;
}

@media (max-width: 640px) {
  .banner img {
    max-height: 48vh;
    object-position: center 34%;
  }
}





/* Alliance page */
.alliance-page {
  justify-content: flex-start;
  padding-top: 40px;
  overflow: visible;
}

.back-link,
.nav-link {
  display: inline-block;
  margin-bottom: 28px;
  font-size: 12px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.back-link:hover,
.back-link:focus-visible,
.nav-link:hover,
.nav-link:focus-visible {
  color: var(--gold-bright);
}

.alliance-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 220px));
  gap: 18px;
  max-width: 480px;
}

@media (max-width: 640px) {
  .alliance-grid {
    grid-template-columns: minmax(0, 260px);
  }
}

.alliance-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 22px 18px 20px;
  border: 1px solid var(--gold-dim);
  border-radius: 10px;
  text-align: center;
  background:
    radial-gradient(140% 100% at 50% 0%, rgba(200, 165, 101, 0.07), transparent 60%),
    rgba(234, 229, 217, 0.02);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.alliance-card:hover {
  transform: translateY(-3px);
  border-color: var(--cyan);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.45), 0 0 18px rgba(95, 216, 212, 0.15);
}

.alliance-logo {
  width: 56px;
  height: 56px;
  object-fit: contain;
  margin-bottom: 12px;
}

.alliance-logo-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--gold-dim);
  border-radius: 50%;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--gold-dim);
}

.alliance-card-name {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.alliance-card-meta {
  margin: 0 0 8px;
  font-size: 11px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--gold-dim);
}

.alliance-card-desc {
  flex: 1 0 auto;
  margin: 0 0 12px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-muted);
}

.alliance-card-link {
  font-size: 12px;
  font-weight: 600;
  color: var(--gold-bright);
  text-decoration: none;
  border-bottom: 1px solid var(--gold-dim);
}

.alliance-card-link:hover,
.alliance-card-link:focus-visible {
  color: var(--cyan-bright);
  border-color: var(--cyan);
}
