:root {
  --bg: #0e1412;
  --bg-raise: #161d19;
  --line: rgba(232, 224, 208, 0.12);
  --text: #f4f0e6;
  --muted: #b7c0b4;
  --gold: #d7b483;
  --blue: #3c7dff;
  --blue-deep: #2f68d6;
  --serif: "Fraunces", "Palatino Linotype", Palatino, serif;
  --sans: "Outfit", "Segoe UI", sans-serif;
  --page: 1120px;
  --nav: 4.5rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.5;
}

img {
  display: block;
  max-width: 100%;
}

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

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -0.02em;
}

p {
  margin: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 5;
  background: var(--text);
  color: var(--bg);
  padding: 0.4rem 0.7rem;
}

.skip:focus {
  top: 0.5rem;
}

.brand-mark {
  width: auto;
  height: 2.4rem;
}

.footer .brand-mark {
  filter: grayscale(1);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.nav .brand {
  font-family: "Josefin Sans", "Segoe UI", sans-serif;
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0.2em;
}

.nav {
  position: sticky;
  top: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--nav);
  padding: 0.75rem 6vw;
  background: rgba(14, 20, 18, 0.88);
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(10px);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nav-links a:hover,
.section-head a:hover,
.footer a:hover {
  color: var(--gold);
}

.discord,
.footer-social a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.discord svg,
.footer-social svg,
.button svg {
  width: 1rem;
  height: 1rem;
  fill: currentColor;
}

.discord svg {
  width: 1.25rem;
  height: auto;
}

.nav-burger {
  display: none;
}

.hero {
  position: relative;
  min-height: calc(100svh - var(--nav));
  display: grid;
  align-items: end;
  overflow: hidden;
}

.hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(8, 12, 10, 0.62) 0%, rgba(8, 12, 10, 0.12) 52%, rgba(8, 12, 10, 0.08) 100%),
    linear-gradient(180deg, rgba(8, 12, 10, 0.08) 30%, rgba(8, 12, 10, 0.45) 100%);
}

.hero-copy {
  position: relative;
  z-index: 1;
  width: min(40rem, calc(100% - 12vw));
  margin: 0 6vw 8vh;
}

.hero h1 {
  margin: 0;
  font-size: clamp(3.4rem, 7vw, 5.6rem);
  line-height: 0.95;
}

.hero-copy p {
  max-width: 28rem;
  margin-top: 1rem;
  color: var(--text);
  font-size: 18px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.6rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 2.7rem;
  padding: 0.55rem 1.1rem;
  border-radius: 0.35rem;
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.button.primary {
  background: var(--blue);
  color: white;
}

.button.primary:hover {
  background: var(--blue-deep);
}

.button.ghost {
  background: rgba(8, 12, 10, 0.45);
  border-color: rgba(244, 240, 230, 0.45);
}

.button:focus-visible,
.nav a:focus-visible,
.section-head a:focus-visible,
.footer a:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.about,
.servers,
.features,
.gallery {
  width: min(var(--page), calc(100% - 12vw));
  margin: 0 auto;
  padding: 4.5rem 0;
  scroll-margin-top: var(--nav);
}

.about {
  text-align: center;
}

.about h2,
.features h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 2.7rem);
}

.features h2 {
  text-align: center;
}

.about p {
  max-width: 62rem;
  margin: 1rem auto 0;
  color: var(--muted);
  font-size: 18px;
}

.about-closer {
  color: var(--text);
  font-weight: 600;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.4rem;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
}

.section-head a {
  color: var(--gold);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.server-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.2rem;
}

.server-card {
  background: var(--bg-raise);
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  overflow: hidden;
}

.server-shot {
  position: relative;
}

.server-shot > img:first-child {
  width: 100%;
  height: 13.5rem;
  object-fit: cover;
  object-position: center 30%;
}

.server-badge {
  position: absolute;
  top: 0.65rem;
  left: 0.65rem;
  width: 56px;
  height: auto;
  border-radius: 0.3rem;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
}

.server-body {
  padding: 1.15rem 1.2rem 1.25rem;
}

.server-body h3 {
  margin: 0;
  font-size: 1.8rem;
}

.version {
  margin-left: auto;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.server-body > p {
  margin-top: 0.45rem;
  color: var(--muted);
  font-size: 18px;
}

.labels {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
  color: var(--gold);
  font-size: 0.82rem;
}

.labels li {
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.server-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.8rem;
  margin-top: 1.15rem;
}

.server-meta .button {
  white-space: nowrap;
}

.server-actions {
  display: flex;
  align-items: stretch;
  gap: 0.5rem;
  width: 100%;
}

.server-actions .button {
  flex: 1 1 0;
}

.server-actions .button.ghost {
  background: transparent;
}

.server-actions .button.ghost:hover {
  background: #080c0a;
}

.server-actions .button img {
  width: 1.05rem;
  height: auto;
}

.address {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  width: 100%;
  margin: 0;
  color: var(--text);
  font-size: 0.92rem;
  letter-spacing: 0.01em;
}

.features ul {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.6rem;
  margin: 1.8rem 0 0;
  padding: 0;
  list-style: none;
}

.features li {
  padding: 0.2rem 0.35rem;
}

.features img {
  width: 3rem;
  height: 3rem;
  object-fit: contain;
  image-rendering: pixelated;
}

.features .feature-skull {
  object-view-box: inset(39% 28% 12% 28%);
}

.features h3 {
  margin: 0.7rem 0 0.35rem;
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0;
}

.features p {
  color: var(--muted);
  font-size: 18px;
}

.gallery-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.7rem;
}

.gallery-row button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 0.45rem;
  background: none;
  cursor: zoom-in;
  overflow: hidden;
}

.gallery-row button:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.gallery-row img {
  width: 100%;
  height: 9.5rem;
  object-fit: cover;
  object-position: center 22%;
}

.lightbox {
  width: min(92vw, 1100px);
  max-height: none;
  margin: auto;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: visible;
}

.lightbox::backdrop {
  background: #080c0a;
}

.lightbox figure {
  margin: 0;
}

.lightbox img {
  width: 100%;
  max-height: 82vh;
  object-fit: contain;
  border-radius: 0.35rem;
  background: #000;
}

.lightbox figcaption {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  margin-top: 0.75rem;
  color: var(--text);
  font-size: 0.95rem;
  text-shadow: 0 1px 10px #000;
}

.lightbox-count {
  flex: none;
  margin-left: auto;
}

.lightbox-prev,
.lightbox-next,
.lightbox-close {
  position: fixed;
  display: grid;
  place-items: center;
  border: 0;
  background: rgba(14, 20, 18, 0.72);
  color: var(--text);
  cursor: pointer;
}

.lightbox-prev,
.lightbox-next {
  top: 50%;
  width: 3.2rem;
  height: 5rem;
  transform: translateY(-50%);
}

.lightbox-prev {
  left: 1rem;
}

.lightbox-next {
  right: 1rem;
}

.lightbox-close {
  top: 1rem;
  right: 1rem;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 50%;
}

.lightbox-prev svg,
.lightbox-next svg,
.lightbox-close svg {
  width: 1.6rem;
  height: 1.6rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.lightbox-prev:hover,
.lightbox-next:hover,
.lightbox-close:hover,
.lightbox-prev:focus-visible,
.lightbox-next:focus-visible,
.lightbox-close:focus-visible {
  background: rgba(215, 180, 131, 0.22);
  outline: none;
}

.footer {
  display: grid;
  grid-template-columns: 1.4fr auto auto;
  align-items: center;
  gap: 1.5rem;
  width: min(var(--page), calc(100% - 12vw));
  margin: 0 auto;
  padding: 2rem 0 2.4rem;
  border-top: 1px solid var(--line);
}

.footer .brand {
  letter-spacing: 0.2em;
}

.footer .brand span {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  font-family: "Josefin Sans", "Segoe UI", sans-serif;
  font-weight: 400;
}

.footer small {
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

.footer nav {
  display: flex;
  gap: 1.2rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.footer-social {
  display: flex;
  justify-content: flex-end;
  gap: 0.8rem;
}

.footer-social a {
  color: var(--muted);
}

@media (max-width: 980px) {
  .features ul {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.2rem;
  }

  .gallery-row {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 0.4rem;
  }

  .gallery-row button {
    flex: 0 0 16rem;
    scroll-snap-align: start;
  }

  .gallery-row img {
    height: 11rem;
  }
}

@media (max-width: 760px) {
  .nav-burger {
    display: block;
    width: 2.4rem;
    height: 2.4rem;
    border: 1px solid var(--line);
    border-radius: 0.35rem;
    background:
      linear-gradient(var(--text), var(--text)) center 0.7rem / 1rem 1.5px no-repeat,
      linear-gradient(var(--text), var(--text)) center / 1rem 1.5px no-repeat,
      linear-gradient(var(--text), var(--text)) center 1.55rem / 1rem 1.5px no-repeat;
    cursor: pointer;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
    padding: 0.6rem 6vw 1rem;
    background: rgba(14, 20, 18, 0.96);
    border-bottom: 1px solid var(--line);
  }

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

  .nav-links a {
    padding: 0.55rem 0;
  }

  .server-grid,
  .features ul,
  .footer {
    grid-template-columns: 1fr;
  }

  .server-meta {
    align-items: stretch;
    flex-direction: column;
  }

  .footer nav,
  .footer-social {
    justify-content: flex-start;
  }

  .hero-copy {
    margin-bottom: 6vh;
  }
}
