/* Planar Nexus website styles. One file, no framework, no outside fonts
   (outside fonts slow the first paint and need extra privacy notices).
   Colors come from Levi's logo: deep night blue, arcane violet, gold. */

:root {
  --bg: #0b1020;
  --panel: #131a30;
  --panel-2: #1a2342;
  --line: #2a3560;
  --text: #e6e9f5;
  --muted: #9aa3c7;
  --gold: #e2b75a;
  --violet: #8f6bff;
  --link: #9ecbff;
  --danger: #ff7b7b;
  --ok: #7be0a1;
  --radius: 10px;
  --max: 1080px;
}

* { box-sizing: border-box; }
html { color-scheme: dark; }
body {
  margin: 0;
  background: radial-gradient(1200px 600px at 50% -200px, #24185a 0%, var(--bg) 60%) no-repeat, var(--bg);
  color: var(--text);
  font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, sans-serif;
}
a { color: var(--link); }
a:hover { color: #fff; }
h1, h2, h3 { line-height: 1.25; font-family: Georgia, "Times New Roman", serif; letter-spacing: .01em; }
h1 { font-size: 2.1rem; margin: .4em 0 .5em; }
h2 { font-size: 1.5rem; margin: 1.6em 0 .5em; color: var(--gold); }
h3 { font-size: 1.15rem; margin: 0 0 .3em; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }

/* Skip link for keyboard users */
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; background: #fff; color: #000; padding: 6px 10px; z-index: 10; }

/* Header */
.top { border-bottom: 1px solid var(--line); background: rgba(11, 16, 32, .85); position: sticky; top: 0; z-index: 5; backdrop-filter: blur(6px); }
.top .wrap { display: flex; align-items: center; gap: 18px; min-height: 60px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 8px; color: var(--text); text-decoration: none; font-family: Georgia, serif; font-size: 1.2rem; font-weight: bold; }
.brand img { width: 32px; height: 32px; }
.top nav { display: flex; gap: 16px; flex-wrap: wrap; flex: 1; }
.top nav a { color: var(--muted); text-decoration: none; }
.top nav a:hover, .top nav a[aria-current="page"] { color: var(--text); }
.who { display: flex; gap: 10px; align-items: center; }
.who form { margin: 0; }

/* Buttons and forms */
.btn, button {
  display: inline-block; border: 1px solid var(--gold); background: linear-gradient(#e9c470, #c9973a);
  color: #1a1206; font-weight: 600; padding: 8px 16px; border-radius: 8px; text-decoration: none; cursor: pointer; font-size: 1rem;
}
.btn:hover, button:hover { filter: brightness(1.08); color: #1a1206; }
.btn.ghost, button.ghost { background: transparent; color: var(--text); border-color: var(--line); }
button.link { background: none; border: none; color: var(--link); padding: 0; font-weight: normal; text-decoration: underline; }
button.danger { background: transparent; color: var(--danger); border-color: var(--danger); }
label { display: block; margin: 12px 0 4px; font-weight: 600; }
input[type=text], input[type=password], textarea, select {
  width: 100%; padding: 9px 11px; border-radius: 8px; border: 1px solid var(--line); background: #0d1328; color: var(--text); font: inherit;
}
textarea { min-height: 160px; resize: vertical; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--violet); outline-offset: 1px; }
.form { max-width: 440px; }
.form button { margin-top: 16px; }
.hp { position: absolute; left: -5000px; } /* honeypot field: people never see it, bots fill it */
.notice { border: 1px solid var(--line); background: var(--panel); padding: 10px 14px; border-radius: var(--radius); margin: 14px 0; }
.notice.error { border-color: var(--danger); color: #ffd2d2; }
.notice.ok { border-color: var(--ok); color: #d4ffe4; }

/* Full-width band inside the centered page (used by the home hero). */
body { overflow-x: hidden; }
.bleed { margin-left: calc(50% - 50vw); width: 100vw; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.center { text-align: center; }
section { margin-top: 56px; }

/* Home hero. hero-sky.webp is Levi's floating-islands sky (ChatGPT, Dec 5);
   replace the file (same name, wide, calm in the middle) to change it. */
.hero {
  text-align: center; margin-top: 0; padding: 48px 0 72px;
  /* The gradient darkens the middle (where the words are) and blends the
     bottom edge into the page. */
  background:
    radial-gradient(ellipse 55% 60% at 50% 55%, rgba(8, 11, 26, .55), transparent 70%),
    linear-gradient(transparent 70%, var(--bg)),
    url("hero-sky.webp") center / cover no-repeat, var(--bg);
}
.hero h1 { margin: 0; }
.hero .logo { width: min(760px, 100%); height: auto; filter: drop-shadow(0 8px 30px rgba(120, 90, 255, .35)); }
.hero .tagline { font-family: Georgia, serif; font-size: 1.45rem; color: var(--gold); margin: 6px 0 4px; letter-spacing: .02em; }
.hero .lead { font-size: 1.2rem; color: #c9cfea; max-width: 640px; margin: 6px auto 26px; }
.cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn.big { padding: 12px 24px; font-size: 1.08rem; }
.lead-sm { font-size: 1.12rem; color: #c9cfea; max-width: 760px; }
.showcase { margin: 24px auto; display: block; width: 100%; max-width: 960px; height: auto; border-radius: 14px; border: 1px solid var(--line); box-shadow: 0 20px 60px rgba(0,0,0,.5); }

/* Cards */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.grid.three { grid-template-columns: repeat(3, 1fr); }
.grid.two { grid-template-columns: repeat(2, 1fr); }
.card {
  background: linear-gradient(180deg, var(--panel-2), var(--panel)); border: 1px solid var(--line);
  border-top: 2px solid rgba(226, 183, 90, .55); border-radius: var(--radius); padding: 20px 22px;
  transition: transform .15s ease, border-color .15s ease;
}
.card:hover { transform: translateY(-2px); border-color: #3b4a85; }
.card h2, .card h3 { color: var(--gold); margin: 0 0 .4em; font-size: 1.18rem; }
.card p { margin: 0; color: var(--muted); }
.card .card-art { display: block; width: calc(100% + 44px); height: auto; aspect-ratio: 1; margin: -20px -22px 16px; border-radius: var(--radius) var(--radius) 0 0; object-fit: cover; }
.grid.three .card .card-art { aspect-ratio: 4 / 3; }
/* Features page: picture beside the words */
.card.wide-art { display: grid; grid-template-columns: 160px 1fr; gap: 18px; align-items: start; }
.card.wide-art .card-art { width: 160px; margin: 0; border-radius: 8px; }

/* Map gallery */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 18px; }
.gallery figure { margin: 0; position: relative; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: #000; }
.gallery img { display: block; width: 100%; height: auto; aspect-ratio: 1; transition: transform .3s ease; }
.gallery figure:hover img { transform: scale(1.04); }
.gallery figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 12px 9px; font-size: .92rem; font-weight: 600;
  background: linear-gradient(transparent, rgba(5, 8, 18, .88));
}

/* Getting started steps */
.steps { list-style: none; counter-reset: s; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.steps li { counter-increment: s; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 20px 20px 68px; position: relative; color: var(--muted); }
.steps li strong { color: var(--text); display: block; }
.steps li::before {
  content: counter(s); position: absolute; left: 18px; top: 18px; width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 700; color: #1a1206; background: linear-gradient(#e9c470, #c9973a);
}
.planned li { margin: 6px 0; color: #c9cfea; }

/* FAQ */
section.faq { max-width: 820px; margin-left: auto; margin-right: auto; }
.faq details { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; margin: 10px 0; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq details p { margin: 10px 0 2px; color: var(--muted); }

/* Forums */
table.list { width: 100%; border-collapse: collapse; }
table.list th, table.list td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.list th { color: var(--muted); font-weight: 600; font-size: .9rem; }
table.list td.num { text-align: right; white-space: nowrap; color: var(--muted); }
.tag { display: inline-block; font-size: .75rem; padding: 1px 7px; border-radius: 99px; border: 1px solid var(--line); color: var(--muted); margin-left: 6px; vertical-align: 2px; }
.tag.admin { border-color: var(--gold); color: var(--gold); }
.tag.dm { border-color: var(--violet); color: #c7b8ff; }
.post { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); margin: 12px 0; }
.post header { padding: 8px 14px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.post .body { padding: 12px 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.post .tools { padding: 0 14px 10px; }
.crumbs { color: var(--muted); font-size: .92rem; margin-top: 18px; }
.crumbs a { color: var(--muted); }
.pager { display: flex; gap: 12px; margin: 16px 0; }
.inline { display: inline; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* Footer */
footer.site { border-top: 1px solid var(--line); margin-top: 60px; padding: 24px 0 40px; color: var(--muted); font-size: .9rem; }
footer.site nav { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }
footer.site a { color: var(--muted); }

@media (max-width: 900px) {
  .grid.three, .steps { grid-template-columns: 1fr 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .grid.three, .grid.two, .steps { grid-template-columns: 1fr; }
  .card.wide-art { grid-template-columns: 96px 1fr; }
  .card.wide-art .card-art { width: 96px; }
  h1 { font-size: 1.7rem; }
  .top nav { order: 3; width: 100%; }
  table.list .hide-sm { display: none; }
}

/* Admin > Art */
.form.wide { max-width: 720px; }
code.key { display: block; padding: 10px; background: #0d1328; border: 1px solid var(--line); border-radius: 8px; word-break: break-all; user-select: all; font-size: 1rem; }
.art-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.art-job { margin: 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.art-job img { display: block; width: 100%; height: 220px; object-fit: cover; }
.art-wait { height: 220px; display: grid; place-items: center; color: var(--muted); background: #0d1328; }
.art-wait.failed { color: var(--danger); }
.art-job figcaption { padding: 8px 10px; }
.err { color: var(--danger); }

/* Small helpers (the site's security rules block style="..." in pages). */
.row.spread { justify-content: space-between; }
.gap-top { margin-top: 12px; }
input.narrow { max-width: 260px; }
h2.faq-q { display: inline; font-size: 1.05rem; color: inherit; margin: 0; }
h2.flush { margin-top: 0; }

/* Play: the lobby (part 2) */
.games { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.card.game:hover { transform: none; }
.card.game p { margin: 6px 0; }
.players { margin: 8px 0; padding-left: 18px; color: var(--muted); }
.players form button.link { font-size: .85rem; margin-left: 6px; }
label.check { display: flex; gap: 8px; align-items: center; font-weight: normal; }
