:root {
  color-scheme: dark;
  --ink: #f5fbff;
  --muted: #b8c9d6;
  --frost: #7cd9ff;
  --glacier: #1e8fbf;
  --night: #071019;
  --pine: #0e2d2f;
  --amber: #f0b35b;
  --line: rgba(194, 235, 255, 0.2);
  --panel: rgba(9, 23, 34, 0.78);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background: var(--night);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(18px, 4vw, 56px);
  background: linear-gradient(180deg, rgba(5, 13, 21, 0.86), rgba(5, 13, 21, 0));
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.brand-mark {
  display: block;
  width: 42px;
  aspect-ratio: 1;
  border: 1px solid rgba(124, 217, 255, 0.54);
  background: #071019;
  overflow: hidden;
  box-shadow: 0 0 22px rgba(124, 217, 255, 0.12);
}

.brand-mark img { display: block; width: 100%; height: 100%; object-fit: cover; }

nav {
  display: flex;
  gap: clamp(12px, 3vw, 28px);
  color: var(--muted);
  font-size: 0.94rem;
}

nav a:hover {
  color: var(--ink);
}

.mobile-nav-toggle {
  display: none;
}

.hero {
  position: relative;
  min-height: 92vh;
  display: grid;
  align-items: center;
  overflow: hidden;
  padding: 118px clamp(20px, 7vw, 86px) 54px;
}

.hero-image,
.hero-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-image {
  object-fit: cover;
  object-position: center;
}

.hero-overlay {
  background:
    linear-gradient(90deg, rgba(3, 9, 16, 0.9) 0%, rgba(3, 9, 16, 0.66) 38%, rgba(3, 9, 16, 0.22) 74%),
    linear-gradient(0deg, var(--night) 0%, rgba(7, 16, 25, 0.08) 42%),
    linear-gradient(180deg, rgba(7, 16, 25, 0.24), rgba(7, 16, 25, 0));
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 710px;
}

.eyebrow,
.section-kicker {
  margin: 0 0 12px;
  color: var(--frost);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 18px;
  font-size: clamp(4.8rem, 13vw, 10.4rem);
  line-height: 0.86;
  letter-spacing: 0;
  text-transform: uppercase;
  text-shadow: 0 0 34px rgba(124, 217, 255, 0.28);
}

h2 {
  margin-bottom: 12px;
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 1;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.25rem;
}

.hero-copy {
  max-width: 580px;
  color: var(--muted);
  font-size: clamp(1.06rem, 2vw, 1.28rem);
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-weight: 800;
}

.button.primary {
  background: var(--frost);
  color: #04111a;
}

.button.secondary {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.06);
}

.join-panel,
.section,
.split-section,
.fair-play-policy,
.listing,
.latest-update-section,
.updates-history-section,
.site-footer {
  width: min(1120px, calc(100% - 36px));
  margin-inline: auto;
}

.join-panel {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr minmax(260px, 390px);
  gap: 24px;
  align-items: center;
  margin-top: -42px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  backdrop-filter: blur(18px);
}

.join-panel h2 {
  font-size: clamp(1.7rem, 3vw, 2.5rem);
}

.ip-box {
  min-height: 84px;
  border: 1px solid rgba(124, 217, 255, 0.48);
  border-radius: 6px;
  background: rgba(124, 217, 255, 0.1);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  text-align: left;
  padding: 18px;
}

.ip-box span,
.ip-box small {
  display: block;
}

.ip-box span {
  overflow-wrap: anywhere;
  font-size: clamp(1.18rem, 3vw, 1.72rem);
  font-weight: 900;
}

.latest-update-section { padding-block: clamp(64px, 9vw, 100px); }
.updates-heading-row { display: flex; justify-content: space-between; align-items: end; gap: 22px; margin-bottom: 26px; }
.updates-heading-row h2 { margin-bottom: 0; font-size: clamp(2rem, 5vw, 4rem); }
.public-update { padding: clamp(24px, 5vw, 42px); border: 1px solid var(--line); border-radius: 8px; background: linear-gradient(145deg, rgba(16,72,92,.62), rgba(9,23,34,.95)); }
.public-update.featured-update, .public-update.newest { border-color: rgba(124,217,255,.38); box-shadow: 0 22px 70px rgba(0,0,0,.2); }
.public-update-meta { margin-bottom: 10px; color: var(--amber); font-size: .72rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.public-update > h2, .public-update > h3 { margin: 0 0 22px; color: var(--ink); font-size: clamp(1.55rem, 4vw, 2.7rem); line-height: 1.15; letter-spacing: -.04em; }
.public-update-body h2, .public-update-body h3, .public-update-body h4 { margin: 1.15em 0 .5em; color: var(--frost); line-height: 1.2; }
.public-update-body h2:first-child, .public-update-body h3:first-child, .public-update-body h4:first-child, .public-update-body p:first-child { margin-top: 0; }
.public-update-body p { margin: 0 0 .9em; color: var(--muted); font-size: 1rem; line-height: 1.75; }
.public-update-body ul, .public-update-body ol { margin: .4em 0 1em; padding-left: 24px; color: var(--muted); line-height: 1.75; }
.public-update-body strong { color: var(--ink); }
.public-update-body code { padding: 2px 6px; border: 1px solid rgba(124,217,255,.16); background: rgba(124,217,255,.08); color: var(--frost); }
.public-update-body blockquote { margin: 1em 0; padding: 12px 16px; border-left: 3px solid var(--amber); background: rgba(240,179,91,.06); color: #d7c6ac; }
.public-update-body hr { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }
.latest-update-body { position: relative; overflow: hidden; transition: max-height .55s cubic-bezier(.22,.75,.25,1); }
.latest-update-body.is-collapsed::after { content: ""; position: absolute; inset: auto 0 0; height: 96px; pointer-events: none; background: linear-gradient(to bottom, rgba(9,23,34,0), rgba(9,23,34,.98)); }
.latest-update-toggle { display: inline-flex; align-items: center; gap: 9px; min-height: 42px; margin-top: 18px; padding: 0 15px; border: 1px solid rgba(124,217,255,.42); border-radius: 5px; background: rgba(124,217,255,.08); color: var(--frost); cursor: pointer; font: inherit; font-size: .78rem; font-weight: 800; }
.latest-update-toggle[hidden] { display: none; }
.latest-update-toggle:hover { background: rgba(124,217,255,.14); }
.latest-update-toggle span { transition: transform .25s; }
.latest-update-toggle[aria-expanded="true"] span { transform: translateY(-2px); }
.updates-page { min-height: calc(100vh - 90px); padding-top: 138px; }
.updates-header { background: rgba(5,13,21,.95); }
.updates-history-section { padding-block: 48px 100px; }
.updates-hero-copy { max-width: 760px; margin-bottom: 36px; }
.updates-hero-copy h1 { margin: 0 0 18px; font-size: clamp(2.8rem, 8vw, 6.5rem); line-height: .95; letter-spacing: -.065em; }
.updates-hero-copy > p:last-child, .updates-loading, .updates-empty p { color: var(--muted); }
.updates-public-list { display: grid; gap: 18px; }
.updates-empty { padding: 34px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }

.ip-box small {
  color: var(--frost);
  font-weight: 800;
}

.section,
.split-section,
.listing {
  padding-block: clamp(64px, 10vw, 112px);
}

.section-heading {
  max-width: 680px;
  margin-bottom: 28px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.feature-card {
  min-height: 238px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(18, 47, 61, 0.82), rgba(8, 23, 34, 0.9));
}

.feature-icon {
  display: block;
  margin-bottom: 38px;
  color: var(--amber);
  font-weight: 900;
}

.feature-card p,
.split-section p,
.fair-play-policy p,
.listing p,
.join-panel p {
  color: var(--muted);
}

.fair-play-policy {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: clamp(24px, 5vw, 58px);
  align-items: center;
  margin-bottom: clamp(18px, 3vw, 36px);
  padding: clamp(28px, 5vw, 52px);
  border: 1px solid rgba(240, 179, 91, 0.42);
  border-radius: 8px;
  background:
    linear-gradient(120deg, rgba(240, 179, 91, 0.1), transparent 45%),
    rgba(9, 23, 34, 0.82);
}

.fair-play-policy h2 {
  margin: 0 0 14px;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1;
  letter-spacing: -0.055em;
}

.fair-play-policy p:last-child {
  margin-bottom: 0;
}

.fair-play-mark {
  display: grid;
  width: 128px;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid rgba(240, 179, 91, 0.5);
  border-radius: 50%;
  color: var(--amber);
  font-size: 2.1rem;
  font-weight: 900;
  box-shadow: inset 0 0 0 10px rgba(240, 179, 91, 0.04);
}

.about-copy p {
  max-width: 720px;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(300px, 1fr);
  gap: clamp(28px, 7vw, 88px);
  align-items: center;
  border-block: 1px solid var(--line);
}

.stat-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.stat-strip div {
  min-height: 132px;
  padding: 22px;
  background: rgba(7, 22, 32, 0.94);
}

.stat-strip strong,
.stat-strip span {
  display: block;
}

.stat-strip strong {
  margin-bottom: 8px;
  color: var(--frost);
  font-size: 1.2rem;
}

.stat-strip span {
  color: var(--muted);
}

.gallery {
  padding-top: clamp(56px, 9vw, 96px);
}

.gallery-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 16px;
}

.gallery-card {
  position: relative;
  min-height: 280px;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.gallery-card.wide {
  grid-row: span 2;
  min-height: 576px;
}

.gallery-card img {
  width: 100%;
  height: 100%;
  min-height: inherit;
  display: block;
  object-fit: cover;
}

.gallery-card figcaption {
  position: absolute;
  inset: auto 14px 14px;
  display: inline-flex;
  width: fit-content;
  max-width: calc(100% - 28px);
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  background: rgba(4, 14, 22, 0.72);
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 800;
  backdrop-filter: blur(12px);
}

.rules-section {
  width: min(1120px, calc(100% - 36px));
  margin-inline: auto;
  padding-block: clamp(64px, 10vw, 112px);
  border-top: 1px solid var(--line);
}

.credits-section {
  width: min(1120px, calc(100% - 36px));
  margin-inline: auto;
  padding-block: clamp(64px, 10vw, 112px);
  border-top: 1px solid var(--line);
}

.rules-intro {
  max-width: 760px;
  margin-bottom: 30px;
}

.rules-intro p:last-child,
.credits-intro p:last-child {
  color: var(--muted);
  font-size: 1.04rem;
}

.credits-intro {
  max-width: 720px;
  margin-bottom: 30px;
}

.rules-layout {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.rule-group {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(18, 47, 61, 0.64), rgba(8, 23, 34, 0.86));
}

.rule-group h3 {
  color: var(--frost);
}

.rule-group ul {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
}

.rule-group li + li {
  margin-top: 10px;
}

.rule-group li::marker {
  color: var(--amber);
}

.credits-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.credit-card {
  min-height: 168px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.credit-card.highlight {
  background: linear-gradient(180deg, rgba(30, 143, 191, 0.34), rgba(8, 23, 34, 0.9));
}

.credit-card span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.credit-card strong {
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: clamp(1.35rem, 3vw, 2rem);
}

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

.listing {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 34px;
  padding: 28px;
  border: 1px solid rgba(124, 217, 255, 0.32);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(16, 72, 92, 0.72), rgba(11, 27, 39, 0.94));
}

.listing > div {
  max-width: 680px;
}

.listing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 28px 0 42px;
  color: var(--muted);
  font-size: 0.92rem;
}

@media (max-width: 820px) {
  .join-panel,
  .split-section,
  .fair-play-policy,
  .listing,
  .site-footer {
    align-items: flex-start;
  }

  .site-header {
    position: fixed;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    background: linear-gradient(180deg, rgba(5, 13, 21, 0.97), rgba(5, 13, 21, 0.78));
  }

  .mobile-nav-toggle {
    display: grid;
    width: 46px;
    height: 46px;
    margin-left: auto;
    padding: 11px 10px;
    place-content: center;
    gap: 5px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(9, 23, 34, 0.84);
    color: var(--ink);
    cursor: pointer;
  }

  .mobile-nav-toggle span {
    display: block;
    width: 23px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    transition: transform 180ms ease, opacity 180ms ease;
  }

  .site-header.nav-open .mobile-nav-toggle span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .site-header.nav-open .mobile-nav-toggle span:nth-child(2) {
    opacity: 0;
  }

  .site-header.nav-open .mobile-nav-toggle span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .site-header nav {
    position: absolute;
    top: calc(100% + 6px);
    left: 18px;
    right: 18px;
    display: grid;
    gap: 3px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(5, 13, 21, 0.98);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.42);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-10px);
    transition: opacity 180ms ease, transform 180ms ease, visibility 180ms ease;
  }

  .site-header nav a {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 10px 13px;
    border-radius: 7px;
  }

  .site-header nav a:hover,
  .site-header nav a:focus-visible {
    background: rgba(124, 217, 255, 0.1);
  }

  .site-header.nav-open nav {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
  }

  .fair-play-mark {
    width: 92px;
  }

  .hero {
    min-height: 88vh;
    padding-top: 116px;
  }

  .hero-overlay {
    background:
      linear-gradient(90deg, rgba(3, 9, 16, 0.92), rgba(3, 9, 16, 0.42)),
      linear-gradient(0deg, var(--night) 0%, rgba(7, 16, 25, 0) 35%);
  }

  .join-panel,
  .split-section,
  .fair-play-policy,
  .listing,
  .site-footer {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .listing-actions {
    justify-content: flex-start;
  }

  .updates-heading-row { align-items: flex-start; flex-direction: column; }
  .updates-page { padding-top: 118px; }

  .feature-grid,
  .gallery-grid,
  .credits-grid,
  .rules-layout,
  .stat-strip {
    grid-template-columns: 1fr;
  }

  .gallery-card.wide {
    grid-row: auto;
    min-height: 280px;
  }
}

@media (max-width: 520px) {
  .site-header {
    padding-inline: 12px;
  }

  .site-header nav {
    left: 12px;
    right: 12px;
  }

  .brand-mark {
    width: 38px;
  }

  .hero,
  .join-panel,
  .split-section,
  .fair-play-policy,
  .features,
  .gallery-section,
  .rules-section,
  .credits-section,
  .latest-update-section,
  .listing,
  .updates-history-section,
  .site-footer {
    width: calc(100% - 24px);
  }

  .hero {
    width: 100%;
    min-height: 88svh;
    padding: 108px 18px 46px;
  }

  h1 {
    font-size: clamp(3rem, 17vw, 4.65rem);
    line-height: 0.95;
  }

  .hero-copy {
    font-size: 1rem;
  }

  .hero-actions,
  .listing-actions {
    width: 100%;
  }

  .button {
    width: 100%;
    min-height: 48px;
  }

  .join-panel,
  .split-section,
  .fair-play-policy,
  .listing {
    padding: 22px;
  }

  .join-panel {
    margin-top: -24px;
  }

  .server-ip {
    overflow-wrap: anywhere;
    font-size: clamp(1.18rem, 7vw, 1.6rem);
  }

  .fair-play-mark {
    width: 76px;
  }

  .feature-card,
  .rule-card,
  .credit-card,
  .public-update-card {
    padding: 20px;
  }

  .gallery-card,
  .gallery-card.wide {
    min-height: 230px;
  }

  .updates-page {
    padding-top: 104px;
  }

  .updates-hero-copy h1 {
    font-size: clamp(2.5rem, 13vw, 4rem);
  }

  .news-markdown,
  .public-update-card,
  .latest-update-card {
    overflow-wrap: anywhere;
  }

  .site-footer {
    padding-bottom: 30px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mobile-nav-toggle span,
  .site-header nav {
    transition: none;
  }
}
