/* Overwyld website - colours taken from the game's own UI (game_menu.gd palette) */
:root {
  --panel: #2b2d42;
  --panel-lt: #4a4e6e;
  --panel-dk: #1f2033;
  --slot: #232437;
  --slot-dk: #17182a;
  --edge: #1b1b2a;
  --gold: #c9a86a;
  --yellow: #ffd34d;
  --white: #ffffff;
  --grey: #b8bcd6;
  --dim: #7a7e9a;
  --green: #6ee36e;
  --red: #ff6b6b;
  --blue: #8fc8ff;
  --bg: #12131f;
  --pixel: "Press Start 2P", monospace;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--grey);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img.px, .px { image-rendering: pixelated; image-rendering: crisp-edges; }
a { color: var(--yellow); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, .pixel { font-family: var(--pixel); font-weight: 400; letter-spacing: 0.02em; }
h1 { color: var(--yellow); font-size: 22px; line-height: 1.5; margin: 0 0 16px; }
h2 { color: var(--gold); font-size: 16px; line-height: 1.6; margin: 48px 0 16px; }
h3 { color: var(--white); font-size: 11px; line-height: 1.7; margin: 24px 0 8px; }
p { margin: 0 0 14px; }
strong { color: var(--white); font-weight: 600; }

/* ---------- pixel panel: the game's window frame (dark edge, light top-left, dark bottom-right) */
.panel {
  background: var(--panel);
  border: 3px solid var(--edge);
  box-shadow: inset 2px 2px 0 var(--panel-lt), inset -2px -2px 0 var(--panel-dk), 0 6px 0 rgba(0,0,0,0.35);
  padding: 22px;
}
.panel.gold { box-shadow: inset 2px 2px 0 var(--panel-lt), inset -2px -2px 0 var(--panel-dk), inset 0 0 0 5px var(--panel), inset 0 0 0 6px var(--gold), 0 6px 0 rgba(0,0,0,0.35); }

/* ---------- buttons (like the title screen's gold / dark buttons) */
.btn {
  display: inline-block;
  font-family: var(--pixel);
  font-size: 12px;
  line-height: 1;
  padding: 14px 22px 13px;
  border: 3px solid var(--edge);
  cursor: pointer;
  text-decoration: none !important;
  transition: transform 0.06s;
  user-select: none;
}
.btn:active { transform: translateY(2px); }
.btn-gold { background: #e0a82a; color: #2a1a08; box-shadow: inset 2px 2px 0 #ffd76a, inset -2px -3px 0 #a8701a; }
.btn-gold:hover { background: #f0b83a; }
.btn-dark { background: var(--slot); color: var(--grey); box-shadow: inset 2px 2px 0 var(--panel-lt), inset -2px -3px 0 var(--slot-dk); }
.btn-dark:hover { color: var(--white); background: #2e3050; }
.btn-red { background: #8a2a2e; color: var(--white); box-shadow: inset 2px 2px 0 #c04a4a, inset -2px -3px 0 #3a1418; }
.btn[disabled] { opacity: 0.5; cursor: default; }

/* ---------- top bar */
.nav {
  position: sticky; top: 0; z-index: 20;
  background: rgba(23, 24, 42, 0.94);
  border-bottom: 3px solid var(--edge);
  box-shadow: inset 0 -2px 0 var(--panel-lt);
}
.nav-in { max-width: 1120px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 18px; }
.nav .brand { display: flex; align-items: center; gap: 10px; }
.nav .brand img { height: 22px; width: auto; }
.nav .links { display: flex; gap: 18px; margin-left: auto; align-items: center; flex-wrap: wrap; }
.nav .links a { font-family: var(--pixel); font-size: 10px; color: var(--grey); }
.nav .links a:hover, .nav .links a.on { color: var(--yellow); text-decoration: none; }
.nav .links .btn { font-size: 10px; padding: 10px 14px 9px; }
.nav .who { font-size: 12px; color: var(--dim); }
@media (max-width: 720px) {
  .nav-in { flex-wrap: wrap; gap: 10px; }
  .nav .links { margin-left: 0; gap: 12px; width: 100%; }
}

/* ---------- hero */
.hero { position: relative; overflow: hidden; border-bottom: 3px solid var(--edge); }
.hero .bg {
  position: absolute; inset: 0;
  background: url(../img/hero.png) center bottom / cover no-repeat;
  image-rendering: pixelated;
}
.hero .bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(18,19,31,0) 40%, rgba(18,19,31,0.85) 100%); }
.hero-in { position: relative; max-width: 1120px; margin: 0 auto; padding: 96px 16px 80px; text-align: center; }
.hero .logo { width: min(688px, 92%); height: auto; filter: drop-shadow(0 4px 0 rgba(0,0,0,0.45)); }
.hero .tag { font-family: var(--pixel); color: var(--white); font-size: 12px; line-height: 1.9; margin: 26px auto 30px; max-width: 640px; text-shadow: 2px 2px 0 #000; }
.hero .cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero .note { margin-top: 18px; font-size: 13px; color: var(--white); text-shadow: 1px 1px 0 #000; }

/* ---------- sections */
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.section { padding: 64px 0; }
.section.alt { background: #171828; border-top: 3px solid var(--edge); border-bottom: 3px solid var(--edge); }
.section-title { text-align: center; margin: 0 0 8px; }
.section-sub { text-align: center; color: var(--dim); margin: 0 auto 36px; max-width: 640px; }
.grid { display: grid; gap: 20px; }
.grid.g3 { grid-template-columns: repeat(3, 1fr); }
.grid.g4 { grid-template-columns: repeat(4, 1fr); }
.grid.g2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) { .grid.g3, .grid.g4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid.g3, .grid.g4, .grid.g2 { grid-template-columns: 1fr; } }

.feature h3 { margin-top: 0; color: var(--yellow); }
.feature p { margin: 0; font-size: 15px; }
.shot { display: block; width: 100%; height: auto; border: 3px solid var(--edge); box-shadow: 0 0 0 2px var(--panel-lt); }
.shot-cap { font-size: 13px; color: var(--dim); margin-top: 8px; text-align: center; }

.class-card { text-align: center; }
.class-card .sprite { height: 120px; display: flex; align-items: flex-end; justify-content: center; margin-bottom: 14px; }
.class-card .sprite img { height: 100%; width: auto; image-rendering: pixelated; }
.class-card h3 { margin: 0 0 6px; color: var(--yellow); }
.class-card .passive { font-family: var(--pixel); font-size: 9px; color: var(--gold); margin-bottom: 8px; }
.class-card p { font-size: 14px; margin: 0; }

/* ---------- forms */
.auth-page { min-height: calc(100vh - 60px); display: flex; align-items: center; justify-content: center; padding: 40px 16px;
  background: url(../img/hero.png) center bottom / cover no-repeat; image-rendering: pixelated; }
.auth-box { width: 100%; max-width: 420px; image-rendering: auto; }
.tabs { display: flex; gap: 6px; margin-bottom: 18px; }
.tabs button { flex: 1; font-family: var(--pixel); font-size: 10px; padding: 11px 6px 10px; background: var(--slot); color: var(--dim);
  border: 3px solid var(--edge); box-shadow: inset 2px 2px 0 var(--panel-lt), inset -2px -2px 0 var(--slot-dk); cursor: pointer; }
.tabs button.on { color: var(--yellow); background: var(--panel-dk); box-shadow: inset 0 0 0 2px var(--gold); }
label { display: block; font-family: var(--pixel); font-size: 9px; color: var(--gold); margin: 14px 0 7px; }
input[type=email], input[type=password], input[type=text] {
  width: 100%; font: 16px var(--body); color: var(--white); background: var(--slot-dk);
  border: 3px solid var(--edge); box-shadow: inset 2px 2px 0 #0e0f1a, 0 0 0 1px var(--panel-lt); padding: 11px 12px; outline: none;
}
input:focus { box-shadow: inset 2px 2px 0 #0e0f1a, 0 0 0 2px var(--yellow); }
.form-actions { margin-top: 22px; display: flex; flex-direction: column; gap: 12px; }
.form-actions .btn { width: 100%; text-align: center; }
.msg { margin-top: 14px; font-size: 14px; min-height: 1.4em; }
.msg.err { color: var(--red); }
.msg.ok { color: var(--green); }
.small { font-size: 13px; color: var(--dim); }
.linkbtn { background: none; border: 0; color: var(--yellow); font: 13px var(--body); cursor: pointer; padding: 0; }
.linkbtn:hover { text-decoration: underline; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--grey); margin-top: 14px; }
.check input { margin-top: 3px; }

/* ---------- play page */
.play-page { display: flex; flex-direction: column; height: calc(100vh - 57px); background: #000; }
.play-frame { flex: 1; border: 0; width: 100%; display: block; background: #000; }
.play-bar { display: flex; align-items: center; gap: 14px; padding: 8px 16px; background: var(--slot-dk); border-top: 3px solid var(--edge); font-size: 13px; color: var(--dim); flex-wrap: wrap; }
.play-bar .grow { flex: 1; }

/* ---------- whitepaper */
.wp { display: grid; grid-template-columns: 240px 1fr; gap: 40px; padding: 48px 16px 80px; max-width: 1120px; margin: 0 auto; }
.wp-toc { position: sticky; top: 76px; align-self: start; max-height: calc(100vh - 96px); overflow: auto; }
.wp-toc .panel { padding: 16px; }
.wp-toc a { display: block; font-size: 13px; color: var(--grey); padding: 5px 0; }
.wp-toc a:hover { color: var(--yellow); text-decoration: none; }
.wp-toc .t { font-family: var(--pixel); font-size: 9px; color: var(--gold); margin-bottom: 8px; }
.wp-body { min-width: 0; max-width: 760px; }
.wp-body h2 { padding-top: 12px; border-top: 3px solid var(--panel-dk); scroll-margin-top: 80px; }
.wp-body h2:first-of-type { border-top: 0; margin-top: 0; }
.wp-body h3 { scroll-margin-top: 80px; }
.wp-body ul { padding-left: 20px; margin: 0 0 14px; }
.wp-body li { margin-bottom: 6px; }
.wp-body li::marker { color: var(--gold); }
@media (max-width: 860px) {
  .wp { grid-template-columns: 1fr; gap: 20px; }
  .wp-toc { position: static; max-height: none; }
}
.badge { display: inline-block; font-family: var(--pixel); font-size: 8px; padding: 5px 7px 4px; border: 2px solid var(--edge); vertical-align: middle; margin-left: 6px; line-height: 1; }
.badge.draft { background: #5a4a1a; color: var(--yellow); }
.badge.live { background: #1f4a2a; color: var(--green); }
.badge.soon { background: #23365a; color: var(--blue); }
.callout { border-left: 4px solid var(--gold); background: var(--panel-dk); padding: 14px 16px; margin: 0 0 16px; font-size: 15px; }
.callout.warn { border-left-color: var(--red); }
table.data { width: 100%; border-collapse: collapse; margin: 0 0 18px; font-size: 14px; }
table.data th, table.data td { text-align: left; padding: 9px 10px; border-bottom: 2px solid var(--panel-dk); vertical-align: top; }
table.data th { font-family: var(--pixel); font-size: 9px; color: var(--gold); font-weight: 400; background: var(--slot-dk); }
table.data td:first-child { color: var(--white); }
.table-scroll { overflow-x: auto; }
.flow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 6px 0 20px; }
.flow .step { background: var(--slot); border: 3px solid var(--edge); box-shadow: inset 2px 2px 0 var(--panel-lt); padding: 12px; font-size: 13px; }
.flow .step b { display: block; font-family: var(--pixel); font-size: 9px; color: var(--yellow); margin-bottom: 6px; font-weight: 400; }
@media (max-width: 640px) { .flow { grid-template-columns: 1fr 1fr; } }

.roadmap { display: grid; gap: 14px; }
.roadmap .row { display: grid; grid-template-columns: 150px 1fr; gap: 16px; align-items: start; }
.roadmap .when { font-family: var(--pixel); font-size: 9px; color: var(--gold); padding-top: 4px; line-height: 1.7; }
@media (max-width: 560px) { .roadmap .row { grid-template-columns: 1fr; gap: 4px; } }

/* ---------- footer */
.foot { border-top: 3px solid var(--edge); background: var(--slot-dk); padding: 28px 16px; text-align: center; font-size: 13px; color: var(--dim); }
.foot a { color: var(--grey); margin: 0 8px; }
.nav .links a.btn-gold, .nav .links a.btn-gold:hover { color: #2a1a08; }
[hidden] { display: none !important; }
