:root {
  --bg: #0d0f13;
  --bg-hero: radial-gradient(ellipse 900px 500px at 50% -10%, rgba(229, 161, 0, 0.16), transparent);
  --surface: #171a21;
  --surface-2: #1d212a;
  --border: #272c37;
  --text: #eceef2;
  --text-muted: #9ba0ad;
  --accent: #f0a61a;
  --accent-2: #ffcf6b;
  --accent-soft: rgba(240, 166, 26, 0.14);
  --max-width: 860px;
  --radius: 16px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  background-image: var(--bg-hero);
  background-repeat: no-repeat;
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(13, 15, 19, 0.72);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  padding: 18px 24px;
}

header .wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 17px;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.brand svg { flex-shrink: 0; }

.header-right { display: flex; align-items: center; gap: 20px; }

nav { display: flex; align-items: center; }

nav a {
  color: var(--text-muted);
  text-decoration: none;
  margin-left: 24px;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.15s ease;
}

nav a:hover { color: var(--text); }

.more-widget {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 6px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.more-widget:hover { border-color: #3a4152; transform: translateY(-1px); color: var(--text); }
.more-widget img { border-radius: 6px; display: block; flex-shrink: 0; }

.more-widget-text { display: flex; flex-direction: column; line-height: 1.2; }

.more-widget-label {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  font-weight: 600;
}

.more-widget-name { font-size: 13px; font-weight: 700; }

@media (max-width: 640px) {
  .more-widget-text { display: none; }
  .more-widget { padding: 6px; }

  /* The header previously had no collapse breakpoint at all -- measured
     in-browser, its content already needs more width than real phone
     viewports (360-412px) provide, so "Terms" and/or the DocuScape widget
     were clipped or crowded off the right edge with no way to reach them.
     Wrapping onto a second row (brand row, then nav+widget row) keeps
     every link reachable without needing a hamburger-menu script. */
  header .wrap { flex-wrap: wrap; row-gap: 10px; }
  .header-right { width: 100%; justify-content: space-between; flex-wrap: wrap; row-gap: 8px; }
  nav { flex-wrap: wrap; row-gap: 8px; }
  nav a { margin-left: 0; margin-right: 16px; }
}

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 64px 24px 88px;
}

main.hero-page { padding-top: 80px; }

h1 {
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
  line-height: 1.15;
}

h1 .accent {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

h2 { font-size: 22px; font-weight: 700; margin: 48px 0 14px; letter-spacing: -0.01em; }
h3 { font-size: 16px; font-weight: 600; margin: 24px 0 8px; color: var(--text); }
p { color: var(--text-muted); margin: 0 0 14px; }
p.lede { color: var(--text); font-size: 18px; max-width: 560px; }

ul, ol { color: var(--text-muted); padding-left: 22px; }
li { margin-bottom: 6px; }

a { color: var(--accent); }
a:hover { color: var(--accent-2); }

.updated {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 32px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  margin-bottom: 16px;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.card h3 { margin-top: 0; }

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin: 32px 0;
}

.grid .card:hover {
  transform: translateY(-2px);
  border-color: #3a4152;
}

.app-icon {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  font-size: 20px;
}

.app-icon.quest { background: var(--accent-soft); }
.app-icon.vault { background: rgba(122, 162, 247, 0.14); }

@media (max-width: 640px) {
  .grid { grid-template-columns: 1fr; }
  h1 { font-size: 32px; }
}

.btn {
  display: inline-block;
  background: var(--accent);
  color: #1a1200;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  padding: 12px 22px;
  border-radius: 10px;
  margin-top: 8px;
  transition: background 0.15s ease;
}

.btn:hover { background: var(--accent-2); color: #1a1200; }

.tag {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 16px;
}

hr.rule {
  border: none;
  border-top: 1px solid var(--border);
  margin: 56px 0;
}

.world-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 32px 0;
}

.world-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.world-card:hover { transform: translateY(-2px); border-color: #3a4152; }

.world-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: contain;
  display: block;
  background: var(--surface-2);
}

.world-card-label { padding: 12px 14px; }

.world-card .world-name {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent);
  font-weight: 700;
}

.world-card .card-name {
  font-size: 14px;
  font-weight: 600;
  margin-top: 2px;
  color: var(--text);
}

@media (max-width: 640px) {
  .world-gallery { grid-template-columns: repeat(2, 1fr); }
}

footer {
  border-top: 1px solid var(--border);
  padding: 32px 24px;
  text-align: center;
}

footer .wrap {
  max-width: var(--max-width);
  margin: 0 auto;
}

footer p { font-size: 13px; margin: 0; }
footer a { color: var(--text-muted); margin: 0 10px; text-decoration: none; }
footer a:hover { color: var(--text); }
