:root {
  color-scheme: dark;
  --back: #101410;
  --panel: #1a2119;
  --line: #30392c;
  --text: #f4f4ed;
  --muted: #b7beb1;
  --gold: #ffc345;
  --prism: #c1ef72;
  --modrinth: #a3dcfa;
  font-family: "Segoe UI", system-ui, sans-serif;
  background: var(--back);
  color: var(--text);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; }
a { color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
.wrap { width: min(1160px, calc(100% - 64px)); margin-inline: auto; }

.top { display: flex; align-items: center; justify-content: space-between; min-height: 76px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-size: .88rem; font-weight: 800; letter-spacing: .11em; }
.brand img { object-fit: contain; }
.nav-link { text-decoration: none; color: var(--muted); font-size: .9rem; font-weight: 650; }
.nav-link:hover, .guide-links a:not(.download):hover { color: var(--gold); }

.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: clamp(370px, 39vw, 452px);
  overflow: hidden;
  border: 1px solid #414832;
  border-radius: 24px;
  background: #242d1f url("./assets/nest-valley.webp") center 51% / cover no-repeat;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, #10180df2 0%, #10180dcf 24%, #10180d69 53%, #10180d0c 90%);
}
.hero-copy { padding: 44px clamp(24px, 6.1vw, 80px); }
.platform { display: flex; align-items: center; gap: 7px; margin: 0 0 14px; color: #e5e8d9; font-size: .84rem; font-weight: 780; letter-spacing: .09em; }
.platform i { display: inline-block; width: 9px; height: 9px; margin-right: 5px; transform: rotate(45deg); background: var(--gold); }
.platform b { font-weight: 500; color: #a2a98f; margin-inline: 2px; }
h1, h2, h3, p { margin: 0; }
h1, h2, .edition h3 { font-family: "Arial Black", "Segoe UI Black", system-ui, sans-serif; font-weight: 900; }
h1 { font-size: clamp(3.65rem, 7vw, 6.35rem); line-height: .91; letter-spacing: -.075em; }
h1 em { color: var(--gold); font-style: normal; }
.intro { max-width: 34ch; margin: 21px 0 24px; font-size: 1.05rem; line-height: 1.56; color: #e0e4d8; }
.hero-link { display: inline-flex; align-items: center; min-height: 46px; padding-inline: 19px; border-radius: 8px; color: #201604; background: var(--gold); text-decoration: none; font-weight: 800; }
.hero-link:hover { background: #ffd673; }

.downloads { padding-top: 34px; scroll-margin-top: 12px; }
.section-heading { margin-bottom: 18px; }
.section-heading h2 { margin-bottom: 4px; font-size: clamp(1.65rem, 3.7vw, 2.2rem); letter-spacing: -.045em; }
.section-heading p, .edition p, .update-note p { color: var(--muted); line-height: 1.5; }
.editions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.edition { display: flex; flex-direction: column; gap: 8px; min-width: 0; min-height: 206px; padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: linear-gradient(145deg, #20291c, var(--panel) 75%); }
.edition h3 { font-size: 1.27rem; letter-spacing: -.03em; }
.edition p { margin-bottom: 8px; }
.buttons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: auto; }
.download { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 6px 8px; border-radius: 7px; color: #152119; font-size: .94rem; font-weight: 820; text-decoration: none; transition: filter .15s, transform .15s; }
.download:hover { filter: brightness(1.12); transform: translateY(-1px); }
.prism { background: var(--prism); }
.modrinth { background: var(--modrinth); }
.download-icon { position: relative; width: 13px; height: 13px; flex: none; border-bottom: 1.6px solid currentColor; }
.download-icon::before { position: absolute; left: 6px; top: 0; content: ""; height: 8px; border-left: 1.6px solid currentColor; }
.download-icon::after { position: absolute; left: 4px; top: 4px; content: ""; width: 6px; height: 6px; border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor; transform: rotate(45deg); }

.edition-glyph { display: grid; place-items: center; position: relative; width: 43px; height: 43px; margin-bottom: 4px; border: 1px solid #49513b; border-radius: 9px; background: #2c3524; color: var(--gold); }
.edition-glyph i { display: block; position: absolute; }
.plain i { width: 16px; height: 16px; border: 2px solid currentColor; transform: rotate(45deg) skew(-8deg, -8deg) scaleY(.73); }
.plain i:nth-child(1) { top: 7px; }
.plain i:nth-child(2) { top: 12px; clip-path: inset(36% 0 0); }
.plain i:nth-child(3) { top: 17px; clip-path: inset(36% 0 0); }
.voxy i { width: 7px; height: 7px; background: currentColor; border-radius: 1px; }
.voxy i:nth-child(1) { translate: -7px 5px; }
.voxy i:nth-child(2) { translate: 2px -4px; }
.voxy i:nth-child(3) { translate: 7px 5px; opacity: .55; }
.distant i { width: 17px; height: 17px; border: 2px solid currentColor; transform: rotate(45deg); clip-path: inset(0 42% 42% 0); translate: -3px 6px; }
.distant i:nth-child(2) { translate: 5px 8px; opacity: .65; }
.distant i:nth-child(3) { width: 4px; height: 4px; border: 0; background: currentColor; border-radius: 50%; transform: none; clip-path: none; translate: 6px -7px; }

.update-note { display: flex; align-items: flex-start; gap: 11px; margin-top: 18px; padding: 13px 16px; border: 1px solid var(--line); border-radius: 9px; background: #171d15; }
.update-note h3 { margin-bottom: 3px; font-size: .94rem; }
.update-note p { font-size: .89rem; }
.update-icon { display: grid; place-items: center; width: 28px; height: 28px; flex: none; border-radius: 7px; color: var(--gold); background: #2c3524; font-size: 1.25rem; line-height: 1; }
.footer { display: flex; justify-content: space-between; gap: 12px; padding-block: 25px; color: var(--muted); font-size: .86rem; }

.guide { width: min(700px, calc(100% - 28px)); padding: 20px; color: var(--text); background: #1a2119; border: 1px solid #47563b; border-radius: 16px; box-shadow: 0 16px 65px #000a; }
.guide::backdrop { background: #050805c4; backdrop-filter: blur(4px); }
.guide-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.guide-head img { flex: none; }
.guide-head h2 { font-size: clamp(1.25rem, 4vw, 1.65rem); letter-spacing: -.03em; }
#guide-edition { color: var(--gold); font-size: .86rem; font-weight: 750; }
.guide-close { display: grid; place-items: center; align-self: flex-start; width: 36px; height: 36px; margin-left: auto; flex: none; border: 1px solid var(--line); border-radius: 8px; background: #252f21; color: var(--text); font: inherit; font-size: 1.5rem; line-height: 1; cursor: pointer; }
.guide-close:hover { background: #424e37; }
.guide-media { display: block; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; }
.guide-media img { display: block; width: 100%; height: auto; }
#guide-summary { margin-top: 12px; color: var(--muted); line-height: 1.55; }
.guide-links { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 17px; margin-top: 13px; font-size: .92rem; }
.guide-links .download { padding-inline: 12px; }

@media (max-width: 880px) {
  .edition { padding: 16px; }
  .buttons { grid-template-columns: 1fr; }
}

@media (max-width: 650px) {
  .wrap { width: calc(100% - 30px); }
  .top { min-height: 62px; }
  .hero { border-radius: 16px; background-position: 63% center; }
  .hero::before { background: linear-gradient(90deg, #10180dec, #10180d79 80%); }
  .editions { grid-template-columns: 1fr; gap: 10px; }
  .edition { min-height: 0; }
  .buttons { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer { flex-wrap: wrap; }
  .guide { padding: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
