:root {
  color-scheme: dark;
  --text: #f8f7f2;
  --muted: #cfc8bd;
  --panel: rgb(11 13 16 / 0.62);
  --panel-strong: rgb(11 13 16 / 0.78);
  --line: rgb(255 255 255 / 0.22);
  --accent: #f0b45b;
  --shadow: rgb(0 0 0 / 0.35);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background: #111418;
}

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

button {
  color: inherit;
  font: inherit;
}

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

.site-bg,
.bg-overlay {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
}

.site-bg {
  object-fit: cover;
  z-index: -2;
  background: #111418;
}

.bg-overlay {
  z-index: -1;
  background:
    linear-gradient(90deg, rgb(0 0 0 / 0.74), rgb(0 0 0 / 0.34) 58%, rgb(0 0 0 / 0.62)),
    linear-gradient(180deg, rgb(0 0 0 / 0.35), rgb(0 0 0 / 0.78));
}

.site-footer,
.site-main {
  width: min(1120px, calc(100% - 32px));
  margin-inline: auto;
}

.site-nav {
  position: fixed;
  top: 18px;
  right: max(16px, calc((100vw - 1120px) / 2));
  z-index: 2;
  display: flex;
  gap: 8px;
}

.site-nav button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 10px 14px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}

.nav-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.site-nav button:hover,
.site-nav button:focus-visible {
  border-color: var(--line);
  color: var(--text);
  background: rgb(255 255 255 / 0.08);
  outline: none;
}

.site-main {
  display: grid;
  gap: 28px;
  padding: 36px 0 42px;
}

.intro {
  max-width: 720px;
}

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

h1 {
  margin-bottom: 16px;
  font-size: clamp(4rem, 12vw, 8.75rem);
  line-height: 0.92;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 10px;
  font-size: 1.25rem;
  letter-spacing: 0;
}

.intro-copy {
  max-width: 580px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.25rem;
  line-height: 1.55;
}

.link-panel {
  width: min(100%, 860px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 24px 80px var(--shadow);
  backdrop-filter: blur(18px);
  padding: 24px;
}

.section-heading {
  margin-bottom: 18px;
}

.site-footer p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.6;
}

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

.link-card {
  --card-bg: var(--panel-strong);
  --card-bg-hover: rgb(22 25 29 / 0.84);
  --card-image: none;
  --card-image-position: center;
  --card-image-size: auto;
  --card-image-size-hover: var(--card-image-size);
  display: grid;
  align-content: space-between;
  min-height: 132px;
  padding: 18px;
  appearance: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    var(--card-image) var(--card-image-position) / var(--card-image-size) no-repeat,
    var(--card-bg);
  cursor: pointer;
  text-align: left;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.link-card:hover,
.link-card:focus-visible {
  border-color: rgb(240 180 91 / 0.82);
  background:
    var(--card-image) var(--card-image-position) / var(--card-image-size-hover) no-repeat,
    var(--card-bg-hover);
  outline: none;
  transform: translateY(-2px);
}

.link-card--logo {
  --card-image-size: min(84%, 208px);
  --card-image-size-hover: min(88%, 220px);
  overflow: hidden;
}

.link-card--cover {
  --card-image-size: 100%;
  --card-image-size-hover: 106%;
  overflow: hidden;
}

.link-card--strip {
  padding: 0;
  place-content: center;
}

.link-card--dbd {
  --card-bg: #000000;
  --card-bg-hover: var(--card-bg);
  --card-image: url("../images/card-dbd-sandbag-wars.webp");
  --card-image-size: min(58%, 150px);
  --card-image-size-hover: min(62%, 164px);
}

.link-strip {
  justify-self: stretch;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 4px;
  width: 100%;
  min-height: 64px;
  padding: 8px 18px;
  background: rgb(0 0 0 / 0.82);
  text-align: center;
}

.link-card--dbd .link-label,
.link-card--dbd .link-meta {
  font-family: "Roboto Condensed", "Arial Narrow", Arial, sans-serif;
  text-transform: uppercase;
}

.link-card--dbd .link-label {
  font-size: 1.08rem;
  font-weight: 800;
}

.link-card--dbd .link-meta {
  color: #f8f7f2;
  font-size: 0.84rem;
  font-weight: 500;
  letter-spacing: 0.07em;
}

.link-card--github {
  --card-bg: #ffffff;
  --card-bg-hover: var(--card-bg);
  --card-image: url("../images/card-github.webp");
}

.link-card--minecraft {
  --card-bg: #28421d;
  --card-bg-hover: #2f4d22;
  --card-image: url("../images/card-minecraft.webp");
}

.site-dialog {
  width: min(620px, calc(100% - 32px));
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: rgb(11 13 16 / 0.92);
  box-shadow: 0 24px 80px rgb(0 0 0 / 0.55);
  backdrop-filter: blur(18px);
}

.site-dialog::backdrop {
  background: rgb(0 0 0 / 0.58);
}

.dialog-hero {
  position: relative;
  min-height: 176px;
  background:
    linear-gradient(180deg, rgb(0 0 0 / 0.08), rgb(0 0 0 / 0.64)),
    url("../images/card-minecraft.webp") center / cover,
    #28421d;
}

.dialog-hero .dialog-close {
  position: absolute;
  top: 14px;
  right: 14px;
}

.dialog-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.dialog-titlebar h2 {
  margin-bottom: 0;
}

.dialog-close {
  min-height: 34px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgb(0 0 0 / 0.48);
  cursor: pointer;
}

.dialog-close:hover,
.dialog-close:focus-visible {
  background: rgb(255 255 255 / 0.14);
  outline: none;
}

.dialog-body {
  display: grid;
  gap: 18px;
  padding: 18px;
}

.server-card {
  padding: 18px;
  border: 1px solid rgb(143 224 210 / 0.34);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgb(143 224 210 / 0.12), rgb(240 180 91 / 0.08)),
    rgb(255 255 255 / 0.06);
}

.contact-card {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 18px;
  border: 1px solid rgb(240 180 91 / 0.36);
  border-radius: 8px;
  background: rgb(255 255 255 / 0.06);
}

.contact-card h3 {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.contact-card p {
  margin-bottom: 0;
  overflow-wrap: anywhere;
  font-size: clamp(1.25rem, 3vw, 1.6rem);
  font-weight: 800;
  line-height: 1.15;
}

.contact-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 10px 16px;
  border: 1px solid rgb(240 180 91 / 0.82);
  border-radius: 8px;
  color: #111418;
  background: var(--accent);
  font-weight: 800;
  line-height: 1.2;
}

.contact-action:hover,
.contact-action:focus-visible {
  background: #ffd08a;
  outline: none;
}

.server-card h3 {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.server-card p {
  margin-bottom: 0;
  overflow-wrap: anywhere;
  font-size: clamp(1.55rem, 4vw, 2.15rem);
  font-weight: 900;
  line-height: 1;
}

.link-label {
  font-size: 1.05rem;
  font-weight: 800;
}

.link-meta {
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.4;
}

.site-footer {
  padding: 0 0 24px;
}

@media (max-width: 720px) {
  .site-footer,
  .site-main {
    width: min(100% - 24px, 1120px);
  }

  .site-main {
    padding-top: 28px;
  }

  .site-nav {
    top: 12px;
    right: 12px;
  }

  .intro-copy {
    font-size: 1.05rem;
  }

  .section-heading {
    display: block;
  }

  .link-panel {
    padding: 18px;
  }

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

  .link-card {
    min-height: 104px;
  }

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

  .contact-action {
    width: 100%;
  }
}
