:root {
  --sand: #f6e2c4;
  --sand-deep: #f0d2a4;
  --gold: #f5b42a;
  --gold-deep: #c48410;
  --brown: #8a4518;
  --brown-deep: #6d3412;
  --ink: #3d2918;
  --muted: #6d5844;
  --discord: #5865f2;
  --discord-deep: #3c49c4;
  --cream: #fff8ee;
  --line: rgba(61, 41, 24, 0.12);
  --shadow: 0 18px 40px rgba(70, 40, 10, 0.16);
  --nav-h: 74px;
  --font: "Nunito", "Segoe UI", sans-serif;
  --display: "Baloo 2", "Nunito", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--ink);
  background: var(--sand);
  line-height: 1.5;
}
img { max-width: 100%; display: block; }
button, input { font-family: inherit; }
a { color: inherit; }

.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  background: white;
  padding: 8px 12px;
  z-index: 80;
  border-radius: 8px;
}
.skip:focus { left: 12px; }

.topbar { position: relative; z-index: 40; }
.nav {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: min(860px, calc(100% - 32px));
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 6px 6px 14px;
  border-radius: 12px;
  background: rgba(255, 250, 244, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 20px rgba(30, 36, 28, 0.1);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 1;
}
.nav-links a {
  position: relative;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #4a4036;
  padding: 8px 11px;
  border-radius: 8px;
  transition: color 0.15s ease, background 0.15s ease;
}
.nav-links a:hover { color: #6b3a14; background: rgba(120, 72, 32, 0.08); }
.nav-links a[aria-current="page"] { color: #6b3a14; background: rgba(120, 72, 32, 0.1); }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  padding: 10px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--ink);
  border-radius: 2px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  cursor: pointer;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.01em;
  border-radius: 9px;
  padding: 10px 16px;
  color: #3a2610;
  background: #efe6d8;
  transition: background 0.15s ease, color 0.15s ease;
}
.btn-sm { padding: 8px 14px; font-size: 14px; border-radius: 9px; height: 40px; }
.btn-gold {
  background: #e4a322;
  color: #3a2610;
}
.btn-gold:hover { background: #d49416; transform: none; filter: none; box-shadow: none; }
.btn-gold:active { background: #c48612; transform: none; box-shadow: none; }
.btn-wide { width: 100%; }
.nav-actions { gap: 6px; }
.nav .btn-discord {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 9px;
  background: #5865f2;
  color: white;
  box-shadow: none;
}
.btn-discord {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 9px;
  background: #5865f2;
  color: white;
  cursor: pointer;
}
.discord-band .btn-discord,
.btn.btn-discord {
  width: auto;
  height: 42px;
  padding: 0 14px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}
.nav .btn-discord:hover,
.btn-discord:hover {
  background: #4752c4;
  transform: none;
  box-shadow: none;
}
.btn-discord:active { background: #3c45a5; transform: none; box-shadow: none; }
.btn-ghost {
  background: rgba(255, 255, 255, 0.16);
  color: white;
  box-shadow: none;
}
.btn-mint {
  background: #1f8f62;
  color: white;
  box-shadow: 0 3px 0 #146845;
  text-transform: none;
  letter-spacing: 0;
  border-radius: 10px;
  padding: 8px 14px;
}
.btn-text {
  background: transparent;
  color: #1d3b34;
  box-shadow: none;
  text-transform: none;
  letter-spacing: 0;
  padding: 8px 10px;
}

.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 110px 16px 70px;
  background: #14324a;
  overflow: hidden;
}
.hero-video {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  transform-origin: center center;
  will-change: transform, opacity;
}
.hero-video iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100vw;
  height: 56.25vw;
  min-width: 177.78vh;
  min-height: 100%;
  transform: translate(-50%, -50%) scale(1.45);
  border: 0;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(12, 24, 36, 0.28), transparent 28% 72%, rgba(12, 24, 36, 0.35));
}
.hero-tower {
  width: min(250px, 68vw);
  animation: bob 5s ease-in-out infinite;
  filter: drop-shadow(0 22px 16px rgba(90, 60, 20, 0.16));
}
.ip-pill {
  margin-top: 28px;
  position: relative;
  z-index: 2;
  border: 0;
  cursor: pointer;
  color: #3a2610;
  font-weight: 700;
  background: #e4a322;
  box-shadow: 0 8px 18px rgba(20, 16, 8, 0.18);
  border-radius: 9px;
  padding: 12px 22px;
  font-size: 15px;
  letter-spacing: 0.02em;
}
.ip-pill {
  will-change: transform, opacity;
}
.ip-pill:hover { background: #d49416; }
.ip-pill:active { background: #c48612; }
.scroll-cue { will-change: opacity; }

.page-home .nav.is-scrolled {
  box-shadow: 0 12px 28px rgba(30, 36, 28, 0.14);
  background: rgba(255, 250, 244, 0.96);
}

.reveal {
  opacity: 0;
  transition:
    opacity 0.75s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.is-visible {
  opacity: 1;
  transform: none !important;
}
.reveal-up { transform: translateY(36px); }
.reveal-up-sm { transform: translateY(30px); }
.reveal-up-lg { transform: translateY(-100px); }
.reveal-left { transform: translateX(-100px); }
.reveal-right { transform: translateX(100px); }
.reveal-right-lg { transform: translateX(200px); }
.ip-badge {
  position: absolute;
  top: -10px;
  right: -8px;
  min-width: 28px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: #e23b32;
  color: white;
  font-size: 11px;
  display: grid;
  place-items: center;
  box-shadow: 0 2px 0 #a8241d;
}
.scroll-cue {
  position: absolute;
  z-index: 2;
  bottom: 22px;
  width: 28px;
  height: 44px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 16px;
  text-decoration: none;
  transition: transform 0.2s ease, background 0.2s ease;
}
.scroll-cue:hover {
  transform: translateY(4px);
  background: rgba(255, 255, 255, 0.16);
}
.scroll-cue span {
  position: absolute;
  left: 50%;
  top: 8px;
  width: 4px;
  height: 8px;
  margin-left: -2px;
  border-radius: 4px;
  background: white;
  animation: cue 1.4s ease-in-out infinite;
}
.rock {
  position: absolute;
  bottom: 8%;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #d9cbb8, #9a8874 70%);
  opacity: 0.7;
}
.rock-a { left: 6%; width: 90px; height: 34px; }
.rock-b { left: 12%; bottom: 6%; width: 36px; height: 16px; }

.section { padding: 72px 20px; }
.wrap { width: min(1040px, 100%); margin: 0 auto; }
.center { text-align: center; }
h1, h2, h3, .display { font-family: var(--display); font-weight: 800; letter-spacing: 0.01em; }
.display {
  margin: 0 0 12px;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.15;
  text-transform: uppercase;
}
.lead { margin: 0 auto 22px; max-width: 680px; color: var(--muted); font-size: 18px; }

.split {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 28px;
  align-items: center;
}
.panel {
  background: var(--brown);
  color: white;
  border-radius: 28px;
  padding: 28px;
  box-shadow: var(--shadow);
}
.panel h2, .panel h3 { margin: 0 0 8px; text-transform: uppercase; }
.panel p { margin: 0 0 16px; color: rgba(255, 255, 255, 0.86); }
.meta-row { display: grid; gap: 12px; }
.meta-label { display: block; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.75; }
.meta-value {
  display: block;
  margin-top: 4px;
  font-family: var(--display);
  font-size: 22px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.version-chip {
  display: inline-block;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  padding: 6px 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.band { background: linear-gradient(180deg, rgba(255,255,255,.35), transparent); }
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}
.stats li {
  background: white;
  border-radius: 18px;
  padding: 22px 16px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.25s ease;
}
.stats li:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 24px rgba(40, 28, 12, 0.12);
}
.stats strong {
  display: block;
  font-family: var(--display);
  font-size: 28px;
  color: var(--brown);
}
.stats span { color: var(--muted); font-weight: 700; }

.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 22px; }
.card {
  display: block;
  text-decoration: none;
  background: white;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.28s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px rgba(40, 28, 12, 0.16);
}
.card-cover { height: 150px; transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1); }
.card:hover .card-cover { transform: scale(1.08); }
.cover-a { background: linear-gradient(135deg, #7ec8ea, #3f8f34 60%, #e39a55); }
.cover-b { background: linear-gradient(135deg, #f0a61c, #8a4518 55%, #4f922c); }
.card-body { padding: 16px 18px 20px; }
.card-body h3 { margin: 0 0 6px; font-size: 22px; }
.card-body p { margin: 0; color: var(--muted); }

.discord-band {
  margin: 10px auto 0;
  width: min(1040px, calc(100% - 40px));
  background: linear-gradient(135deg, #6a74f5, #5865f2 40%, #8a4518);
  color: white;
  border-radius: 28px;
  padding: 36px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  box-shadow: var(--shadow);
}
.discord-band h2 { margin: 0 0 8px; text-transform: uppercase; }
.discord-band p { margin: 0; max-width: 560px; }
.discord-band .btn-discord { width: auto; padding: 0 16px; height: 46px; gap: 8px; font-weight: 800; }

.cta-final { text-align: center; }
.cta-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

body.island {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #6eafcc url("../assets/island.png") center / cover no-repeat fixed;
}
body.island main { flex: 1 0 auto; }
body.island .play-scene,
body.island .vote-scene,
body.island .page-shell { background: transparent; }
body.island .world,
body.island .float-chunk { display: none; }
body.island .kicker,
body.island .page-title { color: #fffaf3; text-shadow: 0 1px 12px rgba(10, 24, 32, 0.45); }
body.island .page-shell > .wrap > .lead { color: rgba(255, 250, 243, 0.94); text-shadow: 0 1px 8px rgba(10, 24, 32, 0.4); }
.play-scene, .vote-scene {
  min-height: 100vh;
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 120px 16px 48px;
  background: #6eafcc;
  overflow: hidden;
}
.world {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center bottom;
  pointer-events: none;
}
.float-chunk {
  position: absolute;
  left: 50%;
  top: 108px;
  width: min(240px, 42vw);
  transform: translateX(-50%);
  animation: bob 4.8s ease-in-out infinite;
  filter: drop-shadow(0 16px 10px rgba(20, 50, 70, 0.2));
  pointer-events: none;
  z-index: 1;
}
.join-card, .vote-card {
  position: relative;
  z-index: 2;
  width: min(920px, 100%);
  background: rgba(78, 44, 24, 0.9);
  color: #fff8f0;
  border-radius: 18px;
  padding: 28px 26px 24px;
  box-shadow: 0 16px 36px rgba(16, 12, 8, 0.28);
  backdrop-filter: blur(8px);
}
.join-card h1, .vote-card h1 {
  margin: 0;
  text-align: center;
  font-size: clamp(26px, 4vw, 36px);
}
.seg {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 18px 0 22px;
}
.seg button {
  border: 0;
  cursor: pointer;
  min-width: 120px;
  padding: 12px 18px;
  border-radius: 12px;
  font-weight: 700;
  letter-spacing: 0;
  background: rgba(255, 255, 255, 0.12);
  color: white;
  border-radius: 9px;
  transition: background 0.15s ease, color 0.15s ease;
}
.seg button:hover { background: rgba(255, 255, 255, 0.2); }
.seg button[aria-selected="true"],
.seg button[aria-selected="true"]:hover {
  background: #e4a322;
  color: #3a2610;
  box-shadow: none;
}
.join-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 22px;
  align-items: center;
}
.media-card {
  background: #161616;
  border-radius: 16px;
  overflow: hidden;
  min-height: 240px;
  display: flex;
  flex-direction: column;
}
.media-top {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 12px 14px 0;
  color: white;
}
.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #8dcc55, #7ec8ea);
}
.media-top strong { display: block; font-size: 14px; }
.media-top span { font-size: 12px; opacity: 0.7; }
.media-art {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 8px 12px 16px;
}
.media-art img { width: min(180px, 70%); }
.join-copy h2 { margin: 0 0 10px; text-transform: uppercase; font-size: 28px; }
.join-copy ol { margin: 0 0 18px; padding-left: 18px; }
.join-copy li { margin: 7px 0; }
.join-copy em {
  font-style: normal;
  color: #ffd56a;
  font-weight: 800;
}

.vote-card { text-align: center; }
.vote-lead { margin: 8px auto 18px; max-width: 520px; color: rgba(255,255,255,.88); }
.vote-form {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.vote-form input {
  border: 0;
  border-radius: 12px;
  padding: 12px 14px;
  min-width: min(280px, 100%);
  font-size: 16px;
}
.vote-sites { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.site-btn {
  min-width: 180px;
  border: 0;
  border-radius: 14px;
  padding: 14px 16px;
  cursor: pointer;
  background: white;
  color: var(--ink);
  font-weight: 800;
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.22s ease;
}
.site-btn small { display: block; font-weight: 700; color: var(--muted); }
.site-btn:not(:disabled):hover { background: #f6f1e8; }
.site-btn:disabled { opacity: 0.55; cursor: not-allowed; }
.board {
  margin-top: 22px;
  text-align: left;
  background: rgba(0, 0, 0, 0.16);
  border-radius: 16px;
  padding: 14px;
}
.board h2 { margin: 0 0 10px; font-size: 22px; text-transform: uppercase; }
.board ol { margin: 0; padding-left: 22px; }
.board li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; }
.empty-note { margin: 0; opacity: 0.85; }

.page-shell { padding: 120px 20px 64px; }
.page-shell .wrap { width: min(980px, 100%); }
.page-title { margin: 0 0 8px; font-size: clamp(32px, 5vw, 48px); text-transform: uppercase; }
.shop-grid, .wiki-list { display: grid; gap: 14px; }
.shop-grid { grid-template-columns: repeat(3, 1fr); }
.product, .wiki-item, .prose, .legal {
  background: white;
  border-radius: 18px;
  padding: 18px;
  box-shadow: var(--shadow);
}
.product { transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.25s ease; }
.product:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 28px rgba(40, 28, 12, 0.12);
}
.product h2 { margin: 0 0 6px; font-size: 24px; }
.price { font-family: var(--display); font-size: 28px; color: var(--brown); margin: 8px 0; }
.product ul { margin: 0 0 14px; padding-left: 18px; color: var(--muted); }
.cart-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 8px 0 18px;
}
.cart-panel { margin-top: 18px; }
.cart-line { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.search {
  width: 100%;
  margin: 8px 0 16px;
  border: 0;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 16px;
  box-shadow: var(--shadow);
}
.wiki-item { padding: 0; }
.wiki-item summary {
  cursor: pointer;
  padding: 16px 18px;
  font-family: var(--display);
  font-size: 22px;
  border-radius: 18px;
  transition: background 0.2s ease, color 0.2s ease;
}
.wiki-item summary:hover { background: #fff4e4; color: var(--brown); }
.wiki-item div { padding: 0 18px 16px; color: var(--muted); }
.prose h1, .legal h1 { margin-top: 0; text-transform: uppercase; }
.prose p, .legal p, .legal li { color: var(--muted); }
.kicker { font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--brown); font-size: 13px; }

.site-footer {
  background: #f8edd9;
  border-top: 1px solid rgba(255,255,255,.6);
  padding: 36px 20px 28px;
}
.footer-grid {
  width: min(1040px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.3fr 0.8fr 1fr;
  gap: 24px;
}
.footer-brand { font-family: var(--display); font-size: 20px; margin: 0 0 8px; }
.site-footer p { margin: 0 0 6px; color: var(--muted); }
.site-footer a, .linkish {
  display: block;
  color: var(--ink);
  text-decoration: none;
  background: none;
  border: 0;
  padding: 0;
  margin: 4px 0;
  cursor: pointer;
  font-weight: 700;
  text-align: left;
  transition: color 0.2s ease, transform 0.2s ease;
}
.site-footer a:hover, .linkish:hover {
  color: var(--brown);
  transform: translateX(4px);
}
.search:focus, .vote-form input:focus {
  outline: 3px solid #f5b42a;
  outline-offset: 2px;
}
:focus-visible {
  outline: 3px solid #f5b42a;
  outline-offset: 3px;
}
.footer-title { font-weight: 800; margin: 12px 0 6px; color: var(--ink); }
.footer-title:first-child { margin-top: 0; }

.cookie {
  position: fixed;
  right: 16px;
  bottom: 16px;
  width: min(380px, calc(100% - 24px));
  background: #e7f8f2;
  color: #1d3b34;
  border-radius: 16px;
  padding: 16px 16px 12px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.16);
  z-index: 60;
}
.cookie h2 { margin: 0 0 6px; font-size: 16px; }
.cookie p { margin: 0 0 10px; font-size: 14px; }
.cookie-actions { display: flex; gap: 8px; align-items: center; }
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(12px);
  background: #2b2118;
  color: white;
  padding: 12px 16px;
  border-radius: 12px;
  opacity: 0;
  pointer-events: none;
  transition: 0.2s ease;
  z-index: 70;
  max-width: min(520px, calc(100% - 24px));
}
.toast.is-on { opacity: 1; transform: translateX(-50%) translateY(0); }

@keyframes bob {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-10px); }
}
.hero-tower { animation-name: bob-plain; }
@keyframes bob-plain {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
@keyframes cue {
  0% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(10px); }
}

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav { padding-left: 8px; }
  .nav-links {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--shadow);
  }
  .nav-links.is-open { display: flex; }
  .split, .join-grid, .cards, .stats, .shop-grid, .footer-grid { grid-template-columns: 1fr; }
  .discord-band { flex-direction: column; align-items: flex-start; }
  .float-chunk { width: 130px; top: 76px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    scroll-behavior: auto !important;
    transition: none !important;
  }
  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
}
