/* Epic Craft — landing page
   Palette taken from the logo (diamond, crimson outline, navy) and the
   banner (night forest moss, bark). */
:root {
  --moss-950: #0f1610;
  --moss-900: #141e15;
  --moss-800: #1c2a1d;
  --moss-700: #2a3b2a;
  --bark: #7a5246;
  --bone: #ebe8d8;
  --bone-dim: #b9b8a6;
  --diamond: #62e0d3;
  --diamond-deep: #2fb3a6;
  --crimson: #c4313b;
  --navy: #2b2f8c;

  /* Minecraft GUI */
  --gui-panel: #c6c6c6;
  --gui-slot: #8b8b8b;
  --gui-dark: #373737;
  --gui-light: #ffffff;
  --gui-text: #3f3f3f;

  --font-display: "Pixelify Sans", "Courier New", monospace;
  --font-body: "Rubik", system-ui, -apple-system, "Segoe UI", sans-serif;

  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 40px);
  --notch: 6px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 72px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--moss-950);
  color: var(--bone);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--diamond); }
a:hover { color: var(--bone); }
code {
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 0.9em;
  background: var(--moss-800);
  padding: 0.1em 0.35em;
  border-radius: 3px;
}

:focus-visible {
  outline: 3px solid var(--diamond);
  outline-offset: 3px;
}

.skip {
  position: absolute; left: -999px; top: 8px;
  background: var(--diamond); color: var(--moss-950);
  padding: 8px 14px; z-index: 100; font-weight: 600;
}
.skip:focus { left: 8px; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  margin: 0;
  text-wrap: balance;
}
h2 { font-size: clamp(2rem, 4.5vw, 3rem); }
h3 { font-size: 1.5rem; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 10px var(--gutter);
  background: rgba(15, 22, 16, 0.88);
  backdrop-filter: blur(8px);
  border-bottom: 2px solid var(--moss-800);
}
.brand {
  display: flex; align-items: center; gap: 10px;
  color: var(--bone); text-decoration: none;
  font-family: var(--font-display); font-weight: 700; font-size: 1.25rem;
}
.topbar nav { display: flex; align-items: center; gap: clamp(10px, 2.5vw, 28px); }
.topbar nav a {
  color: var(--bone-dim); text-decoration: none; font-weight: 500; font-size: 0.975rem;
}
.topbar nav a:hover { color: var(--bone); }
.topbar nav a.nav-cta {
  color: var(--moss-950); background: var(--diamond);
  padding: 6px 14px; font-weight: 600;
  clip-path: polygon(var(--notch) 0, calc(100% - var(--notch)) 0, 100% var(--notch), 100% calc(100% - var(--notch)), calc(100% - var(--notch)) 100%, var(--notch) 100%, 0 calc(100% - var(--notch)), 0 var(--notch));
}
.topbar nav a.nav-cta:hover { background: var(--bone); }
@media (max-width: 560px) {
  .brand span { display: none; }
  .topbar nav a:not(.nav-cta):nth-child(2) { display: none; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 24px;
  font-weight: 600; font-size: 1.05rem; text-decoration: none;
  clip-path: polygon(var(--notch) 0, calc(100% - var(--notch)) 0, 100% var(--notch), 100% calc(100% - var(--notch)), calc(100% - var(--notch)) 100%, var(--notch) 100%, 0 calc(100% - var(--notch)), 0 var(--notch));
}
.btn-primary { background: var(--diamond); color: var(--moss-950); }
.btn-primary:hover { background: var(--bone); color: var(--moss-950); }
.btn-primary .version {
  font-family: var(--font-display); font-weight: 500;
  background: rgba(15, 22, 16, 0.14); padding: 1px 8px;
}
.btn-ghost {
  color: var(--bone);
  background: rgba(235, 232, 216, 0.08);
  box-shadow: inset 0 0 0 2px rgba(235, 232, 216, 0.35);
}
.btn-ghost:hover { background: rgba(235, 232, 216, 0.16); color: var(--bone); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: min(88vh, 820px);
  display: flex; align-items: center;
  background:
    linear-gradient(180deg, rgba(15,22,16,0.35) 0%, rgba(15,22,16,0.55) 55%, var(--moss-950) 100%),
    url("res/img/banner.png") center 40% / cover no-repeat;
  padding: 48px 0 72px;
}
.hero-inner {
  width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  align-items: center; gap: clamp(24px, 5vw, 64px);
}
.hero-logo {
  width: 100%; max-width: 520px; height: auto; justify-self: center;
  filter: drop-shadow(0 18px 40px rgba(0,0,0,0.6));
  animation: drop-in 700ms cubic-bezier(.2,.9,.3,1.2) both;
}
@keyframes drop-in {
  from { transform: translateY(-24px) scale(0.96); opacity: 0; }
  to { transform: none; opacity: 1; }
}
@media (prefers-reduced-motion: reduce) { .hero-logo { animation: none; } }

.hero h1 {
  font-size: clamp(2.1rem, 4.6vw, 3.6rem);
  text-shadow: 0 3px 0 rgba(0,0,0,0.45);
}
.lede {
  font-size: 1.15rem; color: var(--bone); max-width: 52ch;
  margin: 20px 0 28px;
  text-shadow: 0 1px 8px rgba(0,0,0,0.7);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.req { margin: 18px 0 0; color: var(--bone-dim); font-size: 0.95rem; }

@media (max-width: 820px) {
  .hero { min-height: 0; padding-top: 32px; }
  .hero-inner { grid-template-columns: 1fr; text-align: left; }
  .hero-logo { max-width: 340px; }
}

/* ---------- Bands ---------- */
.band { padding: clamp(64px, 9vw, 112px) 0; }
.band-dark { background: var(--moss-900); border-block: 2px solid var(--moss-800); }
.section-lede { color: var(--bone-dim); max-width: 60ch; margin: 12px 0 40px; }

/* ---------- Arsenal: Minecraft inventory ---------- */
.arsenal {
  display: grid;
  grid-template-columns: auto minmax(260px, 1fr);
  gap: clamp(20px, 3vw, 40px);
  align-items: start;
}
.gui {
  --s: clamp(34px, 5.4vw, 54px); /* slot size */
  background: var(--gui-panel);
  padding: 14px 16px 18px;
  border: 3px solid #000;
  box-shadow: inset 4px 4px 0 var(--gui-light), inset -4px -4px 0 #555;
  border-radius: 6px;
  width: max-content; max-width: 100%;
}
.gui-title {
  margin: 0 0 8px 2px;
  font-family: var(--font-display); font-weight: 500;
  color: var(--gui-text); font-size: 1.05rem;
}
.slots {
  display: grid;
  grid-template-columns: repeat(9, var(--s));
}
.slot {
  width: var(--s); height: var(--s);
  padding: 0; margin: 0;
  display: grid; place-items: center;
  background: var(--gui-slot);
  border: 0;
  box-shadow: inset 2px 2px 0 var(--gui-dark), inset -2px -2px 0 var(--gui-light);
  cursor: pointer;
  position: relative;
}
.slot img {
  width: 72%; height: 72%;
  image-rendering: pixelated;
  object-fit: contain;
}
.slot:hover::after, .slot.is-active::after {
  content: ""; position: absolute; inset: 2px;
  background: rgba(255,255,255,0.45);
}
.slot:focus-visible { outline: 3px solid var(--navy); outline-offset: -3px; z-index: 1; }
.slot-empty { cursor: default; }

/* Tooltip, styled after the in-game one */
.tooltip {
  background: rgba(16, 0, 16, 0.94);
  border: 3px solid #100010;
  box-shadow: inset 0 0 0 2px #5000ff, inset 0 0 0 3px #28007f;
  padding: 18px 20px 20px;
  font-family: var(--font-display);
  min-height: 220px;
  position: sticky; top: 90px;
}
.tooltip-head { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.tooltip-head img { width: 48px; height: 48px; image-rendering: pixelated; }
.tt-name { margin: 0; font-size: 1.5rem; font-weight: 700; color: #fff; text-shadow: 2px 2px 0 #3f3f3f; }
.tt-name[data-rarity="uncommon"] { color: #ffff55; text-shadow: 2px 2px 0 #3f3f15; }
.tt-name[data-rarity="rare"] { color: #55ffff; text-shadow: 2px 2px 0 #153f3f; }
.tt-name[data-rarity="epic"] { color: #ff55ff; text-shadow: 2px 2px 0 #3f153f; }
.tt-line { margin: 0 0 4px; color: #aaaaaa; font-size: 1.1rem; line-height: 1.4; font-weight: 500; }
.tt-source { margin: 14px 0 0; color: #5555ff; font-size: 1rem; font-weight: 500; }

@media (max-width: 900px) {
  .arsenal { grid-template-columns: 1fr; }
  .gui { justify-self: center; }
  .tooltip { position: static; min-height: 0; }
}
@media (max-width: 420px) {
  .gui { padding: 10px 8px 12px; }
  .gui { --s: calc((100vw - 32px - 22px) / 9); }
}

/* ---------- Bosses ---------- */
.bosses { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.bosses li {
  display: grid; grid-template-columns: 96px 1fr; gap: clamp(18px, 3vw, 32px);
  padding: 28px 0;
  border-top: 2px solid var(--moss-800);
  max-width: 820px;
}
.bosses li:last-child { border-bottom: 2px solid var(--moss-800); }
.bosses img {
  width: 96px; height: 96px; image-rendering: pixelated;
  box-shadow: 0 0 0 3px var(--moss-950), 0 0 0 5px var(--bark);
}
.bosses h3 { font-size: 1.75rem; }
.bosses p { margin: 6px 0 0; max-width: 62ch; }
.bosses .where { color: var(--diamond); font-weight: 500; margin-top: 4px; }
@media (max-width: 520px) {
  .bosses li { grid-template-columns: 64px 1fr; }
  .bosses img { width: 64px; height: 64px; }
}

/* ---------- Ores / armor ---------- */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 80px); }
@media (max-width: 820px) { .two-col { grid-template-columns: 1fr; } }
.ores { margin: 28px 0 0; display: grid; gap: 22px; }
.ores dt {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-display); font-weight: 700; font-size: 1.3rem;
}
.ores dt img { width: 32px; height: 32px; image-rendering: pixelated; }
.ores dd { margin: 4px 0 0 44px; color: var(--bone-dim); max-width: 48ch; }

/* ---------- Download ---------- */
.band-download {
  background:
    radial-gradient(ellipse 70% 60% at 50% 0%, rgba(98,224,211,0.10), transparent 70%),
    var(--moss-950);
}
.platforms {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
}
.platform {
  display: flex; flex-direction: column; gap: 4px;
  padding: 26px 24px;
  background: var(--moss-800);
  color: var(--bone); text-decoration: none;
  border-bottom: 4px solid var(--diamond-deep);
  clip-path: polygon(var(--notch) 0, calc(100% - var(--notch)) 0, 100% var(--notch), 100% calc(100% - var(--notch)), calc(100% - var(--notch)) 100%, var(--notch) 100%, 0 calc(100% - var(--notch)), 0 var(--notch));
  transition: background-color 120ms, transform 120ms;
}
.platform:hover { background: var(--moss-700); color: var(--bone); transform: translateY(-2px); }
.platform:first-child { background: var(--diamond); color: var(--moss-950); border-bottom-color: var(--diamond-deep); }
.platform:first-child:hover { background: var(--bone); color: var(--moss-950); }
.platform:first-child .platform-note { color: rgba(15,22,16,0.72); }
.platform-name { font-family: var(--font-display); font-weight: 700; font-size: 1.6rem; }
.platform-note { color: var(--bone-dim); font-size: 0.95rem; }
@media (max-width: 760px) { .platforms { grid-template-columns: 1fr; } }

.is-soon { opacity: 0.5; cursor: not-allowed; pointer-events: none; }
.platform.is-soon:first-child { background: var(--moss-800); color: var(--bone); }

.install {
  margin-top: 48px; padding-top: 32px;
  border-top: 2px solid var(--moss-800);
  max-width: 680px;
}
.install ol { margin: 14px 0 0; padding-left: 1.4em; }
.install li { margin-bottom: 6px; }
.install-note { color: var(--bone-dim); font-size: 0.95rem; margin: 16px 0 0; }

/* ---------- Ecosystem ---------- */
.links { margin-top: 32px; display: grid; grid-template-columns: 1fr 1fr; gap: 0 48px; }
.link-row {
  display: block; padding: 22px 0;
  border-top: 2px solid var(--moss-800);
  color: var(--bone); text-decoration: none;
}
.link-row:hover .link-title { color: var(--diamond); }
.link-title { display: block; font-family: var(--font-display); font-weight: 700; font-size: 1.4rem; }
.link-desc { display: block; color: var(--bone-dim); margin-top: 2px; }
@media (max-width: 700px) { .links { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.footer { padding: 40px 0 56px; color: var(--bone-dim); font-size: 0.95rem; }
.footer p { margin: 0 0 6px; }
.footer a { color: var(--bone); }
.footer a:hover { color: var(--diamond); }
