@font-face {
  font-family: "Minecraft Pixel";
  src: url("./assets/fonts/minecraftfont.ttf") format("truetype");
  font-display: swap;
}

:root {
  color-scheme: dark;
  --page: #080b0c;
  --paper: #15191a;
  --paper-2: #22292b;
  --ink: #f4f6ee;
  --muted: #aab4ad;
  --stone: #77827c;
  --stone-dark: #0f1314;
  --grass: #61a93f;
  --grass-dark: #8fd05b;
  --leaf: #77bd4e;
  --water: #4f91b8;
  --gold: #d39f37;
  --hero-yellow: #d9ff66;
  --redstone: #d15a4e;
  --border: #2b3432;
  --shadow: rgba(0, 0, 0, 0.5);
  --radius: 0;
  --max: 1180px;
  --header-h: 72px;
  font-family:
    "Minecraft Pixel", "Minecraft", "Minecraftia", "Pixelify Sans", "Silkscreen",
    "Courier New", ui-monospace, monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background:
    linear-gradient(180deg, rgba(97, 169, 63, 0.08), rgba(8, 11, 12, 0) 360px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px) 0 0 / 24px
      24px,
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px) 0 0 / 24px 24px,
    var(--page);
  color: var(--ink);
}

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  min-height: var(--header-h);
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 4px solid #1e2624;
  background: rgba(10, 12, 13, 0.94);
  padding: 10px clamp(12px, 3vw, 32px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  display: block;
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  background:
    linear-gradient(90deg, transparent 50%, rgba(0, 0, 0, 0.12) 50%) 0 0 / 18px
      18px,
    linear-gradient(var(--grass), var(--grass) 42%, #7b4e2d 42%, #7b4e2d 100%);
  box-shadow: 4px 4px 0 var(--border);
}

.brand strong,
.brand small {
  display: block;
  line-height: 1;
}

.brand strong {
  font-size: 1.05rem;
  letter-spacing: 0;
}

.brand small {
  margin-top: 4px;
  color: var(--grass-dark);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.main-nav {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  overflow: visible;
  scrollbar-width: none;
}

.main-nav::-webkit-scrollbar {
  display: none;
}

.nav-link,
.header-cta,
.button,
.filter-button,
.app-list a,
.text-link {
  min-height: 40px;
  border: 3px solid transparent;
  border-radius: var(--radius);
  font-weight: 850;
}

.nav-item {
  position: relative;
  flex: 0 0 auto;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  padding: 8px 9px;
  color: #e8eee8;
  font-size: 0.92rem;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link:focus-visible,
.nav-item.is-open > .nav-link {
  border-color: var(--border);
  background: var(--paper-2);
  color: var(--grass-dark);
}

.nav-menu {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 30;
  display: grid;
  min-width: 190px;
  max-width: min(280px, calc(100vw - 24px));
  gap: 4px;
  border: 3px solid var(--border);
  border-radius: var(--radius);
  background: var(--paper);
  padding: 8px;
  box-shadow: 6px 6px 0 var(--border);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
}

.nav-item.is-open .nav-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.nav-menu a {
  display: flex;
  min-height: 36px;
  align-items: center;
  border: 2px solid transparent;
  border-radius: 0;
  padding: 7px 9px;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 850;
  white-space: nowrap;
}

.nav-menu a:hover,
.nav-menu a:focus-visible {
  border-color: var(--border);
  background: var(--grass);
  color: #f8fff1;
  outline: 0;
}

.header-cta {
  display: inline-flex;
  align-items: center;
  border-color: var(--border);
  background: var(--grass);
  color: #f8fff1;
  padding: 9px 14px;
  box-shadow: 4px 4px 0 var(--border);
  white-space: nowrap;
}

.hero {
  position: relative;
  min-height: min(760px, calc(100vh - var(--header-h) - 40px));
  overflow: hidden;
  border-bottom: 4px solid var(--border);
  background: #070909;
}

.hero-media {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(7, 9, 9, 0.62), rgba(7, 9, 9, 0.18) 48%, rgba(7, 9, 9, 0.74)),
    linear-gradient(rgba(7, 9, 9, 0.24), rgba(7, 9, 9, 0.72)),
    url("./assets/images/background.png") center / cover;
  transform: scale(1.02);
}

.hero::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 96px;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.18) 50%, transparent 50%) 0 0 / 32px
      32px,
    #44301f;
  border-top: 4px solid var(--border);
  content: "";
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  width: min(var(--max), calc(100% - 32px));
  min-height: inherit;
  align-items: center;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: clamp(24px, 5vw, 72px);
  margin: 0 auto;
  padding: 80px 0 128px;
}

.hero-copy {
  max-width: 760px;
  color: #f7f7ef;
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.6);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--gold);
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: var(--hero-yellow);
  text-shadow: 3px 3px 0 var(--border);
}

.hero h1 {
  max-width: 860px;
  margin: 0;
  font-size: clamp(1.8rem, 3.25vw, 3.25rem);
  line-height: 1.08;
  letter-spacing: 0;
}

.hero-copy p:not(.eyebrow) {
  max-width: 680px;
  margin: 24px 0 0;
  font-size: clamp(0.82rem, 1.16vw, 1rem);
  font-weight: 720;
  line-height: 1.5;
}

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

.hero-search {
  display: grid;
  width: min(720px, 100%);
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
  border: 4px solid var(--border);
  border-radius: var(--radius);
  background: rgba(238, 242, 235, 0.96);
  padding: 8px;
  color: #111514;
  box-shadow: 6px 6px 0 var(--border);
  text-shadow: none;
}

.hero-search .search-icon {
  margin-left: 10px;
}

.hero-search input {
  min-width: 0;
  min-height: 48px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #111514;
  font-weight: 850;
}

.hero-search button {
  min-height: 48px;
  cursor: pointer;
  border: 3px solid var(--border);
  border-radius: var(--radius);
  background: var(--grass);
  padding: 0 18px;
  color: #f8fff1;
  font-weight: 950;
  box-shadow: 4px 4px 0 var(--border);
}

.hero-quick-links,
.hero-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  max-width: 760px;
  margin-top: 18px;
  text-shadow: none;
}

.hero-quick-links a,
.hero-tabs a {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  border: 3px solid var(--border);
  border-radius: var(--radius);
  padding: 7px 11px;
  font-size: 0.88rem;
  font-weight: 900;
  box-shadow: 4px 4px 0 var(--border);
}

.hero-quick-links a {
  background: var(--paper);
  color: var(--ink);
}

.hero-tabs a {
  background: var(--stone-dark);
  color: #f8fff1;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-color: var(--border);
  padding: 13px 18px;
  box-shadow: 5px 5px 0 var(--border);
}

.button-primary {
  background: var(--grass);
  color: #f8fff1;
}

.button-secondary {
  background: var(--paper);
  color: var(--ink);
  text-shadow: none;
}

.button-icon,
.search-icon,
.guide-icon {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid currentColor;
}

.download-icon {
  border-top: 0;
}

.download-icon::before {
  display: block;
  width: 8px;
  height: 8px;
  margin: -6px auto 0;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  content: "";
  transform: rotate(45deg);
}

.route-icon {
  position: relative;
}

.route-icon::after {
  position: absolute;
  inset: 4px;
  background: currentColor;
  content: "";
}

.hero-stats {
  display: grid;
  gap: 14px;
  margin: 0;
}

.hero-stats div {
  border: 4px solid var(--border);
  background: rgba(21, 25, 26, 0.92);
  padding: 18px;
  box-shadow: 6px 6px 0 var(--border);
}

.hero-stats dt {
  font-size: clamp(2rem, 4vw, 3.4rem);
  font-weight: 950;
  line-height: 1;
}

.hero-stats dd {
  margin: 8px 0 0;
  color: var(--muted);
  font-weight: 850;
  text-transform: uppercase;
}

.section {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  padding: clamp(48px, 8vw, 92px) 0;
}

.section-tight {
  padding: 28px 0 8px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 24px;
}

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

.section h2 {
  margin: 0;
  font-size: clamp(2rem, 4.8vw, 4.2rem);
  line-height: 0.96;
  letter-spacing: 0;
}

.section p {
  color: var(--muted);
}

.family-track {
  display: grid;
  grid-template-columns: repeat(8, minmax(118px, 1fr));
  gap: 10px;
}

.family-card {
  display: block;
  border: 3px solid var(--border);
  border-radius: var(--radius);
  background: var(--paper);
  padding: 14px;
  box-shadow: 4px 4px 0 var(--border);
}

.family-card strong,
.family-card span {
  display: block;
}

.family-card strong {
  font-size: 0.95rem;
}

.family-card span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 820;
}

.family-card em {
  display: block;
  margin-top: 12px;
  color: var(--grass-dark);
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 850;
  line-height: 1.25;
}

.catalog-tools {
  display: flex;
  justify-content: end;
}

.search-box {
  display: flex;
  min-width: min(340px, 100%);
  align-items: center;
  gap: 10px;
  border: 3px solid var(--border);
  border-radius: var(--radius);
  background: var(--paper);
  padding: 0 12px;
  box-shadow: 4px 4px 0 var(--border);
}

.search-icon {
  position: relative;
  width: 15px;
  height: 15px;
}

.search-icon::after {
  position: absolute;
  right: -8px;
  bottom: -7px;
  width: 8px;
  height: 3px;
  background: currentColor;
  content: "";
  transform: rotate(45deg);
}

.search-box input {
  width: 100%;
  min-height: 46px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-weight: 780;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}

.filter-button {
  cursor: pointer;
  border-color: var(--border);
  background: var(--paper);
  padding: 8px 13px;
  color: var(--ink);
}

.filter-button[aria-pressed="true"] {
  background: var(--grass);
  color: #f8fff1;
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.content-card {
  overflow: hidden;
  border: 4px solid var(--border);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: 6px 6px 0 var(--border);
}

.content-card img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  border-bottom: 4px solid var(--border);
  object-fit: cover;
}

.card-body {
  padding: 15px;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 12px;
}

.badge {
  border: 2px solid var(--border);
  border-radius: 0;
  background: var(--paper-2);
  padding: 4px 7px;
  color: var(--ink);
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
}

.badge.type-mods,
.badge.type-maps {
  background: #22351f;
  color: #c9f4a2;
}

.badge.type-textures {
  background: #1d3340;
  color: #b9e7f5;
}

.badge.type-servers {
  background: #422820;
  color: #ffd0c3;
}

.content-card h3 {
  min-height: 3.2em;
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.08;
}

.card-body p {
  min-height: 3.6em;
  margin: 10px 0 16px;
  font-size: 0.92rem;
  line-height: 1.35;
}

.card-link {
  display: inline-flex;
  width: 100%;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border: 3px solid var(--border);
  border-radius: var(--radius);
  background: var(--grass);
  color: #f8fff1;
  font-weight: 900;
}

.guide-section {
  border-top: 4px solid var(--border);
}

.guide-grid,
.install-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.guide-grid article,
.install-grid article,
.app-panel {
  border: 4px solid var(--border);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: 6px 6px 0 var(--border);
}

.guide-grid article {
  padding: 18px;
}

.guide-icon {
  width: 32px;
  height: 32px;
  margin-bottom: 18px;
}

.item-icon {
  background: var(--gold);
}

.block-icon {
  background: var(--stone);
}

.biome-icon {
  background: var(--grass);
}

.mob-icon {
  background: var(--redstone);
}

.guide-grid h3,
.install-grid h3 {
  margin: 0;
  font-size: 1.18rem;
}

.guide-grid p,
.install-grid p {
  margin: 10px 0 0;
  line-height: 1.45;
}

.text-link {
  display: inline-flex;
  align-items: center;
  color: var(--grass-dark);
  text-decoration: underline;
  text-decoration-thickness: 3px;
  text-underline-offset: 5px;
}

.apps-section {
  padding-top: 24px;
}

.app-panel {
  display: grid;
  align-items: center;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 430px);
  gap: 24px;
  padding: clamp(22px, 5vw, 42px);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px) 0 0 /
      20px 20px,
    var(--paper);
}

.app-panel h2 {
  font-size: clamp(1.9rem, 4vw, 3.4rem);
}

.app-panel p {
  max-width: 640px;
  margin-bottom: 0;
  font-weight: 720;
  line-height: 1.5;
}

.app-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.app-list a {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: center;
  border-color: var(--border);
  background: #263d20;
  padding: 11px;
  color: #f8fff1;
  box-shadow: 4px 4px 0 var(--border);
  text-align: center;
}

.install-grid article {
  padding: 18px;
}

.step {
  display: inline-flex;
  width: 44px;
  height: 36px;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  border: 3px solid var(--border);
  background: var(--stone-dark);
  color: #f8fff1;
  font-size: 0.88rem;
  font-weight: 950;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-top: 4px solid var(--border);
  background: var(--stone-dark);
  padding: 24px clamp(16px, 4vw, 42px);
  color: #f8fff1;
}

.site-footer p {
  max-width: 720px;
  margin: 0;
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1.4;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-weight: 850;
}

.empty-state {
  grid-column: 1 / -1;
  border: 4px dashed var(--border);
  border-radius: var(--radius);
  background: var(--paper);
  padding: 24px;
  color: var(--muted);
  font-weight: 800;
}

.latest-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
}

.latest-card {
  display: grid;
  min-width: 0;
  border: 3px solid var(--border);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: 4px 4px 0 var(--border);
  overflow: hidden;
}

.latest-card img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-bottom: 3px solid var(--border);
  background: var(--paper-2);
  object-fit: cover;
}

.latest-card span,
.latest-card strong,
.latest-card small {
  display: block;
  padding-right: 12px;
  padding-left: 12px;
}

.latest-card span {
  padding-top: 12px;
  color: var(--grass-dark);
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
}

.latest-card strong {
  min-height: 3.2em;
  padding-top: 6px;
  font-size: 0.95rem;
  line-height: 1.08;
}

.latest-card small {
  padding-top: 8px;
  padding-bottom: 14px;
  color: var(--muted);
  font-weight: 800;
  line-height: 1.25;
}

.version-panel {
  display: grid;
  align-items: center;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 460px);
  gap: 24px;
  border: 4px solid var(--border);
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px) 0 0 /
      20px 20px,
    var(--paper);
  padding: clamp(22px, 5vw, 42px);
  box-shadow: 6px 6px 0 var(--border);
}

.version-panel h2 {
  font-size: clamp(1.9rem, 4vw, 3.4rem);
}

.version-panel p {
  max-width: 620px;
  margin-bottom: 0;
  font-weight: 720;
  line-height: 1.5;
}

.version-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.version-list a {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  border: 3px solid var(--border);
  border-radius: var(--radius);
  background: var(--water);
  padding: 10px 13px;
  color: #f8fff1;
  font-weight: 950;
  box-shadow: 4px 4px 0 var(--border);
}

@media (max-width: 1080px) {
  .family-track,
  .content-grid,
  .latest-grid,
  .guide-grid,
  .install-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .hero-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  :root {
    --header-h: 64px;
  }

  .site-header {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 12px;
  }

  .brand {
    order: 1;
  }

  .main-nav {
    order: 3;
    flex: 0 0 100%;
    width: 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
    overflow-x: visible;
    padding-bottom: 0;
  }

  .nav-link {
    min-height: 34px;
    padding: 6px 8px;
    font-size: 0.88rem;
  }

  .nav-menu {
    min-width: 168px;
  }

  .header-cta {
    order: 2;
    margin-left: auto;
  }

  .hero {
    min-height: 680px;
  }

  .hero-grid {
    padding-top: 48px;
  }

  .hero h1 {
    font-size: clamp(1.55rem, 7vw, 2.25rem);
  }

  .hero-search {
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 8px;
  }

  .hero-search button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .hero-search input {
    min-height: 42px;
    text-overflow: ellipsis;
  }

  .hero-search .search-icon {
    margin-left: 2px;
  }

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

  .section-heading,
  .app-panel,
  .version-panel,
  .site-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .section-heading,
  .app-panel,
  .version-panel {
    display: flex;
  }

  .catalog-tools,
  .search-box {
    width: 100%;
  }

  .family-track,
  .content-grid,
  .latest-grid,
  .guide-grid,
  .install-grid {
    grid-template-columns: 1fr;
  }

  .content-card h3,
  .card-body p {
    min-height: 0;
  }

  .app-list {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
