:root {
  --bg-main: #050505;
  --bg-soft: rgba(18, 18, 18, 0.68);
  --glass: rgba(18, 18, 18, 0.55);
  --line: rgba(120, 70, 190, 0.35);
  --text-main: #f6f8ff;
  --text-soft: #bcc4df;
  --cyan: #00f5ff;
  --purple: #8d4bff;
  --shadow: 0 16px 36px rgba(0, 0, 0, 0.5);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  /* Fragment / landing scroll when opening e.g. index.html#minecraft from another page */
  scroll-padding-top: clamp(100px, 11vh, 140px);
}

body {
  margin: 0;
  background: linear-gradient(170deg, #020202 0%, #080808 45%, #0f0718 100%);
  color: var(--text-main);
  font-family: Rajdhani, sans-serif;
  overflow-x: hidden;
}

#particles,
.gradient-overlay,
.noise-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

#particles {
  z-index: -4;
}

.gradient-overlay {
  z-index: -3;
  background:
    radial-gradient(55% 40% at 15% 10%, rgba(0, 245, 255, 0.16), transparent 75%),
    radial-gradient(55% 40% at 85% 12%, rgba(141, 75, 255, 0.16), transparent 75%),
    radial-gradient(45% 32% at 50% 90%, rgba(0, 245, 255, 0.12), transparent 75%);
  animation: floatGlow 22s ease-in-out infinite alternate;
}

.noise-overlay {
  z-index: -2;
  opacity: 0.09;
  background-image: radial-gradient(rgba(255, 255, 255, 0.2) 0.8px, transparent 0.8px);
  background-size: 3px 3px;
}

.site-header {
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: min(1240px, 96vw);
  z-index: 100;
  pointer-events: auto;
}

.main-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(8, 8, 12, 0.58);
  border: 1px solid rgba(141, 75, 255, 0.35);
  border-radius: 14px;
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
}

.brand-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.status-pill {
  margin: 0;
  width: fit-content;
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: #d3f8ff;
  border: 1px solid rgba(0, 245, 255, 0.35);
  border-radius: 999px;
  padding: 4px 10px;
  background: rgba(0, 245, 255, 0.08);
}

.brand-title {
  text-decoration: none;
  color: var(--text-main);
  font-family: Orbitron, sans-serif;
  font-weight: 800;
  letter-spacing: 0.11em;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.site-logo {
  width: 24px;
  height: 24px;
  object-fit: contain;
  filter: drop-shadow(0 0 8px rgba(0, 245, 255, 0.35));
}

.nav-links {
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px 8px;
  min-width: 0;
}

.nav-link {
  text-decoration: none;
  color: var(--text-main);
  font-family: Orbitron, sans-serif;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 10px 13px;
  border-radius: 999px;
  border: 1px solid rgba(141, 75, 255, 0.25);
  background: rgba(141, 75, 255, 0.12);
  transition: all 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
  border-color: rgba(0, 245, 255, 0.65);
  box-shadow: 0 0 14px rgba(0, 245, 255, 0.22);
  transform: translateY(-1px);
}

.nav-links--shop-only {
  justify-content: flex-end;
}

.nav-link--emphasis {
  border-color: rgba(0, 245, 255, 0.5);
  background: linear-gradient(135deg, rgba(0, 245, 255, 0.16), rgba(141, 75, 255, 0.2));
}

.hamburger {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: 1px solid rgba(141, 75, 255, 0.45);
  background: rgba(141, 75, 255, 0.1);
  cursor: pointer;
}

.hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: #d6ccff;
}

main {
  width: min(1140px, 92vw);
  margin: 0 auto;
  padding-top: 140px;
}

/* Legal pages: comfortable reading width */
main.legal-main {
  width: min(800px, 92vw);
  padding-bottom: 48px;
}

/* In-page anchors clear fixed header (used with JS offset on same-page clicks) */
main section[id] {
  scroll-margin-top: clamp(100px, 11vh, 140px);
}

/* Hub: clearer separation between major sections */
main .pu-section + .pu-section {
  border-top: 1px solid rgba(141, 75, 255, 0.12);
}

.pu-widget-hint {
  margin: 0 0 12px;
  font-size: 0.95rem;
  color: var(--text-soft);
}

.pu-widget-hint code {
  color: var(--cyan);
  font-size: 0.88em;
}

/* Hub landing: shorter hero when only statement + staff */
.hub-landing .hero-section {
  min-height: 56vh;
}

/* Prominent mission statement (hub top) */
.pu-statement {
  margin-top: 8px;
  padding: 22px 24px;
  border-radius: 14px;
  border: 1px solid rgba(0, 245, 255, 0.22);
  background: rgba(0, 245, 255, 0.06);
  box-shadow: 0 0 28px rgba(141, 75, 255, 0.08);
}

.pu-statement p {
  margin: 0;
  font-size: 1.22rem;
  line-height: 1.65;
  color: var(--text-main);
  max-width: none;
}

/* Image + text rows (Minecraft features, etc.) */
.pu-split {
  display: grid;
  grid-template-columns: minmax(200px, 1fr) minmax(260px, 1.1fr);
  gap: 28px;
  align-items: center;
  margin-top: 36px;
  padding: 22px 0;
  border-top: 1px solid rgba(141, 75, 255, 0.14);
}

.pu-split:first-of-type {
  border-top: none;
  padding-top: 0;
}

.pu-split.pu-split--reverse {
  grid-template-columns: minmax(260px, 1.1fr) minmax(200px, 1fr);
}

.pu-split.pu-split--reverse .pu-split-media {
  order: 2;
}

.pu-split.pu-split--reverse .pu-split-copy {
  order: 1;
}

.pu-split-media {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(141, 75, 255, 0.35);
  background: rgba(10, 10, 18, 0.6);
  aspect-ratio: 16 / 10;
}

.pu-split-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pu-split-copy h3 {
  margin: 0 0 10px;
}

.pu-split-copy p {
  margin: 0;
  max-width: 560px;
}

@media (max-width: 820px) {
  .pu-split,
  .pu-split.pu-split--reverse {
    grid-template-columns: 1fr;
  }

  .pu-split.pu-split--reverse .pu-split-media,
  .pu-split.pu-split--reverse .pu-split-copy {
    order: unset;
  }
}

/* Discord: official widget iframe */
.discord-widget-wrap {
  margin-top: 16px;
  max-width: 100%;
  width: fit-content;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(141, 75, 255, 0.35);
  background: rgba(10, 10, 18, 0.45);
  box-shadow: 0 0 24px rgba(0, 0, 0, 0.25);
}

.discord-widget-wrap iframe {
  display: block;
  max-width: 100%;
  border: 0;
  vertical-align: middle;
}

@media (max-width: 400px) {
  .discord-widget-wrap iframe {
    width: 100% !important;
    height: min(500px, 70vh);
  }
}

/* Discord: channel & role lists */
.discord-layout-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 18px;
  margin-top: 20px;
}

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

.discord-list-card h3 {
  margin: 0 0 12px;
  font-size: 1rem;
}

.discord-list-card ul {
  margin: 0;
  padding-left: 1.15rem;
  color: var(--text-soft);
  line-height: 1.65;
}

.discord-list-card li {
  margin-bottom: 6px;
}

.discord-role-tier {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(141, 75, 255, 0.28);
  background: rgba(141, 75, 255, 0.08);
}

.discord-role-tier h4 {
  margin: 0 0 8px;
  font-family: Orbitron, sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cyan);
}

.discord-role-tier ul {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--text-soft);
  font-size: 1.05rem;
}

.section {
  padding: 68px 0;
}

.hero-section {
  min-height: 84vh;
  display: grid;
  align-content: center;
  gap: 18px;
}

.eyebrow {
  margin: 0;
  color: var(--cyan);
  font-family: Orbitron, sans-serif;
  font-size: 0.82rem;
  letter-spacing: 0.19em;
}

.hero-title {
  margin: 0;
  font-family: Orbitron, sans-serif;
  font-size: clamp(2.5rem, 8.4vw, 6.1rem);
  line-height: 1.03;
  letter-spacing: 0.03em;
  text-shadow: 0 0 30px rgba(141, 75, 255, 0.35);
  position: relative;
}

.hero-title.glitch-active::before,
.hero-title.glitch-active::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-title.glitch-active::before {
  color: var(--cyan);
  transform: translateX(-3px);
  clip-path: polygon(0 0, 100% 0, 100% 48%, 0 48%);
}

.hero-title.glitch-active::after {
  color: #ff59ff;
  transform: translateX(3px);
  clip-path: polygon(0 52%, 100% 52%, 100% 100%, 0 100%);
}

.hero-subtitle,
.lead-copy,
p {
  margin: 0;
  max-width: 920px;
  color: var(--text-soft);
  font-size: 1.2rem;
  line-height: 1.6;
}

.lead-copy {
  font-size: 1.28rem;
}

.typing-line {
  border-right: 2px solid rgba(0, 245, 255, 0.75);
  width: fit-content;
}

h2 {
  margin: 0 0 16px;
  font-family: Orbitron, sans-serif;
  font-size: clamp(1.8rem, 4vw, 3rem);
  letter-spacing: 0.05em;
}

h3 {
  margin: 0;
  font-family: Orbitron, sans-serif;
  font-size: 1.2rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-block;
  text-decoration: none;
  color: var(--text-main);
  border: 1px solid rgba(141, 75, 255, 0.4);
  background: rgba(141, 75, 255, 0.14);
  border-radius: 10px;
  padding: 12px 18px;
  font-family: Orbitron, sans-serif;
  font-size: 0.77rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: all 0.25s ease;
}

.btn:hover {
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 0 18px rgba(0, 245, 255, 0.25);
}

.btn-primary {
  background: linear-gradient(130deg, rgba(0, 245, 255, 0.22), rgba(141, 75, 255, 0.32));
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.card {
  background: var(--glass);
  border: 1px solid rgba(141, 75, 255, 0.3);
  border-radius: 14px;
  padding: 18px;
  backdrop-filter: blur(10px);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.card:hover {
  transform: translateY(-5px);
  border-color: rgba(0, 245, 255, 0.72);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.4), 0 0 20px rgba(0, 245, 255, 0.14);
}

.avatar {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 10px;
  border: 2px solid rgba(0, 245, 255, 0.4);
}

.role {
  margin: 6px 0;
  color: var(--cyan);
  font-family: Orbitron, sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.minecraft-panel {
  max-width: 620px;
}

.mc-row {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid rgba(141, 75, 255, 0.25);
  padding: 10px 0;
}

.mc-row:last-child {
  border-bottom: 0;
}

.mc-label {
  color: #9ca6cc;
  font-family: Orbitron, sans-serif;
  letter-spacing: 0.06em;
}

.mc-value {
  color: var(--text-main);
  font-family: Orbitron, sans-serif;
}

.mc-value.online {
  color: #84ffe8;
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.stagger {
  opacity: 0;
  transform: translateY(20px);
}

.stagger.visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.site-footer {
  width: min(1140px, 92vw);
  margin: 14px auto 32px;
  padding: 18px;
  border-radius: 14px;
  border: 1px solid rgba(141, 75, 255, 0.18);
  border-top: 1px solid rgba(0, 245, 255, 0.32);
  background: rgba(10, 10, 14, 0.2);
  backdrop-filter: blur(12px);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 24px;
}

.footer-icon {
  width: 82px;
  height: 82px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  margin: 0 auto;
  background: rgba(141, 75, 255, 0.12);
  border: 1px solid rgba(141, 75, 255, 0.3);
  font-size: 1.55rem;
}

.footer-logo {
  width: 58px;
  height: 58px;
  object-fit: contain;
}

.footer-brand-col {
  text-align: center;
}

.footer-caption {
  margin-top: 10px;
  color: #9ea6c9;
  font-size: 0.92rem;
  font-family: Rajdhani, sans-serif;
  line-height: 1.5;
  text-align: center;
}

.footer-link-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.footer-link-col h4 {
  margin: 0 0 10px;
  font-family: Orbitron, sans-serif;
  letter-spacing: 0.05em;
}

.footer-link-col a {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: var(--text-main);
  margin-bottom: 10px;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid rgba(141, 75, 255, 0.32);
  background: rgba(141, 75, 255, 0.1);
  font-family: Orbitron, sans-serif;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: all 0.25s ease;
}

.footer-link-col a:hover {
  border-color: rgba(0, 245, 255, 0.55);
  box-shadow: 0 0 14px rgba(0, 245, 255, 0.18);
  transform: translateY(-1px);
}

.footer-bottom-row {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid rgba(141, 75, 255, 0.2);
}

.footer-main {
  text-align: center;
  font-family: Orbitron, sans-serif;
  letter-spacing: 0.1em;
  color: var(--text-main);
}

.footer-sub {
  text-align: center;
  color: #9ea6c9;
  font-size: 0.95rem;
  font-family: Rajdhani, sans-serif;
  line-height: 1.5;
}

/* Legal pages (no <main> wrapper): match hub body copy in Rajdhani */
body:not(:has(> main)) .section.hero .hero-copy,
body:not(:has(> main)) .section.reveal > p {
  font-family: Rajdhani, sans-serif;
  font-size: 1.2rem;
  line-height: 1.65;
  color: var(--text-soft);
  max-width: 920px;
}

body:not(:has(> main)) .section.hero .hero-copy.large-copy {
  font-size: 1.28rem;
}

@media (max-width: 980px) {
  .hamburger {
    display: block;
  }

  .nav-links {
    flex: 0 0 auto;
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    display: none;
    flex-direction: column;
    width: min(280px, 84vw);
    padding: 12px;
    border: 1px solid rgba(141, 75, 255, 0.3);
    border-radius: 12px;
    background: rgba(7, 7, 10, 0.9);
    backdrop-filter: blur(12px);
  }

  .nav-links.open {
    display: flex;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .hero-title {
    font-size: clamp(2.2rem, 13vw, 4rem);
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .site-footer {
    width: min(96vw, 560px);
    padding: 14px;
  }

  .footer-link-col {
    align-items: center;
  }
}

@keyframes floatGlow {
  from {
    transform: translate3d(-1.5%, -1%, 0) scale(1);
  }
  to {
    transform: translate3d(1.5%, 1%, 0) scale(1.04);
  }
}

/* Team carousel styles */
.staff-carousel {
  position: relative;
  margin-top: 18px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.team-viewport {
  flex: 1 1 auto;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid rgba(141,75,255,0.16);
  background: rgba(10,10,14,0.36);
}
.team-track {
  display: flex;
  transition: transform 0.6s cubic-bezier(.2,.9,.2,1);
  will-change: transform;
}
.team-slide {
  min-width: 100%;
  display: flex;
  gap: 12px;
  padding: 12px;
}
.team-item {
  flex: 1 1 calc((100% / 3) - 12px);
}
.team-arrow {
  border: 1px solid rgba(141, 75, 255, 0.35);
  background: linear-gradient(180deg, rgba(141,75,255,0.2), rgba(0,245,255,0.08));
  color: var(--text-main);
  width: 54px;
  height: 54px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 1.6rem;
  display: grid;
  place-items: center;
}

.team-item .card {
  height: 100%;
}

@media (max-width: 980px) {
  .team-item { flex-basis: calc((100% / 2) - 12px); }
}
