/* Публичные страницы (правила, оферта, поддержка…). Вёрстка перенесена с исходного
   сайта один в один, поэтому здесь только то, чего в исходном CSS нет: появление блоков
   и оформление страниц, собранных блочным редактором админки. */

/* Ссылки на прочие документы — компонент из исходной вёрстки, встаёт после карточки. */
.doc__links { animation: blockIn .42s cubic-bezier(.2,.8,.3,1) both; animation-delay: .34s; }
.footer__row a.is-on { color: var(--ink); }

/* Блоки редактора */
.pg-figure { margin: 22px 0; text-align: center; }
.pg-figure img { max-width: 100%; max-height: 420px; height: auto; width: auto; border-radius: 14px; }
.pg-figure figcaption { margin-top: 8px; font-size: 13px; color: var(--muted); }

.pg-quote {
  margin: 20px 0;
  padding: 14px 20px;
  border-left: 3px solid var(--brand);
  border-radius: 0 12px 12px 0;
  background: var(--surface);
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink-2);
}

.pg-list { margin: 0 0 14px; padding-left: 26px; }
.pg-list li { margin-bottom: 5px; font-size: 15px; line-height: 1.7; color: var(--ink-2); }

.pg-html { font-size: 15px; line-height: 1.7; color: var(--ink-2); }
.pg-html > :first-child { margin-top: 0; }
.pg-html > :last-child { margin-bottom: 0; }
.pg-html table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 14px; }
.pg-html th, .pg-html td { padding: 8px 10px; border: 1px solid var(--line); text-align: left; }
.pg-html th { background: var(--surface-2); font-weight: 800; }
.pg-html img { max-width: 100%; height: auto; border-radius: 12px; }
.pg-html code {
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--surface-2);
  font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  font-size: 13px;
}
.pg-html pre {
  margin: 14px 0;
  padding: 14px 16px;
  overflow-x: auto;
  border-radius: 12px;
  background: var(--dark);
  color: #f2f4f8;
  font-size: 13px;
  line-height: 1.6;
}
.pg-html pre code { padding: 0; background: none; color: inherit; }
.pg-html details { margin: 10px 0; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.pg-html summary { cursor: pointer; font-weight: 800; }

@media (max-width: 640px) { .pg-quote { padding: 12px 14px; } }

/* ── Появление страницы ───────────────────────────────────────────────────────
   Карточка документа и шаги «Как зайти» въезжают снизу с затемнением. Задержку
   лесенки задаёт номер блока в --i (ставит page.js), поэтому порядок не дублируем
   правилами. */
.doc__card, .supp__card { animation: docIn .48s cubic-bezier(.2,.8,.3,1) both; }
.pstep { animation: blockIn .46s cubic-bezier(.2,.8,.3,1) both; animation-delay: calc(var(--i, 0) * 90ms + .12s); }
#pageBody > * { animation: blockIn .42s cubic-bezier(.2,.8,.3,1) both; animation-delay: calc(var(--i, 0) * 55ms + 160ms); }

@keyframes docIn {
  from { opacity: 0; transform: translateY(14px) scale(.99); }
  to { opacity: 1; transform: none; }
}
@keyframes blockIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .doc__card, .supp__card, .pstep, #pageBody > *, .doc__links { animation: none; }
}

/* ── «Как зайти»: карточки-шаги, кнопки Minecraft, блок поддержки ─────────────
   Вёрстка страницы перенесена один в один (<main class="wrap play">), поэтому и эти
   правила взяты из исходного сайта без правок: те же селекторы, те же отступы. */
.play { padding-top: 56px; padding-bottom: 20px; }
.play h1 { font-size: clamp(32px, 5.4vw, 68px); line-height: 1.08; text-transform: uppercase; letter-spacing: -.03em; }
.play__lead { margin-top: 14px; font-size: 16.5px; color: var(--muted); }
.steps3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; margin-top: 44px; }
.pstep { position: relative; overflow: hidden; isolation: isolate; min-height: 540px; padding: 30px 30px 0; border-radius: var(--r-xl); background: var(--card); border: 1.5px solid var(--line); box-shadow: var(--sh-md); }
.pstep__n { display: inline-block; padding: 7px 14px; border-radius: 10px; background: linear-gradient(135deg, var(--brand-2), var(--brand)); color: var(--brand-ink); font-size: 13px; font-weight: 800; }
.pstep h3 { margin-top: 20px; font-size: 26px; }
.pstep p { margin-top: 10px; max-width: 300px; color: var(--ink-2); line-height: 1.55; }
.pstep p b { color: var(--brand); font-weight: 700; }
.pstep__art { position: absolute; left: 0; right: 0; bottom: 0; z-index: -1; }
.pstep__art--cube { height: 360px; display: grid; place-items: end center; -webkit-mask-image: linear-gradient(#000 84%, transparent 100%); mask-image: linear-gradient(#000 84%, transparent 100%); }
.furnace { width: min(90%, 350px); height: auto; display: block; margin-bottom: -22px; filter: drop-shadow(0 20px 24px rgba(20, 22, 31, .28)); animation: furnaceFloat 4.4s ease-in-out infinite; }
@keyframes furnaceFloat { 50% { transform: translateY(-8px); } }
@media (prefers-reduced-motion: reduce) { .furnace { animation: none; } }
.pstep__art--btns { height: 300px; display: grid; align-content: center; justify-items: center; gap: 18px; }
.mcbtn {
  display: block; width: min(86%, 300px); padding: 14px 10px 12px; text-align: center; white-space: nowrap;
  font: 400 24px/1 'MinecraftRus', monospace; color: #fff; text-shadow: 3px 3px 0 #3f3f3f; -webkit-font-smoothing: none;
  background: #7d7d7d; border: 3px solid #000;
  box-shadow: inset 3px 3px 0 rgba(255, 255, 255, .38), inset -3px -3px 0 rgba(0, 0, 0, .42);
}
.mcbtn:last-child { background: #707070; }
.mcbtn:nth-child(1) { transform: translateX(-10%); }
.mcbtn:nth-child(2) { transform: translateX(12%); }
.pstep__char { position: absolute; right: -26px; bottom: 0; width: 78%; height: 400px; z-index: -1; cursor: default; }
.playpill {
  position: absolute; left: 50%; bottom: 62px; transform: translateX(-50%); z-index: 2; display: flex; align-items: center; gap: 12px; padding: 10px 24px 10px 10px;
  border: 0; border-radius: 999px; background: var(--dark); color: #fff; cursor: pointer; box-shadow: 0 14px 34px rgba(20, 22, 31, .32); transition: transform .2s, box-shadow .2s;
}
.playpill:hover { transform: translateX(-50%) translateY(-3px); box-shadow: 0 18px 40px rgba(20, 22, 31, .4); }
.playpill__ic { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: rgba(255, 255, 255, .12); }
.playpill__tx { display: grid; text-align: left; line-height: 1.25; }
.playpill__tx small { font-size: 11.5px; color: rgba(255, 255, 255, .62); }
.playpill__tx b { font: 700 16px var(--font); }
.pstep__ver { position: absolute; left: 0; right: 0; bottom: 22px; text-align: center; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.help { display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap; margin-top: 44px; padding: 36px 40px; border-radius: var(--r-xl); background: var(--tint-1); border: 1.5px solid rgba(255, 159, 10, .35); }
.help h2 { font-size: clamp(22px, 2.6vw, 32px); }
.help p { margin-top: 10px; max-width: 520px; color: var(--ink-2); }
.help__btns { display: flex; gap: 12px; flex-wrap: wrap; }

/* Нумерованные шаги на «Проверке через АниДеск»: картинка внутри пункта, отступы щедрее. */
.doc--rules ol.doc-ol { padding-left: 26px; margin: 0 0 18px; }
.doc--rules ol.doc-ol > li { margin-bottom: 20px; }
.doc--rules ol.doc-ol .doc__fig { margin: 14px 0 6px; }

@media (max-width: 1000px) {
  .steps3 { grid-template-columns: 1fr; }
  .pstep { min-height: 480px; }
}
@media (max-width: 640px) {
  .play { padding-top: 34px; }
  .help { padding: 26px 22px; }
  .pstep { padding: 24px 22px 0; }
}

/* ── 404 ─────────────────────────────────────────────────────────────────────
   Отдельная полноэкранная страница: без шапки, подвала и заставки. Своя сцена —
   сетка, три световых пятна, крупная «404» с кубом вместо нуля и лесенка появления.
   Всё на CSS, инлайнового JS нет (CSP script-src 'self'). */
.nf-stage {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: clamp(76px, 12vh, 120px) clamp(18px, 4vw, 48px) clamp(40px, 8vh, 80px);
  overflow: hidden;
  background: radial-gradient(120% 80% at 50% -10%, var(--surface) 0%, transparent 60%), var(--bg);
}
.nf {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  max-width: 860px;
  text-align: center;
}
.nf__brand {
  position: absolute;
  top: clamp(18px, 3vw, 30px);
  left: clamp(18px, 3vw, 34px);
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font: 800 16px/1 var(--display);
  letter-spacing: -.01em;
  text-decoration: none;
  animation: nfFade .7s ease .12s backwards;
}
.nf__brand img { width: 30px; height: 30px; border-radius: 9px; box-shadow: 0 6px 16px rgba(20, 22, 34, .18); }
.nf__brand:hover { color: var(--brand); }
.nf__theme { position: absolute; top: clamp(14px, 2.6vw, 24px); right: clamp(16px, 3vw, 30px); z-index: 2; animation: nfFade .7s ease .2s backwards; }
.nf__sky { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.nf__mesh {
  position: absolute;
  inset: -2px;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 46px 46px;
  opacity: .5;
  -webkit-mask-image: radial-gradient(76% 62% at 50% 42%, #000 0%, transparent 80%);
  mask-image: radial-gradient(76% 62% at 50% 42%, #000 0%, transparent 80%);
  animation: nfMesh 26s linear infinite;
}
.nf__orb {
  position: absolute;
  width: 42vmax;
  height: 42vmax;
  max-width: 540px;
  max-height: 540px;
  border-radius: 50%;
  filter: blur(64px);
  opacity: .5;
}
.nf__orb--1 { left: -9%; top: -20%; background: radial-gradient(circle, rgba(255, 159, 10, .55), transparent 68%); animation: nfDrift 17s ease-in-out infinite alternate; }
.nf__orb--2 { right: -11%; bottom: -24%; background: radial-gradient(circle, rgba(91, 110, 240, .4), transparent 68%); animation: nfDrift 21s ease-in-out infinite alternate-reverse; }
.nf__orb--3 { left: 44%; bottom: -32%; width: 27vmax; height: 27vmax; background: radial-gradient(circle, rgba(23, 178, 106, .3), transparent 70%); animation: nfDrift 25s ease-in-out infinite alternate; }

.nf__num {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .07em;
  margin-bottom: 4px;
  font: 800 clamp(78px, 15vw, 178px)/1 var(--display);
  letter-spacing: -.02em;
  /* nfRise короче nfBob и идёт вторым в списке: пока играет появление, трансформом владеет оно. */
  animation: nfBob 7s ease-in-out infinite alternate, nfRise .9s cubic-bezier(.2, .8, .3, 1) backwards;
}
.nf__digit {
  background: linear-gradient(100deg, var(--brand) 8%, #ffd88f 32%, var(--brand) 58%, #ffb02e 82%);
  background-size: 260% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 14px 32px rgba(255, 159, 10, .26));
  animation: nfSheen 7s linear infinite;
}
.nf__cube {
  position: relative;
  width: .58em;
  height: .58em;
  transform-style: preserve-3d;
  animation: nfSpin 12s linear infinite;
}
.nf__cube i {
  position: absolute;
  inset: 0;
  display: block;
  border: 2.5px solid rgba(255, 159, 10, .8);
  border-radius: .09em;
  background: linear-gradient(135deg, rgba(255, 159, 10, .22), rgba(255, 159, 10, .04));
}
.nf__cube i:nth-child(1) { transform: translateZ(.29em); }
.nf__cube i:nth-child(2) { transform: rotateY(180deg) translateZ(.29em); }
.nf__cube i:nth-child(3) { transform: rotateY(90deg) translateZ(.29em); }
.nf__cube i:nth-child(4) { transform: rotateY(-90deg) translateZ(.29em); }
.nf__cube i:nth-child(5) { transform: rotateX(90deg) translateZ(.29em); }
.nf__cube i:nth-child(6) { transform: rotateX(-90deg) translateZ(.29em); }

.nf__tag { margin: 2px 0 0; font: 800 12px/1 var(--font); letter-spacing: .34em; text-transform: uppercase; color: var(--brand); animation: nfFade .7s ease .34s backwards; }
.nf h1 { margin: 18px 0 0; font: 800 clamp(24px, 3.4vw, 40px)/1.2 var(--display); animation: nfFade .7s ease .46s backwards; }
.nf__text { max-width: 640px; margin: 12px auto 0; color: var(--muted); font: 500 15px/1.65 var(--font); animation: nfFade .7s ease .58s backwards; }
.nf__btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 26px; animation: nfFade .7s ease .72s backwards; }
/* Внутри .doc ссылки подчёркнуты — кнопкам это не к лицу. */
.nf__btns .btn { text-decoration: none; }
.nf__links { display: flex; gap: 8px; align-items: center; justify-content: center; flex-wrap: wrap; margin-top: 30px; animation: nfFade .7s ease .86s backwards; }
.nf__links-label { margin-right: 2px; color: var(--muted); font: 700 11.5px var(--font); letter-spacing: .12em; text-transform: uppercase; }
.nf__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 15px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: var(--card);
  color: var(--ink-2);
  font: 700 13px var(--font);
  text-decoration: none;
  transition: transform .18s cubic-bezier(.2, .8, .3, 1), border-color .18s, color .18s, box-shadow .18s;
}
.nf__link:hover { color: var(--brand); border-color: var(--brand); transform: translateY(-3px); box-shadow: 0 12px 24px rgba(255, 159, 10, .16); }
.nf__link .ico { width: 16px; height: 16px; }

@keyframes nfRise { from { opacity: 0; transform: translateY(32px) scale(.96); filter: blur(9px); } to { opacity: 1; transform: none; filter: blur(0); } }
@keyframes nfBob { from { transform: translateY(-5px); } to { transform: translateY(5px); } }
@keyframes nfSheen { from { background-position: 0% 0; } to { background-position: 260% 0; } }
@keyframes nfSpin { from { transform: rotateX(-16deg) rotateY(0); } to { transform: rotateX(-16deg) rotateY(360deg); } }
@keyframes nfDrift { from { transform: translate3d(0, 0, 0) scale(1); } to { transform: translate3d(4%, -6%, 0) scale(1.12); } }
@keyframes nfMesh { to { background-position: 46px 46px; } }
@keyframes nfFade { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

@media (max-width: 640px) {
  .nf-stage { padding: 92px 16px 40px; }
  .nf__brand { font-size: 15px; }
  .nf__brand img { width: 26px; height: 26px; }
  .nf__orb { filter: blur(42px); opacity: .42; }
  .nf__links-label { width: 100%; margin: 0; }
}

/* Низкое окно: сцена не должна вытеснять быстрые ссылки за экран. */
@media (max-height: 620px) {
  .nf-stage { padding-top: 76px; }
  .nf__num { font-size: clamp(64px, 12vh, 104px); }
  .nf__btns { margin-top: 18px; }
  .nf__links { margin-top: 20px; }
}

/* Глобальное правило reduced-motion оставляет animation-duration .01ms — бесконечные
   анимации 404 крутились бы без конца, поэтому здесь именно animation: none. */
@media (prefers-reduced-motion: reduce) {
  .nf__num, .nf__digit, .nf__cube, .nf__mesh, .nf__orb, .nf__tag, .nf h1, .nf__text, .nf__btns, .nf__links, .nf__brand, .nf__theme { animation: none; }
  .nf__link { transition: none; }
}
