:root {
  --paper: #E9ECEE;
  --surface: #F7F8F9;
  --inset: #EEF0F2;
  --ink: #14171B;
  --ink-2: #4A525C;
  --line: #CDD2D7;
  --line-soft: #DCE0E4;
  --gold: #F4B227;
  --teal: #47C9B8;
  --lilac: #B9A3FF;

  --display: "Anybody", "Arial Black", system-ui, sans-serif;
  --body: "Atkinson Hyperlegible Next", system-ui, sans-serif;
  --mono: "Atkinson Hyperlegible Mono", ui-monospace, "SFMono-Regular", monospace;

  --gutter: clamp(20px, 4vw, 48px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
}
svg { display: block; }
a { color: inherit; }
p { margin: 0; }
h1, h2, h3 {
  margin: 0;
  font-family: var(--display);
  font-weight: 780;
  line-height: 1.02;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.wrap { width: min(1200px, 100% - 2 * var(--gutter)); margin-inline: auto; }

.skip {
  position: absolute; left: 12px; top: -64px; z-index: 50;
  padding: 10px 14px; border-radius: 8px;
  background: var(--ink); color: var(--paper); font-weight: 700; text-decoration: none;
}
.skip:focus { top: 12px; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 6px; }

/* ---------- Top bar ---------- */
.top {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.2) blur(10px);
  -webkit-backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.top.is-scrolled { border-bottom-color: var(--line); }
.top-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-word { font-family: var(--display); font-weight: 820; font-stretch: 140%; font-size: 1.3rem; letter-spacing: -0.01em; }
.nav { display: flex; align-items: center; gap: 28px; font-size: .95rem; }
.nav a:not(.btn) { color: var(--ink-2); text-decoration: none; }
.nav a:not(.btn):hover { color: var(--ink); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: .85em 1.3em;
  border: 1.5px solid var(--ink); border-radius: 10px;
  font: 700 .95rem/1 var(--body);
  text-decoration: none;
  transition: background-color .15s, color .15s;
}
.btn-solid { background: var(--ink); color: var(--paper); }
.btn-solid:hover { background: #2B3139; border-color: #2B3139; }
.btn-line { color: var(--ink); }
.btn-line:hover { background: var(--ink); color: var(--paper); }
.top .btn { padding: .7em 1.1em; font-size: .9rem; }

/* ---------- Hero ---------- */
.hero { padding-block: clamp(40px, 7vw, 88px) 0; }
.eyebrow { font: 500 .875rem/1.4 var(--mono); color: var(--ink-2); margin-bottom: clamp(18px, 2.4vw, 28px); }
.hero h1 {
  font-size: clamp(2.3rem, 0.9rem + 5.6vw, 6rem);
  font-stretch: 122%;
  font-weight: 820;
  line-height: .94;
  letter-spacing: -0.028em;
}
.hero h1 span { display: block; }
.hero-sub {
  display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 28px 48px; align-items: end;
  margin-block: clamp(24px, 3vw, 40px) clamp(32px, 4.5vw, 56px);
}
.hero-sub p { font-size: clamp(1.06rem, .96rem + .4vw, 1.25rem); color: var(--ink-2); max-width: 54ch; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: flex-end; }

/* The signature: a game viewport with live chat showing tiers, queue and perks at work */
.scene { margin: 0; }
.viewport {
  position: relative;
  aspect-ratio: 16 / 7;
  min-height: 380px;
  border-radius: 18px;
  overflow: hidden;
  background: #2A3947;
  box-shadow: 0 40px 70px -40px rgba(20, 23, 27, .55);
}
.viewport > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.hud {
  position: absolute; top: clamp(12px, 2vw, 22px); right: clamp(12px, 2vw, 22px);
  display: flex; align-items: center; gap: 12px;
  padding: 8px 12px; border-radius: 8px;
  background: rgba(10, 13, 17, .55);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  color: #E6E9EC; font: 500 12.5px/1 var(--mono);
}
.hud .dot { width: 7px; height: 7px; border-radius: 50%; background: #5BD68A; }
.hud .q { color: var(--gold); }
.chat {
  position: absolute;
  left: clamp(12px, 2.4vw, 28px); bottom: clamp(12px, 2.4vw, 28px);
  width: min(620px, 100% - 2 * clamp(12px, 2.4vw, 28px));
  padding: 12px 16px;
  border-radius: 10px;
  background: rgba(10, 13, 17, .64);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  color: #E6E9EC;
  font: 500 14px/1.55 var(--mono);
}
.chat-log {
  height: 12.4em;
  display: flex; flex-direction: column; justify-content: flex-end;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 34%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 34%);
}
.chat-log p { padding: 1px 0; animation: line-in .45s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes line-in { from { opacity: 0; transform: translateY(10px); } }
.ts { color: #7E8892; margin-right: .7em; }
.tg { font-weight: 700; margin-right: .35em; }
.tg-mem { color: var(--teal); }
.tg-sup { color: var(--gold); }
.tg-fnd { color: var(--lilac); }
.who { color: #fff; font-weight: 700; }
.sys { color: #C3CAD1; }
.sys .glyph { color: var(--gold); margin-right: .5em; }
.sys b { color: #fff; }
.sys .dim { color: #8A949E; }
.scene figcaption { margin-top: 12px; font: 400 .85rem/1.45 var(--mono); color: var(--ink-2); }

/* ---------- Sections ---------- */
.section { padding-block: clamp(72px, 9vw, 128px); }
.section + .section { padding-top: 0; }
.section-head {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px 48px; align-items: end;
  margin-bottom: clamp(32px, 4.5vw, 56px);
}
.section-head h2, .faq-head h2 { font-size: clamp(1.9rem, 1rem + 2.8vw, 3.2rem); font-stretch: 112%; }
.section-head p { color: var(--ink-2); max-width: 48ch; }

/* Services */
.services { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.card {
  display: flex; flex-direction: column; gap: 12px;
  padding: clamp(22px, 2.6vw, 32px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
}
.card h3 { font-size: clamp(1.3rem, 1.1rem + .6vw, 1.55rem); font-stretch: 112%; }
.card > p { color: var(--ink-2); max-width: 52ch; margin-bottom: 12px; }

.art {
  margin-top: auto;
  padding: 14px 16px;
  background: var(--inset);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  font: 500 .85rem/1.5 var(--mono);
}
.art-head {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding-bottom: 10px; margin-bottom: 4px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--ink-2); font-size: .78rem;
}
.art-head > span:last-child { white-space: nowrap; }
.art ul, .art ol { list-style: none; margin: 0; padding: 0; }
.art li { display: grid; align-items: center; gap: 12px; padding: 7px 0; }
.art li + li { border-top: 1px solid var(--line-soft); }
.art .dim { color: var(--ink-2); }

/* Player-facing tier tags: brackets mean "a player sees this in game" */
.chip {
  display: inline-block; justify-self: start;
  padding: 1px 6px; border-radius: 4px;
  font: 700 .76rem/1.45 var(--mono); color: var(--ink);
  white-space: nowrap;
}
.chip::before { content: "["; }
.chip::after { content: "]"; }
.c-mem { background: var(--teal); }
.c-sup { background: var(--gold); }
.c-fnd { background: var(--lilac); }

.subs li { grid-template-columns: 5.5em minmax(0, 1fr) auto; }
.status { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #2E9E5B; }
.status.ends { color: var(--ink-2); }
.status.ends::before { background: #A0A8B0; }

.tiers li { grid-template-columns: 7.5em minmax(0, 1fr) 2.5em; }
.bar { height: 6px; border-radius: 3px; background: var(--line-soft); overflow: hidden; }
.bar i { display: block; height: 100%; width: var(--w); background: var(--ink); border-radius: 3px; }
.tiers .n { text-align: right; }

.queue li { grid-template-columns: 1.4em minmax(0, 1fr) auto; }
.queue .pos { color: var(--ink-2); }
.queue .waiting { color: var(--ink-2); }
.art-foot { padding-top: 8px; border-top: 1px solid var(--line-soft); color: var(--ink-2); font-size: .78rem; }

.perks li { grid-template-columns: auto minmax(0, 1fr) auto; }
.sw { position: relative; width: 28px; height: 16px; border-radius: 8px; background: #C3C9CF; }
.sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: #fff; }
.sw.on { background: var(--ink); }
.sw.on::after { left: 14px; }
.perks .off { color: var(--ink-2); }

/* How it works — a real sequence, so it is numbered */
.steps {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(20px, 2.5vw, 32px);
}
.steps li { padding-top: 22px; border-top: 2px solid var(--ink); }
.steps li:last-child { border-top-color: var(--gold); }
.steps .n {
  display: block; margin-bottom: 18px;
  font-family: var(--display); font-weight: 800; font-stretch: 130%;
  font-size: clamp(2.4rem, 1.6rem + 2vw, 3.4rem); line-height: 1;
}
.steps h3 { font-size: 1.2rem; font-stretch: 108%; margin-bottom: 8px; }
.steps p { color: var(--ink-2); font-size: 1rem; }

/* Principles */
.principles {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
}
.principles > div { padding: clamp(24px, 3vw, 36px); }
.principles > div + div { border-left: 1px solid var(--line); }
.principles h3 { font-size: 1.2rem; font-stretch: 108%; margin-bottom: 10px; }
.principles p { color: var(--ink-2); font-size: 1rem; }

/* FAQ */
.faq-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 32px 64px; align-items: start; }
.faq-head p { color: var(--ink-2); margin-top: 16px; max-width: 34ch; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary {
  position: relative; cursor: pointer; list-style: none;
  padding: 22px 44px 22px 0;
  font: 700 1.12rem/1.4 var(--body);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 6px; top: 50%;
  translate: 0 -50%;
  font: 400 1.6rem/1 var(--mono);
  transition: rotate .2s;
}
.faq details[open] summary::after { rotate: 45deg; }
.faq details p { padding-bottom: 24px; color: var(--ink-2); max-width: 62ch; }

/* Contact */
.contact { background: var(--gold); padding-block: clamp(64px, 8vw, 112px); }
.contact-inner { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr); gap: 32px 48px; align-items: end; }
.contact h2 { font-size: clamp(2rem, 1rem + 3vw, 3.5rem); font-stretch: 114%; font-weight: 820; }
.contact p { margin-top: 18px; font-size: 1.1rem; max-width: 46ch; color: #2A2410; }
.contact-action { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; justify-self: end; }
.contact-action .mail { font: 500 .95rem/1.4 var(--mono); color: #2A2410; }

/* Footer */
.foot { background: var(--ink); color: #B9C0C7; padding-block: 56px 40px; font-size: .95rem; }
.foot-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1fr); gap: 32px 48px; }
.foot .brand-word { color: #F2F4F5; }
.foot-about p { margin-top: 14px; max-width: 46ch; }
.foot-label { font: 500 .78rem/1.4 var(--mono); color: #8C959E; margin-bottom: 12px; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.foot a { color: #E6E9EC; text-decoration: none; }
.foot a:hover { text-decoration: underline; text-underline-offset: 3px; }
.foot :focus-visible { outline-color: var(--gold); }
.legal {
  grid-column: 1 / -1;
  margin-top: 16px; padding-top: 24px;
  border-top: 1px solid #2A3038;
  font: 400 .8rem/1.7 var(--mono); color: #8C959E;
}

/* ---------- Legal pages ---------- */
.doc-head { padding-block: clamp(40px, 6vw, 80px) clamp(28px, 4vw, 44px); }
.doc-head h1 { font-size: clamp(2.2rem, 1rem + 4vw, 4.2rem); font-stretch: 118%; font-weight: 820; letter-spacing: -0.025em; }
.doc-meta { margin-top: 16px; font: 400 .875rem/1.5 var(--mono); color: var(--ink-2); }
.doc-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.doc-tabs a {
  padding: .6em 1em;
  border: 1.5px solid var(--line); border-radius: 10px;
  font-size: .92rem; font-weight: 700; color: var(--ink-2); text-decoration: none;
}
.doc-tabs a:hover { border-color: var(--ink); color: var(--ink); }
.doc-tabs a[aria-current="page"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }

.doc {
  display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 80px); align-items: start;
  padding-block: clamp(32px, 4vw, 48px) clamp(72px, 9vw, 128px);
  border-top: 1px solid var(--line);
}
.toc { position: sticky; top: 92px; font-size: .92rem; }
.toc > p { font: 500 .78rem/1.4 var(--mono); color: var(--ink-2); margin-bottom: 12px; }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.toc a { display: grid; grid-template-columns: 2em minmax(0, 1fr); color: var(--ink-2); text-decoration: none; }
.toc a:hover { color: var(--ink); }
.toc .no { font-family: var(--mono); font-size: .85em; padding-top: .1em; }

.prose { max-width: 70ch; color: #2B3138; }
.prose .lede { font-size: 1.15rem; color: var(--ink); }
.prose > section { margin-top: 48px; }
.prose > section > h2 { scroll-margin-top: 92px; }
.prose h2 { display: flex; gap: .7em; align-items: baseline; margin-bottom: 14px; font-size: 1.45rem; font-stretch: 110%; }
.prose h2 .no { font: 500 .95rem/1 var(--mono); color: var(--ink-2); letter-spacing: 0; }
.prose h3 { margin: 24px 0 8px; font: 700 1.05rem/1.4 var(--body); letter-spacing: 0; }
.prose p + p, .prose p + ul, .prose ul + p, .prose p + .table-scroll, .prose .table-scroll + p { margin-top: 12px; }
.prose ul { margin: 12px 0 0; padding-left: 1.25em; }
.prose li + li { margin-top: 6px; }
.prose li > ul { margin-top: 8px; }
.prose li::marker { color: var(--ink-2); }
.prose strong { color: var(--ink); }
.prose a { text-underline-offset: 3px; }
.prose address { font-style: normal; margin-top: 12px; }
.callout {
  margin-top: 28px; padding: 20px 22px;
  background: var(--surface);
  border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: 12px;
}
.callout h2 { font-size: 1.15rem; margin-bottom: 10px; }
.callout ul { margin-top: 0; }
.table-scroll { overflow-x: auto; }
.prose table { width: 100%; min-width: 520px; border-collapse: collapse; font-size: .95rem; }
.prose th, .prose td { padding: 10px 16px 10px 0; text-align: left; vertical-align: top; border-top: 1px solid var(--line); }
.prose thead th { padding-top: 0; border-top: 0; font: 500 .78rem/1.4 var(--mono); color: var(--ink-2); }
.prose tbody th { font-weight: 700; color: var(--ink); }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .nav a:not(.btn) { display: none; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 40px; }
}
@media (max-width: 860px) {
  .services { grid-template-columns: 1fr; }
  .section-head, .faq-grid, .contact-inner { grid-template-columns: 1fr; }
  .contact-action { justify-self: start; }
  .principles { grid-template-columns: 1fr; }
  .principles > div + div { border-left: 0; border-top: 1px solid var(--line); }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-about { grid-column: 1 / -1; }
  .doc { grid-template-columns: minmax(0, 1fr); }
  .toc { display: none; }
}
@media (max-width: 760px) {
  .hero h1 { font-stretch: 104%; }
  .hero-sub { grid-template-columns: 1fr; }
  .cta-row { justify-content: flex-start; }
  .viewport { aspect-ratio: auto; height: 460px; }
  .chat { font-size: 13px; padding: 10px 12px; }
  .chat-log { height: 17em; }
  .hud .srv { display: none; }
}
@media (max-width: 520px) {
  .steps { grid-template-columns: 1fr; }
}

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