/* lucidmc.net: the store's look (store/public/store.css) - pixel letters, flat colour blocks with a hard
   shadow - on one page with the way in, the store, the Discord and the Season Pass. */

@font-face {
  font-family: "Digits";
  src: url("fonts/silkscreen-400.woff2") format("woff2");
  font-weight: 400 600;
  unicode-range: U+0030-0039;
}

@font-face {
  font-family: "Digits";
  src: url("fonts/silkscreen-700.woff2") format("woff2");
  font-weight: 700;
  unicode-range: U+0030-0039;
}

:root {
  --night: #0f1118;
  --panel: #191c26;
  --panel-edge: #262a38;
  --panel-deep: #12141c;
  --ink: #f2f6fa;
  --muted: #9aa5b4;
  --sky: #87ceeb;
  --sky-deep: #4fa8d8;
  --sky-dark: #1b4f73;
  --good: #7ed957;
  --heading: "Silkscreen", "Pixelify Sans", monospace;
  --body: "Digits", "Pixelify Sans", system-ui, sans-serif;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html { background: var(--night); }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--night);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.4;
}

img { image-rendering: auto; }

a { color: var(--sky); }

button { font: inherit; color: inherit; cursor: pointer; }

:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }

.sky {
  position: fixed;
  inset: 0 0 auto 0;
  height: 420px;
  pointer-events: none;
  background:
    radial-gradient(2px 2px at 12% 18%, #87ceeb 50%, transparent 51%),
    radial-gradient(2px 2px at 27% 62%, #c9b6ff 50%, transparent 51%),
    radial-gradient(2px 2px at 44% 30%, #e6f8ff 50%, transparent 51%),
    radial-gradient(2px 2px at 68% 14%, #87ceeb 50%, transparent 51%),
    radial-gradient(2px 2px at 81% 48%, #e6f8ff 50%, transparent 51%),
    radial-gradient(2px 2px at 92% 22%, #c9b6ff 50%, transparent 51%),
    linear-gradient(#16263a, var(--night));
  opacity: 0.85;
}

.page {
  position: relative;
  max-width: 1280px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 56px 24px 32px;
  display: flex;
  flex-direction: column;
}

/* --- the bar --- */

.bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 128px;
  padding: 18px 20px;
  background: var(--panel);
  border: 2px solid var(--panel-edge);
  border-radius: 12px;
  margin-bottom: 24px;
}

.status {
  justify-self: start;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: var(--panel-deep);
  border: 2px solid var(--panel-edge);
  border-radius: 10px;
}

.dot {
  width: 14px;
  height: 14px;
  background: #e6a014;
  box-shadow: 0 0 0 3px rgba(230, 160, 20, 0.25);
}

.dot.on { background: var(--good); box-shadow: 0 0 0 3px rgba(126, 217, 87, 0.25); }

.status small {
  display: block;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.status strong { font-family: var(--heading); font-size: 20px; font-weight: 700; }

.middle {
  grid-column: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: -84px;
}

.brand {
  display: block;
  width: min(360px, 56vw);
  height: auto;
  filter: drop-shadow(0 6px 0 rgba(0, 0, 0, 0.45));
}

.address {
  margin-top: 6px;
  background: none;
  border: 0;
  color: var(--sky);
  font-family: var(--heading);
  font-size: 17px;
  letter-spacing: 2px;
}

.address:hover { color: var(--ink); }

.copy-button {
  grid-column: 3;
  justify-self: end;
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  background: var(--sky-deep);
  border: 0;
  border-radius: 12px;
  box-shadow: 0 6px 0 var(--sky-dark);
  color: #fff;
}

.copy-button:hover { transform: translateY(2px); box-shadow: 0 4px 0 var(--sky-dark); }

.copy-button svg { width: 36px; height: 36px; }

/* --- the cards --- */

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-auto-rows: 220px;
  gap: 18px;
}

.card {
  position: relative;
  overflow: hidden;
  display: block;
  padding: 36px 40px;
  border-radius: 12px;
  color: #fff;
  text-decoration: none;
  background: var(--card);
  box-shadow: inset 0 -8px 0 rgba(0, 0, 0, 0.16);
  transition: transform 0.12s steps(2);
}

a.card:hover { transform: translateY(-4px); }

.card.big { grid-row: span 3; }

.card h2 {
  position: relative;
  z-index: 1;
  margin: 0 0 10px;
  max-width: 60%;
  font-family: var(--heading);
  font-weight: 700;
  font-size: 46px;
  line-height: 1;
  text-transform: uppercase;
  text-shadow: 4px 4px 0 rgba(0, 0, 0, 0.22);
}

.card.big h2 { font-size: 64px; max-width: none; }

.card p {
  position: relative;
  z-index: 1;
  margin: 0;
  max-width: 50%;
  font-family: var(--heading);
  font-size: 17px;
  text-transform: uppercase;
  opacity: 0.92;
}

.card.big p { max-width: none; }

.card img, .card .art {
  position: absolute;
  right: 18px;
  bottom: 50%;
  transform: translateY(50%);
  height: 86%;
}

.card .art { height: 58%; right: 34px; filter: drop-shadow(4px 4px 0 rgba(0, 0, 0, 0.22)); }

/* The big card: the season, the time left, the way in; the cloud L at the foot. */
.card.big img { height: auto; width: 46%; right: auto; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 0; }

.countdown {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 12px;
  margin: 28px 0 0;
}

.countdown span {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 84px;
  padding: 12px 10px 10px;
  background: rgba(10, 30, 50, 0.32);
  box-shadow: inset 0 -5px 0 rgba(0, 0, 0, 0.2);
}

.countdown b { font-family: var(--heading); font-size: 38px; line-height: 1; }

.countdown small { margin-top: 6px; font-family: var(--heading); font-size: 13px; text-transform: uppercase; opacity: 0.85; }

.join {
  position: relative;
  z-index: 1;
  margin-top: 30px;
  padding: 16px 26px;
  background: #fff;
  border: 0;
  box-shadow: inset 0 -6px 0 rgba(0, 0, 0, 0.18), 0 6px 0 rgba(0, 0, 0, 0.25);
  color: #14324a;
  font-family: var(--heading);
  font-weight: 700;
  font-size: 20px;
  text-transform: uppercase;
}

.join:hover { transform: translateY(2px); box-shadow: inset 0 -6px 0 rgba(0, 0, 0, 0.18), 0 4px 0 rgba(0, 0, 0, 0.25); }

.card.big .versions { margin-top: 14px; font-size: 14px; opacity: 0.85; }

.copied {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  margin: 0;
  padding: 12px 20px;
  background: var(--good);
  color: #12301a;
  font-family: var(--heading);
  font-weight: 700;
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.35);
}

.foot {
  margin-top: auto;
  padding-top: 40px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

@media (prefers-reduced-motion: reduce) {
  .card, .copy-button, .join { transition: none; }
}

/* A phone: one column, the bar stacked, the big card as tall as it needs. */
@media (max-width: 760px) {
  .page { padding: 64px 16px 24px; }
  .bar { grid-template-columns: 1fr; justify-items: center; gap: 14px; }
  .middle { grid-column: 1; grid-row: 1; margin-top: -70px; }
  .status { justify-self: center; }
  .copy-button { display: none; }
  .grid { grid-template-columns: 1fr; grid-auto-rows: 170px; }
  .card { padding: 26px 24px; }
  .card h2 { font-size: 34px; }
  .card.big { grid-row: auto; min-height: 520px; }
  .card.big h2 { font-size: 44px; }
  .card.big img { width: 52%; }
  .countdown { gap: 8px; flex-wrap: wrap; }
  .countdown span { min-width: 64px; }
  .countdown b { font-size: 28px; }
  .join { font-size: 16px; padding: 14px 18px; }
}

/* --- the rules page (lucidmc.net/rules, written by tools/build_rules.py) --- */
.rules-page { max-width: 860px; gap: 40px; }
.rules-top { text-align: center; }
.rules-top .brand { width: 220px; max-width: 70%; }
.rules-top h1 { font-family: var(--heading); font-size: 52px; margin: 18px 0 8px; color: var(--sky); }
.rules-top p { color: var(--muted); margin: 0 auto; max-width: 560px; line-height: 1.5; }
.rules-tabs { display: flex; justify-content: center; gap: 12px; margin-top: 24px; flex-wrap: wrap; }
.rules-tabs a {
  font-family: var(--heading); text-decoration: none; color: var(--ink);
  background: var(--panel); border: 2px solid var(--panel-edge); padding: 10px 18px;
}
.rules-tabs a:hover, .rules-tabs a:focus-visible { border-color: var(--sky); color: var(--sky); }
.rules-set { scroll-margin-top: 24px; display: flex; flex-direction: column; gap: 18px; }
.rules-set h2 { font-family: var(--heading); font-size: 34px; margin: 0; }
.rules-intro, .rules-closing { color: var(--muted); line-height: 1.55; margin: 0; }
.rules-closing { color: var(--sky); }
.rules-card { background: var(--panel); border: 2px solid var(--panel-edge); padding: 22px 26px; }
.rules-card h3 { font-family: var(--heading); font-size: 20px; margin: 0 0 14px; color: var(--sky); }
.rules-card ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.rules-card li { display: grid; grid-template-columns: 48px 1fr; gap: 10px; line-height: 1.5; }
.rule-no { font-family: var(--heading); color: var(--sky-deep); }
@media (max-width: 760px) {
  .rules-top h1 { font-size: 38px; }
  .rules-card { padding: 18px 16px; }
  .rules-card li { grid-template-columns: 40px 1fr; }
}

/* --- the vote page (lucidmc.net/vote) --- */
.vote-page .rules-top b { color: var(--ink); }
.vote-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.vote-site {
  display: grid; grid-template-columns: 48px 1fr auto; align-items: center; gap: 14px;
  background: var(--panel); border: 2px solid var(--panel-edge); padding: 18px 22px;
}
.vote-site .rule-no { font-size: 24px; }
.vote-site h2 { font-family: var(--heading); font-size: 20px; margin: 0 0 4px; }
.vote-site p { margin: 0; color: var(--muted); font-size: 14px; }
.vote-button {
  font-family: var(--heading); text-decoration: none; color: #08131c; background: var(--sky);
  padding: 10px 26px; box-shadow: 0 4px 0 var(--sky-deep);
}
.vote-button:hover, .vote-button:focus-visible { filter: brightness(1.1); }
.vote-button:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--sky-deep); }
.vote-text { margin: 0 0 14px; line-height: 1.55; }
.vote-points li { display: list-item; }
.vote-points { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; line-height: 1.5; color: var(--muted); }
.vote-faq h3 { margin: 18px 0 6px; }
.vote-faq h3:first-child { margin-top: 0; }
.vote-faq p { margin: 0; color: var(--muted); line-height: 1.5; }
@media (max-width: 760px) {
  .vote-site { grid-template-columns: 32px 1fr; padding: 16px; }
  .vote-button { grid-column: 1 / -1; text-align: center; }
}
