/* PiSDSMP landing page. Pixel look uses the free Monocraft font (SIL OFL) from fonts/. */

/* Monocraft by Idrees Hassan, SIL Open Font License 1.1 (see fonts/OFL-LICENSE.txt). */
@font-face {
  font-family: "Monocraft";
  src: url("fonts/Monocraft.otf") format("opentype");
  font-display: swap;
}

:root {
  --text: #fff;
  --muted: #cfcfcf;
  --green: #7cd35a;
  --gold: #ffd84a;
  --panel: rgba(0, 0, 0, 0.66);
  --font: "Monocraft", "Courier New", ui-monospace, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: #4a321d url("images/dirt.svg");
  background-size: 96px 96px;
  image-rendering: pixelated;
}

img { image-rendering: pixelated; }

code {
  font-family: var(--font);
  color: var(--green);
  background: rgba(0, 0, 0, 0.45);
  padding: 0.05em 0.35em;
  word-break: break-word;
}

/* ---------- sky + hero ---------- */

.sky {
  position: relative;
  overflow: hidden;
  background: linear-gradient(#4f9bff 0%, #8ec6ff 55%, #cfe9ff 100%);
  padding: 56px 20px 0;
  text-align: center;
}

.hero { position: relative; z-index: 2; max-width: 760px; margin: 0 auto; padding-bottom: 36px; }

.logo-block { display: block; margin: 0 auto 8px; width: 96px; height: 96px; }

h1 {
  margin: 0;
  font-size: clamp(44px, 12vw, 104px);
  line-height: 1;
  letter-spacing: 0.04em;
  text-shadow: 4px 4px 0 #3a3a3a, 8px 8px 0 #1c1c1c;
}

.tagline { margin: 14px 0 0; font-size: clamp(20px, 4vw, 30px); text-shadow: 3px 3px 0 #2a4a7a; }
.school  { margin: 4px 0 0; font-size: clamp(16px, 3vw, 22px); color: var(--gold); text-shadow: 3px 3px 0 #6b4f00; }

.join-box {
  margin: 28px auto 0;
  max-width: 560px;
  padding: 18px 16px 16px;
  background: var(--panel);
  border: 4px solid #000;
  box-shadow: inset 4px 4px 0 rgba(255, 255, 255, 0.14), inset -4px -4px 0 rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.join-box .label { color: var(--muted); font-size: 14px; letter-spacing: 0.06em; text-transform: uppercase; }
.join-box code { font-size: clamp(16px, 4.2vw, 24px); }

.copied { min-height: 1.4em; font-size: 14px; color: var(--green); }

/* Minecraft-style button */
.mc-button {
  font: inherit;
  color: #fff;
  cursor: pointer;
  padding: 10px 22px;
  background: #7d7d7d;
  border: 4px solid #000;
  text-shadow: 3px 3px 0 #3f3f3f;
  box-shadow: inset 4px 4px 0 #b4b4b4, inset -4px -4px 0 #4d4d4d;
}
.mc-button:hover, .mc-button:focus-visible { background: #6f79c4; box-shadow: inset 4px 4px 0 #a6adf0, inset -4px -4px 0 #3b4390; outline: none; }
.mc-button:active { transform: translateY(2px); }

.grass-strip {
  position: relative;
  z-index: 2;
  height: 80px;
  margin: 0 -20px;
  background: url("images/grass-side.svg") repeat-x;
  background-size: 80px 80px;
}

/* Pixel clouds, built from box-shadow squares */
.cloud {
  position: absolute;
  z-index: 1;
  width: 24px;
  height: 24px;
  background: #fff;
  opacity: 0.9;
  box-shadow:
    24px 0 #fff, 48px 0 #fff, 72px 0 #fff, 96px 0 #fff,
    -24px 24px #fff, 0 24px #fff, 24px 24px #fff, 48px 24px #fff, 72px 24px #fff, 96px 24px #fff, 120px 24px #fff,
    24px -24px #fff, 48px -24px #fff, 72px -24px #fff;
  animation: drift 90s linear infinite;
}
.c1 { top: 28px; left: -160px; }
.c2 { top: 52px; left: 35%; animation-duration: 120s; transform: scale(0.7); opacity: 0.7; }
.c3 { top: 18px; left: 70%; animation-duration: 150s; transform: scale(0.55); opacity: 0.6; }

@keyframes drift { from { translate: 0 0; } to { translate: 130vw 0; } }

/* ---------- content ---------- */

main { max-width: 860px; margin: 0 auto; padding: 36px 16px 8px; }

.panel {
  margin: 0 0 28px;
  padding: 24px 22px;
  background: var(--panel);
  border: 4px solid #000;
  box-shadow: inset 4px 4px 0 rgba(255, 255, 255, 0.12), inset -4px -4px 0 rgba(0, 0, 0, 0.4);
}

h2 { margin: 0 0 18px; font-size: clamp(24px, 5vw, 34px); text-shadow: 3px 3px 0 #2a2a2a; }
h3 { margin: 0 0 4px; font-size: 19px; color: var(--gold); text-shadow: 2px 2px 0 #4a3a00; }
p  { margin: 0 0 10px; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.steps li { display: flex; gap: 16px; align-items: flex-start; }

.num {
  flex: none;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  font-size: 22px;
  background: #5fa03a;
  border: 4px solid #000;
  box-shadow: inset 4px 4px 0 #8bd05c, inset -4px -4px 0 #3f7a2a;
  text-shadow: 2px 2px 0 #2d5a1c;
}

.tip  { color: var(--gold); }
.note { margin: 20px 0 0; color: var(--muted); font-size: 15px; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.card {
  padding: 14px;
  background: rgba(255, 255, 255, 0.07);
  border: 4px solid #000;
  box-shadow: inset 3px 3px 0 rgba(255, 255, 255, 0.1), inset -3px -3px 0 rgba(0, 0, 0, 0.35);
}
.card code { display: inline-block; margin: 0 6px 8px 0; font-size: 18px; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }

/* Screenshots (used once the gallery section is added) */
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.gallery figure { margin: 0; border: 4px solid #000; background: #000; box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.5); }
.gallery figure.wide { grid-column: 1 / -1; }
.gallery img { display: block; width: 100%; height: auto; aspect-ratio: 1920 / 991; object-fit: cover; image-rendering: auto; }

@media (max-width: 560px) {
  .gallery { grid-template-columns: 1fr; }
}

/* ---------- footer ---------- */

footer { margin-top: 24px; text-align: center; background: #2c2c2c url("images/stone.svg"); background-size: 80px 80px; padding: 0 16px 28px; }
.stone-strip { height: 12px; margin: 0 -16px 22px; background: #000; opacity: 0.5; }
footer p { margin: 0 0 8px; text-shadow: 2px 2px 0 #000; }
footer .fine { color: var(--muted); font-size: 13px; }
footer a { color: var(--green); }

@media (max-width: 520px) {
  .panel { padding: 18px 14px; }
  .steps li { gap: 12px; }
  body { font-size: 15px; }
}

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