/* ============================================
   PEAK SMP — shared styles
   ============================================ */

:root {
  --grass: #5EBB3F;
  --grass-dark: #468A2E;
  --dirt: #4A3728;
  --dirt-light: #6B4F3A;
  --sky: #7EC8E3;
  --sky-light: #BEE7F5;
  --gold: #FFC94A;
  --gold-dark: #E5A62F;
  --cream: #FFF6E5;
  --ink: #241C15;
  --redstone: #E24B3E;
  --pixel: 'Press Start 2P', monospace;
  --body: 'Baloo 2', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--body);
  background: var(--sky-light);
  color: var(--ink);
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

img, svg { display: block; max-width: 100%; }

a { color: inherit; }

.wrap { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

h1, h2, h3 { font-family: var(--pixel); line-height: 1.5; }

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--redstone);
  outline-offset: 3px;
}

/* ---------- Nav ---------- */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--cream);
  border-bottom: 4px solid var(--ink);
}

nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
}

.logo {
  font-family: var(--pixel);
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo-block {
  width: 26px;
  height: 26px;
  background: var(--grass);
  border: 3px solid var(--ink);
  position: relative;
  flex-shrink: 0;
}

.logo-block::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 40%;
  background: #7FD858;
}

.navlinks {
  display: flex;
  gap: 28px;
  font-weight: 700;
  font-size: 15px;
}

.navlinks a {
  text-decoration: none;
  padding: 4px 0;
  border-bottom: 3px solid transparent;
}

.navlinks a:hover { color: var(--grass-dark); }
.navlinks a.active { border-bottom-color: var(--grass); }

.nav-toggle {
  display: none;
  background: var(--grass);
  border: 3px solid var(--ink);
  color: var(--cream);
  font-family: var(--pixel);
  font-size: 10px;
  padding: 10px 12px;
  cursor: pointer;
}

@media (max-width: 700px) {
  .nav-toggle { display: block; }
  .navlinks {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--cream);
    flex-direction: column;
    gap: 0;
    border-bottom: 4px solid var(--ink);
  }
  .navlinks.open { display: flex; }
  .navlinks a {
    padding: 16px 24px;
    border-bottom: 2px solid rgba(36,28,21,.15);
  }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 90px 24px 140px;
  background: linear-gradient(180deg, #7EC8E3 0%, #A7DCEE 55%, #C9EAF4 100%);
  overflow: hidden;
  text-align: center;
}

.hero-inner { position: relative; z-index: 2; }

.cloud {
  position: absolute;
  background: #fff;
  border: 4px solid var(--ink);
  border-radius: 2px;
}

.cloud::before, .cloud::after {
  content: "";
  position: absolute;
  background: #fff;
  border: 4px solid var(--ink);
}

.c1 { width: 90px; height: 34px; top: 60px; left: 6%; animation: drift 22s ease-in-out infinite; }
.c1::before { width: 34px; height: 26px; top: -22px; left: 10px; }
.c1::after { width: 26px; height: 20px; top: -16px; left: 48px; }

.c2 { width: 70px; height: 28px; top: 140px; right: 10%; animation: drift 28s ease-in-out infinite reverse; }
.c2::before { width: 28px; height: 22px; top: -18px; left: 8px; }
.c2::after { width: 22px; height: 16px; top: -12px; left: 38px; }

.c3 { width: 60px; height: 24px; top: 40px; right: 28%; opacity: .85; animation: drift 34s ease-in-out infinite; }
.c3::before { width: 22px; height: 18px; top: -14px; left: 8px; }

@keyframes drift {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(24px); }
}

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

.eyebrow {
  display: inline-block;
  font-family: var(--pixel);
  font-size: 10px;
  background: var(--gold);
  border: 3px solid var(--ink);
  padding: 8px 14px;
  box-shadow: 4px 4px 0 var(--ink);
  margin-bottom: 28px;
  transform: rotate(-2deg);
}

.hero h1 {
  font-size: clamp(28px, 7vw, 58px);
  color: var(--cream);
  -webkit-text-stroke: 3px var(--ink);
  paint-order: stroke fill;
  text-shadow: 5px 5px 0 var(--ink);
  letter-spacing: 1px;
  margin-bottom: 22px;
}

.hero p.sub {
  font-size: clamp(16px, 2.4vw, 20px);
  font-weight: 600;
  max-width: 560px;
  margin: 0 auto 40px;
}

.hero-actions {
  display: flex;
  gap: 18px;
  justify-content: center;
  flex-wrap: wrap;
}

.ground {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 46px;
  background: repeating-linear-gradient(90deg, var(--grass) 0 40px, var(--grass-dark) 40px 42px);
  border-top: 4px solid var(--ink);
}

.ground::after {
  content: "";
  position: absolute;
  top: 12px; left: 0; right: 0; bottom: 0;
  background: repeating-linear-gradient(90deg, var(--dirt) 0 40px, var(--dirt-light) 40px 42px);
  border-top: 4px solid var(--ink);
}

/* ---------- Page header (non-home pages) ---------- */
.page-head {
  background: linear-gradient(180deg, var(--sky) 0%, var(--sky-light) 100%);
  padding: 60px 24px 70px;
  text-align: center;
  border-bottom: 4px solid var(--ink);
  position: relative;
  overflow: hidden;
}

.page-head h1 {
  font-size: clamp(20px, 4.5vw, 34px);
  color: var(--cream);
  -webkit-text-stroke: 3px var(--ink);
  paint-order: stroke fill;
  text-shadow: 4px 4px 0 var(--ink);
  position: relative;
  z-index: 2;
}

.page-head p {
  font-weight: 600;
  font-size: 17px;
  max-width: 520px;
  margin: 18px auto 0;
  position: relative;
  z-index: 2;
}

/* ---------- Buttons ---------- */
.btn {
  font-family: var(--pixel);
  font-size: 12px;
  padding: 16px 22px;
  border: 4px solid var(--ink);
  box-shadow: 5px 5px 0 var(--ink);
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: transform .12s ease, box-shadow .12s ease;
  background: var(--grass);
  color: var(--cream);
  text-align: center;
}

.btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 7px 7px 0 var(--ink);
}

.btn:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--ink);
}

.btn:disabled {
  opacity: .6;
  cursor: not-allowed;
  transform: none;
  box-shadow: 5px 5px 0 var(--ink);
}

.btn.gold { background: var(--gold); color: var(--ink); }
.btn.dirt { background: var(--dirt); color: var(--cream); }
.btn.red  { background: var(--redstone); color: var(--cream); }
.btn.small { font-size: 9px; padding: 10px 12px; border-width: 3px; box-shadow: 3px 3px 0 var(--ink); }

/* ---------- Server IP block ---------- */
.ip-section {
  background: var(--cream);
  padding: 70px 24px;
  border-bottom: 4px solid var(--ink);
  text-align: center;
}

.ip-section h2 { font-size: clamp(18px, 3vw, 26px); margin-bottom: 34px; }

.command-block {
  max-width: 520px;
  margin: 0 auto;
  background: var(--dirt);
  border: 5px solid var(--ink);
  box-shadow: 8px 8px 0 var(--ink);
  padding: 28px;
  position: relative;
}

.command-block::before {
  content: "";
  position: absolute;
  top: 6px; left: 6px; right: 6px;
  height: 10px;
  background: rgba(255,255,255,.12);
}

.command-block .label {
  font-family: var(--pixel);
  font-size: 9px;
  color: var(--gold);
  margin-bottom: 14px;
  letter-spacing: 1px;
}

.ip-row {
  display: flex;
  gap: 10px;
  background: var(--ink);
  border: 3px solid #000;
  padding: 14px 16px;
  align-items: center;
  justify-content: space-between;
}

.ip-text {
  font-family: var(--pixel);
  font-size: clamp(11px, 2.8vw, 15px);
  color: #A9F58C;
  letter-spacing: 1px;
  word-break: break-all;
  text-align: left;
}

.copy-btn {
  font-family: var(--pixel);
  font-size: 10px;
  background: var(--grass);
  color: var(--ink);
  border: 3px solid var(--ink);
  padding: 10px 12px;
  cursor: pointer;
  flex-shrink: 0;
  transition: background .15s ease, transform .1s ease;
}

.copy-btn:hover { background: var(--gold); }
.copy-btn:active { transform: scale(.95); }

.ip-meta {
  margin-top: 16px;
  font-size: 14px;
  color: var(--cream);
  font-weight: 600;
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.ip-meta span {
  background: rgba(255,255,255,.08);
  padding: 6px 12px;
  border: 2px solid rgba(255,255,255,.25);
}

/* ---------- Rules ---------- */
.rules-section {
  background: var(--grass);
  padding: 80px 24px;
  border-bottom: 4px solid var(--ink);
}

.rules-section h2 {
  text-align: center;
  color: var(--cream);
  -webkit-text-stroke: 2px var(--ink);
  paint-order: stroke fill;
  text-shadow: 4px 4px 0 var(--ink);
  font-size: clamp(20px, 3.4vw, 30px);
  margin-bottom: 46px;
}

.book {
  max-width: 720px;
  margin: 0 auto;
  background: var(--cream);
  border: 5px solid var(--ink);
  box-shadow: 8px 8px 0 var(--ink);
  padding: 40px clamp(20px, 5vw, 56px);
  background-image:
    linear-gradient(90deg, rgba(0,0,0,.05) 0, transparent 6px),
    repeating-linear-gradient(180deg, transparent 0 41px, rgba(74,55,40,.08) 41px 42px);
}

.rule {
  display: flex;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 2px dashed rgba(74,55,40,.35);
  align-items: flex-start;
}

.rule:last-child { border-bottom: none; }

.rule-num {
  font-family: var(--pixel);
  font-size: 13px;
  background: var(--gold);
  border: 3px solid var(--ink);
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.rule-text { font-size: 16px; font-weight: 600; padding-top: 6px; }
.rule-text b { color: var(--redstone); }

/* ---------- Crew ---------- */
.crew-section {
  background: var(--sky-light);
  padding: 80px 24px;
  border-bottom: 4px solid var(--ink);
}

.crew-section h2 {
  text-align: center;
  font-size: clamp(20px, 3.4vw, 30px);
  margin-bottom: 12px;
}

.crew-section .sub {
  text-align: center;
  font-weight: 600;
  max-width: 480px;
  margin: 0 auto 46px;
  font-size: 16px;
}

.crew-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 22px;
  max-width: 900px;
  margin: 0 auto;
}

.crew-card {
  background: var(--cream);
  border: 4px solid var(--ink);
  box-shadow: 6px 6px 0 var(--ink);
  padding: 20px;
  text-align: center;
  transition: transform .15s ease;
}

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

.crew-avatar {
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  border: 3px solid var(--ink);
}

.crew-card h3 { font-size: 12px; margin-bottom: 8px; }
.crew-card p { font-size: 14px; font-weight: 600; color: var(--dirt); }

/* ---------- Apply form ---------- */
.apply-section {
  background: var(--dirt);
  padding: 80px 24px;
  text-align: center;
}

.apply-section h2 {
  color: var(--gold);
  font-size: clamp(20px, 3.4vw, 30px);
  margin-bottom: 18px;
}

.apply-section > p {
  color: var(--cream);
  font-weight: 600;
  max-width: 480px;
  margin: 0 auto 40px;
  font-size: 16px;
}

.apply-form {
  max-width: 460px;
  margin: 0 auto;
  background: var(--cream);
  border: 5px solid var(--ink);
  box-shadow: 8px 8px 0 var(--gold);
  padding: 32px;
  text-align: left;
}

.field { margin-bottom: 20px; }

.field label {
  display: block;
  font-family: var(--pixel);
  font-size: 9px;
  margin-bottom: 10px;
  color: var(--dirt);
}

.field input,
.field textarea {
  width: 100%;
  font-family: var(--body);
  font-size: 15px;
  font-weight: 600;
  padding: 12px 14px;
  border: 3px solid var(--ink);
  background: #fff;
  color: var(--ink);
  resize: vertical;
}

.field .hint {
  font-size: 13px;
  font-weight: 600;
  color: var(--dirt-light);
  margin-top: 6px;
}

.apply-form .btn { width: 100%; margin-top: 4px; }

.form-note {
  font-size: 13px;
  color: var(--dirt-light);
  margin-top: 14px;
  text-align: center;
  font-weight: 600;
}

/* form feedback */
.form-msg {
  display: none;
  padding: 14px 16px;
  border: 3px solid var(--ink);
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 20px;
}

.form-msg.show { display: block; }
.form-msg.ok { background: #C8F0B4; }
.form-msg.err { background: #FFC9C4; }

.field-error {
  border-color: var(--redstone) !important;
}

/* ---------- Footer ---------- */
footer {
  background: var(--ink);
  color: var(--cream);
  padding: 36px 24px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
}

footer .logo { justify-content: center; margin-bottom: 12px; color: var(--cream); }
footer .fine { color: #a89787; font-size: 12px; margin-top: 8px; }
footer a { color: var(--gold); }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--grass);
  color: var(--ink);
  font-family: var(--pixel);
  font-size: 11px;
  border: 3px solid var(--ink);
  box-shadow: 5px 5px 0 var(--ink);
  padding: 14px 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  z-index: 999;
  max-width: 90vw;
  text-align: center;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
