/* Landing page: a dig from the night sky down to bedrock */

body.landing { background: #07060c; }
body.landing .site-header { background: rgba(7, 6, 12, .55); box-shadow: none; }

.btn.big { font-size: 1.15rem; padding: .75rem 1.6rem; min-height: 52px; }

/* ---------- sky ---------- */
.sky {
  position: relative;
  min-height: calc(100vh - 60px);
  min-height: calc(100svh - 60px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(180deg, #05040a 0%, #0e0a1f 40%, #241640 75%, #3a1f4f 100%);
  padding: 4rem 0 9rem;
}
#stars { position: absolute; inset: 0; width: 100%; height: 100%; }

.moon {
  position: absolute; top: 9%; right: 9%;
  width: 112px; height: 112px;
  filter: drop-shadow(0 0 40px rgba(240, 232, 190, .45));
  will-change: transform;
}
.moon svg { width: 100%; height: 100%; display: block; }

.hills { position: absolute; left: 0; right: 0; bottom: 0; height: 58%; pointer-events: none; }
.hills svg { position: absolute; left: -4%; bottom: 0; width: 108%; height: 100%; will-change: transform; }

.fireflies { position: absolute; left: 0; right: 0; bottom: 0; height: 30%; pointer-events: none; }
.firefly {
  position: absolute; width: 4px; height: 4px; background: #d8ff6a;
  box-shadow: 0 0 6px 2px rgba(216, 255, 106, .7);
  animation: drift var(--d, 9s) ease-in-out infinite alternate, blink var(--b, 3s) ease-in-out infinite;
}
@keyframes drift { to { transform: translate(var(--x, 30px), var(--y, -40px)); } }
@keyframes blink { 0%, 100% { opacity: .1; } 50% { opacity: 1; } }

.sky-content { position: relative; z-index: 2; text-align: center; }
.title {
  font-size: clamp(3rem, 10vw, 7rem);
  margin: 0;
  letter-spacing: 2px;
  color: #f4eeff;
  text-shadow: 5px 5px 0 #4b2b8a, 10px 10px 0 #000;
  margin-bottom: 2.2rem;
  animation: float 5s ease-in-out infinite;
}
@keyframes float { 50% { transform: translateY(-8px); } }
.countdown-title { font-family: var(--font-pixel); color: #b9b0d0; margin-bottom: .7rem; text-transform: uppercase; letter-spacing: 2px; }
.countdown-date { font-family: var(--font-pixel); color: #b9b0d0; margin: -.9rem 0 2rem; } /* close to the hotbar (which keeps 2rem below), room to the buttons */
.hotbar {
  display: inline-flex; gap: 0;
  background: rgba(0, 0, 0, .55);
  border: 3px solid #000;
  box-shadow: 0 8px 0 rgba(0, 0, 0, .35);
  margin-bottom: 2rem;
}
.hotbar .slot-num {
  width: 104px; padding: .8rem .2rem .55rem;
  border: 3px solid #8b8b8b; border-right-color: #373737; border-bottom-color: #373737;
  background: rgba(30, 28, 40, .85);
}
.hotbar .slot-num:first-child { border-color: #fff; border-right-color: #9a9a9a; border-bottom-color: #9a9a9a; } /* "selected" slot */
.hotbar .num { font: 400 2.6rem/1 var(--font-pixel); color: #fff; text-shadow: 3px 3px 0 #3f3f3f; }
.hotbar .lbl { font: .78rem var(--font-pixel); color: #c9c2dc; margin-top: .3rem; text-transform: uppercase; }
.status-pill.live { font-size: 1.3rem; padding: .55rem 1.2rem; border-width: 3px; margin-bottom: 2rem; color: #7dff7d; text-shadow: 2px 2px 0 #000; }
.status-pill.live .dot { width: 12px; height: 12px; }
.cta-row { display: flex; gap: .8rem; justify-content: center; flex-wrap: wrap; margin-bottom: 1.5rem; }
.scroll-hint {
  position: absolute; bottom: 1.2rem; left: 50%; transform: translateX(-50%); z-index: 3;
  color: #fff; text-decoration: none; font-size: 1.2rem; opacity: .7; animation: bob 1.6s ease-in-out infinite;
}
@keyframes bob { 50% { transform: translate(-50%, 6px); } }

/* ---------- underground layers ---------- */
.layer { position: relative; padding: 5.5rem 0; border-top: 4px solid #000; image-rendering: pixelated; }
.layer-title { text-align: center; font-size: clamp(1.6rem, 4vw, 2.2rem); text-shadow: 3px 3px 0 #000; margin: 4rem 0 2rem; }
.layer-title:first-child { margin-top: 0; }

.layer-dirt {
  border-top: 0;
  padding-top: 7rem;
  background: linear-gradient(180deg, rgba(25, 15, 8, .35), rgba(15, 9, 5, .8)), url('/img/dirt.png');
  background-size: auto, 64px 64px;
}
.layer-dirt::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 24px;
  background: url('/img/grass.png') repeat-x; background-size: 64px 24px;
}
.layer-stone {
  background: linear-gradient(180deg, rgba(14, 14, 18, .58), rgba(14, 14, 18, .74)), url('/img/stone.png');
  background-size: auto, 512px 512px;
}
.layer-deep {
  background: linear-gradient(180deg, rgba(10, 10, 14, .55), rgba(6, 6, 9, .9)), url('/img/deepslate.png');
  background-size: auto, 128px 128px;
}

/* invite: enchanted panel */
.enchant-panel {
  position: relative; max-width: 620px; margin: 0 auto;
  background: rgba(20, 14, 32, .92);
  border: 3px solid #000;
  box-shadow: inset 2px 2px 0 rgba(255, 255, 255, .08), inset -2px -2px 0 rgba(0, 0, 0, .45), 0 10px 0 rgba(0, 0, 0, .45);
  padding: 1.6rem;
  overflow: hidden;
}
.enchant-panel > * { position: relative; z-index: 1; }
.invite-form { display: flex; gap: .5rem; }
.invite-form input { font: 400 1.15rem var(--font-pixel); letter-spacing: 2px; text-transform: uppercase; }
#invite-msg { margin: .7rem 0 0; min-height: 1.2em; }

/* news as oak signs */
.signs { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.2rem; margin-bottom: 3rem; }
.sign {
  background: linear-gradient(rgba(196, 160, 104, .82), rgba(176, 140, 86, .86)), url('/img/planks.png');
  background-size: auto, 64px 64px;
  border: 4px solid #3b2a14;
  box-shadow: inset 0 0 0 3px rgba(0, 0, 0, .25), 0 8px 0 rgba(0, 0, 0, .45);
  padding: 1.2rem 1.3rem;
  color: #1e1408;
}
.sign.pinned { border-color: #8a5c00; }
.sign .meta { font: .8rem var(--font-pixel); color: #4a3418; margin-bottom: .3rem; }
.sign h3 { color: #1e1408; margin-bottom: .4rem; }
.sign .prose, .sign .prose strong { color: #1e1408; }
.sign .prose a { color: #4b1f8a; }

.glass-panel {
  max-width: 860px; margin: 0 auto;
  background: rgba(16, 15, 22, .82);
  border: 3px solid #000;
  box-shadow: inset 2px 2px 0 rgba(255, 255, 255, .08), 0 10px 0 rgba(0, 0, 0, .45);
  padding: 2rem 2.2rem;
  backdrop-filter: blur(2px);
}
.glass-panel h2 { font-size: clamp(1.6rem, 4vw, 2.2rem); text-shadow: 3px 3px 0 #000; }

/* rules as a book page */
.book {
  max-width: 760px; margin: 0 auto;
  background: #efe2bf;
  color: #3a2a17;
  border: 4px solid #000;
  box-shadow: inset 0 0 0 4px #d8c695, inset 10px 0 0 4px #c9b27a, 0 12px 0 rgba(0, 0, 0, .5);
  padding: 2.2rem 2.4rem 1.8rem 3rem;
}
.book-title { font: 400 1.8rem var(--font-pixel); color: #3a2a17; margin-bottom: 1.2rem; text-align: center; }
.book .prose, .book .prose strong { color: #2c1f0f; }
.book .prose ol li::marker { color: #9b2c1f; }
.book .prose ul li::marker { color: #6b3fb5; }
.book .prose a { color: #4b1f8a; }
.book-note { font-size: .88rem; color: #6b5432; border-top: 2px dashed #c9b27a; padding-top: .9rem; margin: 1.2rem 0 0; }

/* bedrock footer */
body.landing .site-footer { background: url('/img/bedrock.png'); background-size: 64px 64px; color: #ddd; }

@media (max-width: 600px) {
  .sky { padding-top: 6rem; }
  .moon { width: 56px; height: 56px; top: 1.2rem; right: 1.2rem; }
  .hotbar .slot-num { width: 74px; }
  .hotbar .num { font-size: 1.8rem; }
  .invite-form { flex-direction: column; }
  .glass-panel, .book { padding: 1.4rem 1.2rem; }
  .layer { padding: 4rem 0; }
}

@media (prefers-reduced-motion: reduce) {
  .title, .scroll-hint, .firefly { animation: none; }
}
