/* Ascensions Quest — marketing site.
   Palette is the Tower's: deep dark, gold for the climb, purple for the
   corruption. No web fonts, so the first paint costs one request. */

:root {
  --bg: #0e0b14;
  --bg-2: #141020;
  --panel: #191325;
  --panel-2: #1f1830;
  --line: #2c2340;
  --text: #ddd7e8;
  --head: #f3eefc;
  --muted: #948aab;
  --gold: #e8b64a;
  --gold-dim: #b98d2f;
  --rot: #8b5cf6;
  --wrap: 1120px;
  --radius: 14px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.7 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--gold); text-decoration-color: rgba(232, 182, 74, .35); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .92em;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: .1em .4em;
}

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

.skip {
  position: absolute; left: -9999px;
  background: var(--gold); color: #1a1206; padding: 10px 16px; border-radius: 0 0 8px 0; z-index: 100;
}
.skip:focus { left: 0; top: 0; }

/* ---------- headings ---------- */

h1, h2, h3, h4 {
  color: var(--head);
  font-family: ui-serif, Georgia, "Iowan Old Style", "Times New Roman", serif;
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 .5em;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2rem, 5vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.18rem; }

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

.muted { color: var(--muted); }
.small { font-size: .92rem; }
.lede { font-size: clamp(1.05rem, 2vw, 1.22rem); color: #c7c0d8; }

.eyebrow {
  font-family: ui-sans-serif, system-ui, sans-serif;
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: .75rem;
  font-weight: 600;
  color: var(--gold-dim);
  margin: 0 0 1rem;
}

ul.plain { list-style: none; margin: 0; padding: 0; }
ul.plain li { margin-bottom: .4em; }

/* ---------- top bar ---------- */

.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(14, 11, 20, .82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner { display: flex; align-items: center; gap: 24px; height: 66px; }

.brand {
  display: flex; align-items: center; gap: 10px;
  color: var(--head); text-decoration: none;
  font-family: ui-serif, Georgia, serif; font-size: 1.06rem; font-weight: 600;
  letter-spacing: .01em;
  white-space: nowrap;
}
.brand img { border-radius: 6px; }

.topbar nav { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.topbar nav a {
  color: var(--muted); text-decoration: none;
  padding: 7px 12px; border-radius: 8px; font-size: .95rem;
}
.topbar nav a:hover { color: var(--head); background: var(--panel); }
.topbar nav a[aria-current="page"] { color: var(--gold); }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--gold); color: #1a1206;
  font-weight: 650; font-size: 1rem;
  padding: 13px 24px; border-radius: 10px;
  border: 1px solid var(--gold);
  text-decoration: none; cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.btn:hover { background: #f0c463; transform: translateY(-1px); box-shadow: 0 8px 22px rgba(232, 182, 74, .22); }
.btn-sm { padding: 8px 16px; font-size: .9rem; border-radius: 8px; }
.btn-ghost {
  background: transparent; color: var(--head);
  border: 1px solid var(--line);
}
.btn-ghost:hover { background: var(--panel); border-color: #3d3157; box-shadow: none; }

/* ---------- hero ---------- */

.hero {
  position: relative;
  padding: clamp(56px, 9vw, 104px) 0 clamp(48px, 7vw, 84px);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  background:
    radial-gradient(900px 420px at 78% -8%, rgba(139, 92, 246, .16), transparent 62%),
    radial-gradient(760px 380px at 12% 0%, rgba(232, 182, 74, .10), transparent 60%),
    linear-gradient(180deg, var(--bg-2), var(--bg));
}
/* faint floor lines, so the hero reads as a tower without needing art */
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(180deg, transparent 0 78px, rgba(255,255,255,.022) 78px 79px);
  mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent);
}
.hero > .wrap { position: relative; z-index: 1; }

.hero h1 {
  font-size: clamp(2.3rem, 6.2vw, 4.1rem);
  letter-spacing: .005em;
  margin-bottom: .35em;
  text-wrap: balance;
}
.hero h1 .rule { display: block; color: var(--gold); }
.hero .lede { max-width: 60ch; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

/* ---------- server address card ---------- */

.address {
  margin-top: 36px;
  display: inline-flex; flex-wrap: wrap; align-items: center; gap: 18px;
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 22px;
  max-width: 100%;
}
.address-label { font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin: 0 0 4px; }
.address-ip {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: clamp(1.1rem, 3vw, 1.5rem);
  color: var(--gold);
  margin: 0;
  word-break: break-all;
}
.address .btn { flex-shrink: 0; }

.status { display: flex; align-items: center; gap: 8px; font-size: .9rem; color: var(--muted); }
.status .dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--muted); flex-shrink: 0;
}
.status[data-state="online"] .dot { background: #4ade80; box-shadow: 0 0 0 4px rgba(74, 222, 128, .16); }
.status[data-state="offline"] .dot { background: #f87171; box-shadow: 0 0 0 4px rgba(248, 113, 113, .16); }

/* ---------- stats band ---------- */

.stats-band {
  background: var(--bg-2);
  border-bottom: 1px solid var(--line);
  padding: 34px 0;
}
.stats {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 20px 16px;
  /* Sized so all six fit on one row at full width; below that they fall to
     three-up and then two-up rather than leaving one stat stranded alone. */
  grid-template-columns: repeat(auto-fit, minmax(115px, 1fr));
  text-align: center;
}
.stats li { display: flex; flex-direction: column; gap: 4px; }
.stats strong {
  font-family: ui-serif, Georgia, serif;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  color: var(--gold);
  line-height: 1;
}
.stats span { font-size: .84rem; color: var(--muted); }

/* ---------- sections ---------- */

.section { padding: clamp(56px, 8vw, 92px) 0; }
.section + .section { border-top: 1px solid var(--line); }
.section-alt { background: var(--bg-2); }

.section-head { max-width: 68ch; margin-bottom: 44px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

.prose { max-width: 70ch; }
.prose h2 { margin-top: 2em; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.9em; color: var(--gold); }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .5em; }
.prose li::marker { color: var(--gold-dim); }

/* ---------- cards ---------- */

.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
}
.card h3 { margin-bottom: .5em; color: var(--head); }
.card p:last-child { margin-bottom: 0; }
.card .muted { font-size: .95rem; }

.card-link { text-decoration: none; color: inherit; display: block; transition: border-color .15s ease, transform .15s ease; }
.card-link:hover { border-color: var(--gold-dim); transform: translateY(-2px); }

.tag {
  display: inline-block;
  font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 650;
  color: var(--gold); background: rgba(232, 182, 74, .1);
  border: 1px solid rgba(232, 182, 74, .28);
  border-radius: 999px; padding: 3px 10px;
  margin-bottom: 14px;
}
.tag-rot { color: #c4a5fb; background: rgba(139, 92, 246, .12); border-color: rgba(139, 92, 246, .3); }
.tag-soon { color: var(--muted); background: transparent; border-color: var(--line); }

/* ---------- floor list ---------- */

.floors { display: grid; gap: 14px; }
.floor {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 22px;
  align-items: start;
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold-dim);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 22px 24px;
}
.floor.pending { border-left-color: var(--line); }
.floor-num {
  font-family: ui-serif, Georgia, serif;
  font-size: 2rem; line-height: 1; color: var(--gold);
  padding-top: 2px;
}
.floor.pending .floor-num { color: var(--muted); }
.floor h3 { margin-bottom: .3em; }
.floor p { margin-bottom: 0; color: var(--muted); }

/* A hero with no call to action underneath does not need the full drop. */
.hero-short { padding-bottom: 12px; }

/* ---------- screenshots ----------
   Minecraft art is pixel art. Letting the browser smooth it on resize turns
   crisp tooltips into mush, so scaling stays nearest-neighbour. */

figure.shot { margin: 0 0 8px; }
figure.shot img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  image-rendering: pixelated;
}
figure.shot figcaption {
  margin-top: 12px;
  font-size: .86rem;
  color: var(--muted);
  line-height: 1.55;
}

/* Text one side, screenshot the other, alternating down the page. */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
  margin-bottom: 88px;
}
.split:last-child { margin-bottom: 0; }
.split.flip > figure { order: -1; }
.split h2 { margin-top: 0; }
.split p { max-width: 52ch; }

.split-narrow { grid-template-columns: 1.15fr .85fr; }

/* A screenshot given the full column width, for the wide landscape shots. */
.showcase { margin: 0 0 72px; }
.showcase figcaption { max-width: 70ch; }

@media (max-width: 860px) {
  .split, .split-narrow { grid-template-columns: 1fr; gap: 28px; margin-bottom: 56px; }
  .split.flip > figure { order: 0; }
}

/* Discord's own blurple, so the button is recognisable at a glance rather than
   reading as just another ghost button. */
.btn-discord {
  background: #5865f2;
  border-color: #5865f2;
  color: #fff;
}
.btn-discord:hover { background: #4752c4; border-color: #4752c4; color: #fff; }

.cta-sub {
  margin: 28px auto 0;
  max-width: 52ch;
  color: var(--muted);
  font-size: .96rem;
}

/* A card that leads with a screenshot. The image sits flush to the card edges,
   so the card's own padding has to move onto the body instead. */
.card-shot { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.card-shot img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: center top;
  border-bottom: 1px solid var(--line);
  image-rendering: pixelated;
  background: #0b0810;
}
.card-shot .card-body { padding: 22px 24px 26px; }
.card-shot h3 { margin: 0 0 8px; }
.card-shot p { margin: 0; }

/* ---------- reference tables ----------
   The wiki is mostly tables, and on a phone they must scroll sideways rather
   than crushing a five-column stat block into unreadable slivers. */

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin: 0 0 28px;
  -webkit-overflow-scrolling: touch;
}
table.ref {
  width: 100%;
  border-collapse: collapse;
  font-size: .94rem;
  min-width: 520px;
}
table.ref caption {
  text-align: left;
  padding: 16px 20px 12px;
  color: var(--head);
  font-family: ui-serif, Georgia, serif;
  font-size: 1.05rem;
  font-weight: 600;
  border-bottom: 1px solid var(--line);
}
table.ref th, table.ref td { padding: 11px 16px; text-align: left; vertical-align: top; }
table.ref thead th {
  background: var(--panel-2);
  color: var(--muted);
  font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 650;
  white-space: nowrap;
  border-bottom: 1px solid var(--line);
}
table.ref tbody tr + tr { border-top: 1px solid rgba(44, 35, 64, .7); }
table.ref tbody tr:hover { background: rgba(255,255,255,.02); }
table.ref td:first-child { color: var(--head); font-weight: 600; white-space: nowrap; }
table.ref .num { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); white-space: nowrap; }
table.ref .desc { color: var(--muted); min-width: 240px; }

.ok { color: #6ee7a0; }
.no { color: #f79a9a; }

/* ---------- wiki chrome ---------- */

.subnav {
  display: flex; flex-wrap: wrap; gap: 8px;
  padding: 0 0 8px;
  margin-bottom: 8px;
}
.subnav a {
  font-size: .88rem; text-decoration: none;
  color: var(--muted);
  border: 1px solid var(--line); border-radius: 999px;
  padding: 6px 14px;
  background: var(--panel);
}
.subnav a:hover { color: var(--head); border-color: #3d3157; }
.subnav a[aria-current="page"] { color: var(--gold); border-color: rgba(232,182,74,.4); background: rgba(232,182,74,.08); }

.crumbs { font-size: .85rem; color: var(--muted); margin: 0 0 18px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--gold); }
.crumbs span { margin: 0 8px; opacity: .5; }

.toc {
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold-dim);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 20px 24px;
  margin-bottom: 40px;
}
.toc p { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.toc ul { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 32px; }
.toc li { margin-bottom: 6px; break-inside: avoid; }
.toc a { font-size: .94rem; }

.callout {
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 3px solid var(--rot);
  border-radius: 0 10px 10px 0;
  padding: 16px 20px;
  margin: 0 0 26px;
  font-size: .94rem;
  color: var(--muted);
}
.callout strong { color: var(--head); }

.wide { max-width: 100%; }
.wide h2 { margin-top: 2.4em; }
.wide h2:first-child { margin-top: 0; }
.wide h3 { margin-top: 1.8em; color: var(--gold); }
.wide > p, .wide > ul { max-width: 74ch; }
.wide ul { padding-left: 1.2em; }
.wide li { margin-bottom: .5em; }
.wide li::marker { color: var(--gold-dim); }

@media (max-width: 700px) {
  .toc ul { columns: 1; }
}

/* ---------- notice ---------- */

.notice {
  background: linear-gradient(180deg, rgba(139, 92, 246, .1), rgba(139, 92, 246, .04));
  border: 1px solid rgba(139, 92, 246, .28);
  border-radius: var(--radius);
  padding: 26px 28px;
}
.notice h3 { color: #c9b0fd; margin-bottom: .5em; }
.notice p:last-child { margin-bottom: 0; }

/* ---------- steps ---------- */

.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; }
.steps li {
  counter-increment: step;
  display: grid; grid-template-columns: 40px 1fr; gap: 18px; align-items: start;
}
.steps li::before {
  content: counter(step);
  display: grid; place-items: center;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--panel-2); border: 1px solid var(--line);
  color: var(--gold); font-weight: 700; font-size: .95rem;
}
.steps h3 { margin-bottom: .25em; font-size: 1.05rem; }
.steps p { margin-bottom: 0; color: var(--muted); }

/* ---------- faq ---------- */

.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); padding: 4px 0; }
.faq summary {
  cursor: pointer; list-style: none;
  padding: 18px 34px 18px 0; position: relative;
  color: var(--head); font-weight: 600;
  font-family: ui-serif, Georgia, serif; font-size: 1.06rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  color: var(--gold); font-size: 1.4rem; font-family: ui-sans-serif, system-ui, sans-serif;
}
.faq details[open] summary::after { content: "\2212"; }
.faq details > p { padding: 0 34px 20px 0; color: var(--muted); max-width: 78ch; }

/* ---------- cta ---------- */

.cta {
  text-align: center;
  background:
    radial-gradient(700px 300px at 50% 0%, rgba(232, 182, 74, .1), transparent 65%),
    var(--bg-2);
}
.cta .lede { margin-left: auto; margin-right: auto; max-width: 56ch; }
.cta .address { margin-left: auto; margin-right: auto; text-align: left; }

/* ---------- footer ---------- */

.footer { border-top: 1px solid var(--line); background: var(--bg-2); padding: 52px 0 44px; }
.footer-inner { display: grid; gap: 32px; grid-template-columns: 2fr 1fr 1fr; }
.footer-brand { font-family: ui-serif, Georgia, serif; color: var(--head); font-size: 1.1rem; margin: 0 0 .4em; }
.footer-head { color: var(--head); font-size: .8rem; letter-spacing: .13em; text-transform: uppercase; margin: 0 0 .9em; }
.footer a { color: var(--muted); text-decoration: none; }
.footer a:hover { color: var(--gold); }

@media (max-width: 760px) {
  .topbar-inner { height: auto; padding-top: 12px; padding-bottom: 12px; flex-wrap: wrap; gap: 12px; }
  .topbar nav { width: 100%; margin-left: 0; order: 3; }
  .footer-inner { grid-template-columns: 1fr; }
  .floor { grid-template-columns: 52px 1fr; gap: 16px; padding: 18px; }
  .floor-num { font-size: 1.6rem; }
  .address { display: block; }
  .address .btn { margin-top: 14px; }
  .status { margin-top: 12px; }
}

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