/* ===== Pixel preloader: CSS owns the timeout, so JS can never trap the page. ===== */
#preloader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: grid;
  place-items: center;
  background: #080405;
  pointer-events: none;
  animation: preloader-safe-hide 1.05s steps(1, end) forwards;
}

#preloader-wiper {
  position: relative;
  display: grid;
  place-items: center;
  width: 124px;
  height: 124px;
}

#preloader-panel {
  position: absolute;
  inset: 0;
  background: var(--surface) !important;
  border: 4px solid var(--red-600);
  box-shadow: 8px 8px 0 var(--black), inset 0 0 0 4px var(--red-950);
  clip-path: polygon(12px 0, calc(100% - 12px) 0, calc(100% - 12px) 4px, 100% 4px, 100% calc(100% - 12px), calc(100% - 4px) calc(100% - 12px), calc(100% - 4px) 100%, 12px 100%, 12px calc(100% - 4px), 0 calc(100% - 4px), 0 12px, 4px 12px, 4px 4px, 12px 4px);
}

#preloader-bird {
  position: relative;
  width: 76px;
  height: 76px;
  object-fit: contain;
  filter: drop-shadow(4px 4px 0 #33070c);
  animation: pixel-pop 0.75s steps(5, end) both;
}

#preloader.done {
  display: none;
}

/* ===== Navigation ===== */
.navbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 1000;
  height: var(--nav-height);
  background: rgba(9, 7, 8, 0.92);
  border-bottom: 4px solid var(--red-800);
  transition: background 160ms ease, box-shadow 160ms ease;
}

.navbar.scrolled {
  background: rgba(12, 7, 9, 0.98);
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.7);
}

.navbar .container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav-brand,
.footer-brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--cream);
  font-family: var(--font-display);
  font-size: 1.55rem;
  letter-spacing: 0.08em;
  text-shadow: 3px 3px 0 var(--red-900);
}

.nav-brand img,
.footer-brand-logo img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  filter: drop-shadow(3px 3px 0 #3b070e);
}

nav {
  position: relative;
  margin-left: auto;
  isolation: isolate;
}

.nav-links {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  isolation: isolate;
  contain: layout style;
}

.nav-links > li {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
}

.nav-highlight {
  position: absolute;
  z-index: 1;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  pointer-events: none;
  opacity: 0;
  background: var(--red-900);
  border: 2px solid var(--red-500);
  box-shadow: 4px 4px 0 var(--black);
  transform: translate3d(0, 0, 0);
  transition:
    transform 180ms cubic-bezier(.22,.72,.28,1),
    width 140ms cubic-bezier(.22,.72,.28,1),
    height 140ms cubic-bezier(.22,.72,.28,1),
    opacity 80ms linear;
  will-change: transform, width, height;
}

.nav-highlight.ready {
  opacity: 1;
}


.nav-link {
  position: relative;
  z-index: 2;
  display: block;
  padding: 10px 14px 8px;
  border: 2px solid transparent;
  color: var(--text-soft);
  font-family: var(--font-mono);
  font-size: 0.86rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color 90ms linear, text-shadow 100ms linear;
}

.nav-link:hover,
.nav-link:focus-visible {
  color: #fff;
  text-shadow: 2px 2px 0 var(--red-900);
}

.nav-link:focus-visible {
  outline: 2px solid var(--cream);
  outline-offset: 3px;
}

.nav-link.active {
  color: #fff;
}

.menu-btn {
  position: relative;
  display: none;
  width: 46px;
  height: 42px;
  padding: 0;
  border: 3px solid var(--red-600);
  background: var(--surface-2);
  box-shadow: 4px 4px 0 var(--black);
  cursor: pointer;
}

.menu-btn-burger,
.menu-btn-burger::before,
.menu-btn-burger::after {
  position: absolute;
  left: 8px;
  width: 24px;
  height: 4px;
  background: var(--cream);
  content: "";
  transition: transform 130ms ease, opacity 130ms ease, top 130ms ease;
}

.menu-btn-burger {
  top: 16px;
}

.menu-btn-burger::before {
  left: 0;
  top: -8px;
}

.menu-btn-burger::after {
  left: 0;
  top: 8px;
}

.menu-btn.open .menu-btn-burger {
  background: transparent;
}

.menu-btn.open .menu-btn-burger::before {
  top: 0;
  transform: rotate(45deg);
}

.menu-btn.open .menu-btn-burger::after {
  top: 0;
  transform: rotate(-45deg);
}

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 760px;
  padding: calc(var(--nav-height) + 96px) 0 90px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  opacity: 0.45;
}

.hero::before {
  width: 420px;
  height: 420px;
  top: 120px;
  right: -120px;
  border: 26px solid var(--red-950);
  box-shadow: inset 0 0 0 18px rgba(181, 34, 49, 0.12);
  transform: rotate(12deg);
}

.hero::after {
  left: -80px;
  bottom: 40px;
  width: 280px;
  height: 120px;
  background: repeating-linear-gradient(90deg, var(--red-900) 0 24px, transparent 24px 44px);
  transform: skewX(-18deg);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 410px);
  gap: 56px;
  align-items: center;
}

.hero-content {
  position: relative;
  min-width: 0;
  container-type: inline-size;
}

.hero-visual {
  position: relative;
  min-width: 0;
}

.hero-content::before {
  content: "WELCOME // 01";
  display: inline-block;
  margin-bottom: 18px;
  padding: 7px 10px;
  color: var(--red-300);
  background: var(--red-950);
  border: 2px solid var(--red-700);
  box-shadow: 4px 4px 0 var(--black);
  font: 900 0.72rem/1 var(--font-mono);
  letter-spacing: 0.12em;
}

.hero-title {
  margin-bottom: 24px;
  color: var(--cream);
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 5.8vw, 6rem);
  line-height: 0.98;
  letter-spacing: 0;
  max-width: 100%;
  text-transform: uppercase;
  text-shadow: 5px 5px 0 #3d080e, 9px 9px 0 var(--black);
}

@supports (font-size: 1cqi) {
  .hero-title {
    font-size: clamp(3.5rem, 11.2cqi, 6rem);
  }
}

.glow-text-primary {
  display: block;
  color: var(--red-400);
}

.hero-description {
  max-width: 700px;
  margin-bottom: 30px;
  color: var(--text-soft);
  font-size: clamp(1rem, 1.7vw, 1.12rem);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 12px 20px 10px;
  border: 3px solid;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 90ms ease, box-shadow 90ms ease, background 130ms ease;
}

.btn-primary {
  color: #fff;
  background: var(--red-600);
  border-color: var(--red-300);
  box-shadow: 0 7px 0 var(--red-950), 0 10px 0 var(--black);
}

.btn-primary:hover {
  background: var(--red-500);
  transform: translateY(-2px);
  box-shadow: 0 9px 0 var(--red-950), 0 12px 0 var(--black);
}

.btn-secondary {
  color: var(--cream);
  background: var(--surface-2);
  border-color: var(--line);
  box-shadow: 0 7px 0 var(--black);
}

.btn-secondary:hover {
  border-color: var(--red-500);
  background: var(--red-950);
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(5px);
  box-shadow: 0 2px 0 var(--black);
}

.btn-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

.btn-icon-back {
  width: 18px;
  height: 18px;
  transform: scaleX(-1);
}

.logo-glow-wrapper {
  display: grid;
  place-items: center;
  min-height: 440px;
}

.logo-frame {
  position: relative;
  width: min(100%, 410px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  background:
    linear-gradient(135deg, rgba(224,53,67,0.12), transparent 54%),
    var(--surface);
  border: 5px solid var(--red-600);
  box-shadow: 10px 10px 0 var(--black), inset 0 0 0 6px var(--red-950);
  clip-path: polygon(28px 0, calc(100% - 28px) 0, calc(100% - 28px) 8px, 100% 8px, 100% calc(100% - 28px), calc(100% - 8px) calc(100% - 28px), calc(100% - 8px) 100%, 28px 100%, 28px calc(100% - 8px), 0 calc(100% - 8px), 0 28px, 8px 28px, 8px 8px, 28px 8px);
}

.logo-frame::before,
.logo-frame::after {
  content: "";
  position: absolute;
  width: 44px;
  height: 16px;
  background: var(--red-500);
  box-shadow: 0 0 0 4px var(--black);
}

.logo-frame::before {
  top: 22px;
  left: 24px;
}

.logo-frame::after {
  right: 24px;
  bottom: 22px;
}

.logo-frame img {
  width: 74%;
  height: 74%;
  object-fit: contain;
  filter: drop-shadow(7px 7px 0 #3e080f);
}

/* ===== Badges and server panel ===== */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px 6px;
  color: var(--red-300);
  background: var(--red-950);
  border: 3px solid var(--red-700);
  box-shadow: 4px 4px 0 var(--black);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.featured-realm {
  position: relative;
  background: var(--surface);
  border: 4px solid var(--red-700);
  box-shadow: var(--shadow-panel), inset 0 0 0 4px var(--red-950);
  overflow: hidden;
}

.featured-realm::before {
  content: "SERVER // ONLINE CHECK";
  position: absolute;
  top: 0;
  right: 0;
  z-index: 3;
  padding: 7px 10px;
  color: var(--red-300);
  background: var(--red-950);
  border-left: 3px solid var(--red-700);
  border-bottom: 3px solid var(--red-700);
  font: 900 0.66rem/1 var(--font-mono);
  letter-spacing: 0.08em;
}

.featured-realm-grid {
  display: grid;
  grid-template-columns: minmax(300px, 0.9fr) minmax(0, 1.1fr);
  min-height: 520px;
}

.featured-realm-banner {
  position: relative;
  min-height: 100%;
  overflow: hidden;
  border-right: 4px solid var(--red-800);
}

.featured-realm-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(44,7,12,0.08), rgba(9,7,8,0.55)), repeating-linear-gradient(0deg, transparent 0 8px, rgba(224,53,67,0.04) 8px 10px);
  pointer-events: none;
}

.featured-realm-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.85) contrast(1.08) brightness(0.8);
}

.featured-realm-info {
  padding: 50px 42px 42px;
}

.featured-realm-info h3 {
  margin-bottom: 16px;
  color: var(--cream);
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.4rem);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-shadow: 4px 4px 0 var(--red-950);
}

.featured-realm-info > p {
  color: var(--text-soft);
}

.featured-realm-features {
  display: grid;
  gap: 10px;
  margin: 28px 0;
}

.realm-feature-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 13px;
  color: var(--text);
  background: var(--bg-soft);
  border: 2px solid var(--line);
  box-shadow: 3px 3px 0 var(--black);
  font-weight: 800;
}

.realm-feature-item svg {
  width: 20px;
  height: 20px;
  color: var(--red-400);
  flex: 0 0 auto;
}

.server-connection-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 28px;
}

.connection-card {
  padding: 12px;
  background: var(--surface-2);
  border: 3px solid var(--line);
  box-shadow: 5px 5px 0 var(--black);
}

.card-platform {
  margin-bottom: 8px;
  color: var(--red-300);
  font: 900 0.73rem/1 var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ip-copy-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  padding: 11px 10px;
  background: var(--bg);
  border: 2px solid var(--red-900);
  cursor: pointer;
  transition: border-color 100ms ease, transform 100ms ease, background 100ms ease;
}

.ip-copy-box:hover,
.ip-copy-box.copied {
  background: var(--red-950);
  border-color: var(--red-500);
  transform: translate(-1px, -1px);
}

.ip-copy-box.copy-error {
  border-color: var(--warning);
}

.ip-copy-text {
  min-width: 0;
}

.ip-copy-label,
.ip-copy-value {
  display: block;
}

.ip-copy-label {
  margin-bottom: 3px;
  color: var(--muted);
  font: 900 0.62rem/1 var(--font-mono);
  text-transform: uppercase;
}

.ip-copy-value {
  overflow: hidden;
  color: var(--cream);
  font: 900 0.8rem/1.2 var(--font-mono);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ip-copy-btn {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  padding: 0;
  flex: 0 0 auto;
  color: var(--red-300);
  background: var(--surface-2);
  border: 2px solid var(--red-800);
  cursor: pointer;
}

.ip-copy-btn svg {
  width: 18px;
  height: 18px;
}

.online-counter-widget {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 24px;
  padding: 10px 13px 8px;
  color: var(--text-soft);
  background: var(--bg);
  border: 3px solid var(--line);
  box-shadow: 4px 4px 0 var(--black);
  font: 900 0.76rem/1.2 var(--font-mono);
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.online-pulse-dot {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  background: var(--unknown);
  box-shadow: 2px 2px 0 var(--black);
}

.online-counter-widget.is-online {
  border-color: #356f44;
}

.online-counter-widget.is-online .online-pulse-dot {
  background: var(--success);
  animation: status-blink 1.4s steps(2, end) infinite;
}

.online-counter-widget.is-offline {
  border-color: var(--red-700);
  color: var(--red-300);
}

.online-counter-widget.is-offline .online-pulse-dot {
  background: var(--danger);
}

.online-counter-widget.is-unknown .online-pulse-dot,
.online-counter-widget.is-loading .online-pulse-dot {
  background: var(--unknown);
}

/* ===== Stats ===== */
.stats-section {
  background: rgba(16, 10, 12, 0.7);
}

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

.stat-item {
  position: relative;
  min-height: 190px;
  padding: 28px 22px;
  text-align: center;
  background: var(--surface);
  border: 4px solid var(--line);
  box-shadow: 6px 6px 0 var(--black);
  overflow: hidden;
}

.stat-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 54px;
  height: 8px;
  background: var(--red-500);
}

.stat-number {
  margin-bottom: 10px;
  color: var(--red-400);
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 6vw, 4.8rem);
  letter-spacing: 0.03em;
  text-shadow: 4px 4px 0 var(--red-950);
}

.stat-label {
  margin-bottom: 6px;
  color: var(--cream);
  font: 900 0.86rem/1.2 var(--font-mono);
  text-transform: uppercase;
}

.stat-description {
  color: var(--muted);
  font-size: 0.92rem;
}

/* ===== Team tree ===== */
.staff-tree {
  display: grid;
  gap: 54px;
  margin-bottom: 56px;
}

.tree-level {
  position: relative;
}

.tree-level-title {
  width: fit-content;
  margin: 0 auto 20px;
  padding: 8px 14px 6px;
  color: var(--cream);
  background: var(--red-950);
  border: 3px solid var(--red-700);
  box-shadow: 4px 4px 0 var(--black);
  font: 900 0.8rem/1 var(--font-mono);
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.tree-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
}

.staff-card {
  position: relative;
  width: 210px;
  min-height: 244px;
  padding: 24px 16px 18px;
  text-align: center;
  background: var(--surface);
  border: 4px solid var(--line);
  box-shadow: 6px 6px 0 var(--black);
  transition: transform 110ms ease, border-color 110ms ease, background 110ms ease;
}

.staff-card::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 8px;
  width: 18px;
  height: 8px;
  background: var(--rank-color, var(--red-500));
}

.staff-card:hover {
  transform: translate(-3px, -3px);
  border-color: var(--rank-color, var(--red-500));
  background: var(--surface-2);
}

.rank-world-leader { --rank-color: #ff4352; }
.rank-president { --rank-color: #ff6671; }
.rank-vice-president { --rank-color: #db3343; }
.rank-senator { --rank-color: #b72434; }
.rank-senior-citizen { --rank-color: #8f1d2a; }

.avatar-wrapper {
  position: relative;
  width: 112px;
  height: 112px;
  margin: 0 auto 18px;
  display: grid;
  place-items: center;
  background: var(--bg);
  border: 4px solid var(--rank-color, var(--red-500));
  box-shadow: 5px 5px 0 var(--black), inset 0 0 0 3px var(--red-950);
  overflow: hidden;
}

.avatar-glow {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(224, 53, 67, 0.18), transparent 62%);
  pointer-events: none;
}

.avatar-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: pixelated;
}

.avatar-question-css {
  color: var(--rank-color, var(--red-500));
  font-family: var(--font-display);
  font-size: 4.6rem;
  line-height: 1;
  text-shadow: 4px 4px 0 var(--red-950);
}

.staff-name {
  margin-bottom: 8px;
  color: var(--cream);
  font-family: var(--font-display);
  font-size: 1.45rem;
  letter-spacing: 0.035em;
  overflow-wrap: anywhere;
}

.staff-role {
  color: var(--rank-color, var(--red-400));
  font: 900 0.69rem/1.2 var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.team-back {
  text-align: center;
}

/* ===== Footer ===== */
.footer {
  position: relative;
  padding: 58px 0 26px;
  background: #070405;
  border-top: 4px solid var(--red-800);
}

.footer::before {
  content: "";
  position: absolute;
  top: 10px;
  left: 0;
  right: 0;
  height: 2px;
  background: repeating-linear-gradient(90deg, var(--red-900) 0 12px, transparent 12px 24px);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, minmax(120px, 0.7fr));
  gap: 34px;
  padding-bottom: 36px;
}

.footer-brand p {
  max-width: 360px;
  margin: 16px 0 0;
  color: var(--muted);
}

.footer-column h4 {
  margin-bottom: 14px;
  color: var(--red-300);
  font: 900 0.78rem/1 var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer-links {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-links li + li {
  margin-top: 9px;
}

.footer-links a {
  color: var(--text-soft);
}

.footer-links a:hover {
  color: var(--red-400);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 22px;
  border-top: 2px solid var(--line);
  color: var(--muted);
  font: 800 0.76rem/1.3 var(--font-mono);
}

.footer-socials a {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  color: var(--cream);
  background: var(--surface-2);
  border: 2px solid var(--red-800);
  box-shadow: 3px 3px 0 var(--black);
}

.footer-socials a:hover {
  color: #fff;
  background: var(--red-700);
}

.footer-socials svg {
  width: 20px;
  height: 20px;
}

/* Keep the hero title inside its own grid track so it never sits behind the identity card. */
@media (min-width: 961px) and (max-width: 1180px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr) minmax(340px, 390px);
    gap: 42px;
  }

  .hero-title {
    font-size: clamp(3.45rem, 5.6vw, 5.15rem);
  }

  @supports (font-size: 1cqi) {
    .hero-title {
      font-size: clamp(3.45rem, 10.7cqi, 5.15rem);
    }
  }
}

/* ===== Responsive ===== */
@media (max-width: 960px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 46px;
  }

  .hero-content {
    text-align: center;
  }

  .hero-content::before {
    margin-inline: auto;
  }

  .hero-description {
    margin-inline: auto;
  }

  .hero-cta {
    justify-content: center;
  }

  .logo-glow-wrapper {
    min-height: 330px;
  }

  .logo-frame {
    width: min(78vw, 360px);
  }

  .featured-realm-grid {
    grid-template-columns: 1fr;
  }

  .featured-realm-banner {
    min-height: 360px;
    border-right: 0;
    border-bottom: 4px solid var(--red-800);
  }

  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 820px) {
  nav {
    margin-left: 0;
  }

  .menu-btn {
    display: block;
    margin-left: auto;
  }

  .nav-links {
    position: fixed;
    top: var(--nav-height);
    left: 12px;
    right: 12px;
    display: none;
    padding: 12px;
    flex-direction: column;
    align-items: stretch;
    background: var(--surface);
    border: 4px solid var(--red-700);
    box-shadow: 7px 7px 0 var(--black);
  }

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

  .nav-highlight {
    display: none;
  }

  .nav-link {
    padding: 13px 14px;
  }

  .nav-link.active {
    background: var(--red-900);
    border-color: var(--red-500);
    box-shadow: 4px 4px 0 var(--black);
  }

  .hero {
    min-height: 0;
    padding-top: calc(var(--nav-height) + 64px);
  }

  .hero-title {
    font-size: clamp(3.5rem, 16vw, 6rem);
  }

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

  .stat-item {
    min-height: 155px;
  }
}

@media (max-width: 620px) {
  .featured-realm-info {
    padding: 38px 20px 28px;
  }

  .featured-realm::before {
    display: none;
  }

  .featured-realm-banner {
    min-height: 270px;
  }

  .server-connection-cards {
    grid-template-columns: 1fr;
  }

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

  .footer-brand {
    grid-column: 1 / -1;
  }

  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
  }

  .staff-card {
    width: min(100%, 260px);
  }
}

@media (max-width: 440px) {
  .nav-brand span {
    font-size: 1.25rem;
  }

  .nav-brand img {
    width: 36px;
    height: 36px;
  }

  .hero-title {
    font-size: 3.35rem;
  }

  .btn {
    width: 100%;
  }

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

/* ===== Live Discord team ===== */
.rank-executive-secretary { --rank-color: #ca2f40; }

.team-live-bar {
  width: fit-content;
  max-width: 100%;
  margin: -22px auto 30px;
  padding: 8px 12px 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: var(--muted);
  background: var(--surface);
  border: 3px solid var(--line);
  box-shadow: 4px 4px 0 var(--black);
  font: 900 0.68rem/1.2 var(--font-mono);
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.team-live-dot {
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  background: #6b7280;
  border: 2px solid var(--black);
  box-shadow: 2px 2px 0 var(--black);
}

.team-live-bar.is-live .team-live-dot { background: #4ade80; }
.team-live-bar.is-connecting .team-live-dot { background: #facc15; }
.team-live-bar.is-error .team-live-dot { background: #ef4444; }

.team-loading-card {
  width: min(100%, 520px);
  margin: 0 auto;
  padding: 22px 18px;
  color: var(--muted);
  text-align: center;
  background: var(--surface);
  border: 4px solid var(--line);
  box-shadow: 6px 6px 0 var(--black);
  font: 900 0.78rem/1.5 var(--font-mono);
  text-transform: uppercase;
}

.team-error-card {
  border-color: var(--red-700);
  color: var(--red-300);
}

.team-loading-pixel {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 8px;
  background: var(--red-500);
  box-shadow: 14px 0 0 var(--red-800), 28px 0 0 var(--red-950);
}

.presence-indicator {
  position: absolute;
  right: 6px;
  bottom: 6px;
  z-index: 3;
  width: 18px;
  height: 18px;
  border: 4px solid var(--bg);
  box-shadow: 2px 2px 0 var(--black);
}

.presence-online { background: #4ade80; }
.presence-idle { background: #facc15; }
.presence-dnd { background: #ef4444; }
.presence-offline { background: #6b7280; }

.staff-presence-text {
  margin-top: 8px;
  color: var(--muted);
  font: 800 0.58rem/1.2 var(--font-mono);
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.presence-text-online { color: #86efac; }
.presence-text-idle { color: #fde047; }
.presence-text-dnd { color: #f87171; }
.presence-text-offline { color: #9ca3af; }

.team-card-enter {
  animation: team-card-enter 180ms steps(2, end) both;
}

@keyframes team-card-enter {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .team-card-enter { animation: none; }
}
